summaryrefslogtreecommitdiff
path: root/maintenance/language/makeMessageDB.php
diff options
context:
space:
mode:
Diffstat (limited to 'maintenance/language/makeMessageDB.php')
-rw-r--r--maintenance/language/makeMessageDB.php45
1 files changed, 0 insertions, 45 deletions
diff --git a/maintenance/language/makeMessageDB.php b/maintenance/language/makeMessageDB.php
deleted file mode 100644
index f853b395..00000000
--- a/maintenance/language/makeMessageDB.php
+++ /dev/null
@@ -1,45 +0,0 @@
-<?php
-
-/**
- * Proof of principle script
- */
-
-require( dirname( __FILE__ ) . '/../commandLine.inc' );
-
-$obj = new MakeMessagesDB;
-$obj->run();
-
-class MakeMessagesDB {
-
- function run() {
- global $wgExtensionMessagesFiles, $wgMessageCache, $IP;
-
- $nameHash = md5( implode( "\n", array_keys( $wgExtensionMessagesFiles ) ) );
- $dir = "$IP/cache/ext-msgs";
- wfMkdirParents( $dir );
- $db = dba_open( "$dir/$nameHash.cdb", 'n', 'cdb' );
- if ( !$db ) {
- echo "Cannot open DB file\n";
- exit( 1 );
- }
-
- # Load extension messages
- foreach ( $wgExtensionMessagesFiles as $file ) {
- $messages = $magicWords = array();
- require( $file );
- foreach ( $messages as $lang => $unused ) {
- $wgMessageCache->processMessagesArray( $messages, $lang );
- }
- }
-
- # Write them to the file
- foreach ( $wgMessageCache->mExtensionMessages as $lang => $messages ) {
- foreach ( $messages as $key => $text ) {
- dba_insert( "$lang:$key", $text, $db );
- }
- }
-
- dba_close( $db );
- }
-}
-