mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
Always use ctx.Locale.Tr
inside templates (#27231)
This commit is contained in:
parent
e6d8b14620
commit
7960ba7e2b
305 changed files with 3810 additions and 3810 deletions
|
@ -5,12 +5,12 @@
|
|||
<form class="ui form" action="{{.Link}}" method="post">
|
||||
{{.CsrfTokenHtml}}
|
||||
<h3 class="ui top attached header">
|
||||
{{.locale.Tr "new_fork"}}
|
||||
{{ctx.Locale.Tr "new_fork"}}
|
||||
</h3>
|
||||
<div class="ui attached segment">
|
||||
{{template "base/alert" .}}
|
||||
<div class="inline required field {{if .Err_Owner}}error{{end}}">
|
||||
<label>{{.locale.Tr "repo.owner"}}</label>
|
||||
<label>{{ctx.Locale.Tr "repo.owner"}}</label>
|
||||
<div class="ui selection owner dropdown">
|
||||
<input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
|
||||
<span class="text truncated-item-container" title="{{.ContextUser.Name}}">
|
||||
|
@ -36,30 +36,30 @@
|
|||
</div>
|
||||
|
||||
<div class="inline field">
|
||||
<label>{{.locale.Tr "repo.fork_from"}}</label>
|
||||
<label>{{ctx.Locale.Tr "repo.fork_from"}}</label>
|
||||
<a href="{{.ForkRepo.Link}}" class="gt-dib">{{.ForkRepo.FullName}}</a>
|
||||
</div>
|
||||
<div class="inline required field {{if .Err_RepoName}}error{{end}}">
|
||||
<label for="repo_name">{{.locale.Tr "repo.repo_name"}}</label>
|
||||
<label for="repo_name">{{ctx.Locale.Tr "repo.repo_name"}}</label>
|
||||
<input id="repo_name" name="repo_name" value="{{.repo_name}}" required>
|
||||
</div>
|
||||
<div class="inline field">
|
||||
<label>{{.locale.Tr "repo.visibility"}}</label>
|
||||
<label>{{ctx.Locale.Tr "repo.visibility"}}</label>
|
||||
<div class="ui disabled checkbox">
|
||||
<input type="checkbox" disabled {{if .IsPrivate}}checked{{end}}>
|
||||
<label>{{.locale.Tr "repo.visibility_helper" | Safe}}</label>
|
||||
<label>{{ctx.Locale.Tr "repo.visibility_helper" | Safe}}</label>
|
||||
</div>
|
||||
<span class="help">{{.locale.Tr "repo.fork_visibility_helper"}}</span>
|
||||
<span class="help">{{ctx.Locale.Tr "repo.fork_visibility_helper"}}</span>
|
||||
</div>
|
||||
<div class="inline field {{if .Err_Description}}error{{end}}">
|
||||
<label for="description">{{.locale.Tr "repo.repo_desc"}}</label>
|
||||
<label for="description">{{ctx.Locale.Tr "repo.repo_desc"}}</label>
|
||||
<textarea id="description" name="description">{{.description}}</textarea>
|
||||
</div>
|
||||
|
||||
<div class="inline field">
|
||||
<label></label>
|
||||
<button class="ui primary button{{if not .CanForkRepo}} disabled{{end}}">
|
||||
{{.locale.Tr "repo.fork_repo"}}
|
||||
{{ctx.Locale.Tr "repo.fork_repo"}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
{{if not $.Issue.PullRequest.HasMerged}}
|
||||
<div class="ui top attached header">
|
||||
{{if eq .LatestCommitStatus.State "pending"}}
|
||||
{{$.locale.Tr "repo.pulls.status_checking"}}
|
||||
{{ctx.Locale.Tr "repo.pulls.status_checking"}}
|
||||
{{else if eq .LatestCommitStatus.State "success"}}
|
||||
{{$.locale.Tr "repo.pulls.status_checks_success"}}
|
||||
{{ctx.Locale.Tr "repo.pulls.status_checks_success"}}
|
||||
{{else if eq .LatestCommitStatus.State "warning"}}
|
||||
{{$.locale.Tr "repo.pulls.status_checks_warning"}}
|
||||
{{ctx.Locale.Tr "repo.pulls.status_checks_warning"}}
|
||||
{{else if eq .LatestCommitStatus.State "failure"}}
|
||||
{{$.locale.Tr "repo.pulls.status_checks_failure"}}
|
||||
{{ctx.Locale.Tr "repo.pulls.status_checks_failure"}}
|
||||
{{else if eq .LatestCommitStatus.State "error"}}
|
||||
{{$.locale.Tr "repo.pulls.status_checks_error"}}
|
||||
{{ctx.Locale.Tr "repo.pulls.status_checks_error"}}
|
||||
{{else}}
|
||||
{{$.locale.Tr "repo.pulls.status_checking"}}
|
||||
{{ctx.Locale.Tr "repo.pulls.status_checking"}}
|
||||
{{end}}
|
||||
</div>
|
||||
{{end}}
|
||||
|
@ -24,9 +24,9 @@
|
|||
<span>{{.Context}} <span class="text grey">{{.Description}}</span></span>
|
||||
<div class="ui status-details">
|
||||
{{if $.is_context_required}}
|
||||
{{if (call $.is_context_required .Context)}}<div class="ui label">{{$.locale.Tr "repo.pulls.status_checks_requested"}}</div>{{end}}
|
||||
{{if (call $.is_context_required .Context)}}<div class="ui label">{{ctx.Locale.Tr "repo.pulls.status_checks_requested"}}</div>{{end}}
|
||||
{{end}}
|
||||
<span>{{if .TargetURL}}<a href="{{.TargetURL}}">{{$.locale.Tr "repo.pulls.status_checks_details"}}</a>{{end}}</span>
|
||||
<span>{{if .TargetURL}}<a href="{{.TargetURL}}">{{ctx.Locale.Tr "repo.pulls.status_checks_details"}}</a>{{end}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
@ -2,17 +2,17 @@
|
|||
<div class="ui top attached pull tabular menu">
|
||||
<a class="item {{if .PageIsPullConversation}}active{{end}}" href="{{.Issue.Link}}">
|
||||
{{svg "octicon-comment-discussion"}}
|
||||
{{$.locale.Tr "repo.pulls.tab_conversation"}}
|
||||
{{ctx.Locale.Tr "repo.pulls.tab_conversation"}}
|
||||
<span class="ui small label">{{.Issue.NumComments}}</span>
|
||||
</a>
|
||||
<a class="item {{if .PageIsPullCommits}}active{{end}}" {{if .NumCommits}}href="{{.Issue.Link}}/commits"{{end}}>
|
||||
{{svg "octicon-git-commit"}}
|
||||
{{$.locale.Tr "repo.pulls.tab_commits"}}
|
||||
{{ctx.Locale.Tr "repo.pulls.tab_commits"}}
|
||||
<span class="ui small label">{{if .NumCommits}}{{.NumCommits}}{{else}}-{{end}}</span>
|
||||
</a>
|
||||
<a class="item {{if .PageIsPullFiles}}active{{end}}" href="{{.Issue.Link}}/files">
|
||||
{{svg "octicon-diff"}}
|
||||
{{$.locale.Tr "repo.pulls.tab_files"}}
|
||||
{{ctx.Locale.Tr "repo.pulls.tab_files"}}
|
||||
<span class="ui small label">{{if .NumFiles}}{{.NumFiles}}{{else}}-{{end}}</span>
|
||||
</a>
|
||||
<span class="item gt-ml-auto gt-pr-0 gt-font-bold gt-df gt-ac gt-gap-3">
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue