summaryrefslogtreecommitdiffstats
path: root/templates/user
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/user
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/user')
-rw-r--r--templates/user/auth/activate.tmpl22
-rw-r--r--templates/user/auth/change_passwd_inner.tmpl8
-rw-r--r--templates/user/auth/finalize_openid.tmpl14
-rw-r--r--templates/user/auth/forgot_passwd.tmpl14
-rw-r--r--templates/user/auth/grant.tmpl10
-rw-r--r--templates/user/auth/grant_error.tmpl4
-rw-r--r--templates/user/auth/link_account.tmpl4
-rw-r--r--templates/user/auth/prohibit_login.tmpl4
-rw-r--r--templates/user/auth/reset_passwd.tmpl22
-rw-r--r--templates/user/auth/signin_inner.tmpl20
-rw-r--r--templates/user/auth/signin_navbar.tmpl2
-rw-r--r--templates/user/auth/signin_openid.tmpl6
-rw-r--r--templates/user/auth/signup_inner.tmpl22
-rw-r--r--templates/user/auth/signup_openid_connect.tmpl12
-rw-r--r--templates/user/auth/signup_openid_navbar.tmpl4
-rw-r--r--templates/user/auth/signup_openid_register.tmpl12
-rw-r--r--templates/user/auth/twofa.tmpl8
-rw-r--r--templates/user/auth/twofa_scratch.tmpl6
-rw-r--r--templates/user/auth/webauthn.tmpl10
-rw-r--r--templates/user/auth/webauthn_error.tmpl22
-rw-r--r--templates/user/dashboard/feeds.tmpl54
-rw-r--r--templates/user/dashboard/issues.tmpl36
-rw-r--r--templates/user/dashboard/milestones.tmpl42
-rw-r--r--templates/user/dashboard/navbar.tmpl32
-rw-r--r--templates/user/dashboard/repolist.tmpl62
-rw-r--r--templates/user/heatmap.tmpl2
-rw-r--r--templates/user/notification/notification_div.tmpl18
-rw-r--r--templates/user/overview/header.tmpl4
-rw-r--r--templates/user/profile.tmpl24
-rw-r--r--templates/user/project.tmpl20
-rw-r--r--templates/user/settings/account.tmpl66
-rw-r--r--templates/user/settings/appearance.tmpl44
-rw-r--r--templates/user/settings/applications.tmpl26
-rw-r--r--templates/user/settings/applications_oauth2.tmpl20
-rw-r--r--templates/user/settings/applications_oauth2_edit.tmpl24
-rw-r--r--templates/user/settings/grants_oauth2.tmpl12
-rw-r--r--templates/user/settings/keys_gpg.tmpl64
-rw-r--r--templates/user/settings/keys_principal.tmpl24
-rw-r--r--templates/user/settings/keys_ssh.tmpl50
-rw-r--r--templates/user/settings/navbar.tmpl16
-rw-r--r--templates/user/settings/organization.tmpl8
-rw-r--r--templates/user/settings/profile.tmpl60
-rw-r--r--templates/user/settings/repos.tmpl34
-rw-r--r--templates/user/settings/security/accountlinks.tmpl14
-rw-r--r--templates/user/settings/security/openid.tmpl18
-rw-r--r--templates/user/settings/security/twofa.tmpl22
-rw-r--r--templates/user/settings/security/twofa_enroll.tmpl12
-rw-r--r--templates/user/settings/security/webauthn.tmpl16
48 files changed, 525 insertions, 525 deletions
diff --git a/templates/user/auth/activate.tmpl b/templates/user/auth/activate.tmpl
index bb5d2a16f3..eba9e3229b 100644
--- a/templates/user/auth/activate.tmpl
+++ b/templates/user/auth/activate.tmpl
@@ -5,40 +5,40 @@
<form class="ui form ignore-dirty" action="{{AppSubUrl}}/user/activate" method="post">
{{.CsrfTokenHtml}}
<h2 class="ui top attached header">
- {{.i18n.Tr "auth.active_your_account"}}
+ {{.locale.Tr "auth.active_your_account"}}
</h2>
<div class="ui attached segment">
{{template "base/alert" .}}
{{if .IsActivatePage}}
{{if .ServiceNotEnabled}}
- <p class="center">{{.i18n.Tr "auth.disable_register_mail"}}</p>
+ <p class="center">{{.locale.Tr "auth.disable_register_mail"}}</p>
{{else if .ResendLimited}}
- <p class="center">{{.i18n.Tr "auth.resent_limit_prompt"}}</p>
+ <p class="center">{{.locale.Tr "auth.resent_limit_prompt"}}</p>
{{else}}
- <p>{{.i18n.Tr "auth.confirmation_mail_sent_prompt" (.SignedUser.Email|Escape) .ActiveCodeLives | Str2html}}</p>
+ <p>{{.locale.Tr "auth.confirmation_mail_sent_prompt" (.SignedUser.Email|Escape) .ActiveCodeLives | Str2html}}</p>
{{end}}
{{else}}
{{if .NeedsPassword}}
<div class="required inline field">
- <label for="password">{{.i18n.Tr "password"}}</label>
+ <label for="password">{{.locale.Tr "password"}}</label>
<input id="password" name="password" type="password" autocomplete="off" required>
</div>
<div class="inline field">
<label></label>
- <button class="ui green button">{{.i18n.Tr "install.confirm_password"}}</button>
+ <button class="ui green button">{{.locale.Tr "install.confirm_password"}}</button>
</div>
<input id="code" name="code" type="hidden" value="{{.Code}}">
{{else if .IsSendRegisterMail}}
- <p>{{.i18n.Tr "auth.confirmation_mail_sent_prompt" (.Email|Escape) .ActiveCodeLives | Str2html}}</p>
+ <p>{{.locale.Tr "auth.confirmation_mail_sent_prompt" (.Email|Escape) .ActiveCodeLives | Str2html}}</p>
{{else if .IsActivateFailed}}
- <p>{{.i18n.Tr "auth.invalid_code"}}</p>
+ <p>{{.locale.Tr "auth.invalid_code"}}</p>
{{else if .ManualActivationOnly}}
- <p class="center">{{.i18n.Tr "auth.manual_activation_only"}}</p>
+ <p class="center">{{.locale.Tr "auth.manual_activation_only"}}</p>
{{else}}
- <p>{{.i18n.Tr "auth.has_unconfirmed_mail" (.SignedUser.Name|Escape) (.SignedUser.Email|Escape) | Str2html}}</p>
+ <p>{{.locale.Tr "auth.has_unconfirmed_mail" (.SignedUser.Name|Escape) (.SignedUser.Email|Escape) | Str2html}}</p>
<div class="ui divider"></div>
<div class="text right">
- <button class="ui primary button">{{.i18n.Tr "auth.resend_mail"}}</button>
+ <button class="ui primary button">{{.locale.Tr "auth.resend_mail"}}</button>
</div>
{{end}}
{{end}}
diff --git a/templates/user/auth/change_passwd_inner.tmpl b/templates/user/auth/change_passwd_inner.tmpl
index 43818e93d2..49ae608053 100644
--- a/templates/user/auth/change_passwd_inner.tmpl
+++ b/templates/user/auth/change_passwd_inner.tmpl
@@ -2,25 +2,25 @@
{{template "base/alert" .}}
{{end}}
<h4 class="ui top attached header center">
- {{.i18n.Tr "settings.change_password"}}
+ {{.locale.Tr "settings.change_password"}}
</h4>
<div class="ui attached segment">
<form class="ui form" action="{{.ChangePasscodeLink}}" method="post">
{{.CsrfTokenHtml}}
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}">
- <label for="password">{{.i18n.Tr "password"}}</label>
+ <label for="password">{{.locale.Tr "password"}}</label>
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="new-password" required>
</div>
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
- <label for="retype">{{.i18n.Tr "re_type"}}</label>
+ <label for="retype">{{.locale.Tr "re_type"}}</label>
<input id="retype" name="retype" type="password" autocomplete="new-password" required>
</div>
<div class="inline field">
<label></label>
- <button class="ui green button">{{.i18n.Tr "settings.change_password" }}</button>
+ <button class="ui green button">{{.locale.Tr "settings.change_password" }}</button>
</div>
</form>
</div>
diff --git a/templates/user/auth/finalize_openid.tmpl b/templates/user/auth/finalize_openid.tmpl
index 57e9d14ed4..39163b30be 100644
--- a/templates/user/auth/finalize_openid.tmpl
+++ b/templates/user/auth/finalize_openid.tmpl
@@ -6,36 +6,36 @@
<div class="twelve wide column content">
{{template "base/alert" .}}
<h4 class="ui top attached header">
- {{.i18n.Tr "auth.login_userpass"}}
+ {{.locale.Tr "auth.login_userpass"}}
</h4>
<div class="ui attached segment">
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<div class="required inline field {{if .Err_UserName}}error{{end}}">
- <label for="user_name">{{.i18n.Tr "home.uname_holder"}}</label>
+ <label for="user_name">{{.locale.Tr "home.uname_holder"}}</label>
<input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required>
</div>
<div class="required inline field {{if .Err_Password}}error{{end}}">
- <label for="password">{{.i18n.Tr "password"}}</label>
+ <label for="password">{{.locale.Tr "password"}}</label>
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="off" required>
</div>
<div class="inline field">
<label></label>
<div class="ui checkbox">
- <label>{{.i18n.Tr "auth.remember_me"}}</label>
+ <label>{{.locale.Tr "auth.remember_me"}}</label>
<input name="remember" type="checkbox">
</div>
</div>
<div class="inline field">
<label></label>
- <button class="ui green button">{{.i18n.Tr "sign_in"}}</button>
- <a href="{{AppSubUrl}}/user/forget_password">{{.i18n.Tr "auth.forget_password"}}</a>
+ <button class="ui green button">{{.locale.Tr "sign_in"}}</button>
+ <a href="{{AppSubUrl}}/user/forget_password">{{.locale.Tr "auth.forget_password"}}</a>
</div>
{{if .ShowRegistrationButton}}
<div class="inline field">
<label></label>
- <a href="{{AppSubUrl}}/user/sign_up">{{.i18n.Tr "auth.sign_up_now" | Str2html}}</a>
+ <a href="{{AppSubUrl}}/user/sign_up">{{.locale.Tr "auth.sign_up_now" | Str2html}}</a>
</div>
{{end}}
</form>
diff --git a/templates/user/auth/forgot_passwd.tmpl b/templates/user/auth/forgot_passwd.tmpl
index 59789ef7cb..cd42085e28 100644
--- a/templates/user/auth/forgot_passwd.tmpl
+++ b/templates/user/auth/forgot_passwd.tmpl
@@ -5,32 +5,32 @@
<form class="ui form ignore-dirty" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<h2 class="ui top attached header">
- {{.i18n.Tr "auth.forgot_password_title"}}
+ {{.locale.Tr "auth.forgot_password_title"}}
</h2>
<div class="ui attached segment">
{{template "base/alert" .}}
{{if .IsResetSent}}
- <p>{{.i18n.Tr "auth.reset_password_mail_sent_prompt" (Escape .Email) .ResetPwdCodeLives | Str2html}}</p>
+ <p>{{.locale.Tr "auth.reset_password_mail_sent_prompt" (Escape .Email) .ResetPwdCodeLives | Str2html}}</p>
{{else if .IsResetRequest}}
<div class="required inline field {{if .Err_Email}}error{{end}}">
- <label for="email">{{.i18n.Tr "email"}}</label>
+ <label for="email">{{.locale.Tr "email"}}</label>
<input id="email" name="email" type="email" value="{{.Email}}" autofocus required>
</div>
<div class="ui divider"></div>
<div class="inline field">
<label></label>
- <button class="ui primary button">{{.i18n.Tr "auth.send_reset_mail"}}</button>
+ <button class="ui primary button">{{.locale.Tr "auth.send_reset_mail"}}</button>
</div>
{{else if .IsResetDisable}}
<p class="center">
{{if $.IsAdmin}}
- {{.i18n.Tr "auth.disable_forgot_password_mail_admin"}}
+ {{.locale.Tr "auth.disable_forgot_password_mail_admin"}}
{{else}}
- {{.i18n.Tr "auth.disable_forgot_password_mail"}}
+ {{.locale.Tr "auth.disable_forgot_password_mail"}}
{{end}}
</p>
{{else if .ResendLimited}}
- <p class="center">{{.i18n.Tr "auth.resent_limit_prompt"}}</p>
+ <p class="center">{{.locale.Tr "auth.resent_limit_prompt"}}</p>
{{end}}
</div>
</form>
diff --git a/templates/user/auth/grant.tmpl b/templates/user/auth/grant.tmpl
index 0f072bcf13..0ba32c550f 100644
--- a/templates/user/auth/grant.tmpl
+++ b/templates/user/auth/grant.tmpl
@@ -3,17 +3,17 @@
<div class="column seven wide">
<div class="ui middle centered raised segments">
<h3 class="ui top attached header">
- {{.i18n.Tr "auth.authorize_title" .Application.Name}}
+ {{.locale.Tr "auth.authorize_title" .Application.Name}}
</h3>
<div class="ui attached segment">
{{template "base/alert" .}}
<p>
- <b>{{.i18n.Tr "auth.authorize_application_description"}}</b><br/>
- {{.i18n.Tr "auth.authorize_application_created_by" .ApplicationUserLinkHTML | Str2html}}
+ <b>{{.locale.Tr "auth.authorize_application_description"}}</b><br/>
+ {{.locale.Tr "auth.authorize_application_created_by" .ApplicationUserLinkHTML | Str2html}}
</p>
</div>
<div class="ui attached segment">
- <p>{{.i18n.Tr "auth.authorize_redirect_notice" .ApplicationRedirectDomainHTML | Str2html}}</p>
+ <p>{{.locale.Tr "auth.authorize_redirect_notice" .ApplicationRedirectDomainHTML | Str2html}}</p>
</div>
<div class="ui attached segment">
<form method="post" action="{{AppSubUrl}}/login/oauth/grant">
@@ -23,7 +23,7 @@
<input type="hidden" name="scope" value="{{.Scope}}">
<input type="hidden" name="nonce" value="{{.Nonce}}">
<input type="hidden" name="redirect_uri" value="{{.RedirectURI}}">
- <input type="submit" id="authorize-app" value="{{.i18n.Tr "auth.authorize_application"}}" class="ui red inline button"/>
+ <input type="submit" id="authorize-app" value="{{.locale.Tr "auth.authorize_application"}}" class="ui red inline button"/>
<a href="{{.RedirectURI}}" class="ui basic primary inline button">Cancel</a>
</form>
</div>
diff --git a/templates/user/auth/grant_error.tmpl b/templates/user/auth/grant_error.tmpl
index 83bd882178..2173a3311b 100644
--- a/templates/user/auth/grant_error.tmpl
+++ b/templates/user/auth/grant_error.tmpl
@@ -4,11 +4,11 @@
<div class="column seven wide">
<div class="ui middle centered raised segments">
<h1 class="ui top attached header">
- {{.i18n.Tr "auth.authorization_failed" }}
+ {{.locale.Tr "auth.authorization_failed" }}
</h1>
<h3 class="ui attached segment">{{.Error.ErrorDescription}}</h3>
<div class="ui attached segment">
- <p>{{.i18n.Tr "auth.authorization_failed_desc"}}</p>
+ <p>{{.locale.Tr "auth.authorization_failed_desc"}}</p>
</div>
</div>
</div>
diff --git a/templates/user/auth/link_account.tmpl b/templates/user/auth/link_account.tmpl
index dfc70b1ae6..4525bf551a 100644
--- a/templates/user/auth/link_account.tmpl
+++ b/templates/user/auth/link_account.tmpl
@@ -6,12 +6,12 @@
{{if not .AllowOnlyInternalRegistration}}
<a class="item {{if not .user_exists}}active{{end}}"
data-tab="auth-link-signup-tab">
- {{.i18n.Tr "auth.oauth_signup_tab"}}
+ {{.locale.Tr "auth.oauth_signup_tab"}}
</a>
{{end}}
<a class="item {{if .user_exists}}active{{end}}"
data-tab="auth-link-signin-tab">
- {{.i18n.Tr "auth.oauth_signin_tab"}}
+ {{.locale.Tr "auth.oauth_signin_tab"}}
</a>
</div>
</div>
diff --git a/templates/user/auth/prohibit_login.tmpl b/templates/user/auth/prohibit_login.tmpl
index b773ef16e6..d002ad7ae0 100644
--- a/templates/user/auth/prohibit_login.tmpl
+++ b/templates/user/auth/prohibit_login.tmpl
@@ -4,10 +4,10 @@
<div class="column">
<form class="ui form">
<h2 class="ui top attached header">
- {{.i18n.Tr "auth.prohibit_login"}}
+ {{.locale.Tr "auth.prohibit_login"}}
</h2>
<div class="ui attached segment">
- <p>{{.i18n.Tr "auth.prohibit_login_desc"}}</p>
+ <p>{{.locale.Tr "auth.prohibit_login_desc"}}</p>
</div>
</form>
</div>
diff --git a/templates/user/auth/reset_passwd.tmpl b/templates/user/auth/reset_passwd.tmpl
index 66d4ffc115..bba7b2bc4b 100644
--- a/templates/user/auth/reset_passwd.tmpl
+++ b/templates/user/auth/reset_passwd.tmpl
@@ -6,44 +6,44 @@
{{.CsrfTokenHtml}}
<input name="code" type="hidden" value="{{.Code}}">
<h2 class="ui top attached header">
- {{.i18n.Tr "auth.reset_password"}}
+ {{.locale.Tr "auth.reset_password"}}
</h2>
<div class="ui attached segment">
{{template "base/alert" .}}
{{if .user_email }}
<div class="inline field">
- <label for="user_name">{{.i18n.Tr "email"}}</label>
+ <label for="user_name">{{.locale.Tr "email"}}</label>
<input id="user_name" type="text" value="{{ .user_email }}" disabled>
</div>
{{end}}
{{if .IsResetForm}}
<div class="required inline field {{if .Err_Password}}error{{end}}">
- <label for="password">{{.i18n.Tr "settings.new_password"}}</label>
+ <label for="password">{{.locale.Tr "settings.new_password"}}</label>
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="new-password" autofocus required>
</div>
{{if not .user_signed_in}}
<div class="inline field">
<label></label>
<div class="ui checkbox">
- <label>{{.i18n.Tr "auth.remember_me"}}</label>
+ <label>{{.locale.Tr "auth.remember_me"}}</label>
<input name="remember" type="checkbox">
</div>
</div>
{{end}}
{{if .has_two_factor}}
<h4 class="ui dividing header">
- {{.i18n.Tr "twofa"}}
+ {{.locale.Tr "twofa"}}
</h4>
- <div class="ui warning visible message">{{.i18n.Tr "settings.twofa_is_enrolled" | Str2html }}</div>
+ <div class="ui warning visible message">{{.locale.Tr "settings.twofa_is_enrolled" | Str2html }}</div>
{{if .scratch_code}}
<div class="required inline field {{if .Err_Token}}error{{end}}">
- <label for="token">{{.i18n.Tr "auth.scratch_code"}}</label>
+ <label for="token">{{.locale.Tr "auth.scratch_code"}}</label>
<input id="token" name="token" type="text" autocomplete="off" autofocus required>
</div>
<input type="hidden" name="scratch_code" value="true">
{{else}}
<div class="required inline field {{if .Err_Passcode}}error{{end}}">
- <label for="passcode">{{.i18n.Tr "passcode"}}</label>
+ <label for="passcode">{{.locale.Tr "passcode"}}</label>
<input id="passcode" name="passcode" type="number" autocomplete="off" autofocus required>
</div>
{{end}}
@@ -51,13 +51,13 @@
<div class="ui divider"></div>
<div class="inline field">
<label></label>
- <button class="ui primary button">{{.i18n.Tr "auth.reset_password_helper"}}</button>
+ <button class="ui primary button">{{.locale.Tr "auth.reset_password_helper"}}</button>
{{if and .has_two_factor (not .scratch_code)}}
- <a href="{{.Link}}?code={{.Code}}&amp;scratch_code=true">{{.i18n.Tr "auth.use_scratch_code" | Str2html}}</a>
+ <a href="{{.Link}}?code={{.Code}}&amp;scratch_code=true">{{.locale.Tr "auth.use_scratch_code" | Str2html}}</a>
{{end}}
</div>
{{else}}
- <p class="center">{{.i18n.Tr "auth.invalid_code"}}</p>
+ <p class="center">{{.locale.Tr "auth.invalid_code"}}</p>
{{end}}
</div>
</form>
diff --git a/templates/user/auth/signin_inner.tmpl b/templates/user/auth/signin_inner.tmpl
index 20a286aacb..18875f45a3 100644
--- a/templates/user/auth/signin_inner.tmpl
+++ b/templates/user/auth/signin_inner.tmpl
@@ -3,21 +3,21 @@
{{end}}
<h4 class="ui top attached header center">
{{if .LinkAccountMode}}
- {{.i18n.Tr "auth.oauth_signin_title"}}
+ {{.locale.Tr "auth.oauth_signin_title"}}
{{else}}
- {{.i18n.Tr "auth.login_userpass"}}
+ {{.locale.Tr "auth.login_userpass"}}
{{end}}
</h4>
<div class="ui attached segment">
<form class="ui form" action="{{.SignInLink}}" method="post">
{{.CsrfTokenHtml}}
<div class="required inline field {{if and (.Err_UserName) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}">
- <label for="user_name">{{.i18n.Tr "home.uname_holder"}}</label>
+ <label for="user_name">{{.locale.Tr "home.uname_holder"}}</label>
<input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required>
</div>
{{if or (not .DisablePassword) .LinkAccountMode}}
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeSignIn))}}error{{end}}">
- <label for="password">{{.i18n.Tr "password"}}</label>
+ <label for="password">{{.locale.Tr "password"}}</label>
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="current-password" required>
</div>
{{end}}
@@ -25,7 +25,7 @@
<div class="inline field">
<label></label>
<div class="ui checkbox">
- <label>{{.i18n.Tr "auth.remember_me"}}</label>
+ <label>{{.locale.Tr "auth.remember_me"}}</label>
<input name="remember" type="checkbox">
</div>
</div>
@@ -35,18 +35,18 @@
<label></label>
<button class="ui green button">
{{if .LinkAccountMode}}
- {{.i18n.Tr "auth.oauth_signin_submit"}}
+ {{.locale.Tr "auth.oauth_signin_submit"}}
{{else}}
- {{.i18n.Tr "sign_in"}}
+ {{.locale.Tr "sign_in"}}
{{end}}
</button>
- <a href="{{AppSubUrl}}/user/forgot_password">{{.i18n.Tr "auth.forgot_password"}}</a>
+ <a href="{{AppSubUrl}}/user/forgot_password">{{.locale.Tr "auth.forgot_password"}}</a>
</div>
{{if .ShowRegistrationButton}}
<div class="inline field">
<label></label>
- <a href="{{AppSubUrl}}/user/sign_up">{{.i18n.Tr "auth.sign_up_now" | Str2html}}</a>
+ <a href="{{AppSubUrl}}/user/sign_up">{{.locale.Tr "auth.sign_up_now" | Str2html}}</a>
</div>
{{end}}
@@ -56,7 +56,7 @@
<div id="oauth2-login-loader" class="ui disabled centered loader"></div>
<div>
<div id="oauth2-login-navigator">
- <p>{{.i18n.Tr "sign_in_with"}}</p>
+ <p>{{.locale.Tr "sign_in_with"}}</p>
{{range $key := .OrderedOAuth2Names}}
{{$provider := index $.OAuth2Providers $key}}
<a href="{{AppSubUrl}}/user/oauth2/{{$key}}">
diff --git a/templates/user/auth/signin_navbar.tmpl b/templates/user/auth/signin_navbar.tmpl
index 464dec8193..e77dc42d50 100644
--- a/templates/user/auth/signin_navbar.tmpl
+++ b/templates/user/auth/signin_navbar.tmpl
@@ -2,7 +2,7 @@
<div class="ui secondary pointing tabular top attached borderless menu new-menu navbar">
<div class="new-menu-inner">
<a class="{{if .PageIsLogin}}active{{end}} item" rel="nofollow" href="{{AppSubUrl}}/user/login">
- {{.i18n.Tr "auth.login_userpass"}}
+ {{.locale.Tr "auth.login_userpass"}}
</a>
{{if .EnableOpenIDSignIn}}
<a class="{{if .PageIsLoginOpenID}}active{{end}} item" rel="nofollow" href="{{AppSubUrl}}/user/login/openid">
diff --git a/templates/user/auth/signin_openid.tmpl b/templates/user/auth/signin_openid.tmpl
index b7d9b9f636..87004eda92 100644
--- a/templates/user/auth/signin_openid.tmpl
+++ b/templates/user/auth/signin_openid.tmpl
@@ -11,7 +11,7 @@
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<div class="inline field">
- {{.i18n.Tr "auth.openid_signin_desc"}}
+ {{.locale.Tr "auth.openid_signin_desc"}}
</div>
<div class="required inline field {{if .Err_OpenID}}error{{end}}">
<label for="openid">
@@ -23,13 +23,13 @@
<div class="inline field">
<label></label>
<div class="ui checkbox">
- <label>{{.i18n.Tr "auth.remember_me"}}</label>
+ <label>{{.locale.Tr "auth.remember_me"}}</label>
<input name="remember" type="checkbox">
</div>
</div>
<div class="inline field">
<label></label>
- <button class="ui green button">{{.i18n.Tr "sign_in"}}</button>
+ <button class="ui green button">{{.locale.Tr "sign_in"}}</button>
</div>
</form>
</div>
diff --git a/templates/user/auth/signup_inner.tmpl b/templates/user/auth/signup_inner.tmpl
index cbfb95e444..356c3e1cdc 100644
--- a/templates/user/auth/signup_inner.tmpl
+++ b/templates/user/auth/signup_inner.tmpl
@@ -1,9 +1,9 @@
<div class="ui container column fluid{{if .LinkAccountMode}} icon{{end}}">
<h4 class="ui top attached header center">
{{if .LinkAccountMode}}
- {{.i18n.Tr "auth.oauth_signup_title"}}
+ {{.locale.Tr "auth.oauth_signup_title"}}
{{else}}
- {{.i18n.Tr "sign_up"}}
+ {{.locale.Tr "sign_up"}}
{{end}}
</h4>
<div class="ui attached segment">
@@ -13,24 +13,24 @@
{{template "base/alert" .}}
{{end}}
{{if .DisableRegistration}}
- <p>{{.i18n.Tr "auth.disable_register_prompt"}}</p>
+ <p>{{.locale.Tr "auth.disable_register_prompt"}}</p>
{{else}}
<div class="required inline field {{if and (.Err_UserName) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
- <label for="user_name">{{.i18n.Tr "username"}}</label>
+ <label for="user_name">{{.locale.Tr "username"}}</label>
<input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required>
</div>
<div class="required inline field {{if .Err_Email}}error{{end}}">
- <label for="email">{{.i18n.Tr "email"}}</label>
+ <label for="email">{{.locale.Tr "email"}}</label>
<input id="email" name="email" type="email" value="{{.email}}" required>
</div>
{{if not .DisablePassword}}
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
- <label for="password">{{.i18n.Tr "password"}}</label>
+ <label for="password">{{.locale.Tr "password"}}</label>
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="new-password" required>
</div>
<div class="required inline field {{if and (.Err_Password) (or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister))}}error{{end}}">
- <label for="retype">{{.i18n.Tr "re_type"}}</label>
+ <label for="retype">{{.locale.Tr "re_type"}}</label>
<input id="retype" name="retype" type="password" value="{{.retype}}" autocomplete="new-password" required>
</div>
{{end}}
@@ -40,7 +40,7 @@
{{.Captcha.CreateHTML}}
</div>
<div class="required inline field {{if .Err_Captcha}}error{{end}}">
- <label for="captcha">{{.i18n.Tr "captcha"}}</label>
+ <label for="captcha">{{.locale.Tr "captcha"}}</label>
<input id="captcha" name="captcha" value="{{.captcha}}" autocomplete="off">
</div>
{{end}}
@@ -59,9 +59,9 @@
<label></label>
<button class="ui green button">
{{if .LinkAccountMode}}
- {{.i18n.Tr "auth.oauth_signup_submit"}}
+ {{.locale.Tr "auth.oauth_signup_submit"}}
{{else}}
- {{.i18n.Tr "auth.create_new_account"}}
+ {{.locale.Tr "auth.create_new_account"}}
{{end}}
</button>
</div>
@@ -69,7 +69,7 @@
{{if not .LinkAccountMode}}
<div class="inline field">
<label></label>
- <a href="{{AppSubUrl}}/user/login">{{.i18n.Tr "auth.register_helper_msg"}}</a>
+ <a href="{{AppSubUrl}}/user/login">{{.locale.Tr "auth.register_helper_msg"}}</a>
</div>
{{end}}
{{end}}
diff --git a/templates/user/auth/signup_openid_connect.tmpl b/templates/user/auth/signup_openid_connect.tmpl
index de97876190..b023ca1125 100644
--- a/templates/user/auth/signup_openid_connect.tmpl
+++ b/templates/user/auth/signup_openid_connect.tmpl
@@ -4,20 +4,20 @@
<div class="ui container">
{{template "base/alert" .}}
<h4 class="ui top attached header">
- {{.i18n.Tr "auth.openid_connect_title"}}
+ {{.locale.Tr "auth.openid_connect_title"}}
</h4>
<div class="ui attached segment">
<p>
- {{.i18n.Tr "auth.openid_connect_desc"}}
+ {{.locale.Tr "auth.openid_connect_desc"}}
</p>
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<div class="required inline field {{if .Err_UserName}}error{{end}}">
- <label for="user_name">{{.i18n.Tr "home.uname_holder"}}</label>
+ <label for="user_name">{{.locale.Tr "home.uname_holder"}}</label>
<input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required>
</div>
<div class="required inline field {{if .Err_Password}}error{{end}}">
- <label for="password">{{.i18n.Tr "password"}}</label>
+ <label for="password">{{.locale.Tr "password"}}</label>
<input id="password" name="password" type="password" value="{{.password}}" autocomplete="off" required>
</div>
<div class="inline field">
@@ -26,8 +26,8 @@
</div>
<div class="inline field">
<label></label>
- <button class="ui green button">{{.i18n.Tr "auth.openid_connect_submit"}}</button>
- <a href="{{AppSubUrl}}/user/forgot_password">{{.i18n.Tr "auth.forgot_password"}}</a>
+ <button class="ui green button">{{.locale.Tr "auth.openid_connect_submit"}}</button>
+ <a href="{{AppSubUrl}}/user/forgot_password">{{.locale.Tr "auth.forgot_password"}}</a>
</div>
</form>
</div>
diff --git a/templates/user/auth/signup_openid_navbar.tmpl b/templates/user/auth/signup_openid_navbar.tmpl
index b033022a8e..a62c23ef25 100644
--- a/templates/user/auth/signup_openid_navbar.tmpl
+++ b/templates/user/auth/signup_openid_navbar.tmpl
@@ -1,11 +1,11 @@
<div class="ui secondary pointing tabular top attached borderless menu stackable new-menu navbar">
<div class="new-menu-inner">
<a class="{{if .PageIsOpenIDConnect}}active{{end}} item" href="{{AppSubUrl}}/user/openid/connect">
- {{.i18n.Tr "auth.openid_connect_title"}}
+ {{.locale.Tr "auth.openid_connect_title"}}
</a>
{{if and .EnableOpenIDSignUp (not .AllowOnlyInternalRegistration)}}
<a class="{{if .PageIsOpenIDRegister}}active{{end}} item" href="{{AppSubUrl}}/user/openid/register">
- {{.i18n.Tr "auth.openid_register_title"}}
+ {{.locale.Tr "auth.openid_register_title"}}
</a>
{{end}}
</div>
diff --git a/templates/user/auth/signup_openid_register.tmpl b/templates/user/auth/signup_openid_register.tmpl
index 90af77476b..5edd7966ff 100644
--- a/templates/user/auth/signup_openid_register.tmpl
+++ b/templates/user/auth/signup_openid_register.tmpl
@@ -4,20 +4,20 @@
<div class="ui container">
{{template "base/alert" .}}
<h4 class="ui top attached header">
- {{.i18n.Tr "auth.openid_register_title"}}
+ {{.locale.Tr "auth.openid_register_title"}}
</h4>
<div class="ui attached segment">
<p>
- {{.i18n.Tr "auth.openid_register_desc"}}
+ {{.locale.Tr "auth.openid_register_desc"}}
</p>
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<div class="required inline field {{if .Err_UserName}}error{{end}}">
- <label for="user_name">{{.i18n.Tr "username"}}</label>
+ <label for="user_name">{{.locale.Tr "username"}}</label>
<input id="user_name" type="text" name="user_name" value="{{.user_name}}" autofocus required>
</div>
<div class="required inline field {{if .Err_Email}}error{{end}}">
- <label for="email">{{.i18n.Tr "email"}}</label>
+ <label for="email">{{.locale.Tr "email"}}</label>
<input id="email" name="email" type="email" value="{{.email}}" required>
</div>
{{if and .EnableCaptcha (eq .CaptchaType "image")}}
@@ -26,7 +26,7 @@
{{.Captcha.CreateHTML}}
</div>
<div class="required inline field {{if .Err_Captcha}}error{{end}}">
- <label for="captcha">{{.i18n.Tr "captcha"}}</label>
+ <label for="captcha">{{.locale.Tr "captcha"}}</label>
<input id="captcha" name="captcha" value="{{.captcha}}" autocomplete="off">
</div>
{{end}}
@@ -46,7 +46,7 @@
</div>
<div class="inline field">
<label></label>
- <button class="ui green button">{{.i18n.Tr "auth.create_new_account"}}</button>
+ <button class="ui green button">{{.locale.Tr "auth.create_new_account"}}</button>
</div>
</form>
</div>
diff --git a/templates/user/auth/twofa.tmpl b/templates/user/auth/twofa.tmpl
index a9ed66c431..5c735b27b6 100644
--- a/templates/user/auth/twofa.tmpl
+++ b/templates/user/auth/twofa.tmpl
@@ -5,19 +5,19 @@
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<h3 class="ui top attached header">
- {{.i18n.Tr "twofa"}}
+ {{.locale.Tr "twofa"}}
</h3>
<div class="ui attached segment">
{{template "base/alert" .}}
<div class="required inline field">
- <label for="passcode">{{.i18n.Tr "passcode"}}</label>
+ <label for="passcode">{{.locale.Tr "passcode"}}</label>
<input id="passcode" name="passcode" type="text" autocomplete="one-time-code" inputmode="numeric" pattern="[0-9]*" autofocus required>
</div>
<div class="inline field">
<label></label>
- <button class="ui green button">{{.i18n.Tr "auth.verify"}}</button>
- <a href="{{AppSubUrl}}/user/two_factor/scratch">{{.i18n.Tr "auth.use_scratch_code" | Str2html}}</a>
+ <button class="ui green button">{{.locale.Tr "auth.verify"}}</button>
+ <a href="{{AppSubUrl}}/user/two_factor/scratch">{{.locale.Tr "auth.use_scratch_code" | Str2html}}</a>
</div>
</div>
</form>
diff --git a/templates/user/auth/twofa_scratch.tmpl b/templates/user/auth/twofa_scratch.tmpl
index 44022300c3..bb3bbaa07f 100644
--- a/templates/user/auth/twofa_scratch.tmpl
+++ b/templates/user/auth/twofa_scratch.tmpl
@@ -5,18 +5,18 @@
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<h3 class="ui top attached header">
- {{.i18n.Tr "twofa_scratch"}}
+ {{.locale.Tr "twofa_scratch"}}
</h3>
<div class="ui attached segment">
{{template "base/alert" .}}
<div class="required inline field">
- <label for="token">{{.i18n.Tr "auth.scratch_code"}}</label>
+ <label for="token">{{.locale.Tr "auth.scratch_code"}}</label>
<input id="token" name="token" type="text" autocomplete="off" autofocus required>
</div>
<div class="inline field">
<label></label>
- <button class="ui green button">{{.i18n.Tr "auth.verify"}}</button>
+ <button class="ui green button">{{.locale.Tr "auth.verify"}}</button>
</div>
</div>
</form>
diff --git a/templates/user/auth/webauthn.tmpl b/templates/user/auth/webauthn.tmpl
index 17c9a5f580..8e82c12fc0 100644
--- a/templates/user/auth/webauthn.tmpl
+++ b/templates/user/auth/webauthn.tmpl
@@ -3,17 +3,17 @@
<div class="ui middle centered very relaxed page grid">
<div class="column">
<h3 class="ui top attached header">
- {{.i18n.Tr "twofa"}}
+ {{.locale.Tr "twofa"}}
</h3>
<div class="ui attached segment">
<i class="huge key icon"></i>
- <h3>{{.i18n.Tr "webauthn_insert_key"}}</h3>
+ <h3>{{.locale.Tr "webauthn_insert_key"}}</h3>
{{template "base/alert" .}}
- <p>{{.i18n.Tr "webauthn_sign_in"}}</p>
+ <p>{{.locale.Tr "webauthn_sign_in"}}</p>
</div>
- <div class="ui attached segment"><div class="ui active indeterminate inline loader"></div> {{.i18n.Tr "webauthn_press_button"}} </div>
+ <div class="ui attached segment"><div class="ui active indeterminate inline loader"></div> {{.locale.Tr "webauthn_press_button"}} </div>
<div class="ui attached segment">
- <a href="{{AppSubUrl}}/user/two_factor">{{.i18n.Tr "webauthn_use_twofa"}}</a>
+ <a href="{{AppSubUrl}}/user/two_factor">{{.locale.Tr "webauthn_use_twofa"}}</a>
</div>
</div>
</div>
diff --git a/templates/user/auth/webauthn_error.tmpl b/templates/user/auth/webauthn_error.tmpl
index 6f2980df7c..c3cae710f1 100644
--- a/templates/user/auth/webauthn_error.tmpl
+++ b/templates/user/auth/webauthn_error.tmpl
@@ -1,22 +1,22 @@
<div class="ui small modal" id="webauthn-error">
- <div class="header">{{.i18n.Tr "webauthn_error"}}</div>
+ <div class="header">{{.locale.Tr "webauthn_error"}}</div>
<div class="content">
<div class="ui negative message">
<div class="header">
- {{.i18n.Tr "webauthn_error"}}
+ {{.locale.Tr "webauthn_error"}}
</div>
- <div class="hide" data-webauthn-error-msg="browser"><p>{{.i18n.Tr "webauthn_unsupported_browser"}}</div>
- <div class="hide" data-webauthn-error-msg="unknown"><p>{{.i18n.Tr "webauthn_error_unknown"}}</div>
- <div class="hide" data-webauthn-error-msg="insecure"><p>{{.i18n.Tr "webauthn_error_insecure"}}</div>
- <div class="hide" data-webauthn-error-msg="unable-to-process"><p>{{.i18n.Tr "webauthn_error_unable_to_process"}}</div>
- <div class="hide" data-webauthn-error-msg="duplicated"><p>{{.i18n.Tr "webauthn_error_duplicated"}}</div>
- <div class="hide" data-webauthn-error-msg="empty"><p>{{.i18n.Tr "webauthn_error_empty"}}</div>
- <div class="hide" data-webauthn-error-msg="timeout"><p>{{.i18n.Tr "webauthn_error_timeout"}}</div>
+ <div class="hide" data-webauthn-error-msg="browser"><p>{{.locale.Tr "webauthn_unsupported_browser"}}</div>
+ <div class="hide" data-webauthn-error-msg="unknown"><p>{{.locale.Tr "webauthn_error_unknown"}}</div>
+ <div class="hide" data-webauthn-error-msg="insecure"><p>{{.locale.Tr "webauthn_error_insecure"}}</div>
+ <div class="hide" data-webauthn-error-msg="unable-to-process"><p>{{.locale.Tr "webauthn_error_unable_to_process"}}</div>
+ <div class="hide" data-webauthn-error-msg="duplicated"><p>{{.locale.Tr "webauthn_error_duplicated"}}</div>
+ <div class="hide" data-webauthn-error-msg="empty"><p>{{.locale.Tr "webauthn_error_empty"}}</div>
+ <div class="hide" data-webauthn-error-msg="timeout"><p>{{.locale.Tr "webauthn_error_timeout"}}</div>
<div class="hide" data-webauthn-error-msg="general"></div>
</div>
</div>
<div class="actions">
- <button onclick="window.location.reload()" class="success ui button hide webauthn_error_timeout">{{.i18n.Tr "webauthn_reload"}}</button>
- <div class="ui cancel button">{{.i18n.Tr "cancel"}}</div>
+ <button onclick="window.location.reload()" class="success ui button hide webauthn_error_timeout">{{.locale.Tr "webauthn_reload"}}</button>
+ <div class="ui cancel button">{{.locale.Tr "cancel"}}</div>
</div>
</div>
diff --git a/templates/user/dashboard/feeds.tmpl b/templates/user/dashboard/feeds.tmpl
index d3a8afcb55..95e2239257 100644
--- a/templates/user/dashboard/feeds.tmpl
+++ b/templates/user/dashboard/feeds.tmpl
@@ -13,71 +13,71 @@
{{.ShortActUserName}}
{{end}}
{{if eq .GetOpType 1}}
- {{$.i18n.Tr "action.create_repo" (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
+ {{$.locale.Tr "action.create_repo" (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
{{else if eq .GetOpType 2}}
- {{$.i18n.Tr "action.rename_repo" (.GetContent|Escape) (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
+ {{$.locale.Tr "action.rename_repo" (.GetContent|Escape) (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
{{else if eq .GetOpType 5}}
{{if .Content}}
- {{$.i18n.Tr "action.commit_repo" (.GetRepoLink|Escape) (.GetRefLink|Escape) (Escape .GetBranch) (.ShortRepoPath|Escape) | Str2html}}
+ {{$.locale.Tr "action.commit_repo" (.GetRepoLink|Escape) (.GetRefLink|Escape) (Escape .GetBranch) (.ShortRepoPath|Escape) | Str2html}}
{{else}}
- {{$.i18n.Tr "action.create_branch" (.GetRepoLink|Escape) (.GetRefLink|Escape) (Escape .GetBranch) (.ShortRepoPath|Escape) | Str2html}}
+ {{$.locale.Tr "action.create_branch" (.GetRepoLink|Escape) (.GetRefLink|Escape) (Escape .GetBranch) (.ShortRepoPath|Escape) | Str2html}}
{{end}}
{{else if eq .GetOpType 6}}
{{ $index := index .GetIssueInfos 0}}
- {{$.i18n.Tr "action.create_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
+ {{$.locale.Tr "action.create_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
{{else if eq .GetOpType 7}}
{{ $index := index .GetIssueInfos 0}}
- {{$.i18n.Tr "action.create_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
+ {{$.locale.Tr "action.create_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
{{else if eq .GetOpType 8}}
- {{$.i18n.Tr "action.transfer_repo" .GetContent (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
+ {{$.locale.Tr "action.transfer_repo" .GetContent (.GetRepoLink|Escape) (.ShortRepoPath|Escape) | Str2html}}
{{else if eq .GetOpType 9}}
- {{$.i18n.Tr "action.push_tag" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetTag|Escape) (.ShortRepoPath|Escape) | Str2html}}
+ {{$.locale.Tr "action.push_tag" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetTag|Escape) (.ShortRepoPath|Escape) | Str2html}}
{{else if eq .GetOpType 10}}
{{ $index := index .GetIssueInfos 0}}
- {{$.i18n.Tr "action.comment_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
+ {{$.locale.Tr "action.comment_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
{{else if eq .GetOpType 11}}
{{ $index := index .GetIssueInfos 0}}
- {{$.i18n.Tr "action.merge_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
+ {{$.locale.Tr "action.merge_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
{{else if eq .GetOpType 12}}
{{ $index := index .GetIssueInfos 0}}
- {{$.i18n.Tr "action.close_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
+ {{$.locale.Tr "action.close_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
{{else if eq .GetOpType 13}}
{{ $index := index .GetIssueInfos 0}}
- {{$.i18n.Tr "action.reopen_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
+ {{$.locale.Tr "action.reopen_issue" ((printf "%s/issues/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
{{else if eq .GetOpType 14}}
{{ $index := index .GetIssueInfos 0}}
- {{$.i18n.Tr "action.close_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
+ {{$.locale.Tr "action.close_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
{{else if eq .GetOpType 15}}
{{ $index := index .GetIssueInfos 0}}
- {{$.i18n.Tr "action.reopen_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
+ {{$.locale.Tr "action.reopen_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
{{else if eq .GetOpType 16}}
{{ $index := index .GetIssueInfos 0}}
- {{$.i18n.Tr "action.delete_tag" (.GetRepoLink|Escape) (.GetTag|Escape) (.ShortRepoPath|Escape) | Str2html}}
+ {{$.locale.Tr "action.delete_tag" (.GetRepoLink|Escape) (.GetTag|Escape) (.ShortRepoPath|Escape) | Str2html}}
{{else if eq .GetOpType 17}}
{{ $index := index .GetIssueInfos 0}}
- {{$.i18n.Tr "action.delete_branch" (.GetRepoLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
+ {{$.locale.Tr "action.delete_branch" (.GetRepoLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
{{else if eq .GetOpType 18}}
- {{$.i18n.Tr "action.mirror_sync_push" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
+ {{$.locale.Tr "action.mirror_sync_push" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
{{else if eq .GetOpType 19}}
- {{$.i18n.Tr "action.mirror_sync_create" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
+ {{$.locale.Tr "action.mirror_sync_create" (.GetRepoLink|Escape) (.GetRefLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
{{else if eq .GetOpType 20}}
- {{$.i18n.Tr "action.mirror_sync_delete" (.GetRepoLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
+ {{$.locale.Tr "action.mirror_sync_delete" (.GetRepoLink|Escape) (.GetBranch|Escape) (.ShortRepoPath|Escape) | Str2html}}
{{else if eq .GetOpType 21}}
{{ $index := index .GetIssueInfos 0}}
- {{$.i18n.Tr "action.approve_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
+ {{$.locale.Tr "action.approve_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
{{else if eq .GetOpType 22}}
{{ $index := index .GetIssueInfos 0}}
- {{$.i18n.Tr "action.reject_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
+ {{$.locale.Tr "action.reject_pull_request" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
{{else if eq .GetOpType 23}}
{{ $index := index .GetIssueInfos 0}}
- {{$.i18n.Tr "action.comment_pull" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
+ {{$.locale.Tr "action.comment_pull" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) | Str2html}}
{{else if eq .GetOpType 24}}
{{ $linkText := .Content | RenderEmoji }}
- {{$.i18n.Tr "action.publish_release" (.GetRepoLink|Escape) ((printf "%s/releases/tag/%s" .GetRepoLink .GetTag)|Escape) (.ShortRepoPath|Escape) $linkText | Str2html}}
+ {{$.locale.Tr "action.publish_release" (.GetRepoLink|Escape) ((printf "%s/releases/tag/%s" .GetRepoLink .GetTag)|Escape) (.ShortRepoPath|Escape) $linkText | Str2html}}
{{else if eq .GetOpType 25}}
{{ $index := index .GetIssueInfos 0}}
{{ $reviewer := index .GetIssueInfos 1}}
- {{$.i18n.Tr "action.review_dismissed" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) $reviewer | Str2html}}
+ {{$.locale.Tr "action.review_dismissed" ((printf "%s/pulls/%s" .GetRepoLink $index) |Escape) $index (.ShortRepoPath|Escape) $reviewer | Str2html}}
{{end}}
</p>
{{if or (eq .GetOpType 5) (eq .GetOpType 18)}}
@@ -95,7 +95,7 @@
</span>
</li>
{{end}}
- {{if and (gt $push.Len 1) $push.CompareURL}}<li><a href="{{AppSubUrl}}/{{$push.CompareURL}}">{{$.i18n.Tr "action.compare_commits" $push.Len}} »</a></li>{{end}}
+ {{if and (gt $push.Len 1) $push.CompareURL}}<li><a href="{{AppSubUrl}}/{{$push.CompareURL}}">{{$.locale.Tr "action.compare_commits" $push.Len}} »</a></li>{{end}}
</ul>
</div>
{{else if eq .GetOpType 6}}
@@ -111,10 +111,10 @@
{{else if or (eq .GetOpType 12) (eq .GetOpType 13) (eq .GetOpType 14) (eq .GetOpType 15)}}
<span class="text truncate issue title">{{.GetIssueTitle | RenderEmoji}}</span>
{{else if eq .GetOpType 25}}
- <p class="text light grey">{{$.i18n.Tr "action.review_dismissed_reason"}}</p>
+ <p class="text light grey">{{$.locale.Tr "action.review_dismissed_reason"}}</p>
<p class="text light grey">{{index .GetIssueInfos 2 | RenderEmoji}}</p>
{{end}}
- <p class="text italic light grey">{{TimeSince .GetCreate $.i18n}}</p>
+ <p class="text italic light grey">{{TimeSince .GetCreate $.locale}}</p>
</div>
</div>
<div class="ui two wide right aligned column">
diff --git a/templates/user/dashboard/issues.tmpl b/templates/user/dashboard/issues.tmpl
index 9024d9ede6..b2f4863d6c 100644
--- a/templates/user/dashboard/issues.tmpl
+++ b/templates/user/dashboard/issues.tmpl
@@ -6,24 +6,24 @@
<div class="four wide column">
<div class="ui secondary vertical filter menu">
<a class="{{if eq .ViewType "your_repositories"}}ui basic primary button{{end}} item" href="{{.Link}}?type=your_repositories&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}">
- {{.i18n.Tr "home.issues.in_your_repos"}}
+ {{.locale.Tr "home.issues.in_your_repos"}}
<strong class="ui right">{{CountFmt .IssueStats.YourRepositoriesCount}}</strong>
</a>
<a class="{{if eq .ViewType "assigned"}}ui basic primary button{{end}} item" href="{{.Link}}?type=assigned&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}">
- {{.i18n.Tr "repo.issues.filter_type.assigned_to_you"}}
+ {{.locale.Tr "repo.issues.filter_type.assigned_to_you"}}
<strong class="ui right">{{CountFmt .IssueStats.AssignCount}}</strong>
</a>
<a class="{{if eq .ViewType "created_by"}}ui basic primary button{{end}} item" href="{{.Link}}?type=created_by&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}">
- {{.i18n.Tr "repo.issues.filter_type.created_by_you"}}
+ {{.locale.Tr "repo.issues.filter_type.created_by_you"}}
<strong class="ui right">{{CountFmt .IssueStats.CreateCount}}</strong>
</a>
<a class="{{if eq .ViewType "mentioned"}}ui basic primary button{{end}} item" href="{{.Link}}?type=mentioned&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}">
- {{.i18n.Tr "repo.issues.filter_type.mentioning_you"}}
+ {{.locale.Tr "repo.issues.filter_type.mentioning_you"}}
<strong class="ui right">{{CountFmt .IssueStats.MentionCount}}</strong>
</a>
{{if .PageIsPulls}}
<a class="{{if eq .ViewType "review_requested"}}ui basic primary button{{end}} item" href="{{.Link}}?type=review_requested&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state={{.State}}">
- {{.i18n.Tr "repo.issues.filter_type.review_requested"}}
+ {{.locale.Tr "repo.issues.filter_type.review_requested"}}
<strong class="ui right">{{CountFmt .IssueStats.ReviewRequestedCount}}</strong>
</a>
{{end}}
@@ -61,11 +61,11 @@
<div class="ui compact tiny menu">
<a class="item{{if not .IsShowClosed}} active{{end}}" href="{{.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state=open&q={{$.Keyword}}">
{{svg "octicon-issue-opened" 16 "mr-3"}}
- {{JsPrettyNumber .IssueStats.OpenCount}}&nbsp;{{.i18n.Tr "repo.issues.open_title"}}
+ {{JsPrettyNumber .IssueStats.OpenCount}}&nbsp;{{.locale.Tr "repo.issues.open_title"}}
</a>
<a class="item{{if .IsShowClosed}} active{{end}}" href="{{.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state=closed&q={{$.Keyword}}">
{{svg "octicon-issue-closed" 16 "mr-3"}}
- {{JsPrettyNumber .IssueStats.ClosedCount}}&nbsp;{{.i18n.Tr "repo.issues.closed_title"}}
+ {{JsPrettyNumber .IssueStats.ClosedCount}}&nbsp;{{.locale.Tr "repo.issues.closed_title"}}
</a>
</div>
</div>
@@ -76,8 +76,8 @@
<input type="hidden" name="repos" value="[{{range $.RepoIDs}}{{.}}%2C{{end}}]"/>
<input type="hidden" name="sort" value="{{$.SortType}}"/>
<input type="hidden" name="state" value="{{$.State}}"/>
- <input name="q" value="{{$.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}...">
- <button class="ui primary button" type="submit">{{.i18n.Tr "explore.search"}}</button>
+ <input name="q" value="{{$.Keyword}}" placeholder="{{.locale.Tr "explore.search"}}...">
+ <button class="ui primary button" type="submit">{{.locale.Tr "explore.search"}}</button>
</div>
</form>
</div>
@@ -85,18 +85,18 @@
<!-- Sort -->
<div class="ui dropdown type jump item">
<span class="text">
- {{.i18n.Tr "repo.issues.filter_sort"}}
+ {{.locale.Tr "repo.issues.filter_sort"}}
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
</span>
<div class="menu">
- <a class="{{if or (eq .SortType "latest") (not .SortType)}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=latest&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.issues.filter_sort.latest"}}</a>
- <a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=oldest&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.issues.filter_sort.oldest"}}</a>
- <a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=recentupdate&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.issues.filter_sort.recentupdate"}}</a>
- <a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=leastupdate&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.issues.filter_sort.leastupdate"}}</a>
- <a class="{{if eq .SortType "mostcomment"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=mostcomment&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.issues.filter_sort.mostcomment"}}</a>
- <a class="{{if eq .SortType "leastcomment"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=leastcomment&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.issues.filter_sort.leastcomment"}}</a>
- <a class="{{if eq .SortType "nearduedate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=nearduedate&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.issues.filter_sort.nearduedate"}}</a>
- <a class="{{if eq .SortType "farduedate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=farduedate&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.issues.filter_sort.farduedate"}}</a>
+ <a class="{{if or (eq .SortType "latest") (not .SortType)}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=latest&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.latest"}}</a>
+ <a class="{{if eq .SortType "oldest"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=oldest&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.oldest"}}</a>
+ <a class="{{if eq .SortType "recentupdate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=recentupdate&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.recentupdate"}}</a>
+ <a class="{{if eq .SortType "leastupdate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=leastupdate&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.leastupdate"}}</a>
+ <a class="{{if eq .SortType "mostcomment"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=mostcomment&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.mostcomment"}}</a>
+ <a class="{{if eq .SortType "leastcomment"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=leastcomment&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.leastcomment"}}</a>
+ <a class="{{if eq .SortType "nearduedate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=nearduedate&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.nearduedate"}}</a>
+ <a class="{{if eq .SortType "farduedate"}}active{{end}} item" href="{{$.Link}}?type={{$.ViewType}}&repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=farduedate&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.issues.filter_sort.farduedate"}}</a>
</div>
</div>
</div>
diff --git a/templates/user/dashboard/milestones.tmpl b/templates/user/dashboard/milestones.tmpl
index f231d52215..9044c7a2a4 100644
--- a/templates/user/dashboard/milestones.tmpl
+++ b/templates/user/dashboard/milestones.tmpl
@@ -6,7 +6,7 @@
<div class="four wide column">
<div class="ui secondary vertical filter menu">
<a class="item" href="{{.Link}}?type=your_repositories&sort={{$.SortType}}&state={{.State}}&q={{$.Keyword}}">
- {{.i18n.Tr "home.issues.in_your_repos"}}
+ {{.locale.Tr "home.issues.in_your_repos"}}
<strong class="ui right">{{.Total}}</strong>
</a>
<div class="ui divider"></div>
@@ -39,11 +39,11 @@
<div class="ui compact tiny menu">
<a class="item{{if not .IsShowClosed}} active{{end}}" href="{{.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state=open&q={{$.Keyword}}">
{{svg "octicon-milestone" 16 "mr-3"}}
- {{JsPrettyNumber .MilestoneStats.OpenCount}}&nbsp;{{.i18n.Tr "repo.issues.open_title"}}
+ {{JsPrettyNumber .MilestoneStats.OpenCount}}&nbsp;{{.locale.Tr "repo.issues.open_title"}}
</a>
<a class="item{{if .IsShowClosed}} active{{end}}" href="{{.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort={{$.SortType}}&state=closed&q={{$.Keyword}}">
{{svg "octicon-check" 16 "mr-3"}}
- {{JsPrettyNumber .MilestoneStats.ClosedCount}}&nbsp;{{.i18n.Tr "repo.issues.closed_title"}}
+ {{JsPrettyNumber .MilestoneStats.ClosedCount}}&nbsp;{{.locale.Tr "repo.issues.closed_title"}}
</a>
</div>
</div>
@@ -54,8 +54,8 @@
<input type="hidden" name="repos" value="[{{range $.RepoIDs}}{{.}},{{end}}]"/>
<input type="hidden" name="sort" value="{{$.SortType}}"/>
<input type="hidden" name="state" value="{{$.State}}"/>
- <input name="q" value="{{$.Keyword}}" placeholder="{{.i18n.Tr "explore.search"}}...">
- <button class="ui primary button" type="submit">{{.i18n.Tr "explore.search"}}</button>
+ <input name="q" value="{{$.Keyword}}" placeholder="{{.locale.Tr "explore.search"}}...">
+ <button class="ui primary button" type="submit">{{.locale.Tr "explore.search"}}</button>
</div>
</form>
</div>
@@ -63,16 +63,16 @@
<!-- Sort -->
<div class="ui dropdown type jump item">
<span class="text">
- {{.i18n.Tr "repo.issues.filter_sort"}}
+ {{.locale.Tr "repo.issues.filter_sort"}}
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
</span>
<div class="menu">
- <a class="{{if or (eq .SortType "closestduedate") (not .SortType)}}active{{end}} item" href="{{$.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=closestduedate&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.milestones.filter_sort.closest_due_date"}}</a>
- <a class="{{if eq .SortType "furthestduedate"}}active{{end}} item" href="{{$.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=furthestduedate&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.milestones.filter_sort.furthest_due_date"}}</a>
- <a class="{{if eq .SortType "leastcomplete"}}active{{end}} item" href="{{$.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=leastcomplete&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.milestones.filter_sort.least_complete"}}</a>
- <a class="{{if eq .SortType "mostcomplete"}}active{{end}} item" href="{{$.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=mostcomplete&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.milestones.filter_sort.most_complete"}}</a>
- <a class="{{if eq .SortType "mostissues"}}active{{end}} item" href="{{$.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=mostissues&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.milestones.filter_sort.most_issues"}}</a>
- <a class="{{if eq .SortType "leastissues"}}active{{end}} item" href="{{$.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=leastissues&state={{$.State}}&q={{$.Keyword}}">{{.i18n.Tr "repo.milestones.filter_sort.least_issues"}}</a>
+ <a class="{{if or (eq .SortType "closestduedate") (not .SortType)}}active{{end}} item" href="{{$.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=closestduedate&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.milestones.filter_sort.closest_due_date"}}</a>
+ <a class="{{if eq .SortType "furthestduedate"}}active{{end}} item" href="{{$.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=furthestduedate&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.milestones.filter_sort.furthest_due_date"}}</a>
+ <a class="{{if eq .SortType "leastcomplete"}}active{{end}} item" href="{{$.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=leastcomplete&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.milestones.filter_sort.least_complete"}}</a>
+ <a class="{{if eq .SortType "mostcomplete"}}active{{end}} item" href="{{$.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=mostcomplete&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.milestones.filter_sort.most_complete"}}</a>
+ <a class="{{if eq .SortType "mostissues"}}active{{end}} item" href="{{$.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=mostissues&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.milestones.filter_sort.most_issues"}}</a>
+ <a class="{{if eq .SortType "leastissues"}}active{{end}} item" href="{{$.Link}}?repos=[{{range $.RepoIDs}}{{.}}%2C{{end}}]&sort=leastissues&state={{$.State}}&q={{$.Keyword}}">{{.locale.Tr "repo.milestones.filter_sort.least_issues"}}</a>
</div>
</div>
</div>
@@ -91,22 +91,22 @@
</div>
</div>
<div class="meta">
- {{ $closedDate:= TimeSinceUnix .ClosedDateUnix $.i18n }}
+ {{ $closedDate:= TimeSinceUnix .ClosedDateUnix $.locale }}
{{if .IsClosed}}
- {{svg "octicon-clock"}} {{$.i18n.Tr "repo.milestones.closed" $closedDate|Str2html}}
+ {{svg "octicon-clock"}} {{$.locale.Tr "repo.milestones.closed" $closedDate|Str2html}}
{{else}}
{{svg "octicon-calendar"}}
{{if .DeadlineString}}
<span {{if .IsOverdue}}class="overdue"{{end}}>{{.DeadlineString}}</span>
{{else}}
- {{$.i18n.Tr "repo.milestones.no_due_date"}}
+ {{$.locale.Tr "repo.milestones.no_due_date"}}
{{end}}
{{end}}
<span class="issue-stats">
{{svg "octicon-issue-opened" 16 "mr-3"}}
- {{JsPrettyNumber .NumOpenIssues}}&nbsp;{{$.i18n.Tr "repo.issues.open_title"}}
+ {{JsPrettyNumber .NumOpenIssues}}&nbsp;{{$.locale.Tr "repo.issues.open_title"}}
{{svg "octicon-check" 16 "mr-3"}}
- {{JsPrettyNumber .NumClosedIssues}}&nbsp;{{$.i18n.Tr "repo.issues.closed_title"}}
+ {{JsPrettyNumber .NumClosedIssues}}&nbsp;{{$.locale.Tr "repo.issues.closed_title"}}
{{if .TotalTrackedTime}}
{{svg "octicon-clock"}} {{.TotalTrackedTime|Sec2Time}}
{{end}}
@@ -114,13 +114,13 @@
</div>
{{if and (or $.CanWriteIssues $.CanWritePulls) (not $.Repository.IsArchived)}}
<div class="ui right operate">
- <a href="{{$.Link}}/{{.ID}}/edit" data-id={{.ID}} data-title={{.Name}}>{{svg "octicon-pencil"}} {{$.i18n.Tr "repo.issues.label_edit"}}</a>
+ <a href="{{$.Link}}/{{.ID}}/edit" data-id={{.ID}} data-title={{.Name}}>{{svg "octicon-pencil"}} {{$.locale.Tr "repo.issues.label_edit"}}</a>
{{if .IsClosed}}
- <a href="{{$.Link}}/{{.ID}}/open" data-id={{.ID}} data-title={{.Name}}>{{svg "octicon-check"}} {{$.i18n.Tr "repo.milestones.open"}}</a>
+ <a href="{{$.Link}}/{{.ID}}/open" data-id={{.ID}} data-title={{.Name}}>{{svg "octicon-check"}} {{$.locale.Tr "repo.milestones.open"}}</a>
{{else}}
- <a href="{{$.Link}}/{{.ID}}/close" data-id={{.ID}} data-title={{.Name}}>{{svg "octicon-x"}} {{$.i18n.Tr "repo.milestones.close"}}</a>
+ <a href="{{$.Link}}/{{.ID}}/close" data-id={{.ID}} data-title={{.Name}}>{{svg "octicon-x"}} {{$.locale.Tr "repo.milestones.close"}}</a>
{{end}}
- <a class="delete-button" href="#" data-url="{{$.RepoLink}}/milestones/delete" data-id="{{.ID}}">{{svg "octicon-trash"}} {{$.i18n.Tr "repo.issues.label_delete"}}</a>
+ <a class="delete-button" href="#" data-url="{{$.RepoLink}}/milestones/delete" data-id="{{.ID}}">{{svg "octicon-trash"}} {{$.locale.Tr "repo.issues.label_delete"}}</a>
</div>
{{end}}
{{if .Content}}
diff --git a/templates/user/dashboard/navbar.tmpl b/templates/user/dashboard/navbar.tmpl
index 75abe859ec..685c1a58e2 100644
--- a/templates/user/dashboard/navbar.tmpl
+++ b/templates/user/dashboard/navbar.tmpl
@@ -7,15 +7,15 @@
<span class="truncated-item-name">{{.ContextUser.ShortName 40}}</span>
{{if .ContextUser.IsOrganization}}
<span class="org-visibility">
- {{if .ContextUser.Visibility.IsLimited}}<div class="ui orange tiny horizontal label">{{.i18n.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
- {{if .ContextUser.Visibility.IsPrivate}}<div class="ui red tiny horizontal label">{{.i18n.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
+ {{if .ContextUser.Visibility.IsLimited}}<div class="ui orange tiny horizontal label">{{.locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
+ {{if .ContextUser.Visibility.IsPrivate}}<div class="ui red tiny horizontal label">{{.locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
</span>
{{end}}
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
</span>
<div class="context user overflow menu" tabindex="-1">
<div class="ui header">
- {{.i18n.Tr "home.switch_dashboard_context"}}
+ {{.locale.Tr "home.switch_dashboard_context"}}
</div>
<div class="scrolling menu items">
<a class="{{if eq .ContextUser.ID .SignedUser.ID}}active selected{{end}} item truncated-item-container" href="{{AppSubUrl}}/{{if .PageIsIssues}}issues{{else if .PageIsPulls}}pulls{{else if .PageIsMilestonesDashboard}}milestones{{end}}">
@@ -27,15 +27,15 @@
{{avatar .}}
<span class="truncated-item-name">{{.ShortName 40}}</span>
<span class="org-visibility">
- {{if .Visibility.IsLimited}}<div class="ui orange tiny horizontal label">{{$.i18n.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
- {{if .Visibility.IsPrivate}}<div class="ui red tiny horizontal label">{{$.i18n.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
+ {{if .Visibility.IsLimited}}<div class="ui orange tiny horizontal label">{{$.locale.Tr "org.settings.visibility.limited_shortname"}}</div>{{end}}
+ {{if .Visibility.IsPrivate}}<div class="ui red tiny horizontal label">{{$.locale.Tr "org.settings.visibility.private_shortname"}}</div>{{end}}
</span>
</a>
{{end}}
</div>
{{if .SignedUser.CanCreateOrganization}}
<a class="item" href="{{AppSubUrl}}/org/create">
- {{svg "octicon-plus"}}&nbsp;&nbsp;&nbsp;{{.i18n.Tr "new_org"}}
+ {{svg "octicon-plus"}}&nbsp;&nbsp;&nbsp;{{.locale.Tr "new_org"}}
</a>
{{end}}
</div>
@@ -49,17 +49,17 @@
{{if .Team}}
{{.Team.Name}}
{{else}}
- {{.i18n.Tr "org.teams"}}
+ {{.locale.Tr "org.teams"}}
{{end}}
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
</span>
<div class="context user overflow menu" tabindex="-1">
<div class="ui header">
- {{.i18n.Tr "home.filter_by_team_repositories"}}
+ {{.locale.Tr "home.filter_by_team_repositories"}}
</div>
<div class="scrolling menu items">
- <a class="{{if not $.Team}}active selected{{end}} item" title="{{.i18n.Tr "all"}}" href="{{$.Org.OrganisationLink}}/{{if $.PageIsIssues}}issues{{else if $.PageIsPulls}}pulls{{else if $.PageIsMilestonesDashboard}}milestones{{else}}dashboard{{end}}">
- {{.i18n.Tr "all"}}
+ <a class="{{if not $.Team}}active selected{{end}} item" title="{{.locale.Tr "all"}}" href="{{$.Org.OrganisationLink}}/{{if $.PageIsIssues}}issues{{else if $.PageIsPulls}}pulls{{else if $.PageIsMilestonesDashboard}}milestones{{else}}dashboard{{end}}">
+ {{.locale.Tr "all"}}
</a>
{{range .Teams}}
{{if not .IncludesAllRepositories}}
@@ -77,26 +77,26 @@
{{if .ContextUser.IsOrganization}}
<div class="right stackable menu">
<a class="{{if .PageIsNews}}active{{end}} item" style="margin-left: auto" href="{{.ContextUser.DashboardLink}}{{if .Team}}/{{PathEscape .Team.Name}}{{end}}">
- {{svg "octicon-rss"}}&nbsp;{{.i18n.Tr "activities"}}
+ {{svg "octicon-rss"}}&nbsp;{{.locale.Tr "activities"}}
</a>
{{if not .UnitIssuesGlobalDisabled}}
<a class="{{if .PageIsIssues}}active{{end}} item" href="{{.ContextUser.OrganisationLink}}/issues{{if .Team}}/{{PathEscape .Team.Name}}{{end}}">
- {{svg "octicon-issue-opened"}}&nbsp;{{.i18n.Tr "issues"}}
+ {{svg "octicon-issue-opened"}}&nbsp;{{.locale.Tr "issues"}}
</a>
{{end}}
{{if not .UnitPullsGlobalDisabled}}
<a class="{{if .PageIsPulls}}active{{end}} item" href="{{.ContextUser.OrganisationLink}}/pulls{{if .Team}}/{{PathEscape .Team.Name}}{{end}}">
- {{svg "octicon-git-pull-request"}}&nbsp;{{.i18n.Tr "pull_requests"}}
+ {{svg "octicon-git-pull-request"}}&nbsp;{{.locale.Tr "pull_requests"}}
</a>
{{end}}
{{if and .ShowMilestonesDashboardPage (not (and .UnitIssuesGlobalDisabled .UnitPullsGlobalDisabled))}}
<a class="{{if .PageIsMilestonesDashboard}}active{{end}} item" href="{{.ContextUser.OrganisationLink}}/milestones{{if .Team}}/{{PathEscape .Team.Name}}{{end}}">
- {{svg "octicon-milestone"}}&nbsp;{{.i18n.Tr "milestones"}}
+ {{svg "octicon-milestone"}}&nbsp;{{.locale.Tr "milestones"}}
</a>
{{end}}
<div class="item">
- <a class="ui primary basic button" href="{{.ContextUser.HomeLink}}" title='{{.i18n.Tr "home.view_home" .ContextUser.Name}}'>
- {{.i18n.Tr "home.view_home" (.ContextUser.ShortName 40)}}
+ <a class="ui primary basic button" href="{{.ContextUser.HomeLink}}" title='{{.locale.Tr "home.view_home" .ContextUser.Name}}'>
+ {{.locale.Tr "home.view_home" (.ContextUser.ShortName 40)}}
</a>
</div>
</div>
diff --git a/templates/user/dashboard/repolist.tmpl b/templates/user/dashboard/repolist.tmpl
index b2f936402d..3e9ff99692 100644
--- a/templates/user/dashboard/repolist.tmpl
+++ b/templates/user/dashboard/repolist.tmpl
@@ -22,73 +22,73 @@
>
<div>
<div v-if="!isOrganization" class="ui two item tabable menu">
- <a :class="{item: true, active: tab === 'repos'}" @click="changeTab('repos')">{{.i18n.Tr "repository"}}</a>
- <a :class="{item: true, active: tab === 'organizations'}" @click="changeTab('organizations')">{{.i18n.Tr "organization"}}</a>
+ <a :class="{item: true, active: tab === 'repos'}" @click="changeTab('repos')">{{.locale.Tr "repository"}}</a>
+ <a :class="{item: true, active: tab === 'organizations'}" @click="changeTab('organizations')">{{.locale.Tr "organization"}}</a>
</div>
<div v-show="tab === 'repos'" class="ui tab active list dashboard-repos">
<h4 class="ui top attached header df ac">
<div class="f1 df ac">
- {{.i18n.Tr "home.my_repos"}}
+ {{.locale.Tr "home.my_repos"}}
<span class="ui grey label ml-3">${reposTotalCount}</span>
</div>
- <a class="tooltip" :href="subUrl + '/repo/create'" data-content="{{.i18n.Tr "new_repo"}}" data-position="left center">
+ <a class="tooltip" :href="subUrl + '/repo/create'" data-content="{{.locale.Tr "new_repo"}}" data-position="left center">
{{svg "octicon-plus"}}
- <span class="sr-only">{{.i18n.Tr "new_repo"}}</span>
+ <span class="sr-only">{{.locale.Tr "new_repo"}}</span>
</a>
</h4>
<div class="ui attached segment repos-search">
<div class="ui fluid right action left icon input" :class="{loading: isLoading}">
- <input @input="changeReposFilter(reposFilter)" v-model="searchQuery" ref="search" placeholder="{{.i18n.Tr "home.search_repos"}}">
+ <input @input="changeReposFilter(reposFilter)" v-model="searchQuery" ref="search" placeholder="{{.locale.Tr "home.search_repos"}}">
<i class="icon df ac jc">{{svg "octicon-search" 16}}</i>
- <div class="ui dropdown icon button" title="{{.i18n.Tr "home.filter"}}">
+ <div class="ui dropdown icon button" title="{{.locale.Tr "home.filter"}}">
<i class="icon df ac jc m-0">{{svg "octicon-filter" 16}}</i>
<div class="menu">
<div class="item">
<a @click="toggleArchivedFilter()">
- <div class="ui checkbox" id="archivedFilterCheckbox" title="{{.i18n.Tr "home.show_both_archived_unarchived"}}" v-if="archivedFilter === 'both'">
+ <div class="ui checkbox" id="archivedFilterCheckbox" title="{{.locale.Tr "home.show_both_archived_unarchived"}}" v-if="archivedFilter === 'both'">
<input type="checkbox">
<label>
{{svg "octicon-archive" 16 "mr-2"}}
- {{.i18n.Tr "home.show_archived"}}
+ {{.locale.Tr "home.show_archived"}}
</label>
</div>
- <div class="ui checkbox" id="archivedFilterCheckbox" title="{{.i18n.Tr "home.show_only_unarchived"}}" v-if="archivedFilter === 'unarchived'">
+ <div class="ui checkbox" id="archivedFilterCheckbox" title="{{.locale.Tr "home.show_only_unarchived"}}" v-if="archivedFilter === 'unarchived'">
<input type="checkbox">
<label>
{{svg "octicon-archive" 16 "mr-2"}}
- {{.i18n.Tr "home.show_archived"}}
+ {{.locale.Tr "home.show_archived"}}
</label>
</div>
- <div class="ui checkbox" id="archivedFilterCheckbox" title="{{.i18n.Tr "home.show_only_archived"}}" v-if="archivedFilter === 'archived'">
+ <div class="ui checkbox" id="archivedFilterCheckbox" title="{{.locale.Tr "home.show_only_archived"}}" v-if="archivedFilter === 'archived'">
<input type="checkbox">
<label>
{{svg "octicon-archive" 16 "mr-2"}}
- {{.i18n.Tr "home.show_archived"}}
+ {{.locale.Tr "home.show_archived"}}
</label>
</div>
</a>
</div>
<div class="item">
<a @click="togglePrivateFilter()">
- <div class="ui checkbox" id="privateFilterCheckbox" title="{{.i18n.Tr "home.show_both_private_public"}}" v-if="privateFilter === 'both'">
+ <div class="ui checkbox" id="privateFilterCheckbox" title="{{.locale.Tr "home.show_both_private_public"}}" v-if="privateFilter === 'both'">
<input type="checkbox">
<label>
{{svg "octicon-lock" 16 "mr-2"}}
- {{.i18n.Tr "home.show_private"}}
+ {{.locale.Tr "home.show_private"}}
</label>
</div>
- <div class="ui checkbox" id="privateFilterCheckbox" title="{{.i18n.Tr "home.show_only_public"}}" v-if="privateFilter === 'public'">
+ <div class="ui checkbox" id="privateFilterCheckbox" title="{{.locale.Tr "home.show_only_public"}}" v-if="privateFilter === 'public'">
<input type="checkbox">
<label>
{{svg "octicon-lock" 16 "mr-2"}}
- {{.i18n.Tr "home.show_private"}}
+ {{.locale.Tr "home.show_private"}}
</label>
</div>
- <div class="ui checkbox" id="privateFilterCheckbox" title="{{.i18n.Tr "home.show_only_private"}}" v-if="privateFilter === 'private'">
+ <div class="ui checkbox" id="privateFilterCheckbox" title="{{.locale.Tr "home.show_only_private"}}" v-if="privateFilter === 'private'">
<input type="checkbox">
<label>
{{svg "octicon-lock" 16 "mr-2"}}
- {{.i18n.Tr "home.show_private"}}
+ {{.locale.Tr "home.show_private"}}
</label>
</div>
</a>
@@ -98,25 +98,25 @@
</div>
<div class="ui secondary tiny pointing borderless menu center grid repos-filter">
<a class="item" :class="{active: reposFilter === 'all'}" @click="changeReposFilter('all')">
- {{.i18n.Tr "all"}}
+ {{.locale.Tr "all"}}
<div v-show="reposFilter === 'all'" class="ui circular mini grey label">${repoTypeCount}</div>
</a>
<a class="item" :class="{active: reposFilter === 'sources'}" @click="changeReposFilter('sources')">
- {{.i18n.Tr "sources"}}
+ {{.locale.Tr "sources"}}
<div v-show="reposFilter === 'sources'" class="ui circular mini grey label">${repoTypeCount}</div>
</a>
<a class="item" :class="{active: reposFilter === 'forks'}" @click="changeReposFilter('forks')">
- {{.i18n.Tr "forks"}}
+ {{.locale.Tr "forks"}}
<div v-show="reposFilter === 'forks'" class="ui circular mini grey label">${repoTypeCount}</div>
</a>
{{if .MirrorsEnabled}}
<a class="item" :class="{active: reposFilter === 'mirrors'}" @click="changeReposFilter('mirrors')">
- {{.i18n.Tr "mirrors"}}
+ {{.locale.Tr "mirrors"}}
<div v-show="reposFilter === 'mirrors'" class="ui circular mini grey label">${repoTypeCount}</div>
</a>
{{end}}
<a class="item" :class="{active: reposFilter === 'collaborative'}" @click="changeReposFilter('collaborative')">
- {{.i18n.Tr "collaborative"}}
+ {{.locale.Tr "collaborative"}}
<div v-show="reposFilter === 'collaborative'" class="ui circular mini grey label">${repoTypeCount}</div>
</a>
</div>
@@ -144,20 +144,20 @@
<div v-if="showMoreReposLink" class="center py-3 border-secondary-top">
<div class="ui borderless pagination menu narrow">
<a class="item navigation py-2" :class="{'disabled': page === 1}"
- @click="changePage(1)" title="{{$.i18n.Tr "admin.first_page"}}">
+ @click="changePage(1)" title="{{$.locale.Tr "admin.first_page"}}">
{{svg "gitea-double-chevron-left" 16 "mr-2"}}
</a>
<a class="item navigation py-2" :class="{'disabled': page === 1}"
- @click="changePage(page - 1)" title="{{$.i18n.Tr "repo.issues.previous"}}">
+ @click="changePage(page - 1)" title="{{$.locale.Tr "repo.issues.previous"}}">
{{svg "octicon-chevron-left" 16 "mr-2"}}
</a>
<a class="active item py-2">${page}</a>
<a class="item navigation" :class="{'disabled': page === finalPage}"
- @click="changePage(page + 1)" title="{{$.i18n.Tr "repo.issues.next"}}">
+ @click="changePage(page + 1)" title="{{$.locale.Tr "repo.issues.next"}}">
{{svg "octicon-chevron-right" 16 "ml-2"}}
</a>
<a class="item navigation py-2" :class="{'disabled': page === finalPage}"
- @click="changePage(finalPage)" title="{{$.i18n.Tr "admin.last_page"}}">
+ @click="changePage(finalPage)" title="{{$.locale.Tr "admin.last_page"}}">
{{svg "gitea-double-chevron-right" 16 "ml-2"}}
</a>
</div>
@@ -167,12 +167,12 @@
<div v-if="!isOrganization" v-show="tab === 'organizations'" class="ui tab active list dashboard-orgs">
<h4 class="ui top attached header df ac">
<div class="f1 df ac">
- {{.i18n.Tr "home.my_orgs"}}
+ {{.locale.Tr "home.my_orgs"}}
<span class="ui grey label ml-3">${organizationsTotalCount}</span>
</div>
- <a v-if="canCreateOrganization" class="tooltip" :href="subUrl + '/org/create'" data-content="{{.i18n.Tr "new_org"}}" data-position="left center">
+ <a v-if="canCreateOrganization" class="tooltip" :href="subUrl + '/org/create'" data-content="{{.locale.Tr "new_org"}}" data-position="left center">
{{svg "octicon-plus"}}
- <span class="sr-only">{{.i18n.Tr "new_org"}}</span>
+ <span class="sr-only">{{.locale.Tr "new_org"}}</span>
</a>
</h4>
<div v-if="organizations.length" class="ui attached table segment rounded-bottom">
diff --git a/templates/user/heatmap.tmpl b/templates/user/heatmap.tmpl
index a569405d16..9d58bc8fc5 100644
--- a/templates/user/heatmap.tmpl
+++ b/templates/user/heatmap.tmpl
@@ -1,7 +1,7 @@
{{if .HeatmapData}}
<div id="user-heatmap" data-heatmap-data="{{Json .HeatmapData}}">
<div slot="loading">
- <div class="ui active centered inline indeterminate text loader" id="loading-heatmap">{{.i18n.Tr "user.heatmap.loading"}}</div>
+ <div class="ui active centered inline indeterminate text loader" id="loading-heatmap">{{.locale.Tr "user.heatmap.loading"}}</div>
</div>
</div>
<div class="ui divider"></div>
diff --git a/templates/user/notification/notification_div.tmpl b/templates/user/notification/notification_div.tmpl
index 67193169d9..6dce7f751b 100644
--- a/templates/user/notification/notification_div.tmpl
+++ b/templates/user/notification/notification_div.tmpl
@@ -1,20 +1,20 @@
<div class="page-content user notification" id="notification_div" data-params="{{.Page.GetParams}}" data-sequence-number="{{.SequenceNumber}}">
<div class="ui container">
- <h1 class="ui dividing header">{{.i18n.Tr "notification.notifications"}}</h1>
+ <h1 class="ui dividing header">{{.locale.Tr "notification.notifications"}}</h1>
<div class="ui top attached tabular menu">
{{ $notificationUnreadCount := call .NotificationUnreadCount}}
<a href="{{AppSubUrl}}/notifications?q=unread" class="{{if eq .Status 1}}active{{end}} item">
- {{.i18n.Tr "notification.unread"}}
+ {{.locale.Tr "notification.unread"}}
<div class="ui label {{if not $notificationUnreadCount}}hidden{{end}}">{{$notificationUnreadCount}}</div>
</a>
<a href="{{AppSubUrl}}/notifications?q=read" class="{{if eq .Status 2}}active{{end}} item">
- {{.i18n.Tr "notification.read"}}
+ {{.locale.Tr "notification.read"}}
</a>
{{if and (eq .Status 1)}}
<form action="{{AppSubUrl}}/notifications/purge" method="POST" style="margin-left: auto;">
{{$.CsrfTokenHtml}}
<div class="{{if not $notificationUnreadCount}}hide{{end}}">
- <button class="ui mini button primary" title='{{$.i18n.Tr "notification.mark_all_as_read"}}'>
+ <button class="ui mini button primary" title='{{$.locale.Tr "notification.mark_all_as_read"}}'>
{{svg "octicon-checklist"}}
</button>
</div>
@@ -24,9 +24,9 @@
<div class="ui bottom attached active tab segment">
{{if eq (len .Notifications) 0}}
{{if eq .Status 1}}
- {{.i18n.Tr "notification.no_unread"}}
+ {{.locale.Tr "notification.no_unread"}}
{{else}}
- {{.i18n.Tr "notification.no_read"}}
+ {{.locale.Tr "notification.no_read"}}
{{end}}
{{else}}
<table class="ui unstackable striped very compact small selectable table" id="notification_table">
@@ -79,7 +79,7 @@
{{$.CsrfTokenHtml}}
<input type="hidden" name="notification_id" value="{{.ID}}" />
<input type="hidden" name="status" value="pinned" />
- <button class="ui mini button" title='{{$.i18n.Tr "notification.pin"}}'
+ <button class="ui mini button" title='{{$.locale.Tr "notification.pin"}}'
data-url="{{AppSubUrl}}/notifications/status"
data-status="pinned"
data-page="{{$.Page.Paginater.Current}}"
@@ -97,7 +97,7 @@
<input type="hidden" name="notification_id" value="{{.ID}}" />
<input type="hidden" name="status" value="read" />
<input type="hidden" name="page" value="{{$.Page.Paginater.Current}}" />
- <button class="ui mini button" title='{{$.i18n.Tr "notification.mark_as_read"}}'
+ <button class="ui mini button" title='{{$.locale.Tr "notification.mark_as_read"}}'
data-url="{{AppSubUrl}}/notifications/status"
data-status="read"
data-page="{{$.Page.Paginater.Current}}"
@@ -112,7 +112,7 @@
<input type="hidden" name="notification_id" value="{{.ID}}" />
<input type="hidden" name="status" value="unread" />
<input type="hidden" name="page" value="{{$.Page.Paginater.Current}}" />
- <button class="ui mini button" title='{{$.i18n.Tr "notification.mark_as_unread"}}'
+ <button class="ui mini button" title='{{$.locale.Tr "notification.mark_as_unread"}}'
data-url="{{AppSubUrl}}/notifications/status"
data-status="unread"
data-page="{{$.Page.Paginater.Current}}"
diff --git a/templates/user/overview/header.tmpl b/templates/user/overview/header.tmpl
index 666805c8f6..8f9ad1d6cc 100644
--- a/templates/user/overview/header.tmpl
+++ b/templates/user/overview/header.tmpl
@@ -12,11 +12,11 @@
<div class="ui tabs container">
<div class="ui tabular stackable menu navbar">
<a class="item" href="{{.ContextUser.HomeLink}}">
- {{svg "octicon-repo"}} {{.i18n.Tr "user.repositories"}}
+ {{svg "octicon-repo"}} {{.locale.Tr "user.repositories"}}
</a>
{{if (not .UnitPackagesGlobalDisabled)}}
<a href="{{.ContextUser.HTMLURL}}/-/packages" class="{{if .IsPackagesPage}}active{{end}} item">
- {{svg "octicon-package"}} {{.i18n.Tr "packages.title"}}
+ {{svg "octicon-package"}} {{.locale.Tr "packages.title"}}
</a>
{{end}}
</div>
diff --git a/templates/user/profile.tmpl b/templates/user/profile.tmpl
index 8f67f1cee1..947c8fcebe 100644
--- a/templates/user/profile.tmpl
+++ b/templates/user/profile.tmpl
@@ -6,7 +6,7 @@
<div class="ui card">
<div id="profile-avatar" class="content df"/>
{{if eq .SignedUserName .Owner.Name}}
- <a class="image tooltip" href="{{AppSubUrl}}/user/settings" data-content="{{.i18n.Tr "user.change_avatar"}}" data-position="bottom center">
+ <a class="image tooltip" href="{{AppSubUrl}}/user/settings" data-content="{{.locale.Tr "user.change_avatar"}}" data-position="bottom center">
{{avatar .Owner 290}}
</a>
{{else}}
@@ -18,9 +18,9 @@
<div class="content word-break profile-avatar-name">
{{if .Owner.FullName}}<span class="header text center">{{.Owner.FullName}}</span>{{end}}
<span class="username text center">{{.Owner.Name}}</span>
- <a href="{{.Owner.HomeLink}}.rss"><i class="ui grey icon tooltip ml-3" data-content="{{.i18n.Tr "rss_feed"}}" data-position="bottom center">{{svg "octicon-rss" 18}}</i></a>
+ <a href="{{.Owner.HomeLink}}.rss"><i class="ui grey icon tooltip ml-3" data-content="{{.locale.Tr "rss_feed"}}" data-position="bottom center">{{svg "octicon-rss" 18}}</i></a>
<div class="mt-3">
- <a class="muted" href="{{.Owner.HomeLink}}?tab=followers">{{svg "octicon-person" 18 "mr-2"}}{{.Owner.NumFollowers}} {{.i18n.Tr "user.followers"}}</a> · <a class="muted" href="{{.Owner.HomeLink}}?tab=following">{{.Owner.NumFollowing}} {{.i18n.Tr "user.following"}}</a>
+ <a class="muted" href="{{.Owner.HomeLink}}?tab=followers">{{svg "octicon-person" 18 "mr-2"}}{{.Owner.NumFollowers}} {{.locale.Tr "user.followers"}}</a> · <a class="muted" href="{{.Owner.HomeLink}}?tab=following">{{.Owner.NumFollowing}} {{.locale.Tr "user.following"}}</a>
</div>
</div>
<div class="extra content word-break">
@@ -53,7 +53,7 @@
</li>
{{end}}
{{end}}
- <li>{{svg "octicon-clock"}} {{.i18n.Tr "user.join_on"}} {{.Owner.CreatedUnix.FormatShort}}</li>
+ <li>{{svg "octicon-clock"}} {{.locale.Tr "user.join_on"}} {{.Owner.CreatedUnix.FormatShort}}</li>
{{if and .Orgs .HasOrgsVisible}}
<li>
<ul class="user-orgs">
@@ -74,12 +74,12 @@
{{if $.IsFollowing}}
<form method="post" action="{{.Link}}?action=unfollow&redirect_to={{$.Link}}">
{{$.CsrfTokenHtml}}
- <button type="submit" class="ui basic red button">{{svg "octicon-person"}} {{.i18n.Tr "user.unfollow"}}</button>
+ <button type="submit" class="ui basic red button">{{svg "octicon-person"}} {{.locale.Tr "user.unfollow"}}</button>
</form>
{{else}}
<form method="post" action="{{.Link}}?action=follow&redirect_to={{$.Link}}">
{{$.CsrfTokenHtml}}
- <button type="submit" class="ui basic green button">{{svg "octicon-person"}} {{.i18n.Tr "user.follow"}}</button>
+ <button type="submit" class="ui basic green button">{{svg "octicon-person"}} {{.locale.Tr "user.follow"}}</button>
</form>
{{end}}
</li>
@@ -91,26 +91,26 @@
<div class="ui eleven wide column">
<div class="ui secondary stackable pointing tight menu">
<a class='{{if and (ne .TabName "activity") (ne .TabName "following") (ne .TabName "followers") (ne .TabName "stars") (ne .TabName "watching") (ne .TabName "projects")}}active{{end}} item' href="{{.Owner.HomeLink}}">
- {{svg "octicon-repo"}} {{.i18n.Tr "user.repositories"}}
+ {{svg "octicon-repo"}} {{.locale.Tr "user.repositories"}}
</a>
{{if .IsPackageEnabled}}
<a class='{{if eq .TabName "packages"}}active{{end}} item' href="{{.Owner.HomeLink}}/-/packages">
- {{svg "octicon-package"}} {{.i18n.Tr "packages.title"}}
+ {{svg "octicon-package"}} {{.locale.Tr "packages.title"}}
</a>
{{end}}
<a class='{{if eq .TabName "activity"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=activity">
- {{svg "octicon-rss"}} {{.i18n.Tr "user.activity"}}
+ {{svg "octicon-rss"}} {{.locale.Tr "user.activity"}}
</a>
{{if not .DisableStars}}
<a class='{{if eq .TabName "stars"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=stars">
- {{svg "octicon-star"}} {{.i18n.Tr "user.starred"}}
+ {{svg "octicon-star"}} {{.locale.Tr "user.starred"}}
{{if .Owner.NumStars}}
<div class="ui primary label">{{.Owner.NumStars}}</div>
{{end}}
</a>
{{else}}
<a class='{{if eq .TabName "watching"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=watching">
- {{svg "octicon-eye"}} {{.i18n.Tr "user.watched"}}
+ {{svg "octicon-eye"}} {{.locale.Tr "user.watched"}}
</a>
{{end}}
</div>
@@ -118,7 +118,7 @@
{{if eq .TabName "activity"}}
{{if .Owner.KeepActivityPrivate}}
<div class="ui info message">
- <p>{{.i18n.Tr "user.disabled_public_activity"}}</p>
+ <p>{{.locale.Tr "user.disabled_public_activity"}}</p>
</div>
{{end}}
{{template "user/heatmap" .}}
diff --git a/templates/user/project.tmpl b/templates/user/project.tmpl
index a385e0bdc5..b03787e5ef 100644
--- a/templates/user/project.tmpl
+++ b/templates/user/project.tmpl
@@ -5,12 +5,12 @@
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<h3 class="ui top attached header">
- {{.i18n.Tr "new_project"}}
+ {{.locale.Tr "new_project"}}
</h3>
<div class="ui attached segment">
{{template "base/alert" .}}
<div class="inline required field {{if .Err_Owner}}error{{end}}">
- <label>{{.i18n.Tr "repo.owner"}}</label>
+ <label>{{.locale.Tr "repo.owner"}}</label>
<div class="ui selection owner dropdown">
<input type="hidden" id="uid" name="uid" value="{{.ContextUser.ID}}" required>
<span class="text truncated-item-container" title="{{.ContextUser.Name}}">
@@ -34,22 +34,22 @@
</div>
<div class="inline field {{if .Err_Title}}error{{end}}">
- <label>{{.i18n.Tr "repo.projects.title"}}</label>
- <input name="title" placeholder="{{.i18n.Tr "repo.projects.title"}}" value="{{.title}}" autofocus required>
+ <label>{{.locale.Tr "repo.projects.title"}}</label>
+ <input name="title" placeholder="{{.locale.Tr "repo.projects.title"}}" value="{{.title}}" autofocus required>
</div>
<div class="inline field">
- <label>{{.i18n.Tr "repo.projects.desc"}}</label>
+ <label>{{.locale.Tr "repo.projects.desc"}}</label>
<textarea name="content">{{.content}}</textarea>
</div>
<div class="inline field">
- <label>{{.i18n.Tr "repo.projects.template.desc"}}</label>
+ <label>{{.locale.Tr "repo.projects.template.desc"}}</label>
<div class="ui selection dropdown">
<input type="hidden" name="board_type" value="{{.type}}">
- <div class="default text">{{.i18n.Tr "repo.projects.template.desc_helper"}}</div>
+ <div class="default text">{{.locale.Tr "repo.projects.template.desc_helper"}}</div>
<div class="menu">
{{range $element := .ProjectTypes}}
- <div class="item" data-id="{{$element.BoardType}}" data-value="{{$element.BoardType}}">{{$.i18n.Tr $element.Translation}}</div>
+ <div class="item" data-id="{{$element.BoardType}}" data-value="{{$element.BoardType}}">{{$.locale.Tr $element.Translation}}</div>
{{end}}
</div>
</div>
@@ -58,9 +58,9 @@
<div class="inline field">
<label></label>
<button class="ui green button">
- {{.i18n.Tr "repo.projects.create" }}
+ {{.locale.Tr "repo.projects.create" }}
</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/user/settings/account.tmpl b/templates/user/settings/account.tmpl
index 1b3fd136de..326a8cb512 100644
--- a/templates/user/settings/account.tmpl
+++ b/templates/user/settings/account.tmpl
@@ -4,7 +4,7 @@
<div class="ui container">
{{template "base/alert" .}}
<h4 class="ui top attached header">
- {{.i18n.Tr "settings.password"}}
+ {{.locale.Tr "settings.password"}}
</h4>
<div class="ui attached segment">
{{if or (.SignedUser.IsLocal) (.SignedUser.IsOAuth2)}}
@@ -13,43 +13,43 @@
{{.CsrfTokenHtml}}
{{if .SignedUser.IsPasswordSet}}
<div class="required field {{if .Err_OldPassword}}error{{end}}">
- <label for="old_password">{{.i18n.Tr "settings.old_password"}}</label>
+ <label for="old_password">{{.locale.Tr "settings.old_password"}}</label>
<input id="old_password" name="old_password" type="password" autocomplete="current-password" autofocus required>
</div>
{{end}}
<div class="required field {{if .Err_Password}}error{{end}}">
- <label for="password">{{.i18n.Tr "settings.new_password"}}</label>
+ <label for="password">{{.locale.Tr "settings.new_password"}}</label>
<input id="password" name="password" type="password" autocomplete="new-password" required>
</div>
<div class="required field {{if .Err_Password}}error{{end}}">
- <label for="retype">{{.i18n.Tr "settings.retype_new_password"}}</label>
+ <label for="retype">{{.locale.Tr "settings.retype_new_password"}}</label>
<input id="retype" name="retype" type="password" autocomplete="new-password" required>
</div>
<div class="field">
- <button class="ui green button">{{$.i18n.Tr "settings.change_password"}}</button>
- <a href="{{AppSubUrl}}/user/forgot_password?email={{.Email}}">{{.i18n.Tr "auth.forgot_password"}}</a>
+ <button class="ui green button">{{$.locale.Tr "settings.change_password"}}</button>
+ <a href="{{AppSubUrl}}/user/forgot_password?email={{.Email}}">{{.locale.Tr "auth.forgot_password"}}</a>
</div>
</form>
{{else}}
<div class="ui info message">
- <p class="text left">{{$.i18n.Tr "settings.password_change_disabled"}}</p>
+ <p class="text left">{{$.locale.Tr "settings.password_change_disabled"}}</p>
</div>
{{end}}
</div>
<h4 class="ui top attached header">
- {{.i18n.Tr "settings.manage_emails"}}
+ {{.locale.Tr "settings.manage_emails"}}
</h4>
<div class="ui attached segment">
<div class="ui email list">
{{if $.EnableNotifyMail}}
<div class="item">
<form action="{{AppSubUrl}}/user/settings/account/email" class="ui form" method="post">
- {{.i18n.Tr "settings.email_desc"}}
+ {{.locale.Tr "settings.email_desc"}}
<div class="right floated content">
<div class="field">
- <button class="ui green button">{{$.i18n.Tr "settings.email_notifications.submit"}}</button>
+ <button class="ui green button">{{$.locale.Tr "settings.email_notifications.submit"}}</button>
</div>
</div>
<div class="right floated content">
@@ -59,11 +59,11 @@
<div class="ui selection dropdown" tabindex="0">
<input name="preference" type="hidden" value="{{.EmailNotificationsPreference}}">
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
- <div class="text">{{$.i18n.Tr "settings.email_notifications"}}</div>
+ <div class="text">{{$.locale.Tr "settings.email_notifications"}}</div>
<div class="menu">
- <div data-value="enabled" class="{{if eq .EmailNotificationsPreference "enabled"}}active selected {{end}}item">{{$.i18n.Tr "settings.email_notifications.enable"}}</div>
- <div data-value="onmention" class="{{if eq .EmailNotificationsPreference "onmention"}}active selected {{end}}item">{{$.i18n.Tr "settings.email_notifications.onmention"}}</div>
- <div data-value="disabled" class="{{if eq .EmailNotificationsPreference "disabled"}}active selected {{end}}item">{{$.i18n.Tr "settings.email_notifications.disable"}}</div>
+ <div data-value="enabled" class="{{if eq .EmailNotificationsPreference "enabled"}}active selected {{end}}item">{{$.locale.Tr "settings.email_notifications.enable"}}</div>
+ <div data-value="onmention" class="{{if eq .EmailNotificationsPreference "onmention"}}active selected {{end}}item">{{$.locale.Tr "settings.email_notifications.onmention"}}</div>
+ <div data-value="disabled" class="{{if eq .EmailNotificationsPreference "disabled"}}active selected {{end}}item">{{$.locale.Tr "settings.email_notifications.disable"}}</div>
</div>
</div>
</div>
@@ -76,7 +76,7 @@
{{if not .IsPrimary}}
<div class="right floated content">
<button class="ui red tiny button delete-button" data-modal-id="delete-email" data-url="{{AppSubUrl}}/user/settings/account/email/delete" data-id="{{.ID}}">
- {{$.i18n.Tr "settings.delete_email"}}
+ {{$.locale.Tr "settings.delete_email"}}
</button>
</div>
{{if .CanBePrimary}}
@@ -85,7 +85,7 @@
{{$.CsrfTokenHtml}}
<input name="_method" type="hidden" value="PRIMARY">
<input name="id" type="hidden" value="{{.ID}}">
- <button class="ui primary tiny button">{{$.i18n.Tr "settings.primary_email"}}</button>
+ <button class="ui primary tiny button">{{$.locale.Tr "settings.primary_email"}}</button>
</form>
</div>
{{end}}
@@ -97,9 +97,9 @@
<input name="_method" type="hidden" value="SENDACTIVATION">
<input name="id" type="hidden" value="{{.ID}}">
{{if $.ActivationsPending}}
- <button disabled class="ui primary tiny button">{{$.i18n.Tr "settings.activations_pending"}}</button>
+ <button disabled class="ui primary tiny button">{{$.locale.Tr "settings.activations_pending"}}</button>
{{else}}
- <button class="ui primary tiny button">{{$.i18n.Tr "settings.activate_email"}}</button>
+ <button class="ui primary tiny button">{{$.locale.Tr "settings.activate_email"}}</button>
{{end}}
</form>
</div>
@@ -107,12 +107,12 @@
<div class="content">
<strong>{{.Email}}</strong>
{{if .IsPrimary}}
- <div class="ui primary label">{{$.i18n.Tr "settings.primary"}}</div>
+ <div class="ui primary label">{{$.locale.Tr "settings.primary"}}</div>
{{end}}
{{if .IsActivated}}
- <div class="ui green label">{{$.i18n.Tr "settings.activated"}}</div>
+ <div class="ui green label">{{$.locale.Tr "settings.activated"}}</div>
{{else}}
- <div class="ui label">{{$.i18n.Tr "settings.requires_activation"}}</div>
+ <div class="ui label">{{$.locale.Tr "settings.requires_activation"}}</div>
{{end}}
</div>
</div>
@@ -123,37 +123,37 @@
<form class="ui form" action="{{AppSubUrl}}/user/settings/account/email" method="post">
{{.CsrfTokenHtml}}
<div class="required field {{if .Err_Email}}error{{end}}">
- <label for="email">{{.i18n.Tr "settings.add_new_email"}}</label>
+ <label for="email">{{.locale.Tr "settings.add_new_email"}}</label>
<input id="email" name="email" type="email" required {{if not .CanAddEmails}}disabled{{end}}>
</div>
<button class="ui green button" {{if not .CanAddEmails}}disabled{{end}}>
- {{.i18n.Tr "settings.add_email"}}
+ {{.locale.Tr "settings.add_email"}}
</button>
</form>
</div>
<h4 class="ui top attached error header">
- {{.i18n.Tr "settings.delete_account"}}
+ {{.locale.Tr "settings.delete_account"}}
</h4>
<div class="ui attached error segment">
<div class="ui red message">
- <p class="text left">{{svg "octicon-alert"}} {{.i18n.Tr "settings.delete_prompt" | Str2html}}</p>
+ <p class="text left">{{svg "octicon-alert"}} {{.locale.Tr "settings.delete_prompt" | Str2html}}</p>
{{ if .UserDeleteWithComments }}
- <p class="text left" style="font-weight: bold;">{{.i18n.Tr "settings.delete_with_all_comments" .UserDeleteWithCommentsMaxTime | Str2html}}</p>
+ <p class="text left" style="font-weight: bold;">{{.locale.Tr "settings.delete_with_all_comments" .UserDeleteWithCommentsMaxTime | Str2html}}</p>
{{ end }}
</div>
<form class="ui form ignore-dirty" id="delete-form" action="{{AppSubUrl}}/user/settings/account/delete" method="post">
{{template "base/disable_form_autofill"}}
{{.CsrfTokenHtml}}
<div class="required field {{if .Err_Password}}error{{end}}">
- <label for="password-confirmation">{{.i18n.Tr "password"}}</label>
+ <label for="password-confirmation">{{.locale.Tr "password"}}</label>
<input id="password-confirmation" name="password" type="password" autocomplete="off" required>
</div>
<div class="field">
<div class="ui red button delete-button" data-modal-id="delete-account" data-type="form" data-form="#delete-form">
- {{.i18n.Tr "settings.confirm_delete_account"}}
+ {{.locale.Tr "settings.confirm_delete_account"}}
</div>
- <a href="{{AppSubUrl}}/user/forgot_password?email={{.Email}}">{{.i18n.Tr "auth.forgot_password"}}</a>
+ <a href="{{AppSubUrl}}/user/forgot_password?email={{.Email}}">{{.locale.Tr "auth.forgot_password"}}</a>
</div>
</form>
</div>
@@ -163,10 +163,10 @@
<div class="ui small basic delete modal" id="delete-email">
<div class="ui icon header">
{{svg "octicon-trash"}}
- {{.i18n.Tr "settings.email_deletion"}}
+ {{.locale.Tr "settings.email_deletion"}}
</div>
<div class="content">
- <p>{{.i18n.Tr "settings.email_deletion_desc"}}</p>
+ <p>{{.locale.Tr "settings.email_deletion_desc"}}</p>
</div>
{{template "base/delete_modal_actions" .}}
</div>
@@ -174,10 +174,10 @@
<div class="ui small basic delete modal" id="delete-account">
<div class="ui icon header">
{{svg "octicon-trash"}}
- {{.i18n.Tr "settings.delete_account_title"}}
+ {{.locale.Tr "settings.delete_account_title"}}
</div>
<div class="content">
- <p>{{.i18n.Tr "settings.delete_account_desc"}}</p>
+ <p>{{.locale.Tr "settings.delete_account_desc"}}</p>
</div>
{{template "base/delete_modal_actions" .}}
</div>
diff --git a/templates/user/settings/appearance.tmpl b/templates/user/settings/appearance.tmpl
index fe4a668dd5..233e682621 100644
--- a/templates/user/settings/appearance.tmpl
+++ b/templates/user/settings/appearance.tmpl
@@ -6,18 +6,18 @@
<!-- Theme -->
<h4 class="ui top attached header">
- {{.i18n.Tr "settings.manage_themes"}}
+ {{.locale.Tr "settings.manage_themes"}}
</h4>
<div class="ui attached segment">
<div class="ui email list">
<div class="item">
- {{.i18n.Tr "settings.theme_desc"}}
+ {{.locale.Tr "settings.theme_desc"}}
</div>
<form class="ui form" action="{{.Link}}/theme" method="post">
{{.CsrfTokenHtml}}
<div class="field">
- <label for="ui">{{.i18n.Tr "settings.ui"}}</label>
+ <label for="ui">{{.locale.Tr "settings.ui"}}</label>
<div class="ui selection dropdown" id="ui">
<input name="theme" type="hidden" value="{{.SignedUser.Theme}}">
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
@@ -38,7 +38,7 @@
</div>
<div class="field">
- <button class="ui green button">{{$.i18n.Tr "settings.update_theme"}}</button>
+ <button class="ui green button">{{$.locale.Tr "settings.update_theme"}}</button>
</div>
</form>
</div>
@@ -46,7 +46,7 @@
<!-- Language -->
<h4 class="ui top attached header">
- {{.i18n.Tr "settings.language"}}
+ {{.locale.Tr "settings.language"}}
</h4>
<div class="ui attached segment">
<form class="ui form" action="{{.Link}}/language" method="post">
@@ -64,14 +64,14 @@
</div>
</div>
<div class="field">
- <button class="ui green button">{{$.i18n.Tr "settings.update_language"}}</button>
+ <button class="ui green button">{{$.locale.Tr "settings.update_language"}}</button>
</div>
</form>
</div>
<!-- Shown comment event types -->
<h4 class="ui top attached header">
- {{.i18n.Tr "settings.hidden_comment_types"}}
+ {{.locale.Tr "settings.hidden_comment_types"}}
</h4>
<div class="ui attached segment">
<form class="ui form" action="{{.Link}}/hidden_comments" method="post">
@@ -79,90 +79,90 @@
<div class="inline field">
<div class="ui checkbox">
<input name="reference" type="checkbox" {{if(call .IsCommentTypeGroupChecked "reference")}}checked{{end}}>
- <label>{{.i18n.Tr "settings.comment_type_group_reference"}}</label>
+ <label>{{.locale.Tr "settings.comment_type_group_reference"}}</label>
</div>
</div>
<div class="inline field">
<div class="ui checkbox">
<input name="label" type="checkbox" {{if (call .IsCommentTypeGroupChecked "label")}}checked{{end}}>
- <label>{{.i18n.Tr "settings.comment_type_group_label"}}</label>
+ <label>{{.locale.Tr "settings.comment_type_group_label"}}</label>
</div>
</div>
<div class="inline field">
<div class="ui checkbox">
<input name="milestone" type="checkbox" {{if (call .IsCommentTypeGroupChecked "milestone")}}checked{{end}}>
- <label>{{.i18n.Tr "settings.comment_type_group_milestone"}}</label>
+ <label>{{.locale.Tr "settings.comment_type_group_milestone"}}</label>
</div>
</div>
<div class="inline field">
<div class="ui checkbox">
<input name="assignee" type="checkbox" {{if (call .IsCommentTypeGroupChecked "assignee")}}checked{{end}}>
- <label>{{.i18n.Tr "settings.comment_type_group_assignee"}}</label>
+ <label>{{.locale.Tr "settings.comment_type_group_assignee"}}</label>
</div>
</div>
<div class="inline field">
<div class="ui checkbox">
<input name="title" type="checkbox" {{if (call .IsCommentTypeGroupChecked "title")}}checked{{end}}>
- <label>{{.i18n.Tr "settings.comment_type_group_title"}}</label>
+ <label>{{.locale.Tr "settings.comment_type_group_title"}}</label>
</div>
</div>
<div class="inline field">
<div class="ui checkbox">
<input name="branch" type="checkbox" {{if (call .IsCommentTypeGroupChecked "branch")}}checked{{end}}>
- <label>{{.i18n.Tr "settings.comment_type_group_branch"}}</label>
+ <label>{{.locale.Tr "settings.comment_type_group_branch"}}</label>
</div>
</div>
<div class="inline field">
<div class="ui checkbox">
<input name="time_tracking" type="checkbox" {{if (call .IsCommentTypeGroupChecked "time_tracking")}}checked{{end}}>
- <label>{{.i18n.Tr "settings.comment_type_group_time_tracking"}}</label>
+ <label>{{.locale.Tr "settings.comment_type_group_time_tracking"}}</label>
</div>
</div>
<div class="inline field">
<div class="ui checkbox">
<input name="deadline" type="checkbox" {{if (call .IsCommentTypeGroupChecked "deadline")}}checked{{end}}>
- <label>{{.i18n.Tr "settings.comment_type_group_deadline"}}</label>
+ <label>{{.locale.Tr "settings.comment_type_group_deadline"}}</label>
</div>
</div>
<div class="inline field">
<div class="ui checkbox">
<input name="dependency" type="checkbox" {{if (call .IsCommentTypeGroupChecked "dependency")}}checked{{end}}>
- <label>{{.i18n.Tr "settings.comment_type_group_dependency"}}</label>
+ <label>{{.locale.Tr "settings.comment_type_group_dependency"}}</label>
</div>
</div>
<div class="inline field">
<div class="ui checkbox">
<input name="lock" type="checkbox" {{if (call .IsCommentTypeGroupChecked "lock")}}checked{{end}}>
- <label>{{.i18n.Tr "settings.comment_type_group_lock"}}</label>
+ <label>{{.locale.Tr "settings.comment_type_group_lock"}}</label>
</div>
</div>
<div class="inline field">
<div class="ui checkbox">
<input name="review_request" type="checkbox" {{if (call .IsCommentTypeGroupChecked "review_request")}}checked{{end}}>
- <label>{{.i18n.Tr "settings.comment_type_group_review_request"}}</label>
+ <label>{{.locale.Tr "settings.comment_type_group_review_request"}}</label>
</div>
</div>
<div class="inline field">
<div class="ui checkbox">
<input name="pull_request_push" type="checkbox" {{if (call .IsCommentTypeGroupChecked "pull_request_push")}}checked{{end}}>
- <label>{{.i18n.Tr "settings.comment_type_group_pull_request_push"}}</label>
+ <label>{{.locale.Tr "settings.comment_type_group_pull_request_push"}}</label>
</div>
</div>
<div class="inline field">
<div class="ui checkbox">
<input name="project" type="checkbox" {{if (call .IsCommentTypeGroupChecked "project")}}checked{{end}}>
- <label>{{.i18n.Tr "settings.comment_type_group_project"}}</label>
+ <label>{{.locale.Tr "settings.comment_type_group_project"}}</label>
</div>
</div>
<div class="inline field">
<div class="ui checkbox">
<input name="issue_ref" type="checkbox" {{if (call .IsCommentTypeGroupChecked "issue_ref")}}checked{{end}}>
- <label>{{.i18n.Tr "settings.comment_type_group_issue_ref"}}</label>
+ <label>{{.locale.Tr "settings.comment_type_group_issue_ref"}}</label>
</div>
</div>
<div class="field">
- <button class="ui green button">{{$.i18n.Tr "save"}}</button>
+ <button class="ui green button">{{$.locale.Tr "save"}}</button>
</div>
</form>
</div>
diff --git a/templates/user/settings/applications.tmpl b/templates/user/settings/applications.tmpl
index cfdfaeb1f8..c9f9fe8c25 100644
--- a/templates/user/settings/applications.tmpl
+++ b/templates/user/settings/applications.tmpl
@@ -4,26 +4,26 @@
<div class="ui container">
{{template "base/alert" .}}
<h4 class="ui top attached header">
- {{.i18n.Tr "settings.manage_access_token"}}
+ {{.locale.Tr "settings.manage_access_token"}}
</h4>
<div class="ui attached segment">
<div class="ui key list">
<div class="item">
- {{.i18n.Tr "settings.tokens_desc"}}
+ {{.locale.Tr "settings.tokens_desc"}}
</div>
{{range .Tokens}}
<div class="item">
<div class="right floated content">
<button class="ui red tiny button delete-button" data-modal-id="delete-token" data-url="{{$.Link}}/delete" data-id="{{.ID}}">
{{svg "octicon-trash" 16 "mr-2"}}
- {{$.i18n.Tr "settings.delete_token"}}
+ {{$.locale.Tr "settings.delete_token"}}
</button>
</div>
- <i class="big send icon {{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.token_state_desc"}}" data-variation="inverted tiny"{{end}}></i>
+ <i class="big send icon {{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-content="{{$.locale.Tr "settings.token_state_desc"}}" data-variation="inverted tiny"{{end}}></i>
<div class="content">
<strong>{{.Name}}</strong>
<div class="activity meta">
- <i>{{$.i18n.Tr "settings.add_on"}} <span>{{.CreatedUnix.FormatShort}}</span> — {{svg "octicon-info"}} {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{.UpdatedUnix.FormatShort}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i>
+ <i>{{$.locale.Tr "settings.add_on"}} <span>{{.CreatedUnix.FormatShort}}</span> — {{svg "octicon-info"}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{.UpdatedUnix.FormatShort}}</span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}</i>
</div>
</div>
</div>
@@ -32,17 +32,17 @@
</div>
<div class="ui attached bottom segment">
<h5 class="ui top header">
- {{.i18n.Tr "settings.generate_new_token"}}
+ {{.locale.Tr "settings.generate_new_token"}}
</h5>
- <p>{{.i18n.Tr "settings.new_token_desc"}}</p>
+ <p>{{.locale.Tr "settings.new_token_desc"}}</p>
<form class="ui form ignore-dirty" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<div class="field {{if .Err_Name}}error{{end}}">
- <label for="name">{{.i18n.Tr "settings.token_name"}}</label>
+ <label for="name">{{.locale.Tr "settings.token_name"}}</label>
<input id="name" name="name" value="{{.name}}" autofocus required>
</div>
<button class="ui green button">
- {{.i18n.Tr "settings.generate_token"}}
+ {{.locale.Tr "settings.generate_token"}}
</button>
</form>
</div>
@@ -57,19 +57,19 @@
<div class="ui small basic delete modal" id="delete-token">
<div class="ui icon header">
{{svg "octicon-trash"}}
- {{.i18n.Tr "settings.access_token_deletion"}}
+ {{.locale.Tr "settings.access_token_deletion"}}
</div>
<div class="content">
- <p>{{.i18n.Tr "settings.access_token_deletion_desc"}}</p>
+ <p>{{.locale.Tr "settings.access_token_deletion_desc"}}</p>
</div>
<div class="actions">
<div class="ui cancel button">
<i class="remove icon"></i>
- {{.i18n.Tr "settings.access_token_deletion_cancel_action"}}
+ {{.locale.Tr "settings.access_token_deletion_cancel_action"}}
</div>
<div class="ui red basic inverted ok button">
<i class="checkmark icon"></i>
- {{.i18n.Tr "settings.access_token_deletion_confirm_action"}}
+ {{.locale.Tr "settings.access_token_deletion_confirm_action"}}
</div>
</div>
</div>
diff --git a/templates/user/settings/applications_oauth2.tmpl b/templates/user/settings/applications_oauth2.tmpl
index 8218674bce..424060d2e0 100644
--- a/templates/user/settings/applications_oauth2.tmpl
+++ b/templates/user/settings/applications_oauth2.tmpl
@@ -1,23 +1,23 @@
<h4 class="ui top attached header">
- {{.i18n.Tr "settings.manage_oauth2_applications"}}
+ {{.locale.Tr "settings.manage_oauth2_applications"}}
</h4>
<div class="ui attached segment">
<div class="ui key list">
<div class="item">
- {{.i18n.Tr "settings.oauth2_application_create_description"}}
+ {{.locale.Tr "settings.oauth2_application_create_description"}}
</div>
{{range $app := .Applications}}
<div class="item">
<div class="right floated content">
<a href="{{$.Link}}/oauth2/{{$app.ID}}" class="ui primary tiny button">
{{svg "octicon-pencil" 16 "mr-2"}}
- {{$.i18n.Tr "settings.oauth2_application_edit"}}
+ {{$.locale.Tr "settings.oauth2_application_edit"}}
</a>
<button class="ui red tiny button delete-button" data-modal-id="remove-gitea-oauth2-application"
data-url="{{AppSubUrl}}/user/settings/applications/oauth2/delete"
data-id="{{$app.ID}}">
{{svg "octicon-trash" 16 "mr-2"}}
- {{$.i18n.Tr "settings.delete_key"}}
+ {{$.locale.Tr "settings.delete_key"}}
</button>
</div>
<div class="content">
@@ -29,20 +29,20 @@
</div>
<div class="ui attached bottom segment">
<h5 class="ui top header">
- {{.i18n.Tr "settings.create_oauth2_application" }}
+ {{.locale.Tr "settings.create_oauth2_application" }}
</h5>
<form class="ui form ignore-dirty" action="{{.Link}}/oauth2" method="post">
{{.CsrfTokenHtml}}
<div class="field {{if .Err_AppName}}error{{end}}">
- <label for="application-name">{{.i18n.Tr "settings.oauth2_application_name"}}</label>
+ <label for="application-name">{{.locale.Tr "settings.oauth2_application_name"}}</label>
<input id="application-name" name="application_name" value="{{.application_name}}" required>
</div>
<div class="field {{if .Err_RedirectURI}}error{{end}}">
- <label for="redirect-uri">{{.i18n.Tr "settings.oauth2_redirect_uri"}}</label>
+ <label for="redirect-uri">{{.locale.Tr "settings.oauth2_redirect_uri"}}</label>
<input type="url" name="redirect_uri" id="redirect-uri">
</div>
<button class="ui green button">
- {{.i18n.Tr "settings.create_oauth2_application_button"}}
+ {{.locale.Tr "settings.create_oauth2_application_button"}}
</button>
</form>
</div>
@@ -50,10 +50,10 @@
<div class="ui small basic delete modal" id="remove-gitea-oauth2-application">
<div class="ui icon header">
{{svg "octicon-trash"}}
- {{.i18n.Tr "settings.remove_oauth2_application"}}
+ {{.locale.Tr "settings.remove_oauth2_application"}}
</div>
<div class="content">
- <p>{{.i18n.Tr "settings.oauth2_application_remove_description"}}</p>
+ <p>{{.locale.Tr "settings.oauth2_application_remove_description"}}</p>
</div>
{{template "base/delete_modal_actions" .}}
</div>
diff --git a/templates/user/settings/applications_oauth2_edit.tmpl b/templates/user/settings/applications_oauth2_edit.tmpl
index 1f8c7f756e..be3e78e46b 100644
--- a/templates/user/settings/applications_oauth2_edit.tmpl
+++ b/templates/user/settings/applications_oauth2_edit.tmpl
@@ -4,34 +4,34 @@
<div class="ui container">
{{template "base/alert" .}}
<h4 class="ui top attached header">
- {{.i18n.Tr "settings.edit_oauth2_application"}}
+ {{.locale.Tr "settings.edit_oauth2_application"}}
</h4>
<div class="ui attached segment">
- <p>{{.i18n.Tr "settings.oauth2_application_create_description"}}</p>
+ <p>{{.locale.Tr "settings.oauth2_application_create_description"}}</p>
</div>
<div class="ui attached segment form ignore-dirty">
{{.CsrfTokenHtml}}
<div class="field">
- <label for="client-id">{{.i18n.Tr "settings.oauth2_client_id"}}</label>
+ <label for="client-id">{{.locale.Tr "settings.oauth2_client_id"}}</label>
<input id="client-id" readonly value="{{.App.ClientID}}">
</div>
{{if .ClientSecret}}
<div class="field">
- <label for="client-secret">{{.i18n.Tr "settings.oauth2_client_secret"}}</label>
+ <label for="client-secret">{{.locale.Tr "settings.oauth2_client_secret"}}</label>
<input id="client-secret" type="text" readonly value="{{.ClientSecret}}">
</div>
{{else}}
<div class="field">
- <label for="client-secret">{{.i18n.Tr "settings.oauth2_client_secret"}}</label>
+ <label for="client-secret">{{.locale.Tr "settings.oauth2_client_secret"}}</label>
<input id="client-secret" type="password" readonly value="averysecuresecret">
</div>
{{end}}
<div class="item">
<!-- TODO add regenerate secret functionality */ -->
- {{.i18n.Tr "settings.oauth2_regenerate_secret_hint"}}
+ {{.locale.Tr "settings.oauth2_regenerate_secret_hint"}}
<form class="ui form ignore-dirty" action="{{AppSubUrl}}/user/settings/applications/oauth2/{{.App.ID}}/regenerate_secret" method="post">
{{.CsrfTokenHtml}}
- <a href="#" onclick="event.target.parentNode.submit()">{{.i18n.Tr "settings.oauth2_regenerate_secret"}}</a>
+ <a href="#" onclick="event.target.parentNode.submit()">{{.locale.Tr "settings.oauth2_regenerate_secret"}}</a>
</form>
</div>
</div>
@@ -39,15 +39,15 @@
<form class="ui form ignore-dirty" action="{{AppSubUrl}}/user/settings/applications/oauth2/{{.App.ID}}" method="post">
{{.CsrfTokenHtml}}
<div class="field {{if .Err_AppName}}error{{end}}">
- <label for="application-name">{{.i18n.Tr "settings.oauth2_application_name"}}</label>
+ <label for="application-name">{{.locale.Tr "settings.oauth2_application_name"}}</label>
<input id="application-name" value="{{.App.Name}}" name="application_name" required>
</div>
<div class="field {{if .Err_RedirectURI}}error{{end}}">
- <label for="redirect-uri">{{.i18n.Tr "settings.oauth2_redirect_uri"}}</label>
+ <label for="redirect-uri">{{.locale.Tr "settings.oauth2_redirect_uri"}}</label>
<input type="url" name="redirect_uri" value="{{.App.PrimaryRedirectURI}}" id="redirect-uri">
</div>
<button class="ui green button">
- {{.i18n.Tr "settings.save_application"}}
+ {{.locale.Tr "settings.save_application"}}
</button>
</form>
</div>
@@ -57,10 +57,10 @@
<div class="ui small basic delete modal" id="delete-oauth2-application">
<div class="ui icon header">
{{svg "octicon-trash"}}
- {{.i18n.Tr "settings.remove_oauth2_application"}}
+ {{.locale.Tr "settings.remove_oauth2_application"}}
</div>
<div class="content">
- <p>{{.i18n.Tr "settings.remove_oauth2_application_desc"}}</p>
+ <p>{{.locale.Tr "settings.remove_oauth2_application_desc"}}</p>
</div>
{{template "base/delete_modal_actions" .}}
</div>
diff --git a/templates/user/settings/grants_oauth2.tmpl b/templates/user/settings/grants_oauth2.tmpl
index 35a851ff36..40432c729b 100644
--- a/templates/user/settings/grants_oauth2.tmpl
+++ b/templates/user/settings/grants_oauth2.tmpl
@@ -1,10 +1,10 @@
<h4 class="ui top attached header">
- {{.i18n.Tr "settings.authorized_oauth2_applications"}}
+ {{.locale.Tr "settings.authorized_oauth2_applications"}}
</h4>
<div class="ui attached segment">
<div class="ui key list">
<div class="item">
- {{.i18n.Tr "settings.authorized_oauth2_applications_description"}}
+ {{.locale.Tr "settings.authorized_oauth2_applications_description"}}
</div>
{{range $grant := .Grants}}
<div class="item">
@@ -12,7 +12,7 @@
<button class="ui red tiny button delete-button" data-modal-id="revoke-gitea-oauth2-grant"
data-url="{{AppSubUrl}}/user/settings/applications/oauth2/revoke"
data-id="{{$grant.ID}}">
- {{$.i18n.Tr "settings.revoke_key"}}
+ {{$.locale.Tr "settings.revoke_key"}}
</button>
</div>
<div class="left floated content">
@@ -21,7 +21,7 @@
<div class="content">
<strong>{{$grant.Application.Name}}</strong>
<div class="activity meta">
- <i>{{$.i18n.Tr "settings.add_on"}} <span>{{$grant.CreatedUnix.FormatShort}}</span></i>
+ <i>{{$.locale.Tr "settings.add_on"}} <span>{{$grant.CreatedUnix.FormatShort}}</span></i>
</div>
</div>
</div>
@@ -32,10 +32,10 @@
<div class="ui small basic delete modal" id="revoke-gitea-oauth2-grant">
<div class="ui icon header">
{{svg "octicon-shield" 16 "mr-2"}}
- {{.i18n.Tr "settings.revoke_oauth2_grant"}}
+ {{.locale.Tr "settings.revoke_oauth2_grant"}}
</div>
<div class="content">
- <p>{{.i18n.Tr "settings.revoke_oauth2_grant_description"}}</p>
+ <p>{{.locale.Tr "settings.revoke_oauth2_grant_description"}}</p>
</div>
{{template "base/delete_modal_actions" .}}
</div>
diff --git a/templates/user/settings/keys_gpg.tmpl b/templates/user/settings/keys_gpg.tmpl
index 52fc0a5033..fbb0da5302 100644
--- a/templates/user/settings/keys_gpg.tmpl
+++ b/templates/user/settings/keys_gpg.tmpl
@@ -1,7 +1,7 @@
<h4 class="ui top attached header">
- {{.i18n.Tr "settings.manage_gpg_keys"}}
+ {{.locale.Tr "settings.manage_gpg_keys"}}
<div class="ui right">
- <div class="ui primary tiny show-panel button" data-panel="#add-gpg-key-panel">{{.i18n.Tr "settings.add_key"}}</div>
+ <div class="ui primary tiny show-panel button" data-panel="#add-gpg-key-panel">{{.locale.Tr "settings.add_key"}}</div>
</div>
</h4>
<div class="ui attached segment">
@@ -10,47 +10,47 @@
{{.CsrfTokenHtml}}
<input type="hidden" name="title" value="none">
<div class="field {{if .Err_Content}}error{{end}}">
- <label for="content">{{.i18n.Tr "settings.key_content"}}</label>
- <textarea id="gpg-key-content" name="content" placeholder="{{.i18n.Tr "settings.key_content_gpg_placeholder"}}" required>{{.content}}</textarea>
+ <label for="content">{{.locale.Tr "settings.key_content"}}</label>
+ <textarea id="gpg-key-content" name="content" placeholder="{{.locale.Tr "settings.key_content_gpg_placeholder"}}" required>{{.content}}</textarea>
</div>
{{if .Err_Signature}}
<div class="ui error message">
- <p>{{.i18n.Tr "settings.gpg_token_required"}}</p>
+ <p>{{.locale.Tr "settings.gpg_token_required"}}</p>
</div>
<div class="field">
- <label for="token">{{.i18n.Tr "setting.gpg_token"}}
+ <label for="token">{{.locale.Tr "setting.gpg_token"}}
<input readonly="" value="{{.TokenToSign}}">
<div class="help">
- <p>{{.i18n.Tr "settings.gpg_token_help"}}</p>
- <p><code>{{$.i18n.Tr "settings.gpg_token_code" .TokenToSign .KeyID}}</code></p>
+ <p>{{.locale.Tr "settings.gpg_token_help"}}</p>
+ <p><code>{{$.locale.Tr "settings.gpg_token_code" .TokenToSign .KeyID}}</code></p>
</div>
</div>
<div class="field">
- <label for="signature">{{.i18n.Tr "settings.gpg_token_signature"}}</label>
- <textarea id="gpg-key-signature" name="signature" placeholder="{{.i18n.Tr "settings.key_signature_gpg_placeholder"}}" required>{{.signature}}</textarea>
+ <label for="signature">{{.locale.Tr "settings.gpg_token_signature"}}</label>
+ <textarea id="gpg-key-signature" name="signature" placeholder="{{.locale.Tr "settings.key_signature_gpg_placeholder"}}" required>{{.signature}}</textarea>
</div>
{{end}}
<input name="type" type="hidden" value="gpg">
<button class="ui green button">
- {{.i18n.Tr "settings.add_key"}}
+ {{.locale.Tr "settings.add_key"}}
</button>
<button class="ui hide-panel button" data-panel="#add-gpg-key-panel">
- {{.i18n.Tr "cancel"}}
+ {{.locale.Tr "cancel"}}
</button>
</form>
</div>
<div class="ui key list mt-0">
<div class="item">
- {{.i18n.Tr "settings.gpg_desc"}}
+ {{.locale.Tr "settings.gpg_desc"}}
</div>
{{range .GPGKeys}}
<div class="item">
<div class="right floated content">
<button class="ui red tiny button delete-button" data-modal-id="delete-gpg" data-url="{{$.Link}}/delete?type=gpg" data-id="{{.ID}}">
- {{$.i18n.Tr "settings.delete_key"}}
+ {{$.locale.Tr "settings.delete_key"}}
</button>
{{if and (not .Verified) (ne $.VerifyingID .KeyID)}}
- <a class="ui primary tiny show-panel button" href="{{$.Link}}?verify_gpg={{.KeyID}}">{{$.i18n.Tr "settings.gpg_key_verify"}}</a>
+ <a class="ui primary tiny show-panel button" href="{{$.Link}}?verify_gpg={{.KeyID}}">{{$.locale.Tr "settings.gpg_key_verify"}}</a>
{{end}}
</div>
<div class="left floated content">
@@ -58,49 +58,49 @@
</div>
<div class="content">
{{if .Verified}}
- <span class="tooltip" data-content="{{$.i18n.Tr "settings.gpg_key_verified_long"}}">{{svg "octicon-shield-check"}} <strong>{{$.i18n.Tr "settings.gpg_key_verified"}}</strong></span>
+ <span class="tooltip" data-content="{{$.locale.Tr "settings.gpg_key_verified_long"}}">{{svg "octicon-shield-check"}} <strong>{{$.locale.Tr "settings.gpg_key_verified"}}</strong></span>
{{end}}
{{if gt (len .Emails) 0}}
- <span class="tooltip" data-content="{{$.i18n.Tr "settings.gpg_key_matched_identities_long"}}">{{svg "octicon-mail"}} {{$.i18n.Tr "settings.gpg_key_matched_identities"}} {{range .Emails}}<strong>{{.Email}} </strong>{{end}}</span>
+ <span class="tooltip" data-content="{{$.locale.Tr "settings.gpg_key_matched_identities_long"}}">{{svg "octicon-mail"}} {{$.locale.Tr "settings.gpg_key_matched_identities"}} {{range .Emails}}<strong>{{.Email}} </strong>{{end}}</span>
{{end}}
<div class="print meta">
- <b>{{$.i18n.Tr "settings.key_id"}}:</b> {{.KeyID}}
- <b>{{$.i18n.Tr "settings.subkeys"}}:</b> {{range .SubsKey}} {{.KeyID}} {{end}}
+ <b>{{$.locale.Tr "settings.key_id"}}:</b> {{.KeyID}}
+ <b>{{$.locale.Tr "settings.subkeys"}}:</b> {{range .SubsKey}} {{.KeyID}} {{end}}
</div>
<div class="activity meta">
- <i>{{$.i18n.Tr "settings.add_on"}} <span>{{.AddedUnix.FormatShort}}</span></i>
+ <i>{{$.locale.Tr "settings.add_on"}} <span>{{.AddedUnix.FormatShort}}</span></i>
-
- <i>{{if not .ExpiredUnix.IsZero}}{{$.i18n.Tr "settings.valid_until"}} <span>{{.ExpiredUnix.FormatShort}}</span>{{else}}{{$.i18n.Tr "settings.valid_forever"}}{{end}}</i>
+ <i>{{if not .ExpiredUnix.IsZero}}{{$.locale.Tr "settings.valid_until"}} <span>{{.ExpiredUnix.FormatShort}}</span>{{else}}{{$.locale.Tr "settings.valid_forever"}}{{end}}</i>
</div>
</div>
</div>
{{if and (not .Verified) (eq $.VerifyingID .KeyID)}}
<div class="ui segment">
- <h4>{{$.i18n.Tr "settings.gpg_token_required"}}</h4>
+ <h4>{{$.locale.Tr "settings.gpg_token_required"}}</h4>
<form class="ui form{{if $.HasGPGVerifyError}} error{{end}}" action="{{$.Link}}" method="post">
{{$.CsrfTokenHtml}}
<input type="hidden" name="title" value="none">
<input type="hidden" name="content" value="{{.KeyID}}">
<input type="hidden" name="key_id" value="{{.KeyID}}">
<div class="field">
- <label for="token">{{$.i18n.Tr "settings.gpg_token"}}</label>
+ <label for="token">{{$.locale.Tr "settings.gpg_token"}}</label>
<input readonly="" value="{{$.TokenToSign}}">
<div class="help">
- <p>{{$.i18n.Tr "settings.gpg_token_help"}}</p>
- <p><code>{{$.i18n.Tr "settings.gpg_token_code" $.TokenToSign .KeyID}}</code></p>
+ <p>{{$.locale.Tr "settings.gpg_token_help"}}</p>
+ <p><code>{{$.locale.Tr "settings.gpg_token_code" $.TokenToSign .KeyID}}</code></p>
</div>
<br>
</div>
<div class="field">
- <label for="signature">{{$.i18n.Tr "settings.gpg_token_signature"}}</label>
- <textarea id="gpg-key-signature" name="signature" placeholder="{{$.i18n.Tr "settings.key_signature_gpg_placeholder"}}" required>{{$.signature}}</textarea>
+ <label for="signature">{{$.locale.Tr "settings.gpg_token_signature"}}</label>
+ <textarea id="gpg-key-signature" name="signature" placeholder="{{$.locale.Tr "settings.key_signature_gpg_placeholder"}}" required>{{$.signature}}</textarea>
</div>
<input name="type" type="hidden" value="verify_gpg">
<button class="ui green button">
- {{$.i18n.Tr "settings.gpg_key_verify"}}
+ {{$.locale.Tr "settings.gpg_key_verify"}}
</button>
<a class="ui red button" href="{{$.Link}}">
- {{$.i18n.Tr "settings.cancel"}}
+ {{$.locale.Tr "settings.cancel"}}
</a>
</form>
</div>
@@ -109,15 +109,15 @@
</div>
</div>
<br>
-<p>{{.i18n.Tr "settings.gpg_helper" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/about-commit-signature-verification#gpg-commit-signature-verification" | Str2html}}</p>
+<p>{{.locale.Tr "settings.gpg_helper" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/about-commit-signature-verification#gpg-commit-signature-verification" | Str2html}}</p>
<div class="ui small basic delete modal" id="delete-gpg">
<div class="ui icon header">
{{svg "octicon-trash"}}
- {{.i18n.Tr "settings.gpg_key_deletion"}}
+ {{.locale.Tr "settings.gpg_key_deletion"}}
</div>
<div class="content">
- <p>{{.i18n.Tr "settings.gpg_key_deletion_desc"}}</p>
+ <p>{{.locale.Tr "settings.gpg_key_deletion_desc"}}</p>
</div>
{{template "base/delete_modal_actions" .}}
</div>
diff --git a/templates/user/settings/keys_principal.tmpl b/templates/user/settings/keys_principal.tmpl
index 747b0c1712..a7fab1ea4f 100644
--- a/templates/user/settings/keys_principal.tmpl
+++ b/templates/user/settings/keys_principal.tmpl
@@ -1,31 +1,31 @@
{{if .AllowPrincipals}}
<h4 class="ui top attached header">
- {{.i18n.Tr "settings.manage_ssh_principals"}}
+ {{.locale.Tr "settings.manage_ssh_principals"}}
<div class="ui right">
{{if not .DisableSSH}}
- <div class="ui primary tiny show-panel button" data-panel="#add-ssh-principal-panel">{{.i18n.Tr "settings.add_new_principal"}}</div>
+ <div class="ui primary tiny show-panel button" data-panel="#add-ssh-principal-panel">{{.locale.Tr "settings.add_new_principal"}}</div>
{{else}}
- <div class="ui primary tiny button disabled">{{.i18n.Tr "settings.ssh_disabled"}}</div>
+ <div class="ui primary tiny button disabled">{{.locale.Tr "settings.ssh_disabled"}}</div>
{{end}}
</div>
</h4>
<div class="ui attached segment">
<div class="ui key list">
<div class="item">
- {{.i18n.Tr "settings.principal_desc"}}
+ {{.locale.Tr "settings.principal_desc"}}
</div>
{{range .Principals}}
<div class="item">
<div class="right floated content">
<button class="ui red tiny button delete-button" data-modal-id="delete-principal" data-url="{{$.Link}}/delete?type=principal" data-id="{{.ID}}">
- {{$.i18n.Tr "settings.delete_key"}}
+ {{$.locale.Tr "settings.delete_key"}}
</button>
</div>
- <i class="big send icon {{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.principal_state_desc"}}" data-variation="inverted tiny"{{end}}></i>
+ <i class="big send icon {{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-content="{{$.locale.Tr "settings.principal_state_desc"}}" data-variation="inverted tiny"{{end}}></i>
<div class="content">
<strong>{{.Name}}</strong>
<div class="activity meta">
- <i>{{$.i18n.Tr "settings.add_on"}} <span>{{.CreatedUnix.FormatShort}}</span> — {{svg "octicon-info" 16}} {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{.UpdatedUnix.FormatShort}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i>
+ <i>{{$.locale.Tr "settings.add_on"}} <span>{{.CreatedUnix.FormatShort}}</span> — {{svg "octicon-info" 16}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{.UpdatedUnix.FormatShort}}</span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}</i>
</div>
</div>
</div>
@@ -36,19 +36,19 @@
<div {{if not .HasPrincipalError}}class="hide"{{end}} id="add-ssh-principal-panel">
<h4 class="ui top attached header">
- {{.i18n.Tr "settings.add_new_principal"}}
+ {{.locale.Tr "settings.add_new_principal"}}
</h4>
<div class="ui attached segment">
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<div class="field {{if .Err_Content}}error{{end}}">
- <label for="content">{{.i18n.Tr "settings.principal_content"}}</label>
+ <label for="content">{{.locale.Tr "settings.principal_content"}}</label>
<input id="ssh-principal-content" name="content" value="{{.content}}" autofocus required>
</div>
<input name="title" type="hidden" value="principal">
<input name="type" type="hidden" value="principal">
<button class="ui green button">
- {{.i18n.Tr "settings.add_new_principal"}}
+ {{.locale.Tr "settings.add_new_principal"}}
</button>
</form>
</div>
@@ -57,10 +57,10 @@
<div class="ui small basic delete modal" id="delete-principal">
<div class="ui icon header">
{{svg "octicon-trash"}}
- {{.i18n.Tr "settings.ssh_principal_deletion"}}
+ {{.locale.Tr "settings.ssh_principal_deletion"}}
</div>
<div class="content">
- <p>{{.i18n.Tr "settings.ssh_principal_deletion_desc"}}</p>
+ <p>{{.locale.Tr "settings.ssh_principal_deletion_desc"}}</p>
</div>
{{template "base/delete_modal_actions" .}}
</div>
diff --git a/templates/user/settings/keys_ssh.tmpl b/templates/user/settings/keys_ssh.tmpl
index ba62ac3cf4..46254c0dcb 100644
--- a/templates/user/settings/keys_ssh.tmpl
+++ b/templates/user/settings/keys_ssh.tmpl
@@ -1,12 +1,12 @@
<h4 class="ui top attached header">
- {{.i18n.Tr "settings.manage_ssh_keys"}}
+ {{.locale.Tr "settings.manage_ssh_keys"}}
<div class="ui right">
{{if not .DisableSSH }}
<div id="add-ssh-button" class="ui primary tiny show-panel button" data-panel="#add-ssh-key-panel">
- {{.i18n.Tr "settings.add_key"}}
+ {{.locale.Tr "settings.add_key"}}
</div>
{{else}}
- <div class="ui primary tiny button disabled">{{.i18n.Tr "settings.ssh_disabled"}}</div>
+ <div class="ui primary tiny button disabled">{{.locale.Tr "settings.ssh_disabled"}}</div>
{{end}}
</div>
</h4>
@@ -15,80 +15,80 @@
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<div class="field {{if .Err_Title}}error{{end}}">
- <label for="title">{{.i18n.Tr "settings.key_name"}}</label>
+ <label for="title">{{.locale.Tr "settings.key_name"}}</label>
<input id="ssh-key-title" name="title" value="{{.title}}" autofocus required>
</div>
<div class="field {{if .Err_Content}}error{{end}}">
- <label for="content">{{.i18n.Tr "settings.key_content"}}</label>
- <textarea id="ssh-key-content" name="content" class="js-quick-submit" placeholder="{{.i18n.Tr "settings.key_content_ssh_placeholder"}}" required>{{.content}}</textarea>
+ <label for="content">{{.locale.Tr "settings.key_content"}}</label>
+ <textarea id="ssh-key-content" name="content" class="js-quick-submit" placeholder="{{.locale.Tr "settings.key_content_ssh_placeholder"}}" required>{{.content}}</textarea>
</div>
<input name="type" type="hidden" value="ssh">
<button class="ui green button">
- {{.i18n.Tr "settings.add_key"}}
+ {{.locale.Tr "settings.add_key"}}
</button>
<button id="cancel-ssh-button" class="ui hide-panel button" data-panel="#add-ssh-key-panel">
- {{.i18n.Tr "cancel"}}
+ {{.locale.Tr "cancel"}}
</button>
</form>
</div>
<div class="ui key list mt-0">
<div class="item">
- {{.i18n.Tr "settings.ssh_desc"}}
+ {{.locale.Tr "settings.ssh_desc"}}
</div>
{{range $index, $key := .Keys}}
<div class="item">
<div class="right floated content">
- <button class="ui red tiny button delete-button{{if index $.ExternalKeys $index}} disabled{{end}}" data-modal-id="delete-ssh" data-url="{{$.Link}}/delete?type=ssh" data-id="{{.ID}}"{{if index $.ExternalKeys $index}} title="{{$.i18n.Tr "settings.ssh_externally_managed"}}"{{end}}>
- {{$.i18n.Tr "settings.delete_key"}}
+ <button class="ui red tiny button delete-button{{if index $.ExternalKeys $index}} disabled{{end}}" data-modal-id="delete-ssh" data-url="{{$.Link}}/delete?type=ssh" data-id="{{.ID}}"{{if index $.ExternalKeys $index}} title="{{$.locale.Tr "settings.ssh_externally_managed"}}"{{end}}>
+ {{$.locale.Tr "settings.delete_key"}}
</button>
{{if and (not .Verified) (ne $.VerifyingFingerprint .Fingerprint)}}
- <a class="ui primary tiny show-panel button" href="{{$.Link}}?verify_ssh={{.Fingerprint}}">{{$.i18n.Tr "settings.ssh_key_verify"}}</a>
+ <a class="ui primary tiny show-panel button" href="{{$.Link}}?verify_ssh={{.Fingerprint}}">{{$.locale.Tr "settings.ssh_key_verify"}}</a>
{{end}}
</div>
<div class="left floated content">
- <span class="{{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-content="{{$.i18n.Tr "settings.key_state_desc"}}" data-variation="inverted tiny"{{end}}>{{svg "octicon-key" 32}}</span>
+ <span class="{{if .HasRecentActivity}}green{{end}}" {{if .HasRecentActivity}}data-content="{{$.locale.Tr "settings.key_state_desc"}}" data-variation="inverted tiny"{{end}}>{{svg "octicon-key" 32}}</span>
</div>
<div class="content">
{{if .Verified}}
- <span class="tooltip" data-content="{{$.i18n.Tr "settings.ssh_key_verified_long"}}">{{svg "octicon-shield-check"}} <strong>{{$.i18n.Tr "settings.ssh_key_verified"}}</strong></span>
+ <span class="tooltip" data-content="{{$.locale.Tr "settings.ssh_key_verified_long"}}">{{svg "octicon-shield-check"}} <strong>{{$.locale.Tr "settings.ssh_key_verified"}}</strong></span>
{{end}}
<strong>{{.Name}}</strong>
<div class="print meta">
{{.Fingerprint}}
</div>
<div class="activity meta">
- <i>{{$.i18n.Tr "settings.add_on"}} <span>{{.CreatedUnix.FormatShort}}</span> — {{svg "octicon-info"}} {{if .HasUsed}}{{$.i18n.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{.UpdatedUnix.FormatShort}}</span>{{else}}{{$.i18n.Tr "settings.no_activity"}}{{end}}</i>
+ <i>{{$.locale.Tr "settings.add_on"}} <span>{{.CreatedUnix.FormatShort}}</span> — {{svg "octicon-info"}} {{if .HasUsed}}{{$.locale.Tr "settings.last_used"}} <span {{if .HasRecentActivity}}class="green"{{end}}>{{.UpdatedUnix.FormatShort}}</span>{{else}}{{$.locale.Tr "settings.no_activity"}}{{end}}</i>
</div>
</div>
</div>
{{if and (not .Verified) (eq $.VerifyingFingerprint .Fingerprint)}}
<div class="ui segment">
- <h4>{{$.i18n.Tr "settings.ssh_token_required"}}</h4>
+ <h4>{{$.locale.Tr "settings.ssh_token_required"}}</h4>
<form class="ui form{{if $.HasSSHVerifyError}} error{{end}}" action="{{$.Link}}" method="post">
{{$.CsrfTokenHtml}}
<input type="hidden" name="title" value="none">
<input type="hidden" name="content" value="{{.Content}}">
<input type="hidden" name="fingerprint" value="{{.Fingerprint}}">
<div class="field">
- <label for="token">{{$.i18n.Tr "settings.ssh_token"}}</label>
+ <label for="token">{{$.locale.Tr "settings.ssh_token"}}</label>
<input readonly="" value="{{$.TokenToSign}}">
<div class="help">
- <p>{{$.i18n.Tr "settings.ssh_token_help"}}</p>
+ <p>{{$.locale.Tr "settings.ssh_token_help"}}</p>
<p><code>{{printf "echo -n '%s' | ssh-keygen -Y sign -n gitea -f /path_to_your_privkey" $.TokenToSign}}</code></p>
</div>
<br>
</div>
<div class="field">
- <label for="signature">{{$.i18n.Tr "settings.ssh_token_signature"}}</label>
- <textarea id="ssh-key-signature" name="signature" class="js-quick-submit" placeholder="{{$.i18n.Tr "settings.key_signature_ssh_placeholder"}}" required>{{$.signature}}</textarea>
+ <label for="signature">{{$.locale.Tr "settings.ssh_token_signature"}}</label>
+ <textarea id="ssh-key-signature" name="signature" class="js-quick-submit" placeholder="{{$.locale.Tr "settings.key_signature_ssh_placeholder"}}" required>{{$.signature}}</textarea>
</div>
<input name="type" type="hidden" value="verify_ssh">
<button class="ui green button">
- {{$.i18n.Tr "settings.ssh_key_verify"}}
+ {{$.locale.Tr "settings.ssh_key_verify"}}
</button>
<a class="ui red button" href="{{$.Link}}">
- {{$.i18n.Tr "settings.cancel"}}
+ {{$.locale.Tr "settings.cancel"}}
</a>
</form>
</div>
@@ -97,15 +97,15 @@
</div>
</div>
<br>
-<p>{{.i18n.Tr "settings.ssh_helper" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/connecting-to-github-with-ssh" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/troubleshooting-ssh" | Str2html}}</p>
+<p>{{.locale.Tr "settings.ssh_helper" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/connecting-to-github-with-ssh" "https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/troubleshooting-ssh" | Str2html}}</p>
<div class="ui small basic delete modal" id="delete-ssh">
<div class="ui icon header">
{{svg "octicon-trash"}}
- {{.i18n.Tr "settings.ssh_key_deletion"}}
+ {{.locale.Tr "settings.ssh_key_deletion"}}
</div>
<div class="content">
- <p>{{.i18n.Tr "settings.ssh_key_deletion_desc"}}</p>
+ <p>{{.locale.Tr "settings.ssh_key_deletion_desc"}}</p>
</div>
{{template "base/delete_modal_actions" .}}
</div>
diff --git a/templates/user/settings/navbar.tmpl b/templates/user/settings/navbar.tmpl
index 3477a5949b..01ae055d79 100644
--- a/templates/user/settings/navbar.tmpl
+++ b/templates/user/settings/navbar.tmpl
@@ -1,28 +1,28 @@
<div class="ui secondary pointing tabular top attached borderless menu stackable new-menu navbar">
<div class="new-menu-inner">
<a class="{{if .PageIsSettingsProfile}}active{{end}} item" href="{{AppSubUrl}}/user/settings">
- {{.i18n.Tr "settings.profile"}}
+ {{.locale.Tr "settings.profile"}}
</a>
<a class="{{if .PageIsSettingsAccount}}active{{end}} item" href="{{AppSubUrl}}/user/settings/account">
- {{.i18n.Tr "settings.account"}}
+ {{.locale.Tr "settings.account"}}
</a>
<a class="{{if .PageIsSettingsAppearance}}active{{end}} item" href="{{AppSubUrl}}/user/settings/appearance">
- {{.i18n.Tr "settings.appearance"}}
+ {{.locale.Tr "settings.appearance"}}
</a>
<a class="{{if .PageIsSettingsSecurity}}active{{end}} item" href="{{AppSubUrl}}/user/settings/security">
- {{.i18n.Tr "settings.security"}}
+ {{.locale.Tr "settings.security"}}
</a>
<a class="{{if .PageIsSettingsApplications}}active{{end}} item" href="{{AppSubUrl}}/user/settings/applications">
- {{.i18n.Tr "settings.applications"}}
+ {{.locale.Tr "settings.applications"}}
</a>
<a class="{{if .PageIsSettingsKeys}}active{{end}} item" href="{{AppSubUrl}}/user/settings/keys">
- {{.i18n.Tr "settings.ssh_gpg_keys"}}
+ {{.locale.Tr "settings.ssh_gpg_keys"}}
</a>
<a class="{{if .PageIsSettingsOrganization}}active{{end}} item" href="{{AppSubUrl}}/user/settings/organization">
- {{.i18n.Tr "settings.organization"}}
+ {{.locale.Tr "settings.organization"}}
</a>
<a class="{{if .PageIsSettingsRepos}}active{{end}} item" href="{{AppSubUrl}}/user/settings/repos">
- {{.i18n.Tr "settings.repos"}}
+ {{.locale.Tr "settings.repos"}}
</a>
</div>
</div>
diff --git a/templates/user/settings/organization.tmpl b/templates/user/settings/organization.tmpl
index d951af2209..e25d5e7fa6 100644
--- a/templates/user/settings/organization.tmpl
+++ b/templates/user/settings/organization.tmpl
@@ -4,10 +4,10 @@
<div class="ui container">
{{template "base/alert" .}}
<h4 class="ui top attached header">
- {{.i18n.Tr "settings.orgs"}}
+ {{.locale.Tr "settings.orgs"}}
{{if .SignedUser.CanCreateOrganization}}
<div class="ui right">
- <a class="ui primary tiny button" href="{{AppSubUrl}}/org/create">{{.i18n.Tr "admin.orgs.new_orga"}}</a>
+ <a class="ui primary tiny button" href="{{AppSubUrl}}/org/create">{{.locale.Tr "admin.orgs.new_orga"}}</a>
</div>
{{end}}
</h4>
@@ -19,7 +19,7 @@
<div class="right floated content">
<form method="post" action="{{.OrganisationLink}}/members/action/leave">
{{$.CsrfTokenHtml}}
- <button type="submit" class="ui primary small button" name="uid" value="{{.ID}}">{{$.i18n.Tr "org.members.leave"}}</button>
+ <button type="submit" class="ui primary small button" name="uid" value="{{.ID}}">{{$.locale.Tr "org.members.leave"}}</button>
</form>
</div>
{{avatar . 28 "mini"}}
@@ -31,7 +31,7 @@
</div>
{{template "base/paginate" .}}
{{else}}
- {{.i18n.Tr "settings.orgs_none"}}
+ {{.locale.Tr "settings.orgs_none"}}
{{end}}
</div>
</div>
diff --git a/templates/user/settings/profile.tmpl b/templates/user/settings/profile.tmpl
index 9429db1ad6..87b6e37ed5 100644
--- a/templates/user/settings/profile.tmpl
+++ b/templates/user/settings/profile.tmpl
@@ -4,46 +4,46 @@
<div class="ui container">
{{template "base/alert" .}}
<h4 class="ui top attached header">
- {{.i18n.Tr "settings.public_profile"}}
+ {{.locale.Tr "settings.public_profile"}}
</h4>
<div class="ui attached segment">
- <p>{{.i18n.Tr "settings.profile_desc"}}</p>
+ <p>{{.locale.Tr "settings.profile_desc"}}</p>
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<div class="required field {{if .Err_Name}}error{{end}}">
- <label for="username">{{.i18n.Tr "username"}}
- <span class="text red hide" id="name-change-prompt"> {{.i18n.Tr "settings.change_username_prompt"}}</span>
- <span class="text red hide" id="name-change-redirect-prompt"> {{.i18n.Tr "settings.change_username_redirect_prompt"}}</span>
+ <label for="username">{{.locale.Tr "username"}}
+ <span class="text red hide" id="name-change-prompt"> {{.locale.Tr "settings.change_username_prompt"}}</span>
+ <span class="text red hide" id="name-change-redirect-prompt"> {{.locale.Tr "settings.change_username_redirect_prompt"}}</span>
</label>
<input id="username" name="name" value="{{.SignedUser.Name}}" data-name="{{.SignedUser.Name}}" autofocus required {{if or (not .SignedUser.IsLocal) .IsReverseProxy}}disabled{{end}}>
{{if or (not .SignedUser.IsLocal) .IsReverseProxy}}
- <p class="help text blue">{{$.i18n.Tr "settings.password_username_disabled"}}</p>
+ <p class="help text blue">{{$.locale.Tr "settings.password_username_disabled"}}</p>
{{end}}
</div>
<div class="field {{if .Err_FullName}}error{{end}}">
- <label for="full_name">{{.i18n.Tr "settings.full_name"}}</label>
+ <label for="full_name">{{.locale.Tr "settings.full_name"}}</label>
<input id="full_name" name="full_name" value="{{.SignedUser.FullName}}">
</div>
<div class="field {{if .Err_Email}}error{{end}}">
- <label for="email">{{.i18n.Tr "email"}}</label>
+ <label for="email">{{.locale.Tr "email"}}</label>
<p>{{.SignedUser.Email}}</p>
</div>
<div class="inline field">
<div class="ui checkbox" id="keep-email-private">
- <label class="tooltip" data-content="{{.i18n.Tr "settings.keep_email_private_popup"}}"><strong>{{.i18n.Tr "settings.keep_email_private"}}</strong></label>
+ <label class="tooltip" data-content="{{.locale.Tr "settings.keep_email_private_popup"}}"><strong>{{.locale.Tr "settings.keep_email_private"}}</strong></label>
<input name="keep_email_private" type="checkbox" {{if .SignedUser.KeepEmailPrivate}}checked{{end}}>
</div>
</div>
<div class="field {{if .Err_Description}}error{{end}}">
- <label for="description">{{$.i18n.Tr "user.user_bio"}}</label>
- <textarea id="description" name="description" rows="2" placeholder="{{.i18n.Tr "settings.biography_placeholder"}}">{{.SignedUser.Description}}</textarea>
+ <label for="description">{{$.locale.Tr "user.user_bio"}}</label>
+ <textarea id="description" name="description" rows="2" placeholder="{{.locale.Tr "settings.biography_placeholder"}}">{{.SignedUser.Description}}</textarea>
</div>
<div class="field {{if .Err_Website}}error{{end}}">
- <label for="website">{{.i18n.Tr "settings.website"}}</label>
+ <label for="website">{{.locale.Tr "settings.website"}}</label>
<input id="website" name="website" type="url" value="{{.SignedUser.Website}}">
</div>
<div class="field">
- <label for="location">{{.i18n.Tr "settings.location"}}</label>
+ <label for="location">{{.locale.Tr "settings.location"}}</label>
<input id="location" name="location" value="{{.SignedUser.Location}}">
</div>
@@ -51,29 +51,29 @@
<!-- private block -->
<div class="field">
- <label for="security-private"><strong>{{.i18n.Tr "settings.privacy"}}</strong></label>
+ <label for="security-private"><strong>{{.locale.Tr "settings.privacy"}}</strong></label>
</div>
<div class="inline field {{if .Err_Visibility}}error{{end}}">
- <span class="inline required field"><label for="visibility">{{.i18n.Tr "settings.visibility"}}</label></span>
+ <span class="inline required field"><label for="visibility">{{.locale.Tr "settings.visibility"}}</label></span>
<div class="ui selection type dropdown">
{{if .SignedUser.Visibility.IsPublic}}<input type="hidden" id="visibility" name="visibility" value="0">{{end}}
{{if .SignedUser.Visibility.IsLimited}}<input type="hidden" id="visibility" name="visibility" value="1">{{end}}
{{if .SignedUser.Visibility.IsPrivate}}<input type="hidden" id="visibility" name="visibility" value="2">{{end}}
<div class="text">
- {{if .SignedUser.Visibility.IsPublic}}{{.i18n.Tr "settings.visibility.public"}}{{end}}
- {{if .SignedUser.Visibility.IsLimited}}{{.i18n.Tr "settings.visibility.limited"}}{{end}}
- {{if .SignedUser.Visibility.IsPrivate}}{{.i18n.Tr "settings.visibility.private"}}{{end}}
+ {{if .SignedUser.Visibility.IsPublic}}{{.locale.Tr "settings.visibility.public"}}{{end}}
+ {{if .SignedUser.Visibility.IsLimited}}{{.locale.Tr "settings.visibility.limited"}}{{end}}
+ {{if .SignedUser.Visibility.IsPrivate}}{{.locale.Tr "settings.visibility.private"}}{{end}}
</div>
{{svg "octicon-triangle-down" 14 "dropdown icon"}}
<div class="menu">
{{range $mode := .AllowedUserVisibilityModes}}
{{if $mode.IsPublic}}
- <div class="item tooltip" data-content="{{$.i18n.Tr "settings.visibility.public_tooltip"}}" data-value="0">{{$.i18n.Tr "settings.visibility.public"}}</div>
+ <div class="item tooltip" data-content="{{$.locale.Tr "settings.visibility.public_tooltip"}}" data-value="0">{{$.locale.Tr "settings.visibility.public"}}</div>
{{else if $mode.IsLimited}}
- <div class="item tooltip" data-content="{{$.i18n.Tr "settings.visibility.limited_tooltip"}}" data-value="1">{{$.i18n.Tr "settings.visibility.limited"}}</div>
+ <div class="item tooltip" data-content="{{$.locale.Tr "settings.visibility.limited_tooltip"}}" data-value="1">{{$.locale.Tr "settings.visibility.limited"}}</div>
{{else if $mode.IsPrivate}}
- <div class="item tooltip" data-content="{{$.i18n.Tr "settings.visibility.private_tooltip"}}" data-value="2">{{$.i18n.Tr "settings.visibility.private"}}</div>
+ <div class="item tooltip" data-content="{{$.locale.Tr "settings.visibility.private_tooltip"}}" data-value="2">{{$.locale.Tr "settings.visibility.private"}}</div>
{{end}}
{{end}}
</div>
@@ -82,7 +82,7 @@
<div class="field">
<div class="ui checkbox" id="keep-activity-private">
- <label class="tooltip" data-content="{{.i18n.Tr "settings.keep_activity_private_popup"}}"><strong>{{.i18n.Tr "settings.keep_activity_private"}}</strong></label>
+ <label class="tooltip" data-content="{{.locale.Tr "settings.keep_activity_private_popup"}}"><strong>{{.locale.Tr "settings.keep_activity_private"}}</strong></label>
<input name="keep_activity_private" type="checkbox" {{if .SignedUser.KeepActivityPrivate}}checked{{end}}>
</div>
</div>
@@ -90,13 +90,13 @@
<div class="ui divider"></div>
<div class="field">
- <button class="ui green button">{{$.i18n.Tr "settings.update_profile"}}</button>
+ <button class="ui green button">{{$.locale.Tr "settings.update_profile"}}</button>
</div>
</form>
</div>
<h4 class="ui top attached header">
- {{.i18n.Tr "settings.avatar"}}
+ {{.locale.Tr "settings.avatar"}}
</h4>
<div class="ui attached segment">
<form class="ui form" action="{{.Link}}/avatar" method="post" enctype="multipart/form-data">
@@ -105,11 +105,11 @@
<div class="inline field">
<div class="ui radio checkbox">
<input name="source" value="lookup" type="radio" {{if not .SignedUser.UseCustomAvatar}}checked{{end}}>
- <label>{{.i18n.Tr "settings.lookup_avatar_by_mail"}}</label>
+ <label>{{.locale.Tr "settings.lookup_avatar_by_mail"}}</label>
</div>
</div>
<div class="field {{if .Err_Gravatar}}error{{end}}">
- <label for="gravatar">Avatar {{.i18n.Tr "email"}}</label>
+ <label for="gravatar">Avatar {{.locale.Tr "email"}}</label>
<input id="gravatar" name="gravatar" value="{{.SignedUser.AvatarEmail}}" />
</div>
{{end}}
@@ -117,18 +117,18 @@
<div class="inline field">
<div class="ui radio checkbox">
<input name="source" value="local" type="radio" {{if .SignedUser.UseCustomAvatar}}checked{{end}}>
- <label>{{.i18n.Tr "settings.enable_custom_avatar"}}</label>
+ <label>{{.locale.Tr "settings.enable_custom_avatar"}}</label>
</div>
</div>
<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/user/settings/repos.tmpl b/templates/user/settings/repos.tmpl
index 31f4ca6a17..eba0d22d5e 100644
--- a/templates/user/settings/repos.tmpl
+++ b/templates/user/settings/repos.tmpl
@@ -4,7 +4,7 @@
<div class="ui container">
{{template "base/alert" .}}
<h4 class="ui top attached header">
- {{.i18n.Tr "settings.repos"}}
+ {{.locale.Tr "settings.repos"}}
</h4>
<div class="ui attached segment">
{{if or .allowAdopt .allowDelete}}
@@ -29,7 +29,7 @@
<a class="name" href="{{$repo.Link}}">{{$repo.OwnerName}}/{{$repo.Name}}</a>
<span>{{FileSize $repo.Size}}</span>
{{if $repo.IsFork}}
- {{$.i18n.Tr "repo.forked_from"}}
+ {{$.locale.Tr "repo.forked_from"}}
<span><a href="{{$repo.BaseRepo.Link}}">{{$repo.BaseRepo.OwnerName}}/{{$repo.BaseRepo.Name}}</a></span>
{{end}}
{{else}}
@@ -37,14 +37,14 @@
<span class="name">{{$.Owner.Name}}/{{$dir}}</span>
<div class="right floated content">
{{if $.allowAdopt}}
- <button class="ui button submit tiny green adopt show-modal" data-modal="#adopt-unadopted-modal-{{$dirI}}"><span class="icon">{{svg "octicon-plus"}}</span><span class="label">{{$.i18n.Tr "repo.adopt_preexisting_label"}}</span></button>
+ <button class="ui button submit tiny green adopt show-modal" data-modal="#adopt-unadopted-modal-{{$dirI}}"><span class="icon">{{svg "octicon-plus"}}</span><span class="label">{{$.locale.Tr "repo.adopt_preexisting_label"}}</span></button>
<div class="ui basic modal" id="adopt-unadopted-modal-{{$dirI}}">
{{svg "octicon-x" 16 "close inside"}}
<div class="header">
- <span class="label">{{$.i18n.Tr "repo.adopt_preexisting"}}</span>
+ <span class="label">{{$.locale.Tr "repo.adopt_preexisting"}}</span>
</div>
<div class="content">
- <p>{{$.i18n.Tr "repo.adopt_preexisting_content" $dir}}</p>
+ <p>{{$.locale.Tr "repo.adopt_preexisting_content" $dir}}</p>
</div>
<form class="ui form" method="POST" action="{{AppSubUrl}}/user/settings/repos/unadopted">
{{$.CsrfTokenHtml}}
@@ -53,25 +53,25 @@
<div class="actions">
<div class="ui red basic inverted cancel button">
<i class="remove icon"></i>
- {{$.i18n.Tr "modal.no"}}
+ {{$.locale.Tr "modal.no"}}
</div>
<button class="ui green basic inverted ok button">
<i class="checkmark icon"></i>
- {{$.i18n.Tr "modal.yes"}}
+ {{$.locale.Tr "modal.yes"}}
</button>
</div>
</form>
</div>
{{end}}
{{if $.allowDelete}}
- <button class="ui button submit tiny red delete show-modal" data-modal="#delete-unadopted-modal-{{$dirI}}"><span class="icon">{{svg "octicon-x"}}</span><span class="label">{{$.i18n.Tr "repo.delete_preexisting_label"}}</span></button>
+ <button class="ui button submit tiny red delete show-modal" data-modal="#delete-unadopted-modal-{{$dirI}}"><span class="icon">{{svg "octicon-x"}}</span><span class="label">{{$.locale.Tr "repo.delete_preexisting_label"}}</span></button>
<div class="ui basic modal" id="delete-unadopted-modal-{{$dirI}}">
{{svg "octicon-x" 16 "close inside"}}
<div class="header">
- <span class="label">{{$.i18n.Tr "repo.delete_preexisting"}}</span>
+ <span class="label">{{$.locale.Tr "repo.delete_preexisting"}}</span>
</div>
<div class="content">
- <p>{{$.i18n.Tr "repo.delete_preexisting_content" $dir}}</p>
+ <p>{{$.locale.Tr "repo.delete_preexisting_content" $dir}}</p>
</div>
<form class="ui form" method="POST" action="{{AppSubUrl}}/user/settings/repos/unadopted">
{{$.CsrfTokenHtml}}
@@ -80,11 +80,11 @@
<div class="actions">
<div class="ui red basic inverted cancel button">
<i class="remove icon"></i>
- {{$.i18n.Tr "modal.no"}}
+ {{$.locale.Tr "modal.no"}}
</div>
<button class="ui green basic inverted ok button">
<i class="checkmark icon"></i>
- {{$.i18n.Tr "modal.yes"}}
+ {{$.locale.Tr "modal.yes"}}
</button>
</div>
</form>
@@ -99,7 +99,7 @@
{{template "base/paginate" .}}
{{else}}
<div class="item">
- {{.i18n.Tr "settings.repos_none"}}
+ {{.locale.Tr "settings.repos_none"}}
</div>
{{end}}
{{else}}
@@ -122,7 +122,7 @@
<a class="name" href="{{.Link}}">{{.OwnerName}}/{{.Name}}</a>
<span>{{FileSize .Size}}</span>
{{if .IsFork}}
- {{$.i18n.Tr "repo.forked_from"}}
+ {{$.locale.Tr "repo.forked_from"}}
<span><a href="{{.BaseRepo.Link}}">{{.BaseRepo.OwnerName}}/{{.BaseRepo.Name}}</a></span>
{{end}}
</div>
@@ -132,7 +132,7 @@
{{template "base/paginate" .}}
{{else}}
<div class="item">
- {{.i18n.Tr "settings.repos_none"}}
+ {{.locale.Tr "settings.repos_none"}}
</div>
{{end}}
{{end}}
@@ -143,10 +143,10 @@
<div class="ui small basic delete modal">
<div class="ui icon header">
{{svg "octicon-trash"}}
- {{.i18n.Tr "settings.remove_account_link"}}
+ {{.locale.Tr "settings.remove_account_link"}}
</div>
<div class="content">
- <p>{{.i18n.Tr "settings.remove_account_link_desc"}}</p>
+ <p>{{.locale.Tr "settings.remove_account_link_desc"}}</p>
</div>
{{template "base/delete_modal_actions" .}}
</div>
diff --git a/templates/user/settings/security/accountlinks.tmpl b/templates/user/settings/security/accountlinks.tmpl
index da9afb7956..b726245724 100644
--- a/templates/user/settings/security/accountlinks.tmpl
+++ b/templates/user/settings/security/accountlinks.tmpl
@@ -1,9 +1,9 @@
<h4 class="ui top attached header">
- {{.i18n.Tr "settings.manage_account_links"}}
+ {{.locale.Tr "settings.manage_account_links"}}
{{if .OrderedOAuth2Names}}
<div class="ui right">
<div class="ui dropdown">
- <div class="ui primary tiny button">{{.i18n.Tr "settings.link_account"}}</div>
+ <div class="ui primary tiny button">{{.locale.Tr "settings.link_account"}}</div>
<div class="menu">
{{range $key := .OrderedOAuth2Names}}
{{$provider := index $.OAuth2Providers $key}}
@@ -21,19 +21,19 @@
<div class="ui attached segment">
<div class="ui key list">
<div class="item">
- {{.i18n.Tr "settings.manage_account_links_desc"}}
+ {{.locale.Tr "settings.manage_account_links_desc"}}
</div>
{{if .AccountLinks}}
{{range $loginSource, $provider := .AccountLinks}}
<div class="item">
<div class="right floated content">
<button class="ui red tiny button delete-button" data-modal-id="delete-account-link" data-url="{{AppSubUrl}}/user/settings/security/account_link" data-id="{{$loginSource.ID}}">
- {{$.i18n.Tr "settings.delete_key"}}
+ {{$.locale.Tr "settings.delete_key"}}
</button>
</div>
<div class="content">
<strong>{{$provider}}</strong>
- {{if $loginSource.IsActive}}<span class="text red">{{$.i18n.Tr "settings.active"}}</span>{{end}}
+ {{if $loginSource.IsActive}}<span class="text red">{{$.locale.Tr "settings.active"}}</span>{{end}}
</div>
</div>
{{end}}
@@ -44,10 +44,10 @@
<div class="ui small basic delete modal" id="delete-account-link">
<div class="ui icon header">
{{svg "octicon-trash"}}
- {{.i18n.Tr "settings.remove_account_link"}}
+ {{.locale.Tr "settings.remove_account_link"}}
</div>
<div class="content">
- <p>{{.i18n.Tr "settings.remove_account_link_desc"}}</p>
+ <p>{{.locale.Tr "settings.remove_account_link_desc"}}</p>
</div>
{{template "base/delete_modal_actions" .}}
</div>
diff --git a/templates/user/settings/security/openid.tmpl b/templates/user/settings/security/openid.tmpl
index 2a167a712b..5d6c9cf8cd 100644
--- a/templates/user/settings/security/openid.tmpl
+++ b/templates/user/settings/security/openid.tmpl
@@ -1,16 +1,16 @@
<h4 class="ui top attached header">
- {{.i18n.Tr "settings.manage_openid"}}
+ {{.locale.Tr "settings.manage_openid"}}
</h4>
<div class="ui attached segment">
<div class="ui openid list">
<div class="item">
- {{.i18n.Tr "settings.openid_desc"}}
+ {{.locale.Tr "settings.openid_desc"}}
</div>
{{range .OpenIDs}}
<div class="item">
<div class="right floated content">
<button class="ui red tiny button delete-button" data-modal-id="delete-openid" data-url="{{AppSubUrl}}/user/settings/security/openid/delete" data-id="{{.ID}}">
- {{$.i18n.Tr "settings.delete_key"}}
+ {{$.locale.Tr "settings.delete_key"}}
</button>
</div>
<div class="right floated content">
@@ -20,12 +20,12 @@
{{if .Show}}
<button class="ui tiny button">
{{svg "octicon-eye" 16 "icon"}}
- {{$.i18n.Tr "settings.hide_openid"}}
+ {{$.locale.Tr "settings.hide_openid"}}
</button>
{{else}}
<button class="ui tiny button">
{{svg "octicon-eye-closed" 16 "icon"}}
- {{$.i18n.Tr "settings.show_openid"}}
+ {{$.locale.Tr "settings.show_openid"}}
</button>
{{end}}
</button>
@@ -42,11 +42,11 @@
<form class="ui form" action="{{AppSubUrl}}/user/settings/security/openid" method="post">
{{.CsrfTokenHtml}}
<div class="required field {{if .Err_OpenID}}error{{end}}">
- <label for="openid">{{.i18n.Tr "settings.add_new_openid"}}</label>
+ <label for="openid">{{.locale.Tr "settings.add_new_openid"}}</label>
<input id="openid" name="openid" type="text" required>
</div>
<button class="ui green button">
- {{.i18n.Tr "settings.add_openid"}}
+ {{.locale.Tr "settings.add_openid"}}
</button>
</form>
</div>
@@ -54,10 +54,10 @@
<div class="ui small basic delete modal" id="delete-openid">
<div class="ui icon header">
{{svg "octicon-trash"}}
- {{.i18n.Tr "settings.openid_deletion"}}
+ {{.locale.Tr "settings.openid_deletion"}}
</div>
<div class="content">
- <p>{{.i18n.Tr "settings.openid_deletion_desc"}}</p>
+ <p>{{.locale.Tr "settings.openid_deletion_desc"}}</p>
</div>
{{template "base/delete_modal_actions" .}}
</div>
diff --git a/templates/user/settings/security/twofa.tmpl b/templates/user/settings/security/twofa.tmpl
index 7b0f2d473e..3d2f78ed0d 100644
--- a/templates/user/settings/security/twofa.tmpl
+++ b/templates/user/settings/security/twofa.tmpl
@@ -1,24 +1,24 @@
<h4 class="ui top attached header">
- {{.i18n.Tr "settings.twofa"}}
+ {{.locale.Tr "settings.twofa"}}
</h4>
<div class="ui attached segment">
- <p>{{.i18n.Tr "settings.twofa_desc"}}</p>
+ <p>{{.locale.Tr "settings.twofa_desc"}}</p>
{{if .TOTPEnrolled}}
- <p>{{$.i18n.Tr "settings.twofa_is_enrolled" | Str2html }}</p>
+ <p>{{$.locale.Tr "settings.twofa_is_enrolled" | Str2html }}</p>
<form class="ui form" action="{{AppSubUrl}}/user/settings/security/two_factor/regenerate_scratch" method="post" enctype="multipart/form-data">
{{.CsrfTokenHtml}}
- <p>{{.i18n.Tr "settings.regenerate_scratch_token_desc"}}</p>
- <button class="ui primary button">{{$.i18n.Tr "settings.twofa_scratch_token_regenerate"}}</button>
+ <p>{{.locale.Tr "settings.regenerate_scratch_token_desc"}}</p>
+ <button class="ui primary button">{{$.locale.Tr "settings.twofa_scratch_token_regenerate"}}</button>
</form>
<form class="ui form" action="{{AppSubUrl}}/user/settings/security/two_factor/disable" method="post" enctype="multipart/form-data" id="disable-form">
{{.CsrfTokenHtml}}
- <p>{{.i18n.Tr "settings.twofa_disable_note"}}</p>
- <div class="ui red button delete-button" data-modal-id="disable-twofa" data-type="form" data-form="#disable-form">{{$.i18n.Tr "settings.twofa_disable"}}</div>
+ <p>{{.locale.Tr "settings.twofa_disable_note"}}</p>
+ <div class="ui red button delete-button" data-modal-id="disable-twofa" data-type="form" data-form="#disable-form">{{$.locale.Tr "settings.twofa_disable"}}</div>
</form>
{{else}}
- <p>{{.i18n.Tr "settings.twofa_not_enrolled"}}</p>
+ <p>{{.locale.Tr "settings.twofa_not_enrolled"}}</p>
<div class="inline field">
- <a class="ui green button" href="{{AppSubUrl}}/user/settings/security/two_factor/enroll">{{$.i18n.Tr "settings.twofa_enroll"}}</a>
+ <a class="ui green button" href="{{AppSubUrl}}/user/settings/security/two_factor/enroll">{{$.locale.Tr "settings.twofa_enroll"}}</a>
</div>
{{end}}
</div>
@@ -26,10 +26,10 @@
<div class="ui small basic delete modal" id="disable-twofa">
<div class="ui icon header">
{{svg "octicon-trash"}}
- {{.i18n.Tr "settings.twofa_disable"}}
+ {{.locale.Tr "settings.twofa_disable"}}
</div>
<div class="content">
- <p>{{.i18n.Tr "settings.twofa_disable_desc"}}</p>
+ <p>{{.locale.Tr "settings.twofa_disable_desc"}}</p>
</div>
{{template "base/delete_modal_actions" .}}
</div>
diff --git a/templates/user/settings/security/twofa_enroll.tmpl b/templates/user/settings/security/twofa_enroll.tmpl
index c8ed0b7761..0eb543f747 100644
--- a/templates/user/settings/security/twofa_enroll.tmpl
+++ b/templates/user/settings/security/twofa_enroll.tmpl
@@ -4,22 +4,22 @@
<div class="ui container">
{{template "base/alert" .}}
<h4 class="ui top attached header">
- {{.i18n.Tr "settings.twofa_enroll"}}
+ {{.locale.Tr "settings.twofa_enroll"}}
</h4>
<div class="ui attached segment">
- <p>{{.i18n.Tr "settings.scan_this_image"}}</p>
+ <p>{{.locale.Tr "settings.scan_this_image"}}</p>
<img src="{{.QrUri}}" alt="{{.TwofaSecret}}">
- <p>{{.i18n.Tr "settings.or_enter_secret" .TwofaSecret}}
- <p>{{.i18n.Tr "settings.then_enter_passcode"}}
+ <p>{{.locale.Tr "settings.or_enter_secret" .TwofaSecret}}
+ <p>{{.locale.Tr "settings.then_enter_passcode"}}
<form class="ui form" action="{{.Link}}" method="post">
{{.CsrfTokenHtml}}
<div class="inline required field {{if .Err_Passcode}}error{{end}}">
- <label for="passcode">{{.i18n.Tr "passcode"}}</label>
+ <label for="passcode">{{.locale.Tr "passcode"}}</label>
<input id="passcode" name="passcode" autofocus required>
</div>
<div class="inline field">
<label></label>
- <button class="ui green button">{{.i18n.Tr "auth.verify"}}</button>
+ <button class="ui green button">{{.locale.Tr "auth.verify"}}</button>
</div>
</form>
</div>
diff --git a/templates/user/settings/security/webauthn.tmpl b/templates/user/settings/security/webauthn.tmpl
index 733b3066c5..2fea2843f6 100644
--- a/templates/user/settings/security/webauthn.tmpl
+++ b/templates/user/settings/security/webauthn.tmpl
@@ -1,30 +1,30 @@
<h4 class="ui top attached header">
-{{.i18n.Tr "settings.webauthn"}}
+{{.locale.Tr "settings.webauthn"}}
</h4>
<div class="ui attached segment">
- <p>{{.i18n.Tr "settings.webauthn_desc" | Str2html}}</p>
+ <p>{{.locale.Tr "settings.webauthn_desc" | Str2html}}</p>
<div class="ui key list">
{{range .WebAuthnCredentials}}
<div class="item">
<div class="right floated content">
<button class="ui red tiny button delete-button" data-modal-id="delete-registration" data-url="{{$.Link}}/webauthn/delete" data-id="{{.ID}}">
- {{$.i18n.Tr "settings.delete_key"}}
+ {{$.locale.Tr "settings.delete_key"}}
</button>
</div>
<div class="content">
<strong>{{.Name}}</strong>
</div>
- <span class="time">{{TimeSinceUnix .CreatedUnix $.i18n}}</span>
+ <span class="time">{{TimeSinceUnix .CreatedUnix $.locale}}</span>
</div>
{{end}}
</div>
<div class="ui form">
{{.CsrfTokenHtml}}
<div class="required field">
- <label for="nickname">{{.i18n.Tr "settings.webauthn_nickname"}}</label>
+ <label for="nickname">{{.locale.Tr "settings.webauthn_nickname"}}</label>
<input id="nickname" name="nickname" type="text" required>
</div>
- <button id="register-webauthn" class="ui green button">{{svg "octicon-key"}} {{.i18n.Tr "settings.webauthn_register_key"}}</button>
+ <button id="register-webauthn" class="ui green button">{{svg "octicon-key"}} {{.locale.Tr "settings.webauthn_register_key"}}</button>
</div>
</div>
@@ -33,10 +33,10 @@
<div class="ui small basic delete modal" id="delete-registration">
<div class="ui icon header">
{{svg "octicon-trash"}}
- {{.i18n.Tr "settings.webauthn_delete_key"}}
+ {{.locale.Tr "settings.webauthn_delete_key"}}
</div>
<div class="content">
- <p>{{.i18n.Tr "settings.webauthn_delete_key_desc"}}</p>
+ <p>{{.locale.Tr "settings.webauthn_delete_key_desc"}}</p>
</div>
{{template "base/delete_modal_actions" .}}
</div>