Cockatrice/cockatrice/src/interface/widgets
BruebachL 675e1f7447
Some checks are pending
CodeQL / Analyze (cpp) (push) Waiting to run
CodeQL / Analyze (actions) (push) Waiting to run
Build Desktop / Configure (push) Waiting to run
Build Desktop / Debian 13 (push) Blocked by required conditions
Build Desktop / Debian 12 (push) Blocked by required conditions
Build Desktop / Fedora 44 (push) Blocked by required conditions
Build Desktop / Fedora 43 (push) Blocked by required conditions
Build Desktop / Servatrice_Debian 12 (push) Blocked by required conditions
Build Desktop / Ubuntu 24.04 (push) Blocked by required conditions
Build Desktop / Ubuntu 26.04 (push) Blocked by required conditions
Build Desktop / Arch (push) Blocked by required conditions
Build Desktop / Ubuntu 26.04 cover (push) Blocked by required conditions
Build Desktop / macOS 13 Intel (push) Blocked by required conditions
Build Desktop / macOS 14 (push) Blocked by required conditions
Build Desktop / macOS 15 (push) Blocked by required conditions
Build Desktop / macOS 26 Debug (push) Blocked by required conditions
Build Desktop / Windows 10 (push) Blocked by required conditions
Build Desktop / Prune caches (push) Waiting to run
Build Docker / Servatrice (arm) (push) Waiting to run
Build Docker / Servatrice (x86) (push) Waiting to run
Build Docker / Publish multi-platform Servatrice image (push) Blocked by required conditions
[Translation] Name languages without reading the translation files (#7662)
* [Translation] Name languages without reading the translation files

The language selector derived every label from the language's own .qm file:
it loaded the file and translated the literal "English" in the "i18n"
context. lupdate could never extract that literal from the callers, which
pass the DEFAULT_LANG_NAME macro, so a dummy QT_TRANSLATE_NOOP in
cache_settings.cpp existed to give it something to extract. #7050 deleted
that dummy, the next lupdate push dropped the string from Transifex, and
the following pull rewrote the .ts files without it. lrelease only emits
translated messages, so 22 of 25 .qm files returned an empty name.

The names are data, not translations: a selector has to be readable before
any translation is loaded, and a label must not depend on the translation
of the language it names. TranslationLoader::languageDisplayName now holds
them next to availableLanguages, falling back to Qt's native language name
and then to the code, so a language added later still gets a label.

Also select the configured language by item data instead of by matching the
translated "English" string, which pointed at the wrong row whenever the
lookup came back empty, and restore that English entry's own name: en_US is
"English (United States)" so it can no longer be confused with the
untranslated default.

Oracle shared the code path, so its wizard language page is fixed too.

* [Translation] Name the default language selection once

Review follow-up: log the unresolvable language through the page's own
category, and move the en_US entry both selectors fall back to for an unset
setting into TranslationLoader::defaultLanguageCode.

---------

Co-authored-by: Lukas Brübach <Bruebach.Lukas@bdosecurity.de>
2026-10-26 02:39:26 +01:00
..
cards [Cards] Guard against null QScreen when positioning enlarged pixmap (#7650) 2026-10-25 17:35:10 +01:00
deck_analytics [QtUtils] Use makeScrollArea() for the remaining scroll areas (#7625) 2026-10-24 22:50:25 +02:00
deck_editor [QtUtils] Use makeLayout() for zero-margin layouts (#7620) 2026-10-24 19:06:18 +02:00
deck_share [QtUtils] Use makeLayout() for zero-margin layouts (#7620) 2026-10-24 19:06:18 +02:00
dialogs [UI] Show 'Password saved' placeholder when verifier is stored (#7649) 2026-10-25 10:34:56 +01:00
general [QtUtils] Use makeLayout() for zero-margin layouts (#7620) 2026-10-24 19:06:18 +02:00
menus [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
onboarding [Translation] Name languages without reading the translation files (#7662) 2026-10-26 02:39:26 +01:00
playmat [Tooling] Apply include-what-you-use across the tree (#7396) 2026-10-08 11:13:50 +02:00
printing_selector [QtUtils] Use makeLayout() for zero-margin layouts (#7620) 2026-10-24 19:06:18 +02:00
quick_settings [QtUtils] Use makeLayout() for zero-margin layouts (#7620) 2026-10-24 19:06:18 +02:00
replay [QtUtils] Use makeLayout() for zero-margin layouts (#7620) 2026-10-24 19:06:18 +02:00
server [Models] Use QCollator for natural, cached sorting (#7633) 2026-10-25 01:01:04 +02:00
settings_page [Translation] Name languages without reading the translation files (#7662) 2026-10-26 02:39:26 +01:00
tabs [Server/Client/Protocol] Let moderators clear banner cards (#7546) 2026-10-25 13:19:20 +01:00
utility [QtUtils] Adopt window fade, path, bold font and confirmation helpers (#7622) 2026-10-24 21:43:50 +02:00
visual_database_display Fix tab retranslation (#7580) 2026-10-25 12:30:17 +01:00
visual_deck_editor [QtUtils] Use makeLayout() for zero-margin layouts (#7620) 2026-10-24 19:06:18 +02:00
visual_deck_storage [VisualDeckStorage] Keep databaseLoadIndicator alive when swapping in folder widget (#7651) 2026-10-25 17:35:46 +01:00