[Python-projects] false positive with the _() symbol from gettextmodule
Rasener, Dustin M
Dustin.M.Rasener at pearson.com
Wed Jun 17 21:58:17 CEST 2009
We use gettext here, along with pylint. Are you sure that your import
statement is correct? Does it look something like this?
from django.utils.translation import ugettext as _
Our project is using Django, if yours is not, this import will
necessarily be different.
Dustin
-----Original Message-----
From: python-projects-bounces at lists.logilab.org
[mailto:python-projects-bounces at lists.logilab.org] On Behalf Of chaica
Sent: Wednesday, June 17, 2009 3:41 PM
To: python-projects at lists.logilab.org
Subject: [Python-projects] false positive with the _() symbol from
gettextmodule
Hi,
Using the gettext module for internationalization, you have to put the
_() symbol around each string you want to translate. Pylint seems unable
to recognize this symbol and triggers an error :
E: 60:Terminal.extrait_ordres: Undefined variable '_'
E: 66:Terminal.extrait_ordres: Undefined variable '_'
E: 72:Terminal.extrait_ordres: Undefined variable '_'
E: 77:Terminal.extrait_ordres: Undefined variable '_'
E: 82:Terminal.extrait_ordres: Undefined variable '_'
E: 87:Terminal.extrait_ordres: Undefined variable '_'
Bye,
Carl Chenet
_______________________________________________
Python-Projects mailing list
Python-Projects at lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects
More information about the Python-Projects
mailing list