From 27903e42e0ca76a1d9bf9f4f558175d554e473db Mon Sep 17 00:00:00 2001 From: Self Not Found Date: Tue, 16 May 2023 21:49:09 +0800 Subject: [PATCH 1/3] Add translations for Simplified Chinese(zh_CN) --- src/Backup.ts | 2 +- src/locales/zh_CN.json | 46 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 src/locales/zh_CN.json diff --git a/src/Backup.ts b/src/Backup.ts index ce72eda..b47114b 100644 --- a/src/Backup.ts +++ b/src/Backup.ts @@ -62,7 +62,7 @@ class Backup { this.log.verbose("Conf translation"); const joplinLocale = await joplin.settings.globalValue("locale"); i18n = new I18n({ - locales: ["en_US", "de_DE"], + locales: ["en_US", "de_DE", "zh_CN"], defaultLocale: "en_US", fallbacks: { "en_*": "en_US" }, updateFiles: false, diff --git a/src/locales/zh_CN.json b/src/locales/zh_CN.json new file mode 100644 index 0000000..d6adfe0 --- /dev/null +++ b/src/locales/zh_CN.json @@ -0,0 +1,46 @@ +{ + "settings.path": "备份路径", + "settings.exportPath": "临时导出路径", + "settings.exportPath.description": "用于在导出日志的临时Temporary path for note export from Joplin, before they are copyed to backup destination", + "settings.backupRetention": "保留 x 个备份", + "settings.backupRetention.description": "如果设置了多个备份, 则会根据“备份集名称”在“备份路径”下创建多个子文件夹", + "settings.backupInterval": "备份间隔(以小时为单位)", + "settings.backupInterval.description": "0 = 停止自动备份", + "settings.onlyOnChange": "仅在更改时备份", + "settings.onlyOnChange.description": "仅当笔记发生更改时,在指定的备份间隔内创建备份", + "settings.usePassword": "使用密码保护备份", + "settings.usePassword.description": "备份将通过加密的ZIP压缩文件进行保护", + "settings.password": "密码", + "settings.password.description": "如果输入了密码,则备份将受到密码保护", + "settings.passwordRepeat": "重复密码", + "settings.passwordRepeat.description": "请重复输入密码以确认", + "settings.fileLogLevel": "日志级别", + "settings.createSubfolder": "创建子文件夹", + "settings.createSubfolder.description": "在配置的备份路径中创建一个子文件夹。请在“备份路径”中没有其他数据时才禁用!", + "settings.zipArchive": "创建ZIP压缩文件", + "settings.zipArchive.description": "如果设置了“使用密码保护备份”,则总是会创建ZIP压缩文件", + "settings.compressionLevel": "ZIP压缩级别", + "settings.compressionLevel.description": "ZIP压缩文件的压缩级别", + "settings.backupSetName": "备份集名称", + "settings.backupSetName.description": "如果要保留多个备份,请为备份集指定名称", + "settings.backupPlugins": "备份插件", + "settings.backupPlugins.description": "备份插件的JPL文件(不会备份插件设置!)", + "settings.exportFormat": "导出格式", + "settings.exportFormat.description": "笔记的备份格式", + "settings.singleJex": "生成单个JEX文件", + "settings.singleJex.description": "为所有笔记本创建单个JEX文件(建议选中,以免丢失内部笔记链接和文件夹结构)", + "settings.execFinishCmd": "备份后执行命令", + "settings.execFinishCmd.description": "备份完成后所执行的命令/程序", + "backup.Completed": "备份完成", + "error.PluginUpgrade": "升级错误 %s: %s", + "error.folderCreation": "创建文件夹时出错: %s", + "error.ConfigureBackupPath": "请在Joplin > 工具 > 选项 > 备份 中配置备份路径", + "error.error.PasswordMatch": "密码不正确!", + "error.BackupPathDontExist": "备份路径 '%s' 不存在!", + "error.BackupAlreadyRunning": "已经在进行备份!", + "error.Backup": "备份为 %s 时出错: %s", + "error.fileCopy": " %s 时复制文件/文件夹出错: %s", + "error.deleteFile": " %s 时删除文件/文件夹出错: %s", + "command.createBackup": "创建备份", + "error.BackupSetNotSupportedChars": "“备份集名称”包含不允许的字符 ( %s )!" +} From 7c01b62561d66812fd9e85d7cde3efc36fe7d8f1 Mon Sep 17 00:00:00 2001 From: JackGruber <24863925+JackGruber@users.noreply.github.com> Date: Wed, 17 May 2023 07:48:35 +0200 Subject: [PATCH 2/3] Add changelog entry Simplified Chinese --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7bd264e..dcac8a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## not released +- Add: #55 Simplified Chinese(zh_CN) translation, thanks to @wh201906 + ## v1.3.0 (2023-05-14) - Add: German translation From 63b8b9c89505f554b6efbd72072f808143f2ce49 Mon Sep 17 00:00:00 2001 From: JackGruber <24863925+JackGruber@users.noreply.github.com> Date: Fri, 19 May 2023 08:35:16 +0200 Subject: [PATCH 3/3] bump version 1.3.1 --- CHANGELOG.md | 2 ++ package-lock.json | 4 ++-- package.json | 2 +- src/manifest.json | 2 +- 4 files changed, 6 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dcac8a9..a6470a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## not released +## v1.3.1 (2023-05-19) + - Add: #55 Simplified Chinese(zh_CN) translation, thanks to @wh201906 ## v1.3.0 (2023-05-14) diff --git a/package-lock.json b/package-lock.json index 40afeb0..3d3c4e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "joplin-plugin-backup", - "version": "1.3.0", + "version": "1.3.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "joplin-plugin-backup", - "version": "1.3.0", + "version": "1.3.1", "license": "MIT", "dependencies": { "@types/i18n": "^0.13.6", diff --git a/package.json b/package.json index 6102eed..bdf41a0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "joplin-plugin-backup", - "version": "1.3.0", + "version": "1.3.1", "scripts": { "dist": "webpack --joplin-plugin-config buildMain && webpack --joplin-plugin-config buildExtraScripts && webpack --joplin-plugin-config createArchive", "prepare": "npm run dist && husky install", diff --git a/src/manifest.json b/src/manifest.json index a701c0f..2e37e40 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -2,7 +2,7 @@ "manifest_version": 1, "id": "io.github.jackgruber.backup", "app_min_version": "2.1.3", - "version": "1.3.0", + "version": "1.3.1", "name": "Simple Backup", "description": "Plugin to create manual and automatic backups.", "author": "JackGruber",