Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(front): support chinese #9

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion front/src/i18n/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
40 changes: 40 additions & 0 deletions front/src/i18n/zh.json
Original file line number Diff line number Diff line change
@@ -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": "清空过滤器"
}
}