Open-source project
qqxpee/antigravity2-cn avatar
qqxpee/antigravity2-cn

antigravity2-cn: Chinese Localization for the Antigravity 2.0 IDE

🚀 Antigravity 2.0 Chinese Localization Suite & Injector. 专为 2.0 新版 Electron 架构量身定制的零依赖中文汉化包。基于 ASAR 物理层动态包注入机制,完美汉化界面、系统菜单、任务栏托盘及设置面板,支持一键极速安装与无痕还原。

785 stars60 forksJavaScriptLicense varies

At a glance

What is it?
antigravity2-cn is a zero-dependency Chinese localization package for the Antigravity AI coding IDE. It patches the Electron application's ASAR archive at runtime to translate the interface, menus, tray icons, settings panel, and loading screens, with one-click install and uninstall scripts for Windows and macOS.
Who is it for?
antigravity2-cn is the right choice for Chinese-speaking developers who use the Antigravity AI coding IDE and want a fully localized interface. The ASAR injection approach means each Antigravity update may require a re-run of the install script, and the localization dictionaries may have gaps immediately after a new Antigravity release.
Can I use it commercially?
Not without permission. GitHub finds no licence file in the repository, and without a licence all rights are reserved by default: you may read the code but not reuse it. Check the README, or ask the authors, before using it.
Is it still maintained?
Yes. The repository last received commits 3 days ago.
What is it written in?
Mainly JavaScript, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on September 30, 2026, and from our analysis. They are not legal advice.

Editorial analysis

What antigravity2-cn Does and Who Uses It

Antigravity is an AI coding IDE built on the Electron framework. Its interface is in English, which creates friction for developers who work in Chinese. antigravity2-cn adds Simplified Chinese and Traditional Chinese translations by patching the Electron app package at the file level, covering the main editor interface, the system title bar menu, the taskbar tray right-click menu, loading animations, the settings panel, and the onboarding flow.

The project is aimed at Chinese-speaking developers who already use Antigravity and want a fully localized experience. The README specifies compatibility with Antigravity v2.17.0 and later, matching the 2.0 Electron architecture that the injection engine targets.

All translation work happens at the visual rendering layer. The README is explicit that the AI model receives the original English instructions you type: only the software's visual interface is translated, and the underlying AI communication is not affected.

How the ASAR Injection Works

Electron packages application code in an `.asar` archive, a binary format that bundles files into a single container. antigravity2-cn works by unpacking the `app.asar` file, injecting translation code, and repacking it.

The injection inserts three scripts. First, `preload.js` uses a WeakSet to track already-translated nodes and a Shadow DOM-aware MutationObserver to watch for new text nodes as they render. When a node's text matches a dictionary entry, it is replaced with the Chinese translation. Short strings (15 characters or fewer) require an exact match on a standalone line; longer strings use a substring sliding replacement to handle dynamically composed interface text.

Second, `menu.js` patches the native title bar menu. Third, `tray.js` translates the taskbar tray and right-click notification menus.

Before making any changes, the engine creates a backup at `app.asar.bak` in the first run. On macOS, the engine also performs a deep code re-signing step after repacking to satisfy macOS security requirements.

Installing and Uninstalling the Localization

The recommended installation method is to download the repository as a ZIP and extract it, or clone it:

bash
git clone https://github.com/qqxpee/antigravity2-cn.git

Before running any script, fully quit Antigravity. Then:

- On Windows, double-click `双击安装中文汉化.bat`. - On macOS, double-click `双击安装中文汉化.command`.

The script prompts for a brand name display choice: keep the English "Antigravity" in the top-left corner (recommended to avoid overflow), hide the brand name entirely, or show the Chinese equivalent. From the command line, these options are:

bash
node localization_engine.js --brand-title english
node localization_engine.js --brand-title hidden
node localization_engine.js --brand-title translated

To restore the original English interface, run the uninstall script:

- Windows: `双击卸载还原官方英文.bat` - macOS: `双击卸载还原官方英文.command`

This removes the injected code and restores the original `app.asar` from the backup. For Traditional Chinese, separate install scripts are provided: `双击安装繁体中文.bat` and `双击安装繁体中文.command`.

Dictionary Structure and AI-Assisted Updates

The translation dictionaries live in the `dicts/` directory as JSON files organized by interface section. `common.json` covers shared vocabulary, sidebar elements, login pages, and common buttons. `page_settings.json` contains the detailed settings panel. `menu_nav.json` covers the system and navigation menus. Traditional Chinese equivalents are in `dicts_tw/`, maintained in parallel.

Adding a new translation entry requires editing the relevant JSON file with an `"Original English Text": "中文翻译"` pair, then re-running the install script to redeploy.

The README describes using the Antigravity IDE itself to update the dictionaries: opening the localization directory as a project workspace in Antigravity and describing the missing translation to the AI assistant lets it write the dictionary entry directly. A `scripts/compare_dicts.js` tool checks that Simplified and Traditional Chinese dictionaries remain aligned after any update.

For the MCP server marketplace, which is populated by Google's cloud backend and changes with each Antigravity update, the localization engine includes a probe that captures the full marketplace JSON when the Add MCP Server panel is open, so a community contributor can paste it to an AI for translation and submit a pull request.

The Known Chat Text Translation Issue

The README dedicates significant space to a specific known issue: when a user types in the chat window a phrase that exactly matches an interface string in the translation dictionary, that phrase may appear translated in the chat bubble.

For short strings (15 characters or fewer), this only triggers on an exact match occupying an entire line. For long strings (more than 15 characters), the substring matching approach means any chat message that contains a complete interface phrase verbatim will have that phrase replaced with its Chinese translation in the visual display.

The README is clear that this does not affect the AI model: the model receives the original English text. The effect is purely visual. The underlying cause is the Electron sandbox and iframe WebView DOM isolation that prevents using CSS class-name-based exclusion to distinguish chat content from interface elements. The README invites contributors to submit a pull request with a solution.

Limitations: No License, Per-Update Maintenance, and Windows-Only Proxy

The repository carries no stated license in the prompt data. Before distributing derivative works or incorporating the code in another project, confirm the terms directly with the maintainer.

Every time Antigravity releases a new version that changes its `app.asar` structure, the localization dictionaries may need updates to cover new interface strings. The project relies on community contributions to keep the dictionaries current. In the period immediately after a new Antigravity release, some interface sections may remain untranslated until contributors submit updates.

The optional Windows proxy injection feature, which injects DLL files to route Antigravity's network calls through a local proxy, is only available on Windows. The README describes this as a solution for users in network-restricted environments who cannot use a system-wide VPN. macOS users who need proxy routing must configure it through system-level proxy settings independently.

Because Node.js is required to run the injection engine, and Antigravity is itself a Node.js/Electron application, Node.js is typically already present on a user's machine. The README notes that if the script reports a missing npm environment, installing the Node.js LTS version and restarting the script resolves it.

Editorial conclusion

antigravity2-cn is the right choice for Chinese-speaking developers who use the Antigravity AI coding IDE and want a fully localized interface. The ASAR injection approach means each Antigravity update may require a re-run of the install script, and the localization dictionaries may have gaps immediately after a new Antigravity release. The repository carries no stated license, so check with the maintainer before incorporating the code into another project. Uninstalling the localization is fully reversible with the included restore script.

Frequently asked questions

Does antigravity2-cn affect the AI model's understanding of my prompts?

No. The README states that only the visual rendering layer is translated. The AI model receives the original English text you type; the translation applies only to the interface display, not to the content sent to the model.

Do I need to reinstall antigravity2-cn after each Antigravity update?

Yes. When Antigravity updates its app.asar, the injected translation is replaced. You need to re-run the install script after each update to restore the Chinese interface. The localization engine re-creates the backup and re-injects the translation scripts.

Is Traditional Chinese supported in addition to Simplified Chinese?

Yes. The repository includes separate Traditional Chinese dictionaries in dicts_tw/ and separate install scripts: 双击安装繁体中文.bat for Windows and 双击安装繁体中文.command for macOS. A compare_dicts.js script verifies alignment between the two dictionary sets.

Official sources

  1. Issues
  2. qqxpee/antigravity2-cn on GitHub
  3. README
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/qqxpee-antigravity2-cn.svg)](https://hysenlabs.com/projects/qqxpee-antigravity2-cn)