Skip to content

About

A browser extension that provides multilingual translations for GitHub, primarily in Chinese.

Topics

Resources

Security policy

Stars

8 stars

Watchers

2 watching

Forks

Repository files navigation

Github-i18n

Localize the GitHub interface into your language — dictionary shipped inside the extension, fully local, zero network requests

CI   Bun   Manifest V3   License

Features • Installation • Usage • How it works • Development • Documentation

English · 简体中文 · 繁體中文 · 日本語 · 한국어 · Español · Français · Deutsch · Português (Brasil) · Português (Portugal) · Русский

Note

Not affiliated with GitHub. The name and logo of "GitHub" are trademarks of GitHub, Inc. This project is an independent community localization tool with no affiliation, partnership, or endorsement from GitHub, Inc. See NOTICE for details.


Features

  • Built-in dictionary: translations ship with the extension — nothing is fetched, no online service is called.
  • Loaded per page: entries are routed by module, page-specific ones override the global fallback, and text that is not covered stays in English.
  • Content untouched: code blocks, diffs, the editor, READMEs and issue bodies are skipped as whole blocks; only interface text is translated.
  • Zero collection: the store build contains no collector at all; the development build (bun run build) has an optional local-only miss collector, off by default.
  • Follows the SPA: a MutationObserver keeps translating as Turbo navigates, so no refresh is needed.

Installation

The extension targets github.com and gist.github.com, and is distributed as build-from-source plus sideloading.

bun install
bun run build
  1. Open chrome://extensions (edge://extensions on Edge) and turn on Developer mode;
  2. Click Load unpacked and select dist/;
  3. Open GitHub and click the toolbar icon to confirm the toggle is on.

Tip

After changing code, run bun run watch to rebuild, then click Reload once on the extensions page; bun run pack first runs the production build (developer mode removed) and then produces github-i18n-v<version>.zip.


Usage

  • Toggle: turn it off and the whole page reverts to English.
  • Language: follows the browser by default, and can also be chosen manually. Simplified Chinese (the 100% baseline) and 日本語 are fully translated today; the other registered languages are in progress and stay hidden from the selector until they are ready. Untranslated text stays in English.
  • Developer mode (development builds only; absent from store packages): off by default; when enabled it only collects missed text on your machine, which you can copy or clear.

How it works

The content script is injected at document_start, watches the page with a MutationObserver, resolves a dictionary view by "path + locale", and writes the translations back.

Show the pipeline
flowchart LR
    GH["GitHub page"] --> OBS["MutationObserver"]
    OBS --> ENGINE["engine<br/>microtask batching · flush"]
    ENGINE --> VIEW["pages<br/>path + locale → view"]
    DICT["dictionary"] --> VIEW
    VIEW --> WALKER["walker<br/>text · attributes · rules"]
    WALKER --> DOM["translations written back"]
Loading

Development

bun run check          # full gate
bun run build          # build dist/
bun run watch          # rebuild on change
bun run pack           # package the zip
bun run report:misses  # miss log → report

bun run check must be green before committing. The dictionary is 100% original, and importing dictionaries or code from any GPL / AGPL localization project is strictly forbidden. Conventions live in AGENTS.md, the workflow in the development guide.


Documentation


Status

Repobeats analytics image


License

Source code and dictionary are both original work, distributed under the MIT license; not affiliated with GitHub, Inc., see NOTICE for details.

About

A browser extension that provides multilingual translations for GitHub, primarily in Chinese.

Topics

Resources

Security policy

Stars

8 stars

Watchers

2 watching

Forks

Used by

Contributors

Languages