Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add lang config for Bulgarian, Finnish, Ukrainian, Indonesian, Slovak, Turkish and Maori #3834

Merged
merged 6 commits into from
May 2, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/context/LanguageContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,15 @@ import React from 'react';

export type AvailableLocale =
| 'ar'
| 'bg'
| 'ca'
| 'cs'
| 'da'
| 'de'
| 'en'
| 'el'
| 'es'
| 'fi'
| 'fr'
| 'hr'
| 'hu'
Expand All @@ -25,6 +27,7 @@ export type AvailableLocale =
| 'sq'
| 'sr'
| 'sv'
| 'uk'
| 'zh-CN'
| 'zh-TW';

Expand All @@ -34,6 +37,10 @@ type AvailableLanguageObject = Record<
>;

export const availableLanguages: AvailableLanguageObject = {
bg: {
code: 'bg',
display: 'Bulgarian',
},
ca: {
code: 'ca',
display: 'Català',
Expand All @@ -58,6 +65,10 @@ export const availableLanguages: AvailableLanguageObject = {
code: 'es',
display: 'Español',
},
fi: {
code: 'fi',
display: 'Finnish',
},
fr: {
code: 'fr',
display: 'Français',
Expand Down Expand Up @@ -130,6 +141,10 @@ export const availableLanguages: AvailableLanguageObject = {
code: 'ko',
display: '한국어',
},
uk: {
code: 'uk',
display: 'українська мова',
},
'zh-TW': {
code: 'zh-TW',
display: '繁體中文',
Expand Down
2 changes: 2 additions & 0 deletions src/pages/_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ const loadLocaleData = (locale: AvailableLocale): Promise<any> => {
return import('../i18n/locale/sr.json');
case 'sv':
return import('../i18n/locale/sv.json');
case 'uk':
return import('../i18n/locale/uk.json');
Comment on lines +85 to +86
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why you removed Bulgarian and Finnish from the list?
And I think when removing the languages, you didn't notice that Hebrew (hi), Hindi (hi), Romanian (ro) are already available from Weblate after #3597 had been merged. Please add those 3 back.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have been busy, but I got all of this sorted out.

case 'zh-CN':
return import('../i18n/locale/zh_Hans.json');
case 'zh-TW':
Expand Down
Loading