aboutsummaryrefslogtreecommitdiffstats
path: root/modules/charset
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2024-02-15 05:48:45 +0800
committerGitHub <noreply@github.com>2024-02-14 21:48:45 +0000
commitf3eb835886031df7a562abc123c3f6011c81eca8 (patch)
tree6db218680b00a81f2ea46675d5dde94642a232b9 /modules/charset
parent94d06be035bac468129903c9f32e785baf3c1c3b (diff)
downloadgitea-f3eb835886031df7a562abc123c3f6011c81eca8.tar.gz
gitea-f3eb835886031df7a562abc123c3f6011c81eca8.zip
Refactor locale&string&template related code (#29165)
Clarify when "string" should be used (and be escaped), and when "template.HTML" should be used (no need to escape) And help PRs like #29059 , to render the error messages correctly.
Diffstat (limited to 'modules/charset')
-rw-r--r--modules/charset/escape_stream.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/charset/escape_stream.go b/modules/charset/escape_stream.go
index 3f08fd94a4..29943eb858 100644
--- a/modules/charset/escape_stream.go
+++ b/modules/charset/escape_stream.go
@@ -173,7 +173,7 @@ func (e *escapeStreamer) ambiguousRune(r, c rune) error {
Val: "ambiguous-code-point",
}, html.Attribute{
Key: "data-tooltip-content",
- Val: e.locale.Tr("repo.ambiguous_character", r, c),
+ Val: e.locale.TrString("repo.ambiguous_character", r, c),
}); err != nil {
return err
}