Skip to content

Commit 162d2cc

Browse files
feat: Add Chinese i18n support (#726)
Co-authored-by: Matthew Lipski <[email protected]>
1 parent 63a880b commit 162d2cc

File tree

2 files changed

+215
-1
lines changed

2 files changed

+215
-1
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
export * from "./en";
22
export * from "./nl";
3-
export * from "./fr";
3+
export * from "./zh";
4+
export * from "./fr";

packages/core/src/i18n/locales/zh.ts

Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
import type { Dictionary } from "../dictionary";
2+
3+
export const zh: Dictionary = {
4+
slash_menu: {
5+
heading: {
6+
title: "一级标题",
7+
subtext: "用于顶级标题",
8+
aliases: ["h", "heading1", "h1", "标题", "一级标题"],
9+
group: "标题",
10+
},
11+
heading_2: {
12+
title: "二级标题",
13+
subtext: "用于关键部分",
14+
aliases: ["h2", "heading2", "subheading", "标题", "二级标题", "副标题"],
15+
group: "标题",
16+
},
17+
heading_3: {
18+
title: "三级标题",
19+
subtext: "用于小节和分组标题",
20+
aliases: ["h3", "heading3", "subheading", "标题", "三级标题"],
21+
group: "标题",
22+
},
23+
numbered_list: {
24+
title: "有序列表",
25+
subtext: "用于显示有序列表",
26+
aliases: [
27+
"ol",
28+
"li",
29+
"list",
30+
"numberedlist",
31+
"numbered list",
32+
"列表",
33+
"有序列表",
34+
],
35+
group: "基础",
36+
},
37+
bullet_list: {
38+
title: "无序列表",
39+
subtext: "用于显示无序列表",
40+
aliases: [
41+
"ul",
42+
"li",
43+
"list",
44+
"bulletlist",
45+
"bullet list",
46+
"列表",
47+
"无序列表",
48+
],
49+
group: "基础",
50+
},
51+
paragraph: {
52+
title: "段落",
53+
subtext: "用于文档正文",
54+
aliases: ["p", "paragraph", "text", "正文"],
55+
group: "基础",
56+
},
57+
table: {
58+
title: "表格",
59+
subtext: "使用表格",
60+
aliases: ["table", "表格"],
61+
group: "高级功能",
62+
},
63+
image: {
64+
title: "图片",
65+
subtext: "插入图片",
66+
aliases: [
67+
"图片",
68+
"上传图片",
69+
"上传",
70+
"image",
71+
"img",
72+
"相册",
73+
"媒体",
74+
"url",
75+
],
76+
group: "媒体",
77+
},
78+
},
79+
placeholders: {
80+
default: "输入 '/' 以使用命令",
81+
heading: "标题",
82+
bulletListItem: "列表",
83+
numberedListItem: "列表",
84+
},
85+
image: {
86+
add_button: "添加图片",
87+
},
88+
// from react package:
89+
side_menu: {
90+
add_block_label: "添加块",
91+
drag_handle_label: "打开菜单",
92+
},
93+
drag_handle: {
94+
delete_menuitem: "删除",
95+
colors_menuitem: "颜色",
96+
},
97+
table_handle: {
98+
delete_column_menuitem: "删除列",
99+
delete_row_menuitem: "删除行",
100+
add_left_menuitem: "左侧添加列",
101+
add_right_menuitem: "右侧添加列",
102+
add_above_menuitem: "上方添加行",
103+
add_below_menuitem: "下方添加行",
104+
},
105+
suggestion_menu: {
106+
no_items_title: "无匹配项",
107+
loading: "加载中…",
108+
},
109+
color_picker: {
110+
text_title: "文本",
111+
background_title: "背景色",
112+
colors: {
113+
default: "默认",
114+
gray: "灰色",
115+
brown: "棕色",
116+
red: "红色",
117+
orange: "橙色",
118+
yellow: "黄色",
119+
green: "绿色",
120+
blue: "蓝色",
121+
purple: "紫色",
122+
pink: "粉色",
123+
},
124+
},
125+
126+
formatting_toolbar: {
127+
bold: {
128+
tooltip: "加粗",
129+
secondary_tooltip: "Mod+B",
130+
},
131+
italic: {
132+
tooltip: "斜体",
133+
secondary_tooltip: "Mod+I",
134+
},
135+
underline: {
136+
tooltip: "下划线",
137+
secondary_tooltip: "Mod+U",
138+
},
139+
strike: {
140+
tooltip: "删除线",
141+
secondary_tooltip: "Mod+Shift+X",
142+
},
143+
code: {
144+
tooltip: "代码标记",
145+
secondary_tooltip: "",
146+
},
147+
colors: {
148+
tooltip: "颜色",
149+
},
150+
link: {
151+
tooltip: "添加链接",
152+
secondary_tooltip: "Mod+K",
153+
},
154+
image_caption: {
155+
tooltip: "编辑标题",
156+
input_placeholder: "编辑标题",
157+
},
158+
image_replace: {
159+
tooltip: "替换图片",
160+
},
161+
nest: {
162+
tooltip: "嵌套",
163+
secondary_tooltip: "Tab",
164+
},
165+
unnest: {
166+
tooltip: "取消嵌套",
167+
secondary_tooltip: "Shift+Tab",
168+
},
169+
align_left: {
170+
tooltip: "左对齐",
171+
},
172+
align_center: {
173+
tooltip: "居中",
174+
},
175+
align_right: {
176+
tooltip: "右对齐",
177+
},
178+
align_justify: {
179+
tooltip: "文本对齐",
180+
},
181+
},
182+
image_panel: {
183+
upload: {
184+
title: "上传",
185+
file_placeholder: "上传图片",
186+
upload_error: "Error:上传失败",
187+
},
188+
embed: {
189+
title: "嵌入",
190+
embed_button: "嵌入图片",
191+
url_placeholder: "输入图片地址",
192+
},
193+
},
194+
link_toolbar: {
195+
delete: {
196+
tooltip: "清除链接",
197+
},
198+
edit: {
199+
text: "编辑链接",
200+
tooltip: "编辑",
201+
},
202+
open: {
203+
tooltip: "新窗口打开",
204+
},
205+
form: {
206+
title_placeholder: "编辑标题",
207+
url_placeholder: "编辑链接地址",
208+
},
209+
},
210+
generic: {
211+
ctrl_shortcut: "Ctrl",
212+
},
213+
};

0 commit comments

Comments
 (0)