Skip to content

Commit

Permalink
improve
Browse files Browse the repository at this point in the history
  • Loading branch information
yp05327 committed Aug 18, 2023
1 parent 514f5f6 commit 4f10f70
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/context/context_response.go
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ func (ctx *Context) notFoundInternal(logMsg string, logErr error) {
ctx.Data["Title"] = "Page Not Found"

if git.IsErrNotExist(logErr) {
ctx.Data["NotFoundPrompt"] = ctx.Locale.Tr("repo.tree_not_found", ctx.Repo.BranchName, ctx.Repo.Repository.Name, ctx.Repo.TreePath)
ctx.Data["NotFoundPrompt"] = ctx.Locale.Tr("repo.tree_path_not_found", ctx.Repo.BranchName, ctx.Repo.Repository.Name, ctx.Repo.TreePath)
ctx.Data["NotFoundGoBackURL"] = ctx.Repo.RepoLink + "/src/branch/" + url.PathEscape(ctx.Repo.BranchName)
}
ctx.HTML(http.StatusNotFound, base.TplName("status/404"))
Expand Down
2 changes: 1 addition & 1 deletion options/locale/locale_en-US.ini
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ step2 = Step 2:

error = Error
error404 = The page you are trying to reach either <strong>does not exist</strong> or <strong>you are not authorized</strong> to view it.
back = Back
go_back = Go Back

never = Never
unknown = Unknown
Expand Down
2 changes: 1 addition & 1 deletion templates/status/404.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="ui container center">
<p style="margin-top: 100px"><img src="{{AssetUrlPrefix}}/img/404.png" alt="404"></p>
<p>{{if .NotFoundPrompt}}{{.NotFoundPrompt}}{{else}}{{.locale.Tr "error404" | Safe}}{{end}}</p>
{{if .NotFoundGoBackURL}}<a class="ui button green" href="{{.NotFoundGoBackURL}}">{{.locale.Tr "back"}}</a>{{end}}
{{if .NotFoundGoBackURL}}<a class="ui button green" href="{{.NotFoundGoBackURL}}">{{.locale.Tr "go_back"}}</a>{{end}}

<div class="divider"></div>
<br>
Expand Down

0 comments on commit 4f10f70

Please sign in to comment.