From: Doug B. <dou...@gm...> - 2013-08-29 01:16:57
|
On Wed, Aug 28, 2013 at 8:40 PM, John Ralls <jr...@ce...> wrote: > > On Aug 28, 2013, at 4:21 PM, Doug Blank <dou...@gm...> wrote: > >> Devs, >> >> Getting back into the swing of things and I have a couple of questions >> about languages in gramps40: >> >> 1) When I run "python Gramps.py" I get the dialog "Gramps detected an >> incomplete GTK installation. GTK translations for the current language >> (en_US) are missing." I did the "python setup.py build" but why would >> I need a translation file for English anyway? I get the same dialog in >> trunk. I can continue, but this makes me think something is wrong. > > Something *is* wrong. Gtk supplies an gtk.mo in the 'en' locale, and you don't have it. > It's pretty trivial now: The only translations are for keyboard labels (e.g., msgid "XF86WebCam" > msgstr "Web Cam"). But it should be there and if it isn't it might indicate some other > problem with your installation. Or you might just be using Ubuntu. > > This bit Vassilii a few months ago. He uses Ubuntu and they've apparently decided to > separate localizations into separate packages called "Language Packs" rather than > installing the localizations as part of the package which provides them. Thanks, yes, I am running Ubuntu. That was enough of a hint to try a few language packages until I found the right one: sudo apt-get install language-pack-gnome-en >> 2) I am trying to use gramps outside of the Gtk application. Sometimes >> languages == ['en'] when calling a second GrampsLocale() in >> gramps/gen/utils/grampslocale.py and that causes issues with this >> code: >> >> if languages: >> self.language = [x for x in [self.check_available_translations(l) >> for l in languages.split(":")] >> if x] >> >> But languages is a list, and so it is an error to call .split() on it. >> I think the .split() should be someplace else. > > Why do you think that the languages parameter is a list? Because it was a list :) The second time that a GrampsLocale was created, languages was a list containing ["en"]. I see now that there is a line in gramps/webapp/utils.py that manually sets this which was added in: https://sourceforge.net/p/gramps/code/22027/ > From the class DocString: > "@languages: String with a ':'-separated list of two or five character codes corresponding to subidrectries in the localedir, e.g.: "fr" or "zh_CN". > > It's designed to take the value of os.environ['LANGUAGE'] directly. Ok, so I think that it was just a typo, or perhaps leftover from a previous interface. I'll fix that. Thanks! -Doug > Regards, > John Ralls > > |