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

Fix traslation 'write' and refactoring

satof3 2 лет назад
Родитель
Сommit
e5bbef2500

+ 2 - 1
apps/app/public/static/locales/en_US/translation.json

@@ -11,7 +11,6 @@
   "PathRecovery": "Path recovery",
   "Copy": "Copy",
   "preview": "Preview",
-  "write": "Write",
   "desktop": "Desktop",
   "phone": "Smartphone",
   "tablet": "Tablet",
@@ -331,6 +330,8 @@
   "page_comment": {
     "comments": "Commments",
     "comment": "Commment",
+    "preview": "Preview",
+    "write": "Write",
     "add_a_comment": "Add a comment",
     "display_the_page_when_posting_this_comment": "Display the page when posting this comment",
     "no_user_found": "No user found",

+ 2 - 1
apps/app/public/static/locales/ja_JP/translation.json

@@ -11,7 +11,6 @@
   "PathRecovery": "パスを修復",
   "Copy": "コピー",
   "preview": "プレビュー",
-  "write": "内容",
   "desktop": "パソコン",
   "phone": "スマホ",
   "tablet": "タブレット",
@@ -364,6 +363,8 @@
   "page_comment": {
     "comments": "コメント",
     "comment": "コメント",
+    "preview": "プレビュー",
+    "write": "入力",
     "add_a_comment": "コメントを追加",
     "display_the_page_when_posting_this_comment": "投稿時のページを表示する",
     "no_user_found": "ユーザー名が見つかりません",

+ 2 - 1
apps/app/public/static/locales/zh_CN/translation.json

@@ -11,7 +11,6 @@
   "PathRecovery": "路径恢复",
   "Copy": "复制",
   "preview": "预览",
-  "write": "内容",
   "desktop": "电脑",
   "phone": "手机",
   "tablet": "平板",
@@ -321,6 +320,8 @@
   "page_comment": {
     "comments": "评论",
     "comment": "评论",
+    "preview": "预览",
+    "write": "输入",
     "add_a_comment": "Add a comment",
     "display_the_page_when_posting_this_comment": "Display the page when posting this comment",
     "no_user_found": "未找到用户名",

+ 2 - 2
apps/app/src/components/PageComment/SwitchingButtonGroup.tsx

@@ -57,7 +57,7 @@ export const SwitchingButtonGroup = (props: Props): JSX.Element => {
         onClick={() => onSelected?.(true)}
       >
         <span className="material-symbols-outlined me-0">play_arrow</span>
-        <span className="d-none d-sm-inline">{t('preview')}</span>
+        <span className="d-none d-sm-inline">{t('page_comment.preview')}</span>
       </SwitchingButton>
       <SwitchingButton
         active={!showPreview}
@@ -65,7 +65,7 @@ export const SwitchingButtonGroup = (props: Props): JSX.Element => {
         onClick={() => onSelected?.(false)}
       >
         <span className="material-symbols-outlined me-1">edit_square</span>
-        <span className="d-none d-sm-inline">{t('write')}</span>
+        <span className="d-none d-sm-inline">{t('page_comment.write')}</span>
       </SwitchingButton>
     </div>
   );