diff --git a/frontend/src/components/markdown/tui-editor.vue b/frontend/src/components/markdown/tui-editor.vue index d699920..1fe472a 100644 --- a/frontend/src/components/markdown/tui-editor.vue +++ b/frontend/src/components/markdown/tui-editor.vue @@ -44,7 +44,7 @@ const chartOptions = { maxHeight: 300 }; -const {locale} = useI18n() +const {t, locale} = useI18n() const editorRef = ref() @@ -108,7 +108,7 @@ const ctx = reactive({ function openFile(){ OpenFileDialog({ - title: "打开 markdown 文件", + title: `${t("general.open")} markdown ${t("general.file")}`, filters: [ { displayName: "Markdown", @@ -130,7 +130,7 @@ function openFile(){ function saveFile(){ SaveFileDialog({ - title: "保存 markdown", + title: `${t("general.save")} markdown`, filters: [ { displayName: "Markdown", @@ -162,8 +162,8 @@ function saveFile(){ diff --git a/frontend/src/i18n/locales/en.json b/frontend/src/i18n/locales/en.json index 2ed5c95..8c07f87 100644 --- a/frontend/src/i18n/locales/en.json +++ b/frontend/src/i18n/locales/en.json @@ -28,5 +28,10 @@ "global": { "not-supported": "Because it is a beta version, it can't be done for the time being, it will be completed later.", "click-link": "The currently clicked link is: " + }, + "general": { + "open": "open", + "save": "save", + "file": "file" } } diff --git a/frontend/src/i18n/locales/zh-CN.json b/frontend/src/i18n/locales/zh-CN.json index a02258d..4694070 100644 --- a/frontend/src/i18n/locales/zh-CN.json +++ b/frontend/src/i18n/locales/zh-CN.json @@ -28,5 +28,10 @@ "global": { "not-supported": "由于是测试版,所以暂时做不了,后续会完成它。", "click-link": "当前点击的链接是: " + }, + "general": { + "open": "打开", + "save": "保存", + "file": "文件" } }