Просмотр исходного кода

feat: i18n to UISettings component

yukendev 2 лет назад
Родитель
Сommit
0ced3b2262

+ 7 - 0
apps/app/public/static/locales/en_US/translation.json

@@ -249,6 +249,13 @@
       "page_create": "Subscribe to the page when you create it."
     }
   },
+  "ui_settings": {
+    "ui_settings": "UI Settings",
+    "wide_view": {
+      "enable_wide_view": "Enable wide view",
+      "description": "When Wide View is enabled, the in-page content expands to the full width of the page."
+    }
+  },
   "editor_settings": {
     "editor_settings": "Editor Settings"
   },

+ 7 - 0
apps/app/public/static/locales/ja_JP/translation.json

@@ -250,6 +250,13 @@
       "page_create": "ページを作成した時にそのページをサブスクライブします。"
     }
   },
+  "ui_settings": {
+    "ui_settings": "UI設定",
+    "wide_view": {
+      "enable_wide_view": "ワイドビューを有効にする",
+      "description": "ワイドビューを有効にすると、ページ内コンテンツがページの横幅いっぱいに広がります。"
+    }
+  },
   "editor_settings": {
     "editor_settings": "エディター設定",
     "common_settings": {

+ 7 - 0
apps/app/public/static/locales/zh_CN/translation.json

@@ -240,6 +240,13 @@
       "page_create": "创建页面时订阅页面。"
     }
   },
+  "ui_settings": {
+    "ui_settings": "用户界面设置",
+    "wide_view": {
+      "enable_wide_view": "启用宽视角",
+      "description": "启用 宽视图 后,页面内的内容会扩展到页面的整个宽度"
+    }
+  },
   "editor_settings": {
     "editor_settings": "编辑器设置"
   },

+ 3 - 3
apps/app/src/components/Me/UISettings.tsx

@@ -5,16 +5,16 @@ export const UISettings = (): JSX.Element => {
   const { t } = useTranslation();
   return (
     <>
-      <h2 className="border-bottom mb-4">UI設定</h2>
+      <h2 className="border-bottom mb-4">{t('ui_settings.ui_settings')}</h2>
 
       <div className="row justify-content-center">
         <div className="col-md-6">
           <div className="form-check form-switch form-check-primary">
             <input type="checkbox" className="form-check-input" id="isQuestionnaireEnabled" onChange={() => {}} />
             <label className="form-label form-check-label" htmlFor="isQuestionnaireEnabled">
-              ワイドビューを有効にする
+              {t('ui_settings.wide_view.enable_wide_view')}
             </label>
-            <p className="form-text text-muted small">ワイドビューを有効にすると、ページ内コンテンツがページの横幅いっぱいに広がります</p>
+            <p className="form-text text-muted small">{t('ui_settings.wide_view.description')}</p>
           </div>
         </div>
       </div>