From a763ee5ad13d7a8ab57f3be525cc9e278b475fde Mon Sep 17 00:00:00 2001 From: songsongsong-666 <65287516+songsongsong-666@users.noreply.github.com> Date: Mon, 3 Jul 2023 12:58:44 +0000 Subject: [PATCH] feat(front): support chinese --- front/src/i18n/index.ts | 4 +++- front/src/i18n/zh.json | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 front/src/i18n/zh.json diff --git a/front/src/i18n/index.ts b/front/src/i18n/index.ts index cc20622..74fae7d 100644 --- a/front/src/i18n/index.ts +++ b/front/src/i18n/index.ts @@ -4,10 +4,12 @@ import LanguageDetector from "i18next-browser-languagedetector"; import en from "./en.json"; import fr from "./fr.json"; +import zh from "./zh.json"; const resources = { en: { translation: en }, - fr: { translation: fr } + fr: { translation: fr }, + "zh-CN": { translation: zh } }; i18n.use(LanguageDetector) diff --git a/front/src/i18n/zh.json b/front/src/i18n/zh.json new file mode 100644 index 0000000..f879dca --- /dev/null +++ b/front/src/i18n/zh.json @@ -0,0 +1,40 @@ +{ + "menu": { + "links": "链接", + "texts": "文本", + "files": "文件" + }, + "titles": { + "links": "链接", + "texts": "文本", + "files": "文件" + }, + "links": { + "add_placeholder": "输出希望缩短的URL", + "add_aria_label": "缩短新的URL", + "add_button_aria_label": "添加", + "copy_button_aria_label": "拷贝短URL", + "delete_button_aria_label": "删除", + "open_original": "打开原始链接", + "copy_message": "短链接已拷贝至剪切板" + }, + "texts": { + "add_placeholder": "输入文本", + "add_aria_label": "添加文本", + "add_button_aria_label": "添加", + "copy_button_aria_label": "拷贝文本链接", + "delete_button_aria_label": "删除", + "copy_message": "短链接已拷贝至剪切板" + }, + "files": { + "add_placeholder": "选择文件", + "add_button_aria_label": "上传", + "copy_button_aria_label": "拷贝文件链接", + "delete_button_aria_label": "删除", + "copy_message": "短链接已拷贝至剪切板" + }, + "actions": { + "filter": "过滤器", + "clear_filter_label": "清空过滤器" + } + } \ No newline at end of file