back to home

maboloshi / github-chinese

GitHub 汉化插件,GitHub 中文化界面。 (GitHub Translation To Chinese)

20,807 stars
1,149 forks
40 issues
JavaScriptShellPerl

AI Architecture Analysis

This repository is indexed by RepoMind. By analyzing maboloshi/github-chinese in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.

Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.

Embed this Badge

Showcase RepoMind's analysis directly in your repository's README.

[![Analyzed by RepoMind](https://img.shields.io/badge/Analyzed%20by-RepoMind-4F46E5?style=for-the-badge)](https://repomind-ai.vercel.app/repo/maboloshi/github-chinese)
Preview:Analyzed by RepoMind

Repository Summary (README)

Preview
<div align="center"><a name="readme-top"></a>

GitHub 中文化插件

让 GitHub 界面全面中文化 | 源自 52cik/github-hans

简体中文 · 繁體中文 · 反馈问题

<!-- SHIELD GROUP -->

GitHub stars GitHub forks GitHub issues license GPL-3.0 GreasyFork installs

<a href="https://hellogithub.com/repository/738d0abae49543f18d887a7e29ec9e90" target="_blank"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://api.hellogithub.com/v1/widgets/recommend.svg?rid=738d0abae49543f18d887a7e29ec9e90&claim_uid=zepvSg6Vwl4EqMr&theme=dark" /> <source media="(prefers-color-scheme: light)" srcset="https://api.hellogithub.com/v1/widgets/recommend.svg?rid=738d0abae49543f18d887a7e29ec9e90&claim_uid=zepvSg6Vwl4EqMr&theme=neutral" /> <img alt="Featured|HelloGitHub" src="https://api.hellogithub.com/v1/widgets/recommend.svg?rid=738d0abae49543f18d887a7e29ec9e90&claim_uid=zepvSg6Vwl4EqMr&theme=neutral" style="width: 250px; height: 54px;" /> </picture> </a> </div>

[!warning] 本项目从未发布至 GitCode,如您发现请截图并保留证据

<details> <summary><kbd>目录树</kbd></summary>

TOC

</details>

🌟 功能特性

  • 全面中文化 GitHub 界面元素(菜单栏、标题、按钮等)
  • 智能正则匹配功能
  • 支持项目描述的人机翻译
  • 自动本地化时间元素
  • 持续更新词库

🌐 兼容环境

浏览器类型支持的脚本管理器
Chrome / Chromium 内核Tampermonkey, Violentmonkey
Safari(全平台)Tampermonkey, Macaque, Stay
Firefox / Gecko 内核Tampermonkey, Violentmonkey
Via(Android)内置管理器

💻 安装指南

  1. 安装用户脚本管理器:
  2. 基于 Chrome / Chromium 内核浏览器:
    1. 务必开启 “扩展程序” 管理中的 “开发者模式”1
    2. 务必开启 “扩展程序” 管理中脚本管理器扩展的 “允许运行用户脚本”
    3. 具体可参考 Tampermonkey 官方指引
  3. 选择安装源:
  4. 刷新页面后,插件即可生效
  5. 必要时,重启浏览器

[!NOTE] 版本说明

  • 🚀 开发版:实时更新,每周五自动更新词库
  • 🛡️ 稳定版:每周一同步开发版词库,更稳定

🔧 本地调试

  1. 安装 Tampermonkey,并启用 “允许访问文件网址”。
  2. 下载词库文件到本地(如:D:\github-chinese\locals.js
  3. 在脚本管理器中修改引用路径:
    // 原始路径
    // @require https://raw.githubusercontent.com/...
    
    // 修改为
    // @require file:///D:/github-chinese/locals.js
    
  4. 刷新页面生效

[!IMPORTANT] 若无效:

  1. 进入 Tampermonkey 插件设置页
  2. 通用 - 配置模式 设置为高级,进入高级设置模式
  3. 找到 安全 - 允许脚本访问本地文件 并设置为 外部(@require 和 @resource)

[!TIP] 💡 温馨提示: 您可以将词库文件拖拽至浏览器地址栏,复制路径直接使用。

<div align="right">

</div>

🔄 更新日志

最新版本

v1.9.3 (2024-08-18)

  1. 新增功能:通过设置中文环境,自动本地化时间元素,仅保留on开头的时间正则,并停用时间元素监视
  2. 优化突变翻译处理:
    • 引入characterDataPage规则,对特定页面启用筛选字符数据的变更
    • 引入ignoreMutationSelectorPage规则,忽略特定突变元素
  3. 合并reIgnoreClass,reIgnoreItemprop,ignoreId,ignoreTagignoreSelectorPage规则,处理全局及特定页面,忽略特定元素
  4. 引入全局缓存模式,减少重复构建包括不限于基于page变化的忽略规则、正则规则数组等
  5. 调整:更新讯飞听见翻译引擎v2.0
  6. 优化:梳理、优化脚本
  7. 调整:调整词库语言代码为zh-CN, 与环境语言设置一致
<details><summary><kbd>查看更多历史版本</kbd></summary>

v1.9.2 (2024-06-14)

  1. 适配www.githubstatus.com
  2. 适配skills.github.com

v1.9.1 (2024-05-23)

  1. 更新切换正则功能按钮

v1.9.0 (2023-12-09)

  1. 重新定义版本号规则, 如1.9.0-2023-12-09
    • 1.9.0: 主版本号(由项目所有者更新)
    • 2023-12-09词库发布版本号(由 GitHub Action 自动更新)
  2. 加强: GitHub 源【开发版】每周一凌晨自动更新词库发布版本号
  3. 加强: GreasyFork 源【稳定版】每周五凌晨自动更新词库发布版本号, 词库内容同上一次GitHub 源【开发版】
  4. 加强:在 README.md 中自动更新贡献者头像
  5. 更新: 忽略规则, 词条等

v1.8.5 (2023-08-31)

  1. 优化: transDesc 函数代码
  2. 修复: 重复添加translate-me翻译按钮
  3. 加强:watchUpdate 函数新增节点文本更新的情况
  4. 调整: transBySelector和transDesc函数延迟执行时间
  5. 更新: 忽略规则, 词条等

v1.8.4 (2023-08-08)

  1. 修复: Itemprop过滤规则, 依然使用正则方式
  2. 修复: tooltipped样式提示, 依然使用正则方式

v1.8.3 (2023-08-07)

  1. 梳理、优化脚本
  2. 更新: 忽略规则, 大量词条等

v1.8.2 (2023-05-15)

  1. greasyfork 托管源切换到按页面精细化词条模式
  2. 调整词库格式
  3. 功能加强: 优化元素筛选器翻译逻辑
  4. 更新: 忽略规则, 大量词条等

v1.8.1 (2023-01-22)

  1. 修复: #8 与 dark reader 扩展发生冲突,导致时间显示出现问题
  2. GitHub源开始切换到按页面精细化词条模式(开发版), 词库未完全迁移适配
  3. 停止greasyfork源词库文件的同步更新

v1.8.0 (2023-01-18)

  1. 删除: TURBO-FRAME框架处理代码. Github 已调整新动态加载模式, 直接检测url的变化就能获取对应的page信息
  2. 新增: 支持时间元素的Shadow DOM翻译, 并监听变化
  3. 新增: 启用并更新时间元素翻译专项正则词条
  4. 新增: 仅当page有效才翻译页面
  5. 修复: 原简介翻译引擎GitHub中文社区失效, 改为讯飞引擎(测试)
  6. 修复: 追加公共正则重复迭代的问题
  7. 修复: 正则标记变量RegExp与构造函数new RegExp冲突
  8. 更新: 忽略规则, 词条等

预告, 下次将细化page匹配规则, 导致词库文件结构大调整, 词库文件会适当变大, 页面正则更精细效率会提升

v1.7.9 (2022-07-17)

GitHub 的 ajax 载入方式逐步从 defunkt/jquery-pjax 切换到 hotwired/turbo, 导致已有的动态监测方式逐步失效

目前, 通过以下修复:

  1. 新增 BODY 元素新增监视
  2. 解析 TURBO-FRAME 框架, 获取对应的 page
  3. 修复 github 新动态加载模式, 导致翻译描述返回值无法插入
  4. 修复 github 新动态加载模式, 导致chrome浏览器自带翻译功能卡死页面

其他更新:

  1. 修复rePagePath,rePagePathRepo,rePagePathOrg匹配规则,限制路径匹配层次,排除干扰
  2. 直接使用网页URLdocument.URL变化触发标题翻译JS 筛选器翻译
  3. 修复关闭正则无法生效, 需要刷新页面才生效
  4. 日常更新词库和忽略规则
  5. 更新JS 筛选器规则

v1.7.8 (2022-06-29)

  1. 紧急修复: GitHub 变更了document.bodytitle更新机制, 导致原有的监测更新规则部分失效, 目前使用document.documentElement监视整个页面 DOM 的变更
  2. 跳过<HEAD>标签
  3. 标题翻译JS 筛选器翻译, 依据 URL变化更新

v1.7.7 (2022-06-26)

  1. 新增时间元素翻译功能
  2. 重写页面标题翻译函数
  3. 梳理遍历节点函数逻辑
  4. 优化transPage函数,默认翻译公共部分
  5. 调整getPage函数, 使ClassName匹配规则优先
  6. 优化translate函数, 跳过不存在英文字母和符号,., 保留首尾空白部分等
  7. 部分函数重命名,使用es6新语法
  8. 日常更新词库和忽略规则,修复一个JS 选择器规则

v1.7.6 (2022-05-12)

  1. 日常更新词库和忽略规则
  2. 添加手动开启/禁用正则翻译,添加切换菜单
  3. 优化翻译文本函数:避免已翻译词汇二次匹配,提高效率;局部翻译优先于全局
</details> <div align="right">

</div>

📌 待办事项

  1. 添加 GitHub 专用名词解释
  2. 整理 Git & GitHub 学习资料
  3. 完善文档翻译,需大家 PR 共同翻译

🤝 参与贡献

欢迎通过以下方式参与贡献:

  1. 完善词库翻译(编辑 locals.js
  2. 提交议题报告,参与话题讨论
  3. 改进代码逻辑

翻译参考资源:

  1. Pro Git 第二版 简体中文
  2. Pro Git: 翻译约定
  3. Git 官方软件包的简体中文翻译
  4. GitHub 词汇表官方译本
  5. CSS 选择器 用于编写忽略规则

查看详细贡献指南

🖼️ 效果预览

<picture> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/maboloshi/github-chinese/gh-pages/preview/img1.png"/> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/maboloshi/github-chinese/gh-pages/preview/img3.png"/> <img src="https://raw.githubusercontent.com/maboloshi/github-chinese/gh-pages/preview/img1.png" width="75%" /> </picture> <picture> <source media="(prefers-color-scheme: light)" srcset="https://raw.githubusercontent.com/maboloshi/github-chinese/gh-pages/preview/img2.png"/> <source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/maboloshi/github-chinese/gh-pages/preview/img4.png"/> <img src="https://raw.githubusercontent.com/maboloshi/github-chinese/gh-pages/preview/img2.png" width="75%" /> </picture>

🙏 特别鸣谢

核心团队

贡献者墙

一如既往,感谢我们出色的贡献者❤️!

<!--AUTO_GENERATED_PLEASE_DONT_DELETE_IT--> <a href="https://github.com/maboloshi" title="沙漠之子"> <img src="https://avatars.githubusercontent.com/u/7850715?v=4" width="42;" alt="沙漠之子"/> </a> <a href="https://github.com/52cik" title="楼教主"> <img src="https://avatars.githubusercontent.com/u/5033310?v=4" width="42;" alt="楼教主"/> </a> <a href="https://github.com/TC999" title="陈生杂物房"> <img src="https://avatars.githubusercontent.com/u/88823709?v=4" width="42;" alt="陈生杂物房"/> </a> <a href="https://github.com/qznfbnj" title="其智乃反不能及"> <img src="https://avatars.githubusercontent.com/u/100760086?v=4" width="42;" alt="其智乃反不能及"/> </a> <a href="https://github.com/wyc-26" title="wyc-26"> <img src="https://avatars.githubusercontent.com/u/154735436?v=4" width="42;" alt="wyc-26"/> </a> <a href="https://github.com/LuYifei2011" title="Lu Yifei"> <img src="https://avatars.githubusercontent.com/u/118034848?v=4" width="42;" alt="Lu Yifei"/> </a> <a href="https://github.com/tangyuan0821" title="Paper Moon"> <img src="https://avatars.githubusercontent.com/u/195516213?v=4" width="42;" alt="Paper Moon"/> </a> <a href="https://github.com/pylover7" title="大叶子"> <img src="https://avatars.githubusercontent.com/u/56282729?v=4" width="42;" alt="大叶子"/> </a> <a href="https://github.com/cat-kun" title="cat-kun"> <img src="https://avatars.githubusercontent.com/u/8529528?v=4" width="42;" alt="cat-kun"/> </a> <a href="https://github.com/ChinaGodMan" title="人民的勤务员"> <img src="https://avatars.githubusercontent.com/u/96548841?v=4" width="42;" alt="人民的勤务员"/> </a> <a href="https://github.com/buiawpkgew1" title="菾凴"> <img src="https://avatars.githubusercontent.com/u/71136405?v=4" width="42;" alt="菾凴"/> </a> <a href="https://github.com/pecasha" title="Pecasha"> <img src="https://avatars.githubusercontent.com/u/9607128?v=4" width="42;" alt="Pecasha"/> </a> <a href="https://github.com/Kisechan" title="Kise Platinyl"> <img src="https://avatars.githubusercontent.com/u/162338950?v=4" width="42;" alt="Kise Platinyl"/> </a> <a href="https://github.com/yrljroli" title="苓𥤚"> <img src="https://avatars.githubusercontent.com/u/169890386?v=4" width="42;" alt="苓𥤚"/> </a> <a href="https://github.com/YiShengJunn" title="益生君"> <img src="https://avatars.githubusercontent.com/u/134821571?v=4" width="42;" alt="益生君"/> </a> <a href="https://github.com/3DMXM" title="小莫"> <img src="https://avatars.githubusercontent.com/u/28587093?v=4" width="42;" alt="小莫"/> </a> <a href="https://github.com/xuexb" title="前端小武"> <img src="https://avatars.githubusercontent.com/u/3872051?v=4" width="42;" alt="前端小武"/> </a> <a href="https://github.com/wang4yu6peng13" title="wang4yu6peng13"> <img src="https://avatars.githubusercontent.com/u/10207042?v=4" width="42;" alt="wang4yu6peng13"/> </a> <a href="https://github.com/pangshitong" title="pangshitong"> <img src="https://avatars.githubusercontent.com/u/41714457?v=4" width="42;" alt="pangshitong"/> </a> <a href="https://github.com/daydaygo" title="dayday"> <img src="https://avatars.githubusercontent.com/u/3986303?v=4" width="42;" alt="dayday"/> </a> <a href="https://github.com/heicks" title="create new ██████╗ ██╔══██╗ ██████╔╝ ██╔══██╗ ██████╔╝ ╚═════╝   ██╗   ██╗   ██║   ██║   ██║   ██║   ██║   ██║   ╚█████╔╝   ╚═════╝ ███████╗ ██╔════╝  ██║████═╗  ██║  ██ ║ ╚██████╔╝   ╚══════╝"> <img src="https://avatars.githubusercontent.com/u/12287943?v=4" width="42;" alt="create new ██████╗ ██╔══██╗ ██████╔╝ ██╔══██╗ ██████╔╝ ╚═════╝   ██╗   ██╗   ██║   ██║   ██║   ██║   ██║   ██║   ╚█████╔╝   ╚═════╝ ███████╗ ██╔════╝  ██║████═╗  ██║  ██ ║ ╚██████╔╝   ╚══════╝"/> </a> <a href="https://github.com/NyA1K0" title="NyA!K0"> <img src="https://avatars.githubusercontent.com/u/177237971?v=4" width="42;" alt="NyA!K0"/> </a> <a href="https://github.com/KS-OTO" title="KS-OTO"> <img src="https://avatars.githubusercontent.com/u/6616413?v=4" width="42;" alt="KS-OTO"/> </a> <a href="https://github.com/swsoyee" title="InfinityLoop"> <img src="https://avatars.githubusercontent.com/u/20528423?v=4" width="42;" alt="InfinityLoop"/> </a> <a href="https://github.com/ImgBotApp" title="Imgbot"> <img src="https://avatars.githubusercontent.com/u/31427850?v=4" width="42;" alt="Imgbot"/> </a> <a href="https://github.com/neveler" title="neveler"> <img src="https://avatars.githubusercontent.com/u/55753029?v=4" width="42;" alt="neveler"/> </a> <a href="https://github.com/wang93wei" title="AlanWang"> <img src="https://avatars.githubusercontent.com/u/6371053?v=4" width="42;" alt="AlanWang"/> </a> <!--AUTO_GENERATED_PLEASE_DONT_DELETE_IT-END-->

贡献者列表,由 GitHub Action 自动生成

<div align="right">

</div>

📈 项目统计

<a href="https://star-history.com/#maboloshi/github-chinese&Timeline"> <picture> <source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=maboloshi/github-chinese&type=Timeline&theme=dark" /> <source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=maboloshi/github-chinese&type=Timeline" /> <img alt="Star History Chart" src="https://api.star-history.com/svg?repos=maboloshi/github-chinese&type=Timeline" width="75%" /> </picture> </a>

Alt

<div align="right">

</div>

🎁 欢迎打赏

赞赏列表

微信赞赏支付宝赞赏
<img src="https://cdn.jsdelivr.net/gh/maboloshi/maboloshi/img/wechat.png?raw=true" alt="WeChat QRcode" width=200> <br><small>☕喝点咖啡继续干☕</small><img src="https://cdn.jsdelivr.net/gh/maboloshi/maboloshi/img/alipay-1.jpg?raw=true" alt="AliPay QRcode" width=200> <br><small>🌶️来包辣条吧~🍪</small>
<!-- LINK GROUP -->

Footnotes

  1. Chrome 切换到 Manifest V3后,使用问题