Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/CONTRIBUTING.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Node.jsが必要なのは検証スクリプトを実行するときだけです

## 辞書の編集

翻訳は`dictionaries/<言語コード>.json`にあります。現在は[`ja.json`](../dictionaries/ja.json)、[`zh-CN.json`](../dictionaries/zh-CN.json)、[`es.json`](../dictionaries/es.json)、[`de.json`](../dictionaries/de.json)、[`pt-BR.json`](../dictionaries/pt-BR.json)、[`ko.json`](../dictionaries/ko.json)の6つです
翻訳は`dictionaries/<言語コード>.json`にあります。現在は[`ja.json`](../dictionaries/ja.json)、[`zh-CN.json`](../dictionaries/zh-CN.json)、[`es.json`](../dictionaries/es.json)、[`de.json`](../dictionaries/de.json)、[`pt-BR.json`](../dictionaries/pt-BR.json)、[`ko.json`](../dictionaries/ko.json)、[`fr.json`](../dictionaries/fr.json)、[`ru.json`](../dictionaries/ru.json)の8つです

```jsonc
{
Expand Down Expand Up @@ -72,7 +72,7 @@ Node.jsが必要なのは検証スクリプトを実行するときだけです

## 翻訳方針

- 同じ用語がGitHub公式ドキュメントにある場合は、その訳語と表記を第一の参考にします。[日本語ドキュメント](https://docs.github.com/ja)、[簡体字中国語ドキュメント](https://docs.github.com/zh)、[スペイン語ドキュメント](https://docs.github.com/es)、[ドイツ語ドキュメント](https://docs.github.com/de)、[ポルトガル語ドキュメント](https://docs.github.com/pt)、[韓国語ドキュメント](https://docs.github.com/ko)を参照してください。
- 同じ用語がGitHub公式ドキュメントにある場合は、その訳語と表記を第一の参考にします。[日本語ドキュメント](https://docs.github.com/ja)、[簡体字中国語ドキュメント](https://docs.github.com/zh)、[スペイン語ドキュメント](https://docs.github.com/es)、[ドイツ語ドキュメント](https://docs.github.com/de)、[ポルトガル語ドキュメント](https://docs.github.com/pt)、[韓国語ドキュメント](https://docs.github.com/ko)、[フランス語ドキュメント](https://docs.github.com/fr)、[ロシア語ドキュメント](https://docs.github.com/ru)を参照してください。
- 現在のGitHub画面で文脈を確認し、同じ英語キーが使われる既知の箇所も考慮します。1つの辞書キーには1つの訳しか設定できないため、複数の文脈で意味が通る表現を優先してください。
- 既存辞書の関連する訳語と表記を統一し、GitHubが製品名や機能名を原文のまま使用している場合はその表記を維持します。
- GitHub公式ドキュメントは参考基準であり、絶対的なルールではありません。公式の訳語が画面上で不自然な場合や現在の文脈に合わない場合は、明確で自然な訳を優先し、その理由をプルリクエストに記載してください。
Expand All @@ -93,6 +93,8 @@ Node.jsが必要なのは検証スクリプトを実行するときだけです
| ドイツ語 | `de` | `_locales/de` |
| ブラジルポルトガル語 | `pt-BR` | `_locales/pt_BR` |
| 韓国語 | `ko` | `_locales/ko` |
| フランス語 | `fr` | `_locales/fr` |
| ロシア語 | `ru` | `_locales/ru` |

`_locales/zh-CN`や`_locales/pt-BR`というディレクトリ名はブラウザに無視されます。これを検出する仕組みはありません。[`scripts/validate.mjs`](../scripts/validate.mjs)は存在するロケールディレクトリ同士でメッセージキーを比較するだけで、`languages.json`のコードとの対応は検査していないためです。拡張機能のUIとメタデータは黙って英語にフォールバックします。

Expand Down
6 changes: 4 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Node.js is needed only to run the validator. CI uses Node 26.

## Editing the dictionaries

Translations live in `dictionaries/<code>.json` — currently [`ja.json`](../dictionaries/ja.json), [`zh-CN.json`](../dictionaries/zh-CN.json), [`es.json`](../dictionaries/es.json), [`de.json`](../dictionaries/de.json), [`pt-BR.json`](../dictionaries/pt-BR.json), and [`ko.json`](../dictionaries/ko.json).
Translations live in `dictionaries/<code>.json` — currently [`ja.json`](../dictionaries/ja.json), [`zh-CN.json`](../dictionaries/zh-CN.json), [`es.json`](../dictionaries/es.json), [`de.json`](../dictionaries/de.json), [`pt-BR.json`](../dictionaries/pt-BR.json), [`ko.json`](../dictionaries/ko.json), [`fr.json`](../dictionaries/fr.json), and [`ru.json`](../dictionaries/ru.json).

```jsonc
{
Expand Down Expand Up @@ -72,7 +72,7 @@ Values must be non-empty strings. Duplicate keys within one file are an error.

## Translation guidelines

- When the same term appears in the official GitHub Docs, use its localized wording and capitalization as the primary reference. See the [Japanese documentation](https://docs.github.com/ja), [Simplified Chinese documentation](https://docs.github.com/zh), [Spanish documentation](https://docs.github.com/es), [German documentation](https://docs.github.com/de), [Portuguese documentation](https://docs.github.com/pt), and [Korean documentation](https://docs.github.com/ko).
- When the same term appears in the official GitHub Docs, use its localized wording and capitalization as the primary reference. See the [Japanese documentation](https://docs.github.com/ja), [Simplified Chinese documentation](https://docs.github.com/zh), [Spanish documentation](https://docs.github.com/es), [German documentation](https://docs.github.com/de), [Portuguese documentation](https://docs.github.com/pt), [Korean documentation](https://docs.github.com/ko), [French documentation](https://docs.github.com/fr), and [Russian documentation](https://docs.github.com/ru).
- Check the term on the current GitHub screen and consider every known place where the same English key appears. Because one dictionary key has one translation, prefer wording that remains clear across those contexts.
- Keep terminology consistent with related entries in the existing dictionary and preserve official product and feature names where GitHub does.
- GitHub Docs are a reference, not an absolute rule. If the documented wording is unnatural in the UI or does not fit the current context, prefer a clear, natural translation and explain the reason in the pull request.
Expand All @@ -93,6 +93,8 @@ Values must be non-empty strings. Duplicate keys within one file are an error.
| German | `de` | `_locales/de` |
| Brazilian Portuguese | `pt-BR` | `_locales/pt_BR` |
| Korean | `ko` | `_locales/ko` |
| French | `fr` | `_locales/fr` |
| Russian | `ru` | `_locales/ru` |

A directory named `_locales/zh-CN` or `_locales/pt-BR` is ignored by the browser. Nothing catches this: `scripts/validate.mjs` compares message keys between whatever locale directories exist, but never checks them against the codes in `languages.json`. The extension UI and metadata silently fall back to English.

Expand Down
2 changes: 2 additions & 0 deletions .github/ISSUE_TEMPLATE/translation_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ body:
- German
- Portuguese (Brazil)
- Korean
- French
- Russian
validations:
required: true

Expand Down
23 changes: 17 additions & 6 deletions README.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,24 @@

[English](README.md) | [日本語](README.ja.md)

[![Latest Release](https://img.shields.io/github/v/release/nobuo-miura/github-ui-translator?label=Latest%20Release)](https://github.com/nobuo-miura/github-ui-translator/releases/latest)
[![Chrome Web Store](https://img.shields.io/chrome-web-store/v/igdplojdbbpfbedgoaokfcagpkofmngk?label=Chrome%20Web%20Store&logo=googlechrome)](https://chromewebstore.google.com/detail/github-ui-translator/igdplojdbbpfbedgoaokfcagpkofmngk)
[![Microsoft Edge Add-ons](https://img.shields.io/badge/Microsoft%20Edge%20Add--ons-Available-0078D7?logo=microsoftedge)](https://microsoftedge.microsoft.com/addons/detail/fgjocjmjjghflobobinafkbkeildanoj)
[![Latest Release](https://img.shields.io/github/v/release/nobuo-miura/github-ui-translator?label=Latest%20Release)](https://github.com/nobuo-miura/github-ui-translator/releases/latest)
[![Validation](https://github.com/nobuo-miura/github-ui-translator/actions/workflows/validate.yml/badge.svg)](https://github.com/nobuo-miura/github-ui-translator/actions/workflows/validate.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)

GitHubの英語UIを、ローカル辞書を使って日本語・簡体字中国語・スペイン語・ドイツ語・ブラジルポルトガル語・韓国語に翻訳するブラウザ拡張機能です(Chrome / Edge / Firefox対応)。
GitHubの英語UIを、ローカル辞書を使って日本語・簡体字中国語・スペイン語・ドイツ語・ブラジルポルトガル語・韓国語・フランス語・ロシア語に翻訳するブラウザ拡張機能です(Chrome / Edge / Firefox対応)。
外部の翻訳APIやクラウドサービスには一切依存せず、すべてブラウザ内で完結します。

<details>
<summary>スクリーンショット(対応8言語)</summary>

先頭は翻訳前のGitHubの英語UI、その下が各言語の翻訳結果です。

![対応8言語の翻訳結果](docs/images/languages.png)

</details>

## 特徴

- 翻訳は完全ローカルで動作し、ページ内容や設定を外部サービスへ送信しない
Expand All @@ -24,7 +33,7 @@ GitHubの英語UIを、ローカル辞書を使って日本語・簡体字中国

## 制限事項

- 現在対応している言語は日本語・簡体字中国語・スペイン語・ドイツ語・ブラジルポルトガル語・韓国語です。今後も対応範囲が整い次第、ほかの言語を追加する予定です
- 現在対応している言語は日本語・簡体字中国語・スペイン語・ドイツ語・ブラジルポルトガル語・韓国語・フランス語・ロシア語です。今後も対応範囲が整い次第、ほかの言語を追加する予定です
- "3 commits" や "opened 2 days ago" のような、数値・日付を含む動的な文言は翻訳されません。ユーザー名などのユーザー作成コンテンツも対象外です。詳しくは[翻訳対象の範囲](docs/translation-scope.ja.md)を参照してください
- `github.com` 以外のドメイン(GitHub Enterprise等)には対応していません
- Chrome・Edge・Firefoxで動作確認済みです。その他のChromium系ブラウザも動くと思われますが、明示的な検証はしていません
Expand Down Expand Up @@ -73,15 +82,15 @@ git clone https://github.com/nobuo-miura/github-ui-translator.git

## 使い方

- ツールバーの拡張機能アイコンをクリックすると、翻訳のON/OFFトグル、言語選択、グローバルヘッダー翻訳の設定が表示される(現時点では日本語・簡体字中国語・スペイン語・ドイツ語・ブラジルポルトガル語・韓国語に対応
- ツールバーの拡張機能アイコンをクリックすると、翻訳のON/OFFトグル、言語選択、グローバルヘッダー翻訳の設定が表示される(現時点では日本語・簡体字中国語・スペイン語・ドイツ語・ブラジルポルトガル語・韓国語・フランス語・ロシア語に対応
- グローバルヘッダー翻訳は既定でON。GitHubのReact hydration完了後にのみ翻訳するため通常はグローバル検索と競合しないが、万一検索画面が開かない場合はOFFにできる
- トグル、言語、グローバルヘッダー翻訳の設定を変更すると、開いているGitHubのタブが自動的に再読み込みされ、設定が反映される
- Popup下部にはこのリポジトリへのリンクがある
- 拡張機能のオプション画面(Chromeは`chrome://extensions`、Edgeは`edge://extensions`の詳細から、Firefoxは`about:addons`から開く)で、同梱している辞書の情報とバージョンを確認できる

## 辞書のカスタマイズ

変更したい言語の辞書ファイル(例: `dictionaries/ja.json`、`dictionaries/zh-CN.json`、`dictionaries/es.json`、`dictionaries/de.json`、`dictionaries/pt-BR.json`、`dictionaries/ko.json`)を直接編集することで、翻訳される文言を追加・変更できます。
変更したい言語の辞書ファイル(例: `dictionaries/ja.json`、`dictionaries/zh-CN.json`、`dictionaries/es.json`、`dictionaries/de.json`、`dictionaries/pt-BR.json`、`dictionaries/ko.json`、`dictionaries/fr.json`、`dictionaries/ru.json`)を直接編集することで、翻訳される文言を追加・変更できます。
エントリはGitHubの画面(リポジトリナビゲーション、リポジトリSettings、Organization Settingsなど)ごとにセクション分けされており、各セクションの先頭に `// ====` というコメント行を入れています。どの文言がどの画面のものか一目で分かり、GitHub側のUI変更にも気付きやすくなっています。

```jsonc
Expand Down Expand Up @@ -126,7 +135,9 @@ github-ui-translator/
│ ├─ es.json … スペイン語辞書
│ ├─ de.json … ドイツ語辞書
│ ├─ pt-BR.json … ブラジルポルトガル語辞書
│ └─ ko.json … 韓国語辞書
│ ├─ ko.json … 韓国語辞書
│ ├─ fr.json … フランス語辞書
│ └─ ru.json … ロシア語辞書
├─ docs/
│ ├─ translation-scope.md … 英語版
│ └─ translation-scope.ja.md … 日本語版
Expand Down
23 changes: 17 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,24 @@

[English](README.md) | [日本語](README.ja.md)

[![Latest Release](https://img.shields.io/github/v/release/nobuo-miura/github-ui-translator?label=Latest%20Release)](https://github.com/nobuo-miura/github-ui-translator/releases/latest)
[![Chrome Web Store](https://img.shields.io/chrome-web-store/v/igdplojdbbpfbedgoaokfcagpkofmngk?label=Chrome%20Web%20Store&logo=googlechrome)](https://chromewebstore.google.com/detail/github-ui-translator/igdplojdbbpfbedgoaokfcagpkofmngk)
[![Microsoft Edge Add-ons](https://img.shields.io/badge/Microsoft%20Edge%20Add--ons-Available-0078D7?logo=microsoftedge)](https://microsoftedge.microsoft.com/addons/detail/fgjocjmjjghflobobinafkbkeildanoj)
[![Latest Release](https://img.shields.io/github/v/release/nobuo-miura/github-ui-translator?label=Latest%20Release)](https://github.com/nobuo-miura/github-ui-translator/releases/latest)
[![Validation](https://github.com/nobuo-miura/github-ui-translator/actions/workflows/validate.yml/badge.svg)](https://github.com/nobuo-miura/github-ui-translator/actions/workflows/validate.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](./LICENSE)

GitHub UI Translator is a browser extension for Chrome, Edge, and Firefox that translates GitHub's English UI into Japanese, Simplified Chinese, Spanish, German, Brazilian Portuguese, or Korean using a local dictionary.
GitHub UI Translator is a browser extension for Chrome, Edge, and Firefox that translates GitHub's English UI into Japanese, Simplified Chinese, Spanish, German, Brazilian Portuguese, Korean, French, or Russian using a local dictionary.
It does not rely on external translation APIs or cloud services; all translation runs locally in the browser.

<details>
<summary>Screenshots (all 8 languages)</summary>

The first row is GitHub's original English UI; each row below shows the translation for one language.

![Translation results for all 8 supported languages](docs/images/languages.png)

</details>

## Features

- Performs all translation locally without sending page content or settings to external services
Expand All @@ -24,7 +33,7 @@ It does not rely on external translation APIs or cloud services; all translation

## Limitations

- Japanese, Simplified Chinese, Spanish, German, Brazilian Portuguese, and Korean are currently supported. Additional languages are planned as coverage expands.
- Japanese, Simplified Chinese, Spanish, German, Brazilian Portuguese, Korean, French, and Russian are currently supported. Additional languages are planned as coverage expands.
- Dynamic text containing numbers or dates, such as "3 commits" or "opened 2 days ago", is not translated. User-created content such as user names is also excluded. See [Translation scope](docs/translation-scope.md) for details.
- Only `github.com` is supported. GitHub Enterprise and other custom domains are not supported.
- Tested on Chrome, Edge, and Firefox. Other Chromium-based browsers should also work but have not been explicitly tested.
Expand Down Expand Up @@ -73,14 +82,14 @@ git clone https://github.com/nobuo-miura/github-ui-translator.git

## Usage

- Click the extension icon in the toolbar to open the on/off toggle and the language selector. Japanese, Simplified Chinese, Spanish, German, Brazilian Portuguese, and Korean are bundled today; the dropdown is ready for additional languages once more dictionaries are added.
- Click the extension icon in the toolbar to open the on/off toggle and the language selector. Japanese, Simplified Chinese, Spanish, German, Brazilian Portuguese, Korean, French, and Russian are bundled today; the dropdown is ready for additional languages once more dictionaries are added.
- Changing the toggle or the language reloads open GitHub tabs so the new setting takes effect.
- The popup also lets you select whether to translate the global header and has a link to this repository. Changing this option reloads open GitHub tabs. Global header translation is on by default and waits for GitHub's React hydration to finish before translating; turn it off if the global search ever fails to open.
- Open the extension options page (`chrome://extensions` on Chrome, `edge://extensions` on Edge, or `about:addons` on Firefox) to view the bundled dictionary information and extension version.

## Customizing the Dictionary

You can add or change translations by editing the dictionary file for the language you want to change directly (e.g. `dictionaries/ja.json`, `dictionaries/zh-CN.json`, `dictionaries/es.json`, `dictionaries/de.json`, `dictionaries/pt-BR.json`, `dictionaries/ko.json`).
You can add or change translations by editing the dictionary file for the language you want to change directly (e.g. `dictionaries/ja.json`, `dictionaries/zh-CN.json`, `dictionaries/es.json`, `dictionaries/de.json`, `dictionaries/pt-BR.json`, `dictionaries/ko.json`, `dictionaries/fr.json`, `dictionaries/ru.json`).
Entries are grouped into sections by GitHub screen (repository navigation, repository Settings, organization Settings, etc.), each preceded by a `// ====` comment line, so you can tell at a glance which screen an entry belongs to and quickly spot when GitHub's UI text changes.

```jsonc
Expand Down Expand Up @@ -125,7 +134,9 @@ github-ui-translator/
│ ├─ es.json # Spanish dictionary
│ ├─ de.json # German dictionary
│ ├─ pt-BR.json # Brazilian Portuguese dictionary
│ └─ ko.json # Korean dictionary
│ ├─ ko.json # Korean dictionary
│ ├─ fr.json # French dictionary
│ └─ ru.json # Russian dictionary
├─ docs/
│ ├─ translation-scope.md # English version
│ └─ translation-scope.ja.md # Japanese version
Expand Down
Loading