Skip to content
Back to skills

Compile I18n

ASecurity

How to update Qt translations and generate the web i18n catalog

  • 732 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added August 30, 2026
toolspythonshellnode

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned August 30, 2026

npx -y skills add ok-oldking/ok-script --skill compile_i18n --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Compile I18n?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Compile I18n
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ok-oldking-compile-i18n/badge)](https://www.skillsdirectory.com/skills/ok-oldking-compile-i18n)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: Compile i18n
description: How to update Qt translations and generate the web i18n catalog
---

# Compile i18n

When you are instructed to add or update internationalization (i18n) translations for this project, please follow these steps:

1. Identify the new strings that need to be translated.
2. Edit the `.ts` translation files located in the `ok/ui/qt/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)
3. Ensure that your new translations are correctly added under the appropriate `<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:
   ```powershell
   $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!**
4. Check that the translations added for the `WebUI` context are complete. You must replace `<translation type="unfinished" />` with `<translation>Your Translation</translation>`.
5. Generate the web catalog from the `WebUI` context by running this command from the workspace root:

// turbo
```powershell
npm run i18n
```

`npm run dev` and `npm run build` also run this generator automatically.

Files in this skill

  • SKILL.md1.7 KB
  • add_translation.py3.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…