mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-25 09:56:15 -04:00
[feature] i18n for automatic reconnection messages/buttons
This commit is contained in:
parent
5e90700561
commit
0eae83f252
2 changed files with 10 additions and 1 deletions
|
@ -22,16 +22,23 @@ var createCountDownElementsIfNecessary = function($modal) {
|
|||
|
||||
// create extra DOM elements, if they don't exist
|
||||
var $reconnectTimerMessage = $('<p class="reconnecttimer"> \
|
||||
<span data-l10n-id="pad.modals.reconnecttimer">This window will automatically reconnect in </span> \
|
||||
<span data-l10n-id="pad.modals.reconnecttimer">This pad will be automatically reconnected in </span> \
|
||||
<span class="timetoexpire"></span> \
|
||||
</p>');
|
||||
var $cancelReconnect = $('<button id="cancelreconnect" data-l10n-id="pad.modals.cancel">Cancel</button>');
|
||||
|
||||
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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue