mirror of
https://github.com/AkiChase/scrcpy-mask
synced 2025-05-14 19:58:02 +08:00
fix(i18n): build error
This commit is contained in:
parent
4ac263e081
commit
14d1d75eff
@ -5,10 +5,8 @@ import enUS from "./en-US.json";
|
|||||||
import zhCN from "./zh-CN.json";
|
import zhCN from "./zh-CN.json";
|
||||||
|
|
||||||
const localStore = new Store("store.bin");
|
const localStore = new Store("store.bin");
|
||||||
const language = (await localStore.get<string>("language")) ?? "en-US";
|
|
||||||
|
|
||||||
const i18n = createI18n({
|
const i18n = createI18n({
|
||||||
locale: language,
|
|
||||||
allowComposition: true,
|
allowComposition: true,
|
||||||
messages: {
|
messages: {
|
||||||
"en-US": enUS,
|
"en-US": enUS,
|
||||||
@ -16,4 +14,8 @@ const i18n = createI18n({
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
localStore.get<"en-US" | "zh-CN">("language").then((language) => {
|
||||||
|
i18n.global.locale = language ?? "en-US";
|
||||||
|
});
|
||||||
|
|
||||||
export default i18n;
|
export default i18n;
|
||||||
|
Loading…
Reference in New Issue
Block a user