Skip to content

Commit 0786f47

Browse files
committed
feat(mobile): add French locale support
1 parent adca196 commit 0786f47

File tree

4 files changed

+16
-2
lines changed

4 files changed

+16
-2
lines changed

apps/mobile/app.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export default ({ config }: ConfigContext): ExpoConfig => {
5757
LSApplicationQueriesSchemes: ["bilibili", "youtube"],
5858
CFBundleAllowMixedLocalizations: true,
5959
// apps/mobile/src/@types/constants.ts currentSupportedLanguages
60-
CFBundleLocalizations: ["en", "ja", "zh-CN", "zh-TW"],
60+
CFBundleLocalizations: ["en", "ja", "zh-CN", "zh-TW", "fr-FR"],
6161
CFBundleDevelopmentRegion: "en",
6262
},
6363
googleServicesFile: "./build/GoogleService-Info.plist",

apps/mobile/ios/Folo/Info.plist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
<string>ja</string>
2727
<string>zh-CN</string>
2828
<string>zh-TW</string>
29+
<string>fr-FR</string>
2930
</array>
3031
<key>CFBundleName</key>
3132
<string>$(PRODUCT_NAME)</string>

apps/mobile/src/@types/constants.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const langs = ["en", "ja", "zh-CN", "zh-TW"] as const
1+
const langs = ["en", "ja", "zh-CN", "zh-TW", "fr-FR"] as const
22
export const currentSupportedLanguages = langs as readonly string[]
33
export type MobileSupportedLanguages = (typeof langs)[number]
44

@@ -10,4 +10,5 @@ export const dayjsLocaleImportMap = {
1010
["zh-CN"]: ["zh-cn", () => import("dayjs/locale/zh-cn")],
1111
["ja"]: ["ja", () => import("dayjs/locale/ja")],
1212
["zh-TW"]: ["zh-tw", () => import("dayjs/locale/zh-tw")],
13+
["fr-FR"]: ["fr", () => import("dayjs/locale/fr")],
1314
} as const

apps/mobile/src/@types/default-resource.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,25 @@
11
import common_en from "@locales/common/en.json"
2+
import common_frFR from "@locales/common/fr-FR.json"
23
import common_ja from "@locales/common/ja.json"
34
import common_zhCN from "@locales/common/zh-CN.json"
45
import common_zhTW from "@locales/common/zh-TW.json"
56
import errors_en from "@locales/errors/en.json"
7+
import errors_frFR from "@locales/errors/fr-FR.json"
68
import errors_ja from "@locales/errors/ja.json"
79
import errors_zhCN from "@locales/errors/zh-CN.json"
810
import errors_zhTW from "@locales/errors/zh-TW.json"
911
import lang_en from "@locales/lang/en.json"
12+
import lang_frFR from "@locales/lang/fr-FR.json"
1013
import lang_ja from "@locales/lang/ja.json"
1114
import lang_zhCN from "@locales/lang/zh-CN.json"
1215
import lang_zhTW from "@locales/lang/zh-TW.json"
1316
import en from "@locales/mobile/default/en.json"
17+
import frFR from "@locales/mobile/default/fr-FR.json"
1418
import ja from "@locales/mobile/default/ja.json"
1519
import zhCN from "@locales/mobile/default/zh-CN.json"
1620
import zhTW from "@locales/mobile/default/zh-TW.json"
1721
import settings_en from "@locales/settings/en.json"
22+
import settings_frFR from "@locales/settings/fr-FR.json"
1823
import settings_ja from "@locales/settings/ja.json"
1924
import settings_zhCN from "@locales/settings/zh-CN.json"
2025
import settings_zhTW from "@locales/settings/zh-TW.json"
@@ -23,6 +28,13 @@ import type { MobileSupportedLanguages, ns } from "./constants"
2328

2429
// @keep-sorted
2530
export const defaultResources = {
31+
"fr-FR": {
32+
common: common_frFR,
33+
default: frFR,
34+
errors: errors_frFR,
35+
lang: lang_frFR,
36+
settings: settings_frFR,
37+
},
2638
// @keep-sorted
2739
"zh-CN": {
2840
common: common_zhCN,

0 commit comments

Comments
 (0)