lupdate writes the catalog from tr(), qsTr(), and related calls. Hyperlocalise translates <message> units and writes a locale-specific .ts file you can compile with lrelease.
Supported extensions: .ts. The CLI detects Qt catalogs from a <TS> root so TypeScript locale modules that also use .ts keep working.
Source file
Save this example astranslations/app_en.ts.
Configure your files
Use thisi18n.yml for the example, or add its file mapping to your existing bucket.
See path templates for other layouts.
Translate
Install the CLI and setOPENAI_API_KEY in your
project’s .env.local or shell. You can also configure another
AI provider.
Behavior and limitations
-
Keys are
context|source. A disambiguation<comment>becomescontext|source|comment. An explicit messageidis used when present. Messages directly under<TS>(no<context>) useunknownas the context name unless they have anid. -
Parsing reads a non-empty
<translation>before falling back to<source>. Messages markedobsoleteorvanishedare skipped. -
Numerus messages flatten to
key::numerus.0,key::numerus.1, and so on. Include<numerusform>placeholders in the source catalog when the target language needs more than one form. -
Writeback updates existing translations, clears
type="unfinished"when a value is written, and setslanguageandsourcelanguageusing Qt underscore locales such ases_ES. -
%1,%n,%L1, and%Lnstay in the string. Translation checks fail if a translation drops them. Rich text such as<b>is written as character data.<byte>elements stay as XML. -
.tsfiles that export a static locale object are JavaScript and TypeScript locale modules, not Qt catalogs.
Next steps
- Check translations before committing generated files.
- Local translation workflow explains repeat runs.
- Browse all file formats.

