} else { usage(); wfDie(); } /** parsertest is used to do differences */ $myParserTest = new ParserTest(); # Get all references messages and check if they exist in the tested language $i = 0; $msg = "MW Language{$testLanguage}.php against "; if ($externalRef) { $msg .= 'external file '; } else { $msg .= 'internal file '; } $msg .= $referenceFilename . ' (' . $referenceLanguage . "):\n----\n"; echo $msg; // process messages foreach ($referenceMessages as $index => $ref) { // message is not localized if (!isset($testMessages[$index])) { $i++; print "'{$index}' => \"{$ref}\",\n"; // Messages in the same language differs } elseif ($lang == $referenceLanguage and $testMessages[$index] != $ref) { print "\n{$index} differs:\n"; print $myParserTest->quickDiff($testMessages[$index], $ref, 'tested', 'reference'); } } echo "\n----\n" . $msg; echo "{$referenceLanguage} language is complete at " . number_format(100 - $i / count($wgAllMessagesEn) * 100, 2) . "%\n"; echo "{$i} unlocalised messages of the " . count($wgAllMessagesEn) . " messages available.\n";