fix: unify chinese language code as zh-CN

This commit is contained in:
TerryM
2026-05-26 10:03:12 +08:00
parent f2e97c329e
commit f482a2ec38
13 changed files with 53 additions and 50 deletions

View File

@@ -35,10 +35,10 @@ function dayLabel(iso: string, lang: string): string {
a.getMonth() === b.getMonth() &&
a.getDate() === b.getDate();
if (isSameDay(d, today)) {
return lang === "zh" ? "今天" : "Today";
return lang === "zh-CN" ? "今天" : "Today";
}
if (isSameDay(d, yesterday)) {
return lang === "zh" ? "昨天" : "Yesterday";
return lang === "zh-CN" ? "昨天" : "Yesterday";
}
return new Intl.DateTimeFormat(localeFor(lang), {
month: "long",