Revision 50143 of "Usuari:Helder.wiki/common.js" on cawikisource

/*jslint browser: true, regexp:true, white: true */
/*global mw */
// [[Special:GlobalUsage/User:Helder.wiki/common.js]] ([[File:User:Helder.wiki/common.js]])
mw.loader.load( '//pt.wikibooks.org/w/index.php?title=User:Helder.wiki/common.js&action=raw&ctype=text/javascript&smaxage=21600&maxage=86400' );

// Keep the line below. It is used to check the global usage of the script at [[Special:GlobalUsage/User:Helder.wiki/Scripts/LanguageConverter.js]]
// [[File:User:Helder.wiki/Scripts/LanguageConverter.js]]
if ( window.LanguageConverter === undefined ) {
	window.LanguageConverter = {};
}
// Define as configurações específicas para o ca.Wikisource
window.LanguageConverter.config = {
	msg: {
		error_missing_dict	 : 'The following dictionary was not found:\n',
		error_word_processing	 : 'Error has occurred while processing the following word:\n',
		error_typo_processing	 : 'Error has occurred while processing the following typographic change:\n',
		help_page_link		 : 'Open help page',
		show_changes_link	 : 'Show changes',
		hide_changes_link	 : 'Hide changes',
		menu_title		 : 'Variants'
	},
	/**
	 * Characters are used in "words"
	 */
	word_chars	 : 'a-zA-ZçàéèíïóòüúÇÀÉÈÍÓÒÜÚ',

	/**
	 * Typographic conversion (applied before dictionary conversion)
	 */
	typo_changes	 : {
		'ca-new': [
			[ 'ſ', 's' ],
			[ 'ff', 'f' ]
		]
	},

	/**
	 * Names of each language and/or variant to which conversion is enabled in the current wiki
	 */
	variants_list	 : {
		'ca':'Original text', //Default
		'ca-new':'Modernized text'
	},

	/**
	 * List of namespaces where conversion is enabled.
	 * The exact behavior depends on 'selection_mode' and
	 * the presence of an element whose id attribute is the value of 'local_dic_id'
	 */
	ns_list		 : {
		'0': true, //Main
		'2': true, //User
		'4': true, //Project
		'102': true //Page
		//Add "," after the items, except the last one
	},

	/**
	 * Id used in template or wikitext to enable conversion to some variant
	 */
	local_dic_id	 : 'modernization',

	/**
	 * Class used in template or wikitext to disable conversion of the content inside of an HTML element
	 */
	no_conversion_class : 'no-conversion',

	/**
	 * Page of current wiki where the dictionaries for each variant should be defined
	 */
	global_dic_page	 : {
		//'ca':'Viquitexts:Diccionari',
		'ca-new':'Viquitexts:Diccionari'
	},

	/**
	 * Help page about the conversion system, for each wiki
	 */
	help_page	 : 'Project:Language Converter',

	/**
	 * Enables the addition of a span around each converted expression (for dictionary, not typographic conversion)
	 */
	show_changes	 : false,

	/**
	 * Enables the exibition of the text of selected item in the menu title
	 */
	show_menu_title	 : true,

	/**
	 * Defines how to select pages where the conversion is enabled
	 */
	selection_mode	 : 'OR',

	/**
	 * How many words in sequence can be converted as a "phrase"
	 */
	max_seq		 : 3
}; //config
mw.loader.load( '//wikisource.org/w/index.php?title=User:Helder.wiki/Scripts/LanguageConverter.js&action=raw&ctype=text/javascript' );