[Python-projects] false positive with the _() symbol from gettextmodule
chaica
chaica at ohmytux.com
Sat Jun 20 18:13:59 CEST 2009
Le jeudi 18 juin 2009 à 08:39 +0200, Sylvain Thénault a écrit :
> On 17 juin 22:16, chaica wrote:
> > Hi,
>
> Hi,
>
> > My program runs and uses internationalization, switching the strings
> > following the system locales. My setting is really close from the
> > official documentation (here :
> > http://www.python.org/doc/2.6.2/library/gettext.html#localizing-your-application ).
> >
> > my import is :
> > import gettext
> > [snip]
> > after that :
> > if __name__ == '__main__':
> > gettext.install('bel', unicode=1)
> > [snip]
> >
> > after that, my string have the _() symbol around, as documented. My
> > program currently supports French and English.
>
> you should then add '_' to the additional-builtins option in a pylintrc file for your project.
Thanks it works.
But I'm not sure to fully understand this option. Why should I add '_'
as an additional builtin when the _() symbol is a standard feature in
Python while using gettext module?
Bye,
Carl Chenet
More information about the Python-Projects
mailing list