[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:
parent
7ac4639a24
commit
01c983919c
|
@ -322,7 +322,9 @@
|
||||||
function treat_node(node){
|
function treat_node(node){
|
||||||
if(node.nodeType === 3) {
|
if(node.nodeType === 3) {
|
||||||
if(node.nodeValue.match(/\S/)){
|
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()) {
|
else if(node.nodeType === 1 && node.hasChildNodes()) {
|
||||||
|
|
Loading…
Reference in New Issue