mirror of
https://github.com/toeverything/AFFiNE.git
synced 2024-11-10 17:46:05 +03:00
fix: zh-Hans
i18n fails on page reload (#1092)
Co-authored-by: himself65 <himself65@outlook.com>
This commit is contained in:
parent
25ac0f700b
commit
590ff6ffa7
2
.github/workflows/languages-sync.yml
vendored
2
.github/workflows/languages-sync.yml
vendored
@ -6,7 +6,7 @@ on:
|
||||
paths:
|
||||
- 'packages/i18n/**'
|
||||
- '.github/workflows/languages-sync.yml'
|
||||
pull_request:
|
||||
pull_request_target:
|
||||
branches: ['master']
|
||||
paths:
|
||||
- 'packages/i18n/**'
|
||||
|
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user