{"id":50170730,"url":"https://github.com/zipenglu1/postman-cn-modern","last_synced_at":"2026-05-24T23:14:01.074Z","repository":{"id":354805271,"uuid":"1221079117","full_name":"zipenglu1/postman-cn-modern","owner":"zipenglu1","description":"为最新版postman12.x版本提供的可持续维护汉化包","archived":false,"fork":false,"pushed_at":"2026-04-30T06:10:41.000Z","size":956,"stargazers_count":8,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-30T08:09:18.528Z","etag":null,"topics":["asar","chinese","electron","localization","postman","postman-cn","windows"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zipenglu1.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":"NOTICE.md","maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-25T18:14:49.000Z","updated_at":"2026-04-30T06:55:43.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/zipenglu1/postman-cn-modern","commit_stats":null,"previous_names":["zipenglu1/postman-cn-modern"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/zipenglu1/postman-cn-modern","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zipenglu1%2Fpostman-cn-modern","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zipenglu1%2Fpostman-cn-modern/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zipenglu1%2Fpostman-cn-modern/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zipenglu1%2Fpostman-cn-modern/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zipenglu1","download_url":"https://codeload.github.com/zipenglu1/postman-cn-modern/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zipenglu1%2Fpostman-cn-modern/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33453756,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-24T19:21:36.376Z","status":"ssl_error","status_checked_at":"2026-05-24T19:21:10.562Z","response_time":57,"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":["asar","chinese","electron","localization","postman","postman-cn","windows"],"created_at":"2026-05-24T23:14:00.261Z","updated_at":"2026-05-24T23:14:01.064Z","avatar_url":"https://github.com/zipenglu1.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Postman CN Modern\n\n[![CI](https://github.com/zipenglu1/postman-cn-modern/actions/workflows/ci.yml/badge.svg)](https://github.com/zipenglu1/postman-cn-modern/actions/workflows/ci.yml)\n[![Postman](https://img.shields.io/badge/Postman-12.x%20recommended-orange)](https://www.postman.com/)\n[![Windows](https://img.shields.io/badge/Windows-first-blue)](#requirements--系统要求)\n[![Node](https://img.shields.io/badge/Node.js-20%2B-339933)](https://nodejs.org/)\n[![License](https://img.shields.io/badge/license-MIT-green)](LICENSE)\n\n\u003e \u003cp align=\"center\"\u003e\n  \u003ca href=\"#中文\"\u003e中文\u003c/a\u003e · \u003ca href=\"#english\"\u003eEnglish\u003c/a\u003e\n\u003c/p\u003e\n\n## 中文说明\n\nPostman CN Modern 是一个面向新版 Postman Desktop 的 Windows 优先汉化工具。它延续 [hlmd/Postman-cn](https://github.com/hlmd/Postman-cn) 的本地覆盖思路，但将旧的 PHP 静态替换流程升级为可维护的 Node CLI、ASAR 安装器、运行时 DOM 本地化器和自动化补词工作流。\n\n**强烈建议用于 Postman Desktop 12.x。当前已在 Postman `12.8.4` 上重点验证。**\n\nPostman 11.x、9.x 或更老版本的文件结构和加载方式差异较大，不建议直接使用当前版本。未来 Postman 13.x 也需要确认兼容后再放开版本范围。\n\n\u003e 免责声明：本项目是社区维护项目，与 Postman, Inc. 没有关联、授权、赞助或背书关系。Postman 是 Postman, Inc. 的商标。\n\n### 特性\n\n- 一个 Windows 入口：双击 `install-cn.cmd`。\n- 安全安装：不直接修改原始 `resources/app.asar`。\n- 可恢复：同一个菜单可恢复英文界面。\n- 适配 Postman 12：通过 `preload_desktop.js` 处理远程渲染的桌面 UI。\n- 自动补词：可从正在运行的 Postman 窗口捕获未汉化可见文本。\n- 自动检测版本：扫描 `%LOCALAPPDATA%\\Postman\\app-*` 并选择最新 semver 版本。\n- 有测试覆盖：检测、字典校验、ASAR 解包、安装/恢复、patcher、scanner 等核心逻辑均有测试。\n\n### 版本支持\n\n| Postman 版本 | 状态 | 说明 |\n| --- | --- | --- |\n| 12.8.4 | 已重点验证 | 当前主要目标版本 |\n| 12.x | 推荐尝试 | 字典范围为 `\u003e=12.0.0 \u003c13.0.0`，新版小版本建议先 dry-run |\n| 13.x | 暂不支持 | 需要重新验证 UI 与 preload 结构 |\n| 11.x 及更早 | 不建议 | 文件结构和旧仓库时代差异较大 |\n\n如果你使用的不是 `12.8.4`，建议先运行：\n\n```powershell\nnpm run cn:detect\nnpm run cn:dry-run\n```\n\n确认 dry-run 能正常注入 `preload_desktop.js` 后再安装。\n\n### 工作原理\n\nPostman 是 Electron 应用。新版 Postman 仍然包含 `resources/app.asar`，但很多主界面文案会从 `desktop.postman.com` 远程加载，仅替换本地 bundle 已经无法覆盖主要界面。\n\n本工具采用两层方案：\n\n1. 解包 Postman 的 `resources/app.asar` 到临时目录。\n2. 在 `preload_desktop.js` 注入一个轻量 DOM 本地化器。\n3. 将 patch 后的目录安装为 `resources/app`。\n4. 将原始 `app.asar` 重命名为 `app.asar.postman-cn.bak`。\n5. Electron 启动时加载 `resources/app`，preload 本地化器在 React 渲染后翻译可见文本、placeholder、title 和 aria-label。\n\n恢复时会删除本工具创建的 `resources/app`，并把备份的 `app.asar.postman-cn.bak` 还原为 `app.asar`。\n\n### 系统要求\n\n- Windows 10/11\n- Node.js 20 或更高版本\n- Postman Desktop 安装在 `%LOCALAPPDATA%\\Postman\\app-*`\n- 推荐 Postman Desktop 12.x\n\n### 快速开始\n\n1. 下载或克隆本仓库。\n2. 完全关闭 Postman。\n3. 双击：\n\n```text\ninstall-cn.cmd\n```\n\n4. 选择：\n\n```text\n1. Install Chinese UI\n```\n\n脚本完成后，正常启动 Postman 即可。\n\n如需恢复英文界面，再次运行 `install-cn.cmd` 并选择：\n\n```text\n2. Restore English UI\n```\n\n菜单还提供：\n\n```text\n3. Detect Postman only\n```\n\n高级用户也可以从终端运行：\n\n```powershell\n.\\install-cn.cmd install\n.\\install-cn.cmd restore\n.\\install-cn.cmd detect\n```\n\n### CLI 用法\n\n安装依赖：\n\n```powershell\nnpm install\n```\n\n检测 Postman：\n\n```powershell\nnpm run cn:detect\n```\n\n预览安装影响，不写入 Postman 安装目录：\n\n```powershell\nnpm run cn:dry-run\n```\n\n安装汉化：\n\n```powershell\nnpm run cn:install\n```\n\n恢复英文：\n\n```powershell\nnpm run cn:restore\n```\n\n运行测试：\n\n```powershell\nnpm test\n```\n\n### 翻译补全工作流\n\n捕获当前 Postman 窗口的未汉化文本：\n\n```powershell\nnpm run cn:scan-live\n```\n\n自动扫常见导航入口：\n\n```powershell\nnpm run cn:sweep-live\n```\n\n编辑已知安全词条后，重新生成合并字典：\n\n```powershell\nnpm run cn:rebuild-dictionary\n```\n\n报告会生成到 `reports/untranslated-*.json`，该目录不会提交到 Git。\n\n完整流程见 [docs/TRANSLATION_WORKFLOW.md](docs/TRANSLATION_WORKFLOW.md)。\n\n### 项目结构\n\n```text\nbin/postman-cn.js                 CLI 入口\nsrc/postmanLocator.js             Windows Postman 检测\nsrc/asarAdapter.js                ASAR 列表和解包\nsrc/dictionary.js                 字典读取和校验\nsrc/patcher.js                    文本替换和 preload 注入\nsrc/installer.js                  安装和恢复\nsrc/postmanCdp.js                 live UI 捕获辅助\nsrc/untranslatedWorkflow.js       已知安全词条和报告过滤\ndictionaries/manual-12.7.6.zh-CN.json\ndictionaries/local-core.zh-CN.json\nscripts/capture-postman-untranslated.js\nscripts/sweep-postman-ui.js\nphp/lang/                         来自 hlmd/Postman-cn 的旧词库迁移来源\n```\n\n### 安全模型\n\n- 不直接修改 Postman 原始 `app.asar`。\n- 已存在且不是本工具创建的 `resources/app` 默认拒绝覆盖。\n- `restore` 需要本工具生成的 manifest。\n- 安装或恢复前必须关闭 Postman。\n- 不阻止 Postman 官方更新。更新后请重新运行 `install-cn.cmd`。\n- 图片、canvas、闭合 shadow DOM、账号/云端动态内容可能不在 v1 覆盖范围内。\n\n### 常见问题\n\n#### Node.js was not found\n\n请安装 Node.js 20 或更高版本：\u003chttps://nodejs.org/\u003e，然后重新运行 `install-cn.cmd`。\n\n#### Postman 仍然是英文\n\n完全关闭 Postman，运行 `install-cn.cmd`，选择 `1`，再重新启动 Postman。如果 Postman 已自动更新，请对新版本重新安装汉化。\n\n#### 提示 Postman 正在运行\n\n从托盘退出 Postman，或在任务管理器中结束所有 `Postman.exe`，然后重试。\n\n#### Postman 白屏或卡加载\n\n运行 `install-cn.cmd`，选择 `2` 恢复英文界面。随后请带上 Postman 版本和安装输出提交 issue。\n\n### 路线图\n\n- 扩大 Postman 12.x 界面覆盖范围。\n- 增强自动化 UI 遍历和补词能力。\n- 增加 macOS/Linux locator 和安装支持。\n- 发布 zip 包，降低用户下载和运行门槛。\n- 按 Postman 大版本拆分字典包。\n\n### 致谢\n\n本项目受 [hlmd/Postman-cn](https://github.com/hlmd/Postman-cn) 启发，并使用其旧版翻译资料作为迁移来源。现代 Node CLI、Postman 12 运行时本地化器、安装器、自动化脚本、测试和当前 12.x 词条维护在本仓库中完成。\n\n授权与来源说明见 [NOTICE.md](NOTICE.md)。\n\n### 参与贡献\n\n欢迎提交 issue 和 pull request。较大的改动请先阅读 [CONTRIBUTING.md](CONTRIBUTING.md)。\n\n### 许可证\n\n本仓库中的新 Node 实现使用 MIT License。来自 `hlmd/Postman-cn` 的旧资料保留来源说明，详见 [NOTICE.md](NOTICE.md)。\n\n---\n\n## English\n\nPostman CN Modern is a Windows-first Chinese localization tool for recent Postman Desktop builds. It follows the local override idea from [hlmd/Postman-cn](https://github.com/hlmd/Postman-cn), but replaces the old PHP static replacement flow with a maintainable Node CLI, ASAR installer, runtime DOM localizer, and automated translation workflow.\n\n**This project is best used with Postman Desktop 12.x. It has been primarily verified on Postman `12.8.4`.**\n\nPostman 11.x, 9.x, and older releases have significantly different file layouts and loading behavior. They are not recommended for this tool. Future Postman 13.x releases should be verified before the version range is expanded.\n\n\u003e Disclaimer: This project is community-maintained and is not affiliated with, endorsed by, or sponsored by Postman, Inc. Postman is a trademark of Postman, Inc.\n\n### Features\n\n- One Windows entry: double-click `install-cn.cmd`.\n- Safe install: does not patch Postman's original `resources/app.asar` in place.\n- Reversible: restore the English UI from the same menu.\n- Postman 12 ready: handles remote-rendered desktop UI through `preload_desktop.js`.\n- Automation friendly: captures untranslated visible text from a live Postman window.\n- Version aware: scans `%LOCALAPPDATA%\\Postman\\app-*` and selects the latest semver version.\n- Tested core: locator, dictionary validation, ASAR extraction, installer/restore, patcher, and scanner behavior are covered by tests.\n\n### Version Support\n\n| Postman version | Status | Notes |\n| --- | --- | --- |\n| 12.8.4 | Verified | Primary target version |\n| 12.x | Recommended | Dictionary range is `\u003e=12.0.0 \u003c13.0.0`; dry-run first for newer minor versions |\n| 13.x | Not supported yet | Needs UI and preload verification |\n| 11.x and older | Not recommended | File layout differs too much from the current target |\n\nIf you are not on `12.8.4`, run this first:\n\n```powershell\nnpm run cn:detect\nnpm run cn:dry-run\n```\n\nInstall only after the dry-run confirms that `preload_desktop.js` can be injected.\n\n### How It Works\n\nPostman is an Electron app. Recent builds still include `resources/app.asar`, but much of the main desktop UI is loaded from `desktop.postman.com`. Replacing only local bundle files no longer covers the main UI.\n\nThis tool uses a two-layer strategy:\n\n1. Extract Postman's `resources/app.asar` to a temporary directory.\n2. Inject a small localizer into `preload_desktop.js`.\n3. Install the patched unpacked directory as `resources/app`.\n4. Rename the original `app.asar` to `app.asar.postman-cn.bak`.\n5. Electron loads `resources/app`, and the preload localizer translates visible text, placeholders, titles, and aria labels after React renders.\n\nRestore removes only the override created by this tool and moves `app.asar.postman-cn.bak` back to `app.asar`.\n\n### Requirements\n\n- Windows 10/11\n- Node.js 20 or newer\n- Postman Desktop installed under `%LOCALAPPDATA%\\Postman\\app-*`\n- Postman Desktop 12.x recommended\n\n### Quick Start\n\n1. Download or clone this repository.\n2. Close Postman completely.\n3. Double-click:\n\n```text\ninstall-cn.cmd\n```\n\n4. Choose:\n\n```text\n1. Install Chinese UI\n```\n\nStart Postman normally after the script finishes.\n\nTo restore English later, run `install-cn.cmd` again and choose:\n\n```text\n2. Restore English UI\n```\n\nThe same menu also provides:\n\n```text\n3. Detect Postman only\n```\n\nAdvanced users can run:\n\n```powershell\n.\\install-cn.cmd install\n.\\install-cn.cmd restore\n.\\install-cn.cmd detect\n```\n\n### CLI Usage\n\nInstall dependencies:\n\n```powershell\nnpm install\n```\n\nDetect Postman:\n\n```powershell\nnpm run cn:detect\n```\n\nPreview the patch without writing to Postman's installation directory:\n\n```powershell\nnpm run cn:dry-run\n```\n\nInstall the Chinese override:\n\n```powershell\nnpm run cn:install\n```\n\nRestore the original English app:\n\n```powershell\nnpm run cn:restore\n```\n\nRun tests:\n\n```powershell\nnpm test\n```\n\n### Translation Workflow\n\nCapture untranslated text from the current live Postman window:\n\n```powershell\nnpm run cn:scan-live\n```\n\nSweep common navigation entries:\n\n```powershell\nnpm run cn:sweep-live\n```\n\nRegenerate the merged dictionary after editing known translations:\n\n```powershell\nnpm run cn:rebuild-dictionary\n```\n\nReports are written to `reports/untranslated-*.json` and ignored by Git.\n\nSee [docs/TRANSLATION_WORKFLOW.md](docs/TRANSLATION_WORKFLOW.md) for details.\n\n### Project Layout\n\n```text\nbin/postman-cn.js                 CLI entry\nsrc/postmanLocator.js             Windows Postman discovery\nsrc/asarAdapter.js                ASAR list/extract adapter\nsrc/dictionary.js                 Dictionary loading and validation\nsrc/patcher.js                    Text replacement and preload injection\nsrc/installer.js                  Install and restore logic\nsrc/postmanCdp.js                 Live UI capture helpers\nsrc/untranslatedWorkflow.js       Known-safe UI translations and report filtering\ndictionaries/manual-12.7.6.zh-CN.json\ndictionaries/local-core.zh-CN.json\nscripts/capture-postman-untranslated.js\nscripts/sweep-postman-ui.js\nphp/lang/                         Legacy translation source from hlmd/Postman-cn\n```\n\n### Safety Model\n\n- The tool does not patch Postman's original `app.asar` in place.\n- Existing `resources/app` directories not created by this tool are refused by default.\n- `restore` requires the manifest generated during install.\n- Postman must be closed before install or restore.\n- Official Postman updates are not blocked. Re-run `install-cn.cmd` after an update.\n- Text rendered inside images, canvas, closed shadow DOM, or account/cloud content may remain outside scope.\n\n### Troubleshooting\n\n#### Node.js was not found\n\nInstall Node.js 20 or newer from \u003chttps://nodejs.org/\u003e, then run `install-cn.cmd` again.\n\n#### Postman is still English\n\nClose every Postman process, run `install-cn.cmd`, choose option `1`, then start Postman again. If Postman auto-updated, reinstall for the new version.\n\n#### Install failed because Postman is running\n\nExit Postman from the tray or kill all `Postman.exe` processes in Task Manager, then retry.\n\n#### Postman shows a blank loading screen\n\nRun `install-cn.cmd`, choose option `2`, and restore the English UI. Then open an issue with your Postman version and install output.\n\n### Roadmap\n\n- Broader Postman 12.x screen coverage.\n- Better automated UI traversal for translation discovery.\n- macOS and Linux locator/install support.\n- Release zip packages for easier downloads.\n- Optional dictionary packs by Postman major version.\n\n### Credits\n\nThis project is inspired by and uses legacy translation material from [hlmd/Postman-cn](https://github.com/hlmd/Postman-cn). The modern Node CLI, Postman 12 runtime localizer, installer, automation scripts, tests, and current 12.x dictionary work are maintained here.\n\nSee [NOTICE.md](NOTICE.md) for attribution and licensing notes.\n\n### Contributing\n\nIssues and pull requests are welcome. Please read [CONTRIBUTING.md](CONTRIBUTING.md) before larger changes.\n\n### License\n\nThe new Node-based implementation in this repository is released under the MIT License. Legacy material from `hlmd/Postman-cn` is retained with attribution; see [NOTICE.md](NOTICE.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzipenglu1%2Fpostman-cn-modern","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzipenglu1%2Fpostman-cn-modern","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzipenglu1%2Fpostman-cn-modern/lists"}