[FIX] website: to keep the spaces around the translations

We keep the original spaces around the translations to avoid
missing spaces between words.
This commit is contained in:
Goffin Simon 2015-03-15 16:52:07 +01:00
parent 7ac4639a24
commit 01c983919c
1 changed files with 3 additions and 1 deletions

View File

@ -322,7 +322,9 @@
function treat_node(node){
if(node.nodeType === 3) {
if(node.nodeValue.match(/\S/)){
node.nodeValue = openerp._t($.trim(node.nodeValue));
var text_value = $.trim(node.nodeValue);
var spaces = node.nodeValue.split(text_value);
node.nodeValue = spaces[0] + openerp._t(text_value) + spaces[1];
}
}
else if(node.nodeType === 1 && node.hasChildNodes()) {