diff --git a/config/i18n.ts b/config/i18n.ts index 1a85104e..2b6f0374 100644 --- a/config/i18n.ts +++ b/config/i18n.ts @@ -9,12 +9,12 @@ interface LocaleObjectData extends LocaleObject { pluralRule?: PluralizationRule } -const countryLocaleVariants: Record = { +export const countryLocaleVariants: Record = { ar: [ // ar.json contains ar-EG translations // { code: 'ar-DZ', name: 'Arabic (Algeria)' }, // { code: 'ar-BH', name: 'Arabic (Bahrain)' }, - { code: 'ar-EG', name: 'العربية' }, + { country: true, code: 'ar-EG', name: 'العربية' }, // { code: 'ar-EG', name: 'Arabic (Egypt)' }, // { code: 'ar-IQ', name: 'Arabic (Iraq)' }, // { code: 'ar-JO', name: 'Arabic (Jordan)' }, @@ -32,13 +32,13 @@ const countryLocaleVariants: Record = { ], en: [ // en.json contains en-US translations - { code: 'en-US', name: 'English (US)' }, + { country: true, code: 'en-US', name: 'English (US)' }, { code: 'en-GB', name: 'English (UK)' }, ], ca: [ // ca.json contains ca-ES translations // { code: 'ca-AD', name: 'Català (Andorra)' }, - { code: 'ca-ES', name: 'Català (Espanya)' }, + { country: true, code: 'ca-ES', name: 'Català (Espanya)' }, { code: 'ca-valencia', name: 'Català (valencià)' }, // { code: 'ca-FR', name: 'Català (França)' }, // { code: 'ca-IT', name: 'Català (Itàlia)' }, @@ -52,7 +52,7 @@ const countryLocaleVariants: Record = { // { code: 'es-CR', name: 'Español (Costa Rica)' }, // { code: 'es-DO', name: 'Español (República Dominicana)' }, // { code: 'es-EC', name: 'Español (Ecuador)' }, - { code: 'es-ES', name: 'Español (España)' }, + { country: true, code: 'es-ES', name: 'Español (España)' }, // TODO: Support es-419, if we include spanish country variants remove also fix on utils/language.ts module { code: 'es-419', name: 'Español (Latinoamérica)' }, // { code: 'es-GT', name: 'Español (Guatemala)' }, @@ -69,7 +69,7 @@ const countryLocaleVariants: Record = { ], pt: [ // pt.json contains pt-PT translations - { code: 'pt-PT', name: 'Português (Portugal)' }, + { country: true, code: 'pt-PT', name: 'Português (Portugal)' }, { code: 'pt-BR', name: 'Português (Brasil)' }, ], } diff --git a/docs/components/global/TranslationState.vue b/docs/components/global/TranslationState.vue index 2f2e7e34..4620c95e 100644 --- a/docs/components/global/TranslationState.vue +++ b/docs/components/global/TranslationState.vue @@ -107,7 +107,7 @@ async function copyToClipboard() { -