Re: [translate-pootle] Can't find the ISO codes package

2013-11-26 Thread Saint Germain


On Tue, 26 Nov 2013 20:01:29 +0100, Saint Germain 
wrote :

> On Tue, 26 Nov 2013 10:47:25 +0100, Saint Germain 
> wrote :
> 
> > Hello !
> > 
> > On 26 November 2013 08:58, Dwayne Bailey 
> > 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
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle


Re: [translate-pootle] Can't find the ISO codes package

2013-11-26 Thread Saint Germain
On Tue, 26 Nov 2013 10:47:25 +0100, Saint Germain 
wrote :

> Hello !
> 
> On 26 November 2013 08:58, Dwayne Bailey 
> 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,

--
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
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle


Re: [translate-pootle] Can't find the ISO codes package

2013-11-25 Thread Dwayne Bailey
On 26 November 2013 01:41, Saint Germain  wrote:

> Hello,
>
> 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.


>
> 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


>
> Thanks !
>
>
> --
> Shape the Mobile Experience: Free Subscription
> Software experts and developers: Be at the forefront of tech innovation.
> Intel(R) Software Adrenaline delivers strategic insight and game-changing
> conversations that shape the rapidly evolving mobile landscape. Sign up
> now.
> http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
> ___
> Translate-pootle mailing list
> Translate-pootle@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/translate-pootle
>



-- 
Dwayne

*Translate*
+27 12 460 1095 (work)
--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
___
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle


[translate-pootle] Can't find the ISO codes package

2013-11-25 Thread Saint Germain
Hello,

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.

What can I do to try to debug this further ?

Thanks !

--
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
___
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle