with one click
compile-i18n
// How to add i18n to all the ts files, and use the compile_i18n.cmd command to compile the ts files
// How to add i18n to all the ts files, and use the compile_i18n.cmd command to compile the ts files
| name | Compile i18n |
| description | How to add i18n to all the ts files, and use the compile_i18n.cmd command to compile the ts files |
When you are instructed to add or update internationalization (i18n) translations for this project, please follow these steps:
.ts translation files located in the ok/gui/i18n/ directory. Typically, these files include:
zh_CN.ts (Simplified Chinese)zh_TW.ts (Traditional Chinese)ja_JP.ts (Japanese)ko_KR.ts (Korean)es_ES.ts (Spanish)en_US.ts (English)<context> and <message> blocks in each XML file, without the type="unfinished" attribute. If you are adding many translations, or just want to minimize errors, use the provided add_translation.py script to automate the XML injection:
$py = if (Test-Path .\.venv\Scripts\python.exe) { ".\.venv\Scripts\python.exe" } else { "python" }
& $py .\.agents\skills\compile_i18n\add_translation.py --context "YourContext" --source "Your Source String" --zh_cn "Your Chinese String"
IMPORTANT WARNING: DO NOT use pyside6-lupdate as it corrupts and deletes existing translations. Always modify the XML nodes natively or use the python script!compile_i18n.cmd script will automatically abort if it detects type="unfinished" in any translation text. You must replace <translation type="unfinished" /> with <translation>Your Translation</translation>..ts files, compile them into .qm binary format by leveraging the provided script. Run the following command from the workspace root:// turbo
.\compile_i18n.cmd
This will run pyside6-lrelease on all language files and generate the corresponding .qm files used by the application, as well as compile updated resources if necessary.
Prefer the repository .venv Python interpreter for Python commands, tests, scripts, package tooling, and AI coding workflows when .venv exists.
Generate a commit message, commit all changes, run deploy_pip.ps1 to publish to PyPI, and tag HEAD with the deployed version on success
Generate a commit message based on current changes and commit all staged and unstaged changes to git