I have edited some of the .po translation files in addons directory, to fix a few missing translated words to my language, but it seems none of these changes are effective.
I have tried restarting OpenERP and rebooting the whole server, but to no avail.
What am I missing here? Do I have to update the module/addon somehow so that OpenERP updates the translation?
The OpenERP version I'm using is 7.0 and platform Ubuntu Linux 12.10.
for version6 (perhaps 7 too), to have the translation loaded for you modules with inheritance, you have to add in __openerp__.py line section :
in fact, translations are read by sequence and by alphabetic order (lower to greater). Default value for sequence parameter (which you should not have add) is 100. And if you have a module beginning by a letter < first letter of module inherited, your translation will be read first and your modifications will not be used. Restart openerp server to valid modification naturally.
After spending lots of time for struggling with exports, imports, updates, overwrites for a long time, this is how i manage to fix all empty/duplicated/not updated translation problems:
1) Stop odoo
2) Update all po files (in source folders)
3) Delete all translations from database (DELETE FROM ir_translation WHERE lang = 'tr_TR')
4) Run odoo with load language option. This will reload all po files from source folders back to database (./odoo.py --stop-after-init --load-language=tr_TR -c odoo.conf)
5) Start odoo
And all translations are updated to latest...
Follow below steps:
1) Go to
Settings ‣ Translations ‣ Import / Export ‣ Export Translations
leave the language to the default (new language/empty template) # DO NOT CHANGE THIS
select the PO File format
select your module
click Export and download the file
2) Add your translation terms in the downloaded file. i.e. msgstr "" section depending on your translation language
3) change the filename to language_iso_code.po
e.g. for portugese => pt.po
4) create i18n folder under your module and add po file in it.
5) restart Odoo
6) Go to:
Settings ‣ Translations ‣ Load a Translation
select translation language (in my eg. Portugese)
make sure you check this : Overwrite Existing Terms
Although this is not a solution to your problem, a have chosen a different approach. I have a folder with all the .po files in my language. I have written a script to load all the po files in that folder. Here is the script:
#!/bin/bash shopt -s nullglob # Path and the list of files to import. FILES=/opt/openerp/mk_MK/*-mk.po # Database in which to import the files. DATABASE=openerp_db # Language you are importing. LANG=mk_MK for f in $FILES do echo "Processing $f file..." # take action on each file. $f store current file name ./openerp-server -d $DATABASE -l $LANG --i18n-import=$f --i18n-overwrite done
I'm running my testing server on ubuntu 12.10
AFAIK, there was a design decision to be made: either to allow users to change translations from the GUI, or to always override user's translations with .po files.
Currently the tradeoff is made in favour of being able to manually change translations from the GUI.
See the corresponding bug report here:
If you don't need the ability to change translations from the GUI (Settings => Translations => Application Terms => Translated Terms), then you could apply the fixes proposed in the bug report and its comments.
Another solution is to manually re-import the changed .po file from Settings => Translations => Import/Export => Import Translation. In some cases the records imported this way may fail to have 'module' value set correctly (it may be empty), which prevents the translation from working properly. This can be fixed by setting the right module value from within PgAdmin.
I am new to odoo and facing the exact same issue. I updated the .po files and I don't know to force odoo to ignore the cached translation/ir_translation and use the ones in po files. I will appreciate your kind help on this as I need to deploy it in many places so I can't just translate it from GUI all from the beginning for every deployment. Thanks!
I removed the rights for the specific module (which translation should be updated) from user, logoff/log in to check if the module removed succefully.
After, I gave the same module again to the same user, logoff/login.
Finally, I discovered the module rights just given above is coming with the updated translation.
Several times i recognised to update base module before seeing the results of your modified .po files
- Go to Settings / Installed Modules
- In search field enter "base" as a filter
- Open "base" module in form view
- Click on upgrade
This should load and update all .po files, because all addons have base as minimum requirement (dependency).
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
About This Community
|Asked: 2/21/13, 1:20 PM|
|Seen: 14743 times|
|Last updated: 8/14/16, 1:46 PM|