Mao 4 лет назад
Родитель
Сommit
e9a1c4a6b7

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

@@ -112,6 +112,8 @@
   "Wiki Management Home Page": "Wiki Management Home Page",
   "App Settings": "App Settings",
   "V5 Page Migration": "V5 Page Migration",
+  "GROWI.4.9_new_schema": "GROWI.4.9 new schema",
+  "See_more_detail_on_new_schema": "See more detail on <a href='#'>{{url}}</a> <i class='icon-share-alt'></i> ",
   "Site URL settings": "Site URL settings",
   "Markdown Settings": "Markdown Settings",
   "Customize": "Customize",

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

@@ -112,6 +112,8 @@
   "Wiki Management Home Page": "Wiki管理トップ",
   "App Settings": "アプリ設定",
   "V5 Page Migration": "V5 ページマイグレーション",
+  "GROWI.4.9_new_schema": "GROWI.4.9における新スキーマについて",
+  "See_more_detail_on_new_schema": "詳しくは<a href='#'>{{url}}</a><i class='icon-share-alt'></i>を参照ください。",
   "Site URL settings": "サイトURL設定",
   "Markdown Settings": "マークダウン設定",
   "Customize": "カスタマイズ",
@@ -964,5 +966,10 @@
   },
   "pagetree": {
     "private_legacy_pages": "待避所"
+  },
+  "duplicated_page_alert" : {
+    "same_page_name_exists": "ページ名 「{{pageName}}」が重複しています",
+    "same_page_name_exists_at_path" : "”{{path}}” において ”{{pathName}}”というページは複数存在しています。",
+    "select_page_to_see" : "以下から遷移するページを選択してください。"
   }
 }

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

@@ -120,6 +120,8 @@
 	"Wiki Management Home Page": "Wiki管理首页",
 	"App Settings": "系统设置",
   "V5 Page Migration": "V5 Page Migration",
+  "GROWI.4.9_new_schema": "GROWI.4.9 new schema",
+  "See_more_detail_on_new_schema": "更多详情请见<a href='#'>{{url}}</a> <i class='icon-share-alt'></i> ",
 	"Site URL settings": "主页URL设置",
 	"Markdown Settings": "Markdown设置",
 	"Customize": "页面定制",

+ 26 - 0
packages/app/src/components/DuplicatePage.tsx

@@ -0,0 +1,26 @@
+import React, { FC } from 'react';
+import { DevidedPagePath } from '@growi/core';
+import { useTranslation } from 'react-i18next';
+
+
+type Props = {
+  path : string,
+}
+
+const DuplicatePageAlert : FC<Props> = (props: Props) => {
+  const { path } = props;
+  const { t } = useTranslation();
+  const devidedPath = new DevidedPagePath(path);
+
+  return (
+    <div className="alert alert-warning py-3">
+      <h5 className="font-weight-bold mt-1">{t('duplicated_page_alert.same_page_name_exists', { pageName: devidedPath.latter })}</h5>
+      <p>
+        {t('duplicated_page_alert.same_page_name_exists_at_path',
+          { path: devidedPath.isFormerRoot ? '/' : devidedPath.former, pathName: devidedPath.latter })}<br />
+        <p dangerouslySetInnerHTML={{ __html: t('See_more_detail_on_new_schema', { url: t('GROWI.4.9_new_schema') }) }} />
+      </p>
+      <p className="mb-1">{t('duplicated_page_alert.select_page_to_see')}</p>
+    </div>
+  );
+};

+ 0 - 2
packages/app/src/components/Page/DuplicatedAlert.jsx

@@ -3,8 +3,6 @@ import PropTypes from 'prop-types';
 import { withTranslation } from 'react-i18next';
 
 
-const DuplicateAlertTemporaly = <></>;
-
 const DuplicatedAlert = (props) => {
   const { t } = props;
   const urlParams = new URLSearchParams(window.location.search);