support Simplified Chinese and rename original zh to Traditional Chinese
This commit is contained in:
parent
5ce8f40eac
commit
362a7eaf65
6 changed files with 215 additions and 106 deletions
2
app.js
2
app.js
|
@ -109,7 +109,7 @@ if (config.hsts.enable) {
|
|||
}
|
||||
|
||||
i18n.configure({
|
||||
locales: ['en', 'zh', 'fr', 'de', 'ja', 'es', 'ca', 'el', 'pt', 'it', 'tr', 'ru', 'nl', 'hr', 'pl', 'uk', 'hi', 'sv', 'eo', 'da'],
|
||||
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'],
|
||||
cookie: 'locale',
|
||||
directory: path.join(__dirname, '/locales')
|
||||
})
|
||||
|
|
104
locales/zh-CN.json
Normal file
104
locales/zh-CN.json
Normal file
|
@ -0,0 +1,104 @@
|
|||
{
|
||||
"Collaborative markdown notes": "Markdown 协作笔记",
|
||||
"Realtime collaborative markdown notes on all platforms.": "使用 Markdown 的跨平台即时协作笔记",
|
||||
"Best way to write and share your knowledge in markdown.": "您使用 Markdown 写作与分享知识的最佳方式",
|
||||
"Intro": "简介",
|
||||
"History": "历史",
|
||||
"New guest note": "建立访客笔记",
|
||||
"Collaborate with URL": "使用网址协作",
|
||||
"Support charts and MathJax": "支持图表与 MathJax",
|
||||
"Support slide mode": "支持简报模式",
|
||||
"Sign In": "登录",
|
||||
"Below is the history from browser": "以下为来自浏览器的历史",
|
||||
"Welcome!": "欢迎!",
|
||||
"New note": "建立笔记",
|
||||
"or": "或",
|
||||
"Sign Out": "登出",
|
||||
"Explore all features": "探索所有功能",
|
||||
"Select tags...": "选择标签...",
|
||||
"Search keyword...": "搜索关键字...",
|
||||
"Sort by title": "用标题排序",
|
||||
"Title": "标题",
|
||||
"Sort by time": "用时间排序",
|
||||
"Time": "时间",
|
||||
"Export history": "导出历史",
|
||||
"Import history": "导入历史",
|
||||
"Clear history": "清空历史",
|
||||
"Refresh history": "刷新历史",
|
||||
"No history": "没有历史",
|
||||
"Import from browser": "从浏览器导入",
|
||||
"Releases": "版本",
|
||||
"Are you sure?": "你确定吗?",
|
||||
"Cancel": "取消",
|
||||
"Yes, do it!": "没错,就这样办!",
|
||||
"Choose method": "选择方式",
|
||||
"Sign in via %s": "通过 %s 登录",
|
||||
"New": "新增",
|
||||
"Publish": "发表",
|
||||
"Extra": "增益",
|
||||
"Revision": "修订版本",
|
||||
"Slide Mode": "简报模式",
|
||||
"Export": "导出",
|
||||
"Import": "导入",
|
||||
"Clipboard": "剪贴板",
|
||||
"Download": "下载",
|
||||
"Raw HTML": "纯 HTML",
|
||||
"Edit": "编辑",
|
||||
"View": "检视",
|
||||
"Both": "双栏",
|
||||
"Help": "帮助",
|
||||
"Upload Image": "上传图片",
|
||||
"Menu": "菜单",
|
||||
"This page need refresh": "此页面需要重新整理",
|
||||
"You have an incompatible client version.": "您使用的是不相容的客户端",
|
||||
"Refresh to update.": "请重新整理来更新",
|
||||
"New version available!": "新版本来了!",
|
||||
"See releases notes here": "请由此查阅更新纪录",
|
||||
"Refresh to enjoy new features.": "请重新整理来享受最新功能",
|
||||
"Your user state has changed.": "您的使用者状态已变更",
|
||||
"Refresh to load new user state.": "请重新整理来载入新的使用者状态",
|
||||
"Refresh": "重新整理",
|
||||
"Contacts": "联络方式",
|
||||
"Report an issue": "报告问题",
|
||||
"Send us email": "寄信给我们",
|
||||
"Documents": "文件",
|
||||
"Features": "功能简介",
|
||||
"YAML Metadata": "YAML Metadata",
|
||||
"Slide Example": "简报范例",
|
||||
"Cheatsheet": "快速简表",
|
||||
"Example": "范例",
|
||||
"Syntax": "语法",
|
||||
"Header": "标题",
|
||||
"Unordered List": "无序清单",
|
||||
"Ordered List": "有序清单",
|
||||
"Todo List": "待办事项",
|
||||
"Blockquote": "引用",
|
||||
"Bold font": "粗体",
|
||||
"Italics font": "斜体",
|
||||
"Strikethrough": "删除线",
|
||||
"Inserted text": "插入文字",
|
||||
"Marked text": "标记文字",
|
||||
"Link": "链接",
|
||||
"Image": "图片",
|
||||
"Code": "代码",
|
||||
"Externals": "外部",
|
||||
"This is a alert area.": "这是警告区块",
|
||||
"Revert": "还原",
|
||||
"Import from clipboard": "从剪贴板导入",
|
||||
"Paste your markdown or webpage here...": "在这里贴上 Markdown 或是网页内容...",
|
||||
"Clear": "清除",
|
||||
"This note is locked": "此份笔记已被锁定",
|
||||
"Sorry, only owner can edit this note.": "抱歉,只有拥有者可以编辑此笔记",
|
||||
"OK": "好的",
|
||||
"Reach the limit": "到达上限",
|
||||
"Sorry, you've reached the max length this note can be.": "抱歉,您已使用到此份笔记可用的最大长度",
|
||||
"Please reduce the content or divide it to more notes, thank you!": "请减少内容或是将内容切成更多笔记,谢谢!",
|
||||
"Import from Gist": "从 Gist 导入",
|
||||
"Paste your gist url here...": "在这里贴上 gist 网址...",
|
||||
"Import from Snippet": "从 Snippet 导入",
|
||||
"Select From Available Projects": "从可用的项目中选择",
|
||||
"Select From Available Snippets": "从可用的 Snippets 中选择",
|
||||
"OR": "或是",
|
||||
"Export to Snippet": "导出到 Snippet",
|
||||
"Select Visibility Level": "选择可见层级"
|
||||
}
|
104
locales/zh-TW.json
Normal file
104
locales/zh-TW.json
Normal file
|
@ -0,0 +1,104 @@
|
|||
{
|
||||
"Collaborative markdown notes": "Markdown 協作筆記",
|
||||
"Realtime collaborative markdown notes on all platforms.": "使用 Markdown 的跨平台即時協作筆記",
|
||||
"Best way to write and share your knowledge in markdown.": "您使用 Markdown 寫作與分享知識的最佳方式",
|
||||
"Intro": "簡介",
|
||||
"History": "紀錄",
|
||||
"New guest note": "建立訪客筆記",
|
||||
"Collaborate with URL": "使用網址協作",
|
||||
"Support charts and MathJax": "支援圖表與 MathJax",
|
||||
"Support slide mode": "支援簡報模式",
|
||||
"Sign In": "登入",
|
||||
"Below is the history from browser": "以下為來自瀏覽器的紀錄",
|
||||
"Welcome!": "歡迎!",
|
||||
"New note": "建立筆記",
|
||||
"or": "或",
|
||||
"Sign Out": "登出",
|
||||
"Explore all features": "探索所有功能",
|
||||
"Select tags...": "選擇標籤...",
|
||||
"Search keyword...": "搜尋關鍵字...",
|
||||
"Sort by title": "用標題排序",
|
||||
"Title": "標題",
|
||||
"Sort by time": "用時間排序",
|
||||
"Time": "時間",
|
||||
"Export history": "匯出紀錄",
|
||||
"Import history": "匯入紀錄",
|
||||
"Clear history": "清空紀錄",
|
||||
"Refresh history": "更新紀錄",
|
||||
"No history": "沒有紀錄",
|
||||
"Import from browser": "從瀏覽器匯入",
|
||||
"Releases": "版本",
|
||||
"Are you sure?": "你確定嗎?",
|
||||
"Cancel": "取消",
|
||||
"Yes, do it!": "沒錯,就這樣辦!",
|
||||
"Choose method": "選擇方式",
|
||||
"Sign in via %s": "透過 %s 登入",
|
||||
"New": "新增",
|
||||
"Publish": "發表",
|
||||
"Extra": "增益",
|
||||
"Revision": "修訂版本",
|
||||
"Slide Mode": "簡報模式",
|
||||
"Export": "匯出",
|
||||
"Import": "匯入",
|
||||
"Clipboard": "剪貼簿",
|
||||
"Download": "下載",
|
||||
"Raw HTML": "純 HTML",
|
||||
"Edit": "編輯",
|
||||
"View": "檢視",
|
||||
"Both": "雙欄",
|
||||
"Help": "協助",
|
||||
"Upload Image": "上傳圖片",
|
||||
"Menu": "選單",
|
||||
"This page need refresh": "此頁面需要重新整理",
|
||||
"You have an incompatible client version.": "您使用的是不相容的客戶端",
|
||||
"Refresh to update.": "請重新整理來更新",
|
||||
"New version available!": "新版本來了!",
|
||||
"See releases notes here": "請由此查閱更新紀錄",
|
||||
"Refresh to enjoy new features.": "請重新整理來享受最新功能",
|
||||
"Your user state has changed.": "您的使用者狀態已變更",
|
||||
"Refresh to load new user state.": "請重新整理來載入新的使用者狀態",
|
||||
"Refresh": "重新整理",
|
||||
"Contacts": "聯絡方式",
|
||||
"Report an issue": "回報問題",
|
||||
"Send us email": "寄信給我們",
|
||||
"Documents": "文件",
|
||||
"Features": "功能簡介",
|
||||
"YAML Metadata": "YAML Metadata",
|
||||
"Slide Example": "簡報範例",
|
||||
"Cheatsheet": "快速簡表",
|
||||
"Example": "範例",
|
||||
"Syntax": "語法",
|
||||
"Header": "標題",
|
||||
"Unordered List": "無序清單",
|
||||
"Ordered List": "有序清單",
|
||||
"Todo List": "待辦事項",
|
||||
"Blockquote": "引用",
|
||||
"Bold font": "粗體",
|
||||
"Italics font": "斜體",
|
||||
"Strikethrough": "刪除線",
|
||||
"Inserted text": "插入文字",
|
||||
"Marked text": "標記文字",
|
||||
"Link": "連結",
|
||||
"Image": "圖片",
|
||||
"Code": "程式碼",
|
||||
"Externals": "外部",
|
||||
"This is a alert area.": "這是警告區塊",
|
||||
"Revert": "還原",
|
||||
"Import from clipboard": "從剪貼簿匯入",
|
||||
"Paste your markdown or webpage here...": "在這裡貼上 Markdown 或是網頁內容...",
|
||||
"Clear": "清除",
|
||||
"This note is locked": "此份筆記已被鎖定",
|
||||
"Sorry, only owner can edit this note.": "抱歉,只有擁有者可以編輯此筆記",
|
||||
"OK": "好的",
|
||||
"Reach the limit": "到達上限",
|
||||
"Sorry, you've reached the max length this note can be.": "抱歉,您已使用到此份筆記可用的最大長度",
|
||||
"Please reduce the content or divide it to more notes, thank you!": "請減少內容或是將內容切成更多筆記,謝謝!",
|
||||
"Import from Gist": "從 Gist 匯入",
|
||||
"Paste your gist url here...": "在這裡貼上 gist 網址...",
|
||||
"Import from Snippet": "從 Snippet 匯入",
|
||||
"Select From Available Projects": "從可用的專案中選擇",
|
||||
"Select From Available Snippets": "從可用的 Snippets 中選擇",
|
||||
"OR": "或是",
|
||||
"Export to Snippet": "匯出到 Snippet",
|
||||
"Select Visibility Level": "選擇可見層級"
|
||||
}
|
104
locales/zh.json
104
locales/zh.json
|
@ -1,104 +0,0 @@
|
|||
{
|
||||
"Collaborative markdown notes": "Markdown 協作筆記",
|
||||
"Realtime collaborative markdown notes on all platforms.": "使用 Markdown 的跨平台即時協作筆記",
|
||||
"Best way to write and share your knowledge in markdown.": "您使用 Markdown 寫作與分享知識的最佳方式",
|
||||
"Intro": "簡介",
|
||||
"History": "紀錄",
|
||||
"New guest note": "建立訪客筆記",
|
||||
"Collaborate with URL": "使用網址協作",
|
||||
"Support charts and MathJax": "支援圖表與 MathJax",
|
||||
"Support slide mode": "支援簡報模式",
|
||||
"Sign In": "登入",
|
||||
"Below is the history from browser": "以下為來自瀏覽器的紀錄",
|
||||
"Welcome!": "歡迎!",
|
||||
"New note": "建立筆記",
|
||||
"or": "或",
|
||||
"Sign Out": "登出",
|
||||
"Explore all features": "探索所有功能",
|
||||
"Select tags...": "選擇標籤...",
|
||||
"Search keyword...": "搜尋關鍵字...",
|
||||
"Sort by title": "用標題排序",
|
||||
"Title": "標題",
|
||||
"Sort by time": "用時間排序",
|
||||
"Time": "時間",
|
||||
"Export history": "匯出紀錄",
|
||||
"Import history": "匯入紀錄",
|
||||
"Clear history": "清空紀錄",
|
||||
"Refresh history": "更新紀錄",
|
||||
"No history": "沒有紀錄",
|
||||
"Import from browser": "從瀏覽器匯入",
|
||||
"Releases": "版本",
|
||||
"Are you sure?": "你確定嗎?",
|
||||
"Cancel": "取消",
|
||||
"Yes, do it!": "沒錯,就這樣辦!",
|
||||
"Choose method": "選擇方式",
|
||||
"Sign in via %s": "透過 %s 登入",
|
||||
"New": "新增",
|
||||
"Publish": "發表",
|
||||
"Extra": "增益",
|
||||
"Revision": "修訂版本",
|
||||
"Slide Mode": "簡報模式",
|
||||
"Export": "匯出",
|
||||
"Import": "匯入",
|
||||
"Clipboard": "剪貼簿",
|
||||
"Download": "下載",
|
||||
"Raw HTML": "純 HTML",
|
||||
"Edit": "編輯",
|
||||
"View": "檢視",
|
||||
"Both": "雙欄",
|
||||
"Help": "協助",
|
||||
"Upload Image": "上傳圖片",
|
||||
"Menu": "選單",
|
||||
"This page need refresh": "此頁面需要重新整理",
|
||||
"You have an incompatible client version.": "您使用的是不相容的客戶端",
|
||||
"Refresh to update.": "請重新整理來更新",
|
||||
"New version available!": "新版本來了!",
|
||||
"See releases notes here": "請由此查閱更新紀錄",
|
||||
"Refresh to enjoy new features.": "請重新整理來享受最新功能",
|
||||
"Your user state has changed.": "您的使用者狀態已變更",
|
||||
"Refresh to load new user state.": "請重新整理來載入新的使用者狀態",
|
||||
"Refresh": "重新整理",
|
||||
"Contacts": "聯絡方式",
|
||||
"Report an issue": "回報問題",
|
||||
"Send us email": "寄信給我們",
|
||||
"Documents": "文件",
|
||||
"Features": "功能簡介",
|
||||
"YAML Metadata": "YAML Metadata",
|
||||
"Slide Example": "簡報範例",
|
||||
"Cheatsheet": "快速簡表",
|
||||
"Example": "範例",
|
||||
"Syntax": "語法",
|
||||
"Header": "標題",
|
||||
"Unordered List": "無序清單",
|
||||
"Ordered List": "有序清單",
|
||||
"Todo List": "待辦事項",
|
||||
"Blockquote": "引用",
|
||||
"Bold font": "粗體",
|
||||
"Italics font": "斜體",
|
||||
"Strikethrough": "刪除線",
|
||||
"Inserted text": "插入文字",
|
||||
"Marked text": "標記文字",
|
||||
"Link": "連結",
|
||||
"Image": "圖片",
|
||||
"Code": "程式碼",
|
||||
"Externals": "外部",
|
||||
"This is a alert area.": "這是警告區塊",
|
||||
"Revert": "還原",
|
||||
"Import from clipboard": "從剪貼簿匯入",
|
||||
"Paste your markdown or webpage here...": "在這裡貼上 Markdown 或是網頁內容...",
|
||||
"Clear": "清除",
|
||||
"This note is locked": "此份筆記已被鎖定",
|
||||
"Sorry, only owner can edit this note.": "抱歉,只有擁有者可以編輯此筆記",
|
||||
"OK": "好的",
|
||||
"Reach the limit": "到達上限",
|
||||
"Sorry, you've reached the max length this note can be.": "抱歉,您已使用到此份筆記可用的最大長度",
|
||||
"Please reduce the content or divide it to more notes, thank you!": "請減少內容或是將內容切成更多筆記,謝謝!",
|
||||
"Import from Gist": "從 Gist 匯入",
|
||||
"Paste your gist url here...": "在這裡貼上 gist 網址...",
|
||||
"Import from Snippet": "從 Snippet 匯入",
|
||||
"Select From Available Projects": "從可用的專案中選擇",
|
||||
"Select From Available Snippets": "從可用的 Snippets 中選擇",
|
||||
"OR": "或是",
|
||||
"Export to Snippet": "匯出到 Snippet",
|
||||
"Select Visibility Level": "選擇可見層級"
|
||||
}
|
1
locales/zh.json
Symbolic link
1
locales/zh.json
Symbolic link
|
@ -0,0 +1 @@
|
|||
locales/zh-TW.json
|
|
@ -11,6 +11,9 @@ $('.ui-locale option').each(function () {
|
|||
})
|
||||
if (Cookies.get('locale')) {
|
||||
lang = Cookies.get('locale')
|
||||
if (lang === 'zh') {
|
||||
lang = 'zh-TW'
|
||||
}
|
||||
} else if (supportLangs.indexOf(userLang) !== -1) {
|
||||
lang = supportLangs[supportLangs.indexOf(userLang)]
|
||||
} else if (supportLangs.indexOf(userLangCode) !== -1) {
|
||||
|
|
|
@ -130,7 +130,8 @@
|
|||
</p>
|
||||
<select class="ui-locale">
|
||||
<option value="en">English</option>
|
||||
<option value="zh">中文</option>
|
||||
<option value="zh-CN">简体中文</option>
|
||||
<option value="zh-TW">繁體中文</option>
|
||||
<option value="fr">Français</option>
|
||||
<option value="de">Deutsch</option>
|
||||
<option value="ja">日本語</option>
|
||||
|
|
Loading…
Reference in a new issue