MediaWiki:Gadget-QuickDelete.js: differenze tra le versioni

Contenuto cancellato Contenuto aggiunto
Nuovo tool
 
Nessun oggetto della modifica
Riga 11:
 
// ==Automatic 'nominate for deletion', 'mark no license', 'mark no permission', 'mark no source' scripts==
/* <source lang="javascript"><nowiki> */
// <pre>
// Configuration
 
Riga 19:
 
// String constants
nfd_text = "NominateCancella for deletionsubito";
nfd_tooltip = "NominateAggiungi thisil image\"Cancella for deletionsubito\"";
nfd_prompt = "WhyQual doè youil wantmotivo todella nominate this image for deletioncancellazione?";
nfd_delReq = "Commons:Deletion_requests"; //TODO: Al momento non viene usato. Aggiungere se avremo questa pagina in futuro
nfd_deleteTemplate = "deletecancella subito";
nfd_idwTemplate = "cancellazione"; //TODO: Al momento non viene usato. Aggiungere se avremo questa pagina in futuro
nfd_idwTemplate = "idw";
 
mns_text = "NoSenza sourcefonte";
if (wgUserLanguage != 'en')
mns_tooltip = "Segna questa immagine come mancante di informazioni sulla fonte";
{
mnl_text = "NoSenza licenselicenza";
includePage( 'MediaWiki:Quick-delete2.js/' + wgUserLanguage );
mnl_tooltip = "Segna questa immagine come mancante di informazioni sulla licenza";
}
mnp_text = "No permission"; //TODO: Al momento non viene usato. Aggiungere se avremo questa pagina in futuro
 
mnp_tooltip = "Mark this image as missing required permission information"; //TODO: Al momento non viene usato. Aggiungere se avremo questa pagina in futuro
mns_text = "No source";
mnx_lang = "lang?"; //TODO: Al momento non viene usato. Aggiungere se avremo questa pagina in futuro
mns_tooltip = "Mark this image as missing required source information";
mnx_langquery = "In which language should the message be given? "+ //TODO: Al momento non viene usato. Aggiungere se avremo questa pagina in futuro
mnl_text = "No license";
"Example: en for English, de for German, es for Spanish, etc. " + //TODO: Al momento non viene usato. Aggiungere se avremo questa pagina in futuro
mnl_tooltip = "Mark this image as missing required licensing information";
"If the language does not exist for the template, a red link will be inserted. "; //TODO: Al momento non viene usato. Aggiungere se avremo questa pagina in futuro
mnp_text = "No permission";
mnp_tooltip = "Mark this image as missing required permission information";
mnx_lang = "lang?";
mnx_langquery = "In which language should the message be given? "+
"Example: en for English, de for German, es for Spanish, etc. " +
"If the language does not exist for the template, a red link will be inserted. ";
 
 
Riga 49 ⟶ 44:
now.getUTCDate() < 10 ? timestamp += '0' + now.getUTCDate() : timestamp += now.getUTCDate();
nfd_datePage = nfd_delReq + "/" + timestamp;
var monthsArray = ["Januarygennaio", "Februaryfebbraio", "Marchmarzo", "Aprilaprile", "Maymaggio", "Junegiugno", "Julyluglio", "Augustagosto", "Septembersettembre", "Octoberottobre", "Novembernovembre", "Decemberdicembre"];
var timestamp2 = monthsArray[now.getUTCMonth()] + " " + now.getUTCDate();
 
Riga 118 ⟶ 113:
var el = document.getElementById('filehistory')
if (!el) {
alert("getUploader: CannotNon findè filehistorypossibile trovare la cronologia ... exitingesco");
return null;
}
Riga 127 ⟶ 122:
}
if (!el) {
alert("getUploader: CannotNon findè tablepossibile tagtrovare la tabella ... exitingesco");
return null;
}
Riga 142 ⟶ 137:
if (m) return m[1];
}
alert("getUploader: CannotNon findè uploaderpossibile trovare l'utente che ha caricato l'immagine ... exitingesco");
return null;
}
Riga 165 ⟶ 160:
function nfd_addDeleteTemplate() {
var reason = decodeURIComponent(getParamValue('reason'));
var txt = '{{' + nfd_deleteTemplate + '|reasonmotivo=' + reason + '}}';
document.editform.wpTextbox1.value = txt + '\n' + document.editform.wpTextbox1.value;
document.editform.wpSummary.value = 'NominatingProposta imageimmagine forper deletionla cancellazione';
if (nfd_autosave) document.editform.wpSave.click();
}
Riga 176 ⟶ 171:
(document.editform.wpTextbox1.value.length > 0 ? '\n' : '') +
txt + '~~' + '~~\n';
document.editform.wpSummary.value = 'ImageAvviso deletiondi warningcancellazione immagine: ' + target;
if (nfd_autosave) document.editform.wpSave.click();
}
 
function nfd_updateDelReq(target, reason) { //TODO: non usata
document.editform.wpTextbox1.value +=
(document.editform.wpTextbox1.value.length > 0 ? '\n' : '') +
Riga 188 ⟶ 183:
}
 
function nfd_updateDelReq2(target) { //TODO: non usata
document.editform.wpTextbox1.value +=
(document.editform.wpTextbox1.value.length > 0 ? '' : '==' + timestamp2 + '==\n') +
Riga 230 ⟶ 225:
function mnx_addTemplate(template, sorl) {
if (template == 'nsd') template='no source since';
if (template == 'nld') template='no licenseunverdata';
if (template == 'npd') template='no permission since';
//TODO: non usata
if (getParamValue('mnx_lang')) {
// if (getParamValue('mnx_lang')) {
// template = template + '/' + getParamValue('mnx_lang');
// template = template + '|' + 'month={{subst:CURRENTMONTHNAME}}|day={{subst:CURRENTDAY}}|year={{subst:CURRENTYEAR}}';
}
 
Riga 240 ⟶ 236:
var txt = '{{' + template + '}}';
document.editform.wpTextbox1.value = txt + '\n' + document.editform.wpTextbox1.value;
// document.editform.wpSummary.value = 'marking image as missing essential ' + sorl + ' information. If this is not fixed this image might be deleted after 7 days.';
document.editform.wpSummary.value = 'segno l\'immagine come unverified. Manca la licenza. Se non corretta entro 7 giorni verrà cancellata.';
if (mnx_autosave) document.editform.wpSave.click();
}
Riga 248 ⟶ 245:
// If template to add is a not permission template, add {{image permission}}
if (template_type == 'mnp_mnp')
var txt = '{{subst:image permissionAvvisoimmagine' + (getParamValue('mnx_lang') ? '/' + getParamValue('mnx_lang') : '' ) + '|' + imagetarget + '}}';
// else, add the {{image source}} template
else
var txt = '{{subst:image sourceAvvisoimmagine' + (getParamValue('mnx_lang') ? '/' + getParamValue('mnx_lang') : '' ) + '|' + imagetarget + '}}';
 
// add in subst: if you want to subst these warnings
document.editform.wpTextbox1.value += '\n' + txt + '~~' + '~~\n';
document.editform.wpSummary.value = "WarningAttenzione: imagecaricata missingimmagine sourcesenza or licensing informationlicenza.";
// this is the edit summary for when you leave the user warning on the talk page.
// you can change it if you want.
Riga 298 ⟶ 295:
/*else if (QuickDeleteLoadCount > 2) alert("Why do you have MediaWiki:Quick-delete.js loaded several times on your monobook.js??") //Silently ignore this */
 
// </prenowiki></source>