[FIX] Website translation pairing bug
I think we could get rid of the .trim() calls (for performance sake) but I don't want to break anything so I'll leave them.
This commit is contained in:
parent
8f006ed94e
commit
40d4b6b49f
|
@ -130,7 +130,7 @@
|
||||||
node.setAttribute('data-oe-translation-view-id', view_id);
|
node.setAttribute('data-oe-translation-view-id', view_id);
|
||||||
var content = node.childNodes[0].data.trim();
|
var content = node.childNodes[0].data.trim();
|
||||||
var trans = this.translations.filter(function (t) {
|
var trans = this.translations.filter(function (t) {
|
||||||
return t.res_id === view_id && t.value === content;
|
return t.res_id === view_id && t.value.trim() === content;
|
||||||
});
|
});
|
||||||
if (trans.length) {
|
if (trans.length) {
|
||||||
node.setAttribute('data-oe-translation-id', trans[0].id);
|
node.setAttribute('data-oe-translation-id', trans[0].id);
|
||||||
|
|
Loading…
Reference in New Issue