Usor:Phe/common.js
< Usor:Phe
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
// Keep the line below. It is used to check the global usage of the script at [[Special:GlobalUsage/User:He7d3r/Tools/LanguageConverter.js]]
// [[File:User:He7d3r/Tools/LanguageConverter.js]] (see [[bugzilla:33355]])
/*jslint browser: true, white: true */
/*global mw */
if (window.LanguageConverter === undefined) {
window.LanguageConverter = {};
}
window.LanguageConverter.config = {
msg: {
// FIXME: translate this.
error_missing_dict : 'Le dictionnaire suivant n’a pas été trouvé :\n',
error_missing_dict_name : 'Il est nécessaire de définir la page du dictionnaire pour ',
error_typo_processing : 'Une erreur est apparu pendant la transformation de la modification typographique suivante\n',
error_word_processing : 'Une erreur est apparu pendant la transformation de l’expression suivante :\n',
help_page_link : 'Page d’aide',
show_changes_link : 'Montrer les altérations',
hide_changes_link : 'Cacher les alérations'
},
word_chars : 'a-zçâàäāãéèêẽëîïôöōõûùüÿœæA-ZÀÂÄÉÈÊËÎÏÔÖÙÛÜŸÇŒÆ&ßẞĩq̃ĨQ̃',
typo_changes : {
'la-modern': [
[ /ſ/g, 's' ],
[ /ff/g, 'ff' ],
[ /fl/g, 'fl' ],
[ /fi/g, 'fi' ],
[ /ffi/g, 'ffi' ],
[ /ffl/g, 'ffl' ],
[ /ſt/g, 'st' ],
[ /st/g, 'st' ]
],
'la': [
[ /ſ/g, 's' ],
[ /ff/g, 'ff' ],
[ /fl/g, 'fl' ],
[ /fi/g, 'fi' ],
[ /ffi/g, 'ffi' ],
[ /ffl/g, 'ffl' ],
[ /ſt/g, 'st' ],
[ /st/g, 'st' ]
]
},
variants_list : {
// FIXME: translate this
'la':'Original orthograph',
'la-modern' : 'Modern orthograph'
},
ns_list : {
'0' : true, // Main
'2' : true, // User
'4' : true, // Wikisource
'14' : true, // Category
// FIXME; check if this namespace are ok for la:
'102' : true, // Author
'104' : true, // Page
'112' : true // Index
},
local_dic_id : {
'la' : 'modernisations-modern', // unused but needed
'la-modern' : 'modernisations'
},
no_conversion_class : 'no-conversion',
global_dic_page : {
'la-modern':'Vicifons:Dictionary'
},
help_page : 'template:Modernisation',
show_changes : false,
show_menu_title : true,
selection_mode: 'AND', // Set to OR so it'll work on all page, not only on page containing the class la-modern
max_seq : 3
};
// Define the css used to show change to a page.
mw.util.addCSS('.show-changes .v-la-modern { background-color: #AAFFAA; }');
var old_wgserver = '//wikisource.org';
mw.loader.load(old_wgserver + '/w/index.php?title=User:He7d3r/Tools/LanguageConverter.js&action=raw&ctype=text/javascript' );