diff --git a/app.config.js b/app.config.js index 1461b7b885..404f02ddef 100644 --- a/app.config.js +++ b/app.config.js @@ -89,8 +89,8 @@ module.exports = function (config) { 'ja', 'km', 'ko', + 'ne', 'nl', - 'np', 'pl', 'pt-BR', 'ro', diff --git a/lingui.config.js b/lingui.config.js index da43e35615..fb81e5d9ec 100644 --- a/lingui.config.js +++ b/lingui.config.js @@ -19,8 +19,8 @@ module.exports = { 'ja', 'km', 'ko', + 'ne', 'nl', - 'np', 'pl', 'pt-BR', 'ro', diff --git a/src/components/hooks/dates.ts b/src/components/hooks/dates.ts index a1967316cd..06b2d685f3 100644 --- a/src/components/hooks/dates.ts +++ b/src/components/hooks/dates.ts @@ -63,8 +63,8 @@ const locales: Record = { ja, km, ko, + ne: undefined, nl, - np: undefined, pl, ['pt-BR']: ptBR, ro, diff --git a/src/locale/__tests__/helpers.test.ts b/src/locale/__tests__/helpers.test.ts index f10ac71d79..f4a3d1b5fa 100644 --- a/src/locale/__tests__/helpers.test.ts +++ b/src/locale/__tests__/helpers.test.ts @@ -12,5 +12,5 @@ test('sanitizeAppLanguageSetting', () => { expect(sanitizeAppLanguageSetting('en,foo')).toBe(AppLanguage.en) expect(sanitizeAppLanguageSetting('foo,en')).toBe(AppLanguage.en) expect(sanitizeAppLanguageSetting('vi')).toBe(AppLanguage.vi) - expect(sanitizeAppLanguageSetting('np')).toBe(AppLanguage.np) + expect(sanitizeAppLanguageSetting('ne')).toBe(AppLanguage.ne) }) diff --git a/src/locale/helpers.ts b/src/locale/helpers.ts index ed31faa498..9c57268fd4 100644 --- a/src/locale/helpers.ts +++ b/src/locale/helpers.ts @@ -153,10 +153,10 @@ export function sanitizeAppLanguageSetting(appLanguage: string): AppLanguage { return AppLanguage.km case 'ko': return AppLanguage.ko + case 'ne': + return AppLanguage.ne case 'nl': return AppLanguage.nl - case 'np': - return AppLanguage.np case 'pl': return AppLanguage.pl case 'pt-BR': diff --git a/src/locale/i18n.ts b/src/locale/i18n.ts index 167e36d354..e59a59f6e4 100644 --- a/src/locale/i18n.ts +++ b/src/locale/i18n.ts @@ -29,8 +29,8 @@ import {messages as messagesIt} from '#/locale/locales/it/messages' import {messages as messagesJa} from '#/locale/locales/ja/messages' import {messages as messagesKm} from '#/locale/locales/km/messages' import {messages as messagesKo} from '#/locale/locales/ko/messages' +import {messages as messagesNe} from '#/locale/locales/ne/messages' import {messages as messagesNl} from '#/locale/locales/nl/messages' -import {messages as messagesNp} from '#/locale/locales/np/messages' import {messages as messagesPl} from '#/locale/locales/pl/messages' import {messages as messagesPt_BR} from '#/locale/locales/pt-BR/messages' import {messages as messagesRo} from '#/locale/locales/ro/messages' @@ -185,6 +185,10 @@ export async function dynamicActivate(locale: AppLanguage) { ]) break } + case AppLanguage.ne: { + i18n.loadAndActivate({locale, messages: messagesNe}) + break + } case AppLanguage.nl: { i18n.loadAndActivate({locale, messages: messagesNl}) await Promise.all([ @@ -193,10 +197,6 @@ export async function dynamicActivate(locale: AppLanguage) { ]) break } - case AppLanguage.np: { - i18n.loadAndActivate({locale, messages: messagesNp}) - break - } case AppLanguage.pl: { i18n.loadAndActivate({locale, messages: messagesPl}) await Promise.all([ diff --git a/src/locale/i18n.web.ts b/src/locale/i18n.web.ts index 83e4acce08..ac32a54728 100644 --- a/src/locale/i18n.web.ts +++ b/src/locale/i18n.web.ts @@ -80,12 +80,12 @@ export async function dynamicActivate(locale: AppLanguage) { mod = await import(`./locales/ko/messages`) break } - case AppLanguage.nl: { - mod = await import(`./locales/nl/messages`) + case AppLanguage.ne: { + mod = await import(`./locales/ne/messages`) break } - case AppLanguage.np: { - mod = await import(`./locales/np/messages`) + case AppLanguage.nl: { + mod = await import(`./locales/nl/messages`) break } case AppLanguage.pl: { diff --git a/src/locale/languages.ts b/src/locale/languages.ts index 6bd0c7f64e..6848920372 100644 --- a/src/locale/languages.ts +++ b/src/locale/languages.ts @@ -23,8 +23,8 @@ export enum AppLanguage { ja = 'ja', km = 'km', ko = 'ko', + ne = 'ne', nl = 'nl', - np = 'np', pl = 'pl', pt_BR = 'pt-BR', ro = 'ro', @@ -62,8 +62,8 @@ export const APP_LANGUAGES: AppLanguageConfig[] = [ {code2: AppLanguage.ja, name: '日本語 – Japanese'}, {code2: AppLanguage.km, name: 'ភាសាខ្មែរ – Khmer'}, {code2: AppLanguage.ko, name: '한국어 – Korean'}, + {code2: AppLanguage.ne, name: 'नेपाली – Nepali'}, {code2: AppLanguage.nl, name: 'Nederlands – Dutch'}, - {code2: AppLanguage.np, name: 'नेपाली – Nepali'}, {code2: AppLanguage.pl, name: 'Polski – Polish'}, {code2: AppLanguage.pt_BR, name: 'Português (BR) – Portuguese (BR)'}, {code2: AppLanguage.ro, name: 'Română – Romanian'}, diff --git a/src/locale/locales/np/messages.po b/src/locale/locales/ne/messages.po similarity index 99% rename from src/locale/locales/np/messages.po rename to src/locale/locales/ne/messages.po index c6317b16b9..1f8eabf368 100644 --- a/src/locale/locales/np/messages.po +++ b/src/locale/locales/ne/messages.po @@ -5,7 +5,7 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: @lingui/cli\n" -"Language: np\n" +"Language: ne\n" "Project-Id-Version: Nepali localization for bluesky-social-app\n" "Report-Msgid-Bugs-To: Divyaswor Makai Shrestha \n" "PO-Revision-Date: \n"