-
Notifications
You must be signed in to change notification settings - Fork 418
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added support to multiple locales and the en_US locale is now provided alongside the zh_CN one. The locale name can be passed via the "locale" option to Cherry. zh_CN is the default locale, for backward compatibility. Note that this patch offers basic support to localisation, but a lot of work is still missing: - Passing a wrong or incomplete locale may result in Cherry not working or misbehaving. - Many Chinese strings are still hardcoded in the project. Use `grep -rP '\'[\p{Han}]' src/` and similar regexes to find some. - README.CN.md hasn't been updated. Fixed #217
- Loading branch information
Showing
15 changed files
with
204 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
/** | ||
* Copyright (C) 2021 THL A29 Limited, a Tencent company. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
export default { | ||
bold: 'Bold', | ||
code: 'Code', | ||
graph: 'Graph', | ||
h1: 'Heading 1', | ||
h2: 'Heading 2', | ||
h3: 'Heading 3', | ||
h4: 'Heading 4', | ||
h5: 'Heading 5', | ||
header: 'Header', | ||
insert: 'Insert', | ||
italic: 'Italic', | ||
list: 'List', | ||
quickTable: 'Quick Table', | ||
quote: 'Quote', | ||
size: 'Size', | ||
color: 'Color', | ||
strikethrough: 'Strikethrough', | ||
sub: 'Sub', | ||
sup: 'Sup', | ||
togglePreview: 'Toggle Preview', | ||
fullScreen: 'Full Screen', | ||
image: 'Image', | ||
audio: 'Audio', | ||
video: 'Video', | ||
link: 'Link', | ||
hr: 'Horizontal Rule', | ||
br: 'New Line', | ||
toc: 'Table Of Content', | ||
pdf: 'PDF', | ||
word: 'Word', | ||
table: 'Table', | ||
'line-table': 'Line Table', | ||
'bar-table': 'Bar Table', | ||
formula: 'Formula', | ||
insertFormula: 'Insert Formula', | ||
insertFlow: 'Insert Flow', | ||
insertSeq: 'Insert Seq', | ||
insertState: 'Insert State', | ||
insertClass: 'Insert Class', | ||
insertPie: 'Insert Pie', | ||
insertGantt: 'Insert Gantt', | ||
checklist: 'Checklist', | ||
ol: 'Ordered List', | ||
ul: 'Unordered List', | ||
undo: 'Undo', | ||
redo: 'Redo', | ||
previewClose: 'Preview Close', | ||
codeTheme: 'Code Theme', | ||
switchModel: 'Switch Model', | ||
switchPreview: 'Switch Preview', | ||
switchEdit: 'Switch Edit', | ||
classicBr: 'Classic New Line', | ||
normalBr: 'Normal New Line', | ||
settings: 'Settings', | ||
mobilePreview: 'Mobile Preview', | ||
copy: 'Copy', | ||
export: 'Export', | ||
underline: 'Underline', | ||
pinyin: 'Pinyin', | ||
pastePlain: 'Paste as Plain Text', | ||
pasteMarkdown: 'Paste as Markdown', | ||
hide: 'Hide (ctrl+0)', | ||
exportToPdf: 'Export to PDF', | ||
exportScreenshot: 'Screenshot', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
/** | ||
* Copyright (C) 2021 THL A29 Limited, a Tencent company. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
export default { | ||
bold: '加粗', // 加粗 | ||
code: '代码', // 代码 | ||
graph: '画图', // 画图 | ||
h1: '一级标题', // 一级标题 | ||
h2: '二级标题', // 二级标题 | ||
h3: '三级标题', // 三级标题 | ||
h4: '四级标题', // 四级标题 | ||
h5: '五级标题', // 五级标题 | ||
header: '标题', // 标题 | ||
insert: '插入', // 插入 | ||
italic: '斜体', // 斜体 | ||
list: '列表', // 列表 | ||
quickTable: '表格', // 表格 | ||
quote: '引用', // 引用 | ||
size: '大小', // 大小 | ||
color: '文字颜色&背景', // 文字颜色&背景 | ||
strikethrough: '删除线', // 删除线 | ||
sub: '下标', // 下标 | ||
sup: '上标', // 上标 | ||
togglePreview: '预览', // 预览 | ||
fullScreen: '全屏', // 全屏 | ||
image: '图片', // 图片 | ||
audio: '音频', // 音频 | ||
video: '视频', // 视频 | ||
link: '超链接', // 超链接 | ||
hr: '分隔线', // 分隔线 | ||
br: '换行', // 换行 | ||
toc: '目录', // 目录 | ||
pdf: 'pdf', // pdf | ||
word: 'word', // word | ||
table: '表格', // 表格 | ||
'line-table': '折线表格', // 折线表格 | ||
'bar-table': '柱状表格', // 柱状表格 | ||
formula: '公式', // 公式 | ||
insertFormula: '公式', // 公式 | ||
insertFlow: '流程图', // 流程图 | ||
insertSeq: '时序图', // 时序图 | ||
insertState: '状态图', // 状态图 | ||
insertClass: '类图', // 类图 | ||
insertPie: '饼图', // 饼图 | ||
insertGantt: '甘特图', // 甘特图 | ||
checklist: '清单', // 清单 | ||
ol: '有序列表', // 有序列表 | ||
ul: '无序列表', // 无序列表 | ||
undo: '撤销', // 撤销 | ||
redo: '恢复', // 恢复 | ||
previewClose: '关闭预览', // 关闭预览 | ||
codeTheme: '代码主题', // 代码主题 | ||
switchModel: '模式切换', // 模式切换 | ||
switchPreview: '预览', // 预览 | ||
switchEdit: '返回编辑', // 返回编辑 | ||
classicBr: '经典换行', // 经典换行 | ||
normalBr: '常规换行', // 常规换行 | ||
settings: '设置', // 设置 | ||
mobilePreview: '移动端预览', // 移动端预览 | ||
copy: '复制内容', // 复制内容 | ||
export: '导出', // 导出PDF、长图 | ||
underline: '下划线', // 下划线 | ||
pinyin: '拼音', // 拼音 | ||
pastePlain: '粘贴为纯文本格式', // 粘贴为纯文本格式 | ||
pasteMarkdown: '粘贴为markdown格式', // 粘贴为markdown格式 | ||
hide: '隐藏(ctrl+0)', // 隐藏(ctrl+0) | ||
exportToPdf: '导出PDF', // 导出PDF | ||
exportScreenshot: '导出长图', // 导出长图 | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.