3 * Get the message for the given block flag
8 getBlockFlagMessage: function ( flag ) {
10 // * block-log-flags-anononly
11 // * block-log-flags-nocreate
12 // * block-log-flags-noautoblock
13 // * block-log-flags-noemail
14 // * block-log-flags-nousertalk
15 // * block-log-flags-angry-autoblock
16 // * block-log-flags-hiddenname
17 return mw.message( 'block-log-flags-' + flag ).text();
22 * @param {string} timestamp
25 formatTimestamp: function ( timestamp ) {
26 if ( mw.util.isInfinity( timestamp ) ) {
27 return mw.msg( 'infiniteblock' );
29 return new Date( timestamp ).toLocaleString( undefined, { timeZone: 'UTC', timeZoneName: 'short' } );
32 * Get the message for a given block action
34 * @param {string} action
37 getBlockActionMessage: function ( action ) {
38 // Potential messages:
39 // * log-action-filter-block-block
40 // * log-action-filter-block-reblock
41 // * log-action-filter-block-unblock
42 return mw.message( 'log-action-filter-block-' + action ).text();
46 module.exports = util;