This question has been flagged
1 Reply
2782 Views

Main problem: I want to translate message to other language. I explain you: Having two ways to translate to other language: one is using file.csv; two is using file.po and file.pot. I should do follow what is one? How to translate via file.po and .pot? Can you guild me step by step?

I have two field: raise osv.except_ov(_('A'), _('B')) and msgalert = {'title':'C','message':'D'} val = {} val = { 'effective_date': '', } return {'value': val,'warning':msgalert} Why? when I export to file.csv contain A, B and not C, D.

Avatar
Discard
Best Answer

Once your module is ready, you can export the .po file for your language via Configuration > Translations > Import/Export > Export Translation.

Then, you can edit the .po file using softwares like POEdit.

When you translated all the terms you just need to create an i18n folder inside you module folder and place the translated .po file there.

Run an upgrade of you module, refresh the page (sometimes you need to clean the browser's cache too) and you should see the translated labels.

Avatar
Discard
Author

? When I export the .po file field A, B not in it. This is code python: msgalert = {'title': 'A', 'message': 'B'}

Author

I know fix this bug. You can declare such as: msgalert = {'title':_('A'), 'message':_('B')}.