Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions src/components/pages/ChangelogPage.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -112,7 +113,7 @@ for (const e of entries) {
<span class="cl-prod" data-product={entry.product}>{name}</span>
<span class="cl-tagcell">
<a href={`#${entry.id}`} class="cl-tag" aria-label={`${c.linkTo} ${name} ${entry.tag}`}>{entry.tag}</a>
{english && <span class="cl-en" title={c.englishOnly}>EN</span>}
{otherLang && <span class="cl-en" title={c.otherLanguageOnly}>{otherLang === "en" ? "EN" : "中文"}</span>}
</span>
{entry.url ? (
<a href={entry.url} target="_blank" rel="noopener" class="cl-gh-link" aria-label={`${c.githubFull}: ${name} ${entry.tag}`}>
Expand Down
4 changes: 2 additions & 2 deletions src/i18n/pages/changelog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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" },
Expand Down Expand Up @@ -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" },
Expand Down
Loading