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:
@@ -84,6 +84,7 @@ module.exports = function (config) {
|
|||||||
'fi',
|
'fi',
|
||||||
'fr',
|
'fr',
|
||||||
'ga',
|
'ga',
|
||||||
|
'gd',
|
||||||
'gl',
|
'gl',
|
||||||
'hi',
|
'hi',
|
||||||
'hu',
|
'hu',
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ module.exports = {
|
|||||||
'fi',
|
'fi',
|
||||||
'fr',
|
'fr',
|
||||||
'ga',
|
'ga',
|
||||||
|
'gd',
|
||||||
'gl',
|
'gl',
|
||||||
'hi',
|
'hi',
|
||||||
'hu',
|
'hu',
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import {
|
|||||||
eu,
|
eu,
|
||||||
fi,
|
fi,
|
||||||
fr,
|
fr,
|
||||||
|
gd,
|
||||||
gl,
|
gl,
|
||||||
hi,
|
hi,
|
||||||
hu,
|
hu,
|
||||||
@@ -64,6 +65,7 @@ const locales: Record<AppLanguage, Locale | undefined> = {
|
|||||||
fi,
|
fi,
|
||||||
fr,
|
fr,
|
||||||
ga: undefined,
|
ga: undefined,
|
||||||
|
gd,
|
||||||
gl,
|
gl,
|
||||||
hi,
|
hi,
|
||||||
hu,
|
hu,
|
||||||
|
|||||||
@@ -181,6 +181,8 @@ export function sanitizeAppLanguageSetting(appLanguage: string): AppLanguage {
|
|||||||
return AppLanguage.fr
|
return AppLanguage.fr
|
||||||
case 'ga':
|
case 'ga':
|
||||||
return AppLanguage.ga
|
return AppLanguage.ga
|
||||||
|
case 'gd':
|
||||||
|
return AppLanguage.gd
|
||||||
case 'gl':
|
case 'gl':
|
||||||
return AppLanguage.gl
|
return AppLanguage.gl
|
||||||
case 'hi':
|
case 'hi':
|
||||||
|
|||||||
@@ -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 messagesFi} from '#/locale/locales/fi/messages'
|
||||||
import {messages as messagesFr} from '#/locale/locales/fr/messages'
|
import {messages as messagesFr} from '#/locale/locales/fr/messages'
|
||||||
import {messages as messagesGa} from '#/locale/locales/ga/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 messagesGl} from '#/locale/locales/gl/messages'
|
||||||
import {messages as messagesHi} from '#/locale/locales/hi/messages'
|
import {messages as messagesHi} from '#/locale/locales/hi/messages'
|
||||||
import {messages as messagesHu} from '#/locale/locales/hu/messages'
|
import {messages as messagesHu} from '#/locale/locales/hu/messages'
|
||||||
@@ -159,6 +160,14 @@ export async function dynamicActivate(locale: AppLanguage) {
|
|||||||
])
|
])
|
||||||
break
|
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: {
|
case AppLanguage.gl: {
|
||||||
i18n.loadAndActivate({locale, messages: messagesGl})
|
i18n.loadAndActivate({locale, messages: messagesGl})
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
|
|||||||
@@ -64,6 +64,10 @@ export async function dynamicActivate(locale: AppLanguage) {
|
|||||||
mod = await import(`./locales/ga/messages`)
|
mod = await import(`./locales/ga/messages`)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
case AppLanguage.gd: {
|
||||||
|
mod = await import(`./locales/gd/messages`)
|
||||||
|
break
|
||||||
|
}
|
||||||
case AppLanguage.gl: {
|
case AppLanguage.gl: {
|
||||||
mod = await import(`./locales/gl/messages`)
|
mod = await import(`./locales/gl/messages`)
|
||||||
break
|
break
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ export enum AppLanguage {
|
|||||||
fi = 'fi',
|
fi = 'fi',
|
||||||
fr = 'fr',
|
fr = 'fr',
|
||||||
ga = 'ga',
|
ga = 'ga',
|
||||||
|
gd = 'gd',
|
||||||
gl = 'gl',
|
gl = 'gl',
|
||||||
hi = 'hi',
|
hi = 'hi',
|
||||||
hu = 'hu',
|
hu = 'hu',
|
||||||
@@ -64,6 +65,7 @@ export const APP_LANGUAGES: AppLanguageConfig[] = [
|
|||||||
{code2: AppLanguage.fi, name: 'Suomi – Finnish'},
|
{code2: AppLanguage.fi, name: 'Suomi – Finnish'},
|
||||||
{code2: AppLanguage.fr, name: 'Français – French'},
|
{code2: AppLanguage.fr, name: 'Français – French'},
|
||||||
{code2: AppLanguage.ga, name: 'Gaeilge – Irish'},
|
{code2: AppLanguage.ga, name: 'Gaeilge – Irish'},
|
||||||
|
{code2: AppLanguage.gd, name: 'Gàidhlig – Scottish Gaelic'},
|
||||||
{code2: AppLanguage.gl, name: 'Galego – Galician'},
|
{code2: AppLanguage.gl, name: 'Galego – Galician'},
|
||||||
{code2: AppLanguage.hi, name: 'हिंदी – Hindi'},
|
{code2: AppLanguage.hi, name: 'हिंदी – Hindi'},
|
||||||
{code2: AppLanguage.hu, name: 'magyar – Hungarian'},
|
{code2: AppLanguage.hu, name: 'magyar – Hungarian'},
|
||||||
|
|||||||
@@ -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"
|
||||||
Reference in New Issue
Block a user