تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
2 الردود
15797 أدوات العرض

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.

المنشورات ذات الصلة الردود أدوات العرض النشاط
14
ديسمبر 24
68680
What's the context? تم الحل
9
مارس 24
118126
1
يونيو 20
11815
2
مارس 16
10156
1
مارس 15
7279