Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

fix: `zh-Hans` i18n fails on page reload (#1092)

zqran590ff6ffa777
diff --git a/.github/workflows/languages-sync.yml b/.github/workflows/languages-sync.yml
index 3cacc35749..78630b7b4e 100644
--- a/.github/workflows/languages-sync.yml
+++ b/.github/workflows/languages-sync.yml
@@ -6,7 +6,7 @@ on:
paths:
- 'packages/i18n/**'
- '.github/workflows/languages-sync.yml'
- pull_request:
+ pull_request_target:
branches: ['master']
paths:
- 'packages/i18n/**'
diff --git a/packages/i18n/src/index.ts b/packages/i18n/src/index.ts
index bfb132ce0c..65dd561129 100644
--- a/packages/i18n/src/index.ts
+++ b/packages/i18n/src/index.ts
@@ -33,7 +33,7 @@ const resources = LOCALES.reduce<Resource>(
const fallbackLng = 'en';
const standardizeLocale = (language: string) => {
- if (language === 'zh-CN' || language === 'zh') {
+ if (language === 'zh-CN' || language === 'zh' || language === 'zh-Hans') {
language = 'zh-Hans';
} else if (language.slice(0, 2).toLowerCase() === 'zh') {
language = 'zh-Hant';