Skip to content

Commit

Permalink
加入国际化的支持
Browse files Browse the repository at this point in the history
  • Loading branch information
topcss committed Nov 28, 2018
1 parent d73d516 commit 0db13c8
Show file tree
Hide file tree
Showing 16 changed files with 604 additions and 380 deletions.
17 changes: 17 additions & 0 deletions doc/History.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,25 @@

[**桌面版脑图**](https://github.com/NaoTu/DesktopNaotu) 是百度脑图的离线版,帮助你在没有互联网环境的情况下,依然可以使用脑图工具。

## 各版本对应的系统

| 操作系统 | 位数 | 对应文件 | 大小 | 支持情况 |
| -------- | -----: | -----: | :---- | -- |
| MacOS | 64位 | DesktopNaotu-macOS-x64 | < 50M | 支持全部功能 |
| Linux | 64位 | DesktopNaotu-linux-x64 | < 50M | 支持全部功能 |
| Windows 7/10 | 64位 | DesktopNaotu-win32-x64 | < 50M | 支持全部功能 |
| Windows 7/10 | 32位 | DesktopNaotu-win32-ia32 | < 50M | 支持全部功能 |
| Windows XP | 32位 | DesktopNaotu-Windows-mini | < 8M | 不支持调试 |

## 更新记录

### 3.0.0 / 2018-11-28

- 正式支持多语言。`鸣谢:涛`
- 初版支持中文简体、中文繁体、英文
- 软件的语言默认基于系统语言设置,也可以通过修改配置文件来强制改变
- 修复其他小问题

### 2.1.1 / 2018-11-22

- 修复 上传本地图片后无法导出png的问题。
Expand Down
3 changes: 3 additions & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,9 @@ gulp.task('bower', function () {
// });

gulp.task('copy-js-vendor', function () {
// i18n
gulp.src(["locale/*.json"]).pipe(gulp.dest('dist/locale'));

// 解决需要引入的问题,单独处理
gulp.src(["bower_components/jquery/dist/jquery.min.js"])
.pipe(gulp.dest('dist/js'));
Expand Down
38 changes: 38 additions & 0 deletions locale/de.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"mFile": "&File",
"miNewFile": "&New File",
"miOpenFile": "&Open File...",
"miOpenFolder": "Open &Folder...",
"miOpenRecent": "Open &Recent",
"miClearRecent": "&Clear Recently Opened",
"miSave": "&Save",
"miSaveAs": "Save &As...",
"miExport": "&Export...",
"miAutoSave": "A&uto Save",
"miSavePath": "Re-select the automatically saved directory(&R)",
"miExit": "E&xit",
"mEdit": "&Edit",
"miUndo": "&Undo",
"miRedo": "&Redo",
"miCut": "Cu&t",
"miCopy": "&Copy",
"miPaste": "&Paste",
"mWindow": "&Window",
"miMaxWin": "Ma&ximize",
"miMinWin": "Mi&nimise",
"mHelp": "&Help",
"miShortcut": "&Keyboard Shortcuts",
"miBackup": "Help document(&V)",
"miCheckVer": "Check for &Updates...",
"miAbout": "&About",
"sMainTopic": "Main Topic",
"sLoadedError": "Failed to load the file! Only support .km format file!",
"sNoFileLocation": "file does not exist",
"sNoUpdatesAvailable": "no updates available.",
"sAppName": "Desktop Naotu",
"sUpdateMessage": "A new version has been detected, please download the new version.",
"sExportKm": "Export .Km",
"sSaveKm": "Save .Km",
"sNoOpenFile": "You have not opened any files yet.",
"sNewKm": "New file will close the current file, continue?"
}
38 changes: 38 additions & 0 deletions locale/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"mFile": "&File",
"miNewFile": "&New File",
"miOpenFile": "&Open File...",
"miOpenFolder": "Open &Folder...",
"miOpenRecent": "Open &Recent",
"miClearRecent": "&Clear Recently Opened",
"miSave": "&Save",
"miSaveAs": "Save &As...",
"miExport": "&Export...",
"miAutoSave": "A&uto Save",
"miSavePath": "Re-select the automatically saved directory(&R)",
"miExit": "E&xit",
"mEdit": "&Edit",
"miUndo": "&Undo",
"miRedo": "&Redo",
"miCut": "Cu&t",
"miCopy": "&Copy",
"miPaste": "&Paste",
"mWindow": "&Window",
"miMaxWin": "Ma&ximize",
"miMinWin": "Mi&nimise",
"mHelp": "&Help",
"miShortcut": "&Keyboard Shortcuts",
"miBackup": "Help document(&V)",
"miCheckVer": "Check for &Updates...",
"miAbout": "&About",
"sMainTopic": "Main Topic",
"sLoadedError": "Failed to load the file! Only support .km format file!",
"sNoFileLocation": "file does not exist",
"sNoUpdatesAvailable": "no updates available.",
"sAppName": "Desktop Naotu",
"sUpdateMessage": "A new version has been detected, please download the new version.",
"sExportKm": "Export .Km",
"sSaveKm": "Save .Km",
"sNoOpenFile": "You have not opened any files yet.",
"sNewKm": "New file will close the current file, continue?"
}
38 changes: 38 additions & 0 deletions locale/zh_CN.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"mFile": "文件(&F)",
"miNewFile": "新建文件(&N)",
"miOpenFile": "打开文件(&O)...",
"miOpenFolder": "打开文件夹(&F)...",
"miOpenRecent": "打开最近的文件(&R)",
"miClearRecent": "清除最近打开记录",
"miSave": "保存(&S)",
"miSaveAs": "另存为(&A)...",
"miExport": "导出(&E)...",
"miAutoSave": "自动保存",
"miSavePath": "重选自动保存的目录(&R)",
"miExit": "退出(&X)",
"mEdit": "编辑(&E)",
"miUndo": "撤销(&U)",
"miRedo": "恢复(&R)",
"miCut": "剪切(&T)",
"miCopy": "复制(&C)",
"miPaste": "粘贴(&P)",
"mWindow": "窗口(&W)",
"miMaxWin": "最大化(&X)",
"miMinWin": "最小化(&N)",
"mHelp": "帮助(&H)",
"miShortcut": "快捷键(&H)...",
"miBackup": "备份百度脑图到本地(&V)",
"miCheckVer": "检查更新...(&N)",
"miAbout": "关于(&A)",
"sMainTopic": "中心主题",
"sLoadedError": "加载文件失败!只允许打开.km格式的文件!",
"sNoFileLocation": "文件路径不存在",
"sNoUpdatesAvailable": "当前没有可用的更新。",
"sAppName": "桌面版脑图",
"sUpdateMessage": "检测到新版本,请下载新版本。",
"sExportKm": "导出 KityMinder 文件",
"sSaveKm": "保存 KityMinder 文件",
"sNoOpenFile": "您当前还未打开任何文件。",
"sNewKm": "新建文件会关闭当前文件,是否继续?"
}
38 changes: 38 additions & 0 deletions locale/zh_TW.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"mFile": "文件(&F)",
"miNewFile": "新建文件(&N)",
"miOpenFile": "打開文件(&O)...",
"miOpenFolder": "打開文件夾(&F)...",
"miOpenRecent": "打開最近的文件(&R)",
"miClearRecent": "清除最近打開記錄",
"miSave": "保存(&S)",
"miSaveAs": "另存為(&A)...",
"miExport": "導出(&E)...",
"miAutoSave": "自動保存",
"miSavePath": "重選自動保存的目錄(&R)",
"miExit": "退出(&X)",
"mEdit": "編輯(&E)",
"miUndo": "撤銷(&U)",
"miRedo": "恢復(&R)",
"miCut": "剪切(&T)",
"miCopy": "複製(&C)",
"miPaste": "粘貼(&P)",
"mWindow": "窗口(&W)",
"miMaxWin": "最大化(&X)",
"miMinWin": "最小化(&N)",
"mHelp": "幫助(&H)",
"miShortcut": "快捷鍵(&H)...",
"miBackup": "備份百度腦圖到本地(&V)",
"miCheckVer": "檢查更新...(&N)",
"miAbout": "關於(&A)",
"sMainTopic": "中心主題",
"sLoadedError": "加載文件失敗!只允許打開.km格式的文件!",
"sNoFileLocation": "文件路徑不存在",
"sNoUpdatesAvailable": "當前沒有可用的更新。",
"sAppName": "桌面版腦圖",
"sUpdateMessage": "檢測到新版本,請下載新版本。",
"sExportKm": "導出 KityMinder 文件",
"sSaveKm": "保存 KityMinder 文件",
"sNoOpenFile": "您當前還未打開任何文件。",
"sNewKm": "新建文件會關閉當前文件,是否繼續?"
}
2 changes: 1 addition & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function createWindow() {

'fullscreenable': true,
'show': false,
'icon': `${__dirname}/favicon.png`,
'icon': `${__dirname}/favicon.ico`,
'backgroundColor': '#fbfbfb'
});

Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "desktopnaotu",
"version": "2.1.1",
"version": "3.0.0",
"description": "桌面版脑图",
"main": "main.js",
"scripts": {
"start": "gulp default && electron main.js",
"packwin32": "electron-packager ./ DesktopNaotu --platform=win32 --arch=ia32 --out=../OutApp --icon=favicon.ico --electron-version=3.0.10 --app-version=2.1.1 --ignore=\"(.git|screenshot|doc|src|bower_components|electron-packager)\" --overwrite --prune",
"packwin64": "electron-packager ./ DesktopNaotu --platform=win32 --arch=x64 --out=../OutApp --icon=favicon.ico --electron-version=3.0.10 --app-version=2.1.1 --ignore=\"(.git|screenshot|doc|src|bower_components|electron-packager)\" --overwrite --prune",
"packmacos": "electron-packager ./ DesktopNaotu --platform=darwin --arch=x64 --out=../OutApp --icon=favicon.icns --electron-version=3.0.10 --app-version=2.1.1 --ignore=\"(.git|screenshot|doc|src|bower_components|electron-packager)\" --overwrite --prune",
"packlinux": "electron-packager ./ DesktopNaotu --platform=linux --arch=x64 --out=../OutApp --icon=favicon.png --electron-version=3.0.10 --app-version=2.1.1 --ignore=\"(.git|screenshot|doc|src|bower_components|electron-packager)\" --overwrite --prune"
"packwin32": "electron-packager ./ DesktopNaotu --platform=win32 --arch=ia32 --out=../OutApp --icon=favicon.ico --electron-version=3.0.10 --app-version=3.0.0 --ignore=\"(.git|screenshot|doc|src|bower_components|electron-packager)\" --overwrite --prune",
"packwin64": "electron-packager ./ DesktopNaotu --platform=win32 --arch=x64 --out=../OutApp --icon=favicon.ico --electron-version=3.0.10 --app-version=3.0.0 --ignore=\"(.git|screenshot|doc|src|bower_components|electron-packager)\" --overwrite --prune",
"packmacos": "electron-packager ./ DesktopNaotu --platform=darwin --arch=x64 --out=../OutApp --icon=favicon.icns --electron-version=3.0.10 --app-version=3.0.0 --ignore=\"(.git|screenshot|doc|src|bower_components|electron-packager)\" --overwrite --prune",
"packlinux": "electron-packager ./ DesktopNaotu --platform=linux --arch=x64 --out=../OutApp --icon=favicon.png --electron-version=3.0.10 --app-version=3.0.0 --ignore=\"(.git|screenshot|doc|src|bower_components|electron-packager)\" --overwrite --prune"
},
"repository": {
"type": "git",
Expand Down
Loading

0 comments on commit 0db13c8

Please sign in to comment.