Github翻译助手

帮助你将 GitHub 页面中的主要英文内容快速翻译为中文,并尽量保留文件/文件夹名称及代码内容不被误翻,支持一键翻译与恢复,提升开源项目阅读效率。

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install an extension such as Tampermonkey or Violentmonkey to install this script.

You will need to install an extension such as Tampermonkey or Userscripts to install this script.

You will need to install an extension such as Tampermonkey to install this script.

You will need to install a user script manager extension to install this script.

(I already have a user script manager, let me install it!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(I already have a user style manager, let me install it!)

نووسەر
tyh699
Daily installs
8
Total installs
8
Ratings
0 0 0
وەشان
0.7.0
Created
2026-04-02
Updated
2026-04-02
Size
19.6 KB
مۆڵەت
MIT
Applies to

GitHub Interface Translator Userscript

这个油猴脚本用于在 GitHub 页面中翻译大部分可读文本,目标语言为中文。

功能

  • 翻译 GitHub 页面上的主要文案(按钮、说明、描述等)
  • 不翻译文件/文件夹名称区域
  • 不翻译代码块、行内代码和代码视图
  • 支持一键切换:翻译页面 / 恢复原文
  • 支持 GitHub 页面内跳转(Turbo/PJAX)
  • 对动态加载内容会自动补翻

说明

  • 当前使用 translate.googleapis.com 进行翻译请求。
  • 如果翻译接口在某些网络环境不可用,脚本会自动保留原文,不会破坏页面结构。
  • 由于 GitHub 页面结构会持续变化,个别区域可能需要后续补充选择器规则。
  • 性能优化策略:默认不启用全局高频 DOM 监听,仅在你点击“翻译页面”后监听新增节点并按批次补翻。
  • 如果你设备性能较弱,可将脚本内 ENABLE_DYNAMIC_TRANSLATE 改为 false,关闭动态补翻以进一步降低负载。