Problem with QTranslator (by GNU gettext user)
c.buhtz at posteo.jp
c.buhtz at posteo.jp
Sun Jun 18 09:19:45 BST 2023
Dear Florian,
thanks for the reply.
On 2023-06-17 20:26 Florian Bruhin <me at the-compiler.org> wrote:
> So it looks like you have a PyQt install in
> /home/user/.local/lib/python3.9/site-packages/PyQt5, probably
> installed with "pip install --user" at some point.
Correct.
> You should probably uninstall it and use virtualenvs in the future.
How could virtualenvs prevent such situations?
I'm not convinced with the concept of virtuelenvs in the context of
local developer machines. This is something for CI and testing machines.
I know it is usual among Python devs to use this. But I don't, because
it implies a lot of other problems.
The problem is how Qt deal with standards and system paths. It also is
a problem that Qt offer it's own translation system instead of using
GNU gettext. The point is that each Qt installation should know itself
where it's translation files are.
> The -E is irrelevant, it's most likely -s that makes the difference:
>
> -s Don't add user site directory to sys.path.
>
> Which means that you will end up with your "proper" system-wide
> installed Qt rather than the one you installed via pip.
I see. But I also have a system-wide Qt installed.
I will think about removing standard buttons and create my own ones
with usual GNU gettext strings like "_('Cancel')".
Beside such buttons. Where are translations used also?
Kind
Christian
More information about the PyQt
mailing list