Aide

2

Odoo 13 not translating JS string in QWEB

Avatar
FCarmo

Using Odoo13, I built a js file where I apply the _t() to the strings

 

var core = require('web.core');

var _t = core._t;

...

payment_frequency_text = _t('Monthly');

 

-------------


When I export the translations, odoo detects it in the .po file

-------------

#. module: test_module

#. openerp-web

#: code:addons/test_module/static/src/test_module_website_info.js:0

#, python-format

msgid "Monthly"

msgstr ""

-------------

And this is how I put it in my po file:

-------------

#. module: test_module

#. openerp-web

#: code:addons/test_module/static/src/test_module_website_info.js:0

#, python-format

msgid "Monthly"

msgstr "Mensalmente"

-------------


I start the odoo service, updated the the lang to rewrite the translations with my own.

Went to "Translated terms" and it's there with the state "Translated".

When I go to the website (frontend) the term is not translated.

The website only has 1 lang active (PT)


Can any1 give an insight into what I might be doing wrong?



1Commentaires
Avatar
Annuler
Avatar
Emanuel Cino
-

I have the same issue on Odoo 12. I wonder if core._t is not meant to be used in the website part?