summaryrefslogtreecommitdiff
path: root/maintenance/language/dumpMessages.php
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance/language/dumpMessages.php')
-rw-r--r--maintenance/language/dumpMessages.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/maintenance/language/dumpMessages.php b/maintenance/language/dumpMessages.php
index 9bdda09d..0292d314 100644
--- a/maintenance/language/dumpMessages.php
+++ b/maintenance/language/dumpMessages.php
@@ -18,24 +18,30 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
* http://www.gnu.org/copyleft/gpl.html
*
+ * @file
* @ingroup MaintenanceLanguage
- * @todo Make this more useful, right now just dumps $wgContentLang
+ * @todo Make this more useful, right now just dumps $wgContLang
*/
-require_once( dirname( __FILE__ ) . '/../Maintenance.php' );
+require_once( __DIR__ . '/../Maintenance.php' );
+/**
+ * Maintenance script that dumps an entire language, using the keys from English.
+ *
+ * @ingroup MaintenanceLanguage
+ */
class DumpMessages extends Maintenance {
public function __construct() {
parent::__construct();
$this->mDescription = "Dump an entire language, using the keys from English";
}
-
+
public function execute() {
global $wgVersion;
$messages = array();
foreach ( array_keys( Language::getMessagesFor( 'en' ) ) as $key ) {
- $messages[$key] = wfMsg( $key );
+ $messages[$key] = wfMessage( $key )->text();
}
$this->output( "MediaWiki $wgVersion language file\n" );
$this->output( serialize( $messages ) );