Utilisateur:Midas02/DisamAssist.js

Une page de Wikipédia, l'encyclopédie libre.
Note : après avoir enregistré la page, vous devrez forcer le rechargement complet du cache de votre navigateur pour voir les changements.

Mozilla / Firefox / Konqueror / Safari : maintenez la touche Majuscule (Shift) en cliquant sur le bouton Actualiser (Reload) ou pressez Maj-Ctrl-R (Cmd-R sur Apple Mac) ;

Chrome / Internet Explorer / Opera : maintenez la touche Ctrl en cliquant sur le bouton Actualiser ou pressez Ctrl-F5.
//<source lang="javascript">
//Code d'origine par Qwertyytrewqqwerty à [[:en:User:Qwertyytrewqqwerty/DisamAssist.js]]
//Adaptation pour le Wikipédia français par Midas02 - Août 2015

window.DisamAssist = jQuery.extend( true, {
	cfg: {
		/*
		 * Categories where disambiguation pages are added (usually by a template like {{Disambiguation}}
		 */
		disamCategories: ['Homonymie'],
		
		/*
		 * "Canonical names" of the templates that may appear after ambiguous links
		 * and which should be removed when fixing those links
		 */
		disamLinkTemplates: [
			'Lequel',
			'Lien vers un homonyme',
			'Dn'
		],
		
		/*
		 * "Canonical names" of the templates that designate intentional links to
		 * disambiguation pages
		 */
		disamLinkIgnoreTemplates: [], // 'Voir homonymes', 'Page h', 'Page h\''

		
		/*
		 * Format string for "Foo (disambiguation)"-style pages
		 */
		 disamFormat: '$1 (homonymie)',
		
		/*
		 * Regular expression matching the titles of disambiguation pages (when they are different from
		 * the titles of the primary topics)
		 */
		disamRegExp: '^(.*) \\(homonymie\\)$',
		
		/*
		 * Text that will be inserted after the link if the user requests help. If the value is null,
		 * the option to request help won't be offered
		 */
		disamNeededText: '{{Lequel|date={{subst:CURRENTMONTHNAME}} {{subst:CURRENTYEAR}}}}',
		
		/*
		 * Content of the "Foo (disambiguation)" pages that will be created automatically when using
		 * DisamAssist from a "Foo" page
		 */
		redirectToDisam: null, // #REDIRECT [[$1]] {{R to disambiguation page}}
		
		/*
		 * Whether intentional links to disambiguation pages can be explicitly marked by adding " (disambiguation)"
		 */
		intentionalLinkOption: false,
		
		/*
		 * Namespaces that will be searched for incoming links to the disambiguation page (pages in other
		 * namespaces will be ignored)
		 */
		targetNamespaces: [0, 6, 10, 14, 100, 104], // 104 = Référence - utile?
		
		/*
		 * Number of backlinks that will be downloaded at once
		 * When using blredirect, the maximum limit is supposedly halved
		 * (see http://www.mediawiki.org/wiki/API:Backlinks)
		 */
		backlinkLimit: 250,
		
		/*
		 * Number of titles we can query for at once
		 */
		queryTitleLimit: 50,
	
		/*
		 * Number of characters before and after the incoming link that will be displayed
		 */
		radius: 200,
	
		/*
		 * Height of the context box, in lines
		 */
		numContextLines: 4,
	
		/*
		 * Number of pages that will be stored before saving, so that changes to them can be
		 * undone if need be
		 */
		historySize: 2,
		
		/*
		 * Minimum time in seconds since the last change was saved before a new edit can be made. A
		 * negative value or 0 disables the cooldown. Users with the "bot" right won't be affected by
		 * the cooldown
		 */
		editCooldown: 12,
		
		/*
		 * Specify how the watchlist is affected by DisamAssist edits. Possible values: "watch", "unwatch",
		 * "preferences", "nochange"
		 */
		watch: 'nochange'
	},

	txt: {
		start: 'Désambiguïser liens',
		startMain: 'Désambiguïser liens vers article principal',
		startSame: 'Désambiguïser liens vers page d\'homonymie',
		close: 'Fermer',
		undo: 'Revenir en arrière',
		omit: 'Ignorer',
		refresh: 'Rafraîchir',
		titleAsText: 'Autre lien',
		disamNeeded: 'Marquer {{lequel}}',
		intentionalLink: 'Lien intentionnel vers page d\'homonymie',
		titleAsTextPrompt: 'Introduire le nouveau lien:',
		removeLink: 'Supprimer lien',
		optionMarker: ' [Ce lien-ci]',
		targetOptionMarker: ' [Lien actuel]',
		redirectOptionMarker: ' [Lien actuel (à travers une redirection)]',
		pageTitleLine: 'In <a href="$1">$2</a>:',
		noMoreLinks: 'Plus de liens à désambiguïser.',
		pendingEditCounter: 'Enregistrant: $1; en mémoire: $2',
		pendingEditBox: 'DisamAssist en train d\'enregistrer les modifications ($1).',
		pendingEditBoxTimeEstimation: '$1; temps approximatif restant: $2',
		pendingEditBoxLimited: 'Merci de ne pas fermer l\'onglet tant que les changements n\'ont pas été enregistrés.'
			+ 'Vous pouvez continuer à éditer Wikipédia dans un autre onglet.',
		error: 'Erreur: $1',
		fetchRedirectsError: 'Erreur de chargement des redirections: "$1".',
		getBacklinksError: 'Erreur de chargements des liens entrants: "$1".',
		fetchRightsError: 'Erreur de chargement des droits d\'utilisateur: "$1",',
		loadPageError: 'Erreur de chargement de page $1: "$2".',
		savePageError: 'Erreur de sauvegarde des changements à $1: "$2".',
		dismissError: 'Fermer',
		pending: 'Tous les changements n\'ont pas été enregistrés. Merci d\'appuyer sur Fermer',
		editInProgress: 'DisamAssist est en train d\'enregistrer les changements. Si vous fermez l\'onglet maintenant, ils peuvent se perdre.',
		ellipsis: '...',
		notifyCharacter: '✔',
		summary: 'Désambiguïsation de lien vers [[$1]] ($2) avec [[Utilisateur:Midas02/DisamAssist|DisamAssist]].',
		summaryChanged: 'lien changé en [[$1]]',
		summaryOmitted: 'lien ignoré',
		summaryRemoved: 'lien supprimé',
		summaryIntentional: 'lien intentionnel vers page d\'homonymie',
		summaryHelpNeeded: 'besoin d\'aide',
		summarySeparator: '; ',
		redirectSummary: 'Creation de redirection à [[$1]] avec [[Utilisateur:Midas02/DisamAssist|DisamAssist]].'
	}
}, window.DisamAssist || {} );

mw.loader.load( '//es.wikipedia.org/w/index.php?title=Usuario:Qwertyytrewqqwerty/DisamAssist-core.js&action=raw&ctype=text/javascript' );
mw.loader.load( '//es.wikipedia.org/w/index.php?title=Usuario:Qwertyytrewqqwerty/DisamAssist.css&action=raw&ctype=text/css', 'text/css' );

//</source>