Translations aren't getting built via setup.py

Asked by Joe Sapp on 2013-10-31

How are different translation files built in setup.py?

Question information

Language:
English Edit question
Status:
Solved
For:
Gourmet Edit question
Assignee:
No assignee Edit question
Solved by:
Bernhard Reiter
Solved:
Last query:
Last reply:
Best Bernhard Reiter (ockham-razor) said : #1

setup.py uses DistUtilsExtra's build_i18n function to invoke intltool et al, and installs gourmet.mo files to /usr/share/locale/$LANGUAGE/LC_MESSAGES (for all $LANGUAGEs gourmet has translations for). (Or to /usr/share/$LANGUAGE/LC_MESSAGES if it's invoked via a distribution package).

However, some of our i18n related code is buggy -- for me, running
LC_ALL="en_US.utf-8" gourmet
just gives me the UI in German (which is my system language) instead of English.

What sort of issue are you experiencing?

Joe Sapp (sappj) said : #2

Hmm...maybe I just don't understand how to set it up :)
It appears to build and install to the right place, but I only have a gourmet.mo in /usr/share/locale/en/LC_MESSAGES/ . I was expecting to have many language files. What should I do for it to build other .mo files?

Joe Sapp (sappj) said : #3

If I set the LINGUAS environment variable, it builds other languages. Sorry for the noise :)

Joe Sapp (sappj) said : #4

Thanks Bernhard Reiter, that solved my question.

Bernhard Reiter (ockham-razor) said : #5

Glad to hear you found a solution to your problem!