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
commitd3a9a1ca377dbc9d5ff641470407d30924bb5e34 (patch)
treebd389e36f0bc1a3c0003c47b70f8e508a8504e48 /FrontEnd/src/app/i18n.ts
parent70c3443585eadde606e98fb196e29cf3216e96d9 (diff)
downloadtimeline-d3a9a1ca377dbc9d5ff641470407d30924bb5e34.tar.gz
timeline-d3a9a1ca377dbc9d5ff641470407d30924bb5e34.tar.bz2
timeline-d3a9a1ca377dbc9d5ff641470407d30924bb5e34.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();
}