Use 'html10n' instead of '_', i10nzed "unnamed author(s)"
This commit is contained in:
parent
4a20a26cbf
commit
763864539f
3 changed files with 10 additions and 2 deletions
|
@ -95,6 +95,8 @@
|
||||||
"timeslider.month.october": "October",
|
"timeslider.month.october": "October",
|
||||||
"timeslider.month.november": "November",
|
"timeslider.month.november": "November",
|
||||||
"timeslider.month.december": "December",
|
"timeslider.month.december": "December",
|
||||||
|
"timeslider.unnamedauthor": "{{num}} unnamed author",
|
||||||
|
"timeslider.unnamedauthors": "{{num}} unnamed authors",
|
||||||
"pad.savedrevs.marked": "This revision is now marked as a saved revision",
|
"pad.savedrevs.marked": "This revision is now marked as a saved revision",
|
||||||
"pad.userlist.entername": "Enter your name",
|
"pad.userlist.entername": "Enter your name",
|
||||||
"pad.userlist.unnamed": "unnamed",
|
"pad.userlist.unnamed": "unnamed",
|
||||||
|
|
|
@ -193,7 +193,12 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded)
|
||||||
});
|
});
|
||||||
if (numAnonymous > 0)
|
if (numAnonymous > 0)
|
||||||
{
|
{
|
||||||
var anonymousAuthorString = numAnonymous + " unnamed author" + (numAnonymous > 1 ? "s" : "")
|
var anonymousAuthorString;
|
||||||
|
if(numAnonymous == 1)
|
||||||
|
anonymousAuthorString = html10n.get("timeslider.unnamedauthor", { num: numAnonymous });
|
||||||
|
else
|
||||||
|
anonymousAuthorString = html10n.get("timeslider.unnamedauthors", { num: numAnonymous });
|
||||||
|
|
||||||
if (numNamed !== 0){
|
if (numNamed !== 0){
|
||||||
authorsList.append(' + ' + anonymousAuthorString);
|
authorsList.append(' + ' + anonymousAuthorString);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -78,11 +78,12 @@ var padeditor = (function()
|
||||||
|
|
||||||
html10n.bind('localized', function() {
|
html10n.bind('localized', function() {
|
||||||
$("#languagemenu").val(html10n.getLanguage());
|
$("#languagemenu").val(html10n.getLanguage());
|
||||||
|
// translate the value of 'unnamed' and 'Enter your name' textboxes in the userlist
|
||||||
$('input[data-l10n-id]').each(function(key, input)
|
$('input[data-l10n-id]').each(function(key, input)
|
||||||
{
|
{
|
||||||
input = $(input);
|
input = $(input);
|
||||||
if(input.hasClass("editempty"))
|
if(input.hasClass("editempty"))
|
||||||
input.val(_(input.attr("data-l10n-id")));
|
input.val(html10n.get(input.attr("data-l10n-id")));
|
||||||
});
|
});
|
||||||
})
|
})
|
||||||
$("#languagemenu").val(html10n.getLanguage());
|
$("#languagemenu").val(html10n.getLanguage());
|
||||||
|
|
Loading…
Reference in a new issue