{"id":37854040,"url":"https://github.com/cngege/githubdesktop2chinese","last_synced_at":"2026-02-26T20:15:10.741Z","repository":{"id":233165329,"uuid":"786202931","full_name":"cngege/GitHubDesktop2Chinese","owner":"cngege","description":"GithubDesktop语言本地化(汉化)工具 【GitHub桌面客户端中文汉化】","archived":false,"fork":false,"pushed_at":"2025-09-27T13:17:04.000Z","size":2879,"stargazers_count":374,"open_issues_count":0,"forks_count":62,"subscribers_count":3,"default_branch":"main","last_synced_at":"2026-01-27T11:45:47.694Z","etag":null,"topics":["chinese-simplified","chinese-translation","cpp","githubdesktop"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cngege.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-04-13T18:19:35.000Z","updated_at":"2026-01-27T06:53:19.000Z","dependencies_parsed_at":"2025-07-04T13:03:47.525Z","dependency_job_id":"fe787adb-f0b6-4f70-bd24-75e24c9f2190","html_url":"https://github.com/cngege/GitHubDesktop2Chinese","commit_stats":null,"previous_names":["cngege/githubdesktop2chinese"],"tags_count":79,"template":false,"template_full_name":null,"purl":"pkg:github/cngege/GitHubDesktop2Chinese","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cngege%2FGitHubDesktop2Chinese","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cngege%2FGitHubDesktop2Chinese/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cngege%2FGitHubDesktop2Chinese/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cngege%2FGitHubDesktop2Chinese/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cngege","download_url":"https://codeload.github.com/cngege/GitHubDesktop2Chinese/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cngege%2FGitHubDesktop2Chinese/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29437368,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-14T03:34:37.767Z","status":"ssl_error","status_checked_at":"2026-02-14T03:34:09.092Z","response_time":53,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chinese-simplified","chinese-translation","cpp","githubdesktop"],"created_at":"2026-01-16T16:23:59.981Z","updated_at":"2026-02-14T05:02:09.762Z","avatar_url":"https://github.com/cngege.png","language":"C++","readme":"﻿# GitHubDesktop2Chinese\n\n![GitHub Actions](https://img.shields.io/github/actions/workflow/status/cngege/GitHubDesktop2Chinese/build.yml)\n![GitHub Actions](https://img.shields.io/github/actions/workflow/status/cngege/GitHubDesktop2Chinese/check.yml?label=json检查)\n![GitHub Release](https://img.shields.io/github/v/release/cngege/GitHubDesktop2Chinese)\n![GitHub Release](https://img.shields.io/badge/Cpp-json-blue?logo=cplusplus)\n![GitHub License](https://img.shields.io/github/license/cngege/GitHubDesktop2Chinese)\n\n\n\n## 🥮这是什么\n\n\u003e 这是一个自动替换GithubDesktop中文本为目标语言文本的程序，  \n  优点是对GithubDesktop频繁更新的版本变化兼容性比较高。  \n  即便只有那么一两条失去了翻译，也只需要手动再修改添加一下即可，  \n  项目维护成本很低  \n\n## 🎯怎么使用它\n\n[🎀GOTO BiliBili Video🎀](https://www.bilibili.com/video/BV17HpSeHEaC/)\n\n\u003e 第一种方法: 下载或自行构建 GitHubDesktop2Chinese.exe 双击运行, 自动联网获取最新localization.json完成汉化  \n  第二种方法: 下载或自行构建 GitHubDesktop2Chinese.exe  和 localization.json  放在同一个文件夹。运行程序即可  \n  GitHubDesktop每次版本更新都需要运行一次此程序才能完成汉化\n\n## 🎏怎么编译源代码\n\n\u003e 下载克隆项目 本地使用VS2022 使用CMAKE打开（直接用vs2022打开项目文件夹），即可构建\n\n## 👕我怎么帮助完成汉化或者后续更新时如何补充汉化\n\n\u003e 只需要克隆仓库，阅读`json/关于一些注意事项.txt`，注意一些编写时的事项, 然后在`json/localization.json` 文件中参照已经写过的格式补充要汉化的条目即可  \n  将此文件放在程序目录下,确保程序可以读取运行 然后提交PR\n\u003e 如果你写了部分翻译条目，可以先将其放在`main_dev`或者`renderer_dev`条目中, 然后按下`shift`运行软件,开启 `仅替换指定映射项，以优化汉化作者替换时间` 进行汉化测试\n  完成之后, 将对应条目移动到`main` 或 `renderer` 数组最后, 提交PR\n\n## 🍬映射文件：localization.json\n\u003e 此文件存储所有GitHubDesktop中英文文本到本地化(中文)文本之间的映射，  \n  使用正则匹配的方式 将包含英文字符串的文本替换为包含中文字符串的文本。  \n  项目更新主要更新此文件。\n\n- 路径: [项目目录]/json/localization.json\n- 主节点 - version(int): 此json文件的版本,此值仅会因未来格式更新而更新\n- 主节点 - minversion(string): 需要最低的加载器版本\n- 主节点 - select(JSON): 本地化时提示进行选择性修改\n  - array[]\n    - replaceFile(string): 进行替换的文件\n    - tooltip(string): 提示信息\n    - enable(bool)：此条是否启用\n    - replace(array[]): 二维数组, 用户启用时的替换项\n- 主节点 - main(array): 存储用于替换GitHubDesktop的main.js的映射\n- 主节点 - main_dev(array): 存储用于替换GitHubDesktop的main.js的映射,区别于开发时快速替换\n- 主节点 - renderer(array): 存储用于替换GitHubDesktop的renderer.js的映射\n- 主节点 - renderer_dev(array): 存储用于替换GitHubDesktop的renderer.js的映射,区别于开发时快速替换\n\n## 使用环境变量开启GitHubDesktop预览版选项\n\u003e 内部脚本预览版判断机制  \n```javascript\n\tconst nn = !1;\n\tfunction rn() {\n\t\treturn !nn \u0026\u0026 \"1\" === process.env.GITHUB_DESKTOP_PREVIEW_FEATURES\n\t}\n\t// rn() 返回true时，开启预览版机制\n```\n\n - **设置环境变量开启预览版选项**  \n\n```cmd\n \u003e set GITHUB_DESKTOP_PREVIEW_FEATURES=1\n \u003e \"GitHub Desktop.lnk\"\n```\n - **或者通过加载器按提示选择自动开启预览版功能**\n\n## 🤖3.4.19版本代码开始支持, 3.5.0正式版前端界面支持AI生成提交摘要\n\u003e 3.4.19 仅预览版支持显示AI按钮,或者通过上述手段开启预览版选项  \n  3.5.0  已经默认在添加协作者右侧显示\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/user-attachments/assets/cf9eff13-4bfc-4965-ac09-15d9e4d2b6dc\" alt=\"AI机器人\" width=\"300px\"\u003e\n\u003c/p\u003e\n\n## 🧭其他\n\n\u003e 如果报错提示找不到openssl 的dll文件，请更新到[最新版](https://github.com/cngege/GitHubDesktop2Chinese/releases)   \n  如果你有任何建议可以提issues.\n\n\u003e [!tip]\n\u003e 如果打开 GitHubDesktop2Chinese.exe 时发现缺失 `MSVCP140_ATOMIC_WAIT.dll`，可以尝试下载微软运行库 [Microsoft Visual C++ Redistributable 14.42.34433.0](https://learn.microsoft.com/zh-cn/cpp/windows/latest-supported-vc-redist?view=msvc-170)。\n\u003e 找到 `最新的 Microsoft Visual C++ 可再发行程序包版本`，选择与你相应的操作系统的版本进行下载（比如64位的电脑选择 `vc_redist.x64.exe\t`，32位的电脑选择 `vc_redist.x86.exe`），安装即可。\n\n## 🍬第三方库  \n**感谢以下诸位提供的优质的开源项目**  \n\n- CLI: https://github.com/CLIUtils/CLI11  \n- HttpLib: https://github.com/yhirose/cpp-httplib  \n- nlohmann/json: https://github.com/nlohmann/json  \n- spdlog: https://github.com/gabime/spdlog  \n- WinReg: https://github.com/GiovanniDicanio/WinReg  \n\n## 🎋TODO  \n - [x] json文件格式修改,用于标识文件版本、最低支持加载器（GitHubDesktop2Chinese.exe）的版本\n - [x] 加载器加入程序版本宏定义\n - [x] 加载器支持替换映射的第三个参数,即查找参数,将第三个参数（如果有）进行全局正则查找,  \n       将匹配到的结果在第二个参数中进行特殊字符的替换，替换标记为`#{number}`\n - [x] 加载器检查json文件所需最低版本是否满足需求,如果不满足且定义了`--nopause`则提示后退出,\n       否则提示后询问是否强制替换\n - [x] 加载器在没有定义`--nopause`的情况下,在替换之前进行一次暂停,以便用户自行确认信息后是否往下执行\n - [x] ~加载器自动更新，以及可以在参数中禁用自动更新~\n - [x] 提示确认后自动更新\n - [ ] JSON文件附加描述文本，在加载器中显示\n - [x] 加载器显示所有项目参与者并在汉化后显示\n - [x] 汉化异常后恢复汉化前文件\n - [x] 改动json格式允许进行提示后选择性汉化\n - [x] 在映射文件中添加转为预览版\n - [ ] 支持使用系统http代理,包括环境变量和读系统代理注册表\n\n## 🍬星标(收藏)历史\n![Star History Chart](https://api.star-history.com/svg?repos=cngege/GitHubDesktop2Chinese\u0026type=Date)\n\n## 🏘️感谢大家的群策群力  \n![Contributors](https://contrib.rocks/image?repo=cngege/GitHubDesktop2Chinese)\n\n\u003cdetails\u003e\n    \u003csummary\u003e点击展开示例图片\u003c/summary\u003e\n\u003cimg src=\"https://github.com/lkyero/GitHubDesktop_zh/assets/28597788/3023d028-8f63-4919-8900-ab3e953a1f76\" alt=\"展示图\" /\u003e\n\u003c/details\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcngege%2Fgithubdesktop2chinese","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcngege%2Fgithubdesktop2chinese","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcngege%2Fgithubdesktop2chinese/lists"}