CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I'm trying to translate my own module. Some sentences are in the code, and aren't included in the output file while I do
Settings > Import/Export > Export Translation. So I'm trying to include these sentences manually.
So far, I've just achieved including them in the database. But something is wrong, because they are not used by openERP. I mean, the sentences are not translated when I use my module, but I can see the sentences in the
A sample of my
#. module: shipping #: view:shipping_rule:0 msgid "Shipping rule error" msgstr "Erreur de rÃ¨gle de frais de port"
I think the second line can do the trick, but I don't know the syntax. Someone know how to do that ?
Getting the translations to update and show up seems to be a bit hit or miss, but this is how I have got everything to show up, except for new states:
- Save all your module's xml and py files, and remember to use
from tools.translate import _in python
- If you haven't already, enable the language you want to translate to from
Settings -> Load a translation
- Restart the server with the
- Go to
Settings->Export translation. Choose the language you want to translate to, select PO as the file format, and pick the module you want to translate.
- Save the result to
fiwith your proper language code)
- Edit the .po file with a text editor and add the translations there, don't touch anything else than just the
msgstrrows. Save the file.
- After you have translated everything, restart the server with
--update=allflag. Sometimes doing this twice has been required.
- Enable the new language for your user at
Settings -> Users -> (username) -> Language
- Switch to that user and press Ctrl+R to refresh the UI
Hopefully this works for you as well.
About This Community
Odoo Training Center
|Asked: 1/14/14, 11:19 AM|
|Seen: 1825 times|
|Last updated: 8/15/16, 4:49 AM|