aboutsummaryrefslogtreecommitdiff
path: root/FrontEnd/src/app/i18n.ts
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2020-11-11 19:50:31 +0800
committercrupest <crupest@outlook.com>2020-11-11 19:50:31 +0800
commit3652e1c69f12b90b155bc73c3fe5a2ace9caf26c (patch)
treef179e87c39f5a966045cc57a1fc9cae1ceca7bcf /FrontEnd/src/app/i18n.ts
parente276e62456c3a89f9541976e05260ac7ef4a8798 (diff)
downloadtimeline-3652e1c69f12b90b155bc73c3fe5a2ace9caf26c.tar.gz
timeline-3652e1c69f12b90b155bc73c3fe5a2ace9caf26c.tar.bz2
timeline-3652e1c69f12b90b155bc73c3fe5a2ace9caf26c.zip
refactor: Refactor i18n.
Diffstat (limited to 'FrontEnd/src/app/i18n.ts')
-rw-r--r--FrontEnd/src/app/i18n.ts8
1 files changed, 4 insertions, 4 deletions
diff --git a/FrontEnd/src/app/i18n.ts b/FrontEnd/src/app/i18n.ts
index aeac1f1f..c39888ed 100644
--- a/FrontEnd/src/app/i18n.ts
+++ b/FrontEnd/src/app/i18n.ts
@@ -18,10 +18,10 @@ const backend: BackendModule = {
}
if (language === "en") {
- const res = (await import("./locales/en/translation")).default;
+ const res = (await import("./locales/en/translation.json")).default;
success(res);
- } else if (language === "zh-cn" || language === "zh") {
- const res = (await import("./locales/zh/translation")).default;
+ } else if (language === "zh") {
+ const res = (await import("./locales/zh/translation.json")).default;
success(res);
} else {
error(`Language ${language} is not supported.`);
@@ -61,7 +61,7 @@ export const i18nPromise = i18n
if (module.hot) {
module.hot.accept(
- ["./locales/en/translation", "./locales/zh/translation"],
+ ["./locales/en/translation.json", "./locales/zh/translation.json"],
() => {
void i18n.reloadResources();
}