* Use double quoted consistently on attributes in linker output; preparing for new...
[mediawiki.git] / maintenance / checktrans.php
blobebab4c7d408c9aeb434ac23dc233100be4b21059
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 */
10 /** */
11 require_once('commandLine.inc');
13 if ( 'en' == $wgLanguageCode ) {
14 print "Current selected language is English. Cannot check translations.\n";
15 exit();
18 $count = $total = 0;
19 $msgarray = 'wgAllMessages' . ucfirst( $wgLanguageCode );
21 foreach ( $wgAllMessagesEn as $code => $msg ) {
22 ++$total;
23 if ( ! array_key_exists( $code, $$msgarray ) ) {
24 print "'{$code}' => \"$msg\",\n";
25 ++$count;
29 print "{$count} messages of {$total} not translated.\n";