Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ module.exports = function (config) {
'nl',
'pl',
'pt-BR',
'ro',
'ru',
'th',
'tr',
Expand Down
1 change: 1 addition & 0 deletions lingui.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ module.exports = {
'nl',
'pl',
'pt-BR',
'ro',
'ru',
'th',
'tr',
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 @@ -26,6 +26,7 @@ import {
nl,
pl,
ptBR,
ro,
ru,
th,
tr,
Expand Down Expand Up @@ -63,6 +64,7 @@ const locales: Record<AppLanguage, Locale | undefined> = {
nl,
pl,
['pt-BR']: ptBR,
ro,
ru,
th,
tr,
Expand Down
2 changes: 2 additions & 0 deletions src/locale/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,8 @@ export function sanitizeAppLanguageSetting(appLanguage: string): AppLanguage {
return AppLanguage.pl
case 'pt-BR':
return AppLanguage.pt_BR
case 'ro':
return AppLanguage.ro
case 'ru':
return AppLanguage.ru
case 'th':
Expand Down
10 changes: 10 additions & 0 deletions src/locale/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import {messages as messagesKo} from '#/locale/locales/ko/messages'
import {messages as messagesNl} from '#/locale/locales/nl/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'
import {messages as messagesRu} from '#/locale/locales/ru/messages'
import {messages as messagesTh} from '#/locale/locales/th/messages'
import {messages as messagesTr} from '#/locale/locales/tr/messages'
Expand Down Expand Up @@ -198,6 +199,15 @@ export async function dynamicActivate(locale: AppLanguage) {
])
break
}
case AppLanguage.ro: {
i18n.loadAndActivate({locale, messages: messagesRo})
await Promise.all([
import('@formatjs/intl-datetimeformat/locale-data/ro'),
import('@formatjs/intl-pluralrules/locale-data/ro'),
Comment thread
claudiu-cristea marked this conversation as resolved.
import('@formatjs/intl-numberformat/locale-data/ro'),
])
break
}
case AppLanguage.ru: {
i18n.loadAndActivate({locale, messages: messagesRu})
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 @@ -88,6 +88,10 @@ export async function dynamicActivate(locale: AppLanguage) {
mod = await import(`./locales/pt-BR/messages`)
break
}
case AppLanguage.ro: {
mod = await import(`./locales/ro/messages`)
break
}
case AppLanguage.ru: {
mod = await import(`./locales/ru/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 @@ -25,6 +25,7 @@ export enum AppLanguage {
nl = 'nl',
pl = 'pl',
pt_BR = 'pt-BR',
ro = 'ro',
ru = 'ru',
th = 'th',
tr = 'tr',
Expand Down Expand Up @@ -61,6 +62,7 @@ export const APP_LANGUAGES: AppLanguageConfig[] = [
{code2: AppLanguage.nl, name: 'Nederlands – Dutch'},
{code2: AppLanguage.pl, name: 'Polski – Polish'},
{code2: AppLanguage.pt_BR, name: 'Português (BR) – Portuguese (BR)'},
{code2: AppLanguage.ro, name: 'Română – Romanian'},

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a tiny suggested tweak here: would it be possible to keep the languages in alphabetical order by code2 and put the Romanian entry above the Russian one?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed. Thanks

{code2: AppLanguage.ru, name: 'Русский – Russian'},
{code2: AppLanguage.th, name: 'ภาษาไทย – Thai'},
{code2: AppLanguage.tr, name: 'Türkçe – Turkish'},
Expand Down
Loading