Skip to content

Commit 41cebeb

Browse files
authored
Make error pages translatable (#11163)
* make error pages translatable * dont translate ":" * link need Safe
1 parent 6a3de9e commit 41cebeb

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

options/locale/locale_en-US.ini

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,10 @@ loading = Loading…
8282

8383
error404 = The page you are trying to reach either <strong>does not exist</strong> or <strong>you are not authorized</strong> to view it.
8484

85+
[error]
86+
occurred = An error has occurred
87+
report_message = If you are sure this is a Gitea bug, please search for issue on <a href="https://github.com/go-gitea/gitea/issues">GitHub</a> and open new issue if necessary.
88+
8589
[startpage]
8690
app_desc = A painless, self-hosted Git service
8791
install = Easy to install

templates/status/404.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,6 @@
55
<div class="ui divider"></div>
66
<br>
77
<p>{{.i18n.Tr "error404" | Safe}}
8-
{{if .ShowFooterVersion}}<p>Application Version: {{AppVer}}</p>{{end}}
8+
{{if .ShowFooterVersion}}<p>{{.i18n.Tr "admin.config.app_ver"}}: {{AppVer}}</p>{{end}}
99
</div>
1010
{{template "base/footer" .}}

templates/status/500.tmpl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
<p style="margin-top: 100px"><img class="ui centered image" src="{{StaticUrlPrefix}}/img/500.png" alt="500"/></p>
44
<div class="ui divider"></div>
55
<br>
6-
{{if .ErrorMsg}}<p>An error has occurred :</p>
6+
{{if .ErrorMsg}}<p>{{.i18n.Tr "error.occurred"}}:</p>
77
<pre style="text-align: left">{{.ErrorMsg}}</pre>{{end}}
8-
{{if .ShowFooterVersion}}<p>Application Version: {{AppVer}}</p>{{end}}
9-
{{if .IsAdmin}}<p>If you are sure this is Gitea bug, please search for issue on <a href="https://github.com/go-gitea/gitea/issues">GitHub</a> and open new issue if necessary.</p>{{end}}
8+
{{if .ShowFooterVersion}}<p>{{.i18n.Tr "admin.config.app_ver"}}: {{AppVer}}</p>{{end}}
9+
{{if .IsAdmin}}<p>{{.i18n.Tr "error.report_message" | Safe}}</p>{{end}}
1010
</div>
1111
{{template "base/footer" .}}

0 commit comments

Comments
 (0)