Browse Source

feat(shortcuts-modal): add "Other Shortcuts" link to modal footer

Add a link to external docs at the bottom of the keyboard shortcuts
modal, with i18n support for all 5 locales. The link currently points
to docs.growi.org as a placeholder until the dedicated shortcuts
article is published.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
VANELLOPE\tomoyuki-t 2 weeks ago
parent
commit
f8a5bc45d5

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

@@ -528,7 +528,8 @@
       "Code Block": "Code Block",
       "Code Block": "Code Block",
       "Comment Out": "Comment Out",
       "Comment Out": "Comment Out",
       "Comment Out Desc": "(Hide)"
       "Comment Out Desc": "(Hide)"
-    }
+    },
+    "Other Shortcuts": "Other Shortcuts"
   },
   },
   "modal_resolve_conflict": {
   "modal_resolve_conflict": {
     "conflicts_with_new_body_on_server_side": "Conflict with new body on server side. Please select or edit the page body to resolve the conflict.",
     "conflicts_with_new_body_on_server_side": "Conflict with new body on server side. Please select or edit the page body to resolve the conflict.",

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

@@ -524,7 +524,8 @@
       "Code Block": "Bloc de code",
       "Code Block": "Bloc de code",
       "Comment Out": "Masquer",
       "Comment Out": "Masquer",
       "Comment Out Desc": "(Commenter)"
       "Comment Out Desc": "(Commenter)"
-    }
+    },
+    "Other Shortcuts": "Autres raccourcis"
   },
   },
   "modal_resolve_conflict": {
   "modal_resolve_conflict": {
     "file_conflicting_with_newer_remote": "Ce fichier est en conflit avec une autre version",
     "file_conflicting_with_newer_remote": "Ce fichier est en conflit avec une autre version",

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

@@ -562,7 +562,8 @@
       "Code Block": "コードブロック",
       "Code Block": "コードブロック",
       "Comment Out": "非表示にする",
       "Comment Out": "非表示にする",
       "Comment Out Desc": "(コメントアウト)"
       "Comment Out Desc": "(コメントアウト)"
-    }
+    },
+    "Other Shortcuts": "その他のショートカット"
   },
   },
   "modal_resolve_conflict": {
   "modal_resolve_conflict": {
     "conflicts_with_new_body_on_server_side": "サーバー側の新しい本文と衝突します。ページ本文を選択または編集して衝突を解消してください。",
     "conflicts_with_new_body_on_server_side": "サーバー側の新しい本文と衝突します。ページ本文を選択または編集して衝突を解消してください。",

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

@@ -499,7 +499,8 @@
       "Code Block": "코드 블록",
       "Code Block": "코드 블록",
       "Comment Out": "주석 처리",
       "Comment Out": "주석 처리",
       "Comment Out Desc": "(숨기기)"
       "Comment Out Desc": "(숨기기)"
-    }
+    },
+    "Other Shortcuts": "기타 단축키"
   },
   },
   "modal_resolve_conflict": {
   "modal_resolve_conflict": {
     "conflicts_with_new_body_on_server_side": "서버 측의 새 본문과 충돌합니다. 충돌을 해결하려면 페이지 본문을 선택하거나 편집하십시오.",
     "conflicts_with_new_body_on_server_side": "서버 측의 새 본문과 충돌합니다. 충돌을 해결하려면 페이지 본문을 선택하거나 편집하십시오.",

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

@@ -520,7 +520,8 @@
       "Code Block": "代码块",
       "Code Block": "代码块",
       "Comment Out": "隐藏",
       "Comment Out": "隐藏",
       "Comment Out Desc": "(注释)"
       "Comment Out Desc": "(注释)"
-    }
+    },
+    "Other Shortcuts": "其他快捷键"
   },
   },
   "modal_resolve_conflict": {
   "modal_resolve_conflict": {
     "conflicts_with_new_body_on_server_side": "与服务器端的新正文文本冲突。 请选择或编辑页面正文以解决冲突",
     "conflicts_with_new_body_on_server_side": "与服务器端的新正文文本冲突。 请选择或编辑页面正文以解决冲突",

+ 12 - 0
apps/app/src/client/components/ShortcutsModal/ShortcutsModal.tsx

@@ -514,6 +514,18 @@ const ShortcutsModalSubstance = (): React.JSX.Element => {
       </ModalHeader>
       </ModalHeader>
       <ModalBody className="p-md-4 mb-3 grw-modal-body-style overflow-auto">
       <ModalBody className="p-md-4 mb-3 grw-modal-body-style overflow-auto">
         {bodyContent}
         {bodyContent}
+        <div className="mt-4 ps-3">
+          {/* TODO: Replace href with the dedicated keyboard shortcuts docs page once published */}
+          <a
+            href="https://docs.growi.org"
+            target="_blank"
+            rel="noreferrer"
+            className="d-inline-flex align-items-center gap-2 text-secondary"
+          >
+            <span className="material-symbols-outlined fs-5">help</span>
+            {t('modal_shortcuts.Other Shortcuts')}
+          </a>
+        </div>
       </ModalBody>
       </ModalBody>
     </>
     </>
   );
   );