Add language: Scottish Gaelic (#7864)

* 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:56:13 +00:00
committed by GitHub
parent d0c2003cc7
commit a42efd15d7
8 changed files with 34 additions and 0 deletions
+1
View File
@@ -84,6 +84,7 @@ module.exports = function (config) {
'fi',
'fr',
'ga',
'gd',
'gl',
'hi',
'hu',
+1
View File
@@ -15,6 +15,7 @@ module.exports = {
'fi',
'fr',
'ga',
'gd',
'gl',
'hi',
'hu',
+2
View File
@@ -20,6 +20,7 @@ import {
eu,
fi,
fr,
gd,
gl,
hi,
hu,
@@ -64,6 +65,7 @@ const locales: Record<AppLanguage, Locale | undefined> = {
fi,
fr,
ga: undefined,
gd,
gl,
hi,
hu,
+2
View File
@@ -181,6 +181,8 @@ export function sanitizeAppLanguageSetting(appLanguage: string): AppLanguage {
return AppLanguage.fr
case 'ga':
return AppLanguage.ga
case 'gd':
return AppLanguage.gd
case 'gl':
return AppLanguage.gl
case 'hi':
+9
View File
@@ -25,6 +25,7 @@ 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'
import {messages as messagesGd} from '#/locale/locales/gd/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'
@@ -159,6 +160,14 @@ export async function dynamicActivate(locale: AppLanguage) {
])
break
}
case AppLanguage.gd: {
i18n.loadAndActivate({locale, messages: messagesGd})
await Promise.all([
import('@formatjs/intl-pluralrules/locale-data/gd'),
import('@formatjs/intl-numberformat/locale-data/gd'),
])
break
}
case AppLanguage.gl: {
i18n.loadAndActivate({locale, messages: messagesGl})
await Promise.all([
+4
View File
@@ -64,6 +64,10 @@ export async function dynamicActivate(locale: AppLanguage) {
mod = await import(`./locales/ga/messages`)
break
}
case AppLanguage.gd: {
mod = await import(`./locales/gd/messages`)
break
}
case AppLanguage.gl: {
mod = await import(`./locales/gl/messages`)
break
+2
View File
@@ -19,6 +19,7 @@ export enum AppLanguage {
fi = 'fi',
fr = 'fr',
ga = 'ga',
gd = 'gd',
gl = 'gl',
hi = 'hi',
hu = 'hu',
@@ -64,6 +65,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.gd, name: 'Gàidhlig Scottish Gaelic'},
{code2: AppLanguage.gl, name: 'Galego Galician'},
{code2: AppLanguage.hi, name: 'हिंदी Hindi'},
{code2: AppLanguage.hu, name: 'magyar Hungarian'},
+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: gd\n"
"Project-Id-Version: bluesky-social\n"
"Report-Msgid-Bugs-To: \n"
"PO-Revision-Date: \n"
"Last-Translator: \n"
"Language-Team: Scottish Gaelic\n"