{"id":35870666,"url":"https://github.com/sunshinerich/translator","last_synced_at":"2026-01-08T15:05:15.616Z","repository":{"id":330278132,"uuid":"1121639894","full_name":"sunshinerich/translator","owner":"sunshinerich","description":"一款基于 Electron 和 TypeScript 开发的轻量级、中英双向桌面翻译应用","archived":false,"fork":false,"pushed_at":"2025-12-24T10:11:40.000Z","size":1780,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-26T00:10:37.710Z","etag":null,"topics":["electron","linux","translator"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sunshinerich.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2025-12-23T10:04:23.000Z","updated_at":"2025-12-25T02:55:48.000Z","dependencies_parsed_at":"2025-12-26T00:11:37.192Z","dependency_job_id":null,"html_url":"https://github.com/sunshinerich/translator","commit_stats":null,"previous_names":["sunshinerich/translator"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/sunshinerich/translator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunshinerich%2Ftranslator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunshinerich%2Ftranslator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunshinerich%2Ftranslator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunshinerich%2Ftranslator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sunshinerich","download_url":"https://codeload.github.com/sunshinerich/translator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunshinerich%2Ftranslator/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28246411,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2026-01-08T02:00:06.591Z","response_time":241,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["electron","linux","translator"],"created_at":"2026-01-08T15:02:54.444Z","updated_at":"2026-01-08T15:05:15.601Z","avatar_url":"https://github.com/sunshinerich.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Translator Pro\n\n一款基于 Electron 和 TypeScript 开发的轻量级、中英双向桌面翻译应用\n\n## 📖 项目简介\n\n主要借助AI生成的翻译工具，用于学习和交流。\n\n## 🖼️ 界面预览\n\n![UI Preview](ui.png)\n\n## ✨ 主要功能\n\n- **双向翻译**：支持中英文互译，智能识别输入语言。\n- **多引擎支持**：内置 Google 翻译、有道翻译（官方 API）和百度翻译（官方 API）。\n- **灵活布局**：\n    - **窗口缩放**：支持自由调整应用窗口大小。\n    - **区域调节**：内置分割条，可自由调节输入框与输出框的比例。\n- **高效交互**：\n    - **全局快捷键**：使用 `Alt + Space` 快速切换应用显示/隐藏。\n    - **剪贴板监听**：开启后可自动翻译剪贴板内容。\n    - **置顶显示**：支持窗口始终置顶。\n- **系统托盘**：支持最小化到托盘，提供快捷菜单进行显示、隐藏或进入设置。\n- **自定义配置**：轻松配置各翻译引擎的 API 密钥。\n\n## 🛠️ 技术栈\n\n- **核心框架**：[Electron](https://www.electronjs.org/)\n- **编程语言**：[TypeScript](https://www.typescriptlang.org/)\n- **样式处理**：Vanilla CSS (Modern CSS features)\n- **构建工具**：[electron-builder](https://www.electron.build/)\n- **翻译服务**：Google Translate API, 有道智云 API, 百度翻译开放平台 API\n\n##  项目目录说明\n\n```text\n.\n├── src/\n│   ├── main.ts          # 主进程代码 (Electron Main Process)\n│   ├── preload.ts       # 预加载脚本 (Preload Script)\n│   ├── renderer.ts      # 渲染进程逻辑 (Renderer Process)\n│   ├── services/        # 业务服务层\n│   │   └── translator.ts # 翻译引擎实现\n│   ├── ui/              # UI 资源\n│   │   └── styles.css    # 样式文件\n│   ├── types.d.ts       # TypeScript 类型定义\n│   └── md5.d.ts         # MD5 模块定义\n├── index.html           # 应用主入口界面\n├── package.json         # 项目配置与依赖管理\n├── tsconfig.json        # TypeScript 基础配置\n├── icon.png             # 应用图标\n└── tray-icon.png        # 系统托盘图标\n```\n\n## 🚀 安装与运行\n\n### 开发环境准备\n\n确保您的系统中已安装 Node.js 和 npm。\n\n1. 克隆项目：\n   ```bash\n   git clone https://github.com/sunshinerich/translator-pro.git\n   ```\n\n2. 安装依赖：\n   ```bash\n   npm install\n   ```\n\n### 运行应用\n\n在开发模式下启动应用：\n```bash\nnpm start\n```\n\n## 📦 构建与发布\n\n使用以下命令构建安装包：\n\n- **构建当前平台**：\n  ```bash\n  npm run dist\n  ```\n\n构建后的产物将存放在 `release` 目录下。\n\n## ⚙️ 配置说明\n\n应用启动后，点击底部的设置图标即可配置翻译引擎：\n- **Google 翻译**：默认可用，无需配置。\n- **有道翻译**：需要提供 `App Key` 和 `App Secret`。\n- **百度翻译**：需要提供 `App ID` 和 `Secret Key`。\n\n## 📄 许可证\n\n本项目采用 [ISC License](LICENSE) 许可。\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunshinerich%2Ftranslator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsunshinerich%2Ftranslator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunshinerich%2Ftranslator/lists"}