Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
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 ?
About This Community
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 12/20/13, 11:48 AM|
|Seen: 2622 times|
|Last updated: 3/16/15, 8:10 AM|