yuken 3 лет назад
Родитель
Сommit
f3432344e6

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

@@ -1050,7 +1050,7 @@
       "no_grant_available": "The list of selectable permissions could not be found. Please modify the permissions on the parent page first and try again.",
       "no_grant_available": "The list of selectable permissions could not be found. Please modify the permissions on the parent page first and try again.",
       "need_to_fix_grant": "The permissions associated with this page must be modified in order to use the functionality correctly. <br> Please select from the options below to make the change.",
       "need_to_fix_grant": "The permissions associated with this page must be modified in order to use the functionality correctly. <br> Please select from the options below to make the change.",
       "grant_label": {
       "grant_label": {
-        "isNotForbidden": "Authority not allowed to view",
+        "isForbidden": "Authority not allowed to view",
         "currentPageGrantLabel": "Authorization for this page: ",
         "currentPageGrantLabel": "Authorization for this page: ",
         "parentPageGrantLabel": "Authority of parent page: ",
         "parentPageGrantLabel": "Authority of parent page: ",
         "docLink": "For more information on modifying permissions, please refer to <a href='https://docs.growi.org/ja/admin-guide/admin-cookbook/integrate-with-hackmd.html'>こちらのリンク</a>"
         "docLink": "For more information on modifying permissions, please refer to <a href='https://docs.growi.org/ja/admin-guide/admin-cookbook/integrate-with-hackmd.html'>こちらのリンク</a>"

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

@@ -1043,7 +1043,7 @@
       "no_grant_available": "選択可能な権限のリストが見つかりませんでした。まず親ページの権限を修正したのちに再試行してください。",
       "no_grant_available": "選択可能な権限のリストが見つかりませんでした。まず親ページの権限を修正したのちに再試行してください。",
       "need_to_fix_grant": "正しく機能を使用するためにはこのページに紐づく権限を修正する必要があります。 <br> 下記の選択肢から選んで変更してください。",
       "need_to_fix_grant": "正しく機能を使用するためにはこのページに紐づく権限を修正する必要があります。 <br> 下記の選択肢から選んで変更してください。",
       "grant_label": {
       "grant_label": {
-        "isNotForbidden": "権限の閲覧が許可されていません",
+        "isForbidden": "権限の閲覧が許可されていません",
         "currentPageGrantLabel": "このページの権限: ",
         "currentPageGrantLabel": "このページの権限: ",
         "parentPageGrantLabel": "親のページの権限: ",
         "parentPageGrantLabel": "親のページの権限: ",
         "docLink": "権限の修正についての詳細は<a href='https://docs.growi.org/ja/admin-guide/admin-cookbook/integrate-with-hackmd.html'>こちらのリンク</a>を参照してください"
         "docLink": "権限の修正についての詳細は<a href='https://docs.growi.org/ja/admin-guide/admin-cookbook/integrate-with-hackmd.html'>こちらのリンク</a>を参照してください"

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

@@ -1053,7 +1053,7 @@
       "no_grant_available": "无法找到可选择的权限列表。 请先修改父页的权限,然后再试一次。",
       "no_grant_available": "无法找到可选择的权限列表。 请先修改父页的权限,然后再试一次。",
       "need_to_fix_grant": "为了正确使用该功能,需要修改与该页面相关的权限。 <br> 请从以下选项中选择进行更改。",
       "need_to_fix_grant": "为了正确使用该功能,需要修改与该页面相关的权限。 <br> 请从以下选项中选择进行更改。",
       "grant_label": {
       "grant_label": {
-        "isNotForbidden": "无权查看的机构",
+        "isForbidden": "无权查看的机构",
         "currentPageGrantLabel": "本页的权限: ",
         "currentPageGrantLabel": "本页的权限: ",
         "parentPageGrantLabel": "父页的权限: ",
         "parentPageGrantLabel": "父页的权限: ",
         "docLink": "关于修改授权的更多信息,请参见此<a href='https://docs.growi.org/ja/admin-guide/admin-cookbook/integrate-with-hackmd.html'>此链接</a>"
         "docLink": "关于修改授权的更多信息,请参见此<a href='https://docs.growi.org/ja/admin-guide/admin-cookbook/integrate-with-hackmd.html'>此链接</a>"

+ 4 - 4
packages/app/src/components/Page/FixPageGrantAlert.tsx

@@ -69,11 +69,11 @@ const FixPageGrantModal = (props: ModalProps): JSX.Element => {
   const getGrantLabel = useCallback((isForbidden: boolean, grantData?: IPageGrantData): string => {
   const getGrantLabel = useCallback((isForbidden: boolean, grantData?: IPageGrantData): string => {
 
 
     if (isForbidden) {
     if (isForbidden) {
-      return t('fix_page_grant.modal.grant_label.isNotForbidden');
+      return t('fix_page_grant.modal.grant_label.isForbidden');
     }
     }
 
 
     if (grantData == null) {
     if (grantData == null) {
-      return t('fix_page_grant.modal.grant_label.isNotForbidden');
+      return t('fix_page_grant.modal.grant_label.isForbidden');
     }
     }
 
 
     if (grantData.grant === 4) {
     if (grantData.grant === 4) {
@@ -82,12 +82,12 @@ const FixPageGrantModal = (props: ModalProps): JSX.Element => {
 
 
     if (grantData.grant === 5) {
     if (grantData.grant === 5) {
       if (grantData.grantedGroup == null) {
       if (grantData.grantedGroup == null) {
-        return t('fix_page_grant.modal.grant_label.isNotForbidden');
+        return t('fix_page_grant.modal.grant_label.isForbidden');
       }
       }
       return `${t('fix_page_grant.modal.radio_btn.grant_group')}: (${grantData.grantedGroup.name})`;
       return `${t('fix_page_grant.modal.radio_btn.grant_group')}: (${grantData.grantedGroup.name})`;
     }
     }
 
 
-    return t('fix_page_grant.modal.grant_label.isNotForbidden');
+    throw Error('cannnot get grant label'); // this error can't be throwed
   }, [t]);
   }, [t]);
 
 
   const renderGrantDataLabel = useCallback(() => {
   const renderGrantDataLabel = useCallback(() => {