[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:
Fabien Meghazi 2014-09-03 12:09:31 +02:00
parent 8f006ed94e
commit 40d4b6b49f
1 changed files with 1 additions and 1 deletions

View File

@ -130,7 +130,7 @@
node.setAttribute('data-oe-translation-view-id', view_id);
var content = node.childNodes[0].data.trim();
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) {
node.setAttribute('data-oe-translation-id', trans[0].id);