1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-22 18:28:37 +00:00

Remove unnecessary "Safe" modifier from templates (#29318)

Follow #29165
This commit is contained in:
wxiaoguang
2024-02-23 01:02:33 +08:00
committed by GitHub
parent f390d5eb4f
commit 7a1557d2cc
86 changed files with 242 additions and 242 deletions

View File

@@ -23,11 +23,11 @@
{{if not $.Page.Repository}}{{.Repo.FullName}}{{end}}#{{.Index}}
{{$timeStr := TimeSinceUnix .GetLastEventTimestamp ctx.Locale}}
{{if .OriginalAuthor}}
{{ctx.Locale.Tr .GetLastEventLabelFake $timeStr (.OriginalAuthor|Escape) | Safe}}
{{ctx.Locale.Tr .GetLastEventLabelFake $timeStr (.OriginalAuthor|Escape)}}
{{else if gt .Poster.ID 0}}
{{ctx.Locale.Tr .GetLastEventLabel $timeStr (.Poster.HomeLink|Escape) (.Poster.GetDisplayName | Escape) | Safe}}
{{ctx.Locale.Tr .GetLastEventLabel $timeStr (.Poster.HomeLink|Escape) (.Poster.GetDisplayName | Escape)}}
{{else}}
{{ctx.Locale.Tr .GetLastEventLabelFake $timeStr (.Poster.GetDisplayName | Escape) | Safe}}
{{ctx.Locale.Tr .GetLastEventLabelFake $timeStr (.Poster.GetDisplayName | Escape)}}
{{end}}
</span>
</div>

View File

@@ -21,7 +21,7 @@
</i>
</label>
</div>
<span class="info">{{ctx.Locale.Tr "repo.issues.filter_label_exclude" | Safe}}</span>
<span class="info">{{ctx.Locale.Tr "repo.issues.filter_label_exclude"}}</span>
<div class="divider"></div>
<a class="{{if .AllLabels}}active selected {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}{{if $.ShowArchivedLabels}}&archived=true{{end}}">{{ctx.Locale.Tr "repo.issues.filter_label_no_select"}}</a>
<a class="{{if .NoLabel}}active selected {{end}}item" href="{{$.Link}}?q={{$.Keyword}}&type={{$.ViewType}}&sort={{$.SortType}}&state={{$.State}}&labels=0&milestone={{$.MilestoneID}}&project={{$.ProjectID}}&assignee={{$.AssigneeID}}&poster={{$.PosterID}}{{if $.ShowArchivedLabels}}&archived=true{{end}}">{{ctx.Locale.Tr "repo.issues.filter_label_select_no_label"}}</a>

View File

@@ -29,9 +29,9 @@
<label>{{ctx.Locale.Tr "repo.issues.label_exclusive"}}</label>
</div>
<br>
<small class="desc">{{ctx.Locale.Tr "repo.issues.label_exclusive_desc" | Safe}}</small>
<small class="desc">{{ctx.Locale.Tr "repo.issues.label_exclusive_desc"}}</small>
<div class="desc gt-ml-2 gt-mt-3 gt-hidden label-exclusive-warning">
{{svg "octicon-alert"}} {{ctx.Locale.Tr "repo.issues.label_exclusive_warning" | Safe}}
{{svg "octicon-alert"}} {{ctx.Locale.Tr "repo.issues.label_exclusive_warning"}}
</div>
<br>
</div>

View File

@@ -17,7 +17,7 @@
<label>{{ctx.Locale.Tr "repo.issues.label_exclusive"}}</label>
</div>
<br>
<small class="desc">{{ctx.Locale.Tr "repo.issues.label_exclusive_desc" | Safe}}</small>
<small class="desc">{{ctx.Locale.Tr "repo.issues.label_exclusive_desc"}}</small>
</div>
<div class="field">
<label for="description">{{ctx.Locale.Tr "repo.issues.label_description"}}</label>

View File

@@ -31,7 +31,7 @@
<div classs="gt-df gt-ac">
{{$closedDate:= TimeSinceUnix .Milestone.ClosedDateUnix ctx.Locale}}
{{if .IsClosed}}
{{svg "octicon-clock"}} {{ctx.Locale.Tr "repo.milestones.closed" $closedDate | Safe}}
{{svg "octicon-clock"}} {{ctx.Locale.Tr "repo.milestones.closed" $closedDate}}
{{else}}
{{if .Milestone.DeadlineString}}
@@ -45,7 +45,7 @@
{{end}}
{{end}}
</div>
<div class="gt-mr-3">{{ctx.Locale.Tr "repo.milestones.completeness" .Milestone.Completeness | Safe}}</div>
<div class="gt-mr-3">{{ctx.Locale.Tr "repo.milestones.completeness" .Milestone.Completeness}}</div>
{{if .TotalTrackedTime}}
<div data-tooltip-content='{{ctx.Locale.Tr "tracked_time_summary"}}'>
{{svg "octicon-clock"}}

View File

@@ -47,14 +47,14 @@
{{if .UpdatedUnix}}
<div class="flex-text-block">
{{svg "octicon-clock"}}
{{ctx.Locale.Tr "repo.milestones.update_ago" (TimeSinceUnix .UpdatedUnix ctx.Locale) | Safe}}
{{ctx.Locale.Tr "repo.milestones.update_ago" (TimeSinceUnix .UpdatedUnix ctx.Locale)}}
</div>
{{end}}
<div class="flex-text-block">
{{if .IsClosed}}
{{$closedDate:= TimeSinceUnix .ClosedDateUnix ctx.Locale}}
{{svg "octicon-clock" 14}}
{{ctx.Locale.Tr "repo.milestones.closed" $closedDate | Safe}}
{{ctx.Locale.Tr "repo.milestones.closed" $closedDate}}
{{else}}
{{if .DeadlineString}}
<span class="flex-text-inline {{if .IsOverdue}}text red{{end}}">

View File

@@ -13,7 +13,7 @@
<div class="field">
<input name="title" id="issue_title" placeholder="{{ctx.Locale.Tr "repo.milestones.title"}}" value="{{if .TitleQuery}}{{.TitleQuery}}{{else if .IssueTemplateTitle}}{{.IssueTemplateTitle}}{{else}}{{.title}}{{end}}" autofocus required maxlength="255" autocomplete="off">
{{if .PageIsComparePull}}
<div class="title_wip_desc" data-wip-prefixes="{{JsonUtils.EncodeToString .PullRequestWorkInProgressPrefixes}}">{{ctx.Locale.Tr "repo.pulls.title_wip_desc" (index .PullRequestWorkInProgressPrefixes 0| Escape) | Safe}}</div>
<div class="title_wip_desc" data-wip-prefixes="{{JsonUtils.EncodeToString .PullRequestWorkInProgressPrefixes}}">{{ctx.Locale.Tr "repo.pulls.title_wip_desc" (index .PullRequestWorkInProgressPrefixes 0| Escape)}}</div>
{{end}}
</div>
{{if .Fields}}

View File

@@ -28,10 +28,10 @@
{{.Issue.OriginalAuthor}}
</span>
<span class="text grey muted-links">
{{ctx.Locale.Tr "repo.issues.commented_at" (.Issue.HashTag|Escape) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.commented_at" (.Issue.HashTag|Escape) $createdStr}}
</span>
<span class="text migrate">
{{if .Repository.OriginalURL}} ({{ctx.Locale.Tr "repo.migrated_from" (.Repository.OriginalURL|Escape) (.Repository.GetOriginalURLHostname|Escape) | Safe}}){{end}}
{{if .Repository.OriginalURL}} ({{ctx.Locale.Tr "repo.migrated_from" (.Repository.OriginalURL|Escape) (.Repository.GetOriginalURLHostname|Escape)}}){{end}}
</span>
{{else}}
<a class="inline-timeline-avatar" href="{{.Issue.Poster.HomeLink}}">
@@ -39,7 +39,7 @@
</a>
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Issue.Poster}}
{{ctx.Locale.Tr "repo.issues.commented_at" (.Issue.HashTag|Escape) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.commented_at" (.Issue.HashTag|Escape) $createdStr}}
</span>
{{end}}
</div>
@@ -133,7 +133,7 @@
</div>
{{else}}
<div class="ui warning message">
{{ctx.Locale.Tr "repo.issues.sign_in_require_desc" (.SignInLink|Escape) | Safe}}
{{ctx.Locale.Tr "repo.issues.sign_in_require_desc" (.SignInLink|Escape)}}
</div>
{{end}}
{{end}}{{/* end if: .IsSigned */}}

View File

@@ -33,10 +33,10 @@
{{.OriginalAuthor}}
</span>
<span class="text grey muted-links">
{{ctx.Locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr | Safe}} {{if $.Repository.OriginalURL}}
{{ctx.Locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr}} {{if $.Repository.OriginalURL}}
</span>
<span class="text migrate">
({{ctx.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)}}){{end}}
</span>
{{else}}
{{if gt .Poster.ID 0}}
@@ -46,7 +46,7 @@
{{end}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{ctx.Locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdStr}}
</span>
{{end}}
</div>
@@ -85,9 +85,9 @@
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{if .Issue.IsPull}}
{{ctx.Locale.Tr "repo.pulls.reopened_at" .EventTag $createdStr | Safe}}
{{ctx.Locale.Tr "repo.pulls.reopened_at" .EventTag $createdStr}}
{{else}}
{{ctx.Locale.Tr "repo.issues.reopened_at" .EventTag $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.reopened_at" .EventTag $createdStr}}
{{end}}
</span>
</div>
@@ -98,9 +98,9 @@
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{if .Issue.IsPull}}
{{ctx.Locale.Tr "repo.pulls.closed_at" .EventTag $createdStr | Safe}}
{{ctx.Locale.Tr "repo.pulls.closed_at" .EventTag $createdStr}}
{{else}}
{{ctx.Locale.Tr "repo.issues.closed_at" .EventTag $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.closed_at" .EventTag $createdStr}}
{{end}}
</span>
</div>
@@ -138,7 +138,7 @@
{{if eq .RefAction 3}}<del>{{end}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{ctx.Locale.Tr $refTr (.EventTag|Escape) $createdStr ((.RefCommentLink ctx)|Escape) $refFrom | Safe}}
{{ctx.Locale.Tr $refTr (.EventTag|Escape) $createdStr ((.RefCommentLink ctx)|Escape) $refFrom}}
</span>
{{if eq .RefAction 3}}</del>{{end}}
@@ -152,7 +152,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{ctx.Locale.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.commit_ref_at" .EventTag $createdStr}}
</span>
<div class="detail">
{{svg "octicon-git-commit"}}
@@ -167,11 +167,11 @@
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{if and .AddedLabels (not .RemovedLabels)}}
{{ctx.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}}
{{else if and (not .AddedLabels) .RemovedLabels}}
{{ctx.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}}
{{else}}
{{ctx.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}}
{{end}}
</span>
</div>
@@ -182,7 +182,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}}{{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}}{{ctx.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}}{{else}}{{ctx.Locale.Tr "repo.issues.remove_milestone_at" (.OldMilestone.Name|Escape) $createdStr}}{{end}}{{else if gt .MilestoneID 0}}{{ctx.Locale.Tr "repo.issues.add_milestone_at" (.Milestone.Name|Escape) $createdStr}}{{end}}
</span>
</div>
{{else if and (eq .Type 9) (gt .AssigneeID 0)}}
@@ -193,9 +193,9 @@
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Assignee}}
{{if eq .Poster.ID .Assignee.ID}}
{{ctx.Locale.Tr "repo.issues.remove_self_assignment" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.remove_self_assignment" $createdStr}}
{{else}}
{{ctx.Locale.Tr "repo.issues.remove_assignee_at" (.Poster.GetDisplayName|Escape) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.remove_assignee_at" (.Poster.GetDisplayName|Escape) $createdStr}}
{{end}}
</span>
{{else}}
@@ -203,9 +203,9 @@
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Assignee}}
{{if eq .Poster.ID .AssigneeID}}
{{ctx.Locale.Tr "repo.issues.self_assign_at" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.self_assign_at" $createdStr}}
{{else}}
{{ctx.Locale.Tr "repo.issues.add_assignee_at" (.Poster.GetDisplayName|Escape) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.add_assignee_at" (.Poster.GetDisplayName|Escape) $createdStr}}
{{end}}
</span>
{{end}}
@@ -216,7 +216,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{ctx.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}}
</span>
</div>
{{else if eq .Type 11}}
@@ -225,7 +225,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{ctx.Locale.Tr "repo.issues.delete_branch_at" (.OldRef|Escape) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.delete_branch_at" (.OldRef|Escape) $createdStr}}
</span>
</div>
{{else if eq .Type 12}}
@@ -234,7 +234,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{ctx.Locale.Tr "repo.issues.start_tracking_history" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.start_tracking_history" $createdStr}}
</span>
</div>
{{else if eq .Type 13}}
@@ -243,7 +243,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{ctx.Locale.Tr "repo.issues.stop_tracking_history" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.stop_tracking_history" $createdStr}}
</span>
{{template "repo/issue/view_content/comments_delete_time" dict "ctxData" $ "comment" .}}
<div class="detail">
@@ -262,7 +262,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{ctx.Locale.Tr "repo.issues.add_time_history" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.add_time_history" $createdStr}}
</span>
{{template "repo/issue/view_content/comments_delete_time" dict "ctxData" $ "comment" .}}
<div class="detail">
@@ -281,7 +281,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{ctx.Locale.Tr "repo.issues.cancel_tracking_history" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.cancel_tracking_history" $createdStr}}
</span>
</div>
{{else if eq .Type 16}}
@@ -290,7 +290,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{ctx.Locale.Tr "repo.issues.due_date_added" (DateTime "long" .Content) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.due_date_added" (DateTime "long" .Content) $createdStr}}
</span>
</div>
{{else if eq .Type 17}}
@@ -303,7 +303,7 @@
{{if eq (len $parsedDeadline) 2}}
{{$from := DateTime "long" (index $parsedDeadline 1)}}
{{$to := DateTime "long" (index $parsedDeadline 0)}}
{{ctx.Locale.Tr "repo.issues.due_date_modified" $to $from $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.due_date_modified" $to $from $createdStr}}
{{end}}
</span>
</div>
@@ -313,7 +313,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{ctx.Locale.Tr "repo.issues.due_date_remove" (DateTime "long" .Content) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.due_date_remove" (DateTime "long" .Content) $createdStr}}
</span>
</div>
{{else if eq .Type 19}}
@@ -322,7 +322,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{ctx.Locale.Tr "repo.issues.dependency.added_dependency" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.dependency.added_dependency" $createdStr}}
</span>
{{if .DependentIssue}}
<div class="detail">
@@ -345,7 +345,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{ctx.Locale.Tr "repo.issues.dependency.removed_dependency" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.dependency.removed_dependency" $createdStr}}
</span>
{{if .DependentIssue}}
<div class="detail">
@@ -389,13 +389,13 @@
{{end}}
{{if eq .Review.Type 1}}
{{ctx.Locale.Tr "repo.issues.review.approve" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.review.approve" $createdStr}}
{{else if eq .Review.Type 2}}
{{ctx.Locale.Tr "repo.issues.review.comment" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.review.comment" $createdStr}}
{{else if eq .Review.Type 3}}
{{ctx.Locale.Tr "repo.issues.review.reject" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.review.reject" $createdStr}}
{{else}}
{{ctx.Locale.Tr "repo.issues.review.comment" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.review.comment" $createdStr}}
{{end}}
{{if .Review.Dismissed}}
<div class="ui small label">{{ctx.Locale.Tr "repo.issues.review.dismissed_label"}}</div>
@@ -419,12 +419,12 @@
{{.OriginalAuthor}}
</span>
<span class="text grey muted-links"> {{if $.Repository.OriginalURL}}</span>
<span class="text migrate">({{ctx.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)}}){{end}}</span>
{{else}}
{{template "shared/user/authorlink" .Poster}}
{{end}}
{{ctx.Locale.Tr "repo.issues.review.left_comment" | Safe}}
{{ctx.Locale.Tr "repo.issues.review.left_comment"}}
</span>
</div>
<div class="comment-header-right actions gt-df gt-ac">
@@ -474,12 +474,12 @@
{{if .Content}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{ctx.Locale.Tr "repo.issues.lock_with_reason" .Content $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.lock_with_reason" .Content $createdStr}}
</span>
{{else}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{ctx.Locale.Tr "repo.issues.lock_no_reason" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.lock_no_reason" $createdStr}}
</span>
{{end}}
</div>
@@ -489,7 +489,7 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{ctx.Locale.Tr "repo.issues.unlock_comment" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.unlock_comment" $createdStr}}
</span>
</div>
{{else if eq .Type 25}}
@@ -498,7 +498,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>
{{ctx.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}}
</span>
</div>
{{else if eq .Type 26}}
@@ -508,7 +508,7 @@
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{ctx.Locale.Tr "repo.issues.del_time_history" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.del_time_history" $createdStr}}
</span>
<div class="detail">
{{svg "octicon-clock"}}
@@ -529,12 +529,12 @@
{{if (gt .AssigneeID 0)}}
{{if .RemovedAssignee}}
{{if eq .PosterID .AssigneeID}}
{{ctx.Locale.Tr "repo.issues.review.remove_review_request_self" $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.review.remove_review_request_self" $createdStr}}
{{else}}
{{ctx.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}}
{{end}}
{{else}}
{{ctx.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}}
{{end}}
{{else}}
<!-- If the assigned team is deleted, just displaying "Ghost Team" in the comment -->
@@ -543,9 +543,9 @@
{{$teamName = .AssigneeTeam.Name}}
{{end}}
{{if .RemovedAssignee}}
{{ctx.Locale.Tr "repo.issues.review.remove_review_request" ($teamName|Escape) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.review.remove_review_request" ($teamName|Escape) $createdStr}}
{{else}}
{{ctx.Locale.Tr "repo.issues.review.add_review_request" ($teamName|Escape) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.review.add_review_request" ($teamName|Escape) $createdStr}}
{{end}}
{{end}}
</span>
@@ -560,9 +560,9 @@
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{if .IsForcePush}}
{{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}}
{{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}}
{{else}}
{{ctx.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}}
{{end}}
</span>
{{if and .IsForcePush $.Issue.PullRequest.BaseRepo.Name}}
@@ -616,7 +616,7 @@
{{else}}
{{$reviewerName = .Review.OriginalAuthor}}
{{end}}
{{ctx.Locale.Tr "repo.issues.review.dismissed" $reviewerName $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.review.dismissed" $reviewerName $createdStr}}
</span>
</div>
{{if .Content}}
@@ -652,11 +652,11 @@
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{if and .OldRef .NewRef}}
{{ctx.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}}
{{else if .OldRef}}
{{ctx.Locale.Tr "repo.issues.remove_ref_at" (.OldRef|Escape) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.remove_ref_at" (.OldRef|Escape) $createdStr}}
{{else}}
{{ctx.Locale.Tr "repo.issues.add_ref_at" (.NewRef|Escape) $createdStr | Safe}}
{{ctx.Locale.Tr "repo.issues.add_ref_at" (.NewRef|Escape) $createdStr}}
{{end}}
</span>
</div>
@@ -675,8 +675,8 @@
{{else}}
{{template "shared/user/authorlink" .Poster}}
{{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}}
{{if eq .Type 34}}{{ctx.Locale.Tr "repo.pulls.auto_merge_newly_scheduled_comment" $createdStr}}
{{else}}{{ctx.Locale.Tr "repo.pulls.auto_merge_canceled_schedule_comment" $createdStr}}{{end}}
</span>
</div>
{{else if or (eq .Type 36) (eq .Type 37)}}
@@ -685,8 +685,8 @@
{{template "shared/user/avatarlink" dict "user" .Poster}}
<span class="text grey muted-links">
{{template "shared/user/authorlink" .Poster}}
{{if eq .Type 36}}{{ctx.Locale.Tr "repo.issues.pin_comment" $createdStr | Safe}}
{{else}}{{ctx.Locale.Tr "repo.issues.unpin_comment" $createdStr | Safe}}{{end}}
{{if eq .Type 36}}{{ctx.Locale.Tr "repo.issues.pin_comment" $createdStr}}
{{else}}{{ctx.Locale.Tr "repo.issues.unpin_comment" $createdStr}}{{end}}
</span>
</div>
{{end}}

View File

@@ -73,7 +73,7 @@
{{else}}
{{template "shared/user/authorlink" .Poster}}
{{end}}
{{ctx.Locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdSubStr | Safe}}
{{ctx.Locale.Tr "repo.issues.commented_at" (.HashTag|Escape) $createdSubStr}}
</span>
</div>
<div class="comment-header-right actions gt-df gt-ac">

View File

@@ -88,7 +88,7 @@
</div>
{{if or .HasIssuesOrPullsWritePermission .IsIssuePoster}}
<button class="ui compact button">
{{ctx.Locale.Tr "repo.pulls.remove_prefix" (.WorkInProgressPrefix|Escape) | Safe}}
{{ctx.Locale.Tr "repo.pulls.remove_prefix" (.WorkInProgressPrefix|Escape)}}
</button>
{{end}}
</div>
@@ -127,7 +127,7 @@
{{else if .IsBlockedByChangedProtectedFiles}}
<div class="item">
{{svg "octicon-x"}}
{{ctx.Locale.TrN $.ChangedProtectedFilesNum "repo.pulls.blocked_by_changed_protected_files_1" "repo.pulls.blocked_by_changed_protected_files_n" | Safe}}
{{ctx.Locale.TrN $.ChangedProtectedFilesNum "repo.pulls.blocked_by_changed_protected_files_1" "repo.pulls.blocked_by_changed_protected_files_n"}}
</div>
<ul>
{{range .ChangedProtectedFiles}}
@@ -334,7 +334,7 @@
{{else if .IsBlockedByChangedProtectedFiles}}
<div class="item text red">
{{svg "octicon-x"}}
{{ctx.Locale.TrN $.ChangedProtectedFilesNum "repo.pulls.blocked_by_changed_protected_files_1" "repo.pulls.blocked_by_changed_protected_files_n" | Safe}}
{{ctx.Locale.TrN $.ChangedProtectedFilesNum "repo.pulls.blocked_by_changed_protected_files_1" "repo.pulls.blocked_by_changed_protected_files_n"}}
</div>
<ul>
{{range .ChangedProtectedFiles}}

View File

@@ -1,5 +1,5 @@
<div class="divider"></div>
<div class="instruct-toggle"> {{ctx.Locale.Tr "repo.pulls.cmd_instruction_hint" | Safe}} </div>
<div class="instruct-toggle"> {{ctx.Locale.Tr "repo.pulls.cmd_instruction_hint"}} </div>
<div class="instruct-content gt-mt-3 gt-hidden">
<div><h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_checkout_title"}}</h3>{{ctx.Locale.Tr "repo.pulls.cmd_instruction_checkout_desc"}}</div>
{{$localBranch := .PullRequest.HeadBranch}}

View File

@@ -101,7 +101,7 @@
{{range .OriginalReviews}}
<div class="item gt-df gt-ac gt-py-3">
<div class="gt-df gt-ac gt-f1">
<a class="muted" href="{{$.Repository.OriginalURL}}" data-tooltip-content="{{ctx.Locale.Tr "repo.migrated_from_fake" ($.Repository.GetOriginalURLHostname|Escape) | Safe}}">
<a class="muted" href="{{$.Repository.OriginalURL}}" data-tooltip-content="{{ctx.Locale.Tr "repo.migrated_from_fake" ($.Repository.GetOriginalURLHostname|Escape)}}">
{{svg (MigrationIcon $.Repository.GetOriginalURLHostname) 20 "gt-mr-3"}}
{{.OriginalAuthor}}
</a>
@@ -116,7 +116,7 @@
{{if and (or .HasIssuesOrPullsWritePermission .IsIssuePoster) (not .HasMerged) (not .Issue.IsClosed) (not .IsPullWorkInProgress)}}
<div class="toggle-wip" data-title="{{.Issue.Title}}" data-wip-prefix="{{(index .PullRequestWorkInProgressPrefixes 0| Escape)}}" data-update-url="{{.Issue.Link}}/title">
<a class="muted">
{{ctx.Locale.Tr "repo.pulls.still_in_progress"}} {{ctx.Locale.Tr "repo.pulls.add_prefix" (index .PullRequestWorkInProgressPrefixes 0| Escape) | Safe}}
{{ctx.Locale.Tr "repo.pulls.still_in_progress"}} {{ctx.Locale.Tr "repo.pulls.add_prefix" (index .PullRequestWorkInProgressPrefixes 0| Escape)}}
</a>
</div>
{{end}}
@@ -300,7 +300,7 @@
{{else}}
{{if .HasUserStopwatch}}
<div class="ui warning message">
{{ctx.Locale.Tr "repo.issues.tracking_already_started" (.OtherStopwatchURL|Escape) | Safe}}
{{ctx.Locale.Tr "repo.issues.tracking_already_started" (.OtherStopwatchURL|Escape)}}
</div>
{{end}}
<button class="ui fluid button issue-start-time" data-tooltip-content='{{ctx.Locale.Tr "repo.issues.start_tracking"}}'>
@@ -332,7 +332,7 @@
{{if .WorkingUsers}}
<div class="divider"></div>
<div class="ui comments">
<span class="text"><strong>{{ctx.Locale.Tr "repo.issues.time_spent_from_all_authors" ($.Issue.TotalTrackedTime | Sec2Time) | Safe}}</strong></span>
<span class="text"><strong>{{ctx.Locale.Tr "repo.issues.time_spent_from_all_authors" ($.Issue.TotalTrackedTime | Sec2Time)}}</strong></span>
<div>
{{range $user, $trackedtime := .WorkingUsers}}
<div class="comment gt-mt-3">

View File

@@ -104,11 +104,11 @@
{{$createdStr:= TimeSinceUnix .Issue.CreatedUnix ctx.Locale}}
<span class="time-desc">
{{if .Issue.OriginalAuthor}}
{{ctx.Locale.Tr "repo.issues.opened_by_fake" $createdStr (.Issue.OriginalAuthor|Escape) | Safe}}
{{ctx.Locale.Tr "repo.issues.opened_by_fake" $createdStr (.Issue.OriginalAuthor|Escape)}}
{{else if gt .Issue.Poster.ID 0}}
{{ctx.Locale.Tr "repo.issues.opened_by" $createdStr (.Issue.Poster.HomeLink|Escape) (.Issue.Poster.GetDisplayName|Escape) | Safe}}
{{ctx.Locale.Tr "repo.issues.opened_by" $createdStr (.Issue.Poster.HomeLink|Escape) (.Issue.Poster.GetDisplayName|Escape)}}
{{else}}
{{ctx.Locale.Tr "repo.issues.opened_by_fake" $createdStr (.Issue.Poster.GetDisplayName|Escape) | Safe}}
{{ctx.Locale.Tr "repo.issues.opened_by_fake" $createdStr (.Issue.Poster.GetDisplayName|Escape)}}
{{end}}
·
{{ctx.Locale.TrN .Issue.NumComments "repo.issues.num_comments_1" "repo.issues.num_comments" .Issue.NumComments}}