diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index cfad41ceb5..848cb05a86 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -1031,8 +1031,8 @@ issues.dependency.add = Add dependency… issues.dependency.cancel = Cancel issues.dependency.remove = Remove issues.dependency.remove_info = Remove this dependency -issues.dependency.added_dependency = `%[2]s added a new dependency %[3]s` -issues.dependency.removed_dependency = `%[2]s removed a dependency %[3]s` +issues.dependency.added_dependency = `added a new dependency %s` +issues.dependency.removed_dependency = `removed a dependency %s` issues.dependency.issue_closing_blockedby = Closing this pull request is blocked by the following issues issues.dependency.pr_closing_blockedby = Closing this issue is blocked by the following issues issues.dependency.issue_close_blocks = This issue blocks closing of the following issues diff --git a/templates/repo/issue/view_content.tmpl b/templates/repo/issue/view_content.tmpl index bf06a12d6f..5f0559c068 100644 --- a/templates/repo/issue/view_content.tmpl +++ b/templates/repo/issue/view_content.tmpl @@ -22,9 +22,21 @@
{{if .Issue.OriginalAuthor }} - {{ .Issue.OriginalAuthor }} {{.i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe}} {{if .Repository.OriginalURL}} ({{$.i18n.Tr "repo.migrated_from" .Repository.OriginalURL .Repository.GetOriginalURLHostname | Safe }}){{end}} + + + {{ .Issue.OriginalAuthor }} + + + {{ .i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe }} + + + {{if .Repository.OriginalURL}} ({{$.i18n.Tr "repo.migrated_from" .Repository.OriginalURL .Repository.GetOriginalURLHostname | Safe }}){{end}} + {{else}} - {{.Issue.Poster.GetDisplayName}} {{.i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe}} + + {{.Issue.Poster.GetDisplayName}} + {{.i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe}} + {{end}} {{if not $.Repository.IsArchived}}
diff --git a/templates/repo/issue/view_content/comments.tmpl b/templates/repo/issue/view_content/comments.tmpl index 27baaed3f2..3987dc668f 100644 --- a/templates/repo/issue/view_content/comments.tmpl +++ b/templates/repo/issue/view_content/comments.tmpl @@ -22,7 +22,7 @@ {{if .OriginalAuthor }} {{ .OriginalAuthor }} {{$.i18n.Tr "repo.issues.commented_at" .Issue.HashTag $createdStr | Safe}} {{if $.Repository.OriginalURL}}({{$.i18n.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname | Safe }}){{end}} {{else}} - {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdStr | Safe}} + {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdStr | Safe}} {{end}} {{if not $.Repository.IsArchived}}
@@ -74,7 +74,10 @@ - {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.reopened_at" .EventTag $createdStr | Safe}} + + {{.Poster.GetDisplayName}} + {{$.i18n.Tr "repo.issues.reopened_at" .EventTag $createdStr | Safe}} +
{{else if eq .Type 2}}
@@ -82,7 +85,10 @@ - {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.closed_at" .EventTag $createdStr | Safe}} + + {{.Poster.GetDisplayName}} + {{$.i18n.Tr "repo.issues.closed_at" .EventTag $createdStr | Safe}} +
{{else if eq .Type 28}}
@@ -91,7 +97,7 @@ - {{.Poster.GetDisplayName}} + {{.Poster.GetDisplayName}} {{$link := printf "%s/commit/%s" $.Repository.HTMLURL $.Issue.PullRequest.MergedCommitID}} {{$.i18n.Tr "repo.issues.pull_merged_at" $link (ShortSha $.Issue.PullRequest.MergedCommitID) $.BaseTarget $createdStr | Str2html}} @@ -116,7 +122,8 @@ {{if eq .RefAction 3}}{{end}} - {{.Poster.GetDisplayName}} + + {{.Poster.GetDisplayName}} {{$.i18n.Tr $refTr .EventTag $createdStr .RefCommentHTMLURL $refFrom | Safe}} {{if eq .RefAction 3}}{{end}} @@ -131,8 +138,10 @@ - {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}} - + + {{.Poster.GetDisplayName}} + {{$.i18n.Tr "repo.issues.commit_ref_at" .EventTag $createdStr | Safe}} +
{{svg "octicon-git-commit" 16}} {{.Content | Str2html}} @@ -145,8 +154,10 @@ - {{.Poster.GetDisplayName}} - {{if .Content}}{{$.i18n.Tr "repo.issues.add_label_at" .Label.ForegroundColor .Label.Color (.Label.Name|Escape) $createdStr | Safe}}{{else}}{{$.i18n.Tr "repo.issues.remove_label_at" .Label.ForegroundColor .Label.Color (.Label.Name|Escape) $createdStr | Safe}}{{end}} + + {{.Poster.GetDisplayName}} + {{if .Content}}{{$.i18n.Tr "repo.issues.add_label_at" .Label.ForegroundColor .Label.Color (.Label.Name|Escape) $createdStr | Safe}}{{else}}{{$.i18n.Tr "repo.issues.remove_label_at" .Label.ForegroundColor .Label.Color (.Label.Name|Escape) $createdStr | Safe}}{{end}} +
{{end}} {{else if eq .Type 8}} @@ -155,8 +166,10 @@ - {{.Poster.GetDisplayName}} - {{if gt .OldMilestoneID 0}}{{if gt .MilestoneID 0}}{{$.i18n.Tr "repo.issues.change_milestone_at" (.OldMilestone.Name|Escape) (.Milestone.Name|Escape) $createdStr | Safe}}{{else}}{{$.i18n.Tr "repo.issues.remove_milestone_at" (.OldMilestone.Name|Escape) $createdStr | Safe}}{{end}}{{else if gt .MilestoneID 0}}{{$.i18n.Tr "repo.issues.add_milestone_at" (.Milestone.Name|Escape) $createdStr | Safe}}{{end}} + + {{.Poster.GetDisplayName}} + {{if gt .OldMilestoneID 0}}{{if gt .MilestoneID 0}}{{$.i18n.Tr "repo.issues.change_milestone_at" (.OldMilestone.Name|Escape) (.Milestone.Name|Escape) $createdStr | Safe}}{{else}}{{$.i18n.Tr "repo.issues.remove_milestone_at" (.OldMilestone.Name|Escape) $createdStr | Safe}}{{end}}{{else if gt .MilestoneID 0}}{{$.i18n.Tr "repo.issues.add_milestone_at" (.Milestone.Name|Escape) $createdStr | Safe}}{{end}} +
{{else if eq .Type 9}}
@@ -167,7 +180,7 @@ - {{.Assignee.GetDisplayName}} + {{.Assignee.GetDisplayName}} {{ if eq .Poster.ID .Assignee.ID }} {{$.i18n.Tr "repo.issues.remove_self_assignment" $createdStr | Safe}} {{ else }} @@ -179,7 +192,7 @@ - {{.Assignee.GetDisplayName}} + {{.Assignee.GetDisplayName}} {{if eq .Poster.ID .AssigneeID}} {{$.i18n.Tr "repo.issues.self_assign_at" $createdStr | Safe}} {{else}} @@ -195,8 +208,9 @@ - {{.Poster.GetDisplayName}} - {{$.i18n.Tr "repo.issues.change_title_at" (.OldTitle|Escape) (.NewTitle|Escape) $createdStr | Safe}} + + {{.Poster.GetDisplayName}} + {{$.i18n.Tr "repo.issues.change_title_at" (.OldTitle|Escape) (.NewTitle|Escape) $createdStr | Safe}}
{{else if eq .Type 11}} @@ -205,8 +219,9 @@ - {{.Poster.GetDisplayName}} - {{$.i18n.Tr "repo.issues.delete_branch_at" (.CommitSHA|Escape) $createdStr | Safe}} + + {{.Poster.GetDisplayName}} + {{$.i18n.Tr "repo.issues.delete_branch_at" (.CommitSHA|Escape) $createdStr | Safe}}
{{else if eq .Type 12}} @@ -215,7 +230,10 @@ - {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.start_tracking_history" $createdStr | Safe}} + + {{.Poster.GetDisplayName}} + {{$.i18n.Tr "repo.issues.start_tracking_history" $createdStr | Safe}} +
{{else if eq .Type 13}}
@@ -223,8 +241,10 @@ - {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.stop_tracking_history" $createdStr | Safe}} - + + {{.Poster.GetDisplayName}} + {{$.i18n.Tr "repo.issues.stop_tracking_history" $createdStr | Safe}} +
{{svg "octicon-clock" 16}} {{.Content}} @@ -236,7 +256,10 @@ - {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.add_time_history" $createdStr | Safe}} + + {{.Poster.GetDisplayName}} + {{$.i18n.Tr "repo.issues.add_time_history" $createdStr | Safe}} +
{{svg "octicon-clock" 16}} {{.Content}} @@ -248,7 +271,10 @@ - {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.cancel_tracking_history" $createdStr | Safe}} + + {{.Poster.GetDisplayName}} + {{$.i18n.Tr "repo.issues.cancel_tracking_history" $createdStr | Safe}} +
{{else if eq .Type 16}}
@@ -256,8 +282,9 @@ - {{.Poster.GetDisplayName}} - {{$.i18n.Tr "repo.issues.due_date_added" .Content $createdStr | Safe}} + + {{.Poster.GetDisplayName}} + {{$.i18n.Tr "repo.issues.due_date_added" .Content $createdStr | Safe}}
{{else if eq .Type 17}} @@ -266,8 +293,9 @@ - {{.Poster.GetDisplayName}} - {{$.i18n.Tr "repo.issues.due_date_modified" (.Content | ParseDeadline) $createdStr | Safe}} + + {{.Poster.GetDisplayName}} + {{$.i18n.Tr "repo.issues.due_date_modified" (.Content | ParseDeadline) $createdStr | Safe}}
{{else if eq .Type 18}} @@ -276,8 +304,9 @@ - {{.Poster.GetDisplayName}} - {{$.i18n.Tr "repo.issues.due_date_remove" .Content $createdStr | Safe}} + + {{.Poster.GetDisplayName}} + {{$.i18n.Tr "repo.issues.due_date_remove" .Content $createdStr | Safe}}
{{else if eq .Type 19}} @@ -287,7 +316,8 @@ - {{$.i18n.Tr "repo.issues.dependency.added_dependency" .Poster.HomeLink (.Poster.GetDisplayName|Escape) $createdStr | Safe}} + {{.Poster.GetDisplayName}} + {{$.i18n.Tr "repo.issues.dependency.added_dependency" $createdStr | Safe}} {{if .DependentIssue}}
@@ -311,7 +341,8 @@ - {{$.i18n.Tr "repo.issues.dependency.removed_dependency" .Poster.HomeLink (.Poster.GetDisplayName|Escape) $createdStr | Safe}} + {{.Poster.GetDisplayName}} + {{$.i18n.Tr "repo.issues.dependency.removed_dependency" $createdStr | Safe}} {{if .DependentIssue}}
@@ -345,7 +376,7 @@ {{if .OriginalAuthor }} {{ .OriginalAuthor }} {{if $.Repository.OriginalURL}}({{$.i18n.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname | Safe }}){{end}} {{else}} - {{.Poster.GetDisplayName}} + {{.Poster.GetDisplayName}} {{end}} {{if eq .Review.Type 1}} @@ -367,7 +398,7 @@ {{if .OriginalAuthor }} {{ .OriginalAuthor }} {{if $.Repository.OriginalURL}}({{$.i18n.Tr "repo.migrated_from" $.Repository.OriginalURL $.Repository.GetOriginalURLHostname | Safe }}){{end}} {{else}} - {{.Poster.GetDisplayName}} + {{.Poster.GetDisplayName}} {{end}} {{$.i18n.Tr "repo.issues.review.left_comment" | Safe}} @@ -437,20 +468,20 @@
- {{.Poster.GetDisplayName}} - -
-
- {{if .RenderedContent}} - {{.RenderedContent|Str2html}} - {{else}} - {{$.i18n.Tr "repo.issues.no_content"}} - {{end}} + + {{.Poster.GetDisplayName}} + {{$.i18n.Tr "repo.issues.commented_at" .HashTag $createdSubStr | Safe}} +
+
+ {{if .RenderedContent}} + {{.RenderedContent|Str2html}} + {{else}} + {{$.i18n.Tr "repo.issues.no_content"}} + {{end}} +
+
{{.Content}}
-
{{.Content}}
-
+
@@ -484,14 +515,15 @@ - {{ if .Content }} - {{.Poster.GetDisplayName}} - {{$.i18n.Tr "repo.issues.lock_with_reason" .Content $createdStr | Safe}} + + {{.Poster.GetDisplayName}} + {{$.i18n.Tr "repo.issues.lock_with_reason" .Content $createdStr | Safe}} {{ else }} - {{.Poster.GetDisplayName}} - {{$.i18n.Tr "repo.issues.lock_no_reason" $createdStr | Safe}} + + {{.Poster.GetDisplayName}} + {{$.i18n.Tr "repo.issues.lock_no_reason" $createdStr | Safe}} {{ end }}
@@ -501,10 +533,10 @@ - - {{.Poster.GetDisplayName}} - {{$.i18n.Tr "repo.issues.unlock_comment" $createdStr | Safe}} - + + {{.Poster.GetDisplayName}} + {{$.i18n.Tr "repo.issues.unlock_comment" $createdStr | Safe}} +
{{else if eq .Type 25}}
@@ -512,8 +544,9 @@ - {{.Poster.Name}} - {{$.i18n.Tr "repo.pulls.change_target_branch_at" (.OldRef|Escape) (.NewRef|Escape) $createdStr | Safe}} + + {{.Poster.Name}} + {{$.i18n.Tr "repo.pulls.change_target_branch_at" (.OldRef|Escape) (.NewRef|Escape) $createdStr | Safe}}
{{else if eq .Type 26}} @@ -522,7 +555,10 @@ - {{.Poster.GetDisplayName}} {{$.i18n.Tr "repo.issues.del_time_history" $createdStr | Safe}} + + {{.Poster.GetDisplayName}} + {{$.i18n.Tr "repo.issues.del_time_history" $createdStr | Safe}} +
{{svg "octicon-clock" 16}} {{.Content}} @@ -535,7 +571,7 @@ - {{.Poster.GetDisplayName}} + {{.Poster.GetDisplayName}} {{if .RemovedAssignee}} {{if eq .PosterID .AssigneeID}} {{$.i18n.Tr "repo.issues.review.remove_review_request_self" $createdStr | Safe}} @@ -547,6 +583,5 @@ {{end}}
- {{end}} {{end}} diff --git a/web_src/less/_repository.less b/web_src/less/_repository.less index 884d4193d8..979d2ab45b 100644 --- a/web_src/less/_repository.less +++ b/web_src/less/_repository.less @@ -810,6 +810,10 @@ &.event > .text { line-height: 30px; } + + .author { + font-weight: 700; + } } .comment {