diff options
author | Denys Konovalov <kontakt@denyskon.de> | 2023-09-24 22:31:58 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-24 20:31:58 +0000 |
commit | 2325fe777dcb8c8bbaea84718dcfbdc298d33304 (patch) | |
tree | 3b9977d47bbc50de83e1ffd5cb7411a4568c9fb8 /templates/repo/issue | |
parent | 3a187eace5643a3dc681f87bdd8d0edbb742aa8f (diff) | |
download | gitea-2325fe777dcb8c8bbaea84718dcfbdc298d33304.tar.gz gitea-2325fe777dcb8c8bbaea84718dcfbdc298d33304.zip |
cleanup locale function usage (#27227)
Diffstat (limited to 'templates/repo/issue')
-rw-r--r-- | templates/repo/issue/comment_tab.tmpl | 1 | ||||
-rw-r--r-- | templates/repo/issue/fields/textarea.tmpl | 1 | ||||
-rw-r--r-- | templates/repo/issue/milestones.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/issue/search.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/issue/view_content.tmpl | 1 | ||||
-rw-r--r-- | templates/repo/issue/view_content/comments_delete_time.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/issue/view_content/pull.tmpl | 2 | ||||
-rw-r--r-- | templates/repo/issue/view_content/pull_merge_instruction.tmpl | 20 |
8 files changed, 14 insertions, 17 deletions
diff --git a/templates/repo/issue/comment_tab.tmpl b/templates/repo/issue/comment_tab.tmpl index c40e6ddf32..d167055ca5 100644 --- a/templates/repo/issue/comment_tab.tmpl +++ b/templates/repo/issue/comment_tab.tmpl @@ -5,7 +5,6 @@ <div class="field"> {{template "shared/combomarkdowneditor" (dict - "locale" $.locale "MarkdownPreviewUrl" (print .Repository.Link "/markup") "MarkdownPreviewContext" .RepoLink "TextareaName" "content" diff --git a/templates/repo/issue/fields/textarea.tmpl b/templates/repo/issue/fields/textarea.tmpl index 49d51eb5a8..55adeb28d0 100644 --- a/templates/repo/issue/fields/textarea.tmpl +++ b/templates/repo/issue/fields/textarea.tmpl @@ -7,7 +7,6 @@ {{if $useMarkdownEditor}} {{template "shared/combomarkdowneditor" (dict - "locale" .root.locale "ContainerClasses" "gt-hidden" "MarkdownPreviewUrl" (print .root.RepoLink "/markup") "MarkdownPreviewContext" .root.RepoLink diff --git a/templates/repo/issue/milestones.tmpl b/templates/repo/issue/milestones.tmpl index c6693e35cc..a6cb11dde6 100644 --- a/templates/repo/issue/milestones.tmpl +++ b/templates/repo/issue/milestones.tmpl @@ -26,7 +26,7 @@ <form class="list-header-search ui form ignore-dirty"> <div class="ui small search fluid action input"> <input type="hidden" name="state" value="{{$.State}}"> - {{template "shared/searchinput" dict "locale" .locale "Value" .Keyword}} + {{template "shared/searchinput" dict "Value" .Keyword}} <button class="ui small icon button" type="submit" aria-label="{{.locale.Tr "explore.search"}}"> {{svg "octicon-search"}} </button> diff --git a/templates/repo/issue/search.tmpl b/templates/repo/issue/search.tmpl index ec7789b952..fc9797c781 100644 --- a/templates/repo/issue/search.tmpl +++ b/templates/repo/issue/search.tmpl @@ -7,7 +7,7 @@ <input type="hidden" name="project" value="{{$.ProjectID}}"> <input type="hidden" name="assignee" value="{{$.AssigneeID}}"> <input type="hidden" name="poster" value="{{$.PosterID}}"> - {{template "shared/searchinput" dict "locale" .locale "Value" .Keyword}} + {{template "shared/searchinput" dict "Value" .Keyword}} {{if .PageIsIssueList}} <button id="issue-list-quick-goto" class="ui small icon button gt-hidden" data-tooltip-content="{{.locale.Tr "explore.go_to"}}" data-repo-link="{{.RepoLink}}">{{svg "octicon-hash"}}</button> {{end}} diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index 463a38499d..5450df0a7a 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -147,7 +147,6 @@ <div class="ui comment form"> <div class="field"> {{template "shared/combomarkdowneditor" (dict - "locale" $.locale "MarkdownPreviewUrl" (print .Repository.Link "/markup") "MarkdownPreviewContext" .RepoLink "TextareaName" "content" diff --git a/templates/repo/issue/view_content/comments_delete_time.tmpl b/templates/repo/issue/view_content/comments_delete_time.tmpl index d63e9c7e60..7fed4eb37a 100644 --- a/templates/repo/issue/view_content/comments_delete_time.tmpl +++ b/templates/repo/issue/view_content/comments_delete_time.tmpl @@ -7,7 +7,7 @@ {{.ctxData.CsrfTokenHtml}} </form> <div class="header">{{.ctxData.locale.Tr "repo.issues.del_time"}}</div> - {{template "base/modal_actions_confirm" (dict "locale" .ctxData.locale)}} + {{template "base/modal_actions_confirm"}} </div> <button class="ui icon button compact mini issue-delete-time" data-id="{{.comment.Time.ID}}" data-tooltip-content="{{.ctxData.locale.Tr "repo.issues.del_time"}}"> {{svg "octicon-trash"}} diff --git a/templates/repo/issue/view_content/pull.tmpl b/templates/repo/issue/view_content/pull.tmpl index a2e727c40a..a256660b13 100644 --- a/templates/repo/issue/view_content/pull.tmpl +++ b/templates/repo/issue/view_content/pull.tmpl @@ -373,7 +373,7 @@ {{end}} {{if and .ShowMergeInstructions .Issue.PullRequest.HeadRepo (not .Issue.PullRequest.HasMerged) (not .Issue.IsClosed)}} - {{template "repo/issue/view_content/pull_merge_instruction" (dict "locale" .locale "Issue" .Issue)}} + {{template "repo/issue/view_content/pull_merge_instruction" .Issue.PullRequest}} {{end}} </div> </div> diff --git a/templates/repo/issue/view_content/pull_merge_instruction.tmpl b/templates/repo/issue/view_content/pull_merge_instruction.tmpl index 71e3fc12bc..b1b52645e0 100644 --- a/templates/repo/issue/view_content/pull_merge_instruction.tmpl +++ b/templates/repo/issue/view_content/pull_merge_instruction.tmpl @@ -1,19 +1,19 @@ <div class="divider"></div> -<div class="instruct-toggle"> {{$.locale.Tr "repo.pulls.merge_instruction_hint" | Safe}} </div> +<div class="instruct-toggle"> {{ctx.Locale.Tr "repo.pulls.merge_instruction_hint" | Safe}} </div> <div class="instruct-content gt-mt-3 gt-hidden"> - <div><h3 class="gt-dib">{{$.locale.Tr "step1"}}</h3> {{$.locale.Tr "repo.pulls.merge_instruction_step1_desc"}}</div> + <div><h3 class="gt-dib">{{ctx.Locale.Tr "step1"}}</h3> {{ctx.Locale.Tr "repo.pulls.merge_instruction_step1_desc"}}</div> <div class="ui secondary segment"> - {{if eq $.Issue.PullRequest.Flow 0}} - <div>git checkout -b {{if ne $.Issue.PullRequest.HeadRepo.ID $.Issue.PullRequest.BaseRepo.ID}}{{$.Issue.PullRequest.HeadRepo.OwnerName}}-{{end}}{{$.Issue.PullRequest.HeadBranch}} {{$.Issue.PullRequest.BaseBranch}}</div> - <div>git pull {{if ne $.Issue.PullRequest.HeadRepo.ID $.Issue.PullRequest.BaseRepo.ID}}<gitea-origin-url data-url="{{$.Issue.PullRequest.HeadRepo.Link}}"></gitea-origin-url>{{else}}origin{{end}} {{$.Issue.PullRequest.HeadBranch}}</div> + {{if eq .Flow 0}} + <div>git checkout -b {{if ne .HeadRepo.ID .BaseRepo.ID}}{{.HeadRepo.OwnerName}}-{{end}}{{.HeadBranch}} {{.BaseBranch}}</div> + <div>git pull {{if ne .HeadRepo.ID .BaseRepo.ID}}<gitea-origin-url data-url="{{.HeadRepo.Link}}"></gitea-origin-url>{{else}}origin{{end}} {{.HeadBranch}}</div> {{else}} - <div>git fetch origin {{$.Issue.PullRequest.GetGitRefName}}:{{$.Issue.PullRequest.HeadBranch}}</div> + <div>git fetch origin {{.GetGitRefName}}:{{.HeadBranch}}</div> {{end}} </div> - <div><h3 class="gt-dib">{{$.locale.Tr "step2"}}</h3> {{$.locale.Tr "repo.pulls.merge_instruction_step2_desc"}}</div> + <div><h3 class="gt-dib">{{ctx.Locale.Tr "step2"}}</h3> {{ctx.Locale.Tr "repo.pulls.merge_instruction_step2_desc"}}</div> <div class="ui secondary segment"> - <div>git checkout {{$.Issue.PullRequest.BaseBranch}}</div> - <div>git merge --no-ff {{if ne $.Issue.PullRequest.HeadRepo.ID $.Issue.PullRequest.BaseRepo.ID}}{{$.Issue.PullRequest.HeadRepo.OwnerName}}-{{end}}{{$.Issue.PullRequest.HeadBranch}}</div> - <div>git push origin {{$.Issue.PullRequest.BaseBranch}}</div> + <div>git checkout {{.BaseBranch}}</div> + <div>git merge --no-ff {{if ne .HeadRepo.ID .BaseRepo.ID}}{{.HeadRepo.OwnerName}}-{{end}}{{.HeadBranch}}</div> + <div>git push origin {{.BaseBranch}}</div> </div> </div> |