Javaプロジェクトの国際化(I18N)対応を強化するVSCode拡張機能
A VSCode extension for mapping Java string literals to property keys for internationalization (I18N).
-
🔍 Hover Support / ホバーサポート
messageSource.getMessage("key")
にカーソルを当てると、対応するmessages.properties
の値を表示
Hovering overmessageSource.getMessage("key")
displays the corresponding value from themessages.properties
file. -
🔗 Go to Definition / 定義へジャンプ
Ctrl+クリック(macOSではCmd+クリック)でプロパティの定義へ直接移動
Ctrl+Click (or Cmd+Click on macOS) jumps directly to the property's definition. -
⚠️ Undefined Key Warning / 未定義キーの警告存在しないプロパティキーを警告として表示し、クイックフィックスを提供
Displays warnings for missing property keys and provides quick fixes. -
🛠 Quick Fix Support / クイックフィックス機能
messages.properties
に未定義キーを追加、または類似の既存キーに変更可能
Add missing keys tomessages.properties
or replace them with similar existing keys. -
🔧 Custom Method Patterns / カスタムメソッドパターン対応
設定ファイルで、I18Nキーを抽出するメソッドを自由に追加可能
Configure additional method patterns for extracting I18N keys via settings.
-
Clone the repository / リポジトリをクローン:
git clone https://github.com/TOMATOofGOHAN/java-i18n-ally.git
-
Navigate to the project directory / プロジェクトディレクトリへ移動:
cd java-i18n-ally
-
Install dependencies / 依存パッケージをインストール:
npm install
-
Build the extension / 拡張機能をビルド:
npm run build
-
Run in VSCode / VSCodeで拡張機能を起動:
- Open the project in VSCode / プロジェクトをVSCodeで開く
- Press
F5
to launch the extension in a new VSCode window /F5
を押して、新しいVSCodeウィンドウで拡張機能を実行
Customize method patterns for I18N key detection in settings.json
.
settings.json
にカスタムメソッドを追加して、I18Nキーの取得対象を拡張できます:
{
"java-i18n-ally.customMethods": [
"MessageUtils.log",
"MessageUtils.debug",
"MessageUtils.warn",
"MessageUtils.error"
]
}
This project is licensed under the MIT License.
このプロジェクトは MIT License のもとで提供されています。