-
Notifications
You must be signed in to change notification settings - Fork 137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Locale settings like LANG LANGUAGE and so on seems to be useless. #1017
Comments
Thanks, I can't offer a solution just now, but I've made a note of this. |
Out of curiosity, there is a test wheel available here, could you try installing it and check that the application is in German? Thanks! |
Ok, I tried it, but i looks weird:
So gourmet running from flatpak seems to load my development directory. Unfortunately I have no experience with flatpak to know this is an intended behavior or which application code is now running. Finally I switched my complete system to german language but the only translated button is the "search" button which will become Suchen which is correct. |
I had the same issue on Ubuntu 18.04. I noticed with |
Seeing the same problem on Ubuntu 20.04 with a local dev install in my virtualenv.
does not seem to pipe the desired setting through to gettext. It appears locale_base is computed in
Grepping through
Was that the point where gettext was set up? |
Dug a bit more. in settings.py
Does give me a translated string IFF the gourmet.mo file is moved under:
instead of
However, later in the code, e.g., in gglobals.py this does not work anymore. Here it seems to fall back to ignoring the LC* and LANG* variables. Something seems to reset the gettext setup in between. |
Thanks @martinp26 for your in-depth investigation! It's a bit hacked together at the moment (that is, works on my machine™), and still requires a bit of work though. |
The locale settings from console runs are not respected at all. The gui is still in english.
Steps to Reproduce
Expected Behavior
Language is switched respecting the locale settings.
Current Behavior
Language is still in english.
Possible Solution
??
Environment
sven@SvensRyzen:~/workspace/gourmet$ locale
LANG=de_DE
LANGUAGE=de
LC_CTYPE="de_DE"
LC_NUMERIC=de_DE.UTF-8
LC_TIME=de_DE.UTF-8
LC_COLLATE="de_DE"
LC_MONETARY=de_DE.UTF-8
LC_MESSAGES="de_DE"
LC_PAPER=de_DE.UTF-8
LC_NAME=de_DE.UTF-8
LC_ADDRESS=de_DE.UTF-8
LC_TELEPHONE=de_DE.UTF-8
LC_MEASUREMENT=de_DE.UTF-8
LC_IDENTIFICATION=de_DE.UTF-8
LC_ALL=
The text was updated successfully, but these errors were encountered: