mirror of
https://github.com/AkiChase/scrcpy-mask
synced 2025-02-22 14:42:15 +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";
|
||||
|
||||
const localStore = new Store("store.bin");
|
||||
const language = (await localStore.get<string>("language")) ?? "en-US";
|
||||
|
||||
const i18n = createI18n({
|
||||
locale: language,
|
||||
allowComposition: true,
|
||||
messages: {
|
||||
"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;
|
||||
|
Loading…
Reference in New Issue
Block a user