Merge pull request #1407 from mluto/hardcoded-i18n
i10ze hardcoded message, update some messages on lang-change
This commit is contained in:
commit
51daaf02ce
|
@ -95,6 +95,8 @@
|
|||
"timeslider.month.october": "October",
|
||||
"timeslider.month.november": "November",
|
||||
"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.userlist.entername": "Enter your name",
|
||||
"pad.userlist.unnamed": "unnamed",
|
||||
|
|
|
@ -193,7 +193,12 @@ function loadBroadcastSliderJS(fireWhenAllScriptsAreLoaded)
|
|||
});
|
||||
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){
|
||||
authorsList.append(' + ' + anonymousAuthorString);
|
||||
} else {
|
||||
|
|
|
@ -78,6 +78,16 @@ var padeditor = (function()
|
|||
|
||||
html10n.bind('localized', function() {
|
||||
$("#languagemenu").val(html10n.getLanguage());
|
||||
// translate the value of 'unnamed' and 'Enter your name' textboxes in the userlist
|
||||
// this does not interfere with html10n's normal value-setting because html10n just ingores <input>s
|
||||
// also, a value which has been set by the user will be not overwritten since a user-edited <input>
|
||||
// does *not* have the editempty-class
|
||||
$('input[data-l10n-id]').each(function(key, input)
|
||||
{
|
||||
input = $(input);
|
||||
if(input.hasClass("editempty"))
|
||||
input.val(html10n.get(input.attr("data-l10n-id")));
|
||||
});
|
||||
})
|
||||
$("#languagemenu").val(html10n.getLanguage());
|
||||
$("#languagemenu").change(function() {
|
||||
|
|
|
@ -118,7 +118,7 @@ var paduserlist = (function()
|
|||
}
|
||||
else
|
||||
{
|
||||
nameHtml = '<input type="text" class="editempty newinput" value="'+_('pad.userlist.unnamed')+'" ' + (isNameEditable(data) ? '' : 'disabled="disabled" ') + '/>';
|
||||
nameHtml = '<input data-l10n-id="pad.userlist.unnamed" type="text" class="editempty newinput" value="'+_('pad.userlist.unnamed')+'" ' + (isNameEditable(data) ? '' : 'disabled="disabled" ') + '/>';
|
||||
}
|
||||
|
||||
return ['<td style="height:', height, 'px" class="usertdswatch"><div class="swatch" style="background:' + data.color + '"> </div></td>', '<td style="height:', height, 'px" class="usertdname">', nameHtml, '</td>', '<td style="height:', height, 'px" class="activity">', padutils.escapeHtml(data.activity), '</td>'].join('');
|
||||
|
@ -710,8 +710,7 @@ var paduserlist = (function()
|
|||
{
|
||||
if (myUserInfo.name)
|
||||
{
|
||||
$("#myusernameedit").removeClass("editempty").val(
|
||||
myUserInfo.name);
|
||||
$("#myusernameedit").removeClass("editempty").val(myUserInfo.name);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -163,7 +163,7 @@
|
|||
<span id="mycolorpickerpreview" class="myswatchboxhoverable"></span>
|
||||
</div>
|
||||
<div id="myswatchbox"><div id="myswatch"></div></div>
|
||||
<div id="myusernameform"><input type="text" id="myusernameedit" disabled="disabled"></div>
|
||||
<div id="myusernameform"><input type="text" id="myusernameedit" disabled="disabled" data-l10n-id="pad.userlist.entername"></div>
|
||||
<div id="mystatusform"><input type="text" id="mystatusedit" disabled="disabled"></div>
|
||||
</div>
|
||||
<div id="otherusers">
|
||||
|
|
Loading…
Reference in New Issue