Nepali Translation (divyaswormakai's reviewed & some changes) (#7033)

* feat: prepare necesaary files

* fix: message file for nepali translation

* feat: language file update

* feat: add missing pieces

* feat: one and other updates

* additional changes

---------

Co-authored-by: Divyaswor Makai <makaidivya@gmail.com>
This commit is contained in:
Ankit Bhandari
2024-12-19 05:19:50 +05:45
committed by GitHub
parent 0e7ad19830
commit bdae89b67b
9 changed files with 9109 additions and 0 deletions
+1
View File
@@ -90,6 +90,7 @@ module.exports = function (config) {
'km',
'ko',
'nl',
'np',
'pl',
'pt-BR',
'ro',
+1
View File
@@ -20,6 +20,7 @@ module.exports = {
'km',
'ko',
'nl',
'np',
'pl',
'pt-BR',
'ro',
+1
View File
@@ -64,6 +64,7 @@ const locales: Record<AppLanguage, Locale | undefined> = {
km,
ko,
nl,
np: undefined,
pl,
['pt-BR']: ptBR,
ro,
+1
View File
@@ -12,4 +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)
})
+2
View File
@@ -155,6 +155,8 @@ export function sanitizeAppLanguageSetting(appLanguage: string): AppLanguage {
return AppLanguage.ko
case 'nl':
return AppLanguage.nl
case 'np':
return AppLanguage.np
case 'pl':
return AppLanguage.pl
case 'pt-BR':
+5
View File
@@ -32,6 +32,7 @@ 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 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'
@@ -213,6 +214,10 @@ 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([
+4
View File
@@ -84,6 +84,10 @@ export async function dynamicActivate(locale: AppLanguage) {
mod = await import(`./locales/nl/messages`)
break
}
case AppLanguage.np: {
mod = await import(`./locales/np/messages`)
break
}
case AppLanguage.pl: {
mod = await import(`./locales/pl/messages`)
break
+2
View File
@@ -24,6 +24,7 @@ export enum AppLanguage {
km = 'km',
ko = 'ko',
nl = 'nl',
np = 'np',
pl = 'pl',
pt_BR = 'pt-BR',
ro = 'ro',
@@ -62,6 +63,7 @@ export const APP_LANGUAGES: AppLanguageConfig[] = [
{code2: AppLanguage.km, name: 'ភាសាខ្មែរ Khmer'},
{code2: AppLanguage.ko, name: '한국어 Korean'},
{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'},
File diff suppressed because it is too large Load Diff