Catch UI truncation early
No project needed — kapi pseudo-translate runs ad-hoc on any source catalogue.
Goal: surface UI truncation and missing-string bugs before real translations arrive. Pseudo-translation rewrites every extracted string with locale-shaped accented characters and padding, so layout problems show up the moment the UI re-renders — no API key, no waiting, no cost.
Steps
- Run
kapi pseudo-translateon your source catalogue. - Load the pseudo-translated file into your UI.
- Look for clipped labels, overflowing buttons, and any string that didn't get accented — an un-accented string is one your code hard-coded instead of pulling from the catalogue.
Pseudo-translation defaults to the qps pseudo-locale (the BCP-47
private-use locale reserved for pseudo-translation), so you don't need a real
target language.
Try it
Drop a file (or pick the JSON or Word sample) and kapi runs pseudo-translate
on it right here in your browser — no install, no API key, no server. Every value
comes back accented and wrapped in markers; any string that stays plain is one
your code hard-coded instead of pulling from the catalogue.
Each value is bracketed with markers and expanded with diacritics. Tune the
shape with --prefix, --suffix, and --expansion-percent (extra padding to
simulate how much longer real translations tend to run).
From the CLI
For scripting and CI, the same step is one command — the output path is just a
name you choose with -o:
kapi pseudo-translate messages.json -o messages.pseudo.json
Loading the walkthrough…
The interactive embed and the recorded video both come from
walkthroughs/kapi-pseudo-translate.scene.yaml. Change the scene spec and regenerate; don't edit the generated output by hand.
In a project
In a .kapi project, pseudo-translation runs against the recipe's declared
content and locales — kapi pseudo-translate with no file argument, or as a step
in a flow you run with kapi run. The output binding follows the project (the
store, materialized with kapi merge) instead of -o. See
Create your first project.
Next
kapi pseudo-translate— full command reference, including--prefix,--suffix, and--expansion-percent.- For broader checks, see Quality checks.
- To run pseudo-translation as the gap-filler after a TM-leverage step, see Pre-translate with TM + termbase.