Skip to content

Commit c794412

Browse files
authored
Merge pull request #591 from Rwing/master
support Simplified Chinese and rename original zh to Traditional Chinese
2 parents a230482 + 362a7ea commit c794412

File tree

6 files changed

+215
-106
lines changed

6 files changed

+215
-106
lines changed

app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ if (config.hsts.enable) {
109109
}
110110

111111
i18n.configure({
112-
locales: ['en', 'zh', 'fr', 'de', 'ja', 'es', 'ca', 'el', 'pt', 'it', 'tr', 'ru', 'nl', 'hr', 'pl', 'uk', 'hi', 'sv', 'eo', 'da'],
112+
locales: ['en', 'zh', 'zh-CN', 'zh-TW', 'fr', 'de', 'ja', 'es', 'ca', 'el', 'pt', 'it', 'tr', 'ru', 'nl', 'hr', 'pl', 'uk', 'hi', 'sv', 'eo', 'da'],
113113
cookie: 'locale',
114114
directory: path.join(__dirname, '/locales')
115115
})

locales/zh-CN.json

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
{
2+
"Collaborative markdown notes": "Markdown 协作笔记",
3+
"Realtime collaborative markdown notes on all platforms.": "使用 Markdown 的跨平台即时协作笔记",
4+
"Best way to write and share your knowledge in markdown.": "您使用 Markdown 写作与分享知识的最佳方式",
5+
"Intro": "简介",
6+
"History": "历史",
7+
"New guest note": "建立访客笔记",
8+
"Collaborate with URL": "使用网址协作",
9+
"Support charts and MathJax": "支持图表与 MathJax",
10+
"Support slide mode": "支持简报模式",
11+
"Sign In": "登录",
12+
"Below is the history from browser": "以下为来自浏览器的历史",
13+
"Welcome!": "欢迎!",
14+
"New note": "建立笔记",
15+
"or": "",
16+
"Sign Out": "登出",
17+
"Explore all features": "探索所有功能",
18+
"Select tags...": "选择标签...",
19+
"Search keyword...": "搜索关键字...",
20+
"Sort by title": "用标题排序",
21+
"Title": "标题",
22+
"Sort by time": "用时间排序",
23+
"Time": "时间",
24+
"Export history": "导出历史",
25+
"Import history": "导入历史",
26+
"Clear history": "清空历史",
27+
"Refresh history": "刷新历史",
28+
"No history": "没有历史",
29+
"Import from browser": "从浏览器导入",
30+
"Releases": "版本",
31+
"Are you sure?": "你确定吗?",
32+
"Cancel": "取消",
33+
"Yes, do it!": "没错,就这样办!",
34+
"Choose method": "选择方式",
35+
"Sign in via %s": "通过 %s 登录",
36+
"New": "新增",
37+
"Publish": "发表",
38+
"Extra": "增益",
39+
"Revision": "修订版本",
40+
"Slide Mode": "简报模式",
41+
"Export": "导出",
42+
"Import": "导入",
43+
"Clipboard": "剪贴板",
44+
"Download": "下载",
45+
"Raw HTML": "纯 HTML",
46+
"Edit": "编辑",
47+
"View": "检视",
48+
"Both": "双栏",
49+
"Help": "帮助",
50+
"Upload Image": "上传图片",
51+
"Menu": "菜单",
52+
"This page need refresh": "此页面需要重新整理",
53+
"You have an incompatible client version.": "您使用的是不相容的客户端",
54+
"Refresh to update.": "请重新整理来更新",
55+
"New version available!": "新版本来了!",
56+
"See releases notes here": "请由此查阅更新纪录",
57+
"Refresh to enjoy new features.": "请重新整理来享受最新功能",
58+
"Your user state has changed.": "您的使用者状态已变更",
59+
"Refresh to load new user state.": "请重新整理来载入新的使用者状态",
60+
"Refresh": "重新整理",
61+
"Contacts": "联络方式",
62+
"Report an issue": "报告问题",
63+
"Send us email": "寄信给我们",
64+
"Documents": "文件",
65+
"Features": "功能简介",
66+
"YAML Metadata": "YAML Metadata",
67+
"Slide Example": "简报范例",
68+
"Cheatsheet": "快速简表",
69+
"Example": "范例",
70+
"Syntax": "语法",
71+
"Header": "标题",
72+
"Unordered List": "无序清单",
73+
"Ordered List": "有序清单",
74+
"Todo List": "待办事项",
75+
"Blockquote": "引用",
76+
"Bold font": "粗体",
77+
"Italics font": "斜体",
78+
"Strikethrough": "删除线",
79+
"Inserted text": "插入文字",
80+
"Marked text": "标记文字",
81+
"Link": "链接",
82+
"Image": "图片",
83+
"Code": "代码",
84+
"Externals": "外部",
85+
"This is a alert area.": "这是警告区块",
86+
"Revert": "还原",
87+
"Import from clipboard": "从剪贴板导入",
88+
"Paste your markdown or webpage here...": "在这里贴上 Markdown 或是网页内容...",
89+
"Clear": "清除",
90+
"This note is locked": "此份笔记已被锁定",
91+
"Sorry, only owner can edit this note.": "抱歉,只有拥有者可以编辑此笔记",
92+
"OK": "好的",
93+
"Reach the limit": "到达上限",
94+
"Sorry, you've reached the max length this note can be.": "抱歉,您已使用到此份笔记可用的最大长度",
95+
"Please reduce the content or divide it to more notes, thank you!": "请减少内容或是将内容切成更多笔记,谢谢!",
96+
"Import from Gist": "从 Gist 导入",
97+
"Paste your gist url here...": "在这里贴上 gist 网址...",
98+
"Import from Snippet": "从 Snippet 导入",
99+
"Select From Available Projects": "从可用的项目中选择",
100+
"Select From Available Snippets": "从可用的 Snippets 中选择",
101+
"OR": "或是",
102+
"Export to Snippet": "导出到 Snippet",
103+
"Select Visibility Level": "选择可见层级"
104+
}

locales/zh-TW.json

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
{
2+
"Collaborative markdown notes": "Markdown 協作筆記",
3+
"Realtime collaborative markdown notes on all platforms.": "使用 Markdown 的跨平台即時協作筆記",
4+
"Best way to write and share your knowledge in markdown.": "您使用 Markdown 寫作與分享知識的最佳方式",
5+
"Intro": "簡介",
6+
"History": "紀錄",
7+
"New guest note": "建立訪客筆記",
8+
"Collaborate with URL": "使用網址協作",
9+
"Support charts and MathJax": "支援圖表與 MathJax",
10+
"Support slide mode": "支援簡報模式",
11+
"Sign In": "登入",
12+
"Below is the history from browser": "以下為來自瀏覽器的紀錄",
13+
"Welcome!": "歡迎!",
14+
"New note": "建立筆記",
15+
"or": "",
16+
"Sign Out": "登出",
17+
"Explore all features": "探索所有功能",
18+
"Select tags...": "選擇標籤...",
19+
"Search keyword...": "搜尋關鍵字...",
20+
"Sort by title": "用標題排序",
21+
"Title": "標題",
22+
"Sort by time": "用時間排序",
23+
"Time": "時間",
24+
"Export history": "匯出紀錄",
25+
"Import history": "匯入紀錄",
26+
"Clear history": "清空紀錄",
27+
"Refresh history": "更新紀錄",
28+
"No history": "沒有紀錄",
29+
"Import from browser": "從瀏覽器匯入",
30+
"Releases": "版本",
31+
"Are you sure?": "你確定嗎?",
32+
"Cancel": "取消",
33+
"Yes, do it!": "沒錯,就這樣辦!",
34+
"Choose method": "選擇方式",
35+
"Sign in via %s": "透過 %s 登入",
36+
"New": "新增",
37+
"Publish": "發表",
38+
"Extra": "增益",
39+
"Revision": "修訂版本",
40+
"Slide Mode": "簡報模式",
41+
"Export": "匯出",
42+
"Import": "匯入",
43+
"Clipboard": "剪貼簿",
44+
"Download": "下載",
45+
"Raw HTML": "純 HTML",
46+
"Edit": "編輯",
47+
"View": "檢視",
48+
"Both": "雙欄",
49+
"Help": "協助",
50+
"Upload Image": "上傳圖片",
51+
"Menu": "選單",
52+
"This page need refresh": "此頁面需要重新整理",
53+
"You have an incompatible client version.": "您使用的是不相容的客戶端",
54+
"Refresh to update.": "請重新整理來更新",
55+
"New version available!": "新版本來了!",
56+
"See releases notes here": "請由此查閱更新紀錄",
57+
"Refresh to enjoy new features.": "請重新整理來享受最新功能",
58+
"Your user state has changed.": "您的使用者狀態已變更",
59+
"Refresh to load new user state.": "請重新整理來載入新的使用者狀態",
60+
"Refresh": "重新整理",
61+
"Contacts": "聯絡方式",
62+
"Report an issue": "回報問題",
63+
"Send us email": "寄信給我們",
64+
"Documents": "文件",
65+
"Features": "功能簡介",
66+
"YAML Metadata": "YAML Metadata",
67+
"Slide Example": "簡報範例",
68+
"Cheatsheet": "快速簡表",
69+
"Example": "範例",
70+
"Syntax": "語法",
71+
"Header": "標題",
72+
"Unordered List": "無序清單",
73+
"Ordered List": "有序清單",
74+
"Todo List": "待辦事項",
75+
"Blockquote": "引用",
76+
"Bold font": "粗體",
77+
"Italics font": "斜體",
78+
"Strikethrough": "刪除線",
79+
"Inserted text": "插入文字",
80+
"Marked text": "標記文字",
81+
"Link": "連結",
82+
"Image": "圖片",
83+
"Code": "程式碼",
84+
"Externals": "外部",
85+
"This is a alert area.": "這是警告區塊",
86+
"Revert": "還原",
87+
"Import from clipboard": "從剪貼簿匯入",
88+
"Paste your markdown or webpage here...": "在這裡貼上 Markdown 或是網頁內容...",
89+
"Clear": "清除",
90+
"This note is locked": "此份筆記已被鎖定",
91+
"Sorry, only owner can edit this note.": "抱歉,只有擁有者可以編輯此筆記",
92+
"OK": "好的",
93+
"Reach the limit": "到達上限",
94+
"Sorry, you've reached the max length this note can be.": "抱歉,您已使用到此份筆記可用的最大長度",
95+
"Please reduce the content or divide it to more notes, thank you!": "請減少內容或是將內容切成更多筆記,謝謝!",
96+
"Import from Gist": "從 Gist 匯入",
97+
"Paste your gist url here...": "在這裡貼上 gist 網址...",
98+
"Import from Snippet": "從 Snippet 匯入",
99+
"Select From Available Projects": "從可用的專案中選擇",
100+
"Select From Available Snippets": "從可用的 Snippets 中選擇",
101+
"OR": "或是",
102+
"Export to Snippet": "匯出到 Snippet",
103+
"Select Visibility Level": "選擇可見層級"
104+
}

locales/zh.json

Lines changed: 0 additions & 104 deletions
This file was deleted.

locales/zh.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
locales/zh-TW.json

public/js/locale.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ $('.ui-locale option').each(function () {
1111
})
1212
if (Cookies.get('locale')) {
1313
lang = Cookies.get('locale')
14+
if (lang === 'zh') {
15+
lang = 'zh-TW'
16+
}
1417
} else if (supportLangs.indexOf(userLang) !== -1) {
1518
lang = supportLangs[supportLangs.indexOf(userLang)]
1619
} else if (supportLangs.indexOf(userLangCode) !== -1) {

public/views/index/body.ejs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@
130130
</p>
131131
<select class="ui-locale">
132132
<option value="en">English</option>
133-
<option value="zh">中文</option>
133+
<option value="zh-CN">简体中文</option>
134+
<option value="zh-TW">繁體中文</option>
134135
<option value="fr">Français</option>
135136
<option value="de">Deutsch</option>
136137
<option value="ja">日本語</option>

0 commit comments

Comments
 (0)