Added Galician language localization (#6463)

* Update languages.ts

added galician language

* Update i18n.web.ts

added import of galician translations file

* Update i18n.ts

added galician language

* Update helpers.ts

added galician to sanitizeLanguage function

* galician messages

First commit

* Second commit

* Third commit

* fourth commit

* fifth commit

* Update lingui.config.js

change to make available Galician language

* galician translation by Carlos Vieito and Alexandre Espinosa

---------

Co-authored-by: Alexandre Espinosa Menor <aemenor@gmail.com>
This commit is contained in:
xurxogp
2024-11-24 00:54:59 +01:00
committed by GitHub
parent af4db872b5
commit 7e7910edf7
7 changed files with 9577 additions and 0 deletions
+1
View File
@@ -9,6 +9,7 @@ module.exports = {
'fi',
'fr',
'ga',
'gl',
'hi',
'hu',
'id',
+2
View File
@@ -16,6 +16,7 @@ import {
es,
fi,
fr,
gl,
hi,
hu,
id,
@@ -49,6 +50,7 @@ const locales: Record<AppLanguage, Locale | undefined> = {
fi,
fr,
ga: undefined,
gl,
hi,
hu,
id,
+2
View File
@@ -133,6 +133,8 @@ export function sanitizeAppLanguageSetting(appLanguage: string): AppLanguage {
return AppLanguage.fr
case 'ga':
return AppLanguage.ga
case 'gl':
return AppLanguage.gl
case 'hi':
return AppLanguage.hi
case 'hu':
+9
View File
@@ -19,6 +19,7 @@ import {messages as messagesEs} from '#/locale/locales/es/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'
import {messages as messagesGl} from '#/locale/locales/gl/messages'
import {messages as messagesHi} from '#/locale/locales/hi/messages'
import {messages as messagesHu} from '#/locale/locales/hu/messages'
import {messages as messagesId} from '#/locale/locales/id/messages'
@@ -98,6 +99,14 @@ export async function dynamicActivate(locale: AppLanguage) {
])
break
}
case AppLanguage.gl: {
i18n.loadAndActivate({locale, messages: messagesGl})
await Promise.all([
import('@formatjs/intl-pluralrules/locale-data/gl'),
import('@formatjs/intl-numberformat/locale-data/gl'),
])
break
}
case AppLanguage.hi: {
i18n.loadAndActivate({locale, messages: messagesHi})
await Promise.all([
+4
View File
@@ -40,6 +40,10 @@ export async function dynamicActivate(locale: AppLanguage) {
mod = await import(`./locales/ga/messages`)
break
}
case AppLanguage.gl: {
mod = await import(`./locales/gl/messages`)
break
}
case AppLanguage.hi: {
mod = await import(`./locales/hi/messages`)
break
+2
View File
@@ -13,6 +13,7 @@ export enum AppLanguage {
fi = 'fi',
fr = 'fr',
ga = 'ga',
gl = 'gl',
hi = 'hi',
hu = 'hu',
id = 'id',
@@ -45,6 +46,7 @@ export const APP_LANGUAGES: AppLanguageConfig[] = [
{code2: AppLanguage.fi, name: 'Suomi Finnish'},
{code2: AppLanguage.fr, name: 'Français French'},
{code2: AppLanguage.ga, name: 'Gaeilge Irish'},
{code2: AppLanguage.gl, name: 'Galego - Galician'},
{code2: AppLanguage.hi, name: 'हिंदी Hindi'},
{code2: AppLanguage.hu, name: 'magyar Hungarian'},
{code2: AppLanguage.id, name: 'Bahasa Indonesia Indonesian'},
File diff suppressed because it is too large Load Diff