Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
15381 มุมมอง

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 ตอบกลับ มุมมอง กิจกรรม
Translations (.po files) not updating? แก้ไขแล้ว
14
ธ.ค. 24
67522
What's the context? แก้ไขแล้ว
9
มี.ค. 24
116783
1
มิ.ย. 20
11346
Editing process in openerp แก้ไขแล้ว
2
มี.ค. 16
9774
1
มี.ค. 15
6961