antigravity2-cn repacks app.asar and injects a DOM watcher
Antigravity 2.0 Chinese Localization Suite & Injector. A zero-dependency Chinese localization pack built for the new 2.0 Electron architecture, using ASAR physical-layer dynamic injection to fully localize the interface, system menus, taskbar tray and settings panel, with one-click install and seamless restore.
At a glance
- What is it?
- A Chinese localisation pack for the Antigravity editor that unpacks the Electron app.asar, injects four JavaScript files, repacks the archive and can restore it in one click. It matches Antigravity 2.17.0 and above, treats strings of fifteen characters or fewer by a different rule from longer ones, and will sideload two DLLs if you create a proxy_config folder.
- Who is it for?
- antigravity2-cn is worth reading before installing if you want the Antigravity interface in Chinese and do not mind a script rewriting an application archive on your machine, because the restore path is as explicit as the install path and the backup is created automatically. Three things to decide first.
- Can I use it commercially?
- Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository last received commits 1 day 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 November 25, 2026, and from our analysis. They are not legal advice.
Star history
- qqxpee/antigravity2-cn2,468 ★ · +1,743
| Repository | 2026-09-21 | 2026-11-25 |
|---|---|---|
| qqxpee/antigravity2-cn | 725 | 2.5k |
1,743 Stars in the last 65 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
Four injected files, one backup, and a re-sign on macOS
The engine works on the application archive rather than on preferences. It closes any running Antigravity process first, so nothing holds a file lock, then copies the original `app.asar` to `app.asar.bak` in the software directory before touching anything. On macOS it re-signs the rebuilt application automatically.
What gets injected is four files. `preload.js` is the translation engine itself, using a WeakSet to mark nodes it has already handled, penetrating Shadow DOM, and running a MutationObserver over the rendered layer so text that appears later is caught too. `menu.js` patches the system title bar menu, `tray.js` covers the tray and the right click notification menu, and `loadingOverlay.js` supplies the loading message.
The scope claimed at the top covers the software interface, the top system menu, the taskbar context menu, the loading animation, the settings panel, the onboarding flow and the login page. The core binary is left alone, and matching version is stated as Antigravity v2.17.0 and above.
Short strings and long strings are matched by two different rules
The page carries a long warning about chat bubbles being translated, and the reason is that the matcher has two modes with opposite behaviour on the escape hatch it recommends.
Short strings, fifteen characters or fewer such as `Knowledge`, translate only when the entry matches exactly and stands alone on its line. Any other character before or after it, including a space or punctuation, blocks the match. Wrapping such a word in Chinese double quotation marks therefore works as a way to stop it being translated.
Longer strings take the opposite path. Because the interface renders dynamically, they are handled by substring sliding replacement, so if your typed text contains the whole interface string it will be translated, and quoting it does not help. The mitigation offered is the opposite of a workaround: the match has to be character exact including case, punctuation and spaces, so the page argues a false trigger is close to impossible in real conversation.
The page is clear about the scope of the effect. The text sent to the model is the original English; only the visual rendering changes.
Restore is a second pair of scripts, not an uninstaller
Installation and restoration are two separate entry points per platform, and there are three pairs at the root rather than one. `双击安装中文汉化.bat` and `.command` install the Simplified Chinese translation, `双击安装繁体中文.bat` and `.command` install the Traditional Chinese one, and `双击卸载还原官方英文.bat` and `.command` restore the official English build. All six are double-click scripts with Chinese file names.
The install script prompts for one choice: what the top left brand text should say. The options are keep the English name, which is recommended because a translated name is long, hide the brand text entirely, or show the Chinese name. The same choice is available as a command line flag when running the engine directly, with `english`, `hidden` and `translated` as the values:
node localization_engine.js --brand-title englishThe install sequence is fixed: quit Antigravity completely, run the script from the extracted folder, then start the application again. Restore follows the same shape, and the page states that it clears every injected file and returns the application to the official English state.
The proxy option is a DLL sideload gated on one folder
There is an optional feature described as a transparent network proxy injection for Windows, positioned as an alternative to turning on a system wide TUN adapter. It is built on a separate project, yuaotian/antigravity-proxy, which the page describes as a MinHook based DLL hijacking transparent proxy.
What the user supplies is three files: `version.dll`, `dbghelp.dll` and a `config.json` configured for a local proxy address, with two ports given as examples. Those go into a `proxy_config/` folder created inside the localisation project. That folder is in `.gitignore`, so it stays local and cannot be committed by accident.
The gate is the folder itself. If `proxy_config/` exists, the install script detects it and injects the proxy module together with the translation in one pass, which the page presents as saving a manual DLL copy after every application update. If the folder does not exist, or you do not want a proxy, the install is described as staying entirely clean. The restore script also looks for the folder and removes the proxy files, so the two features are supposed to come back out together.
The dictionary is the product, and the agent edits it
Translations live as JSON files under `dicts/`, with a parallel tree at `dicts_tw/` for Traditional Chinese. Three are named in the manual editing guide: `common.json` for shared vocabulary, the sidebar overview, the login page and common buttons, `page_settings.json` for the settings panel and the permission submenus, and `menu_nav.json` for the system and menu bar. Adding an entry is one line in the form `"Original English Text": "your translation"`.
The suggested way to fill gaps is not to edit by hand but to ask the editor's own assistant, either with a screenshot or with a written description of the missing string. The page recommends opening the localisation folder itself as a project workspace so the assistant can read and write the dictionary without being given a path, and says that if you are working on something else you have to state the path explicitly in the prompt.
Changes only take effect through a four step cycle: ask the assistant to update the dictionary, quit Antigravity completely, run the install script again, then start the application. There is no file watcher, so an edit that is not followed by a re-run does nothing.
The MCP catalogue arrives from the cloud, so the dictionary needs a refresh loop
Antigravity 2.x fills its Add MCP Server dialog from a catalogue delivered live by Google over RPC, and the official side adds, removes and rewrites server descriptions in ordinary point releases. A localisation dictionary cannot stay correct against a list that changes without the application being updated.
So the engine carries its own probe. When that dialog finishes loading, a green badge appears under the search field reading that it has automatically captured a number of MCP servers and offering to copy the JSON. Clicking it copies the full untruncated metadata to the clipboard. That JSON is handed to the assistant with an instruction to fill in the untranslated descriptions in both `dicts/page_mcp_knowledge.json` and `dicts_tw/page_mcp_knowledge.json`.
Two checks bracket that step. After the assistant writes the files, `node scripts/compare_dicts.js` verifies the Simplified and Traditional trees are fully aligned, and the install script is re-run to apply the result. For anyone who would rather drive the client directly, the page points at `scripts/dev_tool.js`, whose top comment block carries the command reference.
Agent rules files sit next to six Chinese named batch files
The root listing is short and unusual. Six entry scripts carry Chinese names and double-click extensions, three `.bat` files and three `.command` files. Alongside them are `localization_engine.js`, the `dicts/` and `dicts_tw/` trees, a `scripts/` folder, `showimg/`, and two README files, one in Simplified Chinese and one Traditional.
Two entries are for other tools rather than for the application: `.clinerules` and `.cursorrules`, which are the instruction files Cline and Cursor read from a project. A localisation project carrying agent rules for two assistants fits the workflow described above, where the dictionary is written by an agent rather than by hand.
The maintenance position is thin on the record. There are no GitHub releases at all, so there is no tag to install, only a branch, and the last commit is dated 2026-09-28. The root listing contains no licence file, and the licence field is empty, so nothing on the page states what terms the patch may be redistributed under. The `scripts/` folder is described as holding the Simplified and Traditional alignment checker along with reverse engineering diagnostics and an MCP benchmark inventory.
Editorial conclusion
antigravity2-cn is worth reading before installing if you want the Antigravity interface in Chinese and do not mind a script rewriting an application archive on your machine, because the restore path is as explicit as the install path and the backup is created automatically. Three things to decide first. It matches version 2.17.0 and above only, so an update that moves the interface strings will leave gaps the dictionary cannot fill. It also injects a MutationObserver into every rendered text node, which is why the project documents its own false positive cases in detail, including the asymmetry between short and long strings. And the proxy feature, while opt-in, places two DLLs next to the executable, so treat that folder as the boundary between a language pack and a network change.
Frequently asked questions
What does antigravity2-cn actually modify on my machine?
It unpacks the app.asar inside the Antigravity installation, keeps a copy as app.asar.bak, injects four JavaScript files named preload.js, menu.js, tray.js and loadingOverlay.js, then repacks the archive, with an automatic deep re-signing step on macOS. The core binary is not modified and the restore script puts the original archive back.
Will the Chinese translation change what the AI agent reads?
The page states that the injection only affects the visual rendering layer, so the model still receives the original English instruction. It does warn that a chat bubble containing an interface string can be displayed translated, with different matching rules for strings of fifteen characters or fewer and for longer ones.
Does antigravity2-cn install a proxy by default?
Only if you create a proxy_config folder holding version.dll, dbghelp.dll and a config.json pointed at your own local proxy port. The install script detects that folder and injects the DLLs alongside the translation, and the restore script detects and removes them again.
How do I add a missing translation to antigravity2-cn?
Add one line to a JSON file under dicts/, such as common.json, page_settings.json or menu_nav.json, written as "Original English Text": "your translation". Then quit Antigravity completely, run the install .bat or .command again, and start the application, because there is no watcher.
Official sources
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.
[](https://hysenlabs.com/projects/qqxpee-antigravity2-cn)Star history chart for your README
[](https://hysenlabs.com/projects/qqxpee-antigravity2-cn)Was this useful?