mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-23 23:20:57 +01:00
Add some missing i18n tags
This commit is contained in:
parent
5267098cb8
commit
cac428b30c
@ -13,7 +13,7 @@ if (active_page == 'thread' || active_page == 'index') {
|
||||
var self = {};
|
||||
self.rules = {
|
||||
spoiler: {
|
||||
text: 'Spoiler',
|
||||
text: _('Spoiler'),
|
||||
key: 's',
|
||||
multiline: false,
|
||||
exclusiveline: false,
|
||||
@ -21,7 +21,7 @@ if (active_page == 'thread' || active_page == 'index') {
|
||||
suffix:'**'
|
||||
},
|
||||
italics: {
|
||||
text: 'Italics',
|
||||
text: _('Italics'),
|
||||
key: 'i',
|
||||
multiline: false,
|
||||
exclusiveline: false,
|
||||
@ -29,7 +29,7 @@ if (active_page == 'thread' || active_page == 'index') {
|
||||
suffix: "''"
|
||||
},
|
||||
bold: {
|
||||
text: 'Bold',
|
||||
text: _('Bold'),
|
||||
key: 'b',
|
||||
multiline: false,
|
||||
exclusiveline: false,
|
||||
@ -37,7 +37,7 @@ if (active_page == 'thread' || active_page == 'index') {
|
||||
suffix: "'''"
|
||||
},
|
||||
underline: {
|
||||
text: 'Underline',
|
||||
text: _('Underline'),
|
||||
key: 'u',
|
||||
multiline: false,
|
||||
exclusiveline: false,
|
||||
@ -45,7 +45,7 @@ if (active_page == 'thread' || active_page == 'index') {
|
||||
suffix:'__'
|
||||
},
|
||||
code: {
|
||||
text: 'Code',
|
||||
text: _('Code'),
|
||||
key: 'f',
|
||||
multiline: true,
|
||||
exclusiveline: false,
|
||||
@ -53,7 +53,7 @@ if (active_page == 'thread' || active_page == 'index') {
|
||||
suffix: '[/code]'
|
||||
},
|
||||
strike: {
|
||||
text: 'Strike',
|
||||
text: _('Strike'),
|
||||
key: 'd',
|
||||
multiline:false,
|
||||
exclusiveline:false,
|
||||
@ -61,7 +61,7 @@ if (active_page == 'thread' || active_page == 'index') {
|
||||
suffix:'~~'
|
||||
},
|
||||
heading: {
|
||||
text: 'Heading',
|
||||
text: _('Heading'),
|
||||
key: 'r',
|
||||
multiline:false,
|
||||
exclusiveline:true,
|
||||
@ -271,7 +271,7 @@ if (active_page == 'thread' || active_page == 'index') {
|
||||
|
||||
// add the tab for customizing the format settings
|
||||
if (window.Options && !Options.get_tab('formatting')) {
|
||||
Options.add_tab('formatting', 'angle-right', 'Customize Formatting');
|
||||
Options.add_tab('formatting', 'angle-right', _('Customize Formatting'));
|
||||
Options.extend_tab('formatting', '\
|
||||
<style>\
|
||||
.format_option{\
|
||||
@ -295,10 +295,10 @@ if (active_page == 'thread' || active_page == 'index') {
|
||||
|
||||
// Data control row
|
||||
Options.extend_tab('formatting', '\
|
||||
<button onclick="formatText.add_rule();">Add Rule</button>\
|
||||
<button onclick="formatText.save_rules();">Save Rules</button>\
|
||||
<button onclick="formatText.reset_rules(false);">Revert</button>\
|
||||
<button onclick="formatText.reset_rules(true);">Reset to Default</button>\
|
||||
<button onclick="formatText.add_rule();">'+_('Add Rule')+'</button>\
|
||||
<button onclick="formatText.save_rules();">'+_('Save Rules')+'</button>\
|
||||
<button onclick="formatText.reset_rules(false);">'+_('Revert')+'</button>\
|
||||
<button onclick="formatText.reset_rules(true);">'+_('Reset to Default')+'</button>\
|
||||
');
|
||||
|
||||
// Descriptor row
|
||||
|
@ -12,8 +12,8 @@ if (active_page == 'thread' || active_page == 'index') {
|
||||
$(document).ready(function(){
|
||||
|
||||
if ($('.delete #password').length) {
|
||||
Menu.add_item("delete_post_menu", "Delete post");
|
||||
Menu.add_item("delete_file_menu", "Delete file");
|
||||
Menu.add_item("delete_post_menu", _("Delete post"));
|
||||
Menu.add_item("delete_file_menu", _("Delete file"));
|
||||
Menu.onclick(function(e, $buf) {
|
||||
var ele = e.target.parentElement.parentElement;
|
||||
var $ele = $(ele);
|
||||
@ -34,8 +34,8 @@ if ($('.delete #password').length) {
|
||||
});
|
||||
}
|
||||
|
||||
Menu.add_item("report_menu", "Report");
|
||||
Menu.add_item("global_report_menu", "Global report");
|
||||
Menu.add_item("report_menu", _("Report"));
|
||||
Menu.add_item("global_report_menu", _("Global report"));
|
||||
Menu.onclick(function(e, $buf) {
|
||||
var ele = e.target.parentElement.parentElement;
|
||||
var $ele = $(ele);
|
||||
|
@ -123,8 +123,8 @@ $(document).ready(function() {
|
||||
$clone.insertAfter(link.node)
|
||||
}
|
||||
|
||||
App.options.add('useInlining', 'Enable inlining')
|
||||
App.options.add('hidePost', 'Hide inlined backlinked posts')
|
||||
App.options.add('useInlining', _('Enable inlining'))
|
||||
App.options.add('hidePost', _('Hide inlined backlinked posts'))
|
||||
|
||||
$('head').append(
|
||||
'<style>' +
|
||||
|
@ -202,20 +202,20 @@ if (active_page === 'thread' || active_page === 'index' || active_page === 'cata
|
||||
function initPostMenu(pageData) {
|
||||
|
||||
var submenu;
|
||||
Menu.add_item('filter-menu-hide', 'Hide post');
|
||||
Menu.add_item('filter-menu-unhide', 'Unhide post');
|
||||
Menu.add_item('filter-menu-hide', _('Hide post'));
|
||||
Menu.add_item('filter-menu-unhide', _('Unhide post'));
|
||||
|
||||
submenu = Menu.add_submenu('filter-menu-add', 'Add filter');
|
||||
submenu.add_item('filter-add-post-plus', 'Post +', 'Hide post and all replies');
|
||||
submenu.add_item('filter-add-id', 'ID');
|
||||
submenu.add_item('filter-add-id-plus', 'ID +', 'Hide ID and all replies');
|
||||
submenu.add_item('filter-add-name', 'Name');
|
||||
submenu.add_item('filter-add-trip', 'Tripcode');
|
||||
submenu = Menu.add_submenu('filter-menu-add', _('Add filter'));
|
||||
submenu.add_item('filter-add-post-plus', _('Post +'), _('Hide post and all replies'));
|
||||
submenu.add_item('filter-add-id', _('ID'));
|
||||
submenu.add_item('filter-add-id-plus', _('ID +'), _('Hide ID and all replies'));
|
||||
submenu.add_item('filter-add-name', _('Name'));
|
||||
submenu.add_item('filter-add-trip', _('Tripcode'));
|
||||
|
||||
submenu = Menu.add_submenu('filter-menu-remove', 'Remove filter');
|
||||
submenu.add_item('filter-remove-id', 'ID');
|
||||
submenu.add_item('filter-remove-name', 'Name');
|
||||
submenu.add_item('filter-remove-trip', 'Tripcode');
|
||||
submenu = Menu.add_submenu('filter-menu-remove', _('Remove filter'));
|
||||
submenu.add_item('filter-remove-id', _('ID'));
|
||||
submenu.add_item('filter-remove-name', _('Name'));
|
||||
submenu.add_item('filter-remove-trip', _('Tripcode'));
|
||||
|
||||
Menu.onclick(function (e, $buffer) {
|
||||
var ele = e.target.parentElement.parentElement;
|
||||
@ -644,22 +644,22 @@ if (active_page === 'thread' || active_page === 'index' || active_page === 'cata
|
||||
|
||||
function initOptionsPanel() {
|
||||
if (window.Options && !Options.get_tab('filter')) {
|
||||
Options.add_tab('filter', 'list', 'Filters');
|
||||
Options.add_tab('filter', 'list', _('Filters'));
|
||||
Options.extend_tab('filter',
|
||||
'<div id="filter-control">' +
|
||||
'<select>' +
|
||||
'<option value="name">Name</option>' +
|
||||
'<option value="trip">Tripcode</option>' +
|
||||
'<option value="sub">Subject</option>' +
|
||||
'<option value="com">Comment</option>' +
|
||||
'<option value="name">'+_('Name')+'</option>' +
|
||||
'<option value="trip">'+_('Tripcode')+'</option>' +
|
||||
'<option value="sub">'+_('Subject')+'</option>' +
|
||||
'<option value="com">'+_('Comment')+'</option>' +
|
||||
'</select>' +
|
||||
'<input type="text">' +
|
||||
'<input type="checkbox">' +
|
||||
'regex ' +
|
||||
'<button id="set-filter">Add</button>' +
|
||||
'<button id="clear">Clear all filters</button>' +
|
||||
'<button id="set-filter">'+_('Add')+'</button>' +
|
||||
'<button id="clear">'+_('Clear all filters')+'</button>' +
|
||||
'<div id="confirm" class="hidden">' +
|
||||
'This will clear all filtering rules including hidden posts. <a id="confirm-y" href="#">yes</a> | <a id="confirm-n" href="#">no</a>' +
|
||||
_('This will clear all filtering rules including hidden posts.')+' <a id="confirm-y" href="#">'+_('yes')+'</a> | <a id="confirm-n" href="#">'+_('no')+'</a>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'<div id="filter-container"><table id="filter-list"></table></div>'
|
||||
|
@ -29,7 +29,7 @@ watchlist.render = function(reset) {
|
||||
//look at line 69, that's what (e) is here.
|
||||
threads.push('<div class="watchlist-inner" id="watchlist-'+i+'">' +
|
||||
'<span>/'+e[0]+'/ - ' +
|
||||
'<a href="'+e[3]+'">'+e[1].replace("thread_", "Thread #")+'</a>' +
|
||||
'<a href="'+e[3]+'">'+e[1].replace("thread_", _("Thread #"))+'</a>' +
|
||||
' ('+e[2]+') </span>' +
|
||||
'<a class="watchlist-remove">X</a>'+
|
||||
'</div>');
|
||||
@ -44,8 +44,8 @@ watchlist.render = function(reset) {
|
||||
$('form[name="post"]').before(
|
||||
$('<div id="watchlist">'+
|
||||
'<div class="watchlist-controls">'+
|
||||
'<span><a id="clearList">[Clear List]</a></span> '+
|
||||
'<span><a id="clearGhosts">[Clear Ghosts]</a></span>'+
|
||||
'<span><a id="clearList">['+_('Clear List')+']</a></span> '+
|
||||
'<span><a id="clearGhosts">['+_('Clear Ghosts')+']</a></span>'+
|
||||
'</div>'+
|
||||
threads.join('')+
|
||||
'</div>').css("background-color", menuStyle.backgroundColor).css("border", menuStyle.borderBottomWidth+" "+menuStyle.borderBottomStyle+" "+menuStyle.borderBottomColor));
|
||||
@ -80,7 +80,7 @@ watchlist.add = function(sel) {
|
||||
postCount = $(sel).parents('.op').siblings('.post').length+1;
|
||||
}
|
||||
//Grab the reply link.
|
||||
var threadLink = $(sel).siblings('a:contains("[Reply]")').attr('href');
|
||||
var threadLink = $(sel).siblings('a:contains("['+_('Reply')+']")').attr('href');
|
||||
//Figure out the thread name. If anon, use the thread id.
|
||||
if ($(sel).parent().find('.subject').length) {
|
||||
threadName = $(sel).parent().find('.subject').text().substring(0,20);
|
||||
@ -147,9 +147,9 @@ $(document).ready(function(){
|
||||
}
|
||||
|
||||
//Append the watchlist toggle button.
|
||||
$('.boardlist').append('<span>[ <a class="watchlist-toggle" href="#">watchlist</a> ]</span>');
|
||||
$('.boardlist').append('<span>[ <a class="watchlist-toggle" href="#">'+_('watchlist')+'</a> ]</span>');
|
||||
//Append a watch thread button after every OP.
|
||||
$('.op>.intro').append('<a class="watchThread" href="#">[Watch Thread]</a>');
|
||||
$('.op>.intro').append('<a class="watchThread" href="#">['+_('Watch Thread')+']</a>');
|
||||
|
||||
//Draw the watchlist, hidden.
|
||||
watchlist.render();
|
||||
|
Loading…
Reference in New Issue
Block a user