[Python-projects] false positive with the _() symbol from gettextmodule

Sylvain Thénault sylvain.thenault at logilab.fr
Thu Jun 18 08:39:04 CEST 2009


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.
-- 
Sylvain Thénault                               LOGILAB, Paris (France)
Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
CubicWeb, the semantic web framework:    http://www.cubicweb.org



More information about the Python-Projects mailing list