Skip to content

Make error pages translatable #11163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions options/locale/locale_en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ loading = Loading…

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

[error]
occurred = An error has occurred
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.

[startpage]
app_desc = A painless, self-hosted Git service
install = Easy to install
Expand Down
2 changes: 1 addition & 1 deletion templates/status/404.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
<div class="ui divider"></div>
<br>
<p>{{.i18n.Tr "error404" | Safe}}
{{if .ShowFooterVersion}}<p>Application Version: {{AppVer}}</p>{{end}}
{{if .ShowFooterVersion}}<p>{{.i18n.Tr "admin.config.app_ver"}}: {{AppVer}}</p>{{end}}
</div>
{{template "base/footer" .}}
6 changes: 3 additions & 3 deletions templates/status/500.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<p style="margin-top: 100px"><img class="ui centered image" src="{{StaticUrlPrefix}}/img/500.png" alt="500"/></p>
<div class="ui divider"></div>
<br>
{{if .ErrorMsg}}<p>An error has occurred :</p>
{{if .ErrorMsg}}<p>{{.i18n.Tr "error.occurred"}}:</p>
<pre style="text-align: left">{{.ErrorMsg}}</pre>{{end}}
{{if .ShowFooterVersion}}<p>Application Version: {{AppVer}}</p>{{end}}
{{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}}
{{if .ShowFooterVersion}}<p>{{.i18n.Tr "admin.config.app_ver"}}: {{AppVer}}</p>{{end}}
{{if .IsAdmin}}<p>{{.i18n.Tr "error.report_message" | Safe}}</p>{{end}}
</div>
{{template "base/footer" .}}