Use BCP-47 language codes for i18n resource files
Lingui expects the codes to be compliant to BCP-47 while weblate was not set up to create the resource files in that format. And react-i18next was able to just handle them. fixes #1058
This commit is contained in:
@@ -30,8 +30,8 @@ export default defineConfig({
|
|||||||
'ta',
|
'ta',
|
||||||
'tr',
|
'tr',
|
||||||
'vi',
|
'vi',
|
||||||
'zh_Hans',
|
'zh-Hans',
|
||||||
'zh_Hant',
|
'zh-Hant',
|
||||||
],
|
],
|
||||||
catalogs: [
|
catalogs: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,11 +35,11 @@ export const IsoLanguages: { [languageCode in I18nResourceCode]: ISOLanguage } &
|
|||||||
},
|
},
|
||||||
'pt-br': PT_BR,
|
'pt-br': PT_BR,
|
||||||
'pt-BR': PT_BR,
|
'pt-BR': PT_BR,
|
||||||
zh_Hans: {
|
'zh-Hans': {
|
||||||
name: 'Chinese (Simplified)',
|
name: 'Chinese (Simplified)',
|
||||||
nativeName: '中文 (HANS)',
|
nativeName: '中文 (HANS)',
|
||||||
},
|
},
|
||||||
zh_Hant: {
|
'zh-Hant': {
|
||||||
name: 'Chinese (Traditional)',
|
name: 'Chinese (Traditional)',
|
||||||
nativeName: '中文 (HANT)',
|
nativeName: '中文 (HANT)',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -34,8 +34,8 @@ export const i18nResources = [
|
|||||||
'ta',
|
'ta',
|
||||||
'tr',
|
'tr',
|
||||||
'vi',
|
'vi',
|
||||||
'zh_Hans',
|
'zh-Hans',
|
||||||
'zh_Hant',
|
'zh-Hant',
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
export type I18nResourceCode = (typeof i18nResources)[number];
|
export type I18nResourceCode = (typeof i18nResources)[number];
|
||||||
|
|||||||
Reference in New Issue
Block a user