MediaWiki:CodeLoad.js/localisation.js

/*jslint browser */ /*global jQuery, mediaWiki */

(function ($, mw) {   'use strict';

var msg = { en: { 'codeload-clear-cache': 'Clear cached preferences', 'codeload-clear-cache-success': 'Your cached preferences have been cleared.', 'codeload-edit-summary': 'updating user preferences (script edit)', 'codeload-entry': '$1: $2', 'codeload-group-other': 'Other', 'codeload-heading': 'CodeLoad preferences', 'codeload-intro': 'Below is a list of special gadgets you can enable for your account. Note that these gadgets will have no effect on this preferences page. Preferences set here are saved to your prefs page.', 'codeload-no-definitions': 'CodeLoad definitions have not yet been configured.', 'codeload-reset': 'Reset to default', 'codeload-reset-tooltip': 'Reset all preferences to their defaults.', 'codeload-save': 'Save', 'codeload-save-fail': 'Your preferences failed to save.', 'codeload-save-success': 'Your preferences have been saved.', 'codeload-save-tooltip': 'Save these preferences to your prefs page.', 'codeload-use': 'Use', 'codeload-use-tooltip': 'Use these preferences without saving them to your prefs page. This can be useful if you wish to use a script for a short time only.', 'codeload-userprefspage': 'This page contains your CodeLoad gadget preferences. To change your preferences, you can edit this page directly, or you can use the preferences panel.' }   };

function main { // use user language, with English as fallback msg = $.extend(msg.en, msg[mw.config.get('wgUserLanguage')]);

// manually add link to userprefspage message // mw.messages doesn't support links w/ querystrings, else we would use that… msg['codeload-userprefspage'] = msg['codeload-userprefspage'].replace(           /\[\[([^\|]*)\|([^\]]*)\]\]/,            '$2'        );

mw.messages.set(msg); }

main;

}(jQuery, mediaWiki));