feat(docs): allow edit any locale file (#2099)
This commit is contained in:
parent
f635e0a634
commit
69f9004917
5 changed files with 42 additions and 13 deletions
|
@ -9,12 +9,12 @@ interface LocaleObjectData extends LocaleObject {
|
|||
pluralRule?: PluralizationRule
|
||||
}
|
||||
|
||||
const countryLocaleVariants: Record<string, LocaleObjectData[]> = {
|
||||
export const countryLocaleVariants: Record<string, (LocaleObjectData & { country?: boolean }) []> = {
|
||||
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<string, LocaleObjectData[]> = {
|
|||
],
|
||||
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<string, LocaleObjectData[]> = {
|
|||
// { 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<string, LocaleObjectData[]> = {
|
|||
],
|
||||
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)' },
|
||||
],
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue