Browse Source

create translation files

ryoji-s 3 years ago
parent
commit
bbfa270a93

+ 6 - 0
apps/app/public/static/locales/en_US/admin.json

@@ -725,6 +725,7 @@
     },
     "user_table": {
       "administrator": "Administrator",
+      "read_only_user": "Read Only User",
       "edit_menu": "Edit menu",
       "reset_password": "Reset password",
       "administrator_menu": "Administrator Menu",
@@ -734,6 +735,9 @@
       "remove_admin_access": "Remove admin access",
       "cannot_remove": "You cannot remove yourself from administrator",
       "give_admin_access": "Give admin access",
+      "remove_read_only_access": "Remove read only access",
+      "cannot_give_read_only": "You cannot give read only flag to administrator",
+      "give_read_only_access": "Give read only access",
       "send_invitation_email": "Send invitation email",
       "resend_invitation_email": "Resend invitation email"
     },
@@ -1024,6 +1028,8 @@
   "toaster": {
     "give_user_admin": "Succeeded to give {{username}} admin",
     "remove_user_admin": "Succeeded to remove {{username}} admin",
+    "give_user_read_only": "Succeeded to give {{username}} read only",
+    "remove_user_read_only": "Succeeded to remove {{username}} read only",
     "activate_user_success": "Succeeded to activating {{username}}",
     "deactivate_user_success": "Succeeded to deactivate {{username}}",
     "remove_user_success": "Succeeded to removing {{username}}",

+ 6 - 0
apps/app/public/static/locales/ja_JP/admin.json

@@ -733,6 +733,7 @@
     },
     "user_table": {
       "administrator": "管理者",
+      "read_only_user": "閲覧ユーザー",
       "edit_menu": "編集メニュー",
       "reset_password": "パスワードの再発行",
       "administrator_menu": "管理者メニュー",
@@ -742,6 +743,9 @@
       "remove_admin_access": "管理者から外す",
       "cannot_remove": "自分自身を管理者から外すことはできません",
       "give_admin_access": "管理者にする",
+      "remove_read_only_access": "閲覧ユーザーから外す",
+      "cannot_give_read_only": "管理者を閲覧ユーザーにすることはできません",
+      "give_read_only_access": "閲覧ユーザーにする",
       "send_invitation_email": "招待メールの送信",
       "resend_invitation_email": "招待メールの再送信"
     },
@@ -1032,6 +1036,8 @@
   "toaster": {
     "give_user_admin": "{{username}}を管理者に設定しました",
     "remove_user_admin": "{{username}}を管理者から外しました",
+    "give_user_read_only": "{{username}}を閲覧ユーザーに設定しました",
+    "remove_user_read_only": "{{username}}を閲覧ユーザーから外しました",
     "activate_user_success": "{{username}}を有効化しました",
     "deactivate_user_success": "{{username}}を無効化しました",
     "remove_user_success": "{{username}}を削除しました",

+ 7 - 1
apps/app/public/static/locales/zh_CN/admin.json

@@ -733,6 +733,7 @@
     },
     "user_table": {
       "administrator": "管理员",
+      "read_only_user": "浏览的用户",
       "edit_menu": "编辑菜单",
       "reset_password": "重置密码",
       "administrator_menu": "管理员菜单",
@@ -742,6 +743,9 @@
       "remove_admin_access": "删除管理员访问权限",
       "cannot_remove": "您不能从管理员中删除自己",
       "give_admin_access": "授予管理员访问权限",
+      "remove_read_only_access": "删除一个用户作为浏览用户",
+      "cannot_give_read_only": "管理员不能成为浏览用户",
+      "give_read_only_access": "使一个用户成为阅读用户",
       "send_invitation_email": "发送邀请邮件",
       "resend_invitation_email": "重发邀请函"
     },
@@ -1031,7 +1035,9 @@
   },
   "toaster": {
     "give_user_admin": "Succeeded to give {{username}} admin",
-    "remove_user_admin": "Succeeded to remove {{username}} admin ",
+    "remove_user_admin": "Succeeded to remove {{username}} admin",
+    "give_user_read_only": "Succeeded to give {{username}} read only",
+    "remove_user_read_only": "Succeeded to remove {{username}} read only",
 		"activate_user_success": "Succeeded to activating {{username}}",
 		"deactivate_user_success": "Succeeded to deactivate {{username}}",
     "remove_user_success": "Succeeded to removing {{username}}",

+ 3 - 3
apps/app/src/components/Admin/Users/GiveReadOnlyButton.tsx

@@ -9,12 +9,12 @@ import { toastSuccess, toastError } from '~/client/util/toastr';
 import { withUnstatedContainers } from '../../UnstatedUtils';
 
 const GiveReadOnlyAlert = React.memo((): JSX.Element => {
-  const { t } = useTranslation();
+  const { t } = useTranslation('admin');
 
   return (
     <div className="px-4">
-      <i className="icon-fw icon-user-unfollow mb-2"></i>{t('admin:user_management.user_table.remove_read_only_access')}
-      <p className="alert alert-danger">{t('admin:user_management.user_table.cannot_give_read_only')}</p>
+      <i className="icon-fw icon-user-unfollow mb-2"></i>{t('user_management.user_table.remove_read_only_access')}
+      <p className="alert alert-danger">{t('user_management.user_table.cannot_give_read_only')}</p>
     </div>
   );
 });