summaryrefslogtreecommitdiff
path: root/src/static/js
diff options
context:
space:
mode:
authorJohn McLear <john@mclear.co.uk>2012-11-26 20:20:21 +0000
committerJohn McLear <john@mclear.co.uk>2012-11-26 20:20:21 +0000
commitb66c9135f7990a6bf0619cdff7662943865e8e65 (patch)
treeea76e68caa9e60149d7c4acc9b383a76ebaec640 /src/static/js
parent6239c66e3639bfed8345dabf304c4f4578dd67ed (diff)
parent491bf515c6fc8b5d17effd875091ba8efe3dce26 (diff)
downloadetherpad-lite-b66c9135f7990a6bf0619cdff7662943865e8e65.zip
Merge branch 'develop' of github.com:ether/etherpad-lite into remove-alert-on-wrap
Diffstat (limited to 'src/static/js')
-rw-r--r--src/static/js/broadcast.js28
-rw-r--r--src/static/js/broadcast_slider.js6
2 files changed, 29 insertions, 5 deletions
diff --git a/src/static/js/broadcast.js b/src/static/js/broadcast.js
index 86e63f93..d67398fb 100644
--- a/src/static/js/broadcast.js
+++ b/src/static/js/broadcast.js
@@ -304,7 +304,14 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
var hours = zpad(date.getHours(), 2);
var minutes = zpad(date.getMinutes(), 2);
var seconds = zpad(date.getSeconds(), 2);
- return ([month, '/', day, '/', year, ' ', hours, ':', minutes, ':', seconds].join(""));
+ return (document.webL10n.get("timeslider.dateformat", {
+ "day": day,
+ "month": month,
+ "year": year,
+ "hours": hours,
+ "minutes": minutes,
+ "seconds": seconds
+ }));
}
@@ -313,7 +320,24 @@ function loadBroadcastJS(socket, sendSocketMsg, fireWhenAllScriptsAreLoaded, Bro
$('#timer').html(dateFormat());
- var revisionDate = ["Saved", ["Jan", "Feb", "March", "April", "May", "June", "July", "Aug", "Sept", "Oct", "Nov", "Dec"][date.getMonth()], date.getDate() + ",", date.getFullYear()].join(" ")
+ var revisionDate = document.webL10n.get("timeslider.saved", {
+ "day": date.getDate(),
+ "month": [
+ document.webL10n.get("timeslider.month.january"),
+ document.webL10n.get("timeslider.month.february"),
+ document.webL10n.get("timeslider.month.march"),
+ document.webL10n.get("timeslider.month.april"),
+ document.webL10n.get("timeslider.month.may"),
+ document.webL10n.get("timeslider.month.june"),
+ document.webL10n.get("timeslider.month.july"),
+ document.webL10n.get("timeslider.month.august"),
+ document.webL10n.get("timeslider.month.september"),
+ document.webL10n.get("timeslider.month.october"),
+ document.webL10n.get("timeslider.month.november"),
+ document.webL10n.get("timeslider.month.december")
+ ][date.getMonth()],
+ "year": date.getFullYear()
+ });
$('#revision_date').html(revisionDate)
}
diff --git a/src/static/js/broadcast_slider.js b/src/static/js/broadcast_slider.js
index fed9f2e7..a597c926 100644
--- a/src/static/js/broadcast_slider.js
+++ b/src/static/js/broadcast_slider.js
@@ -112,7 +112,7 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded)
{
$(this).attr('href', $(this).attr('thref').replace("%revision%", newpos));
});
- $("#revision_label").html("Version " + newpos);
+ $("#revision_label").html(document.webL10n.get("timeslider.version", { "version": newpos}));
if (newpos == 0)
{
@@ -215,7 +215,7 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded)
}
if (authors.length == 0)
{
- authorsList.append("No Authors");
+ authorsList.append(document.webL10n.get("timeslider.toolbar.authorsList"));
}
fixPadHeight();
@@ -346,7 +346,7 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded)
var newloc = self.currentLoc + (evt2.clientX - self.startLoc);
if (newloc < 0) newloc = 0;
if (newloc > ($("#ui-slider-bar").width() - 2)) newloc = ($("#ui-slider-bar").width() - 2);
- $("#revision_label").html("Version " + Math.floor(newloc * sliderLength / ($("#ui-slider-bar").width() - 2)));
+ $("#revision_label").html(document.webL10n.get("timeslider.version", { "version": Math.floor(newloc * sliderLength / ($("#ui-slider-bar").width() - 2))}));
$(self).css('left', newloc);
if (getSliderPosition() != Math.floor(newloc * sliderLength / ($("#ui-slider-bar").width() - 2))) _callSliderCallbacks(Math.floor(newloc * sliderLength / ($("#ui-slider-bar").width() - 2)))
});