From c1cc810a392ca62a4f7ff94c4abee5a9b0d8af87 Mon Sep 17 00:00:00 2001 From: Justin Edmund Date: Tue, 2 Sep 2025 22:14:23 -0700 Subject: [PATCH] Fix AboutPage translations to use next-intl format - Update translation files to use named tags instead of numbered tags - Changed <2> tags to semantic names like , , , - Update AboutPage component to use matching tag names in t.rich() calls - Fixes UNMATCHED_CLOSING_TAG errors from next-intl - Both English and Japanese translations updated --- components/about/AboutPage/index.tsx | 139 ++++++++++++--------------- public/locales/en/about.json | 10 +- public/locales/ja/about.json | 10 +- 3 files changed, 74 insertions(+), 85 deletions(-) diff --git a/components/about/AboutPage/index.tsx b/components/about/AboutPage/index.tsx index 12941658..e9a3b4b6 100644 --- a/components/about/AboutPage/index.tsx +++ b/components/about/AboutPage/index.tsx @@ -22,19 +22,17 @@ const AboutPage: React.FC = (props: Props) => {

{common('about.segmented_control.about')}

- {/* TODO: Refactor to about.rich() */} - {about("about.subtitle")} - {/* - Granblue.team is a tool to save and share team compositions for{' '} - - Granblue Fantasy - - , a social RPG from Cygames. - */} + {about.rich('about.subtitle', { + gameLink: (chunks) => ( + + {chunks} + + ) + })}

{about('about.explanation.0')}

{about('about.explanation.1')}

@@ -56,59 +54,52 @@ const AboutPage: React.FC = (props: Props) => {

{about('about.credits.title')}

- {/* TODO: Refactor to about.rich() */} - {about('about.credits.maintainer')} - {/* - Granblue.team was built and is maintained by{' '} - - @jedmund - - . - */} + {about.rich('about.credits.maintainer', { + link: (chunks) => ( + + {chunks} + + ) + })}

- {/* TODO: Refactor to about.rich() */} - {about('about.credits.assistance')} - {/* - Many thanks to{' '} - - @lalalalinna - {' '} - and{' '} - - @tarngerine - - , who both provided a lot of help and advice as I was ramping up. - */} + {about.rich('about.credits.assistance', { + link1: (chunks) => ( + + {chunks} + + ), + link2: (chunks) => ( + + {chunks} + + ) + })}

- {/* TODO: Refactor to about.rich() */} - {about('about.credits.support')} - {/* - Many thanks also go to everyone in{' '} - - Fireplace - {' '} - and the granblue-tools Discord for all of their help with with bug - testing, feature requests, and moral support. (P.S. We're - recruiting!) - */} + {about.rich('about.credits.support', { + link: (chunks) => ( + + {chunks} + + ) + })}

@@ -134,19 +125,17 @@ const AboutPage: React.FC = (props: Props) => {

{about('about.license.title')}

- {/* TODO: Refactor to about.rich() */} - {about('about.license.license')} - {/* - This app is licensed under{' '} - - GNU AGPLv3 - - . - */} + {about.rich('about.license.license', { + link: (chunks) => ( + + {chunks} + + ) + })}

{about('about.license.explanation')}

diff --git a/public/locales/en/about.json b/public/locales/en/about.json index ecd23959..31b174ff 100644 --- a/public/locales/en/about.json +++ b/public/locales/en/about.json @@ -5,7 +5,7 @@ } }, "about": { - "subtitle": "Granblue.team is a tool to save and share team compositions for <2>Granblue Fantasy, a social RPG from Cygames.", + "subtitle": "Granblue.team is a tool to save and share team compositions for Granblue Fantasy, a social RPG from Cygames.", "explanation": [ "To get started, all you have to do is add an item to a team and a URL will be created for you to share wherever you like, no account needed.", "If you do make an account, you can save any teams you find for future reference and keep all of your teams together in one place." @@ -17,9 +17,9 @@ }, "credits": { "title": "Credits", - "maintainer": "Granblue.team was built and is maintained by <2>@jedmund.", - "assistance": "Many thanks to <2>@lalalalinna and <6>@tarngerine, who both provided a lot of help and advice as I was ramping up.", - "support": "Many thanks also go to everyone in <2>Fireplace and the granblue-tools Discord for all of their help with with bug testing, feature requests, and moral support. (P.S. We're recruiting!)" + "maintainer": "Granblue.team was built and is maintained by @jedmund.", + "assistance": "Many thanks to @lalalalinna and @tarngerine, who both provided a lot of help and advice as I was ramping up.", + "support": "Many thanks also go to everyone in Fireplace and the granblue-tools Discord for all of their help with with bug testing, feature requests, and moral support. (P.S. We're recruiting!)" }, "contributing": { "title": "Contributing", @@ -27,7 +27,7 @@ }, "license": { "title": "License", - "license": "This app is licensed under <2>GNU AGPLv3.", + "license": "This app is licensed under GNU AGPLv3.", "explanation": "Plainly, that means you can download the source, modify it, and redistribute it as long as you attribute this project, use the same license, and keep your derivative work open source as well." }, "copyright": { diff --git a/public/locales/ja/about.json b/public/locales/ja/about.json index 61f62d3e..bce19aac 100644 --- a/public/locales/ja/about.json +++ b/public/locales/ja/about.json @@ -5,7 +5,7 @@ } }, "about": { - "subtitle": "Granblue.teamは<2>グランブルーファンタジーの編成を作成・保存・共有するサイトです。", + "subtitle": "Granblue.teamはグランブルーファンタジーの編成を作成・保存・共有するサイトです。", "explanation": [ "新しい編成にキャラクター・武器・召喚石を追加するだけで、好きな場所で共有できるURLが作成されます—アカウントなしで!", "しかしアカウントを作れば、見つけた編成を保存して今後の参考の参考にすることができますし、すべての編成を1つの場所にまとめておくことができます。" @@ -17,9 +17,9 @@ }, "credits": { "title": "謝意", - "maintainer": "Granblue.teamの創造者・維持者は<2>@jedmund.", - "assistance": "<2>@lalalalinnaさんと<6>@tarngerineさんがプロジェクト開始の時にたくさん助かりました。", - "support": "<2>Fireplace団(アナザーver)とgranblue-toolsのDiscordの皆さんの協力も感謝しています。(募集中です!)" + "maintainer": "Granblue.teamの創造者・維持者は@jedmund.", + "assistance": "@lalalalinnaさんと@tarngerineさんがプロジェクト開始の時にたくさん助かりました。", + "support": "Fireplace団(アナザーver)とgranblue-toolsのDiscordの皆さんの協力も感謝しています。(募集中です!)" }, "contributing": { "title": "協力", @@ -27,7 +27,7 @@ }, "license": { "title": "ライセンス", - "license": "このサイトは<2>GNU AGPLv3のライセンスで提供されています.", + "license": "このサイトはGNU AGPLv3のライセンスで提供されています.", "explanation": "派生のプロジェクトを作成したら、このプロジェクトをちゃんとリンクしてリンクし・派生のプロジェクトもオープンソースで同じライセンスで提供されたら、自由にソースコードをダウンロド・改変・再配布を許可されています。" }, "copyright": {