mirror of
https://github.com/go-gitea/gitea
synced 2025-07-03 09:07:19 +00:00
Refactor i18n
to locale
(#20153)
* Refactor `i18n` to `locale` - Currently we're using the `i18n` variable naming for the `locale` struct. This contains locale's specific information and cannot be used for general i18n purpose, therefore refactoring it to `locale` makes more sense. - Ref: https://github.com/go-gitea/gitea/pull/20096#discussion_r906699200 * Update routers/install/install.go
This commit is contained in:
@ -13,71 +13,71 @@
|
||||
{{.ShortActUserName}}
|
||||
{{end}}
|
||||
{{if eq .GetOpType 1}}
|
||||
{{$.i18n.Tr "action.create_repo" (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{$.locale.Tr "action.create_repo" (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 2}}
|
||||
{{$.i18n.Tr "action.rename_repo" (.GetContent|Escape) (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{$.locale.Tr "action.rename_repo" (.GetContent|Escape) (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 5}}
|
||||
{{if .Content}}
|
||||
{{$.i18n.Tr "action.commit_repo" (.GetRepoLink|Escape) (.GetRefLink|Escape) (Escape .GetBranch) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{$.locale.Tr "action.commit_repo" (.GetRepoLink|Escape) (.GetRefLink|Escape) (Escape .GetBranch) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else}}
|
||||
{{$.i18n.Tr "action.create_branch" (.GetRepoLink|Escape) (.GetRefLink|Escape) (Escape .GetBranch) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{$.locale.Tr "action.create_branch" (.GetRepoLink|Escape) (.GetRefLink|Escape) (Escape .GetBranch) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{end}}
|
||||
{{else if eq .GetOpType 6}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$.i18n.Tr "action.create_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{$.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}}
|
||||
{{$.i18n.Tr "action.create_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{$.locale.Tr "action.create_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 8}}
|
||||
{{$.i18n.Tr "action.transfer_repo" .GetContent (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{$.locale.Tr "action.transfer_repo" .GetContent (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 9}}
|
||||
{{$.i18n.Tr "action.push_tag" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetTag|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{$.locale.Tr "action.push_tag" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetTag|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 10}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$.i18n.Tr "action.comment_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{$.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}}
|
||||
{{$.i18n.Tr "action.merge_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{$.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}}
|
||||
{{$.i18n.Tr "action.close_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{$.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}}
|
||||
{{$.i18n.Tr "action.reopen_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{$.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}}
|
||||
{{$.i18n.Tr "action.close_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{$.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}}
|
||||
{{$.i18n.Tr "action.reopen_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{$.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}}
|
||||
{{$.i18n.Tr "action.delete_tag" (.GetRepoLink|Escape) (.GetTag|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{$.locale.Tr "action.delete_tag" (.GetRepoLink|Escape) (.GetTag|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 17}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$.i18n.Tr "action.delete_branch" (.GetRepoLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{$.locale.Tr "action.delete_branch" (.GetRepoLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 18}}
|
||||
{{$.i18n.Tr "action.mirror_sync_push" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{$.locale.Tr "action.mirror_sync_push" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 19}}
|
||||
{{$.i18n.Tr "action.mirror_sync_create" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{$.locale.Tr "action.mirror_sync_create" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 20}}
|
||||
{{$.i18n.Tr "action.mirror_sync_delete" (.GetRepoLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{$.locale.Tr "action.mirror_sync_delete" (.GetRepoLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 21}}
|
||||
{{ $index := index .GetIssueInfos 0}}
|
||||
{{$.i18n.Tr "action.approve_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{$.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}}
|
||||
{{$.i18n.Tr "action.reject_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{$.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}}
|
||||
{{$.i18n.Tr "action.comment_pull" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{$.locale.Tr "action.comment_pull" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
|
||||
{{else if eq .GetOpType 24}}
|
||||
{{ $linkText := .Content | RenderEmoji }}
|
||||
{{$.i18n.Tr "action.publish_release" (.GetRepoLink|Escape) ((printf "%s/releases/tag/%s" .GetRepoLink .GetTag)|Escape) (.ShortRepoPath|Escape) $linkText | Str2html}}
|
||||
{{$.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}}
|
||||
{{$.i18n.Tr "action.review_dismissed" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) $reviewer | Str2html}}
|
||||
{{$.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)}}
|
||||
@ -95,7 +95,7 @@
|
||||
</span>
|
||||
</li>
|
||||
{{end}}
|
||||
{{if and (gt $push.Len 1) $push.CompareURL}}<li><a href="{{AppSubUrl}}/{{$push.CompareURL}}">{{$.i18n.Tr "action.compare_commits" $push.Len}} »</a></li>{{end}}
|
||||
{{if and (gt $push.Len 1) $push.CompareURL}}<li><a href="{{AppSubUrl}}/{{$push.CompareURL}}">{{$.locale.Tr "action.compare_commits" $push.Len}} »</a></li>{{end}}
|
||||
</ul>
|
||||
</div>
|
||||
{{else if eq .GetOpType 6}}
|
||||
@ -111,10 +111,10 @@
|
||||
{{else if or (eq .GetOpType 12) (eq .GetOpType 13) (eq .GetOpType 14) (eq .GetOpType 15)}}
|
||||
<span class="text truncate issue title">{{.GetIssueTitle | RenderEmoji}}</span>
|
||||
{{else if eq .GetOpType 25}}
|
||||
<p class="text light grey">{{$.i18n.Tr "action.review_dismissed_reason"}}</p>
|
||||
<p class="text light grey">{{$.locale.Tr "action.review_dismissed_reason"}}</p>
|
||||
<p class="text light grey">{{index .GetIssueInfos 2 | RenderEmoji}}</p>
|
||||
{{end}}
|
||||
<p class="text italic light grey">{{TimeSince .GetCreate $.i18n}}</p>
|
||||
<p class="text italic light grey">{{TimeSince .GetCreate $.locale}}</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui two wide right aligned column">
|
||||
|
@ -6,24 +6,24 @@
|
||||
<div class="four wide column">
|
||||
<div class="ui secondary vertical filter menu">
|
||||
<a class="{{if eq .ViewType "your_repositories"}}ui basic primary button{{end}} item" href="{{.Link}}?type=your_repositories&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}">
|
||||
{{.i18n.Tr "home.issues.in_your_repos"}}
|
||||
{{.locale.Tr "home.issues.in_your_repos"}}
|
||||
<strong class="ui right">{{CountFmt .IssueStats.YourRepositoriesCount}}</strong>
|
||||
</a>
|
||||
<a class="{{if eq .ViewType "assigned"}}ui basic primary button{{end}} item" href="{{.Link}}?type=assigned&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}">
|
||||
{{.i18n.Tr "repo.issues.filter_type.assigned_to_you"}}
|
||||
{{.locale.Tr "repo.issues.filter_type.assigned_to_you"}}
|
||||
<strong class="ui right">{{CountFmt .IssueStats.AssignCount}}</strong>
|
||||
</a>
|
||||
<a class="{{if eq .ViewType "created_by"}}ui basic primary button{{end}} item" href="{{.Link}}?type=created_by&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}">
|
||||
{{.i18n.Tr "repo.issues.filter_type.created_by_you"}}
|
||||
{{.locale.Tr "repo.issues.filter_type.created_by_you"}}
|
||||
<strong class="ui right">{{CountFmt .IssueStats.CreateCount}}</strong>
|
||||
</a>
|
||||
<a class="{{if eq .ViewType "mentioned"}}ui basic primary button{{end}} item" href="{{.Link}}?type=mentioned&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}">
|
||||
{{.i18n.Tr "repo.issues.filter_type.mentioning_you"}}
|
||||
{{.locale.Tr "repo.issues.filter_type.mentioning_you"}}
|
||||
<strong class="ui right">{{CountFmt .IssueStats.MentionCount}}</strong>
|
||||
</a>
|
||||
{{if .PageIsPulls}}
|
||||
<a class="{{if eq .ViewType "review_requested"}}ui basic primary button{{end}} item" href="{{.Link}}?type=review_requested&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}">
|
||||
{{.i18n.Tr "repo.issues.filter_type.review_requested"}}
|
||||
{{.locale.Tr "repo.issues.filter_type.review_requested"}}
|
||||
<strong class="ui right">{{CountFmt .IssueStats.ReviewRequestedCount}}</strong>
|
||||
</a>
|
||||
{{end}}
|
||||
@ -61,11 +61,11 @@
|
||||
<div class="ui compact tiny menu">
|
||||
<a class="item{{if not .IsShowClosed}} active{{end}}" href="{{.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state=open&q={{$.Keyword}}">
|
||||
{{svg "octicon-issue-opened" 16 "mr-3"}}
|
||||
{{JsPrettyNumber .IssueStats.OpenCount}} {{.i18n.Tr "repo.issues.open_title"}}
|
||||
{{JsPrettyNumber .IssueStats.OpenCount}} {{.locale.Tr "repo.issues.open_title"}}
|
||||
</a>
|
||||
<a class="item{{if .IsShowClosed}} active{{end}}" href="{{.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state=closed&q={{$.Keyword}}">
|
||||
{{svg "octicon-issue-closed" 16 "mr-3"}}
|
||||
{{JsPrettyNumber .IssueStats.ClosedCount}} {{.i18n.Tr "repo.issues.closed_title"}}
|
||||
{{JsPrettyNumber .IssueStats.ClosedCount}} {{.locale.Tr "repo.issues.closed_title"}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@ -76,8 +76,8 @@
|
||||
<input type="hidden" name="repos" value="[{{range $.RepoIDs}}{{.}}%2C{{end}}]"/>
|
||||
<input type="hidden" name="sort" value="{{$.SortType}}"/>
|
||||
<input type="hidden" name="state" value="{{$.State}}"/>
|
||||
<input name="q" value="{{$.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}...">
|
||||
<button class="ui primary button" type="submit">{{.i18n.Tr "explore.search"}}</button>
|
||||
<input name="q" value="{{$.Keyword}}" placeholder="{{.locale.Tr "explore.search"}}...">
|
||||
<button class="ui primary button" type="submit">{{.locale.Tr "explore.search"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@ -85,18 +85,18 @@
|
||||
<!-- Sort -->
|
||||
<div class="ui dropdown type jump item">
|
||||
<span class="text">
|
||||
{{.i18n.Tr "repo.issues.filter_sort"}}
|
||||
{{.locale.Tr "repo.issues.filter_sort"}}
|
||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
</span>
|
||||
<div class="menu">
|
||||
<a class="{{if or (eq .SortType "latest") (not .SortType)}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=latest&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
|
||||
<a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=oldest&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
|
||||
<a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=recentupdate&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a>
|
||||
<a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=leastupdate&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a>
|
||||
<a class="{{if eq .SortType "mostcomment"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=mostcomment&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.issues.filter_sort.mostcomment"}}</a>
|
||||
<a class="{{if eq .SortType "leastcomment"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=leastcomment&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.issues.filter_sort.leastcomment"}}</a>
|
||||
<a class="{{if eq .SortType "nearduedate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=nearduedate&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.issues.filter_sort.nearduedate"}}</a>
|
||||
<a class="{{if eq .SortType "farduedate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=farduedate&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.issues.filter_sort.farduedate"}}</a>
|
||||
<a class="{{if or (eq .SortType "latest") (not .SortType)}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=latest&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.latest"}}</a>
|
||||
<a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=oldest&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a>
|
||||
<a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=recentupdate&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.recentupdate"}}</a>
|
||||
<a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=leastupdate&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.leastupdate"}}</a>
|
||||
<a class="{{if eq .SortType "mostcomment"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=mostcomment&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.mostcomment"}}</a>
|
||||
<a class="{{if eq .SortType "leastcomment"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=leastcomment&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.leastcomment"}}</a>
|
||||
<a class="{{if eq .SortType "nearduedate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=nearduedate&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.nearduedate"}}</a>
|
||||
<a class="{{if eq .SortType "farduedate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=farduedate&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.farduedate"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<div class="four wide column">
|
||||
<div class="ui secondary vertical filter menu">
|
||||
<a class="item" href="{{.Link}}?type=your_repositories&sort={{$.SortType}}&state={{.State}}&q={{$.Keyword}}">
|
||||
{{.i18n.Tr "home.issues.in_your_repos"}}
|
||||
{{.locale.Tr "home.issues.in_your_repos"}}
|
||||
<strong class="ui right">{{.Total}}</strong>
|
||||
</a>
|
||||
<div class="ui divider"></div>
|
||||
@ -39,11 +39,11 @@
|
||||
<div class="ui compact tiny menu">
|
||||
<a class="item{{if not .IsShowClosed}} active{{end}}" href="{{.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state=open&q={{$.Keyword}}">
|
||||
{{svg "octicon-milestone" 16 "mr-3"}}
|
||||
{{JsPrettyNumber .MilestoneStats.OpenCount}} {{.i18n.Tr "repo.issues.open_title"}}
|
||||
{{JsPrettyNumber .MilestoneStats.OpenCount}} {{.locale.Tr "repo.issues.open_title"}}
|
||||
</a>
|
||||
<a class="item{{if .IsShowClosed}} active{{end}}" href="{{.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state=closed&q={{$.Keyword}}">
|
||||
{{svg "octicon-check" 16 "mr-3"}}
|
||||
{{JsPrettyNumber .MilestoneStats.ClosedCount}} {{.i18n.Tr "repo.issues.closed_title"}}
|
||||
{{JsPrettyNumber .MilestoneStats.ClosedCount}} {{.locale.Tr "repo.issues.closed_title"}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
@ -54,8 +54,8 @@
|
||||
<input type="hidden" name="repos" value="[{{range $.RepoIDs}}{{.}},{{end}}]"/>
|
||||
<input type="hidden" name="sort" value="{{$.SortType}}"/>
|
||||
<input type="hidden" name="state" value="{{$.State}}"/>
|
||||
<input name="q" value="{{$.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}...">
|
||||
<button class="ui primary button" type="submit">{{.i18n.Tr "explore.search"}}</button>
|
||||
<input name="q" value="{{$.Keyword}}" placeholder="{{.locale.Tr "explore.search"}}...">
|
||||
<button class="ui primary button" type="submit">{{.locale.Tr "explore.search"}}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@ -63,16 +63,16 @@
|
||||
<!-- Sort -->
|
||||
<div class="ui dropdown type jump item">
|
||||
<span class="text">
|
||||
{{.i18n.Tr "repo.issues.filter_sort"}}
|
||||
{{.locale.Tr "repo.issues.filter_sort"}}
|
||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
</span>
|
||||
<div class="menu">
|
||||
<a class="{{if or (eq .SortType "closestduedate") (not .SortType)}}active{{end}} item" href="{{$.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=closestduedate&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.milestones.filter_sort.closest_due_date"}}</a>
|
||||
<a class="{{if eq .SortType "furthestduedate"}}active{{end}} item" href="{{$.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=furthestduedate&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.milestones.filter_sort.furthest_due_date"}}</a>
|
||||
<a class="{{if eq .SortType "leastcomplete"}}active{{end}} item" href="{{$.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=leastcomplete&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.milestones.filter_sort.least_complete"}}</a>
|
||||
<a class="{{if eq .SortType "mostcomplete"}}active{{end}} item" href="{{$.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=mostcomplete&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.milestones.filter_sort.most_complete"}}</a>
|
||||
<a class="{{if eq .SortType "mostissues"}}active{{end}} item" href="{{$.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=mostissues&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.milestones.filter_sort.most_issues"}}</a>
|
||||
<a class="{{if eq .SortType "leastissues"}}active{{end}} item" href="{{$.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=leastissues&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.milestones.filter_sort.least_issues"}}</a>
|
||||
<a class="{{if or (eq .SortType "closestduedate") (not .SortType)}}active{{end}} item" href="{{$.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=closestduedate&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.milestones.filter_sort.closest_due_date"}}</a>
|
||||
<a class="{{if eq .SortType "furthestduedate"}}active{{end}} item" href="{{$.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=furthestduedate&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.milestones.filter_sort.furthest_due_date"}}</a>
|
||||
<a class="{{if eq .SortType "leastcomplete"}}active{{end}} item" href="{{$.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=leastcomplete&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.milestones.filter_sort.least_complete"}}</a>
|
||||
<a class="{{if eq .SortType "mostcomplete"}}active{{end}} item" href="{{$.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=mostcomplete&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.milestones.filter_sort.most_complete"}}</a>
|
||||
<a class="{{if eq .SortType "mostissues"}}active{{end}} item" href="{{$.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=mostissues&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.milestones.filter_sort.most_issues"}}</a>
|
||||
<a class="{{if eq .SortType "leastissues"}}active{{end}} item" href="{{$.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=leastissues&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.milestones.filter_sort.least_issues"}}</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -91,22 +91,22 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="meta">
|
||||
{{ $closedDate:= TimeSinceUnix .ClosedDateUnix $.i18n }}
|
||||
{{ $closedDate:= TimeSinceUnix .ClosedDateUnix $.locale }}
|
||||
{{if .IsClosed}}
|
||||
{{svg "octicon-clock"}} {{$.i18n.Tr "repo.milestones.closed" $closedDate|Str2html}}
|
||||
{{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.closed" $closedDate|Str2html}}
|
||||
{{else}}
|
||||
{{svg "octicon-calendar"}}
|
||||
{{if .DeadlineString}}
|
||||
<span {{if .IsOverdue}}class="overdue"{{end}}>{{.DeadlineString}}</span>
|
||||
{{else}}
|
||||
{{$.i18n.Tr "repo.milestones.no_due_date"}}
|
||||
{{$.locale.Tr "repo.milestones.no_due_date"}}
|
||||
{{end}}
|
||||
{{end}}
|
||||
<span class="issue-stats">
|
||||
{{svg "octicon-issue-opened" 16 "mr-3"}}
|
||||
{{JsPrettyNumber .NumOpenIssues}} {{$.i18n.Tr "repo.issues.open_title"}}
|
||||
{{JsPrettyNumber .NumOpenIssues}} {{$.locale.Tr "repo.issues.open_title"}}
|
||||
{{svg "octicon-check" 16 "mr-3"}}
|
||||
{{JsPrettyNumber .NumClosedIssues}} {{$.i18n.Tr "repo.issues.closed_title"}}
|
||||
{{JsPrettyNumber .NumClosedIssues}} {{$.locale.Tr "repo.issues.closed_title"}}
|
||||
{{if .TotalTrackedTime}}
|
||||
{{svg "octicon-clock"}} {{.TotalTrackedTime|Sec2Time}}
|
||||
{{end}}
|
||||
@ -114,13 +114,13 @@
|
||||
</div>
|
||||
{{if and (or $.CanWriteIssues $.CanWritePulls) (not $.Repository.IsArchived)}}
|
||||
<div class="ui right operate">
|
||||
<a href="{{$.Link}}/{{.ID}}/edit" data-id={{.ID}} data-title={{.Name}}>{{svg "octicon-pencil"}} {{$.i18n.Tr "repo.issues.label_edit"}}</a>
|
||||
<a href="{{$.Link}}/{{.ID}}/edit" data-id={{.ID}} data-title={{.Name}}>{{svg "octicon-pencil"}} {{$.locale.Tr "repo.issues.label_edit"}}</a>
|
||||
{{if .IsClosed}}
|
||||
<a href="{{$.Link}}/{{.ID}}/open" data-id={{.ID}} data-title={{.Name}}>{{svg "octicon-check"}} {{$.i18n.Tr "repo.milestones.open"}}</a>
|
||||
<a href="{{$.Link}}/{{.ID}}/open" data-id={{.ID}} data-title={{.Name}}>{{svg "octicon-check"}} {{$.locale.Tr "repo.milestones.open"}}</a>
|
||||
{{else}}
|
||||
<a href="{{$.Link}}/{{.ID}}/close" data-id={{.ID}} data-title={{.Name}}>{{svg "octicon-x"}} {{$.i18n.Tr "repo.milestones.close"}}</a>
|
||||
<a href="{{$.Link}}/{{.ID}}/close" data-id={{.ID}} data-title={{.Name}}>{{svg "octicon-x"}} {{$.locale.Tr "repo.milestones.close"}}</a>
|
||||
{{end}}
|
||||
<a class="delete-button" href="#" data-url="{{$.RepoLink}}/milestones/delete" data-id="{{.ID}}">{{svg "octicon-trash"}} {{$.i18n.Tr "repo.issues.label_delete"}}</a>
|
||||
<a class="delete-button" href="#" data-url="{{$.RepoLink}}/milestones/delete" data-id="{{.ID}}">{{svg "octicon-trash"}} {{$.locale.Tr "repo.issues.label_delete"}}</a>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if .Content}}
|
||||
|
@ -7,15 +7,15 @@
|
||||
<span class="truncated-item-name">{{.ContextUser.ShortName 40}}</span>
|
||||
{{if .ContextUser.IsOrganization}}
|
||||
<span class="org-visibility">
|
||||
{{if .ContextUser.Visibility.IsLimited}}<div class="ui orange tiny horizontal label">{{.i18n.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
|
||||
{{if .ContextUser.Visibility.IsPrivate}}<div class="ui red tiny horizontal label">{{.i18n.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
|
||||
{{if .ContextUser.Visibility.IsLimited}}<div class="ui orange tiny horizontal label">{{.locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
|
||||
{{if .ContextUser.Visibility.IsPrivate}}<div class="ui red tiny horizontal label">{{.locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
|
||||
</span>
|
||||
{{end}}
|
||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
</span>
|
||||
<div class="context user overflow menu" tabindex="-1">
|
||||
<div class="ui header">
|
||||
{{.i18n.Tr "home.switch_dashboard_context"}}
|
||||
{{.locale.Tr "home.switch_dashboard_context"}}
|
||||
</div>
|
||||
<div class="scrolling menu items">
|
||||
<a class="{{if eq .ContextUser.ID .SignedUser.ID}}active selected{{end}} item truncated-item-container" href="{{AppSubUrl}}/{{if .PageIsIssues}}issues{{else if .PageIsPulls}}pulls{{else if .PageIsMilestonesDashboard}}milestones{{end}}">
|
||||
@ -27,15 +27,15 @@
|
||||
{{avatar .}}
|
||||
<span class="truncated-item-name">{{.ShortName 40}}</span>
|
||||
<span class="org-visibility">
|
||||
{{if .Visibility.IsLimited}}<div class="ui orange tiny horizontal label">{{$.i18n.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
|
||||
{{if .Visibility.IsPrivate}}<div class="ui red tiny horizontal label">{{$.i18n.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
|
||||
{{if .Visibility.IsLimited}}<div class="ui orange tiny horizontal label">{{$.locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
|
||||
{{if .Visibility.IsPrivate}}<div class="ui red tiny horizontal label">{{$.locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
|
||||
</span>
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
{{if .SignedUser.CanCreateOrganization}}
|
||||
<a class="item" href="{{AppSubUrl}}/org/create">
|
||||
{{svg "octicon-plus"}} {{.i18n.Tr "new_org"}}
|
||||
{{svg "octicon-plus"}} {{.locale.Tr "new_org"}}
|
||||
</a>
|
||||
{{end}}
|
||||
</div>
|
||||
@ -49,17 +49,17 @@
|
||||
{{if .Team}}
|
||||
{{.Team.Name}}
|
||||
{{else}}
|
||||
{{.i18n.Tr "org.teams"}}
|
||||
{{.locale.Tr "org.teams"}}
|
||||
{{end}}
|
||||
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
|
||||
</span>
|
||||
<div class="context user overflow menu" tabindex="-1">
|
||||
<div class="ui header">
|
||||
{{.i18n.Tr "home.filter_by_team_repositories"}}
|
||||
{{.locale.Tr "home.filter_by_team_repositories"}}
|
||||
</div>
|
||||
<div class="scrolling menu items">
|
||||
<a class="{{if not $.Team}}active selected{{end}} item" title="{{.i18n.Tr "all"}}" href="{{$.Org.OrganisationLink}}/{{if $.PageIsIssues}}issues{{else if $.PageIsPulls}}pulls{{else if $.PageIsMilestonesDashboard}}milestones{{else}}dashboard{{end}}">
|
||||
{{.i18n.Tr "all"}}
|
||||
<a class="{{if not $.Team}}active selected{{end}} item" title="{{.locale.Tr "all"}}" href="{{$.Org.OrganisationLink}}/{{if $.PageIsIssues}}issues{{else if $.PageIsPulls}}pulls{{else if $.PageIsMilestonesDashboard}}milestones{{else}}dashboard{{end}}">
|
||||
{{.locale.Tr "all"}}
|
||||
</a>
|
||||
{{range .Teams}}
|
||||
{{if not .IncludesAllRepositories}}
|
||||
@ -77,26 +77,26 @@
|
||||
{{if .ContextUser.IsOrganization}}
|
||||
<div class="right stackable menu">
|
||||
<a class="{{if .PageIsNews}}active{{end}} item" style="margin-left: auto" href="{{.ContextUser.DashboardLink}}{{if .Team}}/{{PathEscape .Team.Name}}{{end}}">
|
||||
{{svg "octicon-rss"}} {{.i18n.Tr "activities"}}
|
||||
{{svg "octicon-rss"}} {{.locale.Tr "activities"}}
|
||||
</a>
|
||||
{{if not .UnitIssuesGlobalDisabled}}
|
||||
<a class="{{if .PageIsIssues}}active{{end}} item" href="{{.ContextUser.OrganisationLink}}/issues{{if .Team}}/{{PathEscape .Team.Name}}{{end}}">
|
||||
{{svg "octicon-issue-opened"}} {{.i18n.Tr "issues"}}
|
||||
{{svg "octicon-issue-opened"}} {{.locale.Tr "issues"}}
|
||||
</a>
|
||||
{{end}}
|
||||
{{if not .UnitPullsGlobalDisabled}}
|
||||
<a class="{{if .PageIsPulls}}active{{end}} item" href="{{.ContextUser.OrganisationLink}}/pulls{{if .Team}}/{{PathEscape .Team.Name}}{{end}}">
|
||||
{{svg "octicon-git-pull-request"}} {{.i18n.Tr "pull_requests"}}
|
||||
{{svg "octicon-git-pull-request"}} {{.locale.Tr "pull_requests"}}
|
||||
</a>
|
||||
{{end}}
|
||||
{{if and .ShowMilestonesDashboardPage (not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled))}}
|
||||
<a class="{{if .PageIsMilestonesDashboard}}active{{end}} item" href="{{.ContextUser.OrganisationLink}}/milestones{{if .Team}}/{{PathEscape .Team.Name}}{{end}}">
|
||||
{{svg "octicon-milestone"}} {{.i18n.Tr "milestones"}}
|
||||
{{svg "octicon-milestone"}} {{.locale.Tr "milestones"}}
|
||||
</a>
|
||||
{{end}}
|
||||
<div class="item">
|
||||
<a class="ui primary basic button" href="{{.ContextUser.HomeLink}}" title='{{.i18n.Tr "home.view_home" .ContextUser.Name}}'>
|
||||
{{.i18n.Tr "home.view_home" (.ContextUser.ShortName 40)}}
|
||||
<a class="ui primary basic button" href="{{.ContextUser.HomeLink}}" title='{{.locale.Tr "home.view_home" .ContextUser.Name}}'>
|
||||
{{.locale.Tr "home.view_home" (.ContextUser.ShortName 40)}}
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -22,73 +22,73 @@
|
||||
>
|
||||
<div>
|
||||
<div v-if="!isOrganization" class="ui two item tabable menu">
|
||||
<a :class="{item: true, active: tab === 'repos'}" @click="changeTab('repos')">{{.i18n.Tr "repository"}}</a>
|
||||
<a :class="{item: true, active: tab === 'organizations'}" @click="changeTab('organizations')">{{.i18n.Tr "organization"}}</a>
|
||||
<a :class="{item: true, active: tab === 'repos'}" @click="changeTab('repos')">{{.locale.Tr "repository"}}</a>
|
||||
<a :class="{item: true, active: tab === 'organizations'}" @click="changeTab('organizations')">{{.locale.Tr "organization"}}</a>
|
||||
</div>
|
||||
<div v-show="tab === 'repos'" class="ui tab active list dashboard-repos">
|
||||
<h4 class="ui top attached header df ac">
|
||||
<div class="f1 df ac">
|
||||
{{.i18n.Tr "home.my_repos"}}
|
||||
{{.locale.Tr "home.my_repos"}}
|
||||
<span class="ui grey label ml-3">${reposTotalCount}</span>
|
||||
</div>
|
||||
<a class="tooltip" :href="subUrl + '/repo/create'" data-content="{{.i18n.Tr "new_repo"}}" data-position="left center">
|
||||
<a class="tooltip" :href="subUrl + '/repo/create'" data-content="{{.locale.Tr "new_repo"}}" data-position="left center">
|
||||
{{svg "octicon-plus"}}
|
||||
<span class="sr-only">{{.i18n.Tr "new_repo"}}</span>
|
||||
<span class="sr-only">{{.locale.Tr "new_repo"}}</span>
|
||||
</a>
|
||||
</h4>
|
||||
<div class="ui attached segment repos-search">
|
||||
<div class="ui fluid right action left icon input" :class="{loading: isLoading}">
|
||||
<input @input="changeReposFilter(reposFilter)" v-model="searchQuery" ref="search" placeholder="{{.i18n.Tr "home.search_repos"}}">
|
||||
<input @input="changeReposFilter(reposFilter)" v-model="searchQuery" ref="search" placeholder="{{.locale.Tr "home.search_repos"}}">
|
||||
<i class="icon df ac jc">{{svg "octicon-search" 16}}</i>
|
||||
<div class="ui dropdown icon button" title="{{.i18n.Tr "home.filter"}}">
|
||||
<div class="ui dropdown icon button" title="{{.locale.Tr "home.filter"}}">
|
||||
<i class="icon df ac jc m-0">{{svg "octicon-filter" 16}}</i>
|
||||
<div class="menu">
|
||||
<div class="item">
|
||||
<a @click="toggleArchivedFilter()">
|
||||
<div class="ui checkbox" id="archivedFilterCheckbox" title="{{.i18n.Tr "home.show_both_archived_unarchived"}}" v-if="archivedFilter === 'both'">
|
||||
<div class="ui checkbox" id="archivedFilterCheckbox" title="{{.locale.Tr "home.show_both_archived_unarchived"}}" v-if="archivedFilter === 'both'">
|
||||
<input type="checkbox">
|
||||
<label>
|
||||
{{svg "octicon-archive" 16 "mr-2"}}
|
||||
{{.i18n.Tr "home.show_archived"}}
|
||||
{{.locale.Tr "home.show_archived"}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="ui checkbox" id="archivedFilterCheckbox" title="{{.i18n.Tr "home.show_only_unarchived"}}" v-if="archivedFilter === 'unarchived'">
|
||||
<div class="ui checkbox" id="archivedFilterCheckbox" title="{{.locale.Tr "home.show_only_unarchived"}}" v-if="archivedFilter === 'unarchived'">
|
||||
<input type="checkbox">
|
||||
<label>
|
||||
{{svg "octicon-archive" 16 "mr-2"}}
|
||||
{{.i18n.Tr "home.show_archived"}}
|
||||
{{.locale.Tr "home.show_archived"}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="ui checkbox" id="archivedFilterCheckbox" title="{{.i18n.Tr "home.show_only_archived"}}" v-if="archivedFilter === 'archived'">
|
||||
<div class="ui checkbox" id="archivedFilterCheckbox" title="{{.locale.Tr "home.show_only_archived"}}" v-if="archivedFilter === 'archived'">
|
||||
<input type="checkbox">
|
||||
<label>
|
||||
{{svg "octicon-archive" 16 "mr-2"}}
|
||||
{{.i18n.Tr "home.show_archived"}}
|
||||
{{.locale.Tr "home.show_archived"}}
|
||||
</label>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="item">
|
||||
<a @click="togglePrivateFilter()">
|
||||
<div class="ui checkbox" id="privateFilterCheckbox" title="{{.i18n.Tr "home.show_both_private_public"}}" v-if="privateFilter === 'both'">
|
||||
<div class="ui checkbox" id="privateFilterCheckbox" title="{{.locale.Tr "home.show_both_private_public"}}" v-if="privateFilter === 'both'">
|
||||
<input type="checkbox">
|
||||
<label>
|
||||
{{svg "octicon-lock" 16 "mr-2"}}
|
||||
{{.i18n.Tr "home.show_private"}}
|
||||
{{.locale.Tr "home.show_private"}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="ui checkbox" id="privateFilterCheckbox" title="{{.i18n.Tr "home.show_only_public"}}" v-if="privateFilter === 'public'">
|
||||
<div class="ui checkbox" id="privateFilterCheckbox" title="{{.locale.Tr "home.show_only_public"}}" v-if="privateFilter === 'public'">
|
||||
<input type="checkbox">
|
||||
<label>
|
||||
{{svg "octicon-lock" 16 "mr-2"}}
|
||||
{{.i18n.Tr "home.show_private"}}
|
||||
{{.locale.Tr "home.show_private"}}
|
||||
</label>
|
||||
</div>
|
||||
<div class="ui checkbox" id="privateFilterCheckbox" title="{{.i18n.Tr "home.show_only_private"}}" v-if="privateFilter === 'private'">
|
||||
<div class="ui checkbox" id="privateFilterCheckbox" title="{{.locale.Tr "home.show_only_private"}}" v-if="privateFilter === 'private'">
|
||||
<input type="checkbox">
|
||||
<label>
|
||||
{{svg "octicon-lock" 16 "mr-2"}}
|
||||
{{.i18n.Tr "home.show_private"}}
|
||||
{{.locale.Tr "home.show_private"}}
|
||||
</label>
|
||||
</div>
|
||||
</a>
|
||||
@ -98,25 +98,25 @@
|
||||
</div>
|
||||
<div class="ui secondary tiny pointing borderless menu center grid repos-filter">
|
||||
<a class="item" :class="{active: reposFilter === 'all'}" @click="changeReposFilter('all')">
|
||||
{{.i18n.Tr "all"}}
|
||||
{{.locale.Tr "all"}}
|
||||
<div v-show="reposFilter === 'all'" class="ui circular mini grey label">${repoTypeCount}</div>
|
||||
</a>
|
||||
<a class="item" :class="{active: reposFilter === 'sources'}" @click="changeReposFilter('sources')">
|
||||
{{.i18n.Tr "sources"}}
|
||||
{{.locale.Tr "sources"}}
|
||||
<div v-show="reposFilter === 'sources'" class="ui circular mini grey label">${repoTypeCount}</div>
|
||||
</a>
|
||||
<a class="item" :class="{active: reposFilter === 'forks'}" @click="changeReposFilter('forks')">
|
||||
{{.i18n.Tr "forks"}}
|
||||
{{.locale.Tr "forks"}}
|
||||
<div v-show="reposFilter === 'forks'" class="ui circular mini grey label">${repoTypeCount}</div>
|
||||
</a>
|
||||
{{if .MirrorsEnabled}}
|
||||
<a class="item" :class="{active: reposFilter === 'mirrors'}" @click="changeReposFilter('mirrors')">
|
||||
{{.i18n.Tr "mirrors"}}
|
||||
{{.locale.Tr "mirrors"}}
|
||||
<div v-show="reposFilter === 'mirrors'" class="ui circular mini grey label">${repoTypeCount}</div>
|
||||
</a>
|
||||
{{end}}
|
||||
<a class="item" :class="{active: reposFilter === 'collaborative'}" @click="changeReposFilter('collaborative')">
|
||||
{{.i18n.Tr "collaborative"}}
|
||||
{{.locale.Tr "collaborative"}}
|
||||
<div v-show="reposFilter === 'collaborative'" class="ui circular mini grey label">${repoTypeCount}</div>
|
||||
</a>
|
||||
</div>
|
||||
@ -144,20 +144,20 @@
|
||||
<div v-if="showMoreReposLink" class="center py-3 border-secondary-top">
|
||||
<div class="ui borderless pagination menu narrow">
|
||||
<a class="item navigation py-2" :class="{'disabled': page === 1}"
|
||||
@click="changePage(1)" title="{{$.i18n.Tr "admin.first_page"}}">
|
||||
@click="changePage(1)" title="{{$.locale.Tr "admin.first_page"}}">
|
||||
{{svg "gitea-double-chevron-left" 16 "mr-2"}}
|
||||
</a>
|
||||
<a class="item navigation py-2" :class="{'disabled': page === 1}"
|
||||
@click="changePage(page - 1)" title="{{$.i18n.Tr "repo.issues.previous"}}">
|
||||
@click="changePage(page - 1)" title="{{$.locale.Tr "repo.issues.previous"}}">
|
||||
{{svg "octicon-chevron-left" 16 "mr-2"}}
|
||||
</a>
|
||||
<a class="active item py-2">${page}</a>
|
||||
<a class="item navigation" :class="{'disabled': page === finalPage}"
|
||||
@click="changePage(page + 1)" title="{{$.i18n.Tr "repo.issues.next"}}">
|
||||
@click="changePage(page + 1)" title="{{$.locale.Tr "repo.issues.next"}}">
|
||||
{{svg "octicon-chevron-right" 16 "ml-2"}}
|
||||
</a>
|
||||
<a class="item navigation py-2" :class="{'disabled': page === finalPage}"
|
||||
@click="changePage(finalPage)" title="{{$.i18n.Tr "admin.last_page"}}">
|
||||
@click="changePage(finalPage)" title="{{$.locale.Tr "admin.last_page"}}">
|
||||
{{svg "gitea-double-chevron-right" 16 "ml-2"}}
|
||||
</a>
|
||||
</div>
|
||||
@ -167,12 +167,12 @@
|
||||
<div v-if="!isOrganization" v-show="tab === 'organizations'" class="ui tab active list dashboard-orgs">
|
||||
<h4 class="ui top attached header df ac">
|
||||
<div class="f1 df ac">
|
||||
{{.i18n.Tr "home.my_orgs"}}
|
||||
{{.locale.Tr "home.my_orgs"}}
|
||||
<span class="ui grey label ml-3">${organizationsTotalCount}</span>
|
||||
</div>
|
||||
<a v-if="canCreateOrganization" class="tooltip" :href="subUrl + '/org/create'" data-content="{{.i18n.Tr "new_org"}}" data-position="left center">
|
||||
<a v-if="canCreateOrganization" class="tooltip" :href="subUrl + '/org/create'" data-content="{{.locale.Tr "new_org"}}" data-position="left center">
|
||||
{{svg "octicon-plus"}}
|
||||
<span class="sr-only">{{.i18n.Tr "new_org"}}</span>
|
||||
<span class="sr-only">{{.locale.Tr "new_org"}}</span>
|
||||
</a>
|
||||
</h4>
|
||||
<div v-if="organizations.length" class="ui attached table segment rounded-bottom">
|
||||
|
Reference in New Issue
Block a user