diff --git a/src/components/pages/ChangelogPage.astro b/src/components/pages/ChangelogPage.astro index 0aee89b..b895c91 100644 --- a/src/components/pages/ChangelogPage.astro +++ b/src/components/pages/ChangelogPage.astro @@ -97,8 +97,9 @@ for (const e of entries) { const published = notes ? undefined : entry.releaseNotes; const source = notes ?? published; const Content = source ? (await render(source)).Content : null; - // Core and Enterprise publish their notes in English only - const english = lang === "zh-CN" && published?.data.lang === "en"; + // Notes that exist only in the other language: Core's and Enterprise's are + // English only, and the first Lite releases have Chinese notes only + const otherLang = published && published.data.lang !== lang ? published.data.lang : undefined; // A release with notes opens in place to show them const Wrap = Content ? "details" : "div"; const Row = Content ? "summary" : "div"; @@ -112,7 +113,7 @@ for (const e of entries) { {name} {entry.tag} - {english && EN} + {otherLang && {otherLang === "en" ? "EN" : "中文"}} {entry.url ? ( diff --git a/src/i18n/pages/changelog.ts b/src/i18n/pages/changelog.ts index 313666d..85f9753 100644 --- a/src/i18n/pages/changelog.ts +++ b/src/i18n/pages/changelog.ts @@ -24,7 +24,7 @@ export const changelogCopy = { linkTo: "Link to", latest: "Latest releases", readNotes: "Read the notes", - englishOnly: "These notes are in English only", + otherLanguageOnly: "These notes are in Chinese only", dateLocale: "en-US", /** A release's date under its month */ dateFormat: { month: "short", day: "numeric" }, @@ -52,7 +52,7 @@ export const changelogCopy = { linkTo: "链接到", latest: "最新版本", readNotes: "查看说明", - englishOnly: "此版本的说明仅有英文", + otherLanguageOnly: "此版本的说明仅有英文", dateLocale: "zh-CN", dateFormat: { month: "long", day: "numeric" }, fullDateFormat: { year: "numeric", month: "long", day: "numeric" },