Merge pull request #262 from GRA0007/feat/new-languages

Add new languages
This commit is contained in:
Benji Grant 2023-06-11 01:07:32 +10:00 committed by GitHub
commit 970dd3e676
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 18 additions and 1 deletions

View file

@ -5,6 +5,8 @@ on:
paths:
- frontend/**
- .github/workflows/check_frontend.yml
paths-ignore:
- frontend/src/i18n/locales/**
jobs:
lint:

View file

@ -23,6 +23,11 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
cache-dependency-path: '**/yarn.lock'
- name: Install Vercel CLI
run: npm install --global vercel@latest
- name: Pull Vercel Environment Information

View file

@ -5,7 +5,7 @@ export const defaultNS = 'common'
export const cookieName = 'i18next'
export const languages = [
fallbackLng,
'en-GB', 'de', 'es', 'fr', 'hi', 'id', 'ja', 'ko', 'pl', 'pt-BR', 'ru',
'en-GB', 'de', 'es', 'fr', 'hi', 'id', 'it', 'ja', 'ko', 'pl', 'pt-PT', 'pt-BR', 'ru',
] as const
export const getOptions = (lng = fallbackLng, ns: InitOptions['ns'] = defaultNS): InitOptions => ({
@ -65,6 +65,11 @@ export const languageDetails: Record<typeof languages[number], LanguageDetails>
weekStart: 1,
timeFormat: '24h',
},
'it': { // Italian
name: 'Italiano',
weekStart: 1,
timeFormat: '24h',
},
'ja': { // Japanese
name: '日本語',
weekStart: 0,
@ -80,6 +85,11 @@ export const languageDetails: Record<typeof languages[number], LanguageDetails>
weekStart: 1,
timeFormat: '12h',
},
'pt-PT': { // Portuguese (Portugal)
name: 'Português (do Portugal)',
weekStart: 0,
timeFormat: '24h',
},
'pt-BR': { // Portuguese (Brazil)
name: 'Português (do Brasil)',
weekStart: 0,