mirror of
https://github.com/go-gitea/gitea.git
synced 2026-10-05 03:58:28 +02:00
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.
This commit is contained in:
1 parent
94d06be035
commit
f3eb835886
77 files changed
+356
-284
No files matched your search
@@ -314,7 +314,7 @@ func (f *NewSlackHookForm) Validate(req *http.Request, errs binding.Errors) bind
|
||||
errs = append(errs, binding.Error{
|
||||
FieldNames: []string{"Channel"},
|
||||
Classification: "",
|
||||
Message: ctx.Tr("repo.settings.add_webhook.invalid_channel_name"),
|
||||
Message: ctx.Locale.TrString("repo.settings.add_webhook.invalid_channel_name"),
|
||||
})
|
||||
}
|
||||
return middleware.Validate(errs, ctx.Data, f, ctx.Locale)
|
||||
|
||||
Reference in new issue
Block a user