This is still reproducible on 3.24.4+dfsg0-0ubuntu10 and it is not "Invalid" -
it is a real, findable defect in the shipped sources. I would like to reopen
the Ubuntu task, and I have patches.

hplip-data installs translation catalogues for seven languages into
/usr/share/hplip/data/localization, roughly 100 KB each, and nothing ever loads
them. QTranslator occurs in eight files - toolbox.py, setup.py, sendfax.py,
fab.py, makecopies.py, print.py, unload.py and plugin.py - and in every one of
them it is inside "if ui_toolkit == 'qt3':", next to "from qt import *" and
QTextCodec.locale(), a method PyQt5 does not have at all. The branch that
actually runs, the one that builds DevMgr5 out of ui5/, installs no translator;
there is no occurrence of QTranslator anywhere under ui5/.

The catalogues would not help much even if they were loaded. hplip_ru.ts is
still in the pre-Qt4 Linguist format, and 813 of its 1200 messages belong to
classes of the ui/ directory - the Qt3 interface that no longer exists. Only
two of its contexts still exist in ui5/, which is four messages out of 1200.
The whole scanning dialog was never in the file: ui5/scandialog.py makes 143
translation calls and the context HpScan does not appear in hplip_ru.ts.

The .desktop files are a separate matter. hplip-gui ships
debian/hplip.desktop, debian/hplip-kubuntu.desktop, debian/hp-fab.desktop and
debian/hp-sendfax.desktop, and none of them has a Name[xx] for any language.
Nor are they covered by the language packs: hplip has no translation template
in Launchpad Translations, and the built package has no
X-Ubuntu-Gettext-Domain, so nothing translates them at runtime either.

The Debian task above now shows Confirmed. #734135 was closed by hand on
19 July 2026 with "In case you want to have this fixed, please provide a
patch", and this task followed the bug watch the next day into Fix Released,
although nothing had been fixed. I have since taken the maintainer up on that:
the bug is open again and carries the patches, which is where they belong.

For Ubuntu I attach the same four patches rebased on 3.24.4, in case anyone
wants them before the next sync:

  0092-Add-Russian-translations-to-the-desktop-files.patch
  0093-Load-the-UI-translations-in-the-Qt5-code-path.patch
  0094-Do-not-format-strings-before-handing-them-to-transla.patch
  0095-Regenerate-the-Russian-catalogue-for-the-Qt5-UI.patch
  debian-native-desktop-files-ru.diff   (for the debian/*.desktop files)

Two of them are language-neutral and are the ones that actually matter:

0093 adds utils.installTranslators(), which picks the locale with
QLocale.system() (still honouring the loc key of [ui] in hplip.conf and the
--loc option), loads hplip_<locale>.qm plus the matching Qt catalogue so the
standard buttons follow, and keeps a reference so Python does not collect the
translator. It is called right after every QApplication() the Qt5 path creates
- 24 places, including ui5/scandialog.py and base/queues.py, the latter shared
by hp-diagnose_queues and hp-doctor. A missing catalogue is not an error:
the tool then keeps its English strings. The Qt3 branch is untouched.

0094 moves the % operator out of 80 tr() calls. As written, self.__tr("... %s"
% value) hands an already-substituted string to QApplication.translate(), so
window titles, wizard step counters and most error messages can never match a
catalogue entry. When no translation is loaded the behaviour is identical.

0095 is the Russian catalogue rebuilt against the interface that exists: 961
messages in 40 contexts on 3.24.4, extracted from what the Qt5 dialogs ask for.
334 of them inherit a translation from the old catalogue, where the source text
still matches; the remaining 627 are new. lrelease reports 961 finished and
0 unfinished.

The .qm is binary, so it is not in the patches. The orig tarball ships a
pre-built hplip_ru.qm matching the old catalogue, so debian/rules needs one
more line next to the existing "Patch out retranslateUi call like upstream
does" block:

    lrelease data/localization/hplip_ru.ts

with qttools5-dev-tools in Build-Depends.

Verified by a full package build of 3.24.4+dfsg0-0ubuntu8.1 on 26.04 in a clean
container, run twice: once with the series as it is, once with these four
patches appended to it. Both dpkg-buildpackage runs finish, and the set of build
warnings is identical between the two - nothing new. lrelease reports 961
finished and 0 unfinished; 961 rather than 963 because this is 3.24.4 and the
catalogue here is generated against the 3.24.4 interface.

Unpacking the resulting hplip-gui and hplip-data: all four .desktop files carry
four [ru] keys each, data/localization/hplip_ru.qm is 192307 bytes against
108771 in the reference build - so the rebuilt catalogue really does replace the
pre-built one from the tarball - base/utils.py has installTranslators(), and
usr/share/metainfo/hplip.metainfo.xml is installed.

To be precise about scope: on Ubuntu the packages were built and unpacked, not
installed. The live check that the installed package actually loads the
catalogue was done on another distribution.

Upstream is not going to do any of this. This report is fourteen years old,
still New and Unassigned, and HP has no other public tracker. The distribution
can give its users a localized printing tool even though HP will not.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1018037

Title:
  HP Toolbox is not localized

To manage notifications about this bug go to:
https://bugs.launchpad.net/hplip/+bug/1018037/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to