Repository navigation
Load translation catalogs before their first lookup - #16059
Conversation
[Medium impact] The PR appears safe to merge; no actionable issues were found. SummaryMakes shell and plugin translations read catalogs through
No actionable issues were found. Quickshell is not installed in this review environment, so the runtime scenarios were not rerun.
|
|
Reviewed at 4fe3a6f and found nothing to change. Nothing was pushed to the branch. The bug is real and this fixes it. I booted the full shell on a disposable worker built from the Omarchy ISO (Quickshell 0.3.2), once with Tests, run on the same worker:
Code read: removing the Second opinion: Codex Medium reviewed the diff read-only and found no defects. It agreed that Fixes #16030. Labelled |
I18n.t()andtn()currently read dictionaries initialized to empty objects.FileView.onLoadedpopulates them later, so the first binding can return a raw catalog key. Calling.arg()on that key emits the reportedQString::arg: Argument missingwarnings. The pluginTranslationscomponent has the same initialization race.Bind the selected language, locale settings, and translation maps directly to
FileView.text(). This makes the existing blocking-read setting apply to the first lookup and keeps subsequent file changes reactive. Catalog parsing runs when the file data changes. Remove the asynchronous map assignments; preserve translation lookup, plural selection, regional/base/English fallback, and live language changes.Fixes #16030.
Validation
I18N_STRUCTURAL=1 bash test/shell.d/i18n-test.sh(the pending-translation completeness check is skipped in structural mode),qml-text-format-test.sh, Bash syntax validation, andgit diff --check.