An open API service indexing awesome lists of open source software.

https://github.com/baimohui/i18n-mage

๐Ÿช„ Wave your i18n wand. Conjure order from the chaos with auto-translation, smart fixes, and Excel sync.
https://github.com/baimohui/i18n-mage

automation frontend i18n i18next internationalization l10n localization productivity react react-i18next translation translation-management typescript vscode-extension vue vue-i18n

Last synced: 13 days ago
JSON representation

๐Ÿช„ Wave your i18n wand. Conjure order from the chaos with auto-translation, smart fixes, and Excel sync.

Awesome Lists containing this project

README

          

i18n Mage


English | ็ฎ€ไฝ“ไธญๆ–‡


Streamline your frontend i18n workflow with Vue I18n & React i18next support, auto-completion, inline hints, and Excel import/export.



VS Code Marketplace


Open VSX Version


GitHub Stars


License: MIT


Issues


Ask DeepWiki

---
## โœจ Features

### ๐ŸŒณ Translation Tree Overview

* Displays an overview panel via the VS Code sidebar.
* Includes statistics (total keys, missing translations, etc.).
* Sync status per language file.
* Tree-structured view of translation entries.
* Functional buttons: Search, Export, Import, Sort, Fix.

![Tree Provider](https://raw.githubusercontent.com/baimohui/i18n-mage-docs/refs/heads/main/docs/en/guide/images/panel-view.png)

### ๐Ÿง  Inline Translation Hints

* Show actual translation inline where `t()` is used.
* Supports custom styles (color, max length, etc.).
* Toggleable via shortcuts.

![Inline Hints](https://raw.githubusercontent.com/baimohui/i18n-mage-docs/refs/heads/main/docs/en/guide/images/inline-hints.gif)

### โšก Intelligent Code Completion

* Automatically suggests existing translation entries when typing internationalization functions (e.g., `t("...")`)
* Supports candidate filtering by key, value, or bidirectional matching
* Auto-fills translation keys to boost multilingual development efficiency

![Code Completion](https://raw.githubusercontent.com/baimohui/i18n-mage-docs/refs/heads/main/docs/en/guide/images/completion.gif)

### ๐Ÿšง Auto-Fill Missing Translations

- Integrates global providers (DeepL, Google, OpenAI/ChatGPT) and optional regional providers (DeepSeek, Baidu, Tencent, Youdao)
- Fill missing translations automatically with preview and manual review

![Auto-Fill Missing Translations](https://raw.githubusercontent.com/baimohui/i18n-mage-docs/refs/heads/main/docs/en/guide/images/fill-missing-translations.gif)

### ๐Ÿงน Auto-Fix Undefined Entries

- Detect undefined entries
- Match existing entries or extract text into new entries
- Support customizable key naming strategies

![Auto-Fix Undefined Entries](https://raw.githubusercontent.com/baimohui/i18n-mage-docs/refs/heads/main/docs/en/guide/images/fix-undefined-entries.gif)

### ๐Ÿ›„ Extract Hardcoded Texts
- Scan hardcoded texts and batch-extract them into i18n keys
- Replace source code and write back into language files
- Preview before apply, suitable for migrating legacy projects

![Extract Hardcoded Texts](https://raw.githubusercontent.com/baimohui/i18n-mage-docs/refs/heads/main/docs/en/guide/images/extract-hardcoded-text.gif)

### ๐Ÿ•ต๏ธ Detect Unused Keys

* Analyzes usage of all keys.
* Pattern matching for dynamic keys.
* Delete or mark as used manually.

![Detect Unused Keys](https://raw.githubusercontent.com/baimohui/i18n-mage-docs/refs/heads/main/docs/en/guide/images/check-usage.gif)

### ๐Ÿ” Search Translation Entries

- Search across languages to locate target entries quickly
- Support whole-word and case-sensitive search

![Search Translation Entries](https://raw.githubusercontent.com/baimohui/i18n-mage-docs/refs/heads/main/docs/en/guide/images/search.gif)

### ๐Ÿ“Š Excel Import/Export

- Export entries to Excel for translation teams
- Import translations from Excel and write back automatically
- Export git-based diff sheets (ADD/MODIFY/DELETE)
- Import diff sheets back into project

![Excel Import/Export](https://raw.githubusercontent.com/baimohui/i18n-mage-docs/refs/heads/main/docs/en/guide/images/excel.png)

### ๐Ÿ“‹ Cross-Project Entry Migration
- Copy entries by file or prefix into clipboard
- Paste copied entries into target projects for fast migration

![Copy Translation Data](https://raw.githubusercontent.com/baimohui/i18n-mage-docs/refs/heads/main/docs/en/guide/images/copy-entries.gif)

### Write Sorting
- Sort by key name or first occurrence position
- Reduce noisy diffs after fixes
![Sorting](https://raw.githubusercontent.com/baimohui/i18n-mage-docs/refs/heads/main/docs/en/guide/images/sorting.gif)

## โšก Quick Start

### 1. Install the Extension

**Option 1: Install from VS Code**
1. Open VS Code and go to Extensions (`Ctrl+Shift+X` / `Cmd+Shift+X`)
2. Search for `i18n Mage`
3. Click **Install**

**Option 2: Command Line Installation**
```bash
ext install jensen-wen.i18n-mage
```

**Option 3: Manual Installation**
Visit the [Marketplace Page](https://marketplace.visualstudio.com/items?itemName=jensen-wen.i18n-mage) to install.

### 2. Open Translation Panel

- The extension automatically scans your project's i18n directory after activation
- Click the i18n Mage icon in the sidebar to open the translation panel
- Right-click in the panel to manually set translation directory if not auto-detected

### 3. Set Languages

- Right-click to configure display and source languages
- Manually assign languages to files if automatic detection fails

### 4. Configure Translation Services (Optional)

- Supported services: DeepL, Google, DeepSeek, Baidu, Tencent
- Configuration path: `Settings โ†’ Extensions โ†’ i18n Mage โ†’ Translation Services`

## ๐Ÿงฐ Configuration

### ๐Ÿš€ Key Categories

* General settings
* Framework support (e.g. translation function names, interpolation)
* Translation services (API keys, reference language)
* Analysis rules (file scanning, auto detection)
* Write rules (key style, quote style, indentation)
* Inline hint styling
* Workspace-specific settings

> All settings are accessible via the VS Code Settings UI or in `.vscode/settings.json`.

## ๐Ÿค Contributing

```bash
git clone https://github.com/baimohui/i18n-mage.git
cd i18n-mage
npm install
# f5 to debug
npm run check
npm run build
```

Feel free to submit issues or PRs!

## ๐Ÿ“„ License

MIT License ยฉ 2024-2025 Jensen Wen