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

Hello everyone I exported file .po and add to i18n folder, I am working in owl and I can not translate as expected, here is my code

app.xml

   div t-name="HeaderContent"
           Human Resource
   div

i18n/language.po 

#. module: hr_management
#. openerp-web
#: code:addons/hr_management/static/src/xml/app.xml:0
#, python-format
msgid " Human Resource "
msgstr "The translate of word 'Human Resource' "

app.js

odoo.define("web.web_client", function(require) {    

    "use strict";

     const { Component, useState, mount } = owl;

     function app() {

         class HeaderContent extends Component {

         }

          mount(HeaderContent , { target: document.body });

    }

     async function start() {                       

         let templates;

         templates = await owl.utils.loadFile( " hr_management/static/src/xml/app.xml");

          const env = { qweb: new owl.QWeb({ templates }) }; 

          owl.Component.env = env;

          await owl.utils.whenReady();

          app();


     }

      start();

});



อวตาร
ละทิ้ง

Hello,
I have the same problem to translate my component. (In v15)
Do you found solutions ?

Thanks

Related Posts ตอบกลับ มุมมอง กิจกรรม
How to render owl template from JS? แก้ไขแล้ว
1
ก.ย. 23
5978
0
พ.ย. 21
888
0
ก.ค. 21
1471
1
พ.ค. 22
2004
0
พ.ค. 21
19