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

I've created a module which only modifies an existing RML report to add new columns, labels and functionalities. It's working great.

The problem is in the translation files. To translate my module, I do the same as always, use the OpenERP interface as a standard user, go to configuration > translations > export / import > export translation. I select my module, but the exported translation only has the header, and nothing more.

The labels and strings I added to the report aren't being recognized. Can anyone tell me why?

Thank you in advance!

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

Have you imported openerp.tools.translate import _ and kept the strings inside _( "sample string") ?

อวตาร
ละทิ้ง
ผู้เขียน

Thank you Akhil. I hadn't imported the library in the Python code. I 've just done it and add the _(" ") to some labels, but still same result. It's weird because I did several reports and I've never needed to write _(" ") around the words, they were automatically recognized by the translation tool.

In reports you don't need to use "_()". if some field strings, warnings or some texts, you need to translate, it should be used I think. In reports, like you told, it detects automatically.

ผู้เขียน

Finally, I created the translation file manually and it works (I was able to this because there were only a few terms to translate). However, even doing the translation file by myself, a term isn't being translated, the sentence just after the OR: [[ (o.comment and format(o.comment)) or "Please, indicate the invoice number on the concept of income" ]] Which could be the problem?

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ม.ค. 25
8698
0
มี.ค. 15
4755
3
ก.ค. 24
8625
0
เม.ย. 17
3345
1
เม.ย. 17
4700