README.md
<!-- SHIELD GROUP --> <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" /> </picture> </a> </div>让 GitHub 界面全面中文化 | 源自 52cik/github-hans
<details> <summary><kbd>目录树</kbd></summary>[!warning] 本项目从未发布至 GitCode,如您发现请截图并保留证据
| 浏览器类型 | 支持的脚本管理器 |
|---|---|
| Chrome / Chromium 内核 | Tampermonkey, Violentmonkey |
| Safari(全平台) | Tampermonkey, Macaque, Stay |
| Firefox / Gecko 内核 | Tampermonkey, Violentmonkey |
| Via(Android) | 内置管理器 |
[!NOTE] 版本说明:
- 🚀 开发版:实时更新,每周五自动更新词库
- 🛡️ 稳定版:每周一同步开发版词库,更稳定
D:\github-chinese\locals.js)// 原始路径
// @require https://raw.githubusercontent.com/...
// 修改为
// @require file:///D:/github-chinese/locals.js
[!IMPORTANT] 若无效:
- 进入 Tampermonkey 插件
设置页- 将
通用 - 配置模式设置为高级,进入高级设置模式- 找到
安全 - 允许脚本访问本地文件并设置为外部(@require 和 @resource)
<div align="right"> </div>[!TIP] 💡 温馨提示: 您可以将词库文件拖拽至浏览器地址栏,复制路径直接使用。
on开头的时间正则,并停用时间元素监视characterDataPage规则,对特定页面启用筛选字符数据的变更ignoreMutationSelectorPage规则,忽略特定突变元素reIgnoreClass,reIgnoreItemprop,ignoreId,ignoreTag为ignoreSelectorPage规则,处理全局及特定页面,忽略特定元素page变化的忽略规则、正则规则数组等zh-CN, 与环境语言设置一致www.githubstatus.comskills.github.com切换正则功能按钮1.9.0-2023-12-09。
1.9.0: 主版本号(由项目所有者更新)2023-12-09:词库发布版本号(由 GitHub Action 自动更新)词库发布版本号词库发布版本号, 词库内容同上一次GitHub 源【开发版】README.md 中自动更新贡献者头像transDesc 函数代码translate-me翻译按钮watchUpdate 函数新增节点文本更新的情况transBySelector和transDesc函数延迟执行时间Itemprop过滤规则, 依然使用正则方式tooltipped样式提示, 依然使用正则方式greasyfork 托管源切换到按页面精细化词条模式元素筛选器翻译逻辑GitHub源开始切换到按页面精细化词条模式(开发版), 词库未完全迁移适配greasyfork源词库文件的同步更新TURBO-FRAME框架处理代码. Github 已调整新动态加载模式, 直接检测url的变化就能获取对应的page信息Shadow DOM翻译, 并监听变化时间元素翻译专项正则词条page有效才翻译页面简介翻译引擎GitHub中文社区失效, 改为讯飞引擎(测试)RegExp与构造函数new RegExp冲突预告, 下次将细化page匹配规则, 导致词库文件结构大调整, 词库文件会适当变大, 页面正则更精细效率会提升
GitHub 的 ajax 载入方式逐步从 defunkt/jquery-pjax 切换到 hotwired/turbo, 导致已有的动态监测方式逐步失效
目前, 通过以下修复:
BODY 元素新增监视TURBO-FRAME 框架, 获取对应的 page翻译描述返回值无法插入chrome浏览器自带翻译功能卡死页面其他更新:
rePagePath,rePagePathRepo,rePagePathOrg匹配规则,限制路径匹配层次,排除干扰document.URL变化触发标题翻译和JS 筛选器翻译关闭正则无法生效, 需要刷新页面才生效JS 筛选器规则document.body和title更新机制, 导致原有的监测更新规则部分失效, 目前使用document.documentElement监视整个页面 DOM 的变更<HEAD>标签标题翻译和JS 筛选器翻译, 依据 URL变化更新时间元素翻译功能页面标题翻译函数遍历节点函数逻辑transPage函数,默认翻译公共部分getPage函数, 使ClassName匹配规则优先translate函数, 跳过不存在英文字母和符号,., 保留首尾空白部分等es6新语法JS 选择器规则欢迎通过以下方式参与贡献:
locals.js)一如既往,感谢我们出色的贡献者❤️!
<!--AUTO_GENERATED_PLEASE_DONT_DELETE_IT--> <a href="https://github.com/maboloshi" title="沙漠之子"> </a> <a href="https://github.com/52cik" title="楼教主"> </a> <a href="https://github.com/TC999" title="陈生杂物房"> </a> <a href="https://github.com/qznfbnj" title="其智乃反不能及"> </a> <a href="https://github.com/wyc-26" title="wyc-26"> </a> <a href="https://github.com/LuYifei2011" title="Lu Yifei"> </a> <a href="https://github.com/tangyuan0821" title="Paper Moon"> </a> <a href="https://github.com/pylover7" title="大叶子"> </a> <a href="https://github.com/cat-kun" title="cat-kun"> </a> <a href="https://github.com/ChinaGodMan" title="人民的勤务员"> </a> <a href="https://github.com/buiawpkgew1" title="菾凴"> </a> <a href="https://github.com/pecasha" title="Pecasha"> </a> <a href="https://github.com/Kisechan" title="Kise Platinyl"> </a> <a href="https://github.com/yrljroli" title="苓𥤚"> </a> <a href="https://github.com/YiShengJunn" title="益生君"> </a> <a href="https://github.com/3DMXM" title="小莫"> </a> <a href="https://github.com/xuexb" title="前端小武"> </a> <a href="https://github.com/wang4yu6peng13" title="wang4yu6peng13"> </a> <a href="https://github.com/pangshitong" title="pangshitong"> </a> <a href="https://github.com/daydaygo" title="dayday"> </a> <a href="https://github.com/heicks" title="create new ██████╗ ██╔══██╗ ██████╔╝ ██╔══██╗ ██████╔╝ ╚═════╝ ██╗ ██╗ ██║ ██║ ██║ ██║ ██║ ██║ ╚█████╔╝ ╚═════╝ ███████╗ ██╔════╝ ██║████═╗ ██║ ██ ║ ╚██████╔╝ ╚══════╝"> </a> <a href="https://github.com/NyA1K0" title="NyA!K0"> </a> <a href="https://github.com/KS-OTO" title="KS-OTO"> </a> <a href="https://github.com/swsoyee" title="InfinityLoop"> </a> <a href="https://github.com/ImgBotApp" title="Imgbot"> </a> <a href="https://github.com/neveler" title="neveler"> </a> <a href="https://github.com/wang93wei" title="AlanWang"> </a> <!--AUTO_GENERATED_PLEASE_DONT_DELETE_IT-END--><div align="right"> </div>贡献者列表,由 GitHub Action 自动生成
| 微信赞赏 | 支付宝赞赏 |
|---|---|
| <small>☕喝点咖啡继续干☕</small> | |
| <small>🌶️来包辣条吧~🍪</small> |