3 # Check to see if all messages have been translated into
4 # the selected language. To run this script, you must have
5 # a working installation, and it checks the selected language
6 # of that installation.
9 if ( ! is_readable( "../LocalSettings.php" ) ) {
10 print "A copy of your installation's LocalSettings.php\n" .
11 "must exist in the source directory.\n";
16 include_once( "../LocalSettings.php" );
18 if ( "en" == $wgLanguageCode ) {
19 print "Current selected language is English. Cannot check translations.\n";
22 $include = "Language" . ucfirst( $wgLanguageCode ) . ".php";
23 if ( ! is_readable( "{$IP}/{$include}" ) ) {
24 print "Translation file \"{$include}\" not found in installation directory.\n" .
25 "You must have the software installed to run this script.\n";
32 include_once( "{$IP}/Setup.php" );
33 $wgTitle = Title
::newFromText( "Translation checking script" );
34 $wgCommandLineMode = true;
37 $msgarray = "wgAllMessages" . ucfirst( $wgLanguageCode );
39 foreach ( $wgAllMessagesEn as $code => $msg ) {
42 if ( ! array_key_exists( $code, $
$msgarray ) ) {
47 print "{$count} messages of {$total} not translated.\n";