Skip to content

Commit 0df6e78

Browse files
committed
Merge branch 'develop' into feature/dutch-locale
# Conflicts: # frontend/src/locales.ts
2 parents 12c8419 + 150a59d commit 0df6e78

File tree

7 files changed

+6623
-2
lines changed

7 files changed

+6623
-2
lines changed

β€Žbackend/app/Locale.phpβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ enum Locale: string
1616
case PT = 'pt';
1717
case PT_BR = 'pt-br';
1818
case ZH_CN = 'zh-cn';
19+
20+
case ZH_HK = 'zh-hk';
1921
case VI = 'vi';
2022

2123
public static function getSupportedLocales(): array

β€Žbackend/lang/zh-hk.jsonβ€Ž

Lines changed: 423 additions & 0 deletions
Large diffs are not rendered by default.

β€Žfrontend/lingui.config.tsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const config: LinguiConfig = {
1818
// "ja", // Japanese
1919
// "ko", // Korean
2020
// "id", // Indonesian
21-
// "zh-hk", // Cantonese Chinese (Hong Kong)
21+
"zh-hk", // Cantonese Chinese (Hong Kong)
2222
// "cs", // Czech
2323
// "ga", // Irish
2424
],

β€Žfrontend/src/components/common/LanguageSwitcher/index.tsxβ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ export const LanguageSwitcher = () => {
2626
return t`Brazilian Portuguese`;
2727
case "zh-cn":
2828
return t`Chinese (Simplified)`;
29+
case "zh-hk":
30+
return t`Chinese (Traditional)`;
2931
case "vi":
3032
return t`Vietnamese`;
3133
}

β€Žfrontend/src/locales.tsβ€Ž

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,15 @@ import {messages as es} from "./locales/es.po";
1313
// @ts-ignore
1414
import {messages as zhCn} from "./locales/zh-cn.po";
1515
// @ts-ignore
16+
import {messages as zhHk} from "./locales/zh-hk.po";
17+
// @ts-ignore
1618
import {messages as ptBr} from "./locales/pt-br.po";
1719
// @ts-ignore
1820
import {messages as vi} from "./locales/vi.po";
1921
import {i18n} from "@lingui/core";
2022
import {t} from "@lingui/macro";
2123

22-
export type SupportedLocales = "en" | "de" | "fr" | "nl" | "pt" | "es" | "zh-cn" | "pt-br" | "vi";
24+
export type SupportedLocales = "en" | "de" | "fr" | "nl" | "pt" | "es" | "zh-cn" | "pt-br" | "vi" |"zh-hk";
2325

2426
export const localeMessages: Record<string, any> = {
2527
en: en,
@@ -29,6 +31,7 @@ export const localeMessages: Record<string, any> = {
2931
pt: pt,
3032
es: es,
3133
"zh-cn": zhCn,
34+
"zh-hk": zhHk,
3235
"pt-br": ptBr,
3336
vi: vi,
3437
};
@@ -41,6 +44,7 @@ export const localeToFlagEmojiMap: Record<SupportedLocales, string> = {
4144
pt: 'πŸ‡΅πŸ‡Ή',
4245
es: 'πŸ‡ͺπŸ‡Έ',
4346
"zh-cn": 'πŸ‡¨πŸ‡³',
47+
"zh-hk": 'πŸ‡­πŸ‡°',
4448
"pt-br": 'πŸ‡§πŸ‡·',
4549
vi: 'πŸ‡»πŸ‡³',
4650
};
@@ -53,6 +57,7 @@ export const localeToNameMap: Record<SupportedLocales, string> = {
5357
pt: `Portuguese`,
5458
es: `Spanish`,
5559
"zh-cn": `Chinese`,
60+
"zh-hk": `Cantonese`,
5661
"pt-br": `Portuguese (Brazil)`,
5762
vi: `Vietnamese`,
5863
};

β€Žfrontend/src/locales/zh-hk.jsβ€Ž

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
Β (0)