diff --git a/src/locales/en.ini b/src/locales/en.ini index 2df2a95ee..51a5a13c6 100644 --- a/src/locales/en.ini +++ b/src/locales/en.ini @@ -48,7 +48,7 @@ pad.importExport.abiword.innerHTML = You only can import from plain text or html pad.modals.connected = Connected. pad.modals.reconnecting = Reconnecting to your pad.. pad.modals.forcereconnect = Force reconnect -pad.modals.uderdup = Opened in another window +pad.modals.userdup = Opened in another window pad.modals.userdup.explanation = This pad seems to be opened in more than one browser window on this computer. pad.modals.userdup.advice = Reconnect to use this window instead. pad.modals.unauth = Not authorized diff --git a/src/static/js/html10n.js b/src/static/js/html10n.js index 3c4e5450c..ca17bb0ec 100644 --- a/src/static/js/html10n.js +++ b/src/static/js/html10n.js @@ -735,7 +735,8 @@ window.html10n = (function(window, document, undefined) { // get id str.id = node.getAttribute('data-l10n-id') if (!str.id) return - if(!translations[str.id]) return + + if(!translations[str.id]) return consoleWarn('Couldn\'t find translation key '+str.id) // get args if(window.JSON) { @@ -750,6 +751,7 @@ window.html10n = (function(window, document, undefined) { str.str = html10n.get(str.id, str.args) + // get attribute name to apply str to var prop , index = str.id.lastIndexOf('.') , attrList = // allowed attributes @@ -758,7 +760,6 @@ window.html10n = (function(window, document, undefined) { , "alt": 1 , "textContent": 1 } - // get attribute name to apply str to if (index > 0 && str.id.substr(index + 1) in attrList) { // an attribute has been specified prop = str.id.substr(index + 1) } else { // no attribute: assuming text content by default @@ -766,7 +767,7 @@ window.html10n = (function(window, document, undefined) { } // Apply translation - if (node.children.length === 0) { + if (node.children.length === 0 || prop != 'textContent') { node[prop] = str.str } else { var children = node.childNodes, diff --git a/src/templates/pad.html b/src/templates/pad.html index db04f8b86..a9313a1be 100644 --- a/src/templates/pad.html +++ b/src/templates/pad.html @@ -54,60 +54,60 @@