Problem with QTranslator (by GNU gettext user)

c.buhtz at posteo.jp c.buhtz at posteo.jp
Sat Jun 17 15:27:35 BST 2023


Dear Dimitry,

thanks for the reply. strace did helped.

PyQt/Qt try to find the files in "/home/user/.local/lib/python3.9/site-packages/PyQt5/Qt5/translations".

access("/home/user/.local/lib/python3.9/site-packages/PyQt5/Qt5/translations/de_DE.qm", R_OK) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
access("/home/user/.local/lib/python3.9/site-packages/PyQt5/Qt5/translations/de_DE", R_OK) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
access("/home/user/.local/lib/python3.9/site-packages/PyQt5/Qt5/translations/de.qm", R_OK) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
access("/home/user/.local/lib/python3.9/site-packages/PyQt5/Qt5/translations/de", R_OK) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)

I also checked one of the other Qt applications from I know they are working.

access("/usr/share/qt5/translations/qt_de_DE.qm", R_OK) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
access("/usr/share/qt5/translations/qt_de_DE", R_OK) = -1 ENOENT (Datei oder Verzeichnis nicht gefunden)
access("/usr/share/qt5/translations/qt_de.qm", R_OK) = 0

By the way: It is Debian 12.

So somehow I need to give my QTranslator the right folder? But how do I know the right folder?
Is there a distro independent way to define that folder?

Here I only do use a simple hello world script. But what if I would like to bundle an Qt application that is packaged by different GNU/Linux distros with different folder structures?


More information about the PyQt mailing list