itizawa 5 лет назад
Родитель
Сommit
169ed1c456

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

@@ -165,6 +165,7 @@
   },
   },
   "not_found_page": {
   "not_found_page": {
     "Create Page": "Create Page",
     "Create Page": "Create Page",
+    "page_not_exist": "This page does not exist.",
     "page_not_exist_alert": "This page does not exist. Please create a new page."
     "page_not_exist_alert": "This page does not exist. Please create a new page."
   },
   },
   "custom_navigation": {
   "custom_navigation": {

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

@@ -168,6 +168,7 @@
   },
   },
   "not_found_page": {
   "not_found_page": {
     "Create Page": "ページを作成する",
     "Create Page": "ページを作成する",
+    "page_not_exist": "このページは存在しません。",
     "page_not_exist_alert": "このページは存在しません。新たに作成する必要があります。"
     "page_not_exist_alert": "このページは存在しません。新たに作成する必要があります。"
   },
   },
   "custom_navigation": {
   "custom_navigation": {

+ 1 - 0
resource/locales/zh_CN/translation.json

@@ -166,6 +166,7 @@
   },
   },
   "not_found_page": {
   "not_found_page": {
     "Create Page": "创建页面",
     "Create Page": "创建页面",
+    "page_not_exist": "该页面不存在",
     "page_not_exist_alert": "该页面不存在,请创建一个新页面"
     "page_not_exist_alert": "该页面不存在,请创建一个新页面"
   },
   },
   "custom_navigation": {
   "custom_navigation": {

+ 10 - 1
src/client/js/components/PageAccessoriesModalControl.jsx

@@ -58,6 +58,15 @@ const PageAccessoriesModalControl = (props) => {
   return (
   return (
     <div className="grw-page-accessories-control d-flex flex-nowrap align-items-center justify-content-end justify-content-lg-between">
     <div className="grw-page-accessories-control d-flex flex-nowrap align-items-center justify-content-end justify-content-lg-between">
       {accessoriesBtnList.map((accessory) => {
       {accessoriesBtnList.map((accessory) => {
+
+        let tooltipMessage;
+        if (accessory.disabled) {
+          tooltipMessage = isPageExist ? t('Not available for guest') : t('not_found_page.page_not_exist');
+        }
+        else {
+          tooltipMessage = accessory.i18n;
+        }
+
         return (
         return (
           <Fragment key={accessory.name}>
           <Fragment key={accessory.name}>
             <div id={`shareLink-btn-wrapper-for-tooltip-for-${accessory.name}`}>
             <div id={`shareLink-btn-wrapper-for-tooltip-for-${accessory.name}`}>
@@ -70,7 +79,7 @@ const PageAccessoriesModalControl = (props) => {
               </button>
               </button>
             </div>
             </div>
             <UncontrolledTooltip placement="top" target={`shareLink-btn-wrapper-for-tooltip-for-${accessory.name}`} fade={false}>
             <UncontrolledTooltip placement="top" target={`shareLink-btn-wrapper-for-tooltip-for-${accessory.name}`} fade={false}>
-              {accessory.disabled ? t('Not available for guest') : accessory.i18n}
+              {tooltipMessage}
             </UncontrolledTooltip>
             </UncontrolledTooltip>
           </Fragment>
           </Fragment>
         );
         );