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.

1

How to generate po file?

By
Yannick Vaucher
on 4/2/13, 10:06 AM 4,373 views

Let's say I make a module.

How can I generate a .po files for this module?

3

Francesco OpenCode

--Francesco OpenCode--
3608
| 5 7 9
Grottaglie, Italy
--Francesco OpenCode--

Italian Odoo (OpenERP) Modules Developer LINKEDIN: http://www.linkedin.com/in/francescoapruzzese

Francesco OpenCode
On 4/2/13, 12:13 PM

If you can't run openerp but can only use it, go to

Settings -> Translations -> Import / Export -> Export Translation

and folow the step to extract your po file

image description

This does not extract text from `_("Python code")`, only from XML files. Instead, Yannick Vaucher's method does.

Jairo Llopis
on 8/7/14, 5:44 AM
2

Yannick Vaucher

--Yannick Vaucher--
1699
| 5 7 9
Lausanne, Switzerland
--Yannick Vaucher--
Yannick Vaucher
On 4/2/13, 10:13 AM

First we have to load the terms on OpenERP.

Log on OpenERP and ensure you are in Technical Features group

Synchronize translations in

Settings -> Translations -> Application Terms -> Synchronize Terms

Then use the following command line to generate your po file:

server/openerp-server --log-level=error --i18n-export=/tmp/<lang>.po -l <lang_code> -d <database> --modules=<module_name>

Ex.
lang_code = fr_FR
lang = fr

Then you can use msgmerge to merge the new po file with an existing one.

Thanks for the tip, do you know for which versions does it work ?

Clément THOMAS
on 4/2/13, 12:15 PM

This is what I use for v6.1 and v7 in a script.

Camptocamp SA
on 4/2/13, 1:11 PM

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: 4/2/13, 10:06 AM
Seen: 4373 times
Last updated: 3/16/15, 8:10 AM