diff options
author | Minseo Lee <itoupluk427@gmail.com> | 2024-01-11 16:07:47 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-10 23:07:47 -0800 |
commit | 5cc46241d75ecbd462f1b69a42d6d923dadf6d28 (patch) | |
tree | 8555b2bf682fd5132d227bb4c53446e910abe5cc | |
parent | 0b2daa787cc6ee7c9fe597aee8ccf9168bada7e7 (diff) | |
download | voidsky-5cc46241d75ecbd462f1b69a42d6d923dadf6d28.tar.zst |
Reorder the locales alphabetically and correct the name for Indonesian (#2483)
-rw-r--r-- | lingui.config.js | 2 | ||||
-rw-r--r-- | src/locale/helpers.ts | 4 | ||||
-rw-r--r-- | src/locale/i18n.ts | 8 | ||||
-rw-r--r-- | src/locale/i18n.web.ts | 8 | ||||
-rw-r--r-- | src/locale/languages.ts | 4 |
5 files changed, 13 insertions, 13 deletions
diff --git a/lingui.config.js b/lingui.config.js index 8b4893835..882c48774 100644 --- a/lingui.config.js +++ b/lingui.config.js @@ -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', diff --git a/src/locale/helpers.ts b/src/locale/helpers.ts index 197fe3886..433dbaec6 100644 --- a/src/locale/helpers.ts +++ b/src/locale/helpers.ts @@ -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': diff --git a/src/locale/i18n.ts b/src/locale/i18n.ts index 327a035c1..88ae10b62 100644 --- a/src/locale/i18n.ts +++ b/src/locale/i18n.ts @@ -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 @@ -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 diff --git a/src/locale/i18n.web.ts b/src/locale/i18n.web.ts index ec7ae824a..819f58eb7 100644 --- a/src/locale/i18n.web.ts +++ b/src/locale/i18n.web.ts @@ -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 @@ -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 diff --git a/src/locale/languages.ts b/src/locale/languages.ts index cacd144f1..c6799816c 100644 --- a/src/locale/languages.ts +++ b/src/locale/languages.ts @@ -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', @@ -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)'}, |