Skip to content

Commit

Permalink
Reorder the locales alphabetically and correct the name for Indonesian (
Browse files Browse the repository at this point in the history
  • Loading branch information
quiple authored Jan 11, 2024
1 parent 0b2daa7 commit 5cc4624
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion lingui.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/** @type {import('@lingui/conf').LinguiConfig} */
module.exports = {
locales: ['en', 'hi', 'ja', 'fr', 'de', 'es', 'ko', 'es', 'pt-BR', 'uk', 'id'],
locales: ['en', 'de', 'es', 'fr', 'hi', 'id', 'ja', 'ko', 'pt-BR', 'uk'],
catalogs: [
{
path: '<rootDir>/src/locale/locales/{locale}/messages',
Expand Down
4 changes: 2 additions & 2 deletions src/locale/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,14 @@ export function sanitizeAppLanguageSetting(appLanguage: string): AppLanguage {
// DISABLED until this translation is fixed -prf
// case 'de':
// return AppLanguage.de
case 'id':
return AppLanguage.id
case 'es':
return AppLanguage.es
case 'fr':
return AppLanguage.fr
case 'hi':
return AppLanguage.hi
case 'id':
return AppLanguage.id
case 'ja':
return AppLanguage.ja
case 'ko':
Expand Down
8 changes: 4 additions & 4 deletions src/locale/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@ export async function dynamicActivate(locale: AppLanguage) {
// i18n.loadAndActivate({locale, messages: messagesDe})
// break
// }
case AppLanguage.id: {
i18n.loadAndActivate({locale, messages: messagesId})
break
}
case AppLanguage.es: {
i18n.loadAndActivate({locale, messages: messagesEs})
break
Expand All @@ -43,6 +39,10 @@ export async function dynamicActivate(locale: AppLanguage) {
i18n.loadAndActivate({locale, messages: messagesHi})
break
}
case AppLanguage.id: {
i18n.loadAndActivate({locale, messages: messagesId})
break
}
case AppLanguage.ja: {
i18n.loadAndActivate({locale, messages: messagesJa})
break
Expand Down
8 changes: 4 additions & 4 deletions src/locale/i18n.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ export async function dynamicActivate(locale: AppLanguage) {
// mod = await import(`./locales/de/messages`)
// break
// }
case AppLanguage.id: {
mod = await import(`./locales/id/messages`)
break
}
case AppLanguage.es: {
mod = await import(`./locales/es/messages`)
break
Expand All @@ -33,6 +29,10 @@ export async function dynamicActivate(locale: AppLanguage) {
mod = await import(`./locales/hi/messages`)
break
}
case AppLanguage.id: {
mod = await import(`./locales/id/messages`)
break
}
case AppLanguage.ja: {
mod = await import(`./locales/ja/messages`)
break
Expand Down
4 changes: 2 additions & 2 deletions src/locale/languages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ export enum AppLanguage {
en = 'en',
// DISABLED until this translation is fixed -prf
// de = 'de',
id = 'id',
es = 'es',
fr = 'fr',
hi = 'hi',
id = 'id',
ja = 'ja',
ko = 'ko',
pt_BR = 'pt-BR',
Expand All @@ -27,10 +27,10 @@ export const APP_LANGUAGES: AppLanguageConfig[] = [
{code2: AppLanguage.en, name: 'English'},
// DISABLED until this translation is fixed -prf
// {code2: AppLanguage.de, name: 'Deutsch'},
{code2: AppLanguage.id, name: 'Indonesian'},
{code2: AppLanguage.es, name: 'Español'},
{code2: AppLanguage.fr, name: 'Français'},
{code2: AppLanguage.hi, name: 'हिंदी'},
{code2: AppLanguage.id, name: 'Bahasa Indonesia'},
{code2: AppLanguage.ja, name: '日本語'},
{code2: AppLanguage.ko, name: '한국어'},
{code2: AppLanguage.pt_BR, name: 'Português (BR)'},
Expand Down

0 comments on commit 5cc4624

Please sign in to comment.