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

Hi,

I've made a couple owl-components and snippets in the website, when I export the po files my fields are present and seem valid. 


#. module: my_module

#. odoo-javascript

#: code:addons/my_module/static/src/js/test.js:0

#, python-format

msgid "An error occurred. Please try again."

msgstr "Une erreur s'est produite. Veuillez réessayer."

Once I restart the service all translations work, except for the static templates like owl-components and snippets.

I've tried to use the _t and _lt functions in the js code, but this didn't work either for my translations. 

I am working in v17.

Thanks in advance

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

Odoo doesn't send the translations of a module to the frontend until told to do so.


Here's the link to solution in the docs, it's in the first 'Note' of the 'Explicit exports' section just before 'Context'


documentation/18.0/developer/howtos/translations.html#explicit-exports

I can't put an image or link because I don't have enough xp, but I hope this can help


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

I have the same problem, do you have a solution?

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
0
thg 6 25
555
2
thg 6 25
634
0
thg 4 25
1029
Odoo icon change Đã xử lý
2
thg 1 25
1391
2
thg 2 24
12680