Odoo Help

Welcome!

This community 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.

0

v9: How can I make sure strings in my own custom modules can be exported to PO files so I can translate them? I tried importing "_" and using "_" in front of them.

By
Judith
on 11/17/16, 11:02 AM 118 views

Hello,


I would like to translate a warning in odoo 9. The original message is in English and I want to translate it into German. 

When I export the translation as a po file, the content of the warning is not shown in the file so I can't translate it. The report and everything else is present and the

I tried importing " _ " and wrapping the string to translate with it.

Anyone knows how to get this to work?

from openerp.tools.translate import _
return {                   
             'warning': {
                            'title': _("No corresponding product"),
                            'message': _("Please create an expense product called Additional meal allowance"),
  },
      }

Your Answer

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

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 11/17/16, 11:02 AM
Seen: 118 times
Last updated: 11/17/16, 12:31 PM