On Tue, 26 Nov 2013 20:01:29 +0100, Saint Germain <[email protected]> wrote :
> On Tue, 26 Nov 2013 10:47:25 +0100, Saint Germain <[email protected]> > wrote : > > > Hello ! > > > > On 26 November 2013 08:58, Dwayne Bailey <[email protected]> > > wrote: > > >> I am trying to install Pootle on Debian Testing but I keep having > > >> this warning message: > > >> Can't find the ISO codes package. Pootle uses ISO codes to > > >> translate language names > > >> > > >> I have installed iso-codes (and even python-pycountry) but it has > > >> no visible effect. > > > > > > > > > Just to check that we're on the right page. The language names, > > > i.e. the names you would see in the list of languages for a > > > project, would only be translated if: > > > > > > 1) iso-codes is translated into your language > > > 2) Your UI language is correctly set either by your browser or in > > > your Pootle users setup. > > > > > > > I have tried setting the UI language as french (it seems to be the > > test default) both in the browser and in Pootle users setup. > > But I still got the warning message. > > > > >> > > >> What can I do to try to debug this further ? > > > > > > > > > The code doing the depency check is here: > > > https://github.com/translate/pootle/blob/0ba09cf19a90dbd8f0ebd9cb5523a278d4c829f2/pootle/depcheck.py#L92-L99 > > > > > > > Ok I will try to run this code manually and to debug the problem. > > Thanks ! > > Ok I found the problem: > http://docs.python.org/2/library/gettext.html#id6 > > It seems to me that a lot of people should run into the same > 'problem'. > > Indeed I installed Pootle in a virtualenv (as recommended by the > documentation), however I have the iso-codes installed globally in the > system (in /usr/share/locale). > > In Pootle test we have: > gettext.find('iso_639', languages=languages, all=True) > > But without any other info gettext will only look into the virtualenv > and not in /usr/share/locale. > > What would be a good workaround ? > 1) Call gettext.bindtextdomain() before with /usr/share/locale > 2) Call gettext.find() with localedir > 3) Set sys.prefix > 4) Create a symbolic link from the virtualenv to /usr/share/locale > 5) Any other trick ? > > Best regards, Another solution: use pycountry ------------------------------------------------------------------------------ Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349351&iu=/4140/ostg.clktrk _______________________________________________ Translate-pootle mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/translate-pootle
