跪拜 Guibai
← All articles
AI · Open Source · GitHub

Google Antigravity Speaks Chinese: A One-Line Launcher for UI and Thinking-Language Localization

By guuguo ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

A second language entry for Antigravity sidesteps the perpetual re-patch cycle that asar editing would cause and honors code signatures on macOS, a real pain point for daily drivers. The plugin-toggle pattern also shows how to localize AI behavior for one workflow without contaminating the default one.

Summary

Antigravity Desktop may top the coding benchmarks with Gemini 4, but an English-only UI and English thinking steps blemish daily use for Chinese developers. An open-source tool called antigravity-zh-launcher fixes both pains without cracking open the Electron package. It injects a localization layer at runtime over the Chrome DevTools Protocol, leaving app.asar and the code signature untouched, so macOS updates don't force a re-patch.

Takeaways
— Single-command install and uninstall for macOS Terminal and Windows PowerShell, with SHA-256 verification against official sums.
— Localization happens at runtime via Chrome DevTools Protocol injection; app.asar never gets modified, preserving the code signature.
— An overlay script, loaded with --trust-external-overlay, handles auto Chinese session titles, input placeholder and welcome text, and relative timestamps like '8m ago' while skipping message content.
— A plugin at ~/.gemini/config/plugins/ forces Chinese thinking output only when launched through the Antigravity 中文 entry and is automatically set back to disabled on exit.
— Windows uses wscript.exe to run the launcher without a console flash and enumerates windows to clean hidden background processes before relaunch.
— The agy-zh command offers status, stop, and build-overlay subcommands for terminal-heavy workflows.
Conclusions

Runtime injection through CDP avoids the asar re-patch treadmill that follows every official update, a significant maintenance win on macOS where signature loss triggers system prompts.

Keeping the original entry 100% English while the Chinese entry toggles a plugin is a clean isolation design for locale-specific prompt behavior.

The quit-restore mechanism ties localization state to the launcher process, so a stray shortcut can't leak Chinese prompts into the English workspace.

Concepts & terms
Chrome DevTools Protocol (CDP)
A debugging interface for Chromium-based apps that lets external tools inspect and modify pages and app behavior at runtime.
asar
An archive format Electron uses to bundle an app's files; editing it invalidates the code signature on macOS and requires re-patching after updates.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗