addDescription( 'Dump an entire language, using the keys from English' ); } public function execute() { $messages = []; $localisationCache = $this->getServiceContainer()->getLocalisationCache(); $localisationMessagesEn = $localisationCache->getItem( 'en', 'messages' ); foreach ( $localisationMessagesEn as $key => $_ ) { $messages[$key] = wfMessage( $key )->text(); } $this->output( "MediaWiki " . MW_VERSION . " language file\n" ); $this->output( serialize( $messages ) ); } } // @codeCoverageIgnoreStart $maintClass = DumpMessages::class; require_once RUN_MAINTENANCE_IF_MAIN; // @codeCoverageIgnoreEnd