Add language: Esperanto (#7863)

* Create messages.po

* Update app.config.js

* Update lingui.config.js

* Update dates.ts

* Update helpers.ts

* Update i18n.ts

* Update i18n.web.ts

* Update languages.ts
This commit is contained in:
surfdude29
2025-03-05 23:57:09 +00:00
committed by GitHub
parent a42efd15d7
commit dae152da85
8 changed files with 34 additions and 0 deletions
+1
View File
@@ -79,6 +79,7 @@ module.exports = function (config) {
'da',
'de',
'el',
'eo',
'es',
'eu',
'fi',
+1
View File
@@ -10,6 +10,7 @@ module.exports = {
'de',
'el',
'en-GB',
'eo',
'es',
'eu',
'fi',
+2
View File
@@ -16,6 +16,7 @@ import {
de,
el,
enGB,
eo,
es,
eu,
fi,
@@ -60,6 +61,7 @@ const locales: Record<AppLanguage, Locale | undefined> = {
de,
el,
['en-GB']: enGB,
eo,
es,
eu,
fi,
+2
View File
@@ -171,6 +171,8 @@ export function sanitizeAppLanguageSetting(appLanguage: string): AppLanguage {
return AppLanguage.el
case 'en-GB':
return AppLanguage.en_GB
case 'eo':
return AppLanguage.eo
case 'es':
return AppLanguage.es
case 'eu':
+9
View File
@@ -20,6 +20,7 @@ import {messages as messagesDe} from '#/locale/locales/de/messages'
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 messagesEo} from '#/locale/locales/eo/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'
@@ -120,6 +121,14 @@ export async function dynamicActivate(locale: AppLanguage) {
])
break
}
case AppLanguage.eo: {
i18n.loadAndActivate({locale, messages: messagesEo})
await Promise.all([
import('@formatjs/intl-pluralrules/locale-data/eo'),
import('@formatjs/intl-numberformat/locale-data/eo'),
])
break
}
case AppLanguage.es: {
i18n.loadAndActivate({locale, messages: messagesEs})
await Promise.all([
+4
View File
@@ -44,6 +44,10 @@ export async function dynamicActivate(locale: AppLanguage) {
mod = await import(`./locales/en-GB/messages`)
break
}
case AppLanguage.eo: {
mod = await import(`./locales/eo/messages`)
break
}
case AppLanguage.es: {
mod = await import(`./locales/es/messages`)
break
+2
View File
@@ -14,6 +14,7 @@ export enum AppLanguage {
de = 'de',
el = 'el',
en_GB = 'en-GB',
eo = 'eo',
es = 'es',
eu = 'eu',
fi = 'fi',
@@ -60,6 +61,7 @@ export const APP_LANGUAGES: AppLanguageConfig[] = [
{code2: AppLanguage.de, name: 'Deutsch German'},
{code2: AppLanguage.el, name: 'Ελληνικά Greek'},
{code2: AppLanguage.en_GB, name: 'English (UK)'},
{code2: AppLanguage.eo, name: 'Esperanto'},
{code2: AppLanguage.es, name: 'Español Spanish'},
{code2: AppLanguage.eu, name: 'Euskera Basque'},
{code2: AppLanguage.fi, name: 'Suomi Finnish'},
+13
View File
@@ -0,0 +1,13 @@
msgid ""
msgstr ""
"POT-Creation-Date: 2023-11-05 16:01-0800\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: @lingui/cli\n"
"Language: eo\n"
"Project-Id-Version: bluesky-social\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: Esperanto\n"