Răsfoiți Sursa

divide translation word

zahmis 5 ani în urmă
părinte
comite
c9db0cb620

+ 7 - 3
resource/locales/en_US/translation.json

@@ -292,9 +292,13 @@
   "page_page": {
   "page_page": {
     "notice": {
     "notice": {
       "version": "This is not the current version.",
       "version": "This is not the current version.",
-      "moved": "This page was moved from <code>%s</code>",
-      "redirected": "You are redirected from <code>%s</code>",
-      "duplicated": "This page was duplicated from {{fromPath}}",
+      "moved": "This page was moved from",
+      "moved_period": ".",
+      "redirected": "You are redirected from",
+      "redirected_period": ".",
+      "redirect_period": ".",
+      "duplicated": "This page was duplicated from",
+      "duplicated_period": ".",
       "unlinked": "Redirect pages to this page have been deleted.",
       "unlinked": "Redirect pages to this page have been deleted.",
       "restricted": "Access to this page is restricted",
       "restricted": "Access to this page is restricted",
       "stale": "More than {{count}} year has passed since last update.",
       "stale": "More than {{count}} year has passed since last update.",

+ 6 - 3
resource/locales/ja_JP/translation.json

@@ -295,9 +295,12 @@
   "page_page": {
   "page_page": {
     "notice": {
     "notice": {
       "version": "これは現在の版ではありません。",
       "version": "これは現在の版ではありません。",
-      "moved": "このページは <code>%s</code> から移動しました。",
-      "redirected": "リダイレクト元 >> <code>%s</code>",
-      "duplicated": "このページは {{fromPath}} から複製されました。",
+      "moved": "このページは",
+      "moved_period":"から移動しました。",
+      "redirected": "リダイレクト元 >>",
+      "redirected_period":"",
+      "duplicated": "このページは",
+      "duplicated_period": "から複製されました。",
       "unlinked": "このページへのリダイレクトは削除されました。",
       "unlinked": "このページへのリダイレクトは削除されました。",
       "restricted": "このページの閲覧は制限されています",
       "restricted": "このページの閲覧は制限されています",
       "stale": "このページは最終更新日から{{count}}年以上が経過しています。",
       "stale": "このページは最終更新日から{{count}}年以上が経過しています。",

+ 6 - 3
resource/locales/zh_CN/translation.json

@@ -274,9 +274,12 @@
 	"page_page": {
 	"page_page": {
 		"notice": {
 		"notice": {
 			"version": "这不是当前版本。",
 			"version": "这不是当前版本。",
-			"moved": "此页已从<code>%s</code>",
-			"redirected": "您将从<code>%s</code>",
-			"duplicated": "此页来自{{fromPath}}",
+			"moved": "此页已从",
+      "moved_period": "",
+			"redirected": "您将从",
+      "redirected_period": "",
+			"duplicated": "此页来自",
+      "duplicated_period": "",
 			"unlinked": "将网页重定向到此网页已被删除。",
 			"unlinked": "将网页重定向到此网页已被删除。",
 			"restricted": "访问此页受到限制",
 			"restricted": "访问此页受到限制",
 			"stale": "自上次更新以来,已超过{{count}年。",
 			"stale": "自上次更新以来,已超过{{count}年。",

+ 1 - 1
src/client/js/components/Page/DuplicatedAlert.jsx

@@ -12,7 +12,7 @@ const DuplicatedAlert = (props) => {
   return (
   return (
     <div className="alert alert-success py-3 px-4">
     <div className="alert alert-success py-3 px-4">
       <strong>
       <strong>
-        { t('Duplicated') }:{t('page_page.notice.duplicated', { fromPath })}
+        { t('Duplicated') }:{t('page_page.notice.duplicated')} <code>{fromPath}</code>{t('page_page.notice.duplicated_period')}
       </strong>
       </strong>
     </div>
     </div>
   );
   );

+ 3 - 2
src/client/js/components/Page/RedirectedAlert.jsx

@@ -5,10 +5,11 @@ import { withTranslation } from 'react-i18next';
 
 
 const RedirectedAlert = (props) => {
 const RedirectedAlert = (props) => {
   const { t } = props;
   const { t } = props;
-
+  const urlParams = new URLSearchParams(window.location.search);
+  const fromPath = urlParams.get('redirectFrom');
   return (
   return (
     <>
     <>
-      <strong>{ t('Redirected') }:</strong>{ t('page_page.notice.redirected')}
+      <strong>{ t('Redirected') }:</strong>{ t('page_page.notice.redirected')} <code>{fromPath}</code> {t('page_page.notice.redirected_period')}
     </>
     </>
   );
   );
 };
 };

+ 3 - 1
src/client/js/components/Page/RenamedAlert.jsx

@@ -5,10 +5,12 @@ import { withTranslation } from 'react-i18next';
 
 
 const RenamedAlert = (props) => {
 const RenamedAlert = (props) => {
   const { t } = props;
   const { t } = props;
+  const urlParams = new URLSearchParams(window.location.search);
+  const fromPath = urlParams.get('renamedFrom');
 
 
   return (
   return (
     <>
     <>
-      <strong>{ t('Moved') }:</strong>{t('page_page.notice.moved')}
+      <strong>{ t('Moved') }:</strong>{t('page_page.notice.moved')} <code>{fromPath}</code> {t('page_page.notice.moved_period')}
     </>
     </>
   );
   );
 };
 };