From c4cd93980c1138ce92a87b9889346ff954870992 Mon Sep 17 00:00:00 2001 From: Amarantha Kulkarni Date: Wed, 28 Feb 2024 11:00:12 -0800 Subject: [PATCH 1/3] Fix links to docs pages --- community/index.page.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/community/index.page.tsx b/community/index.page.tsx index 0dbbb8d5d4..62dda810fb 100644 --- a/community/index.page.tsx +++ b/community/index.page.tsx @@ -584,13 +584,13 @@ const CommunityPage: React.FC = () => { {translate("Networks and Servers")} {translate("Join UNL")} @@ -598,14 +598,14 @@ const CommunityPage: React.FC = () => { {translate("Install & Configure")} {translate("Troubleshooting")} From 96165d4192e5ea732c9994391e56a1c5ad636132 Mon Sep 17 00:00:00 2001 From: Amarantha Kulkarni Date: Wed, 28 Feb 2024 12:58:18 -0800 Subject: [PATCH 2/3] add translations key to navbar.tsx --- @theme/components/Navbar/Navbar.tsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/@theme/components/Navbar/Navbar.tsx b/@theme/components/Navbar/Navbar.tsx index 82bd725a2b..ac640c1c6c 100644 --- a/@theme/components/Navbar/Navbar.tsx +++ b/@theme/components/Navbar/Navbar.tsx @@ -34,7 +34,7 @@ export function Navbar(props) { const navItems = menu.map((item, index) => { if (item.type === 'group') { - return ; + return ; } else { return ( @@ -206,7 +206,8 @@ export function TopNavCollapsible(props) { } export function NavDropdown(props) { - const { label, items, pathPrefix } = props; + const { label, items, pathPrefix, labelTranslationKey } = props; + const { translate } = useTranslate(); const dropdownGroups = items.map((item, index) => { if (item.items) { @@ -280,7 +281,7 @@ export function NavDropdown(props) { aria-haspopup="true" aria-expanded="false" > - {label} + {translate(labelTranslationKey, label)}
{dropdownGroups} From e12f7cd5be0c266610adfd5bb6cabbbbf92d61e9 Mon Sep 17 00:00:00 2001 From: Amarantha Kulkarni Date: Wed, 28 Feb 2024 14:50:20 -0800 Subject: [PATCH 3/3] Add translation keys for footer headings and sidebar items --- @i18n/ja/translations.yaml | 7 +++++++ redocly.yaml | 4 ++++ sidebars.yaml | 1 + 3 files changed, 12 insertions(+) diff --git a/@i18n/ja/translations.yaml b/@i18n/ja/translations.yaml index e2a274b6fa..31ccb83c30 100644 --- a/@i18n/ja/translations.yaml +++ b/@i18n/ja/translations.yaml @@ -2,7 +2,14 @@ theme.navbar.about: 概要 theme.navbar.docs: ドキュメント theme.navbar.resources: リソース theme.navbar.community: コミュニティ +theme.footer.about: 概要 +theme.footer.docs: ドキュメント +theme.footer.resources: リソース +theme.footer.community: コミュニティ sidebar.docs: ドキュメント +sidebar.docs.tutorials: チュートリアル +sidebar.docs.references: リファレンス +sidebars.resources: リソース sidebar.resources.codesamples: コードサンプル Open Source.: オープンソース Jump to top of page: ページの先頭へ diff --git a/redocly.yaml b/redocly.yaml index b90e2c10e1..cda1c0c265 100644 --- a/redocly.yaml +++ b/redocly.yaml @@ -62,6 +62,7 @@ theme: copyrightText: © 2024 XRP Ledger. Open Source. items: - group: About + groupTranslationKey: theme.footer.about items: - page: about/index.page.tsx - label: Use Cases & Projects @@ -74,6 +75,7 @@ theme: - page: about/faq.md - page: about/privacy-policy.md - group: Docs + groupTranslationKey: theme.footer.docs items: - label: XRPL Documentation page: docs/index.page.tsx @@ -84,6 +86,7 @@ theme: - page: docs/references/index.md - page: docs/infrastructure/index.md - group: Resources + groupTranslationKey: theme.footer.resources items: - page: resources/code-samples.page.tsx - page: resources/dev-tools/index.page.tsx @@ -100,6 +103,7 @@ theme: - page: resources/contribute-code/index.md - page: resources/contribute-documentation/index.md - group: Community + groupTranslationKey: theme.footer.community items: - page: community/index.page.tsx - page: community/events.page.tsx diff --git a/sidebars.yaml b/sidebars.yaml index 0a0b7cfad9..b7ea09abd4 100644 --- a/sidebars.yaml +++ b/sidebars.yaml @@ -602,6 +602,7 @@ - page: docs/infrastructure/troubleshooting/server-wont-start.md - page: docs/infrastructure/troubleshooting/fix-sqlite-tx-db-page-size-issue.md - page: resources/index.md + labelTranslationKey: sidebars.resources expanded: false items: - label: Code Samples