Procházet zdrojové kódy

Merge pull request #5612 from weseek/imprv/usergroup-confirm-modal-i18n-design

imprv: Usergroup confirm modal i18n design
Yuki Takei před 4 roky
rodič
revize
85d0bced95

+ 7 - 0
packages/app/resource/locales/en_US/admin/admin.json

@@ -502,6 +502,13 @@
       "publish_pages": "Publish all",
       "delete_pages": "Delete all",
       "transfer_pages": "Transfer to another group"
+    },
+    "update_parent_confirm_modal": {
+      "header": "The parent of the group will be changed",
+      "caution_change_parent": "This operation will change the parent of the group \"{{groupName}}\".",
+      "danger_message": "Note that this affects the permissions to view all pages associated with this group.",
+      "force_update_parents_label": "Forcibly add missing users",
+      "force_update_parents_description": "Enable this option to force the addition of missing users to the ancestor groups if they exist after changing a parent group."
     }
   }
 }

+ 1 - 0
packages/app/resource/locales/en_US/translation.json

@@ -169,6 +169,7 @@
   "Link sharing is disabled": "Link sharing is disabled",
   "successfully_saved_the_page": "Successfully saved the page",
   "you_can_not_create_page_with_this_name": "You can not create page with this name",
+  "Confirm": "Confirm",
   "personal_dropdown": {
     "home": "Home",
     "settings": "Settings",

+ 7 - 0
packages/app/resource/locales/ja_JP/admin/admin.json

@@ -501,6 +501,13 @@
       "publish_pages": "全て公開する",
       "delete_pages": "全て削除する",
       "transfer_pages": "全て他のグループに移譲する"
+    },
+    "update_parent_confirm_modal": {
+      "header": "グループの親が変更されます",
+      "caution_change_parent": "この操作はグループ \"{{groupName}}\" の親を変更します。",
+      "danger_message": "このグループに関連する全てのページの閲覧権限に影響があることに注意してください。",
+      "force_update_parents_label": "強制的に足りないユーザーを追加する",
+      "force_update_parents_description": "このオプションを有効化すると、親グループ変更後に祖先グループに足りないユーザーが存在した場合にそれらのユーザーを強制的に追加することができます"
     }
   }
 }

+ 1 - 0
packages/app/resource/locales/ja_JP/translation.json

@@ -171,6 +171,7 @@
   "Link sharing is disabled": "リンクのシェアは無効化されています",
   "successfully_saved_the_page": "ページが正常に保存されました",
   "you_can_not_create_page_with_this_name": "この名前でページを作成することはできません",
+  "Confirm": "確認",
   "personal_dropdown": {
     "home": "ホーム",
     "settings": "設定",

+ 7 - 0
packages/app/resource/locales/zh_CN/admin/admin.json

@@ -511,6 +511,13 @@
       "publish_pages": "全部发布",
       "delete_pages": "全部删除",
       "transfer_pages": "转移到另一组"
+    },
+    "update_parent_confirm_modal": {
+      "header": "该组的父组被改变",
+      "caution_change_parent": "该操作改变了组的父级,即 \"{{groupName}}\" 。",
+      "danger_message": "注意,查看与该组相关的所有页面的权限会受到影响。",
+      "force_update_parents_label": "强行添加失踪的用户",
+      "force_update_parents_description": "激活这个选项,如果在父组改变后,在祖先组中有缺失的用户,可以强制添加这些用户"
     }
   }
 }

+ 2 - 1
packages/app/resource/locales/zh_CN/translation.json

@@ -177,12 +177,13 @@
   "Link sharing is disabled": "你不允许分享该链接",
   "successfully_saved_the_page": "成功地保存了该页面",
   "you_can_not_create_page_with_this_name": "您无法使用此名称创建页面",
+  "Confirm": "确定",
 	"form_validation": {
 		"error_message": "有些值不正确",
 		"required": "%s 是必需的",
 		"invalid_syntax": "%s的语法无效。",
     "title_required": "标题是必需的。",
-    "slashed_are_not_yet_supported": "スラッシュを含むタイトルにはまだ対応していません"
+    "slashed_are_not_yet_supported": "目前还不支持包含斜线的标题"
   },
   "not_found_page": {
     "Create Page": "创建页面",

+ 8 - 8
packages/app/src/components/Admin/UserGroupDetail/UpdateParentConfirmModal.tsx

@@ -32,17 +32,17 @@ const UpdateParentConfirmModal: FC = () => {
         targetGroup != null && updateData != null && updateData?.parent !== undefined ? (
           <>
             <ModalBody>
-              <div>
+              <div className="mb-2">
                 <span className="font-weight-bold">{t('admin:user_group_management.group_name')}</span> : &quot;{targetGroup.name}&quot;
                 <hr />
-                {updateData != null ? `It will change the parent of "${targetGroup.name}".` : `It will reset the parent of "${targetGroup.name}".`}
+                {t('admin:user_group_management.update_parent_confirm_modal.caution_change_parent', { groupName: targetGroup.name })}
               </div>
-              <div className="text-danger mt-5">
+              <div className="text-danger mb-3">
                 <i className="icon-exclamation"></i>
-                {t('admin:user_group_management.update_parent_confirm_modal.desc')}(It will affect all pages related to the group.)
+                {t('admin:user_group_management.update_parent_confirm_modal.danger_message')}
               </div>
 
-              <div className="custom-control custom-checkbox custom-checkbox-primary">
+              <div className="custom-control custom-checkbox custom-checkbox-primary pl-5">
                 <input
                   className="custom-control-input"
                   name="forceUpdateParents"
@@ -52,15 +52,15 @@ const UpdateParentConfirmModal: FC = () => {
                   onChange={() => setForceUpdate(!isForceUpdate)}
                 />
                 <label className="custom-control-label" htmlFor="forceUpdateParents">
-                  { t('forceUpdateParents') }
-                  <p className="form-text text-muted mt-0">{ t('forceUpdateParentsDescription') }</p>
+                  {t('admin:user_group_management.update_parent_confirm_modal.force_update_parents_label')}
+                  <p className="form-text text-muted mt-0">{t('admin:user_group_management.update_parent_confirm_modal.force_update_parents_description')}</p>
                 </label>
               </div>
             </ModalBody>
             <ModalFooter>
               <button
                 type="button"
-                className="btn btn-sm btn-warning"
+                className="btn btn-warning"
                 onClick={() => {
                   onConfirm?.(targetGroup, updateData, isForceUpdate);
                   closeModal();