Skip to content

Commit

Permalink
Add Basque language ('eu') (#7479)
Browse files Browse the repository at this point in the history
* Add Basque language

* Contributor's changes
  • Loading branch information
REALSOULMAN authored Jan 24, 2025
1 parent 4703f32 commit 24afc9c
Show file tree
Hide file tree
Showing 8 changed files with 8,016 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 @@ -78,6 +78,7 @@ module.exports = function (config) {
'de',
'el',
'es',
'eu',
'fi',
'fr',
'ga',
Expand Down
1 change: 1 addition & 0 deletions lingui.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ module.exports = {
'el',
'en-GB',
'es',
'eu',
'fi',
'fr',
'ga',
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 @@ -15,6 +15,7 @@ import {
el,
enGB,
es,
eu,
fi,
fr,
gl,
Expand Down Expand Up @@ -54,6 +55,7 @@ const locales: Record<AppLanguage, Locale | undefined> = {
el,
['en-GB']: enGB,
es,
eu,
fi,
fr,
ga: undefined,
Expand Down
2 changes: 2 additions & 0 deletions src/locale/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ export function sanitizeAppLanguageSetting(appLanguage: string): AppLanguage {
return AppLanguage.en_GB
case 'es':
return AppLanguage.es
case 'eu':
return AppLanguage.eu
case 'fi':
return AppLanguage.fi
case 'fr':
Expand Down
9 changes: 9 additions & 0 deletions src/locale/i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import {messages as messagesEl} from '#/locale/locales/el/messages'
import {messages as messagesEn} from '#/locale/locales/en/messages'
import {messages as messagesEn_GB} from '#/locale/locales/en-GB/messages'
import {messages as messagesEs} from '#/locale/locales/es/messages'
import {messages as messagesEu} from '#/locale/locales/eu/messages'
import {messages as messagesFi} from '#/locale/locales/fi/messages'
import {messages as messagesFr} from '#/locale/locales/fr/messages'
import {messages as messagesGa} from '#/locale/locales/ga/messages'
Expand Down Expand Up @@ -106,6 +107,14 @@ export async function dynamicActivate(locale: AppLanguage) {
])
break
}
case AppLanguage.eu: {
i18n.loadAndActivate({locale, messages: messagesEu})
await Promise.all([
import('@formatjs/intl-pluralrules/locale-data/eu'),
import('@formatjs/intl-numberformat/locale-data/eu'),
])
break
}
case AppLanguage.fi: {
i18n.loadAndActivate({locale, messages: messagesFi})
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 @@ -40,6 +40,10 @@ export async function dynamicActivate(locale: AppLanguage) {
mod = await import(`./locales/es/messages`)
break
}
case AppLanguage.eu: {
mod = await import(`./locales/eu/messages`)
break
}
case AppLanguage.fi: {
mod = await import(`./locales/fi/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 @@ -13,6 +13,7 @@ export enum AppLanguage {
el = 'el',
en_GB = 'en-GB',
es = 'es',
eu = 'eu',
fi = 'fi',
fr = 'fr',
ga = 'ga',
Expand Down Expand Up @@ -53,6 +54,7 @@ export const APP_LANGUAGES: AppLanguageConfig[] = [
{code2: AppLanguage.el, name: 'Ελληνικά – Greek'},
{code2: AppLanguage.en_GB, name: 'English (UK)'},
{code2: AppLanguage.es, name: 'Español – Spanish'},
{code2: AppLanguage.eu, name: 'Euskera – Basque'},
{code2: AppLanguage.fi, name: 'Suomi – Finnish'},
{code2: AppLanguage.fr, name: 'Français – French'},
{code2: AppLanguage.ga, name: 'Gaeilge – Irish'},
Expand Down
Loading

0 comments on commit 24afc9c

Please sign in to comment.