mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-21 16:06:16 -04:00
Merge pull request #1407 from mluto/hardcoded-i18n
i10ze hardcoded message, update some messages on lang-change
This commit is contained in:
commit
51daaf02ce
5 changed files with 21 additions and 5 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,6 +78,16 @@ 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
|
||||||
|
// 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").val(html10n.getLanguage());
|
||||||
$("#languagemenu").change(function() {
|
$("#languagemenu").change(function() {
|
||||||
|
|
|
@ -118,7 +118,7 @@ var paduserlist = (function()
|
||||||
}
|
}
|
||||||
else
|
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('');
|
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)
|
if (myUserInfo.name)
|
||||||
{
|
{
|
||||||
$("#myusernameedit").removeClass("editempty").val(
|
$("#myusernameedit").removeClass("editempty").val(myUserInfo.name);
|
||||||
myUserInfo.name);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -163,7 +163,7 @@
|
||||||
<span id="mycolorpickerpreview" class="myswatchboxhoverable"></span>
|
<span id="mycolorpickerpreview" class="myswatchboxhoverable"></span>
|
||||||
</div>
|
</div>
|
||||||
<div id="myswatchbox"><div id="myswatch"></div></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 id="mystatusform"><input type="text" id="mystatusedit" disabled="disabled"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="otherusers">
|
<div id="otherusers">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue