Skip to content

Commit

Permalink
Romanian localization (#6456)
Browse files Browse the repository at this point in the history
* Empty

* First pass

* More colloquial Romanian

* Add Romanian lanaguage

* Romanian specfic plural with 3 variants

* Adjustments

* Chat > Conversație

* Keep code alphabetical order

* Update messages.po

* Add 'ro' to app.config.js

* Regenerate and finish RO

* Update messages.po

* Fixing a previous wrong conflict resolution

* Adapt after #6742

Co-authored-by: surfdude29 <[email protected]>

---------

Co-authored-by: Alex <[email protected]>
Co-authored-by: surfdude29 <[email protected]>
  • Loading branch information
3 people authored Dec 18, 2024
1 parent 2d1a5e7 commit afd338b
Show file tree
Hide file tree
Showing 8 changed files with 8,634 additions and 0 deletions.
1 change: 1 addition & 0 deletions app.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,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 @@ -33,6 +33,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 @@ -219,6 +220,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'),
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'},
{code2: AppLanguage.ru, name: 'Русский – Russian'},
{code2: AppLanguage.th, name: 'ภาษาไทย – Thai'},
{code2: AppLanguage.tr, name: 'Türkçe – Turkish'},
Expand Down
Loading

0 comments on commit afd338b

Please sign in to comment.