mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00:00
Make sure fmt catches all templates (#20979)
* Make sure fmt catches all templates Make's `wildcard` is not recursive so it missed many template files, fix that by using `find`. * Update Makefile
This commit is contained in:
@ -23,38 +23,38 @@
|
||||
{{$.locale.Tr "action.create_branch" (.GetRepoLink|Escape) (.GetRefLink|Escape) (Escape .GetBranch) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{end}}
|
||||
{{else if eq .GetOpType 6}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.create_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 7}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.create_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 8}}
|
||||
{{$.locale.Tr "action.transfer_repo" .GetContent (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 9}}
|
||||
{{$.locale.Tr "action.push_tag" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetTag|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 10}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.comment_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 11}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.merge_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 12}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.close_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 13}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.reopen_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 14}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.close_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 15}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.reopen_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 16}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.delete_tag" (.GetRepoLink|Escape) (.GetTag|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 17}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.delete_branch" (.GetRepoLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 18}}
|
||||
{{$.locale.Tr "action.mirror_sync_push" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
@ -63,30 +63,30 @@
|
||||
{{else if eq .GetOpType 20}}
|
||||
{{$.locale.Tr "action.mirror_sync_delete" (.GetRepoLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 21}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.approve_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 22}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.reject_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 23}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$.locale.Tr "action.comment_pull" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 24}}
|
||||
{{ $linkText := .Content | RenderEmoji }}
|
||||
{{$linkText := .Content | RenderEmoji}}
|
||||
{{$.locale.Tr "action.publish_release" (.GetRepoLink|Escape) ((printf "%s/releases/tag/%s" .GetRepoLink .GetTag)|Escape) (.ShortRepoPath|Escape) $linkText | Str2html}}
|
||||
{{else if eq .GetOpType 25}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{ $reviewer := index .GetIssueInfos 1}}
|
||||
{{$index := index .GetIssueInfos 0}}
|
||||
{{$reviewer := index .GetIssueInfos 1}}
|
||||
{{$.locale.Tr "action.review_dismissed" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) $reviewer | Str2html}}
|
||||
{{end}}
|
||||
</p>
|
||||
{{if or (eq .GetOpType 5) (eq .GetOpType 18)}}
|
||||
<div class="content">
|
||||
<ul>
|
||||
{{ $push := ActionContent2Commits .}}
|
||||
{{ $repoLink := .GetRepoLink}}
|
||||
{{$push := ActionContent2Commits .}}
|
||||
{{$repoLink := .GetRepoLink}}
|
||||
{{range $push.Commits}}
|
||||
{{ $commitLink := printf "%s/commit/%s" $repoLink .Sha1}}
|
||||
{{$commitLink := printf "%s/commit/%s" $repoLink .Sha1}}
|
||||
<li>
|
||||
{{avatarHTML ($push.AvatarLink .AuthorEmail) 16 "mr-2" .AuthorName}}
|
||||
<a class="commit-id mr-2" href="{{$commitLink}}">{{ShortSha .Sha1}}</a>
|
||||
|
@ -91,7 +91,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="meta">
|
||||
{{ $closedDate:= TimeSinceUnix .ClosedDateUnix $.locale }}
|
||||
{{$closedDate:= TimeSinceUnix .ClosedDateUnix $.locale}}
|
||||
{{if .IsClosed}}
|
||||
{{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.closed" $closedDate|Str2html}}
|
||||
{{else}}
|
||||
|
Reference in New Issue
Block a user