Fixed locale issues for main menu (will work once lang files are updated)

git-svn-id: http://svg-edit.googlecode.com/svn/trunk@1218 eee81c28-f429-11dd-99c0-75d572ba1ddd
This commit is contained in:
Alexis Deveria
2010-01-14 16:05:05 +00:00
parent d360c991cd
commit b835da83ea
3 changed files with 19 additions and 6 deletions

View File

@@ -44,9 +44,9 @@ var put_locale = function(svgCanvas, given_param){
if(data.title)
elem.title = data.title;
if(data.textContent) {
// Only replace text nodes, not elements
// Only replace non-empty text nodes, not elements
$.each(elem.childNodes, function(j, node) {
if(node.nodeType == 3) {
if(node.nodeType == 3 && $.trim(node.textContent)) {
node.textContent = data.textContent;
}
});