antigravity-zh

为 Google Antigravity 桌面端启用简体中文界面,并支持一条命令还原官方英文。One-command Simplified Chinese localization for the Antigravity desktop app, with byte-exact restore.


Keywords
antigravity, localization, i18n, l10n, zh-cn, chinese, translation, electron, asar, 简体中文, 汉化, brazilian-portuguese, cli, french, german, japanese, korean, language-pack, multilingual, portuguese, russian, spanish, traditional-chinese
License
MIT
Install
npm install antigravity-zh@1.0.1

Documentation

antigravity-i18n

English | 简体中文 | 日本語 | 한국어 | Español | Deutsch | Français | Português do Brasil | Русский

Install a UI language pack into the Google Antigravity desktop app with one command, and restore the official build byte for byte at any time.

Platform License Node


Features

  • Zero-install: Run directly with a single npx command. Finds the installation path and restarts the app for you.
  • Any language: Language data lives entirely in JSON packs under src/locales/. The translation engine holds no language of its own, so adding a language means adding a file. Simplified Chinese, Traditional Chinese, Japanese, Korean, Spanish, German, French, Brazilian Portuguese, and Russian ship in the box.
  • Non-invasive: Translates only the shell UI and native menus. Code editors (Monaco), terminals (xterm), and conversation areas are left alone.
  • Byte-exact restore: Backs up the original app.asar on first run. restore puts the official archive back unchanged.
  • Offline & private: No network requests, no telemetry, and no access to tokens, sessions, or credentials.
  • Plural and direction aware: Counted strings select CLDR plural forms via Intl.PluralRules, and right-to-left languages must declare their writing direction.

Usage

Requires Node.js (≥16).

Quick start

# Install a language pack (Simplified Chinese is the default)
npx antigravity-i18n apply --locale zh-CN
# 繁體中文: npx antigravity-i18n apply --locale zh-Hant
# 日本語: npx antigravity-i18n apply --locale ja
# 한국어: npx antigravity-i18n apply --locale ko
# Español: npx antigravity-i18n apply --locale es
# Deutsch: npx antigravity-i18n apply --locale de
# Français: npx antigravity-i18n apply --locale fr
# Português do Brasil: npx antigravity-i18n apply --locale pt-BR
# Русский: npx antigravity-i18n apply --locale ru

# Restore the official build
npx antigravity-i18n restore

# Check the active language and backups
npx antigravity-i18n status

# See what language packs are bundled
npx antigravity-i18n locales

zh is shorthand for apply --locale zh-CN, and en is shorthand for restore.

Run from source

git clone https://github.com/wade19990814-hue/antigravity-i18n.git
cd antigravity-i18n
npm install
node bin/cli.js apply --locale zh-CN

Options

Commands:
  apply             Install a language pack (choose it with --locale)
  restore           Restore the official untranslated app
  status            Show the active language and app path
  locales           List the bundled language packs

Options:
  --app-dir <path>  Antigravity installation path
  --locale <code>   Language pack to install (default: zh-CN)
  --no-restart      Do not restart the app after patching
  --no-kill         Require the app to be stopped; never terminate it
  --force           Skip the graceful wait and terminate the app
  -h, --help        Show help
  -v, --version     Show version

Notes

  1. Save your work: The tool waits up to 20 seconds for the app to exit cleanly. Save unfinished work before running.
  2. Official updates: An Antigravity update overwrites app.asar. Run apply again afterwards.
  3. Backup files: The first run creates app.asar.clean-backup under resources, and a later official update refreshes it from the current unpatched archive. Do not delete it by hand. Every apply/restore also leaves a timestamped app.asar.bak-* snapshot beside it, and these accumulate over time. app.asar.clean-backup alone is enough to restore, so once the current install proves itself you can delete older snapshots to free space.
  4. Switching languages: Applying a different pack replaces the previous one directly; there is no need to restore in between.

Contributing

Translations and new language packs are both welcome. The dictionary keys are the untranslated English UI strings, so the bundled pack doubles as the inventory a new language is written against:

# Print every English string a pack has to cover
node scripts/locale-report.js --keys

# Report coverage, gaps and untranslated placeholders
node scripts/locale-report.js

See CONTRIBUTING.md for the pack format, and run npm test before submitting a PR.


Disclaimer

  1. Use this project only where permitted by applicable laws, contracts, and the Antigravity terms. You are responsible for ensuring your use is compliant.
  2. This is an independent open-source tool and is not affiliated with, endorsed by, or authorized by Google. Antigravity and related trademarks belong to their respective owners.
  3. Modifying the client is at your own risk. The authors assume no responsibility for any unexpected issues, data loss, or other consequences.

License

MIT