[FIX] im_livechat: prevent translation of JS snippet
QWeb templates can be translated, javascript code included. Nothing prevents you to translate the javascript reserved word "undefined", for instance. Preventing the livechat JS snippet to be translated prevent translations mistakes, like translate ```undefined``` by ```Niet gedefinieerd``` opw-630335
This commit is contained in:
parent
23873da6b6
commit
e3a80afbaf
|
@ -123,19 +123,21 @@
|
|||
|
||||
<!-- the js code to initialize the LiveSupport object -->
|
||||
<template id="loader" name="Javascript initializing the LiveSupport">
|
||||
(function() {
|
||||
window.livesupport = new openerp.im_livechat.LiveSupport(
|
||||
"<t t-esc="url"/>",
|
||||
"<t t-esc="dbname"/>",
|
||||
<t t-esc="channel"/>,
|
||||
{
|
||||
buttonText: "<t t-esc="buttonText"/>",
|
||||
inputPlaceholder: "<t t-esc="inputPlaceholder"/>",
|
||||
defaultMessage: "<t t-esc="defaultMessage"/>" || '',
|
||||
auto: window.oe_im_livechat_auto || false,
|
||||
defaultUsername: "<t t-esc="username"/>" || undefined,
|
||||
});
|
||||
})();
|
||||
<t t-translate="off">
|
||||
(function() {
|
||||
window.livesupport = new openerp.im_livechat.LiveSupport(
|
||||
"<t t-esc="url"/>",
|
||||
"<t t-esc="dbname"/>",
|
||||
<t t-esc="channel"/>,
|
||||
{
|
||||
buttonText: "<t t-esc="buttonText"/>",
|
||||
inputPlaceholder: "<t t-esc="inputPlaceholder"/>",
|
||||
defaultMessage: "<t t-esc="defaultMessage"/>" || '',
|
||||
auto: window.oe_im_livechat_auto || false,
|
||||
defaultUsername: "<t t-esc="username"/>" || undefined,
|
||||
});
|
||||
})();
|
||||
</t>
|
||||
</template>
|
||||
|
||||
</data>
|
||||
|
|
Loading…
Reference in New Issue