summaryrefslogtreecommitdiffstats
path: root/templates/repo/header.tmpl
diff options
context:
space:
mode:
Diffstat (limited to 'templates/repo/header.tmpl')
-rw-r--r--templates/repo/header.tmpl66
1 files changed, 33 insertions, 33 deletions
diff --git a/templates/repo/header.tmpl b/templates/repo/header.tmpl
index 029e9a186f..fa0fb79813 100644
--- a/templates/repo/header.tmpl
+++ b/templates/repo/header.tmpl
@@ -13,62 +13,62 @@
<a href="{{.Owner.HomeLink}}">{{.Owner.Name}}</a>
<div class="mx-2">/</div>
<a href="{{$.RepoLink}}">{{.Name}}</a>
- <a href="{{$.RepoLink}}.rss"><i class="ui grey icon tooltip ml-3" data-content="{{$.i18n.Tr "rss_feed"}}" data-position="top center">{{svg "octicon-rss" 18}}</i></a>
+ <a href="{{$.RepoLink}}.rss"><i class="ui grey icon tooltip ml-3" data-content="{{$.locale.Tr "rss_feed"}}" data-position="top center">{{svg "octicon-rss" 18}}</i></a>
<div class="labels df ac fw">
{{if .IsTemplate}}
{{if .IsPrivate}}
- <span class="ui basic label">{{$.i18n.Tr "repo.desc.private_template"}}</span>
+ <span class="ui basic label">{{$.locale.Tr "repo.desc.private_template"}}</span>
{{else}}
{{if .Owner.Visibility.IsPrivate}}
- <span class="ui basic label">{{$.i18n.Tr "repo.desc.internal_template"}}</span>
+ <span class="ui basic label">{{$.locale.Tr "repo.desc.internal_template"}}</span>
{{end}}
{{end}}
{{else}}
{{if .IsPrivate}}
- <span class="ui basic label">{{$.i18n.Tr "repo.desc.private"}}</span>
+ <span class="ui basic label">{{$.locale.Tr "repo.desc.private"}}</span>
{{else}}
{{if .Owner.Visibility.IsPrivate}}
- <span class="ui basic label">{{$.i18n.Tr "repo.desc.internal"}}</span>
+ <span class="ui basic label">{{$.locale.Tr "repo.desc.internal"}}</span>
{{end}}
{{end}}
{{end}}
{{if .IsArchived}}
- <span class="ui basic label">{{$.i18n.Tr "repo.desc.archived"}}</span>
+ <span class="ui basic label">{{$.locale.Tr "repo.desc.archived"}}</span>
{{end}}
</div>
</div>
{{if $.IsPullMirror}}
{{$address := MirrorRemoteAddress $.Context . $.Mirror.GetRemoteName}}
- <div class="fork-flag">{{$.i18n.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener noreferrer" href="{{$address.Address}}">{{$address.Address}}</a></div>
+ <div class="fork-flag">{{$.locale.Tr "repo.mirror_from"}} <a target="_blank" rel="noopener noreferrer" href="{{$address.Address}}">{{$address.Address}}</a></div>
{{end}}
- {{if .IsFork}}<div class="fork-flag">{{$.i18n.Tr "repo.forked_from"}} <a href="{{.BaseRepo.Link}}">{{.BaseRepo.FullName}}</a></div>{{end}}
- {{if .IsGenerated}}<div class="fork-flag">{{$.i18n.Tr "repo.generated_from"}} <a href="{{.TemplateRepo.Link}}">{{.TemplateRepo.FullName}}</a></div>{{end}}
+ {{if .IsFork}}<div class="fork-flag">{{$.locale.Tr "repo.forked_from"}} <a href="{{.BaseRepo.Link}}">{{.BaseRepo.FullName}}</a></div>{{end}}
+ {{if .IsGenerated}}<div class="fork-flag">{{$.locale.Tr "repo.generated_from"}} <a href="{{.TemplateRepo.Link}}">{{.TemplateRepo.FullName}}</a></div>{{end}}
</div>
{{if not (or .IsBeingCreated .IsBroken)}}
<div class="repo-buttons">
{{if $.RepoTransfer}}
<form method="post" action="{{$.RepoLink}}/action/accept_transfer?redirect_to={{$.RepoLink}}">
{{$.CsrfTokenHtml}}
- <div class="ui tooltip" data-content="{{if $.CanUserAcceptTransfer}}{{$.i18n.Tr "repo.transfer.accept_desc" $.RepoTransfer.Recipient.DisplayName}}{{else}}{{$.i18n.Tr "repo.transfer.no_permission_to_accept"}}{{end}}" data-position="bottom center">
+ <div class="ui tooltip" data-content="{{if $.CanUserAcceptTransfer}}{{$.locale.Tr "repo.transfer.accept_desc" $.RepoTransfer.Recipient.DisplayName}}{{else}}{{$.locale.Tr "repo.transfer.no_permission_to_accept"}}{{end}}" data-position="bottom center">
<button type="submit" class="ui button {{if $.CanUserAcceptTransfer}}green {{end}} ok inverted small"{{if not $.CanUserAcceptTransfer}} disabled{{end}}>
- {{$.i18n.Tr "repo.transfer.accept"}}
+ {{$.locale.Tr "repo.transfer.accept"}}
</button>
</div>
</form>
<form method="post" action="{{$.RepoLink}}/action/reject_transfer?redirect_to={{$.RepoLink}}">
{{$.CsrfTokenHtml}}
- <div class="ui tooltip" data-content="{{if $.CanUserAcceptTransfer}}{{$.i18n.Tr "repo.transfer.reject_desc" $.RepoTransfer.Recipient.DisplayName}}{{else}}{{$.i18n.Tr "repo.transfer.no_permission_to_reject"}}{{end}}" data-position="bottom center">
+ <div class="ui tooltip" data-content="{{if $.CanUserAcceptTransfer}}{{$.locale.Tr "repo.transfer.reject_desc" $.RepoTransfer.Recipient.DisplayName}}{{else}}{{$.locale.Tr "repo.transfer.no_permission_to_reject"}}{{end}}" data-position="bottom center">
<button type="submit" class="ui button {{if $.CanUserAcceptTransfer}}red {{end}}ok inverted small"{{if not $.CanUserAcceptTransfer}} disabled{{end}}>
- {{$.i18n.Tr "repo.transfer.reject"}}
+ {{$.locale.Tr "repo.transfer.reject"}}
</button>
</div>
</form>
{{end}}
<form method="post" action="{{$.RepoLink}}/action/{{if $.IsWatchingRepo}}un{{end}}watch?redirect_to={{$.Link}}">
{{$.CsrfTokenHtml}}
- <div class="ui labeled button{{if not $.IsSigned}} tooltip{{end}}" tabindex="0"{{if not $.IsSigned}} data-content="{{$.i18n.Tr "repo.watch_guest_user" }}" data-position="top center"{{end}}>
+ <div class="ui labeled button{{if not $.IsSigned}} tooltip{{end}}" tabindex="0"{{if not $.IsSigned}} data-content="{{$.locale.Tr "repo.watch_guest_user" }}" data-position="top center"{{end}}>
<button type="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}}>
- {{if $.IsWatchingRepo}}{{svg "octicon-eye-closed" 16}}{{$.i18n.Tr "repo.unwatch"}}{{else}}{{svg "octicon-eye"}}{{$.i18n.Tr "repo.watch"}}{{end}}
+ {{if $.IsWatchingRepo}}{{svg "octicon-eye-closed" 16}}{{$.locale.Tr "repo.unwatch"}}{{else}}{{svg "octicon-eye"}}{{$.locale.Tr "repo.watch"}}{{end}}
</button>
<a class="ui basic label" href="{{.Link}}/watchers">
{{CountFmt .NumWatches}}
@@ -78,9 +78,9 @@
{{if not $.DisableStars}}
<form method="post" action="{{$.RepoLink}}/action/{{if $.IsStaringRepo}}un{{end}}star?redirect_to={{$.Link}}">
{{$.CsrfTokenHtml}}
- <div class="ui labeled button{{if not $.IsSigned}} tooltip{{end}}" tabindex="0"{{if not $.IsSigned}} data-content="{{$.i18n.Tr "repo.star_guest_user" }}" data-position="top center"{{end}}>
+ <div class="ui labeled button{{if not $.IsSigned}} tooltip{{end}}" tabindex="0"{{if not $.IsSigned}} data-content="{{$.locale.Tr "repo.star_guest_user" }}" data-position="top center"{{end}}>
<button type="submit" class="ui compact small basic button"{{if not $.IsSigned}} disabled{{end}}>
- {{if $.IsStaringRepo}}{{svg "octicon-star-fill"}}{{$.i18n.Tr "repo.unstar"}}{{else}}{{svg "octicon-star"}}{{$.i18n.Tr "repo.star"}}{{end}}
+ {{if $.IsStaringRepo}}{{svg "octicon-star-fill"}}{{$.locale.Tr "repo.unstar"}}{{else}}{{svg "octicon-star"}}{{$.locale.Tr "repo.star"}}{{end}}
</button>
<a class="ui basic label" href="{{.Link}}/stars">
{{CountFmt .NumStars}}
@@ -94,9 +94,9 @@
tooltip disabled
{{end}}"
{{if not $.IsSigned}}
- data-content="{{$.i18n.Tr "repo.fork_guest_user"}}"
+ data-content="{{$.locale.Tr "repo.fork_guest_user"}}"
{{else if and (not $.CanSignedUserFork) (eq (len $.UserAndOrgForks) 0)}}
- data-content="{{$.i18n.Tr "repo.fork_from_self"}}"
+ data-content="{{$.locale.Tr "repo.fork_from_self"}}"
{{end}}
data-position="top center" data-variation="tiny" tabindex="0">
<a class="ui compact{{if $.ShowForkModal}} show-modal{{end}} small basic button"
@@ -113,12 +113,12 @@
data-modal="#fork-repo-modal"
{{end}}
>
- {{svg "octicon-repo-forked"}}{{$.i18n.Tr "repo.fork"}}
+ {{svg "octicon-repo-forked"}}{{$.locale.Tr "repo.fork"}}
</a>
<div class="ui small modal" id="fork-repo-modal">
{{svg "octicon-x" 16 "close inside"}}
<div class="header">
- {{$.i18n.Tr "repo.already_forked" .Name}}
+ {{$.locale.Tr "repo.already_forked" .Name}}
</div>
<div class="content tl">
<div class="ui list">
@@ -133,7 +133,7 @@
{{if $.CanSignedUserFork}}
<div class="ui divider"></div>
<a href="{{AppSubUrl}}/repo/fork/{{.ID}}">
- {{$.i18n.Tr "repo.fork_to_different_account"}}
+ {{$.locale.Tr "repo.fork_to_different_account"}}
</a>
{{end}}
</div>
@@ -153,13 +153,13 @@
<div class="ui tabular stackable menu navbar">
{{if .Permission.CanRead $.UnitTypeCode}}
<a class="{{if .PageIsViewCode}}active{{end}} item" href="{{.RepoLink}}{{if (ne .BranchName .Repository.DefaultBranch)}}/src/{{.BranchNameSubURL}}{{end}}">
- {{svg "octicon-code"}} {{.i18n.Tr "repo.code"}}
+ {{svg "octicon-code"}} {{.locale.Tr "repo.code"}}
</a>
{{end}}
{{if .Permission.CanRead $.UnitTypeIssues}}
<a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoLink}}/issues">
- {{svg "octicon-issue-opened"}} {{.i18n.Tr "repo.issues"}}
+ {{svg "octicon-issue-opened"}} {{.locale.Tr "repo.issues"}}
{{if .Repository.NumOpenIssues}}
<span class="ui primary small label">{{CountFmt .Repository.NumOpenIssues}}</span>
{{end}}
@@ -168,13 +168,13 @@
{{if .Permission.CanRead $.UnitTypeExternalTracker}}
<a class="{{if .PageIsIssueList}}active{{end}} item" href="{{.RepoExternalIssuesLink}}" target="_blank" rel="noopener noreferrer">
- {{svg "octicon-link-external"}} {{.i18n.Tr "repo.issues"}} </span>
+ {{svg "octicon-link-external"}} {{.locale.Tr "repo.issues"}} </span>
</a>
{{end}}
{{if and .Repository.CanEnablePulls (.Permission.CanRead $.UnitTypePullRequests)}}
<a class="{{if .PageIsPullList}}active{{end}} item" href="{{.RepoLink}}/pulls">
- {{svg "octicon-git-pull-request"}} {{.i18n.Tr "repo.pulls"}}
+ {{svg "octicon-git-pull-request"}} {{.locale.Tr "repo.pulls"}}
{{if .Repository.NumOpenPulls}}
<span class="ui primary small label">{{CountFmt .Repository.NumOpenPulls}}</span>
{{end}}
@@ -183,13 +183,13 @@
{{if .Permission.CanRead $.UnitTypePackages}}
<a href="{{.RepoLink}}/packages" class="{{ if .IsPackagesPage }}active{{end}} item">
- {{svg "octicon-package"}} {{.i18n.Tr "packages.title"}}
+ {{svg "octicon-package"}} {{.locale.Tr "packages.title"}}
</a>
{{end}}
{{ if and (not .UnitProjectsGlobalDisabled) (.Permission.CanRead $.UnitTypeProjects)}}
<a href="{{.RepoLink}}/projects" class="{{ if .IsProjectsPage }}active{{end}} item">
- {{svg "octicon-project"}} {{.i18n.Tr "repo.project_board"}}
+ {{svg "octicon-project"}} {{.locale.Tr "repo.project_board"}}
{{if .Repository.NumOpenProjects}}
<span class="ui primary small label">{{CountFmt .Repository.NumOpenProjects}}</span>
{{end}}
@@ -198,7 +198,7 @@
{{if and (.Permission.CanRead $.UnitTypeReleases) (not .IsEmptyRepo) }}
<a class="{{if .PageIsReleaseList}}active{{end}} item" href="{{.RepoLink}}/releases">
- {{svg "octicon-tag"}} {{.i18n.Tr "repo.releases"}}
+ {{svg "octicon-tag"}} {{.locale.Tr "repo.releases"}}
{{if .NumReleases}}
<span class="ui primary small label">{{CountFmt .NumReleases}}</span>
{{end}}
@@ -207,13 +207,13 @@
{{if or (.Permission.CanRead $.UnitTypeWiki) (.Permission.CanRead $.UnitTypeExternalWiki)}}
<a class="{{if .PageIsWiki}}active{{end}} item" href="{{.RepoLink}}/wiki" {{if (.Permission.CanRead $.UnitTypeExternalWiki)}} target="_blank" rel="noopener noreferrer" {{end}}>
- {{svg "octicon-book"}} {{.i18n.Tr "repo.wiki"}}
+ {{svg "octicon-book"}} {{.locale.Tr "repo.wiki"}}
</a>
{{end}}
{{if and (.Permission.CanReadAny $.UnitTypePullRequests $.UnitTypeIssues $.UnitTypeReleases) (not .IsEmptyRepo)}}
<a class="{{if .PageIsActivity}}active{{end}} item" href="{{.RepoLink}}/activity">
- {{svg "octicon-pulse"}} {{.i18n.Tr "repo.activity"}}
+ {{svg "octicon-pulse"}} {{.locale.Tr "repo.activity"}}
</a>
{{end}}
@@ -222,7 +222,7 @@
{{if .Permission.IsAdmin}}
<div class="right menu">
<a class="{{if .PageIsSettings}}active{{end}} item" href="{{.RepoLink}}/settings">
- {{svg "octicon-tools"}} {{.i18n.Tr "repo.settings"}}
+ {{svg "octicon-tools"}} {{.locale.Tr "repo.settings"}}
</a>
</div>
{{end}}
@@ -231,7 +231,7 @@
<div class="ui tabular stackable menu navbar">
<div class="right menu">
<a class="{{if .PageIsSettings}}active{{end}} item" href="{{.RepoLink}}/settings">
- {{svg "octicon-tools"}} {{.i18n.Tr "repo.settings"}}
+ {{svg "octicon-tools"}} {{.locale.Tr "repo.settings"}}
</a>
</div>
</div>