diff --git a/src/main/services/i18n/locales/en/common.json b/src/main/services/i18n/locales/en/common.json index 0de458ca..1ec24573 100644 --- a/src/main/services/i18n/locales/en/common.json +++ b/src/main/services/i18n/locales/en/common.json @@ -50,5 +50,7 @@ "darkMode": "Dark Mode", "background": "Background", "restartApp": "Restart massCode", - "updateAvailable": "Update Available" + "updateAvailable": "Update Available", + "hide": "Hide", + "show": "Show" } \ No newline at end of file diff --git a/src/main/services/i18n/locales/en/menu.json b/src/main/services/i18n/locales/en/menu.json index e43c71bb..b7a6daa4 100644 --- a/src/main/services/i18n/locales/en/menu.json +++ b/src/main/services/i18n/locales/en/menu.json @@ -63,5 +63,6 @@ "format": "Format", "previewMarkdown": "Preview Markdown", "previewCode": "Preview Code", + "previewScreenshot": "Preview Screenshot" } } \ No newline at end of file diff --git a/src/main/services/i18n/locales/en/preferences.json b/src/main/services/i18n/locales/en/preferences.json index 0e53c639..2a283b46 100644 --- a/src/main/services/i18n/locales/en/preferences.json +++ b/src/main/services/i18n/locales/en/preferences.json @@ -41,6 +41,7 @@ "language": { "label": "Language", "en": "English", - "ru": "Русский" + "ru": "Русский", + "zh_CN": "简体中文" } } \ No newline at end of file diff --git a/src/main/services/i18n/locales/ru/common.json b/src/main/services/i18n/locales/ru/common.json index aaea5935..e12d1d80 100644 --- a/src/main/services/i18n/locales/ru/common.json +++ b/src/main/services/i18n/locales/ru/common.json @@ -49,5 +49,7 @@ "darkMode": "Темный режим", "background": "Фон", "restartApp": "Перезагрузить massCode", - "updateAvailable": "Доступно обновление" + "updateAvailable": "Доступно обновление", + "hide": "Hide", + "show": "Show" } \ No newline at end of file diff --git a/src/main/services/i18n/locales/ru/menu.json b/src/main/services/i18n/locales/ru/menu.json index 9c7a5296..e3464b31 100644 --- a/src/main/services/i18n/locales/ru/menu.json +++ b/src/main/services/i18n/locales/ru/menu.json @@ -62,6 +62,7 @@ "copy": "Скопировать сниппет в буфер", "format": "Форматировать", "previewMarkdown": "Просмотр Markdown", - "previewCode": "Просмотр результата HTML/CSS" + "previewCode": "Просмотр результата HTML/CSS", + "previewScreenshot": "Просмотр скриншота" } } \ No newline at end of file diff --git a/src/main/services/i18n/locales/ru/preferences.json b/src/main/services/i18n/locales/ru/preferences.json index f5e254e0..bceb3fe7 100644 --- a/src/main/services/i18n/locales/ru/preferences.json +++ b/src/main/services/i18n/locales/ru/preferences.json @@ -41,6 +41,7 @@ "language": { "label": "Язык", "en": "English", - "ru": "Русский" + "ru": "Русский", + "zh_CN": "简体中文" } } \ No newline at end of file diff --git a/src/main/services/i18n/locales/zh_CN/common.json b/src/main/services/i18n/locales/zh_CN/common.json new file mode 100644 index 00000000..ca602e13 --- /dev/null +++ b/src/main/services/i18n/locales/zh_CN/common.json @@ -0,0 +1,56 @@ +{ + "button": { + "moveStorage": "更改存储路径", + "openStorage": "打开现有存储", + "fromMassCodeV1": "来自 massCode v1.0", + "fromSnippetsLab": "来自 SnippetsLab", + "confirm": "确认", + "cancel": "取消", + "update": ["前往 GitHub", "OK"] + }, + "newFolder": "新建文件夹", + "newSnippet": "新建代码片段", + "newFragment": "新建子片段", + "addDescription": "添加描述", + "addToFavorites": "添加至收藏夹", + "addTag": "添加标签", + "rename": "重命名", + "duplicate": "创建副本", + "delete": "删除", + "deleteNow": "立即删除", + "defaultLanguage": "默认语言", + "removeFromFavorites": "从收藏夹移除", + "emptyTrash": "清空回收站", + "close": "关闭", + "folder": { + "untitled": "未命名文件夹", + "plural": "文件夹" + }, + "snippet": { + "untitled": "未命名代码片段", + "plural": "代码片段", + "emptyName": "请输入该代码片段名称", + "selectedMultiple": "已选中 {{count}} 个代码片段", + "noSelected": "未选中代码片段" + }, + "fragment": "子片段", + "search": "搜索", + "line": "行", + "column": "列", + "sidebar": { + "inbox": "暂存区", + "favorites": "收藏夹", + "allSnippets": "所有的", + "trash": "回收站", + "untitled": "未命名文件夹", + "folders": "自定义文件夹", + "library": "库", + "tags": "标签" + }, + "darkMode": "深色模式", + "background": "背景", + "restartApp": "重启 massCode", + "updateAvailable": "存在新版本", + "hide": "隐藏", + "show": "显示" +} \ No newline at end of file diff --git a/src/main/services/i18n/locales/zh_CN/dialog.json b/src/main/services/i18n/locales/zh_CN/dialog.json new file mode 100644 index 00000000..5183db08 --- /dev/null +++ b/src/main/services/i18n/locales/zh_CN/dialog.json @@ -0,0 +1,12 @@ +{ + "deleteConfirm": "你是否确定要永久删除 {{name}} ?", + "deleteConfirmMultipleSnippets": "你是否确定要永久删除 {{count}} 个选中的代码片段?", + "noUndo": "本操作将无法撤销。", + "allSnippetsMoveToTrash": "本文件夹内的所有代码片段将被移动至回收站。", + "deleteTag": "将会从所有拥有该标签的代码片段中删除该标签。", + "emptyTrash": "你是否确定要永久删除回收站内的所有代码片段?", + "migrateConfirm": [ + "你是否确定要从 {{name}} 迁移数据?", + "在迁移过程中,当前的库将被覆盖。" + ] +} \ No newline at end of file diff --git a/src/main/services/i18n/locales/zh_CN/menu.json b/src/main/services/i18n/locales/zh_CN/menu.json new file mode 100644 index 00000000..25878a3c --- /dev/null +++ b/src/main/services/i18n/locales/zh_CN/menu.json @@ -0,0 +1,68 @@ +{ + "app": { + "label": "massCode", + "preferences": "首选项", + "update": { + "label": "检查更新…", + "message": "新版本 {{newVersion}} 现在已经可以下载。\n现在的版本是 {{oldVersion}} 。", + "button": ["前往 GitHub", "OK"], + "noUpdate": "当前没有可用的更新。" + }, + "quit": "退出 massCode", + "about": "关于 massCode", + "hide": "最小化 massCode", + "hideOther": "最小化其它窗口", + "showAll": "显示所有窗口" + }, + "help": { + "label": "帮助", + "website": "访问官网", + "documentation": "访问文档", + "viewInGitHub": "访问 GitHub", + "changeLog": "更新日志", + "reportIssue": "提交 Issue", + "giveStar": "给个 Star", + "extension": { + "vscode": "VS Code 插件", + "raycast": "Raycast 插件", + "alfred": "Alfred 插件" + }, + "donate": { + "openCollective": "通过 Open Collective 捐赠", + "payPal": "通过 PayPal 捐赠" + }, + "twitter": "访问作者 Twitter", + "devTools": "开发者工具" + }, + "file": { + "label": "文件", + "find": "查找" + }, + "view": { + "label": "查看", + "sortBy": { + "label": "排序方式", + "dateModified": "根据修改日期", + "dateCreated": "根据创建日期", + "name": "根据片段名" + } + }, + "edit": { + "label": "编辑", + "undo": "撤销", + "redo": "恢复", + "cut": "剪切", + "copy": "复制", + "paste": "粘贴", + "delete": "删除", + "selectAll": "全选" + }, + "editor": { + "label": "编辑器", + "copy": "将代码片段复制至剪贴板", + "format": "格式化", + "previewMarkdown": "预览 Markdown", + "previewCode": "预览 HTML 和 CSS", + "previewScreenshot": "生成并预览代码截图" + } +} \ No newline at end of file diff --git a/src/main/services/i18n/locales/zh_CN/preferences.json b/src/main/services/i18n/locales/zh_CN/preferences.json new file mode 100644 index 00000000..b938bb1d --- /dev/null +++ b/src/main/services/i18n/locales/zh_CN/preferences.json @@ -0,0 +1,47 @@ +{ + "title": "首选项", + "storage": { + "label": "存储路径", + "migrate": "迁移", + "count": "总计" + }, + "editor": { + "label": "编辑器", + "fontSize": "字体大小", + "fontFamily": "字体系列", + "wrap": { + "label": "自动换行", + "wordWrap": "开启", + "off": "关闭" + }, + "tabSize": "Tab 空格数", + "showInvisibles": "显示空格与换行符", + "highlightLine": "高亮光标所在行整行", + "highlightGutter": "高亮光标所在行行号", + "prettier": { + "label": "Prettier", + "trailingComma": { + "label": "尾后逗号", + "none": "None", + "all": "All", + "es6": "ES6" + }, + "semi": "句尾添加分号", + "singleQuote": "使用单引号代替双引号" + } + }, + "appearance": { + "label": "外观", + "theme": { + "label": "主题", + "light": "浅色", + "dark": "深色" + } + }, + "language": { + "label": "语言", + "en": "English", + "ru": "Русский", + "zh_CN": "简体中文" + } +} \ No newline at end of file diff --git a/src/main/services/i18n/locales/zh_CN/special.json b/src/main/services/i18n/locales/zh_CN/special.json new file mode 100644 index 00000000..477a9f55 --- /dev/null +++ b/src/main/services/i18n/locales/zh_CN/special.json @@ -0,0 +1,24 @@ +{ + "description": { + "storage": "要使用 iCloud Drive、Google Drive 和 Dropbox 等同步服务,只需将存储路径设置为相应的同步文件夹即可。", + "migrate": { + "1": "从 massCode v1.0 迁移:选择包含数据库文件的文件夹。", + "2": "从 SnippetsLab 迁移:选择 JSON 文件。", + "3": [ + "从SnippetsLab迁移将会遇到一些局限:", + "所有的文件夹将是第一层,因为 JSON 文件(低于 v2.1)无法表示嵌套的文件夹。", + "某些片段可能会因为其语言暂时不被 massCode 而被识别为纯文本。" + ] + }, + "htmlCssPreview": "添加带有 HTML 和 CSS 语言的片段来查看预览结果。" + }, + "success": { + "migrate": "数据库迁移成功。" + }, + "error": { + "folderNotContainDb": "文件夹内不存在 \"db.json\"." + }, + "unsponsored": "未赞助的", + "supportMessage": "Hi,我是 Anton 👋

\n感谢你使用 massCode 。如果你觉得这个应用很有帮助,请{{-tagStart}} 捐赠 {{-tagEnd}}。这将激励我继续开发这个项目。", + "snippetsShowcase": "代码片段展示区" +} \ No newline at end of file diff --git a/src/renderer/components/preferences/LanguagePreferences.vue b/src/renderer/components/preferences/LanguagePreferences.vue index 7c9f0109..58ea44b7 100644 --- a/src/renderer/components/preferences/LanguagePreferences.vue +++ b/src/renderer/components/preferences/LanguagePreferences.vue @@ -44,10 +44,13 @@ const options = [ label: i18n.t('preferences:language.en'), value: 'en' }, - { label: i18n.t('preferences:language.ru'), value: 'ru' + }, + { + label: i18n.t('preferences:language.zh_CN'), + value: 'zh_CN' } ]