aboutsummaryrefslogtreecommitdiffstats
path: root/templates/org
diff options
context:
space:
mode:
authordelvh <dev.lh@web.de>2023-09-25 10:56:50 +0200
committerGitHub <noreply@github.com>2023-09-25 08:56:50 +0000
commit7960ba7e2bbe2eb6f98f6d99f2ce105468cdf56e (patch)
treecfcc4836ba1bb71518742f2aaf980f1f34248468 /templates/org
parente6d8b146207de0f5d88b7c08dc75b1f2f078cbbe (diff)
downloadgitea-7960ba7e2bbe2eb6f98f6d99f2ce105468cdf56e.tar.gz
gitea-7960ba7e2bbe2eb6f98f6d99f2ce105468cdf56e.zip
Always use `ctx.Locale.Tr` inside templates (#27231)
Diffstat (limited to 'templates/org')
-rw-r--r--templates/org/create.tmpl20
-rw-r--r--templates/org/header.tmpl4
-rw-r--r--templates/org/home.tmpl24
-rw-r--r--templates/org/member/members.tmpl24
-rw-r--r--templates/org/menu.tmpl14
-rw-r--r--templates/org/settings/applications.tmpl2
-rw-r--r--templates/org/settings/delete.tmpl12
-rw-r--r--templates/org/settings/hook_new.tmpl4
-rw-r--r--templates/org/settings/labels.tmpl4
-rw-r--r--templates/org/settings/navbar.tmpl22
-rw-r--r--templates/org/settings/options.tmpl40
-rw-r--r--templates/org/team/invite.tmpl8
-rw-r--r--templates/org/team/members.tmpl18
-rw-r--r--templates/org/team/navbar.tmpl4
-rw-r--r--templates/org/team/new.tmpl78
-rw-r--r--templates/org/team/repositories.tmpl12
-rw-r--r--templates/org/team/sidebar.tmpl42
-rw-r--r--templates/org/team/teams.tmpl12
18 files changed, 172 insertions, 172 deletions
diff --git a/templates/org/create.tmpl b/templates/org/create.tmpl
index cd2ffbb68e..004cd9be80 100644
--- a/templates/org/create.tmpl
+++ b/templates/org/create.tmpl
@@ -5,40 +5,40 @@
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<h3 class="ui top attached header">
- {{.locale.Tr "new_org"}}
+ {{ctx.Locale.Tr "new_org"}}
</h3>
<div class="ui attached segment">
{{template "base/alert" .}}
<div class="inline required field {{if .Err_OrgName}}error{{end}}">
- <label for="org_name">{{.locale.Tr "org.org_name_holder"}}</label>
+ <label for="org_name">{{ctx.Locale.Tr "org.org_name_holder"}}</label>
<input id="org_name" name="org_name" value="{{.org_name}}" autofocus required maxlength="40">
- <span class="help">{{.locale.Tr "org.org_name_helper"}}</span>
+ <span class="help">{{ctx.Locale.Tr "org.org_name_helper"}}</span>
</div>
<div class="inline field {{if .Err_OrgVisibility}}error{{end}}">
- <span class="inline required field"><label for="visibility">{{.locale.Tr "org.settings.visibility"}}</label></span>
+ <span class="inline required field"><label for="visibility">{{ctx.Locale.Tr "org.settings.visibility"}}</label></span>
<div class="inline-grouped-list">
<div class="ui radio checkbox">
<input class="enable-system-radio" name="visibility" type="radio" value="0" {{if .DefaultOrgVisibilityMode.IsPublic}}checked{{end}}>
- <label>{{.locale.Tr "org.settings.visibility.public"}}</label>
+ <label>{{ctx.Locale.Tr "org.settings.visibility.public"}}</label>
</div>
<div class="ui radio checkbox">
<input class="enable-system-radio" name="visibility" type="radio" value="1" {{if .DefaultOrgVisibilityMode.IsLimited}}checked{{end}}>
- <label>{{.locale.Tr "org.settings.visibility.limited"}}</label>
+ <label>{{ctx.Locale.Tr "org.settings.visibility.limited"}}</label>
</div>
<div class="ui radio checkbox">
<input class="enable-system-radio" name="visibility" type="radio" value="2" {{if .DefaultOrgVisibilityMode.IsPrivate}}checked{{end}}>
- <label>{{.locale.Tr "org.settings.visibility.private"}}</label>
+ <label>{{ctx.Locale.Tr "org.settings.visibility.private"}}</label>
</div>
</div>
</div>
<div class="inline field" id="permission_box">
- <label>{{.locale.Tr "org.settings.permission"}}</label>
+ <label>{{ctx.Locale.Tr "org.settings.permission"}}</label>
<div class="inline-grouped-list">
<div class="ui checkbox">
<input type="checkbox" name="repo_admin_change_team_access" checked>
- <label>{{.locale.Tr "org.settings.repoadminchangeteam"}}</label>
+ <label>{{ctx.Locale.Tr "org.settings.repoadminchangeteam"}}</label>
</div>
</div>
</div>
@@ -46,7 +46,7 @@
<div class="inline field">
<label></label>
<button class="ui primary button">
- {{.locale.Tr "org.create_org"}}
+ {{ctx.Locale.Tr "org.create_org"}}
</button>
</div>
</div>
diff --git a/templates/org/header.tmpl b/templates/org/header.tmpl
index 9348e14544..72adf6d9b5 100644
--- a/templates/org/header.tmpl
+++ b/templates/org/header.tmpl
@@ -6,8 +6,8 @@
{{ctx.AvatarUtils.Avatar . 100}}
<span class="text thin grey"><a href="{{.HomeLink}}">{{.DisplayName}}</a></span>
<span class="org-visibility">
- {{if .Visibility.IsLimited}}<div class="ui medium basic horizontal label">{{$.locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
- {{if .Visibility.IsPrivate}}<div class="ui medium basic horizontal label">{{$.locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
+ {{if .Visibility.IsLimited}}<div class="ui medium basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
+ {{if .Visibility.IsPrivate}}<div class="ui medium basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
</span>
</div>
</div>
diff --git a/templates/org/home.tmpl b/templates/org/home.tmpl
index 18d5282a31..ff4f3a8b1a 100644
--- a/templates/org/home.tmpl
+++ b/templates/org/home.tmpl
@@ -6,11 +6,11 @@
<div class="ui header gt-df gt-fw">
{{.Org.DisplayName}}
<span class="org-visibility">
- {{if .Org.Visibility.IsLimited}}<span class="ui large basic horizontal label">{{.locale.Tr "org.settings.visibility.limited_shortname"}}</span>{{end}}
- {{if .Org.Visibility.IsPrivate}}<span class="ui large basic horizontal label">{{.locale.Tr "org.settings.visibility.private_shortname"}}</span>{{end}}
+ {{if .Org.Visibility.IsLimited}}<span class="ui large basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.limited_shortname"}}</span>{{end}}
+ {{if .Org.Visibility.IsPrivate}}<span class="ui large basic horizontal label">{{ctx.Locale.Tr "org.settings.visibility.private_shortname"}}</span>{{end}}
</span>
{{if .EnableFeed}}
- <a class="rss-icon gt-mx-3" href="{{.Org.HomeLink}}.rss" data-tooltip-content="{{.locale.Tr "rss_feed"}}">{{svg "octicon-rss" 24}}</a>
+ <a class="rss-icon gt-mx-3" href="{{.Org.HomeLink}}.rss" data-tooltip-content="{{ctx.Locale.Tr "rss_feed"}}">{{svg "octicon-rss" 24}}</a>
{{end}}
</div>
{{if $.RenderedDescription}}<div class="render-content markup">{{$.RenderedDescription|Str2html}}</div>{{end}}
@@ -25,9 +25,9 @@
<div class="right menu">
<button class="link-action ui basic button gt-mr-0" data-url="{{.Org.HomeLink}}?action={{if $.IsFollowing}}unfollow{{else}}follow{{end}}">
{{if $.IsFollowing}}
- {{.locale.Tr "user.unfollow"}}
+ {{ctx.Locale.Tr "user.unfollow"}}
{{else}}
- {{.locale.Tr "user.follow"}}
+ {{ctx.Locale.Tr "user.follow"}}
{{end}}
</button>
</div>
@@ -47,16 +47,16 @@
<div class="ui five wide column">
{{if .CanCreateOrgRepo}}
<div class="center aligned">
- <a class="ui primary button" href="{{AppSubUrl}}/repo/create?org={{.Org.ID}}">{{.locale.Tr "new_repo"}}</a>
+ <a class="ui primary button" href="{{AppSubUrl}}/repo/create?org={{.Org.ID}}">{{ctx.Locale.Tr "new_repo"}}</a>
{{if not .DisableNewPullMirrors}}
- <a class="ui primary button" href="{{AppSubUrl}}/repo/migrate?org={{.Org.ID}}&mirror=1">{{.locale.Tr "new_migrate"}}</a>
+ <a class="ui primary button" href="{{AppSubUrl}}/repo/migrate?org={{.Org.ID}}&mirror=1">{{ctx.Locale.Tr "new_migrate"}}</a>
{{end}}
</div>
<div class="divider"></div>
{{end}}
{{if .NumMembers}}
<h4 class="ui top attached header gt-df">
- <strong class="gt-f1">{{.locale.Tr "org.members"}}</strong>
+ <strong class="gt-f1">{{ctx.Locale.Tr "org.members"}}</strong>
<a class="text grey gt-df gt-ac" href="{{.OrgLink}}/members"><span>{{.NumMembers}}</span> {{svg "octicon-chevron-right"}}</a>
</h4>
<div class="ui attached segment members">
@@ -70,7 +70,7 @@
{{end}}
{{if .IsOrganizationMember}}
<div class="ui top attached header gt-df">
- <strong class="gt-f1">{{.locale.Tr "org.teams"}}</strong>
+ <strong class="gt-f1">{{ctx.Locale.Tr "org.teams"}}</strong>
<a class="text grey gt-df gt-ac" href="{{.OrgLink}}/teams"><span>{{.Org.NumTeams}}</span> {{svg "octicon-chevron-right"}}</a>
</div>
<div class="ui attached table segment teams">
@@ -78,15 +78,15 @@
<div class="item">
<a href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}"><strong class="team-name">{{.Name}}</strong></a>
<p class="text grey">
- <a class="muted" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}"><strong>{{.NumMembers}}</strong> {{$.locale.Tr "org.lower_members"}}</a> ·
- <a class="muted" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/repositories"><strong>{{.NumRepos}}</strong> {{$.locale.Tr "org.lower_repositories"}}</a>
+ <a class="muted" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}"><strong>{{.NumMembers}}</strong> {{ctx.Locale.Tr "org.lower_members"}}</a> ·
+ <a class="muted" href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/repositories"><strong>{{.NumRepos}}</strong> {{ctx.Locale.Tr "org.lower_repositories"}}</a>
</p>
</div>
{{end}}
</div>
{{if .IsOrganizationOwner}}
<div class="ui bottom attached segment">
- <a class="ui primary small button" href="{{.OrgLink}}/teams/new">{{.locale.Tr "org.create_new_team"}}</a>
+ <a class="ui primary small button" href="{{.OrgLink}}/teams/new">{{ctx.Locale.Tr "org.create_new_team"}}</a>
</div>
{{end}}
{{end}}
diff --git a/templates/org/member/members.tmpl b/templates/org/member/members.tmpl
index 65ef7b66e7..e4ddb69805 100644
--- a/templates/org/member/members.tmpl
+++ b/templates/org/member/members.tmpl
@@ -15,17 +15,17 @@
<div class="flex-item-title">
{{template "shared/user/name" .}}
{{if not $isPublic}}
- <span class="ui basic tiny label">{{$.locale.Tr "org.members.private"}}</span>
+ <span class="ui basic tiny label">{{ctx.Locale.Tr "org.members.private"}}</span>
{{end}}
</div>
{{if not $.PublicOnly}}
<div class="flex-item-body">
- {{$.locale.Tr "org.members.member_role"}}
- <strong class="flex-text-inline">{{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock"}} {{$.locale.Tr "org.members.owner"}}{{else}}{{$.locale.Tr "org.members.member"}}{{end}}</strong>
+ {{ctx.Locale.Tr "org.members.member_role"}}
+ <strong class="flex-text-inline">{{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock"}} {{ctx.Locale.Tr "org.members.owner"}}{{else}}{{ctx.Locale.Tr "org.members.member"}}{{end}}</strong>
</div>
{{if $.IsOrganizationOwner}}
<div class="flex-item-body">
- {{$.locale.Tr "admin.users.2fa"}}
+ {{ctx.Locale.Tr "admin.users.2fa"}}
<strong>
{{if index $.MembersTwoFaStatus .ID}}
<span class="text green">{{svg "octicon-check"}}</span>
@@ -40,9 +40,9 @@
<div class="flex-item-trailing">
{{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}
{{if $isPublic}}
- <a class="ui tiny button link-action" href data-url="{{$.OrgLink}}/members/action/private?uid={{.ID}}">{{svg "octicon-eye-closed" 12 "icon"}}{{$.locale.Tr "org.members.public_helper"}}</a>
+ <a class="ui tiny button link-action" href data-url="{{$.OrgLink}}/members/action/private?uid={{.ID}}">{{svg "octicon-eye-closed" 12 "icon"}}{{ctx.Locale.Tr "org.members.public_helper"}}</a>
{{else}}
- <a class="ui tiny button link-action" href data-url="{{$.OrgLink}}/members/action/public?uid={{.ID}}">{{svg "octicon-eye" 12 "icon"}}{{$.locale.Tr "org.members.private_helper"}}</a>
+ <a class="ui tiny button link-action" href data-url="{{$.OrgLink}}/members/action/public?uid={{.ID}}">{{svg "octicon-eye" 12 "icon"}}{{ctx.Locale.Tr "org.members.private_helper"}}</a>
{{end}}
{{end}}
{{if eq $.SignedUser.ID .ID}}
@@ -50,14 +50,14 @@
<button class="ui red tiny button delete-button" data-modal-id="leave-organization"
data-url="{{$.OrgLink}}/members/action/leave" data-datauid="{{.ID}}"
data-name="{{.DisplayName}}"
- data-data-organization-name="{{$.Org.DisplayName}}">{{$.locale.Tr "org.members.leave"}}</button>
+ data-data-organization-name="{{$.Org.DisplayName}}">{{ctx.Locale.Tr "org.members.leave"}}</button>
</form>
{{else if $.IsOrganizationOwner}}
<form>
<button class="ui red tiny button delete-button" data-modal-id="remove-organization-member"
data-url="{{$.OrgLink}}/members/action/remove" data-datauid="{{.ID}}"
data-name="{{.DisplayName}}"
- data-data-organization-name="{{$.Org.DisplayName}}">{{$.locale.Tr "org.members.remove"}}</button>
+ data-data-organization-name="{{$.Org.DisplayName}}">{{ctx.Locale.Tr "org.members.remove"}}</button>
</form>
{{end}}
</div>
@@ -70,19 +70,19 @@
</div>
<div class="ui g-modal-confirm delete modal" id="leave-organization">
<div class="header">
- {{$.locale.Tr "org.members.leave"}}
+ {{ctx.Locale.Tr "org.members.leave"}}
</div>
<div class="content">
- <p>{{$.locale.Tr "org.members.leave.detail" `<span class="dataOrganizationName"></span>` | Safe}}</p>
+ <p>{{ctx.Locale.Tr "org.members.leave.detail" `<span class="dataOrganizationName"></span>` | Safe}}</p>
</div>
{{template "base/modal_actions_confirm" .}}
</div>
<div class="ui g-modal-confirm delete modal" id="remove-organization-member">
<div class="header">
- {{$.locale.Tr "org.members.remove"}}
+ {{ctx.Locale.Tr "org.members.remove"}}
</div>
<div class="content">
- <p>{{$.locale.Tr "org.members.remove.detail" `<span class="name"></span>` `<span class="dataOrganizationName"></span>` | Safe}}</p>
+ <p>{{ctx.Locale.Tr "org.members.remove.detail" `<span class="name"></span>` `<span class="dataOrganizationName"></span>` | Safe}}</p>
</div>
{{template "base/modal_actions_confirm" .}}
</div>
diff --git a/templates/org/menu.tmpl b/templates/org/menu.tmpl
index 26c9f980a5..c3ec142e9c 100644
--- a/templates/org/menu.tmpl
+++ b/templates/org/menu.tmpl
@@ -1,35 +1,35 @@
<div class="ui container">
<div class="ui secondary stackable pointing menu">
<a class="{{if .PageIsViewRepositories}}active {{end}}item" href="{{$.Org.HomeLink}}">
- {{svg "octicon-repo"}} {{.locale.Tr "user.repositories"}}
+ {{svg "octicon-repo"}} {{ctx.Locale.Tr "user.repositories"}}
{{if .RepoCount}}
<div class="ui small label">{{.RepoCount}}</div>
{{end}}
</a>
{{if .CanReadProjects}}
<a class="{{if .PageIsViewProjects}}active {{end}}item" href="{{$.Org.HomeLink}}/-/projects">
- {{svg "octicon-project-symlink"}} {{.locale.Tr "user.projects"}}
+ {{svg "octicon-project-symlink"}} {{ctx.Locale.Tr "user.projects"}}
</a>
{{end}}
{{if and .IsPackageEnabled .CanReadPackages}}
<a class="item" href="{{$.Org.HomeLink}}/-/packages">
- {{svg "octicon-package"}} {{.locale.Tr "packages.title"}}
+ {{svg "octicon-package"}} {{ctx.Locale.Tr "packages.title"}}
</a>
{{end}}
{{if and .IsRepoIndexerEnabled .CanReadCode}}
<a class="item" href="{{$.Org.HomeLink}}/-/code">
- {{svg "octicon-code"}}&nbsp;{{$.locale.Tr "org.code"}}
+ {{svg "octicon-code"}}&nbsp;{{ctx.Locale.Tr "org.code"}}
</a>
{{end}}
{{if .NumMembers}}
<a class="{{if $.PageIsOrgMembers}}active {{end}}item" href="{{$.OrgLink}}/members">
- {{svg "octicon-person"}}&nbsp;{{$.locale.Tr "org.members"}}
+ {{svg "octicon-person"}}&nbsp;{{ctx.Locale.Tr "org.members"}}
<div class="ui small label">{{.NumMembers}}</div>
</a>
{{end}}
{{if .IsOrganizationMember}}
<a class="{{if $.PageIsOrgTeams}}active {{end}}item" href="{{$.OrgLink}}/teams">
- {{svg "octicon-people"}}&nbsp;{{$.locale.Tr "org.teams"}}
+ {{svg "octicon-people"}}&nbsp;{{ctx.Locale.Tr "org.teams"}}
{{if .NumTeams}}
<div class="ui small label">{{.NumTeams}}</div>
{{end}}
@@ -39,7 +39,7 @@
{{if .IsOrganizationOwner}}
<div class="right menu">
<a class="{{if .PageIsOrgSettings}}active {{end}}item" href="{{.OrgLink}}/settings">
- {{svg "octicon-tools"}} {{.locale.Tr "repo.settings"}}
+ {{svg "octicon-tools"}} {{ctx.Locale.Tr "repo.settings"}}
</a>
</div>
{{end}}
diff --git a/templates/org/settings/applications.tmpl b/templates/org/settings/applications.tmpl
index 5934f99de7..df5f4e9dbc 100644
--- a/templates/org/settings/applications.tmpl
+++ b/templates/org/settings/applications.tmpl
@@ -1,7 +1,7 @@
{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings options")}}
<div class="org-setting-content">
<h4 class="ui top attached header">
- {{.locale.Tr "settings.applications"}}
+ {{ctx.Locale.Tr "settings.applications"}}
</h4>
{{template "user/settings/applications_oauth2_list" .}}
diff --git a/templates/org/settings/delete.tmpl b/templates/org/settings/delete.tmpl
index 9c8644da27..2cf8238f57 100644
--- a/templates/org/settings/delete.tmpl
+++ b/templates/org/settings/delete.tmpl
@@ -2,20 +2,20 @@
<div class="org-setting-content">
<h4 class="ui top attached error header">
- {{.locale.Tr "org.settings.delete_account"}}
+ {{ctx.Locale.Tr "org.settings.delete_account"}}
</h4>
<div class="ui attached error segment">
<div class="ui red message">
- <p class="text left">{{svg "octicon-alert"}} {{.locale.Tr "org.settings.delete_prompt" | Str2html}}</p>
+ <p class="text left">{{svg "octicon-alert"}} {{ctx.Locale.Tr "org.settings.delete_prompt" | Str2html}}</p>
</div>
<form class="ui form ignore-dirty" id="delete-form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<div class="inline required field {{if .Err_OrgName}}error{{end}}">
- <label for="org_name">{{.locale.Tr "org.org_name_holder"}}</label>
+ <label for="org_name">{{ctx.Locale.Tr "org.org_name_holder"}}</label>
<input id="org_name" name="org_name" value="" autocomplete="off" autofocus required>
</div>
<button class="ui red button delete-button" data-type="form" data-form="#delete-form">
- {{.locale.Tr "org.settings.confirm_delete_account"}}
+ {{ctx.Locale.Tr "org.settings.confirm_delete_account"}}
</button>
</form>
</div>
@@ -24,10 +24,10 @@
<div class="ui g-modal-confirm delete modal">
<div class="header">
{{svg "octicon-trash"}}
- {{.locale.Tr "org.settings.delete_org_title"}}
+ {{ctx.Locale.Tr "org.settings.delete_org_title"}}
</div>
<div class="content">
- <p>{{.locale.Tr "org.settings.delete_org_desc"}}</p>
+ <p>{{ctx.Locale.Tr "org.settings.delete_org_desc"}}</p>
</div>
{{template "base/modal_actions_confirm" .}}
</div>
diff --git a/templates/org/settings/hook_new.tmpl b/templates/org/settings/hook_new.tmpl
index ea477c9975..f89ee5f2b8 100644
--- a/templates/org/settings/hook_new.tmpl
+++ b/templates/org/settings/hook_new.tmpl
@@ -1,7 +1,7 @@
{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings new webhook")}}
<div class="org-setting-content">
- {{$CustomHeaderTitle := .locale.Tr "repo.settings.update_webhook"}}
- {{if .PageIsSettingsHooksNew}}{{$CustomHeaderTitle = .locale.Tr "repo.settings.add_webhook"}}{{end}}
+ {{$CustomHeaderTitle := ctx.Locale.Tr "repo.settings.update_webhook"}}
+ {{if .PageIsSettingsHooksNew}}{{$CustomHeaderTitle = ctx.Locale.Tr "repo.settings.add_webhook"}}{{end}}
{{template "webhook/new" (dict "ctxData" . "CustomHeaderTitle" $CustomHeaderTitle)}}
</div>
{{template "org/settings/layout_footer" .}}
diff --git a/templates/org/settings/labels.tmpl b/templates/org/settings/labels.tmpl
index b38481fea3..b12ea8d9f4 100644
--- a/templates/org/settings/labels.tmpl
+++ b/templates/org/settings/labels.tmpl
@@ -2,9 +2,9 @@
<div class="org-setting-content">
<div class="gt-df gt-ac">
<div class="gt-f1">
- {{$.locale.Tr "org.settings.labels_desc" | Str2html}}
+ {{ctx.Locale.Tr "org.settings.labels_desc" | Str2html}}
</div>
- <button class="ui small primary new-label button">{{.locale.Tr "repo.issues.new_label"}}</button>
+ <button class="ui small primary new-label button">{{ctx.Locale.Tr "repo.issues.new_label"}}</button>
</div>
<div class="divider"></div>
{{template "repo/issue/labels/label_new" .}}
diff --git a/templates/org/settings/navbar.tmpl b/templates/org/settings/navbar.tmpl
index e22d1b0f80..201ac3b9f2 100644
--- a/templates/org/settings/navbar.tmpl
+++ b/templates/org/settings/navbar.tmpl
@@ -1,45 +1,45 @@
<div class="four wide column">
<div class="ui fluid vertical menu">
- <div class="header item">{{.locale.Tr "org.settings"}}</div>
+ <div class="header item">{{ctx.Locale.Tr "org.settings"}}</div>
<a class="{{if .PageIsSettingsOptions}}active {{end}}item" href="{{.OrgLink}}/settings">
- {{.locale.Tr "org.settings.options"}}
+ {{ctx.Locale.Tr "org.settings.options"}}
</a>
{{if not DisableWebhooks}}
<a class="{{if .PageIsSettingsHooks}}active {{end}}item" href="{{.OrgLink}}/settings/hooks">
- {{.locale.Tr "repo.settings.hooks"}}
+ {{ctx.Locale.Tr "repo.settings.hooks"}}
</a>
{{end}}
<a class="{{if .PageIsOrgSettingsLabels}}active {{end}}item" href="{{.OrgLink}}/settings/labels">
- {{.locale.Tr "repo.labels"}}
+ {{ctx.Locale.Tr "repo.labels"}}
</a>
{{if .EnableOAuth2}}
<a class="{{if .PageIsSettingsApplications}}active {{end}}item" href="{{.OrgLink}}/settings/applications">
- {{.locale.Tr "settings.applications"}}
+ {{ctx.Locale.Tr "settings.applications"}}
</a>
{{end}}
{{if .EnablePackages}}
<a class="{{if .PageIsSettingsPackages}}active {{end}}item" href="{{.OrgLink}}/settings/packages">
- {{.locale.Tr "packages.title"}}
+ {{ctx.Locale.Tr "packages.title"}}
</a>
{{end}}
{{if .EnableActions}}
<details class="item toggleable-item" {{if or .PageIsSharedSettingsRunners .PageIsSharedSettingsSecrets .PageIsSharedSettingsVariables}}open{{end}}>
- <summary>{{.locale.Tr "actions.actions"}}</summary>
+ <summary>{{ctx.Locale.Tr "actions.actions"}}</summary>
<div class="menu">
<a class="{{if .PageIsSharedSettingsRunners}}active {{end}}item" href="{{.OrgLink}}/settings/actions/runners">
- {{.locale.Tr "actions.runners"}}
+ {{ctx.Locale.Tr "actions.runners"}}
</a>
<a class="{{if .PageIsSharedSettingsSecrets}}active {{end}}item" href="{{.OrgLink}}/settings/actions/secrets">
- {{.locale.Tr "secrets.secrets"}}
+ {{ctx.Locale.Tr "secrets.secrets"}}
</a>
<a class="{{if .PageIsSharedSettingsVariables}}active {{end}}item" href="{{.OrgLink}}/settings/actions/variables">
- {{.locale.Tr "actions.variables"}}
+ {{ctx.Locale.Tr "actions.variables"}}
</a>
</div>
</details>
{{end}}
<a class="{{if .PageIsSettingsDelete}}active {{end}}item" href="{{.OrgLink}}/settings/delete">
- {{.locale.Tr "org.settings.delete"}}
+ {{ctx.Locale.Tr "org.settings.delete"}}
</a>
</div>
</div>
diff --git a/templates/org/settings/options.tmpl b/templates/org/settings/options.tmpl
index 0b138094c3..bbd2fb0ece 100644
--- a/templates/org/settings/options.tmpl
+++ b/templates/org/settings/options.tmpl
@@ -1,69 +1,69 @@
{{template "org/settings/layout_head" (dict "ctxData" . "pageClass" "organization settings options")}}
<div class="org-setting-content">
<h4 class="ui top attached header">
- {{.locale.Tr "org.settings.options"}}
+ {{ctx.Locale.Tr "org.settings.options"}}
</h4>
<div class="ui attached segment">
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<div class="required field {{if .Err_Name}}error{{end}}">
- <label for="org_name">{{.locale.Tr "org.org_name_holder"}}
+ <label for="org_name">{{ctx.Locale.Tr "org.org_name_holder"}}
<span class="text red gt-hidden" id="org-name-change-prompt">
- <br>{{.locale.Tr "org.settings.change_orgname_prompt"}}<br>{{.locale.Tr "org.settings.change_orgname_redirect_prompt"}}
+ <br>{{ctx.Locale.Tr "org.settings.change_orgname_prompt"}}<br>{{.locale.Tr "org.settings.change_orgname_redirect_prompt"}}
</span>
</label>
<input id="org_name" name="name" value="{{.Org.Name}}" data-org-name="{{.Org.Name}}" autofocus required maxlength="40">
</div>
<div class="field {{if .Err_FullName}}error{{end}}">
- <label for="full_name">{{.locale.Tr "org.org_full_name_holder"}}</label>
+ <label for="full_name">{{ctx.Locale.Tr "org.org_full_name_holder"}}</label>
<input id="full_name" name="full_name" value="{{.Org.FullName}}" maxlength="100">
</div>
<div class="field {{if .Err_Email}}error{{end}}">
- <label for="email">{{.locale.Tr "org.settings.email"}}</label>
+ <label for="email">{{ctx.Locale.Tr "org.settings.email"}}</label>
<input id="email" name="email" type="email" value="{{.Org.Email}}" maxlength="255">
</div>
<div class="field {{if .Err_Description}}error{{end}}">
- <label for="description">{{$.locale.Tr "org.org_desc"}}</label>
+ <label for="description">{{ctx.Locale.Tr "org.org_desc"}}</label>
<textarea id="description" name="description" rows="2" maxlength="255">{{.Org.Description}}</textarea>
</div>
<div class="field {{if .Err_Website}}error{{end}}">
- <label for="website">{{.locale.Tr "org.settings.website"}}</label>
+ <label for="website">{{ctx.Locale.Tr "org.settings.website"}}</label>
<input id="website" name="website" type="url" value="{{.Org.Website}}" maxlength="255">
</div>
<div class="field">
- <label for="location">{{.locale.Tr "org.settings.location"}}</label>
+ <label for="location">{{ctx.Locale.Tr "org.settings.location"}}</label>
<input id="location" name="location" value="{{.Org.Location}}" maxlength="50">
</div>
<div class="divider"></div>
<div class="field" id="visibility_box">
- <label for="visibility">{{.locale.Tr "org.settings.visibility"}}</label>
+ <label for="visibility">{{ctx.Locale.Tr "org.settings.visibility"}}</label>
<div class="field">
<div class="ui radio checkbox">
<input class="enable-system-radio" name="visibility" type="radio" value="0" {{if eq .CurrentVisibility 0}}checked{{end}}>
- <label>{{.locale.Tr "org.settings.visibility.public"}}</label>
+ <label>{{ctx.Locale.Tr "org.settings.visibility.public"}}</label>
</div>
</div>
<div class="field">
<div class="ui radio checkbox">
<input class="enable-system-radio" name="visibility" type="radio" value="1" {{if eq .CurrentVisibility 1}}checked{{end}}>
- <label>{{.locale.Tr "org.settings.visibility.limited"}}</label>
+ <label>{{ctx.Locale.Tr "org.settings.visibility.limited"}}</label>
</div>
</div>
<div class="field">
<div class="ui radio checkbox">
<input class="enable-system-radio" name="visibility" type="radio" value="2" {{if eq .CurrentVisibility 2}}checked{{end}}>
- <label>{{.locale.Tr "org.settings.visibility.private"}}</label>
+ <label>{{ctx.Locale.Tr "org.settings.visibility.private"}}</label>
</div>
</div>
</div>
<div class="field" id="permission_box">
- <label>{{.locale.Tr "org.settings.permission"}}</label>
+ <label>{{ctx.Locale.Tr "org.settings.permission"}}</label>
<div class="field">
<div class="ui checkbox">
<input type="checkbox" name="repo_admin_change_team_access" {{if .RepoAdminChangeTeamAccess}}checked{{end}}>
- <label>{{.locale.Tr "org.settings.repoadminchangeteam"}}</label>
+ <label>{{ctx.Locale.Tr "org.settings.repoadminchangeteam"}}</label>
</div>
</div>
</div>
@@ -72,14 +72,14 @@
<div class="divider"></div>
<div class="inline field {{if .Err_MaxRepoCreation}}error{{end}}">
- <label for="max_repo_creation">{{.locale.Tr "admin.users.max_repo_creation"}}</label>
+ <label for="max_repo_creation">{{ctx.Locale.Tr "admin.users.max_repo_creation"}}</label>
<input id="max_repo_creation" name="max_repo_creation" type="number" min="-1" value="{{.Org.MaxRepoCreation}}">
- <p class="help">{{.locale.Tr "admin.users.max_repo_creation_desc"}}</p>
+ <p class="help">{{ctx.Locale.Tr "admin.users.max_repo_creation_desc"}}</p>
</div>
{{end}}
<div class="field">
- <button class="ui primary button">{{$.locale.Tr "org.settings.update_settings"}}</button>
+ <button class="ui primary button">{{ctx.Locale.Tr "org.settings.update_settings"}}</button>
</div>
</form>
@@ -88,13 +88,13 @@
<form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data">
{{.CsrfTokenHtml}}
<div class="inline field">
- <label for="avatar">{{.locale.Tr "settings.choose_new_avatar"}}</label>
+ <label for="avatar">{{ctx.Locale.Tr "settings.choose_new_avatar"}}</label>
<input name="avatar" type="file" accept="image/png,image/jpeg,image/gif,image/webp">
</div>
<div class="field">
- <button class="ui primary button">{{$.locale.Tr "settings.update_avatar"}}</button>
- <button class="ui red button link-action" data-url="{{.Link}}/avatar/delete">{{$.locale.Tr "settings.delete_current_avatar"}}</button>
+ <button class="ui primary button">{{ctx.Locale.Tr "settings.update_avatar"}}</button>
+ <button class="ui red button link-action" data-url="{{.Link}}/avatar/delete">{{ctx.Locale.Tr "settings.delete_current_avatar"}}</button>
</div>
</form>
</div>
diff --git a/templates/org/team/invite.tmpl b/templates/org/team/invite.tmpl
index 1b04c0cc2a..e003d14757 100644
--- a/templates/org/team/invite.tmpl
+++ b/templates/org/team/invite.tmpl
@@ -7,14 +7,14 @@
{{ctx.AvatarUtils.Avatar .Organization 140}}
</div>
<div class="content">
- <div class="header">{{.locale.Tr "org.teams.invite.title" .Team.Name .Organization.Name | Str2html}}</div>
- <div class="meta">{{.locale.Tr "org.teams.invite.by" .Inviter.Name}}</div>
- <div class="description">{{.locale.Tr "org.teams.invite.description"}}</div>
+ <div class="header">{{ctx.Locale.Tr "org.teams.invite.title" .Team.Name .Organization.Name | Str2html}}</div>
+ <div class="meta">{{ctx.Locale.Tr "org.teams.invite.by" .Inviter.Name}}</div>
+ <div class="description">{{ctx.Locale.Tr "org.teams.invite.description"}}</div>
</div>
<div class="extra content">
<form class="ui form" action="" method="post">
{{.CsrfTokenHtml}}
- <button class="fluid ui primary button">{{.locale.Tr "org.teams.join"}}</button>
+ <button class="fluid ui primary button">{{ctx.Locale.Tr "org.teams.join"}}</button>
</form>
</div>
</div>
diff --git a/templates/org/team/members.tmpl b/templates/org/team/members.tmpl
index 7c2fab4b80..da63d82967 100644
--- a/templates/org/team/members.tmpl
+++ b/templates/org/team/members.tmpl
@@ -12,12 +12,12 @@
<form class="ui form ignore-dirty gt-df gt-fw gt-gap-3" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/add" method="post">
{{.CsrfTokenHtml}}
<input type="hidden" name="uid" value="{{.SignedUser.ID}}">
- <div id="search-user-box" class="ui search gt-mr-3"{{if .IsEmailInviteEnabled}} data-allow-email="true" data-allow-email-description="{{.locale.Tr "org.teams.invite_team_member" $.Team.Name}}"{{end}}>
+ <div id="search-user-box" class="ui search gt-mr-3"{{if .IsEmailInviteEnabled}} data-allow-email="true" data-allow-email-description="{{ctx.Locale.Tr "org.teams.invite_team_member" $.Team.Name}}"{{end}}>
<div class="ui input">
- <input class="prompt" name="uname" placeholder="{{.locale.Tr "repo.settings.search_user_placeholder"}}" autocomplete="off" required>
+ <input class="prompt" name="uname" placeholder="{{ctx.Locale.Tr "repo.settings.search_user_placeholder"}}" autocomplete="off" required>
</div>
</div>
- <button class="ui primary button">{{.locale.Tr "org.teams.add_team_member"}}</button>
+ <button class="ui primary button">{{ctx.Locale.Tr "org.teams.add_team_member"}}</button>
</form>
</div>
{{end}}
@@ -39,20 +39,20 @@
<button class="ui red button delete-button" data-modal-id="remove-team-member"
data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/remove" data-datauid="{{.ID}}"
data-name="{{.DisplayName}}"
- data-data-team-name="{{$.Team.Name}}">{{$.locale.Tr "org.members.remove"}}</button>
+ data-data-team-name="{{$.Team.Name}}">{{ctx.Locale.Tr "org.members.remove"}}</button>
</form>
{{end}}
</div>
</div>
{{else}}
<div class="flex-item">
- <span class="text grey italic">{{$.locale.Tr "org.teams.members.none"}}</span>
+ <span class="text grey italic">{{ctx.Locale.Tr "org.teams.members.none"}}</span>
</div>
{{end}}
</div>
</div>
{{if and .Invites $.IsOrganizationOwner}}
- <h4 class="ui top attached header">{{$.locale.Tr "org.teams.invite_team_member.list"}}</h4>
+ <h4 class="ui top attached header">{{ctx.Locale.Tr "org.teams.invite_team_member.list"}}</h4>
<div class="ui attached segment">
<div class="flex-list">
{{range .Invites}}
@@ -64,7 +64,7 @@
<form action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/remove_invite" method="post">
{{$.CsrfTokenHtml}}
<input type="hidden" name="iid" value="{{.ID}}">
- <button class="ui red button">{{$.locale.Tr "org.members.remove"}}</button>
+ <button class="ui red button">{{ctx.Locale.Tr "org.members.remove"}}</button>
</form>
</div>
</div>
@@ -78,10 +78,10 @@
</div>
<div class="ui g-modal-confirm delete modal" id="remove-team-member">
<div class="header">
- {{$.locale.Tr "org.members.remove"}}
+ {{ctx.Locale.Tr "org.members.remove"}}
</div>
<div class="content">
- <p>{{$.locale.Tr "org.members.remove.detail" `<span class="name"></span>` `<span class="dataTeamName"></span>` | Safe}}</p>
+ <p>{{ctx.Locale.Tr "org.members.remove.detail" `<span class="name"></span>` `<span class="dataTeamName"></span>` | Safe}}</p>
</div>
{{template "base/modal_actions_confirm" .}}
</div>
diff --git a/templates/org/team/navbar.tmpl b/templates/org/team/navbar.tmpl
index 44fe5f1c21..8f2571e1f6 100644
--- a/templates/org/team/navbar.tmpl
+++ b/templates/org/team/navbar.tmpl
@@ -1,4 +1,4 @@
<div class="ui top attached tabular menu org-team-navbar">
- <a class="item{{if .PageIsOrgTeamMembers}} active{{end}}" href="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}">{{svg "octicon-person"}} <strong>{{.Team.NumMembers}}</strong>&nbsp; {{$.locale.Tr "org.lower_members"}}</a>
- <a class="item{{if .PageIsOrgTeamRepos}} active{{end}}" href="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/repositories">{{svg "octicon-repo"}} <strong>{{.Team.NumRepos}}</strong>&nbsp; {{$.locale.Tr "org.lower_repositories"}}</a>
+ <a class="item{{if .PageIsOrgTeamMembers}} active{{end}}" href="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}">{{svg "octicon-person"}} <strong>{{.Team.NumMembers}}</strong>&nbsp; {{ctx.Locale.Tr "org.lower_members"}}</a>
+ <a class="item{{if .PageIsOrgTeamRepos}} active{{end}}" href="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/repositories">{{svg "octicon-repo"}} <strong>{{.Team.NumRepos}}</strong>&nbsp; {{ctx.Locale.Tr "org.lower_repositories"}}</a>
</div>
diff --git a/templates/org/team/new.tmpl b/templates/org/team/new.tmpl
index 1d35564007..96f9571b1b 100644
--- a/templates/org/team/new.tmpl
+++ b/templates/org/team/new.tmpl
@@ -7,82 +7,82 @@
<form class="ui form" action="{{if .PageIsOrgTeamsNew}}{{.OrgLink}}/teams/new{{else}}{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/edit{{end}}" data-delete-url="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/delete" method="post">
{{.CsrfTokenHtml}}
<h3 class="ui top attached header">
- {{if .PageIsOrgTeamsNew}}{{.locale.Tr "org.create_new_team"}}{{else}}{{.locale.Tr "org.teams.settings"}}{{end}}
+ {{if .PageIsOrgTeamsNew}}{{ctx.Locale.Tr "org.create_new_team"}}{{else}}{{.locale.Tr "org.teams.settings"}}{{end}}
</h3>
<div class="ui attached segment">
{{template "base/alert" .}}
<div class="required field {{if .Err_TeamName}}error{{end}}">
- <label for="team_name">{{.locale.Tr "org.team_name"}}</label>
+ <label for="team_name">{{ctx.Locale.Tr "org.team_name"}}</label>
{{if eq .Team.LowerName "owners"}}
<input type="hidden" name="team_name" value="{{.Team.Name}}">
{{end}}
<input id="team_name" name="team_name" value="{{.Team.Name}}" required {{if eq .Team.LowerName "owners"}}disabled{{end}} autofocus>
- <span class="help">{{.locale.Tr "org.team_name_helper"}}</span>
+ <span class="help">{{ctx.Locale.Tr "org.team_name_helper"}}</span>
</div>
<div class="field {{if .Err_Description}}error{{end}}">
- <label for="description">{{.locale.Tr "org.team_desc"}}</label>
+ <label for="description">{{ctx.Locale.Tr "org.team_desc"}}</label>
<input id="description" name="description" value="{{.Team.Description}}">
- <span class="help">{{.locale.Tr "org.team_desc_helper"}}</span>
+ <span class="help">{{ctx.Locale.Tr "org.team_desc_helper"}}</span>
</div>
{{if not (eq .Team.LowerName "owners")}}
<div class="grouped field">
- <label>{{.locale.Tr "org.team_access_desc"}}</label>
+ <label>{{ctx.Locale.Tr "org.team_access_desc"}}</label>
<br>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" name="repo_access" value="specific" {{if not .Team.IncludesAllRepositories}}checked{{end}}>
- <label>{{.locale.Tr "org.teams.specific_repositories"}}</label>
- <span class="help">{{.locale.Tr "org.teams.specific_repositories_helper" | Str2html}}</span>
+ <label>{{ctx.Locale.Tr "org.teams.specific_repositories"}}</label>
+ <span class="help">{{ctx.Locale.Tr "org.teams.specific_repositories_helper" | Str2html}}</span>
</div>
</div>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" name="repo_access" value="all" {{if .Team.IncludesAllRepositories}}checked{{end}}>
- <label>{{.locale.Tr "org.teams.all_repositories"}}</label>
- <span class="help">{{.locale.Tr "org.teams.all_repositories_helper" | Str2html}}</span>
+ <label>{{ctx.Locale.Tr "org.teams.all_repositories"}}</label>
+ <span class="help">{{ctx.Locale.Tr "org.teams.all_repositories_helper" | Str2html}}</span>
</div>
</div>
<div class="field">
<div class="ui checkbox">
- <label for="can_create_org_repo">{{.locale.Tr "org.teams.can_create_org_repo"}}</label>
+ <label for="can_create_org_repo">{{ctx.Locale.Tr "org.teams.can_create_org_repo"}}</label>
<input id="can_create_org_repo" name="can_create_org_repo" type="checkbox" {{if .Team.CanCreateOrgRepo}}checked{{end}}>
- <span class="help">{{.locale.Tr "org.teams.can_create_org_repo_helper"}}</span>
+ <span class="help">{{ctx.Locale.Tr "org.teams.can_create_org_repo_helper"}}</span>
</div>
</div>
</div>
<div class="grouped field">
- <label>{{.locale.Tr "org.team_permission_desc"}}</label>
+ <label>{{ctx.Locale.Tr "org.team_permission_desc"}}</label>
<br>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" name="permission" value="read" {{if or .PageIsOrgTeamsNew (eq .Team.AccessMode 1) (eq .Team.AccessMode 2)}}checked{{end}}>
- <label>{{.locale.Tr "org.teams.general_access"}}</label>
- <span class="help">{{.locale.Tr "org.teams.general_access_helper"}}</span>
+ <label>{{ctx.Locale.Tr "org.teams.general_access"}}</label>
+ <span class="help">{{ctx.Locale.Tr "org.teams.general_access_helper"}}</span>
</div>
</div>
<div class="field">
<div class="ui radio checkbox">
<input type="radio" name="permission" value="admin" {{if eq .Team.AccessMode 3}}checked{{end}}>
- <label>{{.locale.Tr "org.teams.admin_access"}}</label>
- <span class="help">{{.locale.Tr "org.teams.admin_access_helper"}}</span>
+ <label>{{ctx.Locale.Tr "org.teams.admin_access"}}</label>
+ <span class="help">{{ctx.Locale.Tr "org.teams.admin_access_helper"}}</span>
</div>
</div>
</div>
<div class="divider"></div>
<div class="team-units required grouped field {{if eq .Team.AccessMode 3}}gt-hidden{{end}}">
- <label>{{.locale.Tr "org.team_unit_desc"}}</label>
+ <label>{{ctx.Locale.Tr "org.team_unit_desc"}}</label>
<table class="ui celled table">
<thead>
<tr>
- <th>{{.locale.Tr "units.unit"}}</th>
- <th class="center aligned">{{.locale.Tr "org.teams.none_access"}}
- <span class="gt-vm" data-tooltip-content="{{.locale.Tr "org.teams.none_access_helper"}}">{{svg "octicon-question" 16 "gt-ml-2"}}</span></th>
- <th class="center aligned">{{.locale.Tr "org.teams.read_access"}}
- <span class="gt-vm" data-tooltip-content="{{.locale.Tr "org.teams.read_access_helper"}}">{{svg "octicon-question" 16 "gt-ml-2"}}</span></th>
- <th class="center aligned">{{.locale.Tr "org.teams.write_access"}}
- <span class="gt-vm" data-tooltip-content="{{.locale.Tr "org.teams.write_access_helper"}}">{{svg "octicon-question" 16 "gt-ml-2"}}</span></th>
+ <th>{{ctx.Locale.Tr "units.unit"}}</th>
+ <th class="center aligned">{{ctx.Locale.Tr "org.teams.none_access"}}
+ <span class="gt-vm" data-tooltip-content="{{ctx.Locale.Tr "org.teams.none_access_helper"}}">{{svg "octicon-question" 16 "gt-ml-2"}}</span></th>
+ <th class="center aligned">{{ctx.Locale.Tr "org.teams.read_access"}}
+ <span class="gt-vm" data-tooltip-content="{{ctx.Locale.Tr "org.teams.read_access_helper"}}">{{svg "octicon-question" 16 "gt-ml-2"}}</span></th>
+ <th class="center aligned">{{ctx.Locale.Tr "org.teams.write_access"}}
+ <span class="gt-vm" data-tooltip-content="{{ctx.Locale.Tr "org.teams.write_access_helper"}}">{{svg "octicon-question" 16 "gt-ml-2"}}</span></th>
</tr>
</thead>
<tbody>
@@ -90,26 +90,26 @@
{{if ge $unit.MaxPerm 2}}
<tr>
<td>
- <div {{if $unit.Type.UnitGlobalDisabled}}class="field" data-tooltip-content="{{$.locale.Tr "repo.unit_disabled"}}"{{- else -}}class="field"{{end}}>
+ <div {{if $unit.Type.UnitGlobalDisabled}}class="field" data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{- else -}}class="field"{{end}}>
<div>
- <label>{{$.locale.Tr $unit.NameKey}}{{if $unit.Type.UnitGlobalDisabled}} {{$.locale.Tr "org.team_unit_disabled"}}{{end}}</label>
- <span class="help">{{$.locale.Tr $unit.DescKey}}</span>
+ <label>{{ctx.Locale.Tr $unit.NameKey}}{{if $unit.Type.UnitGlobalDisabled}} {{ctx.Locale.Tr "org.team_unit_disabled"}}{{end}}</label>
+ <span class="help">{{ctx.Locale.Tr $unit.DescKey}}</span>
</div>
</div>
</td>
<td class="center aligned">
<div class="ui radio checkbox">
- <input type="radio" name="unit_{{$unit.Type.Value}}" value="0"{{if or ($unit.Type.UnitGlobalDisabled) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 0)}} checked{{end}} title="{{$.locale.Tr "org.teams.none_access"}}">
+ <input type="radio" name="unit_{{$unit.Type.Value}}" value="0"{{if or ($unit.Type.UnitGlobalDisabled) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 0)}} checked{{end}} title="{{ctx.Locale.Tr "org.teams.none_access"}}">
</div>
</td>
<td class="center aligned">
<div class="ui radio checkbox">
- <input type="radio" name="unit_{{$unit.Type.Value}}" value="1"{{if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}} title="{{$.locale.Tr "org.teams.read_access"}}">
+ <input type="radio" name="unit_{{$unit.Type.Value}}" value="1"{{if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}} title="{{ctx.Locale.Tr "org.teams.read_access"}}">
</div>
</td>
<td class="center aligned">
<div class="ui radio checkbox">
- <input type="radio" name="unit_{{$unit.Type.Value}}" value="2"{{if (ge ($.Team.UnitAccessMode $.Context $unit.Type) 2)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}} title="{{$.locale.Tr "org.teams.write_access"}}">
+ <input type="radio" name="unit_{{$unit.Type.Value}}" value="2"{{if (ge ($.Team.UnitAccessMode $.Context $unit.Type) 2)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}} title="{{ctx.Locale.Tr "org.teams.write_access"}}">
</div>
</td>
</tr>
@@ -119,11 +119,11 @@
</table>
{{range $t, $unit := $.Units}}
{{if lt $unit.MaxPerm 2}}
- <div {{if $unit.Type.UnitGlobalDisabled}}class="field" data-tooltip-content="{{$.locale.Tr "repo.unit_disabled"}}"{{else}}class="field"{{end}}>
+ <div {{if $unit.Type.UnitGlobalDisabled}}class="field" data-tooltip-content="{{ctx.Locale.Tr "repo.unit_disabled"}}"{{else}}class="field"{{end}}>
<div class="ui checkbox">
<input type="checkbox" name="unit_{{$unit.Type.Value}}" value="1"{{if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}}>
- <label>{{$.locale.Tr $unit.NameKey}}{{if $unit.Type.UnitGlobalDisabled}} {{$.locale.Tr "org.team_unit_disabled"}}{{end}}</label>
- <span class="help">{{$.locale.Tr $unit.DescKey}}</span>
+ <label>{{ctx.Locale.Tr $unit.NameKey}}{{if $unit.Type.UnitGlobalDisabled}} {{ctx.Locale.Tr "org.team_unit_disabled"}}{{end}}</label>
+ <span class="help">{{ctx.Locale.Tr $unit.DescKey}}</span>
</div>
</div>
{{end}}
@@ -133,11 +133,11 @@
<div class="field">
{{if .PageIsOrgTeamsNew}}
- <button class="ui primary button">{{.locale.Tr "org.create_team"}}</button>
+ <button class="ui primary button">{{ctx.Locale.Tr "org.create_team"}}</button>
{{else}}
- <button class="ui primary button">{{.locale.Tr "org.teams.update_settings"}}</button>
+ <button class="ui primary button">{{ctx.Locale.Tr "org.teams.update_settings"}}</button>
{{if not (eq .Team.LowerName "owners")}}
- <button class="ui red button delete-button" data-url="{{.OrgLink}}/teams/{{.Team.Name | PathEscape}}/delete">{{.locale.Tr "org.teams.delete_team"}}</button>
+ <button class="ui red button delete-button" data-url="{{.OrgLink}}/teams/{{.Team.Name | PathEscape}}/delete">{{ctx.Locale.Tr "org.teams.delete_team"}}</button>
{{end}}
{{end}}
</div>
@@ -151,10 +151,10 @@
<div class="ui g-modal-confirm delete modal">
<div class="header">
{{svg "octicon-trash"}}
- {{.locale.Tr "org.teams.delete_team_title"}}
+ {{ctx.Locale.Tr "org.teams.delete_team_title"}}
</div>
<div class="content">
- <p>{{.locale.Tr "org.teams.delete_team_desc"}}</p>
+ <p>{{ctx.Locale.Tr "org.teams.delete_team_desc"}}</p>
</div>
{{template "base/modal_actions_confirm" .}}
</div>
diff --git a/templates/org/team/repositories.tmpl b/templates/org/team/repositories.tmpl
index 032a0f496a..e419de4b12 100644
--- a/templates/org/team/repositories.tmpl
+++ b/templates/org/team/repositories.tmpl
@@ -14,14 +14,14 @@
{{.CsrfTokenHtml}}
<div id="search-repo-box" data-uid="{{.Org.ID}}" class="ui search">
<div class="ui input">
- <input class="prompt" name="repo_name" placeholder="{{.locale.Tr "org.teams.search_repo_placeholder"}}" autocomplete="off" required>
+ <input class="prompt" name="repo_name" placeholder="{{ctx.Locale.Tr "org.teams.search_repo_placeholder"}}" autocomplete="off" required>
</div>
</div>
- <button class="ui primary button gt-ml-3">{{.locale.Tr "add"}}</button>
+ <button class="ui primary button gt-ml-3">{{ctx.Locale.Tr "add"}}</button>
</form>
<div class="gt-dib">
- <button class="ui primary button link-action" data-modal-confirm="{{.locale.Tr "org.teams.add_all_repos_desc"}}" data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/addall">{{.locale.Tr "add_all"}}</button>
- <button class="ui red button link-action" data-modal-confirm="{{.locale.Tr "org.teams.remove_all_repos_desc"}}" data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/removeall">{{.locale.Tr "remove_all"}}</button>
+ <button class="ui primary button link-action" data-modal-confirm="{{ctx.Locale.Tr "org.teams.add_all_repos_desc"}}" data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/addall">{{.locale.Tr "add_all"}}</button>
+ <button class="ui red button link-action" data-modal-confirm="{{ctx.Locale.Tr "org.teams.remove_all_repos_desc"}}" data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/removeall">{{.locale.Tr "remove_all"}}</button>
</div>
</div>
{{end}}
@@ -41,14 +41,14 @@
{{if $canAddRemove}}
<form method="post" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/remove">
{{$.CsrfTokenHtml}}
- <button type="submit" class="ui red small button" name="repoid" value="{{.ID}}">{{$.locale.Tr "remove"}}</button>
+ <button type="submit" class="ui red small button" name="repoid" value="{{.ID}}">{{ctx.Locale.Tr "remove"}}</button>
</form>
{{end}}
</div>
</div>
{{else}}
<div class="flex-item">
- <span class="text grey italic">{{$.locale.Tr "org.teams.repos.none"}}</span>
+ <span class="text grey italic">{{ctx.Locale.Tr "org.teams.repos.none"}}</span>
</div>
{{end}}
</div>
diff --git a/templates/org/team/sidebar.tmpl b/templates/org/team/sidebar.tmpl
index 260a8ba803..5e89fac012 100644
--- a/templates/org/team/sidebar.tmpl
+++ b/templates/org/team/sidebar.tmpl
@@ -6,13 +6,13 @@
<form>
<button class="ui red tiny button delete-button" data-modal-id="leave-team-sidebar"
data-url="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/action/leave" data-datauid="{{$.SignedUser.ID}}"
- data-name="{{.Team.Name}}">{{$.locale.Tr "org.teams.leave"}}</button>
+ data-name="{{.Team.Name}}">{{ctx.Locale.Tr "org.teams.leave"}}</button>
</form>
{{else if .IsOrganizationOwner}}
<form method="post" action="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/action/join">
{{$.CsrfTokenHtml}}
<input type="hidden" name="page" value="team">
- <button type="submit" class="ui primary tiny button" name="uid" value="{{$.SignedUser.ID}}">{{$.locale.Tr "org.teams.join"}}</button>
+ <button type="submit" class="ui primary tiny button" name="uid" value="{{$.SignedUser.ID}}">{{ctx.Locale.Tr "org.teams.join"}}</button>
</form>
{{end}}
</div>
@@ -22,51 +22,51 @@
{{if .Team.Description}}
{{.Team.Description}}
{{else}}
- <span class="text grey italic">{{.locale.Tr "org.teams.no_desc"}}</span>
+ <span class="text grey italic">{{ctx.Locale.Tr "org.teams.no_desc"}}</span>
{{end}}
</div>
{{if eq .Team.LowerName "owners"}}
<div class="item">
- {{.locale.Tr "org.teams.owners_permission_desc" | Str2html}}
+ {{ctx.Locale.Tr "org.teams.owners_permission_desc" | Str2html}}
</div>
{{else}}
<div class="item">
- <h3>{{.locale.Tr "org.team_access_desc"}}</h3>
+ <h3>{{ctx.Locale.Tr "org.team_access_desc"}}</h3>
<ul>
{{if .Team.IncludesAllRepositories}}
- <li>{{.locale.Tr "org.teams.all_repositories" | Str2html}}</li>
+ <li>{{ctx.Locale.Tr "org.teams.all_repositories" | Str2html}}</li>
{{else}}
- <li>{{.locale.Tr "org.teams.specific_repositories" | Str2html}}</li>
+ <li>{{ctx.Locale.Tr "org.teams.specific_repositories" | Str2html}}</li>
{{end}}
{{if .Team.CanCreateOrgRepo}}
- <li>{{.locale.Tr "org.teams.can_create_org_repo"}}</li>
+ <li>{{ctx.Locale.Tr "org.teams.can_create_org_repo"}}</li>
{{end}}
</ul>
{{if (eq .Team.AccessMode 2)}}
- <h3>{{.locale.Tr "org.settings.permission"}}</h3>
- {{.locale.Tr "org.teams.write_permission_desc" | Str2html}}
+ <h3>{{ctx.Locale.Tr "org.settings.permission"}}</h3>
+ {{ctx.Locale.Tr "org.teams.write_permission_desc" | Str2html}}
{{else if (eq .Team.AccessMode 3)}}
- <h3>{{.locale.Tr "org.settings.permission"}}</h3>
- {{.locale.Tr "org.teams.admin_permission_desc" | Str2html}}
+ <h3>{{ctx.Locale.Tr "org.settings.permission"}}</h3>
+ {{ctx.Locale.Tr "org.teams.admin_permission_desc" | Str2html}}
{{else}}
<table class="ui table">
<thead>
<tr>
- <th>{{.locale.Tr "units.unit"}}</th>
- <th>{{.locale.Tr "org.team_permission_desc"}}</th>
+ <th>{{ctx.Locale.Tr "units.unit"}}</th>
+ <th>{{ctx.Locale.Tr "org.team_permission_desc"}}</th>
</tr>
</thead>
<tbody>
{{range $t, $unit := $.Units}}
{{if (not $unit.Type.UnitGlobalDisabled)}}
<tr>
- <td><strong>{{$.locale.Tr $unit.NameKey}}</strong></td>
+ <td><strong>{{ctx.Locale.Tr $unit.NameKey}}</strong></td>
<td>{{if eq ($.Team.UnitAccessMode $.Context $unit.Type) 0 -}}
- {{$.locale.Tr "org.teams.none_access"}}
+ {{ctx.Locale.Tr "org.teams.none_access"}}
{{- else if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $.Context $unit.Type) 1) -}}
- {{$.locale.Tr "org.teams.read_access"}}
+ {{ctx.Locale.Tr "org.teams.read_access"}}
{{- else if eq ($.Team.UnitAccessMode $.Context $unit.Type) 2 -}}
- {{$.locale.Tr "org.teams.write_access"}}
+ {{ctx.Locale.Tr "org.teams.write_access"}}
{{- end}}</td>
</tr>
{{end}}
@@ -79,16 +79,16 @@
</div>
{{if .IsOrganizationOwner}}
<div class="ui bottom attached segment">
- <a class="ui teal small button" href="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/edit">{{svg "octicon-gear"}} {{$.locale.Tr "org.teams.settings"}}</a>
+ <a class="ui teal small button" href="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/edit">{{svg "octicon-gear"}} {{ctx.Locale.Tr "org.teams.settings"}}</a>
</div>
{{end}}
</div>
<div class="ui g-modal-confirm delete modal" id="leave-team-sidebar">
<div class="header">
- {{$.locale.Tr "org.teams.leave"}}
+ {{ctx.Locale.Tr "org.teams.leave"}}
</div>
<div class="content">
- <p>{{$.locale.Tr "org.teams.leave.detail" `<span class="name"></span>` | Safe}}</p>
+ <p>{{ctx.Locale.Tr "org.teams.leave.detail" `<span class="name"></span>` | Safe}}</p>
</div>
{{template "base/modal_actions_confirm" .}}
</div>
diff --git a/templates/org/team/teams.tmpl b/templates/org/team/teams.tmpl
index 0d7cc06ff9..84a15e7650 100644
--- a/templates/org/team/teams.tmpl
+++ b/templates/org/team/teams.tmpl
@@ -5,7 +5,7 @@
{{template "base/alert" .}}
{{if .IsOrganizationOwner}}
<div class="text right">
- <a class="ui primary button" href="{{.OrgLink}}/teams/new">{{svg "octicon-plus"}} {{.locale.Tr "org.create_new_team"}}</a>
+ <a class="ui primary button" href="{{.OrgLink}}/teams/new">{{svg "octicon-plus"}} {{ctx.Locale.Tr "org.create_new_team"}}</a>
</div>
<div class="divider"></div>
{{end}}
@@ -20,12 +20,12 @@
<form>
<button class="ui red tiny button delete-button" data-modal-id="leave-team"
data-url="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/action/leave" data-datauid="{{$.SignedUser.ID}}"
- data-name="{{.Name}}">{{$.locale.Tr "org.teams.leave"}}</button>
+ data-name="{{.Name}}">{{ctx.Locale.Tr "org.teams.leave"}}</button>
</form>
{{else if $.IsOrganizationOwner}}
<form method="post" action="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/action/join">
{{$.CsrfTokenHtml}}
- <button type="submit" class="ui primary small button" name="uid" value="{{$.SignedUser.ID}}">{{$.locale.Tr "org.teams.join"}}</button>
+ <button type="submit" class="ui primary small button" name="uid" value="{{$.SignedUser.ID}}">{{ctx.Locale.Tr "org.teams.join"}}</button>
</form>
{{end}}
</div>
@@ -36,7 +36,7 @@
{{end}}
</div>
<div class="ui bottom attached header">
- <p class="team-meta">{{.NumMembers}} {{$.locale.Tr "org.lower_members"}} · {{.NumRepos}} {{$.locale.Tr "org.lower_repositories"}}</p>
+ <p class="team-meta">{{.NumMembers}} {{ctx.Locale.Tr "org.lower_members"}} · {{.NumRepos}} {{ctx.Locale.Tr "org.lower_repositories"}}</p>
</div>
</div>
{{end}}
@@ -45,10 +45,10 @@
</div>
<div class="ui g-modal-confirm delete modal" id="leave-team">
<div class="header">
- {{$.locale.Tr "org.teams.leave"}}
+ {{ctx.Locale.Tr "org.teams.leave"}}
</div>
<div class="content">
- <p>{{$.locale.Tr "org.teams.leave.detail" `<span class="name"></span>` | Safe}}</p>
+ <p>{{ctx.Locale.Tr "org.teams.leave.detail" `<span class="name"></span>` | Safe}}</p>
</div>
{{template "base/modal_actions_confirm" .}}
</div>