Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dutch translations #6244 #6329

Merged
merged 15 commits into from
Nov 24, 2024
1 change: 1 addition & 0 deletions lingui.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ module.exports = {
'it',
'ja',
'ko',
'nl',
'pt-BR',
'ru',
'th',
Expand Down
2 changes: 2 additions & 0 deletions src/components/hooks/dates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import {
it,
ja,
ko,
nl,
ptBR,
ru,
th,
Expand Down Expand Up @@ -53,6 +54,7 @@ const locales: Record<AppLanguage, Locale | undefined> = {
it,
ja,
ko,
nl,
['pt-BR']: ptBR,
ru,
th,
Expand Down
2 changes: 2 additions & 0 deletions src/locale/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ export function sanitizeAppLanguageSetting(appLanguage: string): AppLanguage {
return AppLanguage.ja
case 'ko':
return AppLanguage.ko
case 'nl':
return AppLanguage.nl
case 'pt-BR':
return AppLanguage.pt_BR
case 'ru':
Expand Down
9 changes: 9 additions & 0 deletions src/locale/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {messages as messagesId} from '#/locale/locales/id/messages'
import {messages as messagesIt} from '#/locale/locales/it/messages'
import {messages as messagesJa} from '#/locale/locales/ja/messages'
import {messages as messagesKo} from '#/locale/locales/ko/messages'
import {messages as messagesNl} from '#/locale/locales/nl/messages'
import {messages as messagesPt_BR} from '#/locale/locales/pt-BR/messages'
import {messages as messagesRu} from '#/locale/locales/ru/messages'
import {messages as messagesTh} from '#/locale/locales/th/messages'
Expand Down Expand Up @@ -144,6 +145,14 @@ export async function dynamicActivate(locale: AppLanguage) {
])
break
}
case AppLanguage.nl: {
i18n.loadAndActivate({locale, messages: messagesNl})
await Promise.all([
import('@formatjs/intl-pluralrules/locale-data/nl'),
import('@formatjs/intl-numberformat/locale-data/nl'),
])
break
pfrazee marked this conversation as resolved.
Show resolved Hide resolved
}
case AppLanguage.pt_BR: {
i18n.loadAndActivate({locale, messages: messagesPt_BR})
await Promise.all([
Expand Down
4 changes: 4 additions & 0 deletions src/locale/i18n.web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ export async function dynamicActivate(locale: AppLanguage) {
mod = await import(`./locales/ko/messages`)
break
}
case AppLanguage.nl: {
mod = await import(`./locales/nl/messages`)
break
}
case AppLanguage.pt_BR: {
mod = await import(`./locales/pt-BR/messages`)
break
Expand Down
2 changes: 2 additions & 0 deletions src/locale/languages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ export enum AppLanguage {
it = 'it',
ja = 'ja',
ko = 'ko',
nl = 'nl',
pt_BR = 'pt-BR',
ru = 'ru',
th = 'th',
Expand Down Expand Up @@ -49,6 +50,7 @@ export const APP_LANGUAGES: AppLanguageConfig[] = [
{code2: AppLanguage.it, name: 'Italiano – Italian'},
{code2: AppLanguage.ja, name: '日本語 – Japanese'},
{code2: AppLanguage.ko, name: '한국어 – Korean'},
{code2: AppLanguage.nl, name: 'Nederlands – Dutch'},
{code2: AppLanguage.pt_BR, name: 'Português (BR) – Portuguese (BR)'},
{code2: AppLanguage.ru, name: 'Русский – Russian'},
{code2: AppLanguage.th, name: 'ภาษาไทย – Thai'},
Expand Down
Loading