User:Roboture/common.js

/** * Suppose we have a message key "user-welcome" with value * "Hello $1. Welcome to $2. Last visit by $1: $3". */ // Get instance of Message var welcome = mw.message( 'user-welcome', 'Krinkle', 'Wikipedia', 'now' ); // Get it as a plain string (other formats are 'text', 'parse', and 'escaped') welcome.format = 'plain'; welcome.toString; // Shortcut for the above welcome.plain; // Returns: "Hello Krinkle. Welcome to Wikipedia. Last visit by Krinkle: now"