diff --git a/src/locales/en.json b/src/locales/en.json index 3e16c5de0..2e96880ae 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -74,6 +74,8 @@ "pad.modals.connected": "Connected.", "pad.modals.reconnecting": "Reconnecting to your pad..", "pad.modals.forcereconnect": "Force reconnect", + "pad.modals.reconnecttimer": "This pad will be automatically reconnected in ", + "pad.modals.cancel": "Cancel", "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.", diff --git a/src/static/js/pad_automatic_reconnect.js b/src/static/js/pad_automatic_reconnect.js index 6474838c9..3de5ff62c 100644 --- a/src/static/js/pad_automatic_reconnect.js +++ b/src/static/js/pad_automatic_reconnect.js @@ -22,16 +22,23 @@ var createCountDownElementsIfNecessary = function($modal) { // create extra DOM elements, if they don't exist var $reconnectTimerMessage = $('
\ - This window will automatically reconnect in \ + This pad will be automatically reconnected in \ \
'); var $cancelReconnect = $(''); + localize($reconnectTimerMessage); + localize($cancelReconnect); + $reconnectTimerMessage.insertAfter($defaultMessage); $cancelReconnect.insertAfter($reconnectButton); } } +var localize = function($element) { + html10n.translateElement(html10n.translations, $element.get(0)); +}; + var createTimerForModal = function($modal) { var timer = new CountDownTimer(clientVars.automaticReconnectionTimeout);