134929eb0bdaa92d0b19a908876290b5239aee88
[lhc/web/wiklou.git] / maintenance / checktrans.php
1 <?php
2 /**
3 * @package MediaWiki
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 it checks the
7 * selected language of that installation.
8 *
9 * Output is posted from time to time on:
10 * http://meta.wikimedia.org/wiki/Localization_statistics
11 */
12
13 /** */
14 require_once('commandLine.inc');
15
16 if ( 'en' == $wgLanguageCode ) {
17 print "Current selected language is English. Cannot check translations.\n";
18 exit();
19 }
20
21 $count = $total = 0;
22 $msgarray = 'wgAllMessages' . ucfirst( $wgLanguageCode );
23
24 foreach ( $wgAllMessagesEn as $code => $msg ) {
25 ++$total;
26 if ( ! array_key_exists( $code, $$msgarray ) ) {
27 print "'{$code}' => \"$msg\",\n";
28 ++$count;
29 }
30 }
31
32 print "{$count} messages of {$total} not translated.\n";
33 ?>