diff --git a/src/components/Features.astro b/src/components/Features.astro index 73527b5..3f871da 100644 --- a/src/components/Features.astro +++ b/src/components/Features.astro @@ -19,7 +19,11 @@ const { }, } = getUI(locale) -const { title1 = features.title1, title2 = features.title2, title3 = features.title3 } = Astro.props +interface Props { + titles?: string[] +} + +const { titles } = Astro.props const descriptions = Object.values(features.featureTabs).map((tab) => tab.description) --- @@ -29,15 +33,18 @@ const descriptions = Object.values(features.featureTabs).map((tab) => tab.descri class="relative flex w-full flex-col py-12 text-start lg:py-36" > - - {title1} - - - {title2} - - - {title3} - + {(titles || features.titles).map((title, index) => ( + title !== '\n' ? ( + + {title} + + ) : ( + + ) + ))} {features.description} diff --git a/src/components/Sponsors.astro b/src/components/Sponsors.astro index 95b9f19..d54d3d1 100644 --- a/src/components/Sponsors.astro +++ b/src/components/Sponsors.astro @@ -21,7 +21,7 @@ const {
- Our Sponsors + {sponsors.title} diff --git a/src/constants/i18n.ts b/src/constants/i18n.ts index 7c99d59..8af0913 100644 --- a/src/constants/i18n.ts +++ b/src/constants/i18n.ts @@ -13,7 +13,7 @@ export const i18n = { * Type definition for UI translations based on the English translation * @typedef {Object} UIProps */ -export type UIProps = typeof UI_EN +export type UIProps = typeof UI_EN | typeof UI_JA export const getIntlLocale = (locale: string) => { return i18n.LOCALES.find((l) => l.value === locale)?.intl diff --git a/src/i18n/en/translation.json b/src/i18n/en/translation.json index 55ee629..cf434df 100644 --- a/src/i18n/en/translation.json +++ b/src/i18n/en/translation.json @@ -21,9 +21,7 @@ } }, "features": { - "title1": "Productivity", - "title2": "at", - "title3": "its best", + "titles": ["Productivity", "at", "its best"], "description": "Zen Browser is packed with features that help you stay productive and focused. Browsers should be tools that help you get things done, not distractions that keep you from your work.", "featureTabs": { "workspaces": { diff --git a/src/i18n/ja/translation.json b/src/i18n/ja/translation.json index 9d952d7..f41b59d 100644 --- a/src/i18n/ja/translation.json +++ b/src/i18n/ja/translation.json @@ -21,9 +21,7 @@ } }, "features": { - "title1": "生産性", - "title2": "の", - "title3": "極み", + "titles": ["生産性", "の", "極み"], "description": "Zenは、生産性と集中力を高める機能が満載です。ブラウザーは作業の妨げではなく、作業を助けるツールであるべきです。", "featureTabs": { "workspaces": { diff --git a/src/pages/[...locale]/welcome.astro b/src/pages/[...locale]/welcome.astro index fdfd577..873ce11 100644 --- a/src/pages/[...locale]/welcome.astro +++ b/src/pages/[...locale]/welcome.astro @@ -15,9 +15,7 @@ const {