js i18n: misc fixes; quick-reply.js i18n
Conflicts: tools/i18n_compile.php
This commit is contained in:
parent
701cf42eef
commit
61a305a1a2
@ -17,7 +17,7 @@ $(document).ready(function(){
|
|||||||
return; // not index
|
return; // not index
|
||||||
|
|
||||||
txt_new_topic = $('form[name=post] input[type=submit]').val();
|
txt_new_topic = $('form[name=post] input[type=submit]').val();
|
||||||
txt_new_reply = txt_new_topic == 'Submit' ? txt_new_topic : new_reply_string;
|
txt_new_reply = txt_new_topic == _('Submit') ? txt_new_topic : new_reply_string;
|
||||||
|
|
||||||
undo_quick_reply = function() {
|
undo_quick_reply = function() {
|
||||||
$('div.banner').remove();
|
$('div.banner').remove();
|
||||||
@ -27,9 +27,9 @@ $(document).ready(function(){
|
|||||||
|
|
||||||
$('div.post.op').each(function() {
|
$('div.post.op').each(function() {
|
||||||
var id = $(this).children('p.intro').children('a.post_no:eq(1)').text();
|
var id = $(this).children('p.intro').children('a.post_no:eq(1)').text();
|
||||||
$('<a href="?/b/res/69.html">[Quick reply]</a>').insertAfter($(this).children('p.intro').children('a:last')).click(function() {
|
$('<a href="#">['+_("Quick reply")+']</a>').insertAfter($(this).children('p.intro').children('a:last')).click(function() {
|
||||||
$('div.banner').remove();
|
$('div.banner').remove();
|
||||||
$('<div class="banner">Posting mode: Replying to <small>>>' + id + '</small> <a class="unimportant" onclick="undo_quick_reply()" href="javascript:void(0)">[Return]</a></div>')
|
$('<div class="banner">'+fmt(_("Posting mode: Replying to <small>>>{0}</small>"), [id])+' <a class="unimportant" onclick="undo_quick_reply()" href="javascript:void(0)">['+_("Return")+']</a></div>')
|
||||||
.insertBefore('form[name=post]');
|
.insertBefore('form[name=post]');
|
||||||
$('form[name=post] input[type=submit]').val(txt_new_reply);
|
$('form[name=post] input[type=submit]').val(txt_new_reply);
|
||||||
|
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
|
|
||||||
/* gettext-compatible _ function, example of usage:
|
/* gettext-compatible _ function, example of usage:
|
||||||
*
|
*
|
||||||
* > // Loading pl_PL.json here (containing polish translation strings generated by tools/locale_compile.php)
|
* > // Loading pl_PL.json here (containing polish translation strings generated by tools/i18n_compile.php)
|
||||||
* > alert(_("Hello!"));
|
* > alert(_("Hello!"));
|
||||||
* Witaj!
|
* Witaj!
|
||||||
*/
|
*/
|
||||||
function _(s) {
|
function _(s) {
|
||||||
return (typeof tb_l10n != 'undefined' && typeof tb_l10n[s] != 'undefined') ? tb_l10n[s] : s;
|
return (typeof l10n != 'undefined' && typeof l10n[s] != 'undefined') ? l10n[s] : s;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* printf-like formatting function, example of usage:
|
/* printf-like formatting function, example of usage:
|
||||||
|
Loading…
Reference in New Issue
Block a user