Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
4794 Lượt xem

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!

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Tác giả

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.

Tác giả

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?

Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 1 25
8675
0
thg 3 15
4736
3
thg 7 24
8611
0
thg 4 17
3326
1
thg 4 17
4686