1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-27 12:48:37 +00:00

Always use ctx.Locale.Tr inside templates (#27231)

This commit is contained in:
delvh
2023-09-25 10:56:50 +02:00
committed by GitHub
parent e6d8b14620
commit 7960ba7e2b
305 changed files with 3810 additions and 3810 deletions

View File

@@ -32,10 +32,10 @@
{{.OriginalAuthor}}
</span>
<span class="text grey muted-links">
{{$.locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr | Safe}} {{if $.Repository.OriginalURL}}
{{ctx.Locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr | Safe}} {{if $.Repository.OriginalURL}}
</span>
<span class="text migrate">
({{$.locale.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe}}){{end}}
({{ctx.Locale.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe}}){{end}}
</span>
{{else}}
{{if gt .Poster.ID 0}}
@@ -45,7 +45,7 @@
{{end}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr | Safe}}
</span>
{{end}}
</div>
@@ -62,7 +62,7 @@
{{if .RenderedContent}}
{{.RenderedContent|Str2html}}
{{else}}
<span class="no-content">{{$.locale.Tr "repo.issues.no_content"}}</span>
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
{{end}}
</div>
<div id="issuecomment-{{.ID}}-raw" class="raw-content gt-hidden">{{.Content}}</div>
@@ -84,9 +84,9 @@
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{if .Issue.IsPull}}
{{$.locale.Tr "repo.pulls.reopened_at" .EventTag $createdStr | Safe}}
{{ctx.Locale.Tr "repo.pulls.reopened_at" .EventTag $createdStr | Safe}}
{{else}}
{{$.locale.Tr "repo.issues.reopened_at" .EventTag $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.reopened_at" .EventTag $createdStr | Safe}}
{{end}}
</span>
</div>
@@ -97,9 +97,9 @@
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{if .Issue.IsPull}}
{{$.locale.Tr "repo.pulls.closed_at" .EventTag $createdStr | Safe}}
{{ctx.Locale.Tr "repo.pulls.closed_at" .EventTag $createdStr | Safe}}
{{else}}
{{$.locale.Tr "repo.issues.closed_at" .EventTag $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.closed_at" .EventTag $createdStr | Safe}}
{{end}}
</span>
</div>
@@ -111,16 +111,16 @@
{{template "shared/user/authorlink" .Poster}}
{{$link := printf "%s/commit/%s" $.Repository.Link ($.Issue.PullRequest.MergedCommitID|PathEscape)}}
{{if eq $.Issue.PullRequest.Status 3}}
{{$.locale.Tr "repo.issues.comment_manually_pull_merged_at" (printf `<a class="ui sha" href="%[1]s"><b>%[2]s</b></a>` ($link|Escape) (ShortSha $.Issue.PullRequest.MergedCommitID)) (printf "<b>%[1]s</b>" ($.BaseTarget|Escape)) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.comment_manually_pull_merged_at" (printf `<a class="ui sha" href="%[1]s"><b>%[2]s</b></a>` ($link|Escape) (ShortSha $.Issue.PullRequest.MergedCommitID)) (printf "<b>%[1]s</b>" ($.BaseTarget|Escape)) $createdStr | Safe}}
{{else}}
{{$.locale.Tr "repo.issues.comment_pull_merged_at" (printf `<a class="ui sha" href="%[1]s"><b>%[2]s</b></a>` ($link|Escape) (ShortSha $.Issue.PullRequest.MergedCommitID)) (printf "<b>%[1]s</b>" ($.BaseTarget|Escape)) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.comment_pull_merged_at" (printf `<a class="ui sha" href="%[1]s"><b>%[2]s</b></a>` ($link|Escape) (ShortSha $.Issue.PullRequest.MergedCommitID)) (printf "<b>%[1]s</b>" ($.BaseTarget|Escape)) $createdStr | Safe}}
{{end}}
</span>
</div>
{{else if eq .Type 3 5 6}}
{{$refFrom:= ""}}
{{if ne .RefRepoID .Issue.RepoID}}
{{$refFrom = $.locale.Tr "repo.issues.ref_from" (.RefRepo.FullName|Escape)}}
{{$refFrom = ctx.Locale.Tr "repo.issues.ref_from" (.RefRepo.FullName|Escape)}}
{{end}}
{{$refTr := "repo.issues.ref_issue_from"}}
{{if .Issue.IsPull}}
@@ -137,7 +137,7 @@
{{if eq .RefAction 3}}<del>{{end}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr $refTr (.EventTag|Escape) $createdStr (.RefCommentLink|Escape) $refFrom | Safe}}
{{ctx.Locale.Tr $refTr (.EventTag|Escape) $createdStr (.RefCommentLink|Escape) $refFrom | Safe}}
</span>
{{if eq .RefAction 3}}</del>{{end}}
@@ -151,7 +151,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}}
</span>
<div class="detail">
{{svg "octicon-git-commit"}}
@@ -166,11 +166,11 @@
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{if and .AddedLabels (not .RemovedLabels)}}
{{$.locale.TrN (len .AddedLabels) "repo.issues.add_label" "repo.issues.add_labels" (RenderLabels $.Context .AddedLabels $.RepoLink) $createdStr | Safe}}
{{ctx.Locale.TrN (len .AddedLabels) "repo.issues.add_label" "repo.issues.add_labels" (RenderLabels $.Context .AddedLabels $.RepoLink) $createdStr | Safe}}
{{else if and (not .AddedLabels) .RemovedLabels}}
{{$.locale.TrN (len .RemovedLabels) "repo.issues.remove_label" "repo.issues.remove_labels" (RenderLabels $.Context .RemovedLabels $.RepoLink) $createdStr | Safe}}
{{ctx.Locale.TrN (len .RemovedLabels) "repo.issues.remove_label" "repo.issues.remove_labels" (RenderLabels $.Context .RemovedLabels $.RepoLink) $createdStr | Safe}}
{{else}}
{{$.locale.Tr "repo.issues.add_remove_labels" (RenderLabels $.Context .AddedLabels $.RepoLink) (RenderLabels $.Context .RemovedLabels $.RepoLink) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.add_remove_labels" (RenderLabels $.Context .AddedLabels $.RepoLink) (RenderLabels $.Context .RemovedLabels $.RepoLink) $createdStr | Safe}}
{{end}}
</span>
</div>
@@ -181,7 +181,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{if gt .OldMilestoneID 0}}{{if gt .MilestoneID 0}}{{$.locale.Tr "repo.issues.change_milestone_at" (.OldMilestone.Name|Escape) (.Milestone.Name|Escape) $createdStr | Safe}}{{else}}{{$.locale.Tr "repo.issues.remove_milestone_at" (.OldMilestone.Name|Escape) $createdStr | Safe}}{{end}}{{else if gt .MilestoneID 0}}{{$.locale.Tr "repo.issues.add_milestone_at" (.Milestone.Name|Escape) $createdStr | Safe}}{{end}}
{{if gt .OldMilestoneID 0}}{{if gt .MilestoneID 0}}{{ctx.Locale.Tr "repo.issues.change_milestone_at" (.OldMilestone.Name|Escape) (.Milestone.Name|Escape) $createdStr | Safe}}{{else}}{{ctx.Locale.Tr "repo.issues.remove_milestone_at" (.OldMilestone.Name|Escape) $createdStr | Safe}}{{end}}{{else if gt .MilestoneID 0}}{{$.locale.Tr "repo.issues.add_milestone_at" (.Milestone.Name|Escape) $createdStr | Safe}}{{end}}
</span>
</div>
{{else if eq .Type 9}}
@@ -193,9 +193,9 @@
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Assignee}}
{{if eq .Poster.ID .Assignee.ID}}
{{$.locale.Tr "repo.issues.remove_self_assignment" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.remove_self_assignment" $createdStr | Safe}}
{{else}}
{{$.locale.Tr "repo.issues.remove_assignee_at" (.Poster.GetDisplayName|Escape) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.remove_assignee_at" (.Poster.GetDisplayName|Escape) $createdStr | Safe}}
{{end}}
</span>
{{else}}
@@ -203,9 +203,9 @@
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Assignee}}
{{if eq .Poster.ID .AssigneeID}}
{{$.locale.Tr "repo.issues.self_assign_at" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.self_assign_at" $createdStr | Safe}}
{{else}}
{{$.locale.Tr "repo.issues.add_assignee_at" (.Poster.GetDisplayName|Escape) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.add_assignee_at" (.Poster.GetDisplayName|Escape) $createdStr | Safe}}
{{end}}
</span>
{{end}}
@@ -217,7 +217,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.change_title_at" (.OldTitle|RenderEmoji $.Context) (.NewTitle|RenderEmoji $.Context) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.change_title_at" (.OldTitle|RenderEmoji $.Context) (.NewTitle|RenderEmoji $.Context) $createdStr | Safe}}
</span>
</div>
{{else if eq .Type 11}}
@@ -226,7 +226,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.delete_branch_at" (.OldRef|Escape) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.delete_branch_at" (.OldRef|Escape) $createdStr | Safe}}
</span>
</div>
{{else if eq .Type 12}}
@@ -235,7 +235,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.start_tracking_history" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.start_tracking_history" $createdStr | Safe}}
</span>
</div>
{{else if eq .Type 13}}
@@ -244,7 +244,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.stop_tracking_history" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.stop_tracking_history" $createdStr | Safe}}
</span>
{{template "repo/issue/view_content/comments_delete_time" dict "ctxData" $ "comment" .}}
<div class="detail">
@@ -263,7 +263,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.add_time_history" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.add_time_history" $createdStr | Safe}}
</span>
{{template "repo/issue/view_content/comments_delete_time" dict "ctxData" $ "comment" .}}
<div class="detail">
@@ -282,7 +282,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.cancel_tracking_history" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.cancel_tracking_history" $createdStr | Safe}}
</span>
</div>
{{else if eq .Type 16}}
@@ -291,7 +291,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.due_date_added" (DateTime "long" .Content) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.due_date_added" (DateTime "long" .Content) $createdStr | Safe}}
</span>
</div>
{{else if eq .Type 17}}
@@ -304,7 +304,7 @@
{{if eq (len $parsedDeadline) 2}}
{{$from := DateTime "long" (index $parsedDeadline 1)}}
{{$to := DateTime "long" (index $parsedDeadline 0)}}
{{$.locale.Tr "repo.issues.due_date_modified" $to $from $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.due_date_modified" $to $from $createdStr | Safe}}
{{end}}
</span>
</div>
@@ -314,7 +314,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.due_date_remove" (DateTime "long" .Content) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.due_date_remove" (DateTime "long" .Content) $createdStr | Safe}}
</span>
</div>
{{else if eq .Type 19}}
@@ -323,7 +323,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.dependency.added_dependency" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.dependency.added_dependency" $createdStr | Safe}}
</span>
{{if .DependentIssue}}
<div class="detail">
@@ -346,7 +346,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.dependency.removed_dependency" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.dependency.removed_dependency" $createdStr | Safe}}
</span>
{{if .DependentIssue}}
<div class="detail">
@@ -383,22 +383,22 @@
{{.OriginalAuthor}}
</span>
<span class="text grey muted-links"> {{if $.Repository.OriginalURL}}</span>
<span class="text migrate">({{$.locale.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe}}){{end}}</span>
<span class="text migrate">({{ctx.Locale.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe}}){{end}}</span>
{{else}}
{{template "shared/user/authorlink" .Poster}}
{{end}}
{{if eq .Review.Type 1}}
{{$.locale.Tr "repo.issues.review.approve" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.review.approve" $createdStr | Safe}}
{{else if eq .Review.Type 2}}
{{$.locale.Tr "repo.issues.review.comment" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.review.comment" $createdStr | Safe}}
{{else if eq .Review.Type 3}}
{{$.locale.Tr "repo.issues.review.reject" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.review.reject" $createdStr | Safe}}
{{else}}
{{$.locale.Tr "repo.issues.review.comment" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.review.comment" $createdStr | Safe}}
{{end}}
{{if .Review.Dismissed}}
<div class="ui small label">{{$.locale.Tr "repo.issues.review.dismissed_label"}}</div>
<div class="ui small label">{{ctx.Locale.Tr "repo.issues.review.dismissed_label"}}</div>
{{end}}
</span>
</div>
@@ -419,12 +419,12 @@
{{.OriginalAuthor}}
</span>
<span class="text grey muted-links"> {{if $.Repository.OriginalURL}}</span>
<span class="text migrate">({{$.locale.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe}}){{end}}</span>
<span class="text migrate">({{ctx.Locale.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe}}){{end}}</span>
{{else}}
{{template "shared/user/authorlink" .Poster}}
{{end}}
{{$.locale.Tr "repo.issues.review.left_comment" | Safe}}
{{ctx.Locale.Tr "repo.issues.review.left_comment" | Safe}}
</span>
</div>
<div class="comment-header-right actions gt-df gt-ac">
@@ -440,7 +440,7 @@
{{if .RenderedContent}}
{{.RenderedContent|Str2html}}
{{else}}
<span class="no-content">{{$.locale.Tr "repo.issues.no_content"}}</span>
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
{{end}}
</div>
<div id="issuecomment-{{.ID}}-raw" class="raw-content gt-hidden">{{.Content}}</div>
@@ -470,8 +470,8 @@
<div class="gt-df gt-ac">
<a href="{{(index $comms 0).CodeCommentLink}}" class="file-comment gt-ml-3 gt-word-break">{{$filename}}</a>
{{if $invalid}}
<span class="ui label basic small gt-ml-3" data-tooltip-content="{{$.locale.Tr "repo.issues.review.outdated_description"}}">
{{$.locale.Tr "repo.issues.review.outdated"}}
<span class="ui label basic small gt-ml-3" data-tooltip-content="{{ctx.Locale.Tr "repo.issues.review.outdated_description"}}">
{{ctx.Locale.Tr "repo.issues.review.outdated"}}
</span>
{{end}}
</div>
@@ -480,17 +480,17 @@
<button id="show-outdated-{{(index $comms 0).ID}}" data-comment="{{(index $comms 0).ID}}" class="{{if not $resolved}}gt-hidden {{end}}ui compact labeled button show-outdated gt-df gt-ac">
{{svg "octicon-unfold" 16 "gt-mr-3"}}
{{if $resolved}}
{{$.locale.Tr "repo.issues.review.show_resolved"}}
{{ctx.Locale.Tr "repo.issues.review.show_resolved"}}
{{else}}
{{$.locale.Tr "repo.issues.review.show_outdated"}}
{{ctx.Locale.Tr "repo.issues.review.show_outdated"}}
{{end}}
</button>
<button id="hide-outdated-{{(index $comms 0).ID}}" data-comment="{{(index $comms 0).ID}}" class="{{if $resolved}}gt-hidden {{end}}ui compact labeled button hide-outdated gt-df gt-ac">
{{svg "octicon-fold" 16 "gt-mr-3"}}
{{if $resolved}}
{{$.locale.Tr "repo.issues.review.hide_resolved"}}
{{ctx.Locale.Tr "repo.issues.review.hide_resolved"}}
{{else}}
{{$.locale.Tr "repo.issues.review.hide_outdated"}}
{{ctx.Locale.Tr "repo.issues.review.hide_outdated"}}
{{end}}
</button>
{{end}}
@@ -531,11 +531,11 @@
{{.OriginalAuthor}}
</span>
<span class="text grey muted-links"> {{if $.Repository.OriginalURL}}</span>
<span class="text migrate">({{$.locale.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe}}){{end}}</span>
<span class="text migrate">({{ctx.Locale.Tr "repo.migrated_from" ($.Repository.OriginalURL|Escape) ($.Repository.GetOriginalURLHostname|Escape) | Safe}}){{end}}</span>
{{else}}
{{template "shared/user/authorlink" .Poster}}
{{end}}
{{$.locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdSubStr | Safe}}
{{ctx.Locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdSubStr | Safe}}
</span>
</div>
<div class="comment-header-right actions gt-df gt-ac">
@@ -551,7 +551,7 @@
{{if .RenderedContent}}
{{.RenderedContent|Str2html}}
{{else}}
<span class="no-content">{{$.locale.Tr "repo.issues.no_content"}}</span>
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
{{end}}
</div>
<div id="issuecomment-{{.ID}}-raw" class="raw-content gt-hidden">{{.Content}}</div>
@@ -570,7 +570,7 @@
{{if $resolved}}
<div class="ui grey text">
{{svg "octicon-check" 16 "gt-mr-2"}}
<b>{{$resolveDoer.Name}}</b> {{$.locale.Tr "repo.issues.review.resolved_by"}}
<b>{{$resolveDoer.Name}}</b> {{ctx.Locale.Tr "repo.issues.review.resolved_by"}}
</div>
{{end}}
</div>
@@ -578,15 +578,15 @@
{{if and $.CanMarkConversation $isNotPending}}
<button class="ui tiny basic button resolve-conversation" data-origin="timeline" data-action="{{if not $resolved}}Resolve{{else}}UnResolve{{end}}" data-comment-id="{{(index $comms 0).ID}}" data-update-url="{{$.RepoLink}}/issues/resolve_conversation">
{{if $resolved}}
{{$.locale.Tr "repo.issues.review.un_resolve_conversation"}}
{{ctx.Locale.Tr "repo.issues.review.un_resolve_conversation"}}
{{else}}
{{$.locale.Tr "repo.issues.review.resolve_conversation"}}
{{ctx.Locale.Tr "repo.issues.review.resolve_conversation"}}
{{end}}
</button>
{{end}}
{{if and $.SignedUserID (not $.Repository.IsArchived)}}
<button class="comment-form-reply ui primary tiny labeled icon button gt-ml-2 gt-mr-0">
{{svg "octicon-reply" 16 "reply icon gt-mr-2"}}{{$.locale.Tr "repo.diff.comment.reply"}}
{{svg "octicon-reply" 16 "reply icon gt-mr-2"}}{{ctx.Locale.Tr "repo.diff.comment.reply"}}
</button>
{{end}}
</div>
@@ -606,12 +606,12 @@
{{if .Content}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.lock_with_reason" .Content $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.lock_with_reason" .Content $createdStr | Safe}}
</span>
{{else}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.lock_no_reason" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.lock_no_reason" $createdStr | Safe}}
</span>
{{end}}
</div>
@@ -621,7 +621,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.unlock_comment" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.unlock_comment" $createdStr | Safe}}
</span>
</div>
{{else if eq .Type 25}}
@@ -630,7 +630,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
<a{{if gt .Poster.ID 0}} href="{{.Poster.HomeLink}}"{{end}}>{{.Poster.Name}}</a>
{{$.locale.Tr "repo.pulls.change_target_branch_at" (.OldRef|Escape) (.NewRef|Escape) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.pulls.change_target_branch_at" (.OldRef|Escape) (.NewRef|Escape) $createdStr | Safe}}
</span>
</div>
{{else if eq .Type 26}}
@@ -640,7 +640,7 @@
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{$.locale.Tr "repo.issues.del_time_history" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.del_time_history" $createdStr | Safe}}
</span>
<div class="detail">
{{svg "octicon-clock"}}
@@ -661,12 +661,12 @@
{{if (gt .AssigneeID 0)}}
{{if .RemovedAssignee}}
{{if eq .PosterID .AssigneeID}}
{{$.locale.Tr "repo.issues.review.remove_review_request_self" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.review.remove_review_request_self" $createdStr | Safe}}
{{else}}
{{$.locale.Tr "repo.issues.review.remove_review_request" (.Assignee.GetDisplayName|Escape) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.review.remove_review_request" (.Assignee.GetDisplayName|Escape) $createdStr | Safe}}
{{end}}
{{else}}
{{$.locale.Tr "repo.issues.review.add_review_request" (.Assignee.GetDisplayName|Escape) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.review.add_review_request" (.Assignee.GetDisplayName|Escape) $createdStr | Safe}}
{{end}}
{{else}}
<!-- If the assigned team is deleted, just displaying "Ghost Team" in the comment -->
@@ -675,9 +675,9 @@
{{$teamName = .AssigneeTeam.Name}}
{{end}}
{{if .RemovedAssignee}}
{{$.locale.Tr "repo.issues.review.remove_review_request" ($teamName|Escape) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.review.remove_review_request" ($teamName|Escape) $createdStr | Safe}}
{{else}}
{{$.locale.Tr "repo.issues.review.add_review_request" ($teamName|Escape) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.review.add_review_request" ($teamName|Escape) $createdStr | Safe}}
{{end}}
{{end}}
</span>
@@ -692,14 +692,14 @@
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{if .IsForcePush}}
{{$.locale.Tr "repo.issues.force_push_codes" ($.Issue.PullRequest.HeadBranch|Escape) (ShortSha .OldCommit) (($.Issue.Repo.CommitLink .OldCommit)|Escape) (ShortSha .NewCommit) (($.Issue.Repo.CommitLink .NewCommit)|Escape) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.force_push_codes" ($.Issue.PullRequest.HeadBranch|Escape) (ShortSha .OldCommit) (($.Issue.Repo.CommitLink .OldCommit)|Escape) (ShortSha .NewCommit) (($.Issue.Repo.CommitLink .NewCommit)|Escape) $createdStr | Safe}}
{{else}}
{{$.locale.TrN (len .Commits) "repo.issues.push_commit_1" "repo.issues.push_commits_n" (len .Commits) $createdStr | Safe}}
{{ctx.Locale.TrN (len .Commits) "repo.issues.push_commit_1" "repo.issues.push_commits_n" (len .Commits) $createdStr | Safe}}
{{end}}
</span>
{{if and .IsForcePush $.Issue.PullRequest.BaseRepo.Name}}
<span class="gt-float-right comparebox">
<a href="{{$.Issue.PullRequest.BaseRepo.Link}}/compare/{{PathEscape .OldCommit}}..{{PathEscape .NewCommit}}" rel="nofollow" class="ui compare label">{{$.locale.Tr "repo.issues.force_push_compare"}}</a>
<a href="{{$.Issue.PullRequest.BaseRepo.Link}}/compare/{{PathEscape .OldCommit}}..{{PathEscape .NewCommit}}" rel="nofollow" class="ui compare label">{{ctx.Locale.Tr "repo.issues.force_push_compare"}}</a>
</span>
{{end}}
</div>
@@ -716,19 +716,19 @@
{{$oldProjectDisplayHtml := "Unknown Project"}}
{{if .OldProject}}
{{$trKey := printf "projects.type-%d.display_name" .OldProject.Type}}
{{$oldProjectDisplayHtml = printf `<span data-tooltip-content="%s">%s</span>` ($.locale.Tr $trKey | Escape) (.OldProject.Title | Escape)}}
{{$oldProjectDisplayHtml = printf `<span data-tooltip-content="%s">%s</span>` (ctx.Locale.Tr $trKey | Escape) (.OldProject.Title | Escape)}}
{{end}}
{{$newProjectDisplayHtml := "Unknown Project"}}
{{if .Project}}
{{$trKey := printf "projects.type-%d.display_name" .Project.Type}}
{{$newProjectDisplayHtml = printf `<span data-tooltip-content="%s">%s</span>` ($.locale.Tr $trKey | Escape) (.Project.Title | Escape)}}
{{$newProjectDisplayHtml = printf `<span data-tooltip-content="%s">%s</span>` (ctx.Locale.Tr $trKey | Escape) (.Project.Title | Escape)}}
{{end}}
{{if and (gt .OldProjectID 0) (gt .ProjectID 0)}}
{{$.locale.Tr "repo.issues.change_project_at" $oldProjectDisplayHtml $newProjectDisplayHtml $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.change_project_at" $oldProjectDisplayHtml $newProjectDisplayHtml $createdStr | Safe}}
{{else if gt .OldProjectID 0}}
{{$.locale.Tr "repo.issues.remove_project_at" $oldProjectDisplayHtml $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.remove_project_at" $oldProjectDisplayHtml $createdStr | Safe}}
{{else if gt .ProjectID 0}}
{{$.locale.Tr "repo.issues.add_project_at" $newProjectDisplayHtml $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.add_project_at" $newProjectDisplayHtml $createdStr | Safe}}
{{end}}
</span>
</div>
@@ -748,7 +748,7 @@
{{else}}
{{$reviewerName = .Review.OriginalAuthor}}
{{end}}
{{$.locale.Tr "repo.issues.review.dismissed" $reviewerName $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.review.dismissed" $reviewerName $createdStr | Safe}}
</span>
</div>
{{if .Content}}
@@ -761,7 +761,7 @@
</a>
{{end}}
<span class="text grey muted-links">
{{$.locale.Tr "action.review_dismissed_reason"}}
{{ctx.Locale.Tr "action.review_dismissed_reason"}}
</span>
</div>
<div class="ui attached segment">
@@ -769,7 +769,7 @@
{{if .RenderedContent}}
{{.RenderedContent|Str2html}}
{{else}}
<span class="no-content">{{$.locale.Tr "repo.issues.no_content"}}</span>
<span class="no-content">{{ctx.Locale.Tr "repo.issues.no_content"}}</span>
{{end}}
</div>
</div>
@@ -784,11 +784,11 @@
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{if and .OldRef .NewRef}}
{{$.locale.Tr "repo.issues.change_ref_at" (.OldRef|Escape) (.NewRef|Escape) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.change_ref_at" (.OldRef|Escape) (.NewRef|Escape) $createdStr | Safe}}
{{else if .OldRef}}
{{$.locale.Tr "repo.issues.remove_ref_at" (.OldRef|Escape) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.remove_ref_at" (.OldRef|Escape) $createdStr | Safe}}
{{else}}
{{$.locale.Tr "repo.issues.add_ref_at" (.NewRef|Escape) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.add_ref_at" (.NewRef|Escape) $createdStr | Safe}}
{{end}}
</span>
</div>
@@ -797,8 +797,8 @@
<span class="badge">{{svg "octicon-git-merge" 16}}</span>
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{if eq .Type 34}}{{$.locale.Tr "repo.pulls.auto_merge_newly_scheduled_comment" $createdStr | Safe}}
{{else}}{{$.locale.Tr "repo.pulls.auto_merge_canceled_schedule_comment" $createdStr | Safe}}{{end}}
{{if eq .Type 34}}{{ctx.Locale.Tr "repo.pulls.auto_merge_newly_scheduled_comment" $createdStr | Safe}}
{{else}}{{ctx.Locale.Tr "repo.pulls.auto_merge_canceled_schedule_comment" $createdStr | Safe}}{{end}}
</span>
</div>
{{else if or (eq .Type 36) (eq .Type 37)}}
@@ -807,8 +807,8 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{if eq .Type 36}}{{$.locale.Tr "repo.issues.pin_comment" $createdStr | Safe}}
{{else}}{{$.locale.Tr "repo.issues.unpin_comment" $createdStr | Safe}}{{end}}
{{if eq .Type 36}}{{ctx.Locale.Tr "repo.issues.pin_comment" $createdStr | Safe}}
{{else}}{{ctx.Locale.Tr "repo.issues.unpin_comment" $createdStr | Safe}}{{end}}
</span>
</div>
{{end}}