getMessages() as $msgKey ) { $parsedMesssages[$msgKey] = wfMessage( $msgKey )->parse(); } return 've.init.platform.addParsedMessages(' . FormatJson::encode( $parsedMesssages ) . ');'; } public function getMessages() { // We don't actually enable the client-side message system for these messages. // But registering them in this standardised method to make use of the getMsgBlobMtime // utility for make cache invalidation work out-of-the-box. return array( 'minoredit', 'watchthis' ); } public function getDependencies() { return array( 'ext.visualEditor.base' ); } public function getModifiedTime( ResourceLoaderContext $context ) { return max( $this->getMsgBlobMtime( $context->getLanguage() ), // Also invalidate this module if this file changes (i.e. when messages were // added or removed, or when the javascript invocation in getScript is changes). file_exists( __FILE__ ) ? filemtime( __FILE__ ) : 1 // use 1 because 0 = now, would invalidate continously ); } }