Skip to content
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

Translation on windows fails #800

Merged
merged 2 commits into from Jan 31, 2022
Merged

Conversation

luzip665
Copy link
Contributor

@luzip665 luzip665 commented Jan 18, 2022

Bug: On german Windows exaile speaks english.

I added setting os.environ['LANG'] which helps mostly.

Only the main menu isn't translated yet.

Additionally, because it depends on windows, it solves #799

fixes: #799
fixes: #51

@luzip665
Copy link
Contributor Author

luzip665 commented Jan 19, 2022

On linux the manual setting of os.environ['LANGUAGE'] works.
On Win many strings are translated but some not. May depend if the string come from .ui-files?

May help: tobias47n9e/pygobject-locale#1 (comment)

@luzip665
Copy link
Contributor Author

Seems to be a more general problem
https://gitlab.gnome.org/GNOME/pygobject/-/issues/422

@luzip665
Copy link
Contributor Author

Still not translated:

  • Developer tools
  • Device Manager
  • Equalizer
  • Shortcuts
  • Collection Manager
  • Cover Manager

@luzip665 luzip665 marked this pull request as ready for review January 22, 2022 14:18
@luzip665
Copy link
Contributor Author

Everything gets translated now.

May be there are better ways to implement the translation of the ui-xml especially for GtkTemplate.
Hints would be appreciated.

xlgui/guiutil.py Show resolved Hide resolved
xl/common.py Outdated Show resolved Hide resolved
xlgui/guiutil.py Outdated Show resolved Hide resolved
* Setting os.environ['lang'] to locale.getlocale on win32
* Load Gtk.Builder with translation in guiutil.get_builder
* Adding new cli-option --use-lang to set custom language
@luzip665 luzip665 merged commit 8e48610 into exaile:master Jan 31, 2022
@luzip665 luzip665 deleted the translation_on_windows branch January 31, 2022 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Windows build broken due to feedparser & setuptools incompatibility "Change language" option in the menu
2 participants