itizawa 6 سال پیش
والد
کامیت
6430edc051

+ 21 - 16
resource/locales/en-US/translation.json

@@ -13,6 +13,7 @@
   "Cancel": "Cancel",
   "Create": "Create",
   "Admin": "Admin",
+  "Administrator": "Admin",
   "Tag": "Tag",
   "Tags": "Tags",
   "New": "New",
@@ -24,6 +25,8 @@
   "Page Path": "Page Path",
   "Category": "Category",
   "User": "User",
+  "Status":"Status",
+  "Execution": "Execution",
 
   "Update": "Update",
   "Update Page": "Update Page",
@@ -46,6 +49,7 @@
 
   "Created": "Created",
   "Last updated": "Updated",
+  "Last_Login": "Last Login",
 
   "Share": "Share",
   "Share Link": "Share Link",
@@ -102,7 +106,7 @@
   "Markdown Settings": "Markdown Settings",
   "Customize": "Customize",
   "Notification Settings": "Notification Settings",
-  "User Management": "User Management",
+  "User_Management": "User Management",
   "External Account management": "External Account management",
   "UserGroup Management": "UserGroup Management",
   "Full Text Search Management": "Full Text Search Management",
@@ -672,36 +676,37 @@
   },
 
   "user_management": {
-    "User management": "User management",
-    "invite_users": "Invite new users",
+    "target_user": "Target User",
+    "invite_users": "Invite New Users",
     "emails": "Emails",
     "invite_thru_email": "Send Invitation Email",
     "invite": "Invite",
-    "give_admin_access": "Give admin access",
-    "remove_admin_access": "Remove admin access",
-    "external_account": "External account management",
-    "user_list": "List of users",
+    "invited": "User was invited",
+    "give_admin_access": "Give Admin Access",
+    "remove_admin_access": "Remove Admin Access",
+    "external_account": "External Account Management",
     "external_account_list": "External Account List",
     "back_to_user_management": "Back to User Management",
     "authentication_provider": "Authentication Provider",
-    "Date created": "Date created",
-    "Last login": "Last login",
     "Manage": "Manage",
-    "Edit menu": "Edit menu",
+    "Edit_Menu": "Edit Menu",
     "password_setting": "Password Setting",
+    "password_setting_help": "Show whether the related user has a password set",
     "set": "Yes",
     "unset": "No",
-    "password_setting_help": "Show whether the related user has a password set",
-    "Reissue password": "Reissue password",
+    "temporary_password": "The created user has a temporary password",
+    "tell_temporary_password": "If you have not sent an invitation email, be sure to copy the temporary password on this screen and contact the invitee.",
+    "tell_new_password": "Please tell the new password to the target user.",
+    "password_never_seen": "The displayed password can not be displayed again when this screen is closed.",
+    "Reissue_password": "Reissue Password",
     "related_username": "Related user's <code>%s</code>",
-    "Status":"Status",
     "accept": "Accept",
-    "Deactivate account":"Deactivate account",
+    "Deactivate_account":"Deactivate Account",
     "your_own":"You cannot deactivate your own account",
-    "Administrator menu":"Administrator menu",
+    "Administrator_menu":"Administrator Menu",
     "cannot_remove":"You cannot remove yourself from administrator",
     "cannot_invite_maximum_users": "Can not invite more than the maximum number of users.",
-    "current users": "Current users:"
+    "current_users": "Current users:"
   },
 
   "user_group_management": {

+ 16 - 11
resource/locales/ja/translation.json

@@ -13,6 +13,7 @@
   "Cancel": "キャンセル",
   "Create": "作成",
   "Admin": "管理",
+  "Administrator": "管理者",
   "Tag": "タグ",
   "Tags": "タグ",
   "New": "作成",
@@ -24,6 +25,8 @@
   "Page Path": "ページパス",
   "Category": "カテゴリー",
   "User": "ユーザー",
+  "Status": "ステータス",
+  "Execution": "実行",
 
   "Update": "更新",
   "Update Page": "ページを更新",
@@ -46,6 +49,7 @@
 
   "Created": "作成日",
   "Last updated": "最終更新",
+  "Last_Login": "最終ログイン",
 
   "Share": "共有",
   "Share Link": "共有用リンク",
@@ -102,7 +106,7 @@
   "Markdown Settings": "マークダウン設定",
   "Customize": "カスタマイズ",
   "Notification Settings": "通知設定",
-  "User Management": "ユーザー管理",
+  "User_Management": "ユーザー管理",
   "External Account management": "外部アカウント管理",
   "UserGroup Management": "グループ管理",
   "Full Text Search Management": "全文検索管理",
@@ -672,36 +676,37 @@
   },
 
   "user_management": {
-    "User Management": "ユーザー管理",
+    "target_user": "対象ユーザー",
     "invite_users": "新規ユーザーの招待",
     "emails": "メールアドレス (複数行入力で複数人招待可能)",
     "invite_thru_email": "招待をメールで送信",
     "invite": "招待する",
+    "invited": "ユーザーを招待しました",
     "give_admin_access": "管理者にする",
     "remove_admin_access": "管理者から外す",
     "external_account": "外部アカウントの管理",
-    "user_list": "ユーザー一覧",
     "external_account_list": "外部アカウント一覧",
     "back_to_user_management": "ユーザー管理に戻る",
     "authentication_provider": "認証情報プロバイダ",
-    "Date created": "作成日",
-    "Last login": "最終ログイン",
     "Manage": "操作",
-    "Edit menu": "編集メニュー",
+    "Edit_Menu": "編集メニュー",
     "password_setting": "パスワード設定",
     "password_setting_help": "関連付けられているユーザーがパスワードを設定しているかどうかを表示します",
     "set": "設定済み",
     "unset": "未設定",
-    "Reissue password": "パスワードの再発行",
+    "temporary_password": "作成したユーザーは仮パスワードが設定されています。",
+    "tell_temporary_password": "招待メールを送っていない場合、この画面で必ず仮パスワードをコピーし、招待者へ連絡してください。",
+    "tell_new_password": "新規発行したパスワードを、対象ユーザーへ連絡してください。",
+    "password_never_seen": "表示されたパスワードはこの画面を閉じると二度と表示できませんのでご注意ください。",
+    "Reissue_password": "パスワードの再発行",
     "related_username": "関連付けられているユーザーの <code>%s</code>",
-    "Status": "ステータス",
     "accept": "承認する",
-    "Deactivate account": "アカウント停止",
+    "Deactivate_account": "アカウント停止",
     "your_own": "自分自身のアカウントを停止することはできません",
-    "Administrator menu": "管理者メニュー",
+    "Administrator_menu": "管理者メニュー",
     "cannot_remove": "自分自身を管理者から外すことはできません",
     "cannot_invite_maximum_users": "ユーザーが上限に達したため招待できません。",
-    "current users": "現在のユーザー数:"
+    "current_users": "現在のユーザー数:"
   },
 
   "user_group_management": {

+ 2 - 2
src/server/models/user.js

@@ -336,11 +336,11 @@ module.exports = function(crowi) {
   userSchema.statics.getLanguageLabels = getLanguageLabels;
   userSchema.statics.getUserStatusLabels = function() {
     const userStatus = {};
-    userStatus[STATUS_REGISTERED] = '承認待ち';
+    userStatus[STATUS_REGISTERED] = 'Approval Pending';
     userStatus[STATUS_ACTIVE] = 'Active';
     userStatus[STATUS_SUSPENDED] = 'Suspended';
     userStatus[STATUS_DELETED] = 'Deleted';
-    userStatus[STATUS_INVITED] = '招待済み';
+    userStatus[STATUS_INVITED] = 'Invited';
 
     return userStatus;
   };

+ 3 - 3
src/server/views/admin/external-accounts.html

@@ -5,7 +5,7 @@
 {% block content_header %}
 <div class="header-wrap">
   <header id="page-header">
-    <h1 id="admin-title" class="title">{{ t('User management') }}/{{ t('External Account management') }}</h1>
+    <h1 id="admin-title" class="title">{{ t('User_management') }}/{{ t('External Account management') }}</h1>
   </header>
 </div>
 {% endblock %}
@@ -67,7 +67,7 @@
                 </small>
               </a>
             </th>
-            <th width="100px">{{ t('user_management.Date created') }}</th>
+            <th width="100px">{{ t('Created') }}</th>
             <th width="70px"></th>
           </tr>
         </thead>
@@ -100,7 +100,7 @@
                   <i class="icon-settings"></i> <span class="caret"></span>
                 </button>
                 <ul class="dropdown-menu" role="menu">
-                  <li class="dropdown-header">{{ t('user_management.Edit menu') }}</li>
+                  <li class="dropdown-header">{{ t('user_management.Edit_menu') }}</li>
                   <form id="form_remove_{{ loop.index }}" action="/admin/users/external-accounts/{{ account._id.toString() }}/remove" method="post">
                     <input type="hidden" name="_csrf" value="{{ csrf() }}">
                   </form>

+ 25 - 25
src/server/views/admin/users.html

@@ -1,11 +1,11 @@
 {% extends '../layout/admin.html' %}
 
-{% block html_title %}{{ customTitle(t('user_management.User management')) }}{% endblock %}
+{% block html_title %}{{ customTitle(t('User_Management')) }}{% endblock %}
 
 {% block content_header %}
 <div class="header-wrap">
   <header id="page-header">
-    <h1 id="admin-title" class="title">{{ t('user_management.User management') }}</h1>
+    <h1 id="admin-title" class="title">{{ t('User_Management') }}</h1>
   </header>
 </div>
 {% endblock %}
@@ -60,7 +60,7 @@
       <label>{{ t('user_management.cannot_invite_maximum_users') }}</label>
       {% endif %}
       {% if userUpperLimit !== 0 %}
-      <label>{{ t('user_management.current users') }}{{ activeUsers }}</label>
+      <label>{{ t('user_management.current_users') }}{{ activeUsers }}</label>
       {% endif %}
 
       {% set createdUser = req.flash('createdUser') %}
@@ -71,13 +71,13 @@
 
             <div class="modal-header">
               <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
-              <div class="modal-title">ユーザーを招待しました</div>
+              <div class="modal-title">{{ t('user_management.invited') }}</div>
             </div>
 
             <div class="modal-body">
               <p>
-                作成したユーザーは仮パスワードが設定されています。<br>
-                仮パスワードはこの画面を閉じると二度と表示できませんのでご注意ください。<span class="text-danger">招待メールを送っていない場合、この画面で必ず仮パスワードをコピーし、招待者へ連絡してください。</span>
+                {{ t('user_management.temporary_password') }}<br>
+                {{ t('user_management.password.never.seen') }}<span class="text-danger">{{ t('user_management.tell_temporary_password') }}</span>
               </p>
 
               <pre>{% for cUser in createdUser %}{% if cUser.user %}{{ cUser.email }} {{ cUser.password }}<br>{% else %}{{ cUser.email }} 作成失敗<br>{% endif %}{% endfor %}</pre>
@@ -94,23 +94,23 @@
           <div class="modal-content">
             <div class="modal-header">
               <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
-              <div class="modal-title">パスワードを新規発行しますか?</div>
+              <div class="modal-title">{{ t('user_management.Reissue_password')}}</div>
             </div>
 
             <div class="modal-body">
               <p>
-              新規発行したパスワードはこの画面を閉じると二度と表示できませんのでご注意ください。<br>
-              <span class="text-danger">新規発行したパスワードを、対象ユーザーへ連絡してください。</span>
+                {{ t('user_management.password_never_seen') }}<br>
+              <span class="text-danger">{{ t('user_management.tell_new_password') }}</span>
               </p>
               <p>
-              Reset user: <code id="admin-password-reset-user"></code>
+              {{ t('user_management.target_user') }}: <code id="admin-password-reset-user"></code>
               </p>
 
               <form method="post" id="admin-users-reset-password">
                 <input type="hidden" name="user_id" value="">
                 <input type="hidden" name="_csrf" value="{{ csrf() }}">
                 <button type="submit" value="" class="btn btn-primary">
-                  実行
+                  {{ t('Execution')}}
                 </button>
               </form>
 
@@ -144,18 +144,18 @@
         </div><!-- /.modal-dialog -->
       </div>
 
-      <h2>{{ t("user_management.user_list") }}</h2>
+      <h2>{{ t("User_Management") }}</h2>
 
       <table class="table table-default table-bordered table-user-list">
         <thead>
           <tr>
             <th width="100px">#</th>
-            <th>{{ t('user_management.Status') }}</th>
-            <th><code>username</code></th>
+            <th>{{ t('Status') }}</th>
+            <th><code>{{ t('User') }}</code></th>
             <th>{{ t('Name') }}</th>
             <th>{{ t('Email') }}</th>
-            <th width="100px">{{ t('user_management.Date created') }}</th>
-            <th width="150px">{{ t('user_management.Last login') }}</th>
+            <th width="100px">{{ t('Created') }}</th>
+            <th width="150px">{{ t('Last_Login') }}</th>
             <th width="70px"></th>
           </tr>
         </thead>
@@ -167,7 +167,7 @@
               <img src="{{ sUser|picture }}" class="picture img-circle" />
               {% if sUser.admin %}
               <span class="label label-inverse label-admin">
-                Admin
+              {{ t('Administrator') }}
               </span>
               {% endif %}
             </td>
@@ -193,7 +193,7 @@
                   <i class="icon-settings"></i> <span class="caret"></span>
                 </button>
                 <ul class="dropdown-menu" role="menu">
-                  <li class="dropdown-header">{{ t('user_management.Edit menu') }}</li>
+                  <li class="dropdown-header">{{ t('user_management.Edit_Menu') }}</li>
                   <li>
                     <a href="#"
                         data-user-id="{{ sUserId }}"
@@ -201,11 +201,11 @@
                         data-target="#admin-password-reset-modal"
                         data-toggle="modal">
                       <i class="icon-fw icon-key"></i>
-                      {{ t('user_management.Reissue password') }}
+                      {{ t('user_management.Reissue_password') }}
                     </a>
                   </li>
                   <li class="divider"></li>
-                  <li class="dropdown-header">{{ t('user_management.Status') }}</li>
+                  <li class="dropdown-header">{{ t('Status') }}</li>
 
                   {% if sUser.status == 1 %}
                   <form id="form_activate_{{ sUserId }}" action="/admin/user/{{ sUserId }}/activate" method="post">
@@ -226,12 +226,12 @@
                     {% if sUser.username != user.username %}
                     <a href="javascript:form_suspend_{{ sUserId }}.submit()">
                       <i class="icon-fw icon-ban"></i>
-                      {{ t('user_management.Deactivate account') }}
+                      {{ t('user_management.Deactivate_account') }}
                     </a>
                     {% else %}
                     <a disabled>
                       <i class="icon-fw icon-ban"></i>
-                      {{ t('user_management.Deactivate account') }}
+                      {{ t('user_management.Deactivate_account') }}
                     </a>
                     <p class="alert alert-danger m-l-10 m-r-10 p-10">{{ t("user_management.your_own") }}</p>
                     {% endif %}
@@ -256,7 +256,7 @@
                       <i class="icon-fw icon-fire text-danger"></i> {{ t('Delete') }}
                     </a>
                   </li>
-                  {% endif  %}
+                  {% endif %}
 
                   {% if sUser.status == 1 || sUser.status == 5 %}
                   <form id="form_removeCompletely_{{ sUserId }}" action="/admin/user/{{ sUser._id.toString() }}/removeCompletely" method="post">
@@ -268,11 +268,11 @@
                       <i class="icon-fw icon-fire text-danger"></i> {{ t('Delete') }}
                     </a>
                   </li>
-                  {% endif  %}
+                  {% endif %}
 
                   {% if sUser.status == 2 %} {# activated な人だけこのメニューを表示 #}
                   <li class="divider"></li>
-                  <li class="dropdown-header">{{ t('user_management.Administrator menu') }}</li>
+                  <li class="dropdown-header">{{ t('user_management.Administrator_menu') }}</li>
 
                   {% if sUser.admin %}
                   <form id="form_removeFromAdmin_{{ sUserId }}" action="/admin/user/{{ sUser._id.toString() }}/removeFromAdmin" method="post">

+ 1 - 1
src/server/views/admin/widget/menu.html

@@ -9,7 +9,7 @@
   <li class="{% if current == 'customize'%}active{% endif %}"><a href="/admin/customize"><i class="icon-fw icon-wrench"></i> {{ t('Customize') }}</a></li>
   <li class="{% if current == 'importer'%}active{% endif %}"><a href="/admin/importer"><i class="icon-fw icon-cloud-download"></i> {{ t('Import Data') }}</a></li>
   <li class="{% if current == 'notification'%}active{% endif %}"><a href="/admin/notification"><i class="icon-fw icon-bell"></i> {{ t('Notification Settings') }}</a></li>
-  <li class="{% if current == 'user' || current == 'external-account' %}active{% endif %}"><a href="/admin/users"><i class="icon-fw icon-user"></i> {{ t('User Management') }}</a></li>
+  <li class="{% if current == 'user' || current == 'external-account' %}active{% endif %}"><a href="/admin/users"><i class="icon-fw icon-user"></i> {{ t('User_Management') }}</a></li>
   <li class="{% if current == 'user-group'%}active{% endif %}"><a href="/admin/user-groups"><i class="icon-fw icon-people"></i> {{ t('UserGroup Management') }}</a></li>
   <li class="{% if current == 'search'%}active{% endif %}"><a href="/admin/search"><i class="icon-fw icon-magnifier"></i> {{ t('Full Text Search Management') }}</a></li>
 </ul>