4 * @subpackage Maintenance
5 * Check to see if all messages have been translated into the selected language.
6 * To run this script, you must have a working installation, and you can specify
7 * a language, or the script will check the installation language.
11 require_once('commandLine.inc');
13 if ( isset( $args[0] ) ) {
16 $code = $wgLang->getCode();
19 if ( $code == 'en' ) {
20 print "Current selected language is English. Cannot check translations.\n";
24 $filename = Language
::getFileName( "$IP/languages/Messages", $code, '.php' );
25 if ( file_exists( $filename ) ) {
32 $wgEnglishMessages = Language
::getMessagesFor( 'en' );
33 $wgLocalMessages = $messages;
35 foreach ( $wgEnglishMessages as $key => $msg ) {
37 if ( !isset( $wgLocalMessages[$key] ) ) {
38 print "'{$key}' => \"$msg\",\n";
43 print "{$count} messages of {$total} are not translated in the language {$code}.\n";