diff options
author | Gusted <williamzijl7@hotmail.com> | 2022-06-27 22:58:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-27 15:58:46 -0500 |
commit | d55a0b723809f5b94acd948b924c8518014445e0 (patch) | |
tree | 0ef9ea54f30769ca1d16ce20e551bd7a078f7f5e /templates/admin/auth | |
parent | b551bc2a089d3310dde5706d1b9702f112fe3ea0 (diff) | |
download | gitea-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/admin/auth')
-rw-r--r-- | templates/admin/auth/edit.tmpl | 178 | ||||
-rw-r--r-- | templates/admin/auth/list.tmpl | 16 | ||||
-rw-r--r-- | templates/admin/auth/new.tmpl | 56 | ||||
-rw-r--r-- | templates/admin/auth/source/ldap.tmpl | 62 | ||||
-rw-r--r-- | templates/admin/auth/source/oauth.tmpl | 42 | ||||
-rw-r--r-- | templates/admin/auth/source/smtp.tmpl | 26 | ||||
-rw-r--r-- | templates/admin/auth/source/sspi.tmpl | 20 |
7 files changed, 200 insertions, 200 deletions
diff --git a/templates/admin/auth/edit.tmpl b/templates/admin/auth/edit.tmpl index 6e491d6cf4..af3f381c8e 100644 --- a/templates/admin/auth/edit.tmpl +++ b/templates/admin/auth/edit.tmpl @@ -4,7 +4,7 @@ <div class="ui container"> {{template "base/alert" .}} <h4 class="ui top attached header"> - {{.i18n.Tr "admin.auths.edit"}} + {{.locale.Tr "admin.auths.edit"}} </h4> <div class="ui attached segment"> <form class="ui form" action="{{.Link}}" method="post"> @@ -12,12 +12,12 @@ {{.CsrfTokenHtml}} <input type="hidden" name="id" value="{{.Source.ID}}"> <div class="inline field"> - <label>{{$.i18n.Tr "admin.auths.auth_type"}}</label> + <label>{{$.locale.Tr "admin.auths.auth_type"}}</label> <input type="hidden" id="auth_type" name="type" value="{{.Source.Type.Int}}"> <span>{{.Source.TypeName}}</span> </div> <div class="required inline field {{if .Err_Name}}error{{end}}"> - <label for="name">{{.i18n.Tr "admin.auths.auth_name"}}</label> + <label for="name">{{.locale.Tr "admin.auths.auth_name"}}</label> <input id="name" name="name" value="{{.Source.Name}}" autofocus required> </div> @@ -25,7 +25,7 @@ {{if or .Source.IsLDAP .Source.IsDLDAP}} {{ $cfg:=.Source.Cfg }} <div class="inline required field {{if .Err_SecurityProtocol}}error{{end}}"> - <label>{{.i18n.Tr "admin.auths.security_protocol"}}</label> + <label>{{.locale.Tr "admin.auths.security_protocol"}}</label> <div class="ui selection security-protocol dropdown"> <input type="hidden" id="security_protocol" name="security_protocol" value="{{$cfg.SecurityProtocol.Int}}"> <div class="text">{{$cfg.SecurityProtocolName}}</div> @@ -38,74 +38,74 @@ </div> </div> <div class="required field"> - <label for="host">{{.i18n.Tr "admin.auths.host"}}</label> + <label for="host">{{.locale.Tr "admin.auths.host"}}</label> <input id="host" name="host" value="{{$cfg.Host}}" placeholder="e.g. mydomain.com" required> </div> <div class="required field"> - <label for="port">{{.i18n.Tr "admin.auths.port"}}</label> + <label for="port">{{.locale.Tr "admin.auths.port"}}</label> <input id="port" name="port" value="{{$cfg.Port}}" placeholder="e.g. 636" required> </div> <div class="has-tls inline field {{if not .HasTLS}}hide{{end}}"> <div class="ui checkbox"> - <label><strong>{{.i18n.Tr "admin.auths.skip_tls_verify"}}</strong></label> + <label><strong>{{.locale.Tr "admin.auths.skip_tls_verify"}}</strong></label> <input name="skip_verify" type="checkbox" {{if .Source.SkipVerify}}checked{{end}}> </div> </div> {{if .Source.IsLDAP}} <div class="field"> - <label for="bind_dn">{{.i18n.Tr "admin.auths.bind_dn"}}</label> + <label for="bind_dn">{{.locale.Tr "admin.auths.bind_dn"}}</label> <input id="bind_dn" name="bind_dn" value="{{$cfg.BindDN}}" placeholder="e.g. cn=Search,dc=mydomain,dc=com"> </div> <div class="field"> - <label for="bind_password">{{.i18n.Tr "admin.auths.bind_password"}}</label> + <label for="bind_password">{{.locale.Tr "admin.auths.bind_password"}}</label> <input id="bind_password" name="bind_password" type="password" value="{{$cfg.BindPassword}}"> </div> {{end}} <div class="{{if .Source.IsLDAP}}required{{end}} field"> - <label for="user_base">{{.i18n.Tr "admin.auths.user_base"}}</label> + <label for="user_base">{{.locale.Tr "admin.auths.user_base"}}</label> <input id="user_base" name="user_base" value="{{$cfg.UserBase}}" placeholder="e.g. ou=Users,dc=mydomain,dc=com" {{if .Source.IsLDAP}}required{{end}}> </div> {{if .Source.IsDLDAP}} <div class="required field"> - <label for="user_dn">{{.i18n.Tr "admin.auths.user_dn"}}</label> + <label for="user_dn">{{.locale.Tr "admin.auths.user_dn"}}</label> <input id="user_dn" name="user_dn" value="{{$cfg.UserDN}}" placeholder="e.g. uid=%s,ou=Users,dc=mydomain,dc=com" required> </div> {{end}} <div class="required field"> - <label for="filter">{{.i18n.Tr "admin.auths.filter"}}</label> + <label for="filter">{{.locale.Tr "admin.auths.filter"}}</label> <input id="filter" name="filter" value="{{$cfg.Filter}}" placeholder="e.g. (&(objectClass=posixAccount)(uid=%s))" required> </div> <div class="field"> - <label for="admin_filter">{{.i18n.Tr "admin.auths.admin_filter"}}</label> + <label for="admin_filter">{{.locale.Tr "admin.auths.admin_filter"}}</label> <input id="admin_filter" name="admin_filter" value="{{$cfg.AdminFilter}}"> </div> <div class="field"> - <label for="restricted_filter">{{.i18n.Tr "admin.auths.restricted_filter"}}</label> + <label for="restricted_filter">{{.locale.Tr "admin.auths.restricted_filter"}}</label> <input id="restricted_filter" name="restricted_filter" value="{{$cfg.RestrictedFilter}}"> - <p class="help">{{.i18n.Tr "admin.auths.restricted_filter_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.restricted_filter_helper"}}</p> </div> <div class="field"> - <label for="attribute_username">{{.i18n.Tr "admin.auths.attribute_username"}}</label> - <input id="attribute_username" name="attribute_username" value="{{$cfg.AttributeUsername}}" placeholder="{{.i18n.Tr "admin.auths.attribute_username_placeholder"}}"> + <label for="attribute_username">{{.locale.Tr "admin.auths.attribute_username"}}</label> + <input id="attribute_username" name="attribute_username" value="{{$cfg.AttributeUsername}}" placeholder="{{.locale.Tr "admin.auths.attribute_username_placeholder"}}"> </div> <div class="field"> - <label for="attribute_name">{{.i18n.Tr "admin.auths.attribute_name"}}</label> + <label for="attribute_name">{{.locale.Tr "admin.auths.attribute_name"}}</label> <input id="attribute_name" name="attribute_name" value="{{$cfg.AttributeName}}"> </div> <div class="field"> - <label for="attribute_surname">{{.i18n.Tr "admin.auths.attribute_surname"}}</label> + <label for="attribute_surname">{{.locale.Tr "admin.auths.attribute_surname"}}</label> <input id="attribute_surname" name="attribute_surname" value="{{$cfg.AttributeSurname}}"> </div> <div class="required field"> - <label for="attribute_mail">{{.i18n.Tr "admin.auths.attribute_mail"}}</label> + <label for="attribute_mail">{{.locale.Tr "admin.auths.attribute_mail"}}</label> <input id="attribute_mail" name="attribute_mail" value="{{$cfg.AttributeMail}}" placeholder="e.g. mail" required> </div> <div class="field"> - <label for="attribute_ssh_public_key">{{.i18n.Tr "admin.auths.attribute_ssh_public_key"}}</label> + <label for="attribute_ssh_public_key">{{.locale.Tr "admin.auths.attribute_ssh_public_key"}}</label> <input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{$cfg.AttributeSSHPublicKey}}" placeholder="e.g. SshPublicKey"> </div> <div class="field"> - <label for="attribute_avatar">{{.i18n.Tr "admin.auths.attribute_avatar"}}</label> + <label for="attribute_avatar">{{.locale.Tr "admin.auths.attribute_avatar"}}</label> <input id="attribute_avatar" name="attribute_avatar" value="{{$cfg.AttributeAvatar}}" placeholder="e.g. jpegPhoto"> </div> @@ -113,33 +113,33 @@ <!-- ldap group begin --> <div class="inline field"> <div class="ui checkbox"> - <label><strong>{{.i18n.Tr "admin.auths.enable_ldap_groups"}}</strong></label> + <label><strong>{{.locale.Tr "admin.auths.enable_ldap_groups"}}</strong></label> <input type="checkbox" name="groups_enabled" class="js-ldap-group-toggle" {{if $cfg.GroupsEnabled}}checked{{end}}> </div> </div> <div id="ldap-group-options" class="ui segment secondary" {{if not $cfg.GroupsEnabled}}hidden{{end}}> <div class="field"> - <label>{{.i18n.Tr "admin.auths.group_search_base"}}</label> + <label>{{.locale.Tr "admin.auths.group_search_base"}}</label> <input name="group_dn" value="{{$cfg.GroupDN}}" placeholder="e.g. ou=group,dc=mydomain,dc=com"> </div> <div class="field"> - <label>{{.i18n.Tr "admin.auths.group_attribute_list_users"}}</label> + <label>{{.locale.Tr "admin.auths.group_attribute_list_users"}}</label> <input name="group_member_uid" value="{{$cfg.GroupMemberUID}}" placeholder="e.g. memberUid"> </div> <div class="field"> - <label>{{.i18n.Tr "admin.auths.user_attribute_in_group"}}</label> + <label>{{.locale.Tr "admin.auths.user_attribute_in_group"}}</label> <input name="user_uid" value="{{$cfg.UserUID}}" placeholder="e.g. uid"> </div> <div class="field"> - <label>{{.i18n.Tr "admin.auths.verify_group_membership"}}</label> + <label>{{.locale.Tr "admin.auths.verify_group_membership"}}</label> <input name="group_filter" value="{{$cfg.GroupFilter}}" placeholder="e.g. (|(cn=gitea_users)(cn=admins))"> </div> <div class="field"> - <label>{{.i18n.Tr "admin.auths.map_group_to_team"}}</label> + <label>{{.locale.Tr "admin.auths.map_group_to_team"}}</label> <input name="group_team_map" value="{{$cfg.GroupTeamMap}}" placeholder='e.g. {"cn=my-group,cn=groups,dc=example,dc=org": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'> </div> <div class="ui checkbox"> - <label>{{.i18n.Tr "admin.auths.map_group_to_team_removal"}}</label> + <label>{{.locale.Tr "admin.auths.map_group_to_team_removal"}}</label> <input name="group_team_map_removal" type="checkbox" {{if $cfg.GroupTeamMapRemoval}}checked{{end}}> </div> </div> @@ -148,31 +148,31 @@ {{if .Source.IsLDAP}} <div class="inline field"> <div class="ui checkbox"> - <label for="use_paged_search"><strong>{{.i18n.Tr "admin.auths.use_paged_search"}}</strong></label> + <label for="use_paged_search"><strong>{{.locale.Tr "admin.auths.use_paged_search"}}</strong></label> <input id="use_paged_search" name="use_paged_search" type="checkbox" {{if $cfg.UsePagedSearch}}checked{{end}}> </div> </div> <div class="field required search-page-size{{if not $cfg.UsePagedSearch}} hide{{end}}"> - <label for="search_page_size">{{.i18n.Tr "admin.auths.search_page_size"}}</label> + <label for="search_page_size">{{.locale.Tr "admin.auths.search_page_size"}}</label> <input id="search_page_size" name="search_page_size" value="{{if $cfg.UsePagedSearch}}{{$cfg.SearchPageSize}}{{end}}"> </div> <div class="inline field"> <div class="ui checkbox"> - <label><strong>{{.i18n.Tr "admin.auths.attributes_in_bind"}}</strong></label> + <label><strong>{{.locale.Tr "admin.auths.attributes_in_bind"}}</strong></label> <input name="attributes_in_bind" type="checkbox" {{if $cfg.AttributesInBind}}checked{{end}}> </div> </div> {{end}} <div class="optional field"> <div class="ui checkbox"> - <label for="skip_local_two_fa"><strong>{{.i18n.Tr "admin.auths.skip_local_two_fa"}}</strong></label> + <label for="skip_local_two_fa"><strong>{{.locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label> <input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if $cfg.SkipLocalTwoFA}}checked{{end}}> - <p class="help">{{.i18n.Tr "admin.auths.skip_local_two_fa_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p> </div> </div> <div class="inline field"> <div class="ui checkbox"> - <label for="allow_deactivate_all"><strong>{{.i18n.Tr "admin.auths.allow_deactivate_all"}}</strong></label> + <label for="allow_deactivate_all"><strong>{{.locale.Tr "admin.auths.allow_deactivate_all"}}</strong></label> <input id="allow_deactivate_all" name="allow_deactivate_all" type="checkbox" {{if $cfg.AllowDeactivateAll}}checked{{end}}> </div> </div> @@ -182,7 +182,7 @@ {{if .Source.IsSMTP}} {{ $cfg:=.Source.Cfg }} <div class="inline required field"> - <label>{{.i18n.Tr "admin.auths.smtp_auth"}}</label> + <label>{{.locale.Tr "admin.auths.smtp_auth"}}</label> <div class="ui selection type dropdown"> <input type="hidden" id="smtp_auth" name="smtp_auth" value="{{$cfg.Auth}}" required> <div class="text">{{$cfg.Auth}}</div> @@ -195,47 +195,47 @@ </div> </div> <div class="required field"> - <label for="smtp_host">{{.i18n.Tr "admin.auths.smtphost"}}</label> + <label for="smtp_host">{{.locale.Tr "admin.auths.smtphost"}}</label> <input id="smtp_host" name="smtp_host" value="{{$cfg.Host}}" required> </div> <div class="required field"> - <label for="smtp_port">{{.i18n.Tr "admin.auths.smtpport"}}</label> + <label for="smtp_port">{{.locale.Tr "admin.auths.smtpport"}}</label> <input id="smtp_port" name="smtp_port" value="{{$cfg.Port}}" required> </div> <div class="field"> <div class="ui checkbox"> - <label for="force_smtps"><strong>{{.i18n.Tr "admin.auths.force_smtps"}}</strong></label> + <label for="force_smtps"><strong>{{.locale.Tr "admin.auths.force_smtps"}}</strong></label> <input id="force_smtps" name="force_smtps" type="checkbox" {{if $cfg.ForceSMTPS}}checked{{end}}> </div> - <p class="help">{{.i18n.Tr "admin.auths.force_smtps_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.force_smtps_helper"}}</p> </div> <div class="has-tls inline field {{if not .HasTLS}}hide{{end}}"> <div class="ui checkbox"> - <label><strong>{{.i18n.Tr "admin.auths.skip_tls_verify"}}</strong></label> + <label><strong>{{.locale.Tr "admin.auths.skip_tls_verify"}}</strong></label> <input name="skip_verify" type="checkbox" {{if .Source.SkipVerify}}checked{{end}}> </div> </div> <div class="field"> - <label for="helo_hostname">{{.i18n.Tr "admin.auths.helo_hostname"}}</label> + <label for="helo_hostname">{{.locale.Tr "admin.auths.helo_hostname"}}</label> <input id="helo_hostname" name="helo_hostname" value="{{$cfg.HeloHostname}}"> - <p class="help">{{.i18n.Tr "admin.auths.helo_hostname_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.helo_hostname_helper"}}</p> </div> <div class="inline field"> <div class="ui checkbox"> - <label for="disable_helo"><strong>{{.i18n.Tr "admin.auths.disable_helo"}}</strong></label> + <label for="disable_helo"><strong>{{.locale.Tr "admin.auths.disable_helo"}}</strong></label> <input id="disable_helo" name="disable_helo" type="checkbox" {{if $cfg.DisableHelo}}checked{{end}}> </div> </div> <div class="field"> - <label for="allowed_domains">{{.i18n.Tr "admin.auths.allowed_domains"}}</label> + <label for="allowed_domains">{{.locale.Tr "admin.auths.allowed_domains"}}</label> <input id="allowed_domains" name="allowed_domains" value="{{$cfg.AllowedDomains}}"> - <p class="help">{{.i18n.Tr "admin.auths.allowed_domains_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.allowed_domains_helper"}}</p> </div> <div class="optional field"> <div class="ui checkbox"> - <label for="skip_local_two_fa"><strong>{{.i18n.Tr "admin.auths.skip_local_two_fa"}}</strong></label> + <label for="skip_local_two_fa"><strong>{{.locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label> <input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if $cfg.SkipLocalTwoFA}}checked{{end}}> - <p class="help">{{.i18n.Tr "admin.auths.skip_local_two_fa_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p> </div> </div> {{end}} @@ -244,18 +244,18 @@ {{if .Source.IsPAM}} {{ $cfg:=.Source.Cfg }} <div class="required field"> - <label for="pam_service_name">{{.i18n.Tr "admin.auths.pam_service_name"}}</label> + <label for="pam_service_name">{{.locale.Tr "admin.auths.pam_service_name"}}</label> <input id="pam_service_name" name="pam_service_name" value="{{$cfg.ServiceName}}" required> </div> <div class="field"> - <label for="pam_email_domain">{{.i18n.Tr "admin.auths.pam_email_domain"}}</label> + <label for="pam_email_domain">{{.locale.Tr "admin.auths.pam_email_domain"}}</label> <input id="pam_email_domain" name="pam_email_domain" value="{{$cfg.EmailDomain}}"> </div> <div class="optional field"> <div class="ui checkbox"> - <label for="skip_local_two_fa"><strong>{{.i18n.Tr "admin.auths.skip_local_two_fa"}}</strong></label> + <label for="skip_local_two_fa"><strong>{{.locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label> <input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if $cfg.SkipLocalTwoFA}}checked{{end}}> - <p class="help">{{.i18n.Tr "admin.auths.skip_local_two_fa_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p> </div> </div> {{end}} @@ -264,7 +264,7 @@ {{if .Source.IsOAuth2}} {{ $cfg:=.Source.Cfg }} <div class="inline required field"> - <label>{{.i18n.Tr "admin.auths.oauth2_provider"}}</label> + <label>{{.locale.Tr "admin.auths.oauth2_provider"}}</label> <div class="ui selection type dropdown"> <input type="hidden" id="oauth2_provider" name="oauth2_provider" value="{{$cfg.Provider}}" required> <div class="text">{{.CurrentOAuth2Provider.DisplayName}}</div> @@ -277,52 +277,52 @@ </div> </div> <div class="required field"> - <label for="oauth2_key">{{.i18n.Tr "admin.auths.oauth2_clientID"}}</label> + <label for="oauth2_key">{{.locale.Tr "admin.auths.oauth2_clientID"}}</label> <input id="oauth2_key" name="oauth2_key" value="{{$cfg.ClientID}}" required> </div> <div class="required field"> - <label for="oauth2_secret">{{.i18n.Tr "admin.auths.oauth2_clientSecret"}}</label> + <label for="oauth2_secret">{{.locale.Tr "admin.auths.oauth2_clientSecret"}}</label> <input id="oauth2_secret" name="oauth2_secret" value="{{$cfg.ClientSecret}}" required> </div> <div class="optional field"> - <label for="oauth2_icon_url">{{.i18n.Tr "admin.auths.oauth2_icon_url"}}</label> + <label for="oauth2_icon_url">{{.locale.Tr "admin.auths.oauth2_icon_url"}}</label> <input id="oauth2_icon_url" name="oauth2_icon_url" value="{{$cfg.IconURL}}"> </div> <div class="open_id_connect_auto_discovery_url required field"> - <label for="open_id_connect_auto_discovery_url">{{.i18n.Tr "admin.auths.openIdConnectAutoDiscoveryURL"}}</label> + <label for="open_id_connect_auto_discovery_url">{{.locale.Tr "admin.auths.openIdConnectAutoDiscoveryURL"}}</label> <input id="open_id_connect_auto_discovery_url" name="open_id_connect_auto_discovery_url" value="{{$cfg.OpenIDConnectAutoDiscoveryURL}}"> </div> <div class="optional field"> <div class="ui checkbox"> - <label for="skip_local_two_fa"><strong>{{.i18n.Tr "admin.auths.skip_local_two_fa"}}</strong></label> + <label for="skip_local_two_fa"><strong>{{.locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label> <input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if $cfg.SkipLocalTwoFA}}checked{{end}}> - <p class="help">{{.i18n.Tr "admin.auths.skip_local_two_fa_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p> </div> </div> <div class="oauth2_use_custom_url inline field"> <div class="ui checkbox"> - <label><strong>{{.i18n.Tr "admin.auths.oauth2_use_custom_url"}}</strong></label> + <label><strong>{{.locale.Tr "admin.auths.oauth2_use_custom_url"}}</strong></label> <input id="oauth2_use_custom_url" name="oauth2_use_custom_url" type="checkbox" {{if $cfg.CustomURLMapping}}checked{{end}}> </div> </div> <div class="oauth2_use_custom_url_field oauth2_auth_url required field"> - <label for="oauth2_auth_url">{{.i18n.Tr "admin.auths.oauth2_authURL"}}</label> + <label for="oauth2_auth_url">{{.locale.Tr "admin.auths.oauth2_authURL"}}</label> <input id="oauth2_auth_url" name="oauth2_auth_url" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.AuthURL}}{{end}}"> </div> <div class="oauth2_use_custom_url_field oauth2_token_url required field"> - <label for="oauth2_token_url">{{.i18n.Tr "admin.auths.oauth2_tokenURL"}}</label> + <label for="oauth2_token_url">{{.locale.Tr "admin.auths.oauth2_tokenURL"}}</label> <input id="oauth2_token_url" name="oauth2_token_url" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.TokenURL}}{{end}}"> </div> <div class="oauth2_use_custom_url_field oauth2_profile_url required field"> - <label for="oauth2_profile_url">{{.i18n.Tr "admin.auths.oauth2_profileURL"}}</label> + <label for="oauth2_profile_url">{{.locale.Tr "admin.auths.oauth2_profileURL"}}</label> <input id="oauth2_profile_url" name="oauth2_profile_url" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.ProfileURL}}{{end}}"> </div> <div class="oauth2_use_custom_url_field oauth2_email_url required field"> - <label for="oauth2_email_url">{{.i18n.Tr "admin.auths.oauth2_emailURL"}}</label> + <label for="oauth2_email_url">{{.locale.Tr "admin.auths.oauth2_emailURL"}}</label> <input id="oauth2_email_url" name="oauth2_email_url" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.EmailURL}}{{end}}"> </div> <div class="oauth2_use_custom_url_field oauth2_tenant required field"> - <label for="oauth2_tenant">{{.i18n.Tr "admin.auths.oauth2_tenant"}}</label> + <label for="oauth2_tenant">{{.locale.Tr "admin.auths.oauth2_tenant"}}</label> <input id="oauth2_tenant" name="oauth2_tenant" value="{{if $cfg.CustomURLMapping}}{{$cfg.CustomURLMapping.Tenant}}{{end}}"> </div> @@ -336,29 +336,29 @@ {{end}}{{end}} <div class="field"> - <label for="oauth2_scopes">{{.i18n.Tr "admin.auths.oauth2_scopes"}}</label> + <label for="oauth2_scopes">{{.locale.Tr "admin.auths.oauth2_scopes"}}</label> <input id="oauth2_scopes" name="oauth2_scopes" value="{{if $cfg.Scopes}}{{Join $cfg.Scopes "," }}{{end}}"> </div> <div class="field"> - <label for="oauth2_required_claim_name">{{.i18n.Tr "admin.auths.oauth2_required_claim_name"}}</label> + <label for="oauth2_required_claim_name">{{.locale.Tr "admin.auths.oauth2_required_claim_name"}}</label> <input id="oauth2_required_claim_name" name="oauth2_required_claim_name" values="{{$cfg.RequiredClaimName}}"> - <p class="help">{{.i18n.Tr "admin.auths.oauth2_required_claim_name_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.oauth2_required_claim_name_helper"}}</p> </div> <div class="field"> - <label for="oauth2_required_claim_value">{{.i18n.Tr "admin.auths.oauth2_required_claim_value"}}</label> + <label for="oauth2_required_claim_value">{{.locale.Tr "admin.auths.oauth2_required_claim_value"}}</label> <input id="oauth2_required_claim_value" name="oauth2_required_claim_value" values="{{$cfg.RequiredClaimValue}}"> - <p class="help">{{.i18n.Tr "admin.auths.oauth2_required_claim_value_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.oauth2_required_claim_value_helper"}}</p> </div> <div class="field"> - <label for="oauth2_group_claim_name">{{.i18n.Tr "admin.auths.oauth2_group_claim_name"}}</label> + <label for="oauth2_group_claim_name">{{.locale.Tr "admin.auths.oauth2_group_claim_name"}}</label> <input id="oauth2_group_claim_name" name="oauth2_group_claim_name" value="{{$cfg.GroupClaimName}}"> </div> <div class="field"> - <label for="oauth2_admin_group">{{.i18n.Tr "admin.auths.oauth2_admin_group"}}</label> + <label for="oauth2_admin_group">{{.locale.Tr "admin.auths.oauth2_admin_group"}}</label> <input id="oauth2_admin_group" name="oauth2_admin_group" value="{{$cfg.AdminGroup}}"> </div> <div class="field"> - <label for="oauth2_restricted_group">{{.i18n.Tr "admin.auths.oauth2_restricted_group"}}</label> + <label for="oauth2_restricted_group">{{.locale.Tr "admin.auths.oauth2_restricted_group"}}</label> <input id="oauth2_restricted_group" name="oauth2_restricted_group" value="{{$cfg.RestrictedGroup}}"> </div> {{end}} @@ -368,32 +368,32 @@ {{ $cfg:=.Source.Cfg }} <div class="field"> <div class="ui checkbox"> - <label for="sspi_auto_create_users"><strong>{{.i18n.Tr "admin.auths.sspi_auto_create_users"}}</strong></label> + <label for="sspi_auto_create_users"><strong>{{.locale.Tr "admin.auths.sspi_auto_create_users"}}</strong></label> <input id="sspi_auto_create_users" name="sspi_auto_create_users" class="sspi-auto-create-users" type="checkbox" {{if $cfg.AutoCreateUsers}}checked{{end}}> - <p class="help">{{.i18n.Tr "admin.auths.sspi_auto_create_users_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.sspi_auto_create_users_helper"}}</p> </div> </div> <div class="field"> <div class="ui checkbox"> - <label for="sspi_auto_activate_users"><strong>{{.i18n.Tr "admin.auths.sspi_auto_activate_users"}}</strong></label> + <label for="sspi_auto_activate_users"><strong>{{.locale.Tr "admin.auths.sspi_auto_activate_users"}}</strong></label> <input id="sspi_auto_activate_users" name="sspi_auto_activate_users" class="sspi-auto-activate-users" type="checkbox" {{if $cfg.AutoActivateUsers}}checked{{end}}> - <p class="help">{{.i18n.Tr "admin.auths.sspi_auto_activate_users_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.sspi_auto_activate_users_helper"}}</p> </div> </div> <div class="field"> <div class="ui checkbox"> - <label for="sspi_strip_domain_names"><strong>{{.i18n.Tr "admin.auths.sspi_strip_domain_names"}}</strong></label> + <label for="sspi_strip_domain_names"><strong>{{.locale.Tr "admin.auths.sspi_strip_domain_names"}}</strong></label> <input id="sspi_strip_domain_names" name="sspi_strip_domain_names" class="sspi-strip-domain-names" type="checkbox" {{if $cfg.StripDomainNames}}checked{{end}}> - <p class="help">{{.i18n.Tr "admin.auths.sspi_strip_domain_names_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.sspi_strip_domain_names_helper"}}</p> </div> </div> <div class="required field"> - <label for="sspi_separator_replacement">{{.i18n.Tr "admin.auths.sspi_separator_replacement"}}</label> + <label for="sspi_separator_replacement">{{.locale.Tr "admin.auths.sspi_separator_replacement"}}</label> <input id="sspi_separator_replacement" name="sspi_separator_replacement" value="{{$cfg.SeparatorReplacement}}" required> - <p class="help">{{.i18n.Tr "admin.auths.sspi_separator_replacement_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.sspi_separator_replacement_helper"}}</p> </div> <div class="field"> - <label for="sspi_default_language">{{.i18n.Tr "admin.auths.sspi_default_language"}}</label> + <label for="sspi_default_language">{{.locale.Tr "admin.auths.sspi_default_language"}}</label> <div class="ui language selection dropdown" id="sspi_default_language"> <input name="sspi_default_language" type="hidden" value="{{$cfg.DefaultLanguage}}"> {{svg "octicon-triangle-down" 14 "dropdown icon"}} @@ -405,27 +405,27 @@ {{end}} </div> </div> - <p class="help">{{.i18n.Tr "admin.auths.sspi_default_language_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.sspi_default_language_helper"}}</p> </div> {{end}} {{if .Source.IsLDAP}} <div class="inline field"> <div class="ui checkbox"> - <label><strong>{{.i18n.Tr "admin.auths.syncenabled"}}</strong></label> + <label><strong>{{.locale.Tr "admin.auths.syncenabled"}}</strong></label> <input name="is_sync_enabled" type="checkbox" {{if .Source.IsSyncEnabled}}checked{{end}}> </div> </div> {{end}} <div class="inline field"> <div class="ui checkbox"> - <label><strong>{{.i18n.Tr "admin.auths.activated"}}</strong></label> + <label><strong>{{.locale.Tr "admin.auths.activated"}}</strong></label> <input name="is_active" type="checkbox" {{if .Source.IsActive}}checked{{end}}> </div> </div> <div class="field"> - <button class="ui green button">{{.i18n.Tr "admin.auths.update"}}</button> - <div class="ui red button delete-button" data-url="{{$.Link}}/delete" data-id="{{.Source.ID}}">{{.i18n.Tr "admin.auths.delete"}}</div> + <button class="ui green button">{{.locale.Tr "admin.auths.update"}}</button> + <div class="ui red button delete-button" data-url="{{$.Link}}/delete" data-id="{{.Source.ID}}">{{.locale.Tr "admin.auths.delete"}}</div> </div> </form> </div> @@ -435,10 +435,10 @@ <div class="ui small basic delete modal"> <div class="ui icon header"> {{svg "octicon-trash"}} - {{.i18n.Tr "admin.auths.delete_auth_title"}} + {{.locale.Tr "admin.auths.delete_auth_title"}} </div> <div class="content"> - <p>{{.i18n.Tr "admin.auths.delete_auth_desc"}}</p> + <p>{{.locale.Tr "admin.auths.delete_auth_desc"}}</p> </div> {{template "base/delete_modal_actions" .}} </div> diff --git a/templates/admin/auth/list.tmpl b/templates/admin/auth/list.tmpl index f1b4da35eb..3ce138449d 100644 --- a/templates/admin/auth/list.tmpl +++ b/templates/admin/auth/list.tmpl @@ -4,9 +4,9 @@ <div class="ui container"> {{template "base/alert" .}} <h4 class="ui top attached header"> - {{.i18n.Tr "admin.auths.auth_manage_panel"}} ({{.i18n.Tr "admin.total" .Total}}) + {{.locale.Tr "admin.auths.auth_manage_panel"}} ({{.locale.Tr "admin.total" .Total}}) <div class="ui right"> - <a class="ui primary tiny button" href="{{AppSubUrl}}/admin/auths/new">{{.i18n.Tr "admin.auths.new"}}</a> + <a class="ui primary tiny button" href="{{AppSubUrl}}/admin/auths/new">{{.locale.Tr "admin.auths.new"}}</a> </div> </h4> <div class="ui attached table segment"> @@ -14,12 +14,12 @@ <thead> <tr> <th>ID</th> - <th>{{.i18n.Tr "admin.auths.name"}}</th> - <th>{{.i18n.Tr "admin.auths.type"}}</th> - <th>{{.i18n.Tr "admin.auths.enabled"}}</th> - <th>{{.i18n.Tr "admin.auths.updated"}}</th> - <th>{{.i18n.Tr "admin.users.created"}}</th> - <th>{{.i18n.Tr "admin.users.edit"}}</th> + <th>{{.locale.Tr "admin.auths.name"}}</th> + <th>{{.locale.Tr "admin.auths.type"}}</th> + <th>{{.locale.Tr "admin.auths.enabled"}}</th> + <th>{{.locale.Tr "admin.auths.updated"}}</th> + <th>{{.locale.Tr "admin.users.created"}}</th> + <th>{{.locale.Tr "admin.users.edit"}}</th> </tr> </thead> <tbody> diff --git a/templates/admin/auth/new.tmpl b/templates/admin/auth/new.tmpl index 9882cde03b..6bfda9fcd3 100644 --- a/templates/admin/auth/new.tmpl +++ b/templates/admin/auth/new.tmpl @@ -4,7 +4,7 @@ <div class="ui container"> {{template "base/alert" .}} <h4 class="ui top attached header"> - {{.i18n.Tr "admin.auths.new"}} + {{.locale.Tr "admin.auths.new"}} </h4> <div class="ui attached segment"> <form class="ui form" action="{{.Link}}" method="post"> @@ -12,7 +12,7 @@ {{.CsrfTokenHtml}} <!-- Types and name --> <div class="inline required field {{if .Err_Type}}error{{end}}"> - <label>{{.i18n.Tr "admin.auths.auth_type"}}</label> + <label>{{.locale.Tr "admin.auths.auth_type"}}</label> <div class="ui selection type dropdown"> <input type="hidden" id="auth_type" name="type" value="{{.type}}"> <div class="text">{{.CurrentTypeName}}</div> @@ -25,7 +25,7 @@ </div> </div> <div class="required inline field {{if .Err_Name}}error{{end}}"> - <label for="name">{{.i18n.Tr "admin.auths.auth_name"}}</label> + <label for="name">{{.locale.Tr "admin.auths.auth_name"}}</label> <input id="name" name="name" value="{{.name}}" autofocus required> </div> @@ -37,16 +37,16 @@ <!-- PAM --> <div class="pam required field {{if not (eq .type 4)}}hide{{end}}"> - <label for="pam_service_name">{{.i18n.Tr "admin.auths.pam_service_name"}}</label> + <label for="pam_service_name">{{.locale.Tr "admin.auths.pam_service_name"}}</label> <input id="pam_service_name" name="pam_service_name" value="{{.pam_service_name}}" /> - <label for="pam_email_domain">{{.i18n.Tr "admin.auths.pam_email_domain"}}</label> + <label for="pam_email_domain">{{.locale.Tr "admin.auths.pam_email_domain"}}</label> <input id="pam_email_domain" name="pam_email_domain" value="{{.pam_email_domain}}"> </div> <div class="pam optional field {{if not (eq .type 4)}}hide{{end}}"> <div class="ui checkbox"> - <label for="skip_local_two_fa"><strong>{{.i18n.Tr "admin.auths.skip_local_two_fa"}}</strong></label> + <label for="skip_local_two_fa"><strong>{{.locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label> <input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}> - <p class="help">{{.i18n.Tr "admin.auths.skip_local_two_fa_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p> </div> </div> @@ -58,67 +58,67 @@ <div class="ldap field"> <div class="ui checkbox"> - <label><strong>{{.i18n.Tr "admin.auths.attributes_in_bind"}}</strong></label> + <label><strong>{{.locale.Tr "admin.auths.attributes_in_bind"}}</strong></label> <input name="attributes_in_bind" type="checkbox" {{if .attributes_in_bind}}checked{{end}}> </div> </div> <div class="ldap inline field {{if not (eq .type 2)}}hide{{end}}"> <div class="ui checkbox"> - <label><strong>{{.i18n.Tr "admin.auths.syncenabled"}}</strong></label> + <label><strong>{{.locale.Tr "admin.auths.syncenabled"}}</strong></label> <input name="is_sync_enabled" type="checkbox" {{if .is_sync_enabled}}checked{{end}}> </div> </div> <div class="inline field"> <div class="ui checkbox"> - <label><strong>{{.i18n.Tr "admin.auths.activated"}}</strong></label> + <label><strong>{{.locale.Tr "admin.auths.activated"}}</strong></label> <input name="is_active" type="checkbox" {{if .is_active}}checked{{end}}> </div> </div> <div class="field"> - <button class="ui green button">{{.i18n.Tr "admin.auths.new"}}</button> + <button class="ui green button">{{.locale.Tr "admin.auths.new"}}</button> </div> </form> </div> <h4 class="ui top attached header"> - {{.i18n.Tr "admin.auths.tips"}} + {{.locale.Tr "admin.auths.tips"}} </h4> <div class="ui attached segment"> <h5>GMail Settings:</h5> <p>Host: smtp.gmail.com, Port: 587, Enable TLS Encryption: true</p> - <h5>{{.i18n.Tr "admin.auths.tips.oauth2.general"}}:</h5> - <p>{{.i18n.Tr "admin.auths.tips.oauth2.general.tip"}}</p> + <h5>{{.locale.Tr "admin.auths.tips.oauth2.general"}}:</h5> + <p>{{.locale.Tr "admin.auths.tips.oauth2.general.tip"}}</p> - <h5 class="ui top attached header">{{.i18n.Tr "admin.auths.tip.oauth2_provider"}}</h5> + <h5 class="ui top attached header">{{.locale.Tr "admin.auths.tip.oauth2_provider"}}</h5> <div class="ui attached segment"> <li>Bitbucket</li> - <span>{{.i18n.Tr "admin.auths.tip.bitbucket"}}</span> + <span>{{.locale.Tr "admin.auths.tip.bitbucket"}}</span> <li>Dropbox</li> - <span>{{.i18n.Tr "admin.auths.tip.dropbox"}}</span> + <span>{{.locale.Tr "admin.auths.tip.dropbox"}}</span> <li>Facebook</li> - <span>{{.i18n.Tr "admin.auths.tip.facebook"}}</span> + <span>{{.locale.Tr "admin.auths.tip.facebook"}}</span> <li>GitHub</li> - <span>{{.i18n.Tr "admin.auths.tip.github"}}</span> + <span>{{.locale.Tr "admin.auths.tip.github"}}</span> <li>GitLab</li> - <span>{{.i18n.Tr "admin.auths.tip.gitlab"}}</span> + <span>{{.locale.Tr "admin.auths.tip.gitlab"}}</span> <li>Google</li> - <span>{{.i18n.Tr "admin.auths.tip.google_plus"}}</span> + <span>{{.locale.Tr "admin.auths.tip.google_plus"}}</span> <li>OpenID Connect</li> - <span>{{.i18n.Tr "admin.auths.tip.openid_connect"}}</span> + <span>{{.locale.Tr "admin.auths.tip.openid_connect"}}</span> <li>Twitter</li> - <span>{{.i18n.Tr "admin.auths.tip.twitter"}}</span> + <span>{{.locale.Tr "admin.auths.tip.twitter"}}</span> <li>Discord</li> - <span>{{.i18n.Tr "admin.auths.tip.discord"}}</span> + <span>{{.locale.Tr "admin.auths.tip.discord"}}</span> <li>Gitea</li> - <span>{{.i18n.Tr "admin.auths.tip.gitea"}}</span> + <span>{{.locale.Tr "admin.auths.tip.gitea"}}</span> <li>Nextcloud</li> - <span>{{.i18n.Tr "admin.auths.tip.nextcloud"}}</span> + <span>{{.locale.Tr "admin.auths.tip.nextcloud"}}</span> <li>Yandex</li> - <span>{{.i18n.Tr "admin.auths.tip.yandex"}}</span> + <span>{{.locale.Tr "admin.auths.tip.yandex"}}</span> <li>Mastodon</li> - <span>{{.i18n.Tr "admin.auths.tip.mastodon"}}</span> + <span>{{.locale.Tr "admin.auths.tip.mastodon"}}</span> </div> </div> </div> diff --git a/templates/admin/auth/source/ldap.tmpl b/templates/admin/auth/source/ldap.tmpl index afdfbadd65..b44eb799b9 100644 --- a/templates/admin/auth/source/ldap.tmpl +++ b/templates/admin/auth/source/ldap.tmpl @@ -1,6 +1,6 @@ <div class="ldap dldap field {{if not (or (eq .type 2) (eq .type 5))}}hide{{end}}"> <div class="inline required field {{if .Err_SecurityProtocol}}error{{end}}"> - <label>{{.i18n.Tr "admin.auths.security_protocol"}}</label> + <label>{{.locale.Tr "admin.auths.security_protocol"}}</label> <div class="ui selection security-protocol dropdown"> <input type="hidden" id="security_protocol" name="security_protocol" value="{{.security_protocol}}"> <div class="text">{{.CurrentSecurityProtocol}}</div> @@ -13,103 +13,103 @@ </div> </div> <div class="required field"> - <label for="host">{{.i18n.Tr "admin.auths.host"}}</label> + <label for="host">{{.locale.Tr "admin.auths.host"}}</label> <input id="host" name="host" value="{{.host}}" placeholder="e.g. mydomain.com"> </div> <div class="required field"> - <label for="port">{{.i18n.Tr "admin.auths.port"}}</label> + <label for="port">{{.locale.Tr "admin.auths.port"}}</label> <input id="port" name="port" value="{{.port}}" placeholder="e.g. 636"> </div> <div class="has-tls inline field {{if not .HasTLS}}hide{{end}}"> <div class="ui checkbox"> - <label><strong>{{.i18n.Tr "admin.auths.skip_tls_verify"}}</strong></label> + <label><strong>{{.locale.Tr "admin.auths.skip_tls_verify"}}</strong></label> <input name="skip_verify" type="checkbox" {{if .skip_verify}}checked{{end}}> </div> </div> <div class="ldap field {{if not (eq .type 2)}}hide{{end}}"> - <label for="bind_dn">{{.i18n.Tr "admin.auths.bind_dn"}}</label> + <label for="bind_dn">{{.locale.Tr "admin.auths.bind_dn"}}</label> <input id="bind_dn" name="bind_dn" value="{{.bind_dn}}" placeholder="e.g. cn=Search,dc=mydomain,dc=com"> </div> <div class="ldap field {{if not (eq .type 2)}}hide{{end}}"> - <label for="bind_password">{{.i18n.Tr "admin.auths.bind_password"}}</label> + <label for="bind_password">{{.locale.Tr "admin.auths.bind_password"}}</label> <input id="bind_password" name="bind_password" type="password" autocomplete="off" value="{{.bind_password}}"> </div> <div class="binddnrequired {{if (eq .type 2)}}required{{end}} field"> - <label for="user_base">{{.i18n.Tr "admin.auths.user_base"}}</label> + <label for="user_base">{{.locale.Tr "admin.auths.user_base"}}</label> <input id="user_base" name="user_base" value="{{.user_base}}" placeholder="e.g. ou=Users,dc=mydomain,dc=com"> </div> <div class="dldap required field {{if not (eq .type 5)}}hide{{end}}"> - <label for="user_dn">{{.i18n.Tr "admin.auths.user_dn"}}</label> + <label for="user_dn">{{.locale.Tr "admin.auths.user_dn"}}</label> <input id="user_dn" name="user_dn" value="{{.user_dn}}" placeholder="e.g. uid=%s,ou=Users,dc=mydomain,dc=com"> </div> <div class="required field"> - <label for="filter">{{.i18n.Tr "admin.auths.filter"}}</label> + <label for="filter">{{.locale.Tr "admin.auths.filter"}}</label> <input id="filter" name="filter" value="{{.filter}}" placeholder="e.g. (&(objectClass=posixAccount)(uid=%s))"> </div> <div class="field"> - <label for="admin_filter">{{.i18n.Tr "admin.auths.admin_filter"}}</label> + <label for="admin_filter">{{.locale.Tr "admin.auths.admin_filter"}}</label> <input id="admin_filter" name="admin_filter" value="{{.admin_filter}}"> </div> <div class="field"> - <label for="restricted_filter">{{.i18n.Tr "admin.auths.restricted_filter"}}</label> + <label for="restricted_filter">{{.locale.Tr "admin.auths.restricted_filter"}}</label> <input id="restricted_filter" name="admin_filter" value="{{.restricted_filter}}"> - <p class="help">{{.i18n.Tr "admin.auths.restricted_filter_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.restricted_filter_helper"}}</p> </div> <div class="field"> - <label for="attribute_username">{{.i18n.Tr "admin.auths.attribute_username"}}</label> - <input id="attribute_username" name="attribute_username" value="{{.attribute_username}}" placeholder="{{.i18n.Tr "admin.auths.attribute_username_placeholder"}}"> + <label for="attribute_username">{{.locale.Tr "admin.auths.attribute_username"}}</label> + <input id="attribute_username" name="attribute_username" value="{{.attribute_username}}" placeholder="{{.locale.Tr "admin.auths.attribute_username_placeholder"}}"> </div> <div class="field"> - <label for="attribute_name">{{.i18n.Tr "admin.auths.attribute_name"}}</label> + <label for="attribute_name">{{.locale.Tr "admin.auths.attribute_name"}}</label> <input id="attribute_name" name="attribute_name" value="{{.attribute_name}}"> </div> <div class="field"> - <label for="attribute_surname">{{.i18n.Tr "admin.auths.attribute_surname"}}</label> + <label for="attribute_surname">{{.locale.Tr "admin.auths.attribute_surname"}}</label> <input id="attribute_surname" name="attribute_surname" value="{{.attribute_surname}}"> </div> <div class="required field"> - <label for="attribute_mail">{{.i18n.Tr "admin.auths.attribute_mail"}}</label> + <label for="attribute_mail">{{.locale.Tr "admin.auths.attribute_mail"}}</label> <input id="attribute_mail" name="attribute_mail" value="{{.attribute_mail}}" placeholder="e.g. mail"> </div> <div class="field"> - <label for="attribute_ssh_public_key">{{.i18n.Tr "admin.auths.attribute_ssh_public_key"}}</label> + <label for="attribute_ssh_public_key">{{.locale.Tr "admin.auths.attribute_ssh_public_key"}}</label> <input id="attribute_ssh_public_key" name="attribute_ssh_public_key" value="{{.attribute_ssh_public_key}}" placeholder="e.g. SshPublicKey"> </div> <div class="field"> - <label for="attribute_avatar">{{.i18n.Tr "admin.auths.attribute_avatar"}}</label> + <label for="attribute_avatar">{{.locale.Tr "admin.auths.attribute_avatar"}}</label> <input id="attribute_avatar" name="attribute_avatar" value="{{.attribute_avatar}}" placeholder="e.g. jpegPhoto"> </div> <!-- ldap group begin --> <div class="inline field"> <div class="ui checkbox"> - <label><strong>{{.i18n.Tr "admin.auths.enable_ldap_groups"}}</strong></label> + <label><strong>{{.locale.Tr "admin.auths.enable_ldap_groups"}}</strong></label> <input type="checkbox" name="groups_enabled" class="js-ldap-group-toggle" {{if .groups_enabled}}checked{{end}}> </div> </div> <div id="ldap-group-options" class="ui segment secondary"> <div class="field"> - <label>{{.i18n.Tr "admin.auths.group_search_base"}}</label> + <label>{{.locale.Tr "admin.auths.group_search_base"}}</label> <input name="group_dn" value="{{.group_dn}}" placeholder="e.g. ou=group,dc=mydomain,dc=com"> </div> <div class="field"> - <label>{{.i18n.Tr "admin.auths.group_attribute_list_users"}}</label> + <label>{{.locale.Tr "admin.auths.group_attribute_list_users"}}</label> <input name="group_member_uid" value="{{.group_member_uid}}" placeholder="e.g. memberUid"> </div> <div class="field"> - <label>{{.i18n.Tr "admin.auths.user_attribute_in_group"}}</label> + <label>{{.locale.Tr "admin.auths.user_attribute_in_group"}}</label> <input name="user_uid" value="{{.user_uid}}" placeholder="e.g. uid"> </div> <div class="field"> - <label>{{.i18n.Tr "admin.auths.verify_group_membership"}}</label> + <label>{{.locale.Tr "admin.auths.verify_group_membership"}}</label> <input name="group_filter" value="{{.group_filter}}" placeholder="e.g. (|(cn=gitea_users)(cn=admins))"> </div> <div class="field"> - <label>{{.i18n.Tr "admin.auths.map_group_to_team"}}</label> + <label>{{.locale.Tr "admin.auths.map_group_to_team"}}</label> <input name="group_team_map" value="{{.group_team_map}}" placeholder='e.g. {"cn=my-group,cn=groups,dc=example,dc=org": {"MyGiteaOrganization": ["MyGiteaTeam1", "MyGiteaTeam2"]}}'> </div> <div class="ui checkbox"> - <label>{{.i18n.Tr "admin.auths.map_group_to_team_removal"}}</label> + <label>{{.locale.Tr "admin.auths.map_group_to_team_removal"}}</label> <input name="group_team_map_removal" type="checkbox" {{if .group_team_map_removal}}checked{{end}}> </div> </div> @@ -117,24 +117,24 @@ <div class="ldap inline field {{if not (eq .type 2)}}hide{{end}}"> <div class="ui checkbox"> - <label for="use_paged_search"><strong>{{.i18n.Tr "admin.auths.use_paged_search"}}</strong></label> + <label for="use_paged_search"><strong>{{.locale.Tr "admin.auths.use_paged_search"}}</strong></label> <input id="use_paged_search" name="use_paged_search" class="use-paged-search" type="checkbox" {{if .use_paged_search}}checked{{end}}> </div> </div> <div class="ldap field search-page-size required {{if or (not (eq .type 2)) (not .use_paged_search)}}hide{{end}}"> - <label for="search_page_size">{{.i18n.Tr "admin.auths.search_page_size"}}</label> + <label for="search_page_size">{{.locale.Tr "admin.auths.search_page_size"}}</label> <input id="search_page_size" name="search_page_size" value="{{.search_page_size}}"> </div> <div class="optional field"> <div class="ui checkbox"> - <label for="skip_local_two_fa"><strong>{{.i18n.Tr "admin.auths.skip_local_two_fa"}}</strong></label> + <label for="skip_local_two_fa"><strong>{{.locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label> <input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}> - <p class="help">{{.i18n.Tr "admin.auths.skip_local_two_fa_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p> </div> </div> <div class="inline field"> <div class="ui checkbox"> - <label for="allow_deactivate_all"><strong>{{.i18n.Tr "admin.auths.allow_deactivate_all"}}</strong></label> + <label for="allow_deactivate_all"><strong>{{.locale.Tr "admin.auths.allow_deactivate_all"}}</strong></label> <input id="allow_deactivate_all" name="allow_deactivate_all" type="checkbox" {{if .allow_deactivate_all}}checked{{end}}> </div> </div> diff --git a/templates/admin/auth/source/oauth.tmpl b/templates/admin/auth/source/oauth.tmpl index 3991dc2170..166373a324 100644 --- a/templates/admin/auth/source/oauth.tmpl +++ b/templates/admin/auth/source/oauth.tmpl @@ -1,6 +1,6 @@ <div class="oauth2 field {{if not (eq .type 6)}}hide{{end}}"> <div class="inline required field"> - <label>{{.i18n.Tr "admin.auths.oauth2_provider"}}</label> + <label>{{.locale.Tr "admin.auths.oauth2_provider"}}</label> <div class="ui selection type dropdown"> <input type="hidden" id="oauth2_provider" name="oauth2_provider" value="{{.oauth2_provider}}"> <div class="text">{{.oauth2_provider}}</div> @@ -13,53 +13,53 @@ </div> </div> <div class="required field"> - <label for="oauth2_key">{{.i18n.Tr "admin.auths.oauth2_clientID"}}</label> + <label for="oauth2_key">{{.locale.Tr "admin.auths.oauth2_clientID"}}</label> <input id="oauth2_key" name="oauth2_key" value="{{.oauth2_key}}"> </div> <div class="required field"> - <label for="oauth2_secret">{{.i18n.Tr "admin.auths.oauth2_clientSecret"}}</label> + <label for="oauth2_secret">{{.locale.Tr "admin.auths.oauth2_clientSecret"}}</label> <input id="oauth2_secret" name="oauth2_secret" value="{{.oauth2_secret}}"> </div> <div class="optional field"> - <label for="oauth2_icon_url">{{.i18n.Tr "admin.auths.oauth2_icon_url"}}</label> + <label for="oauth2_icon_url">{{.locale.Tr "admin.auths.oauth2_icon_url"}}</label> <input id="oauth2_icon_url" name="oauth2_icon_url" value="{{.oauth2_icon_url}}"> </div> <div class="open_id_connect_auto_discovery_url required field"> - <label for="open_id_connect_auto_discovery_url">{{.i18n.Tr "admin.auths.openIdConnectAutoDiscoveryURL"}}</label> + <label for="open_id_connect_auto_discovery_url">{{.locale.Tr "admin.auths.openIdConnectAutoDiscoveryURL"}}</label> <input id="open_id_connect_auto_discovery_url" name="open_id_connect_auto_discovery_url" value="{{.open_id_connect_auto_discovery_url}}"> </div> <div class="optional field"> <div class="ui checkbox"> - <label for="skip_local_two_fa"><strong>{{.i18n.Tr "admin.auths.skip_local_two_fa"}}</strong></label> + <label for="skip_local_two_fa"><strong>{{.locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label> <input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}> - <p class="help">{{.i18n.Tr "admin.auths.skip_local_two_fa_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p> </div> </div> <div class="oauth2_use_custom_url inline field"> <div class="ui checkbox"> - <label><strong>{{.i18n.Tr "admin.auths.oauth2_use_custom_url"}}</strong></label> + <label><strong>{{.locale.Tr "admin.auths.oauth2_use_custom_url"}}</strong></label> <input id="oauth2_use_custom_url" name="oauth2_use_custom_url" type="checkbox"> </div> </div> <div class="oauth2_use_custom_url_field oauth2_auth_url required field"> - <label for="oauth2_auth_url">{{.i18n.Tr "admin.auths.oauth2_authURL"}}</label> + <label for="oauth2_auth_url">{{.locale.Tr "admin.auths.oauth2_authURL"}}</label> <input id="oauth2_auth_url" name="oauth2_auth_url" value="{{.oauth2_auth_url}}"> </div> <div class="oauth2_use_custom_url_field oauth2_token_url required field"> - <label for="oauth2_token_url">{{.i18n.Tr "admin.auths.oauth2_tokenURL"}}</label> + <label for="oauth2_token_url">{{.locale.Tr "admin.auths.oauth2_tokenURL"}}</label> <input id="oauth2_token_url" name="oauth2_token_url" value="{{.oauth2_token_url}}"> </div> <div class="oauth2_use_custom_url_field oauth2_profile_url required field"> - <label for="oauth2_profile_url">{{.i18n.Tr "admin.auths.oauth2_profileURL"}}</label> + <label for="oauth2_profile_url">{{.locale.Tr "admin.auths.oauth2_profileURL"}}</label> <input id="oauth2_profile_url" name="oauth2_profile_url" value="{{.oauth2_profile_url}}"> </div> <div class="oauth2_use_custom_url_field oauth2_email_url required field"> - <label for="oauth2_email_url">{{.i18n.Tr "admin.auths.oauth2_emailURL"}}</label> + <label for="oauth2_email_url">{{.locale.Tr "admin.auths.oauth2_emailURL"}}</label> <input id="oauth2_email_url" name="oauth2_email_url" value="{{.oauth2_email_url}}"> </div> <div class="oauth2_use_custom_url_field oauth2_tenant required field"> - <label for="oauth2_tenant">{{.i18n.Tr "admin.auths.oauth2_tenant"}}</label> + <label for="oauth2_tenant">{{.locale.Tr "admin.auths.oauth2_tenant"}}</label> <input id="oauth2_tenant" name="oauth2_tenant" value="{{.oauth2_tenant}}"> </div> @@ -73,29 +73,29 @@ {{end}}{{end}} <div class="field"> - <label for="oauth2_scopes">{{.i18n.Tr "admin.auths.oauth2_scopes"}}</label> + <label for="oauth2_scopes">{{.locale.Tr "admin.auths.oauth2_scopes"}}</label> <input id="oauth2_scopes" name="oauth2_scopes" values="{{.oauth2_scopes}}"> </div> <div class="field"> - <label for="oauth2_required_claim_name">{{.i18n.Tr "admin.auths.oauth2_required_claim_name"}}</label> + <label for="oauth2_required_claim_name">{{.locale.Tr "admin.auths.oauth2_required_claim_name"}}</label> <input id="oauth2_required_claim_name" name="oauth2_required_claim_name" values="{{.oauth2_required_claim_name}}"> - <p class="help">{{.i18n.Tr "admin.auths.oauth2_required_claim_name_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.oauth2_required_claim_name_helper"}}</p> </div> <div class="field"> - <label for="oauth2_required_claim_value">{{.i18n.Tr "admin.auths.oauth2_required_claim_value"}}</label> + <label for="oauth2_required_claim_value">{{.locale.Tr "admin.auths.oauth2_required_claim_value"}}</label> <input id="oauth2_required_claim_value" name="oauth2_required_claim_value" values="{{.oauth2_required_claim_value}}"> - <p class="help">{{.i18n.Tr "admin.auths.oauth2_required_claim_value_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.oauth2_required_claim_value_helper"}}</p> </div> <div class="field"> - <label for="oauth2_group_claim_name">{{.i18n.Tr "admin.auths.oauth2_group_claim_name"}}</label> + <label for="oauth2_group_claim_name">{{.locale.Tr "admin.auths.oauth2_group_claim_name"}}</label> <input id="oauth2_group_claim_name" name="oauth2_group_claim_name" value="{{.oauth2_group_claim_name}}"> </div> <div class="field"> - <label for="oauth2_admin_group">{{.i18n.Tr "admin.auths.oauth2_admin_group"}}</label> + <label for="oauth2_admin_group">{{.locale.Tr "admin.auths.oauth2_admin_group"}}</label> <input id="oauth2_admin_group" name="oauth2_admin_group" value="{{.oauth2_group_claim_name}}"> </div> <div class="field"> - <label for="oauth2_restricted_group">{{.i18n.Tr "admin.auths.oauth2_restricted_group"}}</label> + <label for="oauth2_restricted_group">{{.locale.Tr "admin.auths.oauth2_restricted_group"}}</label> <input id="oauth2_restricted_group" name="oauth2_restricted_group" value="{{.oauth2_group_claim_name}}"> </div> </div> diff --git a/templates/admin/auth/source/smtp.tmpl b/templates/admin/auth/source/smtp.tmpl index 8572d6dc56..2d577412c1 100644 --- a/templates/admin/auth/source/smtp.tmpl +++ b/templates/admin/auth/source/smtp.tmpl @@ -1,6 +1,6 @@ <div class="smtp field {{if not (eq .type 3)}}hide{{end}}"> <div class="inline required field"> - <label>{{.i18n.Tr "admin.auths.smtp_auth"}}</label> + <label>{{.locale.Tr "admin.auths.smtp_auth"}}</label> <div class="ui selection type dropdown"> <input type="hidden" id="smtp_auth" name="smtp_auth" value="{{.smtp_auth}}"> <div class="text">{{.smtp_auth}}</div> @@ -13,47 +13,47 @@ </div> </div> <div class="required field"> - <label for="smtp_host">{{.i18n.Tr "admin.auths.smtphost"}}</label> + <label for="smtp_host">{{.locale.Tr "admin.auths.smtphost"}}</label> <input id="smtp_host" name="smtp_host" value="{{.smtp_host}}"> </div> <div class="required field"> - <label for="smtp_port">{{.i18n.Tr "admin.auths.smtpport"}}</label> + <label for="smtp_port">{{.locale.Tr "admin.auths.smtpport"}}</label> <input id="smtp_port" name="smtp_port" value="{{.smtp_port}}"> </div> <div class="inline field"> <div class="ui checkbox"> - <label for="force_smtps"><strong>{{.i18n.Tr "admin.auths.force_smtps"}}</strong></label> + <label for="force_smtps"><strong>{{.locale.Tr "admin.auths.force_smtps"}}</strong></label> <input id="force_smtps" name="force_smtps" type="checkbox" {{if .force_smtps}}checked{{end}}> - <p class="help">{{.i18n.Tr "admin.auths.force_smtps_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.force_smtps_helper"}}</p> </div> </div> <div class="inline field"> <div class="ui checkbox"> - <label><strong>{{.i18n.Tr "admin.auths.skip_tls_verify"}}</strong></label> + <label><strong>{{.locale.Tr "admin.auths.skip_tls_verify"}}</strong></label> <input name="skip_verify" type="checkbox" {{if .skip_verify}}checked{{end}}> </div> </div> <div class="field"> - <label for="helo_hostname">{{.i18n.Tr "admin.auths.helo_hostname"}}</label> + <label for="helo_hostname">{{.locale.Tr "admin.auths.helo_hostname"}}</label> <input id="helo_hostname" name="helo_hostname" value="{{.helo_hostname}}"> - <p class="help">{{.i18n.Tr "admin.auths.helo_hostname_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.helo_hostname_helper"}}</p> </div> <div class="inline field"> <div class="ui checkbox"> - <label for="disable_helo"><strong>{{.i18n.Tr "admin.auths.disable_helo"}}</strong></label> + <label for="disable_helo"><strong>{{.locale.Tr "admin.auths.disable_helo"}}</strong></label> <input id="disable_helo" name="disable_helo" type="checkbox" {{if .disable_helo}}checked{{end}}> </div> </div> <div class="field"> - <label for="allowed_domains">{{.i18n.Tr "admin.auths.allowed_domains"}}</label> + <label for="allowed_domains">{{.locale.Tr "admin.auths.allowed_domains"}}</label> <input id="allowed_domains" name="allowed_domains" value="{{.allowed_domains}}"> - <p class="help">{{.i18n.Tr "admin.auths.allowed_domains_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.allowed_domains_helper"}}</p> </div> <div class="optional field"> <div class="ui checkbox"> - <label for="skip_local_two_fa"><strong>{{.i18n.Tr "admin.auths.skip_local_two_fa"}}</strong></label> + <label for="skip_local_two_fa"><strong>{{.locale.Tr "admin.auths.skip_local_two_fa"}}</strong></label> <input id="skip_local_two_fa" name="skip_local_two_fa" type="checkbox" {{if .skip_local_two_fa}}checked{{end}}> - <p class="help">{{.i18n.Tr "admin.auths.skip_local_two_fa_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.skip_local_two_fa_helper"}}</p> </div> </div> </div> diff --git a/templates/admin/auth/source/sspi.tmpl b/templates/admin/auth/source/sspi.tmpl index 91697ef9c5..dee40d9fd5 100644 --- a/templates/admin/auth/source/sspi.tmpl +++ b/templates/admin/auth/source/sspi.tmpl @@ -1,32 +1,32 @@ <div class="sspi field {{if not (eq .type 7)}}hide{{end}}"> <div class="field"> <div class="ui checkbox"> - <label for="sspi_auto_create_users"><strong>{{.i18n.Tr "admin.auths.sspi_auto_create_users"}}</strong></label> + <label for="sspi_auto_create_users"><strong>{{.locale.Tr "admin.auths.sspi_auto_create_users"}}</strong></label> <input id="sspi_auto_create_users" name="sspi_auto_create_users" class="sspi-auto-create-users" type="checkbox" {{if .SSPIAutoCreateUsers}}checked{{end}}> - <p class="help">{{.i18n.Tr "admin.auths.sspi_auto_create_users_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.sspi_auto_create_users_helper"}}</p> </div> </div> <div class="field"> <div class="ui checkbox"> - <label for="sspi_auto_activate_users"><strong>{{.i18n.Tr "admin.auths.sspi_auto_activate_users"}}</strong></label> + <label for="sspi_auto_activate_users"><strong>{{.locale.Tr "admin.auths.sspi_auto_activate_users"}}</strong></label> <input id="sspi_auto_activate_users" name="sspi_auto_activate_users" class="sspi-auto-activate-users" type="checkbox" {{if .SSPIAutoActivateUsers}}checked{{end}}> - <p class="help">{{.i18n.Tr "admin.auths.sspi_auto_activate_users_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.sspi_auto_activate_users_helper"}}</p> </div> </div> <div class="field"> <div class="ui checkbox"> - <label for="sspi_strip_domain_names"><strong>{{.i18n.Tr "admin.auths.sspi_strip_domain_names"}}</strong></label> + <label for="sspi_strip_domain_names"><strong>{{.locale.Tr "admin.auths.sspi_strip_domain_names"}}</strong></label> <input id="sspi_strip_domain_names" name="sspi_strip_domain_names" class="sspi-strip-domain-names" type="checkbox" {{if .SSPIStripDomainNames}}checked{{end}}> - <p class="help">{{.i18n.Tr "admin.auths.sspi_strip_domain_names_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.sspi_strip_domain_names_helper"}}</p> </div> </div> <div class="required field"> - <label for="sspi_separator_replacement">{{.i18n.Tr "admin.auths.sspi_separator_replacement"}}</label> + <label for="sspi_separator_replacement">{{.locale.Tr "admin.auths.sspi_separator_replacement"}}</label> <input id="sspi_separator_replacement" name="sspi_separator_replacement" value="{{.SSPISeparatorReplacement}}"> - <p class="help">{{.i18n.Tr "admin.auths.sspi_separator_replacement_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.sspi_separator_replacement_helper"}}</p> </div> <div class="field"> - <label for="sspi_default_language">{{.i18n.Tr "admin.auths.sspi_default_language"}}</label> + <label for="sspi_default_language">{{.locale.Tr "admin.auths.sspi_default_language"}}</label> <div class="ui language selection dropdown" id="sspi_default_language"> <input name="sspi_default_language" type="hidden" value="{{.SSPIDefaultLanguage}}"> {{svg "octicon-triangle-down" 14 "dropdown icon"}} @@ -38,6 +38,6 @@ {{end}} </div> </div> - <p class="help">{{.i18n.Tr "admin.auths.sspi_default_language_helper"}}</p> + <p class="help">{{.locale.Tr "admin.auths.sspi_default_language_helper"}}</p> </div> </div> |