Перейти к содержимому
Меню
Чтобы взаимодействовать с сообществом, необходимо зарегистрироваться.
Этот вопрос был отмечен
2 Ответы
15987 Представления

Let's say I make a module.

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

Аватар
Отменить
Автор Лучший ответ

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 ?

Автор

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

Лучший ответ

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.

Related Posts Ответы Просмотры Активность
14
дек. 24
69133
9
мар. 24
118624
1
июн. 20
12024
2
мар. 16
10357
1
мар. 15
7439