Refreshes QtPass translation sources with make lupdate, edits and verifies localization/*.ts files, bootstraps new languages in src/src.pro, and handles reviewer fixes alongside Weblate. Use when working on translations, i18n, a locale or .ts file, Weblate, adding a language, lupdate, lrelease, or unfinished strings.
77
97%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
Passed
No findings from the security scan
Translations are Qt Linguist .ts files in localization/localization_<lang>.ts
(64 locales at the time of writing; re-derive with
ls localization/localization_*.ts | wc -l). They are managed on
Weblate. The build turns
them into .qm files (CONFIG += lrelease embed_translations in src/src.pro)
and embeds them under :/localization; .qm files are never committed.
Reference files (one level deep, read only when needed):
src/src.pro registration).& accelerator or a reviewer flags a missing or clashing shortcut.tr() changeslupdate is an explicit target in qtpass.pro. A plain qmake6 run no longer
touches localization/.
make distclean # only if you built in-source: stale ui_*.h in src/ get scanned
qmake6 # at the repository root, Qt 6.8 or newer
make lupdate # lupdate over src/ and main/, rewrites every localization/*.tsNever run lupdate on src/src.pro alone: that misses the strings in main/.
What make lupdate changes: source text, <location> line numbers and file
names, and the status of changed messages (set to type="unfinished"; removed
ones become type="vanished"). Existing <translation> text is kept.
Then run the verify loop below on a few locales and commit localization/ as
its own change (for example chore: update localization source references).
.ts file directlyWeblate is the normal path. Direct edits are appropriate for:
% 1 vs %1), broken HTML,
made-up words from machine translation, mixed-script artifacts.type="unfinished", so Weblate reviewers can refine it.Rules while editing:
%1, %2, %n and \n exactly as in the source..gpg-id, pass, GPG, Git untranslated.type="unfinished" unless a native speaker confirmed it.linguist localization/localization_<lang>.ts) or a text
editor; with a script, edit only the <translation> element, never the
<source> line (tools strip its trailing whitespace and the message then no
longer matches).Findings tend to arrive in batches (CodeRabbit, GitHub code quality, native speakers):
.ts; reviewer diffs may target an
older state.Short form (details and a worked example in references/adding-a-language.md):
fa, de) unless the text is region-specific.localization_en_US.ts).../localization/localization_<lang>.ts to TRANSLATIONS += in
src/src.pro.qmake6 && make lupdate, confirm the file was populated.type="unfinished"; Weblate translators fill them.Run after any .ts change, before pushing:
f=localization/localization_<lang>.ts
xmllint --noout "$f" # well-formed XML
lrelease6 "$f" -qm "$(mktemp --suffix=.qm)" # compiles, prints countsxmllint must print nothing. lrelease6 (or lrelease-qt6 / lrelease)
must print Generated N translation(s) (F finished and U unfinished) with no
errors. Writing the .qm to a temporary file keeps the tree clean.lrelease does not catch placeholder or HTML problems..ts and go back to step 1. Stop only when
all checks are clean.tests/auto/locale/tst_locale: its project globs every
localization_*.ts, so a broken file fails the test build.git commit -s -S (DCO sign-off plus GPG
signature). See the qtpass-github skill for the full PR flow.gh pr checkout <PR>, git pull
first (bots may have pushed), edit, verify, push to the same branch.gh pr merge <PR> --squash --auto --delete-branch..ts merge conflicts are mostly <location> line numbers. Resolve by taking
one side's file for the conflicting locale, rerun make lupdate if your
branch changed tr() strings, then run the verify loop. During a rebase,
--theirs is your own commit, not main.tr().tr("Delete %1?").arg(name), never string concatenation inside tr().tr("Found %n password(s)", nullptr, count).GPG, Git, clipboard) so translators
can reuse them.make lupdate, or
Linguist still has the old file open.ui_*.h locations in .ts files: an in-source build left generated
headers in src/. Run make distclean, then qmake6 && make lupdate, and
stage only the localization/ changes you intended.tr(), locale not listed
in src/src.pro (so not embedded), or the entry is still empty. See
references/status-and-runtime.md.unfinished: the English source changed.
Check the new source text and placeholders before clearing the flag..ts files: prettier would treat them as
TypeScript.IJHack/QtPass
47fd421
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.