• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

IJHack / QtPass / 25189321707
55%

Build:
DEFAULT BRANCH: main
Ran 30 Apr 2026 09:12PM UTC
Jobs 1
Files 72
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

30 Apr 2026 09:06PM UTC coverage: 28.045%. Remained the same
25189321707

push

github

web-flow
fix: use QLocale-aware QTranslator::load() for proper locale fallback (#1362)

* fix: use QLocale-aware QTranslator::load() for proper locale fallback

Switch from the single-filename overload of QTranslator::load() to the
QLocale-aware overload so Qt walks the user's preferred-language list
automatically (uiLanguages()): ar_MA -> ar, da_DK -> da, ja_JP -> ja,
etc.

Why this matters: QLocale::system().name() always returns the fully
qualified language_country form (e.g. "ar_MA"), even when LANG is set
to just "ar" or the system has only the language configured. The old
code fed that string straight into the filename-form load() which
returns false on the first miss and stops — so any user whose system
reported "ar_MA"/"da_DK"/"pl_PL"/etc. saw the app in English after the
locale-rename PRs (#1328 ar_MA->ar, #1350 31 single-variant renames)
removed the country-suffixed .qm files.

The QLocale overload is the canonical Qt way to do localized resource
loading and handles the language-only-vs-region split for free, with
no behaviour change for locales that have an exact .qm match
(en_US, de_DE, nl_BE, zh_CN, etc.).

Unit test: tests/auto/locale/tst_locale.cpp covers four scenarios
across 43 cases:

- loadExactMatch (11 locales): en_US, en_GB, de_DE, nl_BE, nl_NL,
  zh_CN, zh_Hant, pt_BR, pt_PT, es_MX, fr_FR — verbatim .qm match.
- loadFallback (20 locales): ar_MA/SA/EG, da_DK, ja_JP, ko_KR,
  pl_PL, ru_RU, sv_SE, uk_UA, fa_IR/AF, hi_IN, vi_VN, th_TH,
  ur_PK, bn_BD/IN, sw_KE — country-suffix forms that must fall
  through to the language-only .qm.
- loadUnknownLocale: tlh_KX (Klingon) returns false, no crash.
- layoutDirection (8 locales): tr("LTR") resolves to "RTL" for
  ar/fa/ur/he and "LTR" for en_US/nl_NL/ja/zh_CN.
- loadIsIdempotent: loading multiple locales on the same translator
  in sequence each succeeds.

Registered the test in tests/auto/auto.pro and added the binary to
.gitignore. clang-format applied to changed C++ files.

make check: 43/43 i... (continued)

1856 of 6618 relevant lines covered (28.04%)

27.1 hits per line

Coverage Regressions

Lines Coverage ∆ File
9
0.0
0.0% src/qrc_qmake_qmake_qm_files.cpp
Jobs
ID Job ID Ran Files Coverage
1 25189321707.1 30 Apr 2026 09:12PM UTC 72
28.04
GitHub Action Run
Source Files on build 25189321707
  • Tree
  • List 72
  • Changed 2
  • Source Changed 2
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #25189321707
  • d932e1c8 on github
  • Prev Build on main (#25182000176)
  • Next Build on main (#25193314916)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc