Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
2 Răspunsuri
15823 Vizualizări

Let's say I make a module.

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

Imagine profil
Abandonează
Autor Cel mai bun răspuns

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.

Imagine profil
Abandonează

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

Autor

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

Cel mai bun răspuns

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

Imagine profil
Abandonează

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

Related Posts Răspunsuri Vizualizări Activitate
14
dec. 24
68716
9
mar. 24
118174
1
iun. 20
11842
2
mar. 16
10177
1
mar. 15
7305