Ver Fonte

ldap&dropdown translated

sou há 8 anos atrás
pai
commit
2a2a419a2a

+ 2 - 1
lib/crowi/express-init.js

@@ -38,7 +38,8 @@ module.exports = function(crowi, app) {
       fallbackLng: [User.LANG_EN_US],
       whitelist: Object.keys(User.getLanguageLabels()).map((k) => User[k]),
       backend: {
-        loadPath: crowi.localeDir + '{{lng}}/translation.json'
+        // loadPath: crowi.localeDir + '{{lng}}/translation.json'
+        loadPath: crowi.localeDir + 'en-US/translation.json'
       },
       detection: {
         order: ['userSettingDetector', 'header', 'navigator'],

+ 61 - 8
lib/locales/en-US/translation.json

@@ -253,7 +253,7 @@
     "No_SMTP_setting": "If you do not have SMTP settings, e-mails will be sent via SES. You need to verify from e-mail address and production settings.",
     "change_setting": "Caution:if you change this setting not completed, you will not be able to access files you have uploaded so far.",
     "region": "Region",
-    "Packet name": "Packet name",
+    "bucket name": "Bucket name",
     "Plugin settings": "Plugin settings",
     "Enable plugin loading": "Enable plugin loading",
     "Load plugins": "Load plugins",
@@ -271,7 +271,8 @@
 		"common_authentication": "If you set the basic authentication, common authentication is applied on the whole page.",
 		"without_encryption": "Please be noted that your ID and Password will be sent wihtout encryption.",
 		"users_without_account": "Users without account is not accessible",
-		"restrict_emails": "You can restrict registerable e-mail address.",
+    "example": "Example",
+    "restrict_emails": "You can restrict registerable e-mail address.",
 		"for_instance": " For instance, if you use growi within a company, you can write ",
 		"only_those": " Only those whose e-mail address including the company address can register.",
 		"insert_single": "Please insert single e-mail address per line.",
@@ -290,18 +291,70 @@
     "crowi_auth": "Crowi classic authentication mechanism",
 		"require_server_restart": "Restarting the server is required.",
 		"server_on_passport_auth": "The server is running with Passport authentication mechanism.",
-		"server_on_crowi_auth": "The server is running with Official Crowi authentication mechanism.",
+		"server_on_crowi_auth": "The server is running with official Crowi authentication mechanism.",
 		"google_setting": "Google Setting",
-    "api_manager": "You can use your Google account to sign up and login after creating OAuth2 ClientId at <a href=\"https://console.cloud.google.com/apis/credentials\">API Manager on Google Cloud Platform</a>",
+    "connect_api_manager": "You can use your Google account to sign up and login after creating OAuth2 ClientId at <a href=\"https://console.cloud.google.com/apis/credentials\">API Manager on Google Cloud Platform</a>",
 		"access_api_manager": "Access <a href=\"https://console.cloud.google.com/apis/credentials\">API Manager</a>",
 		"create_project": "Create Project if no projects have been created.",
 		"create_auth_to_oauth": "\"Create credentials\" -> \"OAuth clientID\"",
 		"select_webapp": "Select \"Web Application\"",
     "change_redirect_url": "Enter <code>https://${crowi.host}/google/callback</code> <br>(where < code > $ {crowi.host} < /code> is your host name) for \"Authorized redirect URIs\".",
-		"updated": "Updated",
-		"error": "Error",
-		"Treat username matching as identical": "Automatically bind external accounts newly logged in to local accounts when <code>username</code> match",
-		"Treat username matching as identical_warn": "WARNING: Be aware of security because the system treats the same user as a match of <code>username</code>."
+    "clientID": "Client ID",
+    "client_secret": "クライアントシークレット",
+    "guest_mode": {
+      "deny": "Deny Unregistered Users",
+      "readonly": "View Only"
+    },
+    "registration_mode": {
+      "open": "Anyone",
+      "restricted": "Reuqire Admin permission",
+      "closed": "Invitation Only"
+    },
+    "configuration": "Configuration",
+    "default": "Default",
+    "optional": "Optional",
+    "ldap": {
+      "use_ldap": "Use LDAP",
+      "server_url": "Server URL",
+      "server_url_detail": "The LDAP URL of the directory service in the format <code>ldap://host:port/DN</code> or <code>ldaps://host:port/DN</code>.",
+      "bind_mode": "Binding Mode",
+      "bind_manager": "Manager Bind",
+      "bind_user": "User Bind",
+      "bind_DN": "Bind DN",
+      "bind_DN_manager_detail": "The DN of the account that authenticates and queries the directory service",
+      "bind_DN_user_detail1": "The query used to bind with the directory service.",
+      "bind_DN_user_detail2": "Use <code>&#123;&#123;username&#125;&#125;</code> to reference the username entered in the login page.",
+      "bind_DN_password": "Bind DN Password",
+      "bind_DN_password_manager_detail": "The password for the Bind DN account.",
+      "bind_DN_password_user_detail": "The password that is entered in the login page will be used to bind.",
+      "search_filter": "Search Filter",
+      "search_filter_detail1": "The query used to locate the authenticated user.",
+      "search_filter_detail2": "Use <code>&#123;&#123;username&#125;&#125;</code> to reference the username entered in the login page.",
+      "search_filter_detail3": "If empty, the filter <code>(uid=&#123;&#123;username&#125;&#125;)</code> is used.",
+      "search_filter_example": "Example to match with 'uid' or 'mail'",
+      "attribute_mapping": "Attribute Mapping",
+      "username": "Username",
+      "username_detail": "Specification of mappings when creating new users",
+      "Treat username matching as identical": "Automatically bind external accounts newly logged in to local accounts when <code>username</code> match",
+  		"Treat username matching as identical_warn": "WARNING: Be aware of security because the system treats the same user as a match of <code>username</code>.",
+      "group_search_base_DN": "Group Search Base DN",
+      "group_search_base_DN_detail": "The base DN from which to search for groups. If defined, also <code>Group Search Filter</code> must be defined for the search to work.",
+      "group_search_filter": "Group Search Filter",
+      "group_search_filter_detail1": "The query used to filter for groups.",
+      "group_search_filter_detail2": "Use <code>&#123;&#123;dn&#125;&#125;</code> to have it replaced of the found user object.",
+      "group_search_filter_detail3": "<code>(&(cn=group1)(memberUid=&#123;&#123;dn&#125;&#125;))</code> hits the groups which has <code>cn=group1</code> and <code>memberUid</code> includes the user's <code>uid</code>(when <code>Group DN Property</code> is not changed from the default value.)",
+      "group_DN_property": "Group DN Property",
+      "group_DN_property_detail": "The property of user object to use in <code>&#123;&#123;dn&#125;&#125;</code> interpolation of <code>Group Search Filter</code>.",
+      "test_config": "Test Saved Configuration"
+    },
+    "Google OAuth": {
+    },
+    "Facebook": {
+    },
+    "Twitter": {
+    },
+    "Github": {
+    }
 	},
 
   "markdown_setting": {

+ 59 - 6
lib/locales/ja/translation.json

@@ -272,7 +272,7 @@
     "No_SMTP_setting": "また、SMTP の設定が無い場合、SES を利用したメール送信が行われます。FromメールアドレスのVerify、プロダクション利用設定をする必要があります。",
     "change_setting": "この設定を途中で変更すると、これまでにアップロードしたファイル等へのアクセスができなくなりますのでご注意下さい。",
     "region": "リージョン",
-    "Packet name": "パケット名",
+    "bucket name": "バケット名",
     "Plugin settings": "プラグイン設定",
     "Enable plugin loading": "プラグインの読み込みを有効にします。",
     "Load plugins": "プラグインを読み込む",
@@ -291,6 +291,7 @@
     "common_authentication": "Basic認証を設定すると、ページ全体に共通の認証がかかります。",
     "without_encryption": "IDとパスワードは暗号化されずに送信されるのでご注意下さい。",
     "users_without_account": "アカウントを持たないユーザーはアクセス不可",
+    "example": "例",
     "restrict_emails": "登録可能なメールアドレスを制限することができます。",
     "for_instance":"例えば、会社で使う場合 などと記載すると、",
     "only_those":"その会社のメールアドレスを持っている人のみ登録可能になります。",
@@ -312,16 +313,68 @@
     "server_on_passport_auth": "パスポート認証でサーバーが稼働しています。",
     "server_on_crowi_auth": "公式crowi認証でサーバーが稼働しています。",
     "google_setting": "Google 設定",
-    "api_manager": "Google Cloud Platform の <a href=\"https://console.cloud.google.com/apis/credentials\">API Manager</a>から OAuth2 Client ID を作成すると、Google アカウントにコネクトして登録やログインが可能になります。",
+    "connect_api_manager": "Google Cloud Platform の <a href=\"https://console.cloud.google.com/apis/credentials\">API Manager</a>から OAuth2 Client ID を作成すると、Google アカウントにコネクトして登録やログインが可能になります。",
     "access_api_manager": "<a href=\"https://console.cloud.google.com/apis/credentials\">API Manager</a> へアクセス",
     "create_project": "プロジェクトを作成していない場合は作成してください",
     "create_auth_to_oauth": "「認証情報を作成」-> OAuthクライアントID",
     "select_webapp": "「ウェブアプリケーション」を選択",
     "change_redirect_url": "承認済みのリダイレクトURLに、 <code>https://${crowi.host}/google/callback</code> を入力<br>(<code>${crowi.host}</code>は環境に合わせて変更してください)",
-    "updated": "更新しました",
-    "error": "エラーが発生しました",
-    "Treat username matching as identical": "新規ログイン時、<code>username</code> が一致したローカルアカウントが存在した場合は自動的に紐付ける",
-    "Treat username matching as identical_warn": "WARNING: <code>username</code> の一致を以て同一ユーザーであるとみなすので、セキュリティに注意してください"
+    "clientID": "クライアントID",
+    "client_secret": "クライアントシークレット",
+    "guest_mode": {
+      "deny": "アカウントを持たないユーザーはアクセス不可",
+      "readonly": "閲覧のみ許可"
+    },
+    "registration_mode": {
+      "open": "公開 (だれでも登録可能)",
+      "restricted": "制限 (登録完了には管理者の承認が必要)",
+      "closed": "非公開 (登録には管理者による招待が必要)"
+    },
+    "configuration": "コンフィギュレーション",
+    "default": "デフォルト",
+    "optional": "任意",
+    "ldap": {
+      "use_ldap": "LDAPを使う",
+      "server_url": "サーバーURL",
+      "server_url_detail": "ディレクトリーサービスのLDAP URLを <code>ldap://host:port/DN</code> または <code>ldaps://host:port/DN</code>の形式で入力してください。",
+      "bind_mode": "バインドモード",
+      "bind_manager": "管理者バインド",
+      "bind_user": "ユーザーバインド",
+      "bind_DN": "DNバインド",
+      "bind_DN_manager_detail": "ディレクトリーサービスを認証、クエリするアカウントのDN",
+      "bind_DN_user_detail1": "ディレクトリーサービスをバインドするのに用いるクエリ",
+      "bind_DN_user_detail2": "ログイン時のユーザー名を使用するには <code>&#123;&#123;username&#125;&#125;</code> の形式を使用してください。",
+      "bind_DN_password": "バインドDNパスワード",
+      "bind_DN_password_manager_detail": "バインドDNアカウントのパスワード",
+      "bind_DN_password_user_detail": "ログイン時のパスワードがバインドに使用されます。",
+      "search_filter": "検索フィルター",
+      "search_filter_detail1": "認証されたユーザーを特定するのに用いるクエリ",
+      "search_filter_detail2": "ログイン時のユーザー名を使用するには<code>&#123;&#123;username&#125;&#125;</code> の形式を使用してください。",
+      "search_filter_detail3": "空欄の場合 <code>(uid=&#123;&#123;username&#125;&#125;)</code> が使用されます。",
+      "search_filter_example": "例えば 'uid' または 'mail' が一致するユーザーを探す場合",
+      "attribute_mapping": "要素の関連付け",
+      "username": "ユーザー名",
+      "username_detail": "新規ユーザーの関連付けを設定",
+      "Treat username matching as identical": "新規ログイン時、<code>username</code> が一致したローカルアカウントが存在した場合は自動的に紐付ける",
+      "Treat username matching as identical_warn": "WARNING: <code>username</code> の一致を以て同一ユーザーであるとみなすので、セキュリティに注意してください",
+      "group_search_base_DN": "グループ検索ベースDN",
+      "group_search_base_DN_detail": "グループ検索を実行するベースDN。利用するのであれば <code>Group Search Filter</code> を定義する必要があります。",
+      "group_search_filter": "グループ検索フィルター",
+      "group_search_filter_detail1": "グループフィルターに用いるクエリ",
+      "group_search_filter_detail2": "ユーザーオブジェクトを使用する場合は <code>&#123;&#123;dn&#125;&#125;</code> を用いてください。",
+      "group_search_filter_detail3": "<code>(&(cn=group1)(memberUid=&#123;&#123;dn&#125;&#125;))</code> は <code>cn=group1</code> を持ち <code>memberUid</code> が <code>uid</code> を含むグループが検索されます(<code>Group DN Property</code> がデフォルトから変更されていない場合)",
+      "group_DN_property": "グループDNプロパティー",
+      "group_DN_property_detail": "<code>Group Search Filter</code> の <code>&#123;&#123;dn&#125;&#125;</code> インターポレーションで使用するユーザーオブジェクトのプロパティー",
+      "test_config": "新しい設定を試す"
+    },
+    "Google OAuth": {
+    },
+    "Facebook": {
+    },
+    "Twitter": {
+    },
+    "Github": {
+    }
   },
   "markdown_setting": {
     "markdown_rendering": "Markdownレンダリングの設定を変更できます。",

+ 5 - 5
lib/models/config.js

@@ -115,8 +115,8 @@ module.exports = function(crowi) {
   configSchema.statics.getRestrictGuestModeLabels = function()
   {
     var labels = {};
-    labels[SECURITY_RESTRICT_GUEST_MODE_DENY]     = 'アカウントを持たないユーザーはアクセス不可';
-    labels[SECURITY_RESTRICT_GUEST_MODE_READONLY] = '閲覧のみ許可';
+    labels[SECURITY_RESTRICT_GUEST_MODE_DENY]     = 'security_setting.guest_mode.deny';
+    labels[SECURITY_RESTRICT_GUEST_MODE_READONLY] = 'security_setting.guest_mode.readonly';
 
     return labels;
   };
@@ -124,9 +124,9 @@ module.exports = function(crowi) {
   configSchema.statics.getRegistrationModeLabels = function()
   {
     var labels = {};
-    labels[SECURITY_REGISTRATION_MODE_OPEN]       = '公開 (だれでも登録可能)';
-    labels[SECURITY_REGISTRATION_MODE_RESTRICTED] = '制限 (登録完了には管理者の承認が必要)';
-    labels[SECURITY_REGISTRATION_MODE_CLOSED]     = '非公開 (登録には管理者による招待が必要)';
+    labels[SECURITY_REGISTRATION_MODE_OPEN]       = 'security_setting.registration_mode.open';
+    labels[SECURITY_REGISTRATION_MODE_RESTRICTED] = 'security_setting.registration_mode.restricted';
+    labels[SECURITY_REGISTRATION_MODE_CLOSED]     = 'security_setting.registration_mode.closed';
 
     return labels;
   };

+ 1 - 2
lib/views/admin/app.html

@@ -147,7 +147,7 @@
         </div>
 
         <div class="form-group">
-          <label for="settingForm[aws:bucket]" class="col-xs-3 control-label">{{ t('app_setting.Packet name') }}</label>
+          <label for="settingForm[aws:bucket]" class="col-xs-3 control-label">{{ t('app_setting.bucket name') }}</label>
           <div class="col-xs-6">
             <input class="form-control" type="text" name="settingForm[aws:bucket]" placeholder="例: crowi"  value="{{ settingForm['aws:bucket'] }}">
           </div>
@@ -269,4 +269,3 @@
 
 {% block content_footer %}
 {% endblock content_footer %}
-

+ 29 - 31
lib/views/admin/security.html

@@ -63,7 +63,7 @@
             <div class="col-xs-6">
               <select class="form-control selectpicker" name="settingForm[security:restrictGuestMode]" value="{{ settingForm['security:restrictGuestMode'] }}">
                 {% for modeValue, modeLabel in consts.restrictGuestMode %}
-                <option value="{{ modeValue }}" {% if modeValue == settingForm['security:restrictGuestMode'] %}selected{% endif %} >{{ modeLabel }}</option>
+                <option value="{{ t(modeValue) }}" {% if modeValue == settingForm['security:restrictGuestMode'] %}selected{% endif %} >{{ t(modeLabel) }}</option>
                 {% endfor %}
               </select>
             </div>
@@ -74,7 +74,7 @@
             <div class="col-xs-6">
               <select class="form-control selectpicker" name="settingForm[security:registrationMode]" value="{{ settingForm['security:registrationMode'] }}">
                 {% for modeValue, modeLabel in consts.registrationMode %}
-                <option value="{{ modeValue }}" {% if modeValue == settingForm['security:registrationMode'] %}selected{% endif %} >{{ modeLabel }}</option>
+                <option value="{{ t(modeValue) }}" {% if modeValue == settingForm['security:registrationMode'] %}selected{% endif %} >{{ t(modeLabel) }}</option>
                 {% endfor %}
               </select>
               <p class="help-block">{{ t('The contents entered here will be shown in the header etc') }}</p>
@@ -84,7 +84,7 @@
           <div class="form-group">
             <label for="settingForm[security:registrationWhiteList]" class="col-xs-3 control-label">{{ t('The whitelist of registration permission E-mail address') }}</label>
             <div class="col-xs-8">
-              <textarea class="form-control" type="textarea" name="settingForm[security:registrationWhiteList]" placeholder=": @crowi.wiki">{{ settingForm['security:registrationWhiteList']|join('&#13')|raw }}</textarea>
+              <textarea class="form-control" type="textarea" name="settingForm[security:registrationWhiteList]" placeholder="{{ t('security_setting.example') }}: @crowi.wiki">{{ settingForm['security:registrationWhiteList']|join('&#13')|raw }}</textarea>
               <p class="help-block">{{ t("security_setting.restrict_emails") }}{{ t("security_setting.for_instance") }}<code>@crowi.wiki</code>{{ t("security_setting.only_those") }}<br>
               {{ t("security_setting.insert_single") }}</p>
             </div>
@@ -112,18 +112,18 @@
                       {% if true === settingForm['security:isEnabledPassport'] %}checked="checked"{% endif %}>
                   <label for="radioPassportAuthMech">
                     <a href="http://passportjs.org/">
-                      <img src="/images/admin/security/passport-logo.svg" class="passport-logo"> Passport
-                    </a> authentication mechanism <small class="text-success">(Recommended)</small>
+                      <img src="/images/admin/security/passport-logo.svg" class="passport-logo"> {{ t("security_setting.passport") }}
+                    </a> {{ t("security_setting.auth_mechanism") }} <small class="text-success">({{ t("security_setting.recommended") }})</small>
                   </label>
                 </div>
               </h4>
               <ul>
-                <li>Username, E-mail and Password authentication</li>
-                <li>LDAP authentication</li>
-                <li class="text-muted">(TBD) <del>Google OAuth2 authentication</del></li>
-                <li class="text-muted">(TBD) <del>Facebook OAuth2 authentication</del></li>
-                <li class="text-muted">(TBD) <del>Twitter OAuth authentication</del></li>
-                <li class="text-muted">(TBD) <del>Github OAuth2 authentication</del></li>
+                <li>{{ t("security_setting.username_email_password") }}</li>
+                <li>{{ t("security_setting.ldap_auth") }}</li>
+                <li class="text-muted">(TBD) <del>{{ t("security_setting.google_auth2") }}</del></li>
+                <li class="text-muted">(TBD) <del>{{ t("security_setting.facebook_auth2") }}</del></li>
+                <li class="text-muted">(TBD) <del>{{ t("security_setting.twitter_auth2") }}</del></li>
+                <li class="text-muted">(TBD) <del>{{ t("security_setting.github_auth2") }}</del></li>
               </ul>
             </div>
             <div class="col-xs-6">
@@ -132,13 +132,13 @@
                   <input type="radio" id="radioCrowiAuthMech" name="settingForm[security:isEnabledPassport]" value="false"
                       {% if !settingForm['security:isEnabledPassport'] %}checked="checked"{% endif %}>
                   <label for="radioCrowiAuthMech">
-                    Crowi classic authentication mechanism
+                    {{ t("security_setting.crowi_auth") }}
                   </label>
                 </div>
               </h4>
               <ul>
-                <li>Username, E-mail and Password authentication</li>
-                <li>Google OAuth2 authentication</li>
+                <li>{{ t("security_setting.username_email_password") }}</li>
+                <li>{{ t("security_setting.google_auth2") }}</li>
               </ul>
             </div>
           </div>
@@ -164,41 +164,39 @@
               {% if !isRestartingServerNeeded %}style="display: none;"{% endif %}>
             <b>
               <i class="icon-exclamation" aria-hidden="true"></i>
-              Restarting the server is needed.
+              {{ t("security_setting.require_server_restart") }}
             </b>
-            The server is running with Passport authentication mechanism.
+            {{ t("security_setting.server_on_passport_auth") }}
           </p>
 
           <form action="/_api/admin/security/google" method="post" class="form-horizontal" id="googleSetting" role="form"
               {% if isRestartingServerNeeded %}style="opacity: 0.4;"{% endif %}>
 
             <fieldset>
-              <h4>Google 設定</h4>
+              <h4>{{ t("security_setting.google_setting") }}</h4>
               <p class="well alert-anchor">
-                Google Cloud Platform の <a href="https://console.cloud.google.com/apis/credentials">API Manager</a>
-                から OAuth2 Client ID を作成すると、Google アカウントにコネクトして登録やログインが可能になります。
+                {{ t("security_setting.connect_api_manager") }}
               </p>
 
               <ol class="help-block">
-                <li><a href="https://console.cloud.google.com/apis/credentials">API Manager</a> へアクセス</li>
-                <li>プロジェクトを作成していない場合は作成してください</li>
-                <li>「認証情報を作成」-> OAuthクライアントID</li>
+                <li>{{ t("security_setting.access_api_manager") }}</li>
+                <li>{{ t("security_setting.create_project") }}</li>
+                <li>{{ t("security_setting.create_auth_to_oauth") }}</li>
                 <ol>
-                  <li>「ウェブアプリケーション」を選択</li>
-                  <li>承認済みのリダイレクトURLに、 <code>https://${crowi.host}/google/callback</code> を入力<br>
-                  (<code>${crowi.host}</code>は環境に合わせて変更してください)</li>
+                  <li>{{ t("security_setting.select_webapp") }}</li>
+                  <li>{{ t("security_setting.change_redirect_url") }}</li>
                 </ol>
               </ol>
 
               <div class="form-group">
-                <label for="settingForm[google:clientId]" class="col-xs-3 control-label">Client ID</label>
+                <label for="settingForm[google:clientId]" class="col-xs-3 control-label">{{ t("security_setting.clientID") }}</label>
                 <div class="col-xs-6">
                   <input class="form-control" type="text" name="settingForm[google:clientId]" value="{{ settingForm['google:clientId'] }}">
                 </div>
               </div>
 
               <div class="form-group">
-                <label for="settingForm[google:clientSecret]" class="col-xs-3 control-label">Client Secret</label>
+                <label for="settingForm[google:clientSecret]" class="col-xs-3 control-label">{{ t("security_setting.client_secret") }}</label>
                 <div class="col-xs-6">
                   <input class="form-control" type="text" name="settingForm[google:clientSecret]" value="{{ settingForm['google:clientSecret'] }}">
                 </div>
@@ -226,9 +224,9 @@
               {% if !isRestartingServerNeeded %}style="display: none;"{% endif %}>
             <b>
               <i class="icon-exclamation" aria-hidden="true"></i>
-              Restarting the server is needed.
+              {{ t("security_setting.require_server_restart") }}
             </b>
-            The server is running with Official Crowi authentication mechanism.
+            {{ t("security_setting.server_on_crowi_auth") }}
           </p>
           <ul class="nav nav-tabs" role="tablist" {% if isRestartingServerNeeded %}style="opacity: 0.4;"{% endif %}>
             <li class="active">
@@ -311,13 +309,13 @@
         var jqxhr = $.post($form.attr('action'), $form.serialize(), function(data)
           {
             if (data.status) {
-              showMessage($id, '更新しました');
+              showMessage($id, '更新しました Updated');
             } else {
               showMessage($id, data.message, 'danger');
             }
           })
           .fail(function() {
-            showMessage($id, 'エラーが発生しました', 'danger');
+            showMessage($id, 'エラーが発生しました Error', 'danger');
           })
           .always(function() {
             $button.prop('disabled', false);

+ 1 - 1
lib/views/admin/widget/passport/facebook.html

@@ -1,6 +1,6 @@
 <form action="" method="post" class="form-horizontal passportStrategy" id="facebookOauthSetting" role="form">
   <fieldset>
-    <legend>Facebook OAuth Configuration</legend>
+    <legend>Facebook OAuth {{ t("security_setting.configuration") }}</legend>
     <p class="well">(TBD)</p>
   </fieldset>
 </form>

+ 1 - 1
lib/views/admin/widget/passport/github.html

@@ -1,6 +1,6 @@
 <form action="" method="post" class="form-horizontal passportStrategy" id="githubOauthSetting" role="form">
   <fieldset>
-    <legend>Github OAuth Configuration</legend>
+    <legend>Github OAuth {{ t("security_setting.configuration") }}</legend>
     <p class="well">(TBD)</p>
   </fieldset>
 </form>

+ 1 - 1
lib/views/admin/widget/passport/google-oauth.html

@@ -1,6 +1,6 @@
 <form action="" method="post" class="form-horizontal passportStrategy" id="googleOauthSetting" role="form">
   <fieldset>
-    <legend>Google OAuth Configuration</legend>
+    <legend>Google OAuth {{ t("security_setting.configuration") }}</legend>
     <p class="well">(TBD)</p>
   </fieldset>
 </form>

+ 39 - 41
lib/views/admin/widget/passport/ldap.html

@@ -1,12 +1,12 @@
 <form action="/_api/admin/security/passport-ldap" method="post" class="form-horizontal" id="ldapSetting" role="form">
 
   <fieldset>
-    <legend>LDAP Configuration</legend>
+    <legend>LDAP {{ t("security_setting.configuration") }}</legend>
 
     {% set nameForIsLdapEnabled = "settingForm[security:passport-ldap:isEnabled]" %}
     {% set isLdapEnabled = settingForm['security:passport-ldap:isEnabled'] %}
     <div class="form-group">
-      <label for="{{nameForIsLdapEnabled}}" class="col-xs-3 control-label">Use LDAP</label>
+      <label for="{{nameForIsLdapEnabled}}" class="col-xs-3 control-label">{{ t("security_setting.ldap.use_ldap") }}</label>
       <div class="col-xs-6">
         <div class="btn-group btn-toggle" data-toggle="buttons">
           <label class="btn btn-default btn-rounded btn-outline {% if isLdapEnabled %}active{% endif %}" data-active-class="primary">
@@ -24,14 +24,14 @@
     <div class="passport-ldap-hide-when-disabled" {%if !isLdapEnabled %}style="display: none;"{% endif %}>
 
       <div class="form-group">
-        <label for="settingForm[security:passport-ldap:serverUrl]" class="col-xs-3 control-label">Server URL</label>
+        <label for="settingForm[security:passport-ldap:serverUrl]" class="col-xs-3 control-label">{{ t("security_setting.ldap.server_url") }}</label>
         <div class="col-xs-6">
           <input class="form-control" type="text"
               name="settingForm[security:passport-ldap:serverUrl]" value="{{ settingForm['security:passport-ldap:serverUrl'] || '' }}">
           <p class="help-block">
             <small>
-              The LDAP URL of the directory service in the format <code>ldap://host:port/DN</code> or <code>ldaps://host:port/DN</code>.<br>
-              Example: <code>ldaps://ldap.company.com/ou=people,dc=company,dc=com</code>
+              {{ t("security_setting.ldap.server_url_detail") }}<br>
+              {{ t("security_setting.example") }}: <code>ldaps://ldap.company.com/ou=people,dc=company,dc=com</code>
             </small>
           </p>
         </div>
@@ -40,86 +40,86 @@
       {% set nameForIsUserBind = "settingForm[security:passport-ldap:isUserBind]" %}
       {% set isUserBind = settingForm['security:passport-ldap:isUserBind'] %}
       <div class="form-group">
-        <label for="{{nameForIsUserBind}}" class="col-xs-3 control-label">Binding Mode</label>
+        <label for="{{nameForIsUserBind}}" class="col-xs-3 control-label">{{ t("security_setting.ldap.bind_mode") }}</label>
         <div class="col-xs-6">
           <div class="btn-group btn-toggle" data-toggle="buttons">
             <label class="btn btn-default btn-rounded btn-outline {% if !isUserBind %}active{% endif %}" data-active-class="primary">
               <input name="{{nameForIsUserBind}}" value="false" type="radio"
-                  {% if !isUserBind %}checked{% endif %}> Manager Bind
+                  {% if !isUserBind %}checked{% endif %}> {{ t("security_setting.ldap.bind_manager") }}
             </label>
             <label class="btn btn-default btn-rounded btn-outline {% if isUserBind %}active{% endif %}" data-active-class="primary">
               <input name="{{nameForIsUserBind}}" value="true" type="radio"
-                  {% if isUserBind %}checked{% endif %}> User Bind
+                  {% if isUserBind %}checked{% endif %}> {{ t("security_setting.ldap.bind_user") }}
             </label>
           </div>
         </div>
       </div>
 
       <div class="form-group">
-        <label for="settingForm[security:passport-ldap:bindDN]" class="col-xs-3 control-label">Bind DN</label>
+        <label for="settingForm[security:passport-ldap:bindDN]" class="col-xs-3 control-label">{{ t("security_setting.ldap.bind_DN") }}</label>
         <div class="col-xs-6">
           <input class="form-control" type="text"
               name="settingForm[security:passport-ldap:bindDN]" value="{{ settingForm['security:passport-ldap:bindDN'] || '' }}">
           <p class="help-block passport-ldap-managerbind" {% if isUserBind %}style="display: none;"{% endif %}>
             <small>
-              The DN of the account that authenticates and queries the directory service
+              {{ t("security_setting.ldap.bind_DN_manager_detail") }}
             </small>
           </p>
           <p class="help-block passport-ldap-userbind" {% if !isUserBind %}style="display: none;"{% endif %}>
             <small>
-              The query used to bind with the directory service.<br>
-              Use <code>{% raw %}{{username}}{% endraw %}</code> to reference the username entered in the login page.<br>
-              Example: <code>uid={% raw %}{{username}}{% endraw %},dc=domain,dc=com</code><br>
+              {{ t("security_setting.ldap.bind_DN_user_detail1") }}<br>
+              {{ t("security_setting.ldap.bind_DN_user_detail2") }}<br>
+              {{ t("security_setting.example") }}: <code>uid={% raw %}{{username}}{% endraw %},dc=domain,dc=com</code><br>
             </small>
           </p>
           </div>
       </div>
 
       <div class="form-group">
-        <label for="settingForm[security:passport-ldap:bindDNPassword]" class="col-xs-3 control-label">Bind DN Password</label>
+        <label for="settingForm[security:passport-ldap:bindDNPassword]" class="col-xs-3 control-label">{{ t("security_setting.ldap.bind_DN_password") }}</label>
         <div class="col-xs-6">
           <input class="form-control passport-ldap-managerbind" type="text" {% if isUserBind %}style="display: none;"{% endif %}
               name="settingForm[security:passport-ldap:bindDNPassword]" value="{{ settingForm['security:passport-ldap:bindDNPassword'] || '' }}">
           <p class="help-block passport-ldap-managerbind">
             <small>
-              The password for the Bind DN account.
+              {{ t("security_setting.ldap.bind_DN_password_manager_detail") }}
             </small>
           </p>
           <p class="help-block passport-ldap-userbind" {% if !isUserBind %}style="display: none;"{% endif %}>
             <small>
-              The password that is entered in the login page will be used to bind.
+              {{ t("security_setting.ldap.bind_DN_password_user_detail") }}
             </small>
           </p>
         </div>
       </div>
 
       <div class="form-group">
-        <label for="settingForm[security:passport-ldap:searchFilter]" class="col-xs-3 control-label">Search Filter</label>
+        <label for="settingForm[security:passport-ldap:searchFilter]" class="col-xs-3 control-label">{{ t("security_setting.ldap.search_filter") }}</label>
         <div class="col-xs-6">
-          <input class="form-control" type="text" placeholder="Default: (uid={% raw %}{{username}}{% endraw %})"
+          <input class="form-control" type="text" placeholder="{{ t("security_setting.default") }}: (uid={% raw %}{{username}}{% endraw %})"
               name="settingForm[security:passport-ldap:searchFilter]" value="{{ settingForm['security:passport-ldap:searchFilter'] || '' }}">
           <p class="help-block">
             <small>
-              The query used to locate the authenticated user.<br>
-              Use <code>{% raw %}{{username}}{% endraw %}</code> to reference the username entered in the login page.<br>
-              If empty, the filter <code>(uid={% raw %}{{username}}{% endraw %})</code> is used.<br>
+              {{ t("security_setting.ldap.search_filter_detail1") }}<br>
+              {{ t("security_setting.ldap.search_filter_detail2") }}<br>
+              {{ t("security_setting.ldap.search_filter_detail3") }}<br>
               <br>
-              Example to match with 'uid' or 'mail': <code>(|(uid={% raw %}{{username}}{% endraw %})(mail={% raw %}{{username}}{% endraw %}))</code>
+              {{ t("security_setting.ldap.search_filter_example") }}: <code>(|(uid={% raw %}{{username}}{% endraw %})(mail={% raw %}{{username}}{% endraw %}))</code>
             </small>
           </p>
         </div>
       </div>
 
-      <h4>Attribute Mapping (Optional)</h4>
+      <h4>{{ t("security_setting.ldap.attribute_mapping") }} ({{ t("security_setting.optional") }})</h4>
 
       <div class="form-group">
-        <label for="settingForm[security:passport-ldap:attrMapUsername]" class="col-xs-3 control-label">username</label>
+        <label for="settingForm[security:passport-ldap:attrMapUsername]" class="col-xs-3 control-label">{{ t("security_setting.ldap.username") }}</label>
         <div class="col-xs-6">
-          <input class="form-control" type="text" placeholder="Default: uid"
+          <input class="form-control" type="text" placeholder="{{ t("security_setting.default") }}: uid"
               name="settingForm[security:passport-ldap:attrMapUsername]" value="{{ settingForm['security:passport-ldap:attrMapUsername'] || '' }}">
           <p class="help-block">
             <small>
-              Specification of mappings when creating new users
+              {{ t("security_setting.ldap.username_detail") }}
             </small>
           </p>
 
@@ -127,55 +127,53 @@
             <input type="checkbox" id="cbSameUsernameTreatedAsIdenticalUser" name="settingForm[security:passport-ldap:isSameUsernameTreatedAsIdenticalUser]" value="1"
                 {% if settingForm['security:passport-ldap:isSameUsernameTreatedAsIdenticalUser'] %}checked{% endif %} />
             <label for="cbSameUsernameTreatedAsIdenticalUser">
-              {{ t("security_setting.Treat username matching as identical") }}
+              {{ t("security_setting.ldap.Treat username matching as identical") }}
             </label>
           </div>
         </div>
       </div>
 
 
-      <h4>Group Search Filter (Optional)</h4>
+      <h4>{{ t("security_setting.ldap.group_search_filter") }} ({{ t("security_setting.optional") }})</h4>
 
       <div class="form-group">
-        <label for="settingForm[security:passport-ldap:groupSearchBase]" class="col-xs-3 control-label">Group Search Base DN</label>
+        <label for="settingForm[security:passport-ldap:groupSearchBase]" class="col-xs-3 control-label">{{ t("security_setting.ldap.group_search_base_DN") }}</label>
         <div class="col-xs-6">
           <input class="form-control" type="text"
               name="settingForm[security:passport-ldap:groupSearchBase]" value="{{ settingForm['security:passport-ldap:groupSearchBase'] || '' }}">
           <p class="help-block">
             <small>
-              The base DN from which to search for groups. If defined, also <code>Group Search Filter</code> must be defined for the search to work.<br>
-              Example: <code>ou=groups,dc=domain,dc=com</code><br>
+              {{ t("security_setting.ldap.group_search_base_DN_detail") }}<br>
+              {{ t("security_setting.example") }}: <code>ou=groups,dc=domain,dc=com</code><br>
             </small>
           </p>
         </div>
       </div>
 
       <div class="form-group">
-        <label for="settingForm[security:passport-ldap:groupSearchFilter]" class="col-xs-3 control-label">Group Search Filter</label>
+        <label for="settingForm[security:passport-ldap:groupSearchFilter]" class="col-xs-3 control-label">{{ t("security_setting.ldap.group_search_filter") }}</label>
         <div class="col-xs-6">
           <input class="form-control" type="text"
               name="settingForm[security:passport-ldap:groupSearchFilter]" value="{{ settingForm['security:passport-ldap:groupSearchFilter'] || '' }}">
           <p class="help-block">
             <small>
-              The query used to filter for groups.<br>
-              Use <code>{% raw %}{{dn}}{% endraw %}</code> to have it replaced of the found user object.<br>
+              {{ t("security_setting.ldap.group_search_filter_detail1") }}<br>
+              {{ t("security_setting.ldap.group_search_filter_detail2") }}<br>
               <br>
-              Example: <code>(&(cn=group1)(memberUid={% raw %}{{dn}}{% endraw %}))</code> hits the groups
-              which has <code>cn=group1</code> and <code>memberUid</code> includes the user's <code>uid</code>
-              (when <code>Group DN Property</code> is not changed from the default value.)
+              {{ t("security_setting.example") }}: {{ t("security_setting.ldap.group_search_filter_detail3") }}
             </small>
           </p>
         </div>
       </div>
 
       <div class="form-group">
-        <label for="settingForm[security:passport-ldap:groupSearchFilter]" class="col-xs-3 control-label">Group DN Property</label>
+        <label for="settingForm[security:passport-ldap:groupSearchFilter]" class="col-xs-3 control-label">{{ t("security_setting.ldap.group_DN_property") }}</label>
         <div class="col-xs-6">
-          <input class="form-control" type="text" placeholder="Default: uid"
+          <input class="form-control" type="text" placeholder="{{ t("security_setting.default") }}: uid"
               name="settingForm[security:passport-ldap:groupDnProperty]" value="{{ settingForm['security:passport-ldap:groupDnProperty'] || '' }}">
           <p class="help-block">
             <small>
-              The property of user object to use in <code>{% raw %}{{dn}}{% endraw %}</code> interpolation of <code>Group Search Filter</code>.
+              {{ t("security_setting.ldap.group_DN_property_detail") }}
             </small>
           </p>
         </div>
@@ -193,7 +191,7 @@
             data-target="#test-ldap-account" data-toggle="modal"
             {%if !isLdapEnabled %}style="display: none;"{% endif %}>
 
-          Test Saved Configuration
+          {{ t("security_setting.ldap.test_config") }}
         </button>
       </div>
     </div>

+ 1 - 1
lib/views/admin/widget/passport/twitter.html

@@ -1,6 +1,6 @@
 <form action="" method="post" class="form-horizontal passportStrategy" id="twitterOauthSetting" role="form">
   <fieldset>
-    <legend>Twitter OAuth Configuration</legend>
+    <legend>Twitter OAuth {{ t("security_setting.configuration") }}</legend>
     <p class="well">(TBD)</p>
   </fieldset>
 </form>