aboutsummaryrefslogtreecommitdiffstats
path: root/templates/org
diff options
context:
space:
mode:
authorGusted <williamzijl7@hotmail.com>2022-06-27 22:58:46 +0200
committerGitHub <noreply@github.com>2022-06-27 15:58:46 -0500
commitd55a0b723809f5b94acd948b924c8518014445e0 (patch)
tree0ef9ea54f30769ca1d16ce20e551bd7a078f7f5e /templates/org
parentb551bc2a089d3310dde5706d1b9702f112fe3ea0 (diff)
downloadgitea-d55a0b723809f5b94acd948b924c8518014445e0.tar.gz
gitea-d55a0b723809f5b94acd948b924c8518014445e0.zip
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
Diffstat (limited to 'templates/org')
-rw-r--r--templates/org/create.tmpl22
-rw-r--r--templates/org/header.tmpl4
-rw-r--r--templates/org/home.tmpl20
-rw-r--r--templates/org/member/members.tmpl28
-rw-r--r--templates/org/menu.tmpl10
-rw-r--r--templates/org/settings/delete.tmpl12
-rw-r--r--templates/org/settings/hook_new.tmpl2
-rw-r--r--templates/org/settings/labels.tmpl4
-rw-r--r--templates/org/settings/navbar.tmpl10
-rw-r--r--templates/org/settings/options.tmpl40
-rw-r--r--templates/org/team/members.tmpl12
-rw-r--r--templates/org/team/navbar.tmpl4
-rw-r--r--templates/org/team/new.tmpl74
-rw-r--r--templates/org/team/repositories.tmpl20
-rw-r--r--templates/org/team/sidebar.tmpl42
-rw-r--r--templates/org/team/teams.tmpl12
16 files changed, 158 insertions, 158 deletions
diff --git a/templates/org/create.tmpl b/templates/org/create.tmpl
index 24a641a73a..999f5246a3 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">
- {{.i18n.Tr "new_org"}}
+ {{.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">{{.i18n.Tr "org.org_name_holder"}}</label>
+ <label for="org_name">{{.locale.Tr "org.org_name_holder"}}</label>
<input id="org_name" name="org_name" value="{{.org_name}}" autofocus required>
- <span class="help">{{.i18n.Tr "org.org_name_helper"}}</span>
+ <span class="help">{{.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">{{.i18n.Tr "org.settings.visibility"}}</label></span>
+ <span class="inline required field"><label for="visibility">{{.locale.Tr "org.settings.visibility"}}</label></span>
<div class="inline-grouped-list">
<div class="ui radio checkbox">
<input class="hidden enable-system-radio" tabindex="0" name="visibility" type="radio" value="0" {{if .DefaultOrgVisibilityMode.IsPublic}}checked{{end}}/>
- <label>{{.i18n.Tr "org.settings.visibility.public"}}</label>
+ <label>{{.locale.Tr "org.settings.visibility.public"}}</label>
</div>
<div class="ui radio checkbox">
<input class="hidden enable-system-radio" tabindex="0" name="visibility" type="radio" value="1" {{if .DefaultOrgVisibilityMode.IsLimited}}checked{{end}}/>
- <label>{{.i18n.Tr "org.settings.visibility.limited"}}</label>
+ <label>{{.locale.Tr "org.settings.visibility.limited"}}</label>
</div>
<div class="ui radio checkbox">
<input class="hidden enable-system-radio" tabindex="0" name="visibility" type="radio" value="2" {{if .DefaultOrgVisibilityMode.IsPrivate}}checked{{end}}/>
- <label>{{.i18n.Tr "org.settings.visibility.private"}}</label>
+ <label>{{.locale.Tr "org.settings.visibility.private"}}</label>
</div>
</div>
</div>
<div class="inline field" id="permission_box">
- <label>{{.i18n.Tr "org.settings.permission"}}</label>
+ <label>{{.locale.Tr "org.settings.permission"}}</label>
<div class="inline-grouped-list">
<div class="ui checkbox">
<input class="hidden" type="checkbox" name="repo_admin_change_team_access" checked/>
- <label>{{.i18n.Tr "org.settings.repoadminchangeteam"}}</label>
+ <label>{{.locale.Tr "org.settings.repoadminchangeteam"}}</label>
</div>
</div>
</div>
@@ -46,9 +46,9 @@
<div class="inline field">
<label></label>
<button class="ui green button">
- {{.i18n.Tr "org.create_org"}}
+ {{.locale.Tr "org.create_org"}}
</button>
- <a class="ui button" href="{{AppSubUrl}}/">{{.i18n.Tr "cancel"}}</a>
+ <a class="ui button" href="{{AppSubUrl}}/">{{.locale.Tr "cancel"}}</a>
</div>
</div>
</form>
diff --git a/templates/org/header.tmpl b/templates/org/header.tmpl
index 4415e0a1f5..582a0c8fb3 100644
--- a/templates/org/header.tmpl
+++ b/templates/org/header.tmpl
@@ -6,8 +6,8 @@
{{avatar . 100}}
<span class="text thin grey"><a href="{{.HomeLink}}">{{.DisplayName}}</a></span>
<span class="org-visibility">
- {{if .Visibility.IsLimited}}<div class="ui medium orange horizontal label">{{$.i18n.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
- {{if .Visibility.IsPrivate}}<div class="ui medium red horizontal label">{{$.i18n.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
+ {{if .Visibility.IsLimited}}<div class="ui medium orange horizontal label">{{$.locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
+ {{if .Visibility.IsPrivate}}<div class="ui medium red horizontal label">{{$.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 a49029d4d5..06a9a36803 100644
--- a/templates/org/home.tmpl
+++ b/templates/org/home.tmpl
@@ -5,10 +5,10 @@
<div id="org-info">
<div class="ui header">
{{.Org.DisplayName}}
- <a href="{{.Org.HomeLink}}.rss"><i class="ui grey icon tooltip ml-3" data-content="{{.i18n.Tr "rss_feed"}}" data-position="top center">{{svg "octicon-rss" 36}}</i></a>
+ <a href="{{.Org.HomeLink}}.rss"><i class="ui grey icon tooltip ml-3" data-content="{{.locale.Tr "rss_feed"}}" data-position="top center">{{svg "octicon-rss" 36}}</i></a>
<span class="org-visibility">
- {{if .Org.Visibility.IsLimited}}<div class="ui large basic horizontal label">{{.i18n.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
- {{if .Org.Visibility.IsPrivate}}<div class="ui large basic horizontal label">{{.i18n.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
+ {{if .Org.Visibility.IsLimited}}<div class="ui large basic horizontal label">{{.locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
+ {{if .Org.Visibility.IsPrivate}}<div class="ui large basic horizontal label">{{.locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
</span>
</div>
{{if $.RenderedDescription}}<p class="render-content markup">{{$.RenderedDescription|Str2html}}</p>{{end}}
@@ -32,15 +32,15 @@
<div class="ui five wide column">
{{if .CanCreateOrgRepo}}
<div class="center aligned">
- <a class="ui green button" href="{{AppSubUrl}}/repo/create?org={{.Org.ID}}">{{.i18n.Tr "new_repo"}}</a>
+ <a class="ui green button" href="{{AppSubUrl}}/repo/create?org={{.Org.ID}}">{{.locale.Tr "new_repo"}}</a>
{{if not .DisableNewPullMirrors}}
- <a class="ui green button" href="{{AppSubUrl}}/repo/migrate?org={{.Org.ID}}&mirror=1">{{.i18n.Tr "new_migrate"}}</a>
+ <a class="ui green button" href="{{AppSubUrl}}/repo/migrate?org={{.Org.ID}}&mirror=1">{{.locale.Tr "new_migrate"}}</a>
{{end}}
</div>
<div class="ui divider"></div>
{{end}}
<h4 class="ui top attached header df">
- <strong class="f1">{{.i18n.Tr "org.people"}}</strong>
+ <strong class="f1">{{.locale.Tr "org.people"}}</strong>
{{if .IsOrganizationMember}}
<div class="ui">
<a class="text grey dif ac" href="{{.OrgLink}}/members"><span>{{.Org.NumMembers}}</span> {{svg "octicon-chevron-right"}}</a>
@@ -60,7 +60,7 @@
{{if .IsOrganizationMember}}
<div class="ui top attached header df">
- <strong class="f1">{{.i18n.Tr "org.teams"}}</strong>
+ <strong class="f1">{{.locale.Tr "org.teams"}}</strong>
<div class="ui">
<a class="text grey dif ac" href="{{.OrgLink}}/teams"><span>{{.Org.NumTeams}}</span> {{svg "octicon-chevron-right"}}</a>
</div>
@@ -70,15 +70,15 @@
<div class="item">
<a href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}"><strong class="team-name">{{.Name}}</strong></a>
<p class="text grey">
- <a href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}"><strong>{{.NumMembers}}</strong> {{$.i18n.Tr "org.lower_members"}}</a> ·
- <a href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/repositories"><strong>{{.NumRepos}}</strong> {{$.i18n.Tr "org.lower_repositories"}}</a>
+ <a href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}"><strong>{{.NumMembers}}</strong> {{$.locale.Tr "org.lower_members"}}</a> ·
+ <a href="{{$.OrgLink}}/teams/{{.LowerName | PathEscape}}/repositories"><strong>{{.NumRepos}}</strong> {{$.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">{{.i18n.Tr "org.create_new_team"}}</a>
+ <a class="ui primary small button" href="{{.OrgLink}}/teams/new">{{.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 49d8f52f87..081a7f0a12 100644
--- a/templates/org/member/members.tmpl
+++ b/templates/org/member/members.tmpl
@@ -16,30 +16,30 @@
</div>
<div class="ui four wide column center">
<div class="meta">
- {{$.i18n.Tr "org.members.membership_visibility"}}
+ {{$.locale.Tr "org.members.membership_visibility"}}
</div>
<div class="meta">
{{ $isPublic := index $.MembersIsPublicMember .ID}}
{{if $isPublic}}
- <strong>{{$.i18n.Tr "org.members.public"}}</strong>
- {{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}(<a class="link-action" href data-url="{{$.OrgLink}}/members/action/private?uid={{.ID}}">{{$.i18n.Tr "org.members.public_helper"}}</a>){{end}}
+ <strong>{{$.locale.Tr "org.members.public"}}</strong>
+ {{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}(<a class="link-action" href data-url="{{$.OrgLink}}/members/action/private?uid={{.ID}}">{{$.locale.Tr "org.members.public_helper"}}</a>){{end}}
{{else}}
- <strong>{{$.i18n.Tr "org.members.private"}}</strong>
- {{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}(<a class="link-action" href data-url="{{$.OrgLink}}/members/action/public?uid={{.ID}}">{{$.i18n.Tr "org.members.private_helper"}}</a>){{end}}
+ <strong>{{$.locale.Tr "org.members.private"}}</strong>
+ {{if or (eq $.SignedUser.ID .ID) $.IsOrganizationOwner}}(<a class="link-action" href data-url="{{$.OrgLink}}/members/action/public?uid={{.ID}}">{{$.locale.Tr "org.members.private_helper"}}</a>){{end}}
{{end}}
</div>
</div>
<div class="ui three wide column center">
<div class="meta">
- {{$.i18n.Tr "org.members.member_role"}}
+ {{$.locale.Tr "org.members.member_role"}}
</div>
<div class="meta">
- <strong>{{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock"}} {{$.i18n.Tr "org.members.owner"}}{{else}}{{$.i18n.Tr "org.members.member"}}{{end}}</strong>
+ <strong>{{if index $.MembersIsUserOrgOwner .ID}}{{svg "octicon-shield-lock"}} {{$.locale.Tr "org.members.owner"}}{{else}}{{$.locale.Tr "org.members.member"}}{{end}}</strong>
</div>
</div>
<div class="ui two wide column center">
<div class="meta">
- {{$.i18n.Tr "admin.users.2fa"}}
+ {{$.locale.Tr "admin.users.2fa"}}
</div>
<div class="meta">
<strong>
@@ -58,14 +58,14 @@
<button class="ui red small 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}}">{{$.i18n.Tr "org.members.leave"}}</button>
+ data-data-organization-name="{{$.Org.DisplayName}}">{{$.locale.Tr "org.members.leave"}}</button>
</form>
{{else if $.IsOrganizationOwner}}
<form>
<button class="ui red small 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}}">{{$.i18n.Tr "org.members.remove"}}</button>
+ data-data-organization-name="{{$.Org.DisplayName}}">{{$.locale.Tr "org.members.remove"}}</button>
</form>
{{end}}
</div>
@@ -80,20 +80,20 @@
<div class="ui small basic delete modal" id="leave-organization">
<div class="ui icon header">
{{svg "octicon-x" 16 "close inside"}}
- {{$.i18n.Tr "org.members.leave"}}
+ {{$.locale.Tr "org.members.leave"}}
</div>
<div class="content">
- <p>{{$.i18n.Tr "org.members.leave.detail" `<span class="dataOrganizationName"></span>` | Safe}}</p>
+ <p>{{$.locale.Tr "org.members.leave.detail" `<span class="dataOrganizationName"></span>` | Safe}}</p>
</div>
{{template "base/delete_modal_actions" .}}
</div>
<div class="ui small basic delete modal" id="remove-organization-member">
<div class="ui icon header">
{{svg "octicon-x" 16 "close inside"}}
- {{$.i18n.Tr "org.members.remove"}}
+ {{$.locale.Tr "org.members.remove"}}
</div>
<div class="content">
- <p>{{$.i18n.Tr "org.members.remove.detail" `<span class="name"></span>` `<span class="dataOrganizationName"></span>` | Safe}}</p>
+ <p>{{$.locale.Tr "org.members.remove.detail" `<span class="name"></span>` `<span class="dataOrganizationName"></span>` | Safe}}</p>
</div>
{{template "base/delete_modal_actions" .}}
</div>
diff --git a/templates/org/menu.tmpl b/templates/org/menu.tmpl
index ff1b8cadc5..5b22e303af 100644
--- a/templates/org/menu.tmpl
+++ b/templates/org/menu.tmpl
@@ -1,22 +1,22 @@
<div class="ui tabs container">
<div class="ui secondary stackable pointing menu">
<a class="{{if .PageIsViewRepositories}}active{{end}} item" href="{{$.Org.HomeLink}}">
- {{svg "octicon-repo"}} {{.i18n.Tr "user.repositories"}}
+ {{svg "octicon-repo"}} {{.locale.Tr "user.repositories"}}
</a>
{{if .IsPackageEnabled}}
<a class="item" href="{{$.Org.HomeLink}}/-/packages">
- {{svg "octicon-package"}} {{.i18n.Tr "packages.title"}}
+ {{svg "octicon-package"}} {{.locale.Tr "packages.title"}}
</a>
{{end}}
{{if .IsOrganizationMember}}
<a class="{{if $.PageIsOrgMembers}}active{{end}} item" href="{{$.OrgLink}}/members">
- {{svg "octicon-organization"}}&nbsp;{{$.i18n.Tr "org.people"}}
+ {{svg "octicon-organization"}}&nbsp;{{$.locale.Tr "org.people"}}
{{if .NumMembers}}
<div class="ui primary label">{{.NumMembers}}</div>
{{end}}
</a>
<a class="{{if $.PageIsOrgTeams}}active{{end}} item" href="{{$.OrgLink}}/teams">
- {{svg "octicon-people"}}&nbsp;{{$.i18n.Tr "org.teams"}}
+ {{svg "octicon-people"}}&nbsp;{{$.locale.Tr "org.teams"}}
{{if .NumTeams}}
<div class="ui black label">{{.NumTeams}}</div>
{{end}}
@@ -26,7 +26,7 @@
{{if .IsOrganizationOwner}}
<div class="right menu">
<a class="{{if .PageIsOrgSettings}}active{{end}} item" href="{{.OrgLink}}/settings">
- {{svg "octicon-tools"}} {{.i18n.Tr "repo.settings"}}
+ {{svg "octicon-tools"}} {{.locale.Tr "repo.settings"}}
</a>
</div>
{{end}}
diff --git a/templates/org/settings/delete.tmpl b/templates/org/settings/delete.tmpl
index 1cf24639df..8a38dcafe3 100644
--- a/templates/org/settings/delete.tmpl
+++ b/templates/org/settings/delete.tmpl
@@ -7,20 +7,20 @@
<div class="twelve wide column content">
{{template "base/alert" .}}
<h4 class="ui top attached error header">
- {{.i18n.Tr "org.settings.delete_account"}}
+ {{.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"}} {{.i18n.Tr "org.settings.delete_prompt" | Str2html}}</p>
+ <p class="text left">{{svg "octicon-alert"}} {{.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">{{.i18n.Tr "org.org_name_holder"}}</label>
+ <label for="org_name">{{.locale.Tr "org.org_name_holder"}}</label>
<input id="org_name" name="org_name" value="" autocomplete="off" autofocus required>
</div>
<div class="ui red button delete-button" data-type="form" data-form="#delete-form">
- {{.i18n.Tr "org.settings.confirm_delete_account"}}
+ {{.locale.Tr "org.settings.confirm_delete_account"}}
</div>
</form>
</div>
@@ -32,10 +32,10 @@
<div class="ui small basic delete modal">
<div class="ui icon header">
{{svg "octicon-trash"}}
- {{.i18n.Tr "org.settings.delete_org_title"}}
+ {{.locale.Tr "org.settings.delete_org_title"}}
</div>
<div class="content">
- <p>{{.i18n.Tr "org.settings.delete_org_desc"}}</p>
+ <p>{{.locale.Tr "org.settings.delete_org_desc"}}</p>
</div>
{{template "base/delete_modal_actions" .}}
</div>
diff --git a/templates/org/settings/hook_new.tmpl b/templates/org/settings/hook_new.tmpl
index 5e8ebb51e9..7308cafa20 100644
--- a/templates/org/settings/hook_new.tmpl
+++ b/templates/org/settings/hook_new.tmpl
@@ -7,7 +7,7 @@
<div class="twelve wide column content">
{{template "base/alert" .}}
<h4 class="ui top attached header">
- {{if .PageIsSettingsHooksNew}}{{.i18n.Tr "repo.settings.add_webhook"}}{{else}}{{.i18n.Tr "repo.settings.update_webhook"}}{{end}}
+ {{if .PageIsSettingsHooksNew}}{{.locale.Tr "repo.settings.add_webhook"}}{{else}}{{.locale.Tr "repo.settings.update_webhook"}}{{end}}
<div class="ui right">
{{if eq .HookType "gitea"}}
<img width="26" height="26" src="{{AssetUrlPrefix}}/img/gitea.svg">
diff --git a/templates/org/settings/labels.tmpl b/templates/org/settings/labels.tmpl
index 482d1b17d0..a6b5405a42 100644
--- a/templates/org/settings/labels.tmpl
+++ b/templates/org/settings/labels.tmpl
@@ -7,11 +7,11 @@
<div class="ui twelve wide column content">
<div class="ui grid">
<div class="left floated twelve wide column">
- {{$.i18n.Tr "org.settings.labels_desc" | Str2html}}
+ {{$.locale.Tr "org.settings.labels_desc" | Str2html}}
</div>
<div class="right floated three wide column">
<div class="ui right">
- <div class="ui green new-label button">{{.i18n.Tr "repo.issues.new_label"}}</div>
+ <div class="ui green new-label button">{{.locale.Tr "repo.issues.new_label"}}</div>
</div>
</div>
</div>
diff --git a/templates/org/settings/navbar.tmpl b/templates/org/settings/navbar.tmpl
index b70e6b1d09..0c8423cd75 100644
--- a/templates/org/settings/navbar.tmpl
+++ b/templates/org/settings/navbar.tmpl
@@ -1,19 +1,19 @@
<div class="four wide column">
<div class="ui fluid vertical menu">
- <div class="header item">{{.i18n.Tr "org.settings"}}</div>
+ <div class="header item">{{.locale.Tr "org.settings"}}</div>
<a class="{{if .PageIsSettingsOptions}}active{{end}} item" href="{{.OrgLink}}/settings">
- {{.i18n.Tr "org.settings.options"}}
+ {{.locale.Tr "org.settings.options"}}
</a>
{{if not DisableWebhooks}}
<a class="{{if .PageIsSettingsHooks}}active{{end}} item" href="{{.OrgLink}}/settings/hooks">
- {{.i18n.Tr "repo.settings.hooks"}}
+ {{.locale.Tr "repo.settings.hooks"}}
</a>
{{end}}
<a class="{{if .PageIsOrgSettingsLabels}}active{{end}} item" href="{{.OrgLink}}/settings/labels">
- {{.i18n.Tr "repo.labels"}}
+ {{.locale.Tr "repo.labels"}}
</a>
<a class="{{if .PageIsSettingsDelete}}active{{end}} item" href="{{.OrgLink}}/settings/delete">
- {{.i18n.Tr "org.settings.delete"}}
+ {{.locale.Tr "org.settings.delete"}}
</a>
</div>
</div>
diff --git a/templates/org/settings/options.tmpl b/templates/org/settings/options.tmpl
index 09bf5e0caa..1b12c1221b 100644
--- a/templates/org/settings/options.tmpl
+++ b/templates/org/settings/options.tmpl
@@ -7,64 +7,64 @@
<div class="twelve wide column content">
{{template "base/alert" .}}
<h4 class="ui top attached header">
- {{.i18n.Tr "org.settings.options"}}
+ {{.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">{{.i18n.Tr "org.org_name_holder"}}
- <span class="text red hide" id="org-name-change-prompt"> {{.i18n.Tr "org.settings.change_orgname_prompt"}}</span>
- <span class="text red hide" id="org-name-change-redirect-prompt"> {{.i18n.Tr "org.settings.change_orgname_redirect_prompt"}}</span>
+ <label for="org_name">{{.locale.Tr "org.org_name_holder"}}
+ <span class="text red hide" id="org-name-change-prompt"> {{.locale.Tr "org.settings.change_orgname_prompt"}}</span>
+ <span class="text red hide" id="org-name-change-redirect-prompt"> {{.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>
</div>
<div class="field {{if .Err_FullName}}error{{end}}">
- <label for="full_name">{{.i18n.Tr "org.org_full_name_holder"}}</label>
+ <label for="full_name">{{.locale.Tr "org.org_full_name_holder"}}</label>
<input id="full_name" name="full_name" value="{{.Org.FullName}}">
</div>
<div class="field {{if .Err_Description}}error{{end}}">
- <label for="description">{{$.i18n.Tr "org.org_desc"}}</label>
+ <label for="description">{{$.locale.Tr "org.org_desc"}}</label>
<textarea id="description" name="description" rows="2">{{.Org.Description}}</textarea>
</div>
<div class="field {{if .Err_Website}}error{{end}}">
- <label for="website">{{.i18n.Tr "org.settings.website"}}</label>
+ <label for="website">{{.locale.Tr "org.settings.website"}}</label>
<input id="website" name="website" type="url" value="{{.Org.Website}}">
</div>
<div class="field">
- <label for="location">{{.i18n.Tr "org.settings.location"}}</label>
+ <label for="location">{{.locale.Tr "org.settings.location"}}</label>
<input id="location" name="location" value="{{.Org.Location}}">
</div>
<div class="ui divider"></div>
<div class="field" id="visibility_box">
- <label for="visibility">{{.i18n.Tr "org.settings.visibility"}}</label>
+ <label for="visibility">{{.locale.Tr "org.settings.visibility"}}</label>
<div class="field">
<div class="ui radio checkbox">
<input class="hidden enable-system-radio" tabindex="0" name="visibility" type="radio" value="0" {{if eq .CurrentVisibility 0}}checked{{end}}/>
- <label>{{.i18n.Tr "org.settings.visibility.public"}}</label>
+ <label>{{.locale.Tr "org.settings.visibility.public"}}</label>
</div>
</div>
<div class="field">
<div class="ui radio checkbox">
<input class="hidden enable-system-radio" tabindex="0" name="visibility" type="radio" value="1" {{if eq .CurrentVisibility 1}}checked{{end}}/>
- <label>{{.i18n.Tr "org.settings.visibility.limited"}}</label>
+ <label>{{.locale.Tr "org.settings.visibility.limited"}}</label>
</div>
</div>
<div class="field">
<div class="ui radio checkbox">
<input class="hidden enable-system-radio" tabindex="0" name="visibility" type="radio" value="2" {{if eq .CurrentVisibility 2}}checked{{end}}/>
- <label>{{.i18n.Tr "org.settings.visibility.private"}}</label>
+ <label>{{.locale.Tr "org.settings.visibility.private"}}</label>
</div>
</div>
</div>
<div class="field" id="permission_box">
- <label>{{.i18n.Tr "org.settings.permission"}}</label>
+ <label>{{.locale.Tr "org.settings.permission"}}</label>
<div class="field">
<div class="ui checkbox">
<input class="hidden" type="checkbox" name="repo_admin_change_team_access" {{if .RepoAdminChangeTeamAccess}}checked{{end}}/>
- <label>{{.i18n.Tr "org.settings.repoadminchangeteam"}}</label>
+ <label>{{.locale.Tr "org.settings.repoadminchangeteam"}}</label>
</div>
</div>
</div>
@@ -73,14 +73,14 @@
<div class="ui divider"></div>
<div class="inline field {{if .Err_MaxRepoCreation}}error{{end}}">
- <label for="max_repo_creation">{{.i18n.Tr "admin.users.max_repo_creation"}}</label>
+ <label for="max_repo_creation">{{.locale.Tr "admin.users.max_repo_creation"}}</label>
<input id="max_repo_creation" name="max_repo_creation" type="number" value="{{.Org.MaxRepoCreation}}">
- <p class="help">{{.i18n.Tr "admin.users.max_repo_creation_desc"}}</p>
+ <p class="help">{{.locale.Tr "admin.users.max_repo_creation_desc"}}</p>
</div>
{{end}}
<div class="field">
- <button class="ui green button">{{$.i18n.Tr "org.settings.update_settings"}}</button>
+ <button class="ui green button">{{$.locale.Tr "org.settings.update_settings"}}</button>
</div>
</form>
@@ -89,13 +89,13 @@
<form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data">
{{.CsrfTokenHtml}}
<div class="inline field">
- <label for="avatar">{{.i18n.Tr "settings.choose_new_avatar"}}</label>
+ <label for="avatar">{{.locale.Tr "settings.choose_new_avatar"}}</label>
<input name="avatar" type="file" >
</div>
<div class="field">
- <button class="ui green button">{{$.i18n.Tr "settings.update_avatar"}}</button>
- <a class="ui red button delete-post" data-request-url="{{.Link}}/avatar/delete" data-done-url="{{.Link}}">{{$.i18n.Tr "settings.delete_current_avatar"}}</a>
+ <button class="ui green button">{{$.locale.Tr "settings.update_avatar"}}</button>
+ <a class="ui red button delete-post" data-request-url="{{.Link}}/avatar/delete" data-done-url="{{.Link}}">{{$.locale.Tr "settings.delete_current_avatar"}}</a>
</div>
</form>
</div>
diff --git a/templates/org/team/members.tmpl b/templates/org/team/members.tmpl
index c976aa8965..b9069c90de 100644
--- a/templates/org/team/members.tmpl
+++ b/templates/org/team/members.tmpl
@@ -15,11 +15,11 @@
<div class="inline field ui left">
<div id="search-user-box" class="ui search">
<div class="ui input">
- <input class="prompt" name="uname" placeholder="{{.i18n.Tr "repo.settings.search_user_placeholder"}}" autocomplete="off" required>
+ <input class="prompt" name="uname" placeholder="{{.locale.Tr "repo.settings.search_user_placeholder"}}" autocomplete="off" required>
</div>
</div>
</div>
- <button class="ui green button">{{.i18n.Tr "org.teams.add_team_member"}}</button>
+ <button class="ui green button">{{.locale.Tr "org.teams.add_team_member"}}</button>
</form>
</div>
{{end}}
@@ -31,7 +31,7 @@
<button class="ui red button delete-button right" 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}}">{{$.i18n.Tr "org.members.remove"}}</button>
+ data-data-team-name="{{$.Team.Name}}">{{$.locale.Tr "org.members.remove"}}</button>
</form>
{{end}}
<a href="{{.HomeLink}}">
@@ -41,7 +41,7 @@
</div>
{{else}}
<div class="item">
- <span class="text grey italic">{{$.i18n.Tr "org.teams.members.none"}}</span>
+ <span class="text grey italic">{{$.locale.Tr "org.teams.members.none"}}</span>
</div>
{{end}}
</div>
@@ -52,10 +52,10 @@
<div class="ui small basic delete modal" id="remove-team-member">
<div class="ui icon header">
{{svg "octicon-x" 16 "close inside"}}
- {{$.i18n.Tr "org.members.remove"}}
+ {{$.locale.Tr "org.members.remove"}}
</div>
<div class="content">
- <p>{{$.i18n.Tr "org.members.remove.detail" `<span class="name"></span>` `<span class="dataTeamName"></span>` | Safe}}</p>
+ <p>{{$.locale.Tr "org.members.remove.detail" `<span class="name"></span>` `<span class="dataTeamName"></span>` | Safe}}</p>
</div>
{{template "base/delete_modal_actions" .}}
</div>
diff --git a/templates/org/team/navbar.tmpl b/templates/org/team/navbar.tmpl
index 2dfa244e5f..436c69bfc6 100644
--- a/templates/org/team/navbar.tmpl
+++ b/templates/org/team/navbar.tmpl
@@ -1,4 +1,4 @@
<div class="ui top attached tabular menu">
- <a class="item{{if .PageIsOrgTeamMembers}} active{{end}}" href="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}">{{svg "octicon-person"}} <strong>{{.Team.NumMembers}}</strong>&nbsp; {{$.i18n.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; {{$.i18n.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; {{$.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>
</div>
diff --git a/templates/org/team/new.tmpl b/templates/org/team/new.tmpl
index 2531868ec8..019454f545 100644
--- a/templates/org/team/new.tmpl
+++ b/templates/org/team/new.tmpl
@@ -7,83 +7,83 @@
<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}}{{.i18n.Tr "org.create_new_team"}}{{else}}{{.i18n.Tr "org.teams.settings"}}{{end}}
+ {{if .PageIsOrgTeamsNew}}{{.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">{{.i18n.Tr "org.team_name"}}</label>
+ <label for="team_name">{{.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">{{.i18n.Tr "org.team_name_helper"}}</span>
+ <span class="help">{{.locale.Tr "org.team_name_helper"}}</span>
</div>
<div class="field {{if .Err_Description}}error{{end}}">
- <label for="description">{{.i18n.Tr "org.team_desc"}}</label>
+ <label for="description">{{.locale.Tr "org.team_desc"}}</label>
<input id="description" name="description" value="{{.Team.Description}}">
- <span class="help">{{.i18n.Tr "org.team_desc_helper"}}</span>
+ <span class="help">{{.locale.Tr "org.team_desc_helper"}}</span>
</div>
{{if not (eq .Team.LowerName "owners")}}
<div class="grouped field">
- <label>{{.i18n.Tr "org.team_access_desc"}}</label>
+ <label>{{.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>{{.i18n.Tr "org.teams.specific_repositories"}}</label>
- <span class="help">{{.i18n.Tr "org.teams.specific_repositories_helper" | Str2html}}</span>
+ <label>{{.locale.Tr "org.teams.specific_repositories"}}</label>
+ <span class="help">{{.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>{{.i18n.Tr "org.teams.all_repositories"}}</label>
- <span class="help">{{.i18n.Tr "org.teams.all_repositories_helper" | Str2html}}</span>
+ <label>{{.locale.Tr "org.teams.all_repositories"}}</label>
+ <span class="help">{{.locale.Tr "org.teams.all_repositories_helper" | Str2html}}</span>
</div>
</div>
<div class="field">
<div class="ui checkbox">
- <label for="can_create_org_repo">{{.i18n.Tr "org.teams.can_create_org_repo"}}</label>
+ <label for="can_create_org_repo">{{.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">{{.i18n.Tr "org.teams.can_create_org_repo_helper"}}</span>
+ <span class="help">{{.locale.Tr "org.teams.can_create_org_repo_helper"}}</span>
</div>
</div>
</div>
<div class="grouped field">
- <label>{{.i18n.Tr "org.team_permission_desc"}}</label>
+ <label>{{.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>{{.i18n.Tr "org.teams.general_access"}}</label>
- <span class="help">{{.i18n.Tr "org.teams.general_access_helper"}}</span>
+ <label>{{.locale.Tr "org.teams.general_access"}}</label>
+ <span class="help">{{.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>{{.i18n.Tr "org.teams.admin_access"}}</label>
- <span class="help">{{.i18n.Tr "org.teams.admin_access_helper"}}</span>
+ <label>{{.locale.Tr "org.teams.admin_access"}}</label>
+ <span class="help">{{.locale.Tr "org.teams.admin_access_helper"}}</span>
</div>
</div>
</div>
<div class="ui divider"></div>
<div class="team-units required grouped field"{{if eq .Team.AccessMode 3}} style="display: none"{{end}}>
- <label>{{.i18n.Tr "org.team_unit_desc"}}</label>
+ <label>{{.locale.Tr "org.team_unit_desc"}}</label>
<table class="ui celled table">
<thead>
<tr>
- <th class="center aligned">{{.i18n.Tr "units.unit"}}</th>
- <th class="center aligned">{{.i18n.Tr "org.teams.none_access"}}
- <i class="circle help icon link tooltip" data-content="{{.i18n.Tr "org.teams.none_access_helper"}}"></i></th>
- <th class="center aligned">{{.i18n.Tr "org.teams.read_access"}}
- <i class="circle help icon link tooltip" data-content="{{.i18n.Tr "org.teams.read_access_helper"}}"></i>
+ <th class="center aligned">{{.locale.Tr "units.unit"}}</th>
+ <th class="center aligned">{{.locale.Tr "org.teams.none_access"}}
+ <i class="circle help icon link tooltip" data-content="{{.locale.Tr "org.teams.none_access_helper"}}"></i></th>
+ <th class="center aligned">{{.locale.Tr "org.teams.read_access"}}
+ <i class="circle help icon link tooltip" data-content="{{.locale.Tr "org.teams.read_access_helper"}}"></i>
</th>
- <th class="center aligned">{{.i18n.Tr "org.teams.write_access"}}
- <i class="circle help icon link tooltip" data-content="{{.i18n.Tr "org.teams.write_access_helper"}}"></i>
+ <th class="center aligned">{{.locale.Tr "org.teams.write_access"}}
+ <i class="circle help icon link tooltip" data-content="{{.locale.Tr "org.teams.write_access_helper"}}"></i>
</th>
</tr>
</thead>
@@ -92,10 +92,10 @@
{{if ge $unit.MaxPerm 2}}
<tr>
<td>
- <div {{if $unit.Type.UnitGlobalDisabled}}class="field tooltip" data-content="{{$.i18n.Tr "repo.unit_disabled"}}"{{- else -}}class="field"{{end}}>
+ <div {{if $unit.Type.UnitGlobalDisabled}}class="field tooltip" data-content="{{$.locale.Tr "repo.unit_disabled"}}"{{- else -}}class="field"{{end}}>
<div class="ui">
- <label>{{$.i18n.Tr $unit.NameKey}}{{if $unit.Type.UnitGlobalDisabled}} {{$.i18n.Tr "org.team_unit_disabled"}}{{end}}</label>
- <span class="help">{{$.i18n.Tr $unit.DescKey}}</span>
+ <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>
</div>
</div>
</td>
@@ -121,11 +121,11 @@
</table>
{{range $t, $unit := $.Units}}
{{if lt $unit.MaxPerm 2}}
- <div {{if $unit.Type.UnitGlobalDisabled}}class="field tooltip" data-content="{{$.i18n.Tr "repo.unit_disabled"}}"{{else}}class="field"{{end}}>
+ <div {{if $unit.Type.UnitGlobalDisabled}}class="field tooltip" data-content="{{$.locale.Tr "repo.unit_disabled"}}"{{else}}class="field"{{end}}>
<div class="ui checkbox">
<input type="checkbox" class="hidden" name="unit_{{$unit.Type.Value}}" value="1"{{if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $unit.Type) 1)}} checked{{end}} {{if $unit.Type.UnitGlobalDisabled}}disabled{{end}}>
- <label>{{$.i18n.Tr $unit.NameKey}}{{if $unit.Type.UnitGlobalDisabled}} {{$.i18n.Tr "org.team_unit_disabled"}}{{end}}</label>
- <span class="help">{{$.i18n.Tr $unit.DescKey}}</span>
+ <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>
</div>
</div>
{{end}}
@@ -135,12 +135,12 @@
<div class="field">
{{if .PageIsOrgTeamsNew}}
- <button class="ui green button">{{.i18n.Tr "org.create_team"}}</button>
- <a class="ui button" href="{{.OrgLink}}/teams">{{.i18n.Tr "cancel"}}</a>
+ <button class="ui green button">{{.locale.Tr "org.create_team"}}</button>
+ <a class="ui button" href="{{.OrgLink}}/teams">{{.locale.Tr "cancel"}}</a>
{{else}}
- <button class="ui green button">{{.i18n.Tr "org.teams.update_settings"}}</button>
+ <button class="ui green button">{{.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">{{.i18n.Tr "org.teams.delete_team"}}</button>
+ <button class="ui red button delete-button" data-url="{{.OrgLink}}/teams/{{.team_name | PathEscape}}/delete">{{.locale.Tr "org.teams.delete_team"}}</button>
{{end}}
{{end}}
</div>
@@ -154,10 +154,10 @@
<div class="ui small basic delete modal">
<div class="ui icon header">
{{svg "octicon-trash"}}
- {{.i18n.Tr "org.teams.delete_team_title"}}
+ {{.locale.Tr "org.teams.delete_team_title"}}
</div>
<div class="content">
- <p>{{.i18n.Tr "org.teams.delete_team_desc"}}</p>
+ <p>{{.locale.Tr "org.teams.delete_team_desc"}}</p>
</div>
{{template "base/delete_modal_actions" .}}
</div>
diff --git a/templates/org/team/repositories.tmpl b/templates/org/team/repositories.tmpl
index ae747ef2cc..d4c17d5b00 100644
--- a/templates/org/team/repositories.tmpl
+++ b/templates/org/team/repositories.tmpl
@@ -16,17 +16,17 @@
<div class="inline field ui left">
<div id="search-repo-box" data-uid="{{.Org.ID}}" class="ui search">
<div class="ui input">
- <input class="prompt" name="repo_name" placeholder="{{.i18n.Tr "org.teams.search_repo_placeholder"}}" autocomplete="off" required>
+ <input class="prompt" name="repo_name" placeholder="{{.locale.Tr "org.teams.search_repo_placeholder"}}" autocomplete="off" required>
</div>
</div>
</div>
- <button class="ui green button">{{.i18n.Tr "add"}}</button>
+ <button class="ui green button">{{.locale.Tr "add"}}</button>
</form>
</div>
<div class="inline ui field right">
<form class="ui form" id="repo-multiple-form" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/repositories" method="post">
- <button class="ui red button delete-button right" data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/removeall">{{.i18n.Tr "remove_all"}}</button>
- <button class="ui green button add-all-button right" data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/addall">{{.i18n.Tr "add_all"}}</button>
+ <button class="ui red button delete-button right" data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/removeall">{{.locale.Tr "remove_all"}}</button>
+ <button class="ui green button add-all-button right" data-url="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/addall">{{.locale.Tr "add_all"}}</button>
</form>
</div>
</div>
@@ -37,7 +37,7 @@
{{if $canAddRemove}}
<form method="post" action="{{$.OrgLink}}/teams/{{$.Team.LowerName | PathEscape}}/action/repo/remove">
{{$.CsrfTokenHtml}}
- <button type="submit" class="ui red small button right" name="repoid" value="{{.ID}}">{{$.i18n.Tr "remove"}}</button>
+ <button type="submit" class="ui red small button right" name="repoid" value="{{.ID}}">{{$.locale.Tr "remove"}}</button>
</form>
{{end}}
<a class="member" href="{{$.Org.HomeLink}}/{{.Name | PathEscape}}">
@@ -55,7 +55,7 @@
</div>
{{else}}
<div class="item">
- <span class="text grey italic">{{$.i18n.Tr "org.teams.repos.none"}}</span>
+ <span class="text grey italic">{{$.locale.Tr "org.teams.repos.none"}}</span>
</div>
{{end}}
</div>
@@ -67,10 +67,10 @@
<div class="ui small basic delete modal">
<div class="ui icon header">
{{svg "octicon-trash"}}
- {{.i18n.Tr "org.teams.remove_all_repos_title"}}
+ {{.locale.Tr "org.teams.remove_all_repos_title"}}
</div>
<div class="content">
- <p>{{.i18n.Tr "org.teams.remove_all_repos_desc"}}</p>
+ <p>{{.locale.Tr "org.teams.remove_all_repos_desc"}}</p>
</div>
{{template "base/delete_modal_actions" .}}
</div>
@@ -78,10 +78,10 @@
<div class="ui small basic addall modal">
<div class="ui icon header">
<i class="globe icon"></i>
- {{.i18n.Tr "org.teams.add_all_repos_title"}}
+ {{.locale.Tr "org.teams.add_all_repos_title"}}
</div>
<div class="content">
- <p>{{.i18n.Tr "org.teams.add_all_repos_desc"}}</p>
+ <p>{{.locale.Tr "org.teams.add_all_repos_desc"}}</p>
</div>
{{template "base/delete_modal_actions" .}}
</div>
diff --git a/templates/org/team/sidebar.tmpl b/templates/org/team/sidebar.tmpl
index d597d1349f..5d952b501e 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}}">{{$.i18n.Tr "org.teams.leave"}}</button>
+ data-name="{{.Team.Name}}">{{$.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}}">{{$.i18n.Tr "org.teams.join"}}</button>
+ <button type="submit" class="ui primary tiny button" name="uid" value="{{$.SignedUser.ID}}">{{$.locale.Tr "org.teams.join"}}</button>
</form>
{{end}}
</div>
@@ -22,51 +22,51 @@
{{if .Team.Description}}
{{.Team.Description}}
{{else}}
- <span class="text grey italic">{{.i18n.Tr "org.teams.no_desc"}}</span>
+ <span class="text grey italic">{{.locale.Tr "org.teams.no_desc"}}</span>
{{end}}
</div>
{{if eq .Team.LowerName "owners"}}
<div class="item">
- {{.i18n.Tr "org.teams.owners_permission_desc" | Str2html}}
+ {{.locale.Tr "org.teams.owners_permission_desc" | Str2html}}
</div>
{{else}}
<div class="item">
- <h3>{{.i18n.Tr "org.team_access_desc"}}</h3>
+ <h3>{{.locale.Tr "org.team_access_desc"}}</h3>
<ul>
{{if .Team.IncludesAllRepositories}}
- <li>{{.i18n.Tr "org.teams.all_repositories" | Str2html}}
+ <li>{{.locale.Tr "org.teams.all_repositories" | Str2html}}
{{else}}
- <li>{{.i18n.Tr "org.teams.specific_repositories" | Str2html}}
+ <li>{{.locale.Tr "org.teams.specific_repositories" | Str2html}}
{{end}}
{{if .Team.CanCreateOrgRepo}}
- <li>{{.i18n.Tr "org.teams.can_create_org_repo"}}
+ <li>{{.locale.Tr "org.teams.can_create_org_repo"}}
{{end}}
</ul>
{{if (eq .Team.AccessMode 2)}}
- <h3>{{.i18n.Tr "org.settings.permission"}}</h3>
- {{.i18n.Tr "org.teams.write_permission_desc" | Str2html}}
+ <h3>{{.locale.Tr "org.settings.permission"}}</h3>
+ {{.locale.Tr "org.teams.write_permission_desc" | Str2html}}
{{else if (eq .Team.AccessMode 3)}}
- <h3>{{.i18n.Tr "org.settings.permission"}}</h3>
- {{.i18n.Tr "org.teams.admin_permission_desc" | Str2html}}
+ <h3>{{.locale.Tr "org.settings.permission"}}</h3>
+ {{.locale.Tr "org.teams.admin_permission_desc" | Str2html}}
{{else}}
<table class="ui table">
<thead>
<tr>
- <th>{{.i18n.Tr "units.unit"}}</th>
- <th>{{.i18n.Tr "org.team_permission_desc"}}</th>
+ <th>{{.locale.Tr "units.unit"}}</th>
+ <th>{{.locale.Tr "org.team_permission_desc"}}</th>
</tr>
</thead>
<tbody>
{{range $t, $unit := $.Units}}
{{if and (lt $unit.MaxPerm 2) (not $unit.Type.UnitGlobalDisabled)}}
<tr>
- <td><strong>{{$.i18n.Tr $unit.NameKey}}</strong></td>
+ <td><strong>{{$.locale.Tr $unit.NameKey}}</strong></td>
<td>{{if eq ($.Team.UnitAccessMode $unit.Type) 0 -}}
- {{$.i18n.Tr "org.teams.none_access"}}
+ {{$.locale.Tr "org.teams.none_access"}}
{{- else if or (eq $.Team.ID 0) (eq ($.Team.UnitAccessMode $unit.Type) 1) -}}
- {{$.i18n.Tr "org.teams.read_access"}}
+ {{$.locale.Tr "org.teams.read_access"}}
{{- else if eq ($.Team.UnitAccessMode $unit.Type) 2 -}}
- {{$.i18n.Tr "org.teams.write_access"}}
+ {{$.locale.Tr "org.teams.write_access"}}
{{- end}}</td>
</tr>
{{end}}
@@ -79,17 +79,17 @@
</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"}} {{$.i18n.Tr "org.teams.settings"}}</a>
+ <a class="ui teal small button" href="{{.OrgLink}}/teams/{{.Team.LowerName | PathEscape}}/edit">{{svg "octicon-gear"}} {{$.locale.Tr "org.teams.settings"}}</a>
</div>
{{end}}
</div>
<div class="ui small basic delete modal" id="leave-team-sidebar">
<div class="ui icon header">
{{svg "octicon-x" 16 "close inside"}}
- {{$.i18n.Tr "org.teams.leave"}}
+ {{$.locale.Tr "org.teams.leave"}}
</div>
<div class="content">
- <p>{{$.i18n.Tr "org.teams.leave.detail" `<span class="name"></span>` | Safe}}</p>
+ <p>{{$.locale.Tr "org.teams.leave.detail" `<span class="name"></span>` | Safe}}</p>
</div>
{{template "base/delete_modal_actions" .}}
</div>
diff --git a/templates/org/team/teams.tmpl b/templates/org/team/teams.tmpl
index 49407ef194..465701d96e 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 green button" href="{{.OrgLink}}/teams/new">{{svg "octicon-plus"}} {{.i18n.Tr "org.create_new_team"}}</a>
+ <a class="ui green button" href="{{.OrgLink}}/teams/new">{{svg "octicon-plus"}} {{.locale.Tr "org.create_new_team"}}</a>
</div>
<div class="ui 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}}">{{$.i18n.Tr "org.teams.leave"}}</button>
+ data-name="{{.Name}}">{{$.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}}">{{$.i18n.Tr "org.teams.join"}}</button>
+ <button type="submit" class="ui primary small button" name="uid" value="{{$.SignedUser.ID}}">{{$.locale.Tr "org.teams.join"}}</button>
</form>
{{end}}
</div>
@@ -38,7 +38,7 @@
{{end}}
</div>
<div class="ui bottom attached header">
- <p class="team-meta">{{.NumMembers}} {{$.i18n.Tr "org.lower_members"}} · {{.NumRepos}} {{$.i18n.Tr "org.lower_repositories"}}</p>
+ <p class="team-meta">{{.NumMembers}} {{$.locale.Tr "org.lower_members"}} · {{.NumRepos}} {{$.locale.Tr "org.lower_repositories"}}</p>
</div>
</div>
{{end}}
@@ -48,10 +48,10 @@
<div class="ui small basic delete modal" id="leave-team">
<div class="ui icon header">
{{svg "octicon-x" 16 "close inside"}}
- {{$.i18n.Tr "org.teams.leave"}}
+ {{$.locale.Tr "org.teams.leave"}}
</div>
<div class="content">
- <p>{{$.i18n.Tr "org.teams.leave.detail" `<span class="name"></span>` | Safe}}</p>
+ <p>{{$.locale.Tr "org.teams.leave.detail" `<span class="name"></span>` | Safe}}</p>
</div>
{{template "base/delete_modal_actions" .}}
</div>