From 2325fe777dcb8c8bbaea84718dcfbdc298d33304 Mon Sep 17 00:00:00 2001 From: Denys Konovalov Date: Sun, 24 Sep 2023 22:31:58 +0200 Subject: cleanup locale function usage (#27227) --- templates/repo/issue/comment_tab.tmpl | 1 - templates/repo/issue/fields/textarea.tmpl | 1 - templates/repo/issue/milestones.tmpl | 2 +- templates/repo/issue/search.tmpl | 2 +- templates/repo/issue/view_content.tmpl | 1 - .../issue/view_content/comments_delete_time.tmpl | 2 +- templates/repo/issue/view_content/pull.tmpl | 2 +- .../issue/view_content/pull_merge_instruction.tmpl | 20 ++++++++++---------- 8 files changed, 14 insertions(+), 17 deletions(-) (limited to 'templates/repo/issue') 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 @@
{{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 @@ 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 @@
-
{{$.locale.Tr "repo.pulls.merge_instruction_hint" | Safe}}
+
{{ctx.Locale.Tr "repo.pulls.merge_instruction_hint" | Safe}}
-

{{$.locale.Tr "step1"}}

{{$.locale.Tr "repo.pulls.merge_instruction_step1_desc"}}
+

{{ctx.Locale.Tr "step1"}}

{{ctx.Locale.Tr "repo.pulls.merge_instruction_step1_desc"}}
- {{if eq $.Issue.PullRequest.Flow 0}} -
git checkout -b {{if ne $.Issue.PullRequest.HeadRepo.ID $.Issue.PullRequest.BaseRepo.ID}}{{$.Issue.PullRequest.HeadRepo.OwnerName}}-{{end}}{{$.Issue.PullRequest.HeadBranch}} {{$.Issue.PullRequest.BaseBranch}}
-
git pull {{if ne $.Issue.PullRequest.HeadRepo.ID $.Issue.PullRequest.BaseRepo.ID}}{{else}}origin{{end}} {{$.Issue.PullRequest.HeadBranch}}
+ {{if eq .Flow 0}} +
git checkout -b {{if ne .HeadRepo.ID .BaseRepo.ID}}{{.HeadRepo.OwnerName}}-{{end}}{{.HeadBranch}} {{.BaseBranch}}
+
git pull {{if ne .HeadRepo.ID .BaseRepo.ID}}{{else}}origin{{end}} {{.HeadBranch}}
{{else}} -
git fetch origin {{$.Issue.PullRequest.GetGitRefName}}:{{$.Issue.PullRequest.HeadBranch}}
+
git fetch origin {{.GetGitRefName}}:{{.HeadBranch}}
{{end}}
-

{{$.locale.Tr "step2"}}

{{$.locale.Tr "repo.pulls.merge_instruction_step2_desc"}}
+

{{ctx.Locale.Tr "step2"}}

{{ctx.Locale.Tr "repo.pulls.merge_instruction_step2_desc"}}
-
git checkout {{$.Issue.PullRequest.BaseBranch}}
-
git merge --no-ff {{if ne $.Issue.PullRequest.HeadRepo.ID $.Issue.PullRequest.BaseRepo.ID}}{{$.Issue.PullRequest.HeadRepo.OwnerName}}-{{end}}{{$.Issue.PullRequest.HeadBranch}}
-
git push origin {{$.Issue.PullRequest.BaseBranch}}
+
git checkout {{.BaseBranch}}
+
git merge --no-ff {{if ne .HeadRepo.ID .BaseRepo.ID}}{{.HeadRepo.OwnerName}}-{{end}}{{.HeadBranch}}
+
git push origin {{.BaseBranch}}
-- cgit v1.2.3