Loncat ke isi

MediaWiki:Gadget-HotCat.js/local defaults

Deri Wikipédi, ènsiklopédi perdèo

//<syntaxhighlight="javascript"> if (typeof (HotCat) != 'undefined') {

 HotCat.messages.cat_removed   = 'Ngapusin Bangsaan:$1';
 HotCat.messages.template_removed  = 'Ngapusin {{Bangsaan:$1}}';
 HotCat.messages.cat_added     = 'Nambahin Bangsaan:$1';
 HotCat.messages.cat_keychange = 'Konci baru bakal Bangsaan:$1: ';
 HotCat.messages.cat_notFound = 'Bangsaan "$1" kaga' ketemu';
 HotCat.messages.cat_exists   = 'Bangsaan "$1" udah ada; kaga' ditambahin.';
 HotCat.messages.cat_resolved  = ' (ngalihin Bangsaan:$1)';
 HotCat.messages.uncat_removed = 'Ngapusin {{uncategorized}}';
 HotCat.messages.using         = ' maké HotCat';
 HotCat.messages.multi_change  = '$1 Bangsaan';
 HotCat.messages.commit       = 'Simpen';
 HotCat.messages.ok           = 'OK';
 HotCat.messages.cancel       = 'Batal';
 HotCat.messages.multi_error  = 'Tidak bisa menghubungi peladen. Perubahan kategori Anda tidak dapat disimpan. '
                               +'Mohon maaf atas ketidaknyamanan ini.';
 HotCat.category_regexp     = '[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]|[Kk][Aa][Tt][Ee][Gg][Oo][Rr][Ii]';
 HotCat.category_canonical  = 'Bangsaan';
 HotCat.categories  = 'Bangsaan';
 HotCat.disambig_category   = null;
 HotCat.redir_category      = null;
 HotCat.uncat_regexp        = null;
 HotCat.template_regexp     = '[Tt][Ee][Mm][Pp][Ll][Aa][Tt][Ee]|[Tt][Ee][Mm][Pp][Ll][Aa][Tt]';
 HotCat.template_categories = {};
 HotCat.engine_names.searchindex = 'Indeks pencarian';
 HotCat.engine_names.pagelist    = 'Daftar halaman';
 HotCat.engine_names.combined    = 'Pencarian gabungan';
 HotCat.engine_names.subcat      = 'Subkategori';
 HotCat.engine_names.parentcat   = 'Superkategori';
 HotCat.tooltips.change  = 'Ubah';
 HotCat.tooltips.remove  = 'Hapus';
 HotCat.tooltips.add     = 'Tambahkan kategori baru';
 HotCat.tooltips.restore = 'Batalkan perubahan';
 HotCat.tooltips.undo    = 'Batalkan perubahan';
 HotCat.tooltips.down    = 'Klik untuk mengubah dan menampilkan subkategori';
 HotCat.tooltips.up      = 'Klik untuk mengubah dan menampilkan superkategori';
 HotCat.multi_tooltip = 'Mengganti beberapa kategori';
 //Blacklisted categories cannot be added through HotCat.
 HotCat.blacklist = /\b[Tt]embéan?$|\b[Hh]alaman pengalihan/;
 // Clicks on (-) will always go through the diff screen
 // HotCat.del_needs_diff = true; 
 // Non-confirmed users will always go through the diff screen.
 HotCat.no_autocommit = (function (default_setting) {
   if ((mw.config.get('wgUserGroups').join(' ') + ' ').indexOf('confirmed ') < 0) return true;
   return default_setting;
 })(HotCat.no_autocommit);
 // Disable for non-logged-in users
 HotCat.disable = (function (default_disable) {
   return function () {
     if (!mw.config.get('wgUserName')) return true;
     return default_disable();
   };
 })(HotCat.disable);
// improve visual distinction between positive- and negative-indicator icons
 HotCat.existsNo = '//upload.wikimedia.org/wikipedia/commons/thumb/4/4c/P_no_red.svg/20px-P_no_red.svg.png';
 
// make HotCat auto-save always, even if multiple categories are changed
 mw.loader.using("mediawiki.user", function () {
   $('body').on( 'submit', '#hotcatCommitForm', function () {
    // The variable "this" refers to the form. Its fields can be accessed directly, e.g.
    // this.wpTextbox1 gives you the textarea containing the page text of the edit.
   var submitType = this.wpDiff;
     if (submitType && (!this.oldid || this.oldid.value == '0')) {
     // Switch form submission from diff to save. Don't do this if "oldid" is set to anything but '0':
     // that indicates an edit conflict with yourself, and in that case you really, really do want
     // to see the diff!
     this.wpEditToken.value = mw.user.tokens.get("csrfToken");
     submitType.name = submitType.value = 'wpSave';
   }
     return true;
 });

}); } //</<syntaxhighlight>