Why some sentences are not exported ? (I'm trying to translate a custom module).
What's the right way ?
from tools.translate import _
from openerp.tools.translate import _
Here's three samples of python code. Am I using '_' correctly ?
return _("This is an empty purchase order. Please add some lines.") raise osv.except_osv(_('Shipping rule error'), message) condition_string = _(' if %s %s %s %s') % (field_string, sign, str(value), symbol_string)
No matter what I do, I can't translate the hard coded strings. They don't even appear in my po file !
Okay, now I try to add manually the sentences to both my french po file and my pot file. After openerp restart, I can see the sentences in the ir.translation table (via pgadmin3), but they are not used in the web client. I'm still with the english sentences. Here's a sample of what I've add :
#. module: shipping #: view:shipping_rule:0 msgid "Shipping rule error" msgstr "Erreur de rÃ¨gle de frais de port"
I think my mistake is in the second line, but I don't know what to put in place of that. Do someone knows how to fill this line properly ?