jam411 3 лет назад
Родитель
Сommit
9d33015040

+ 11 - 0
packages/app/public/static/locales/en_US/commons.json

@@ -19,6 +19,17 @@
     "app_settings": "App Settings"
   },
 
+  "header_search_box": {
+    "label": {
+      "All pages": "All pages",
+      "This tree": "This tree"
+    },
+    "item_label": {
+      "All pages": "All pages",
+      "This tree": "Only children of this tree"
+    }
+  },
+
   "share_links": {
     "Share Link": "Share Link",
     "Page Path": "Page Path",

+ 0 - 10
packages/app/public/static/locales/en_US/translation.json

@@ -251,16 +251,6 @@
   "API Token Settings": "API token settings",
   "Current API Token": "Current API token",
   "Update API Token": "Update API token",
-  "header_search_box": {
-    "label": {
-      "All pages": "All pages",
-      "This tree": "This tree"
-    },
-    "item_label": {
-      "All pages": "All pages",
-      "This tree": "Only children of this tree"
-    }
-  },
   "in_app_notification": {
     "notification_list": "In-App Notification List",
     "see_all": "See All",

+ 11 - 0
packages/app/public/static/locales/ja_JP/commons.json

@@ -19,6 +19,17 @@
     "app_settings": "アプリ設定"
   },
 
+  "header_search_box": {
+    "label": {
+      "All pages": "全てのページ",
+      "This tree": "この階層"
+    },
+    "item_label": {
+      "All pages": "全てのページ",
+      "This tree": "この階層下の子ページのみ"
+    }
+  },
+
   "share_links": {
     "Share Link": "共有用リンク",
     "Page Path": "ページパス",

+ 0 - 10
packages/app/public/static/locales/ja_JP/translation.json

@@ -247,16 +247,6 @@
   "API Token Settings": "API Token設定",
   "Current API Token": "現在のAPI Token",
   "Update API Token": "API Tokenを更新",
-  "header_search_box": {
-    "label": {
-      "All pages": "全てのページ",
-      "This tree": "この階層"
-    },
-    "item_label": {
-      "All pages": "全てのページ",
-      "This tree": "この階層下の子ページのみ"
-    }
-  },
   "in_app_notification": {
     "notification_list": "アプリ内通知一覧",
     "see_all": "通知一覧を見る",

+ 11 - 0
packages/app/public/static/locales/zh_CN/commons.json

@@ -19,6 +19,17 @@
     "app_settings": "系统设置"
   },
 
+  "header_search_box": {
+		"label": {
+			"All pages": "所有页面",
+			"This tree": "当前分支"
+		},
+		"item_label": {
+			"All pages": "所有页面",
+			"This tree": "当前分支以下内容"
+		}
+  },
+
   "share_links": {
     "Share Link": "Share Link",
     "Page Path": "Page Path",

+ 0 - 10
packages/app/public/static/locales/zh_CN/translation.json

@@ -234,16 +234,6 @@
 	"API Token Settings": "API token 设置",
 	"Current API Token": "当前 API token",
 	"Update API Token": "更新 API token",
-	"header_search_box": {
-		"label": {
-			"All pages": "所有页面",
-			"This tree": "当前分支"
-		},
-		"item_label": {
-			"All pages": "所有页面",
-			"This tree": "当前分支以下内容"
-		}
-  },
   "in_app_notification": {
     "notification_list": "应用内通知列表",
     "see_all": "查看通知列表",

+ 4 - 4
packages/app/src/components/Navbar/GlobalSearch.tsx

@@ -67,8 +67,8 @@ export const GlobalSearch = (props: GlobalSearchProps): JSX.Element => {
   }, [currentPagePath, isScopeChildren, router, text]);
 
   const scopeLabel = isScopeChildren
-    ? t('header_search_box.label.This tree')
-    : t('header_search_box.label.All pages');
+    ? t('header_search_box.label.This tree', { ns: 'commons' })
+    : t('header_search_box.label.All pages', { ns: 'commons' });
 
   const isIndicatorShown = !isFocused && (text.length === 0);
 
@@ -98,7 +98,7 @@ export const GlobalSearch = (props: GlobalSearchProps): JSX.Element => {
                 globalSearchFormRef.current?.focus();
               }}
             >
-              { t('header_search_box.item_label.All pages') }
+              { t('header_search_box.item_label.All pages', { ns: 'commons' }) }
             </button>
             <button
               data-tesid="search-current-tree"
@@ -109,7 +109,7 @@ export const GlobalSearch = (props: GlobalSearchProps): JSX.Element => {
                 globalSearchFormRef.current?.focus();
               }}
             >
-              { t('header_search_box.item_label.This tree') }
+              { t('header_search_box.item_label.This tree', { ns: 'commons' }) }
             </button>
           </div>
         </div>