* @ingroup MaintenanceLanguage
*/
+$optionsWithArgs = [ 'lang', 'clang', 'mode' ];
require_once __DIR__ . '/../commandLine.inc';
$messagesDir = __DIR__ . '/../../languages/messages/';
$runTest = false;
* mode: Output format, can be either:
* text: Text output on the console (default)
* wiki: Wiki format, with * at beginning of each line
- * php: Output text as PHP syntax in a array $dupeMessages
+ * php: Output text as PHP syntax in an array named \$dupeMessages
* raw: Raw output for duplicates
TEXT;
}
$messagesFileC = $messagesDir . 'Messages' . $langCodeFC . '.php';
if ( file_exists( $messagesFile ) && file_exists( $messagesFileC ) ) {
$run = true;
- }
- else {
+ } else {
echo "Messages file(s) could not be found.\nMake sure both files are exists.\n";
}
}
if ( !strcmp( $runMode, 'php' ) ) {
print "<?php\n";
- print '$dupeMessages = array(' . "\n";
+ print '$dupeMessages = [' . "\n";
}
foreach ( $wgMessages[$langCodeC] as $key => $value ) {
foreach ( $wgMessages[$langCode] as $ckey => $cvalue ) {
}
}
if ( !strcmp( $runMode, 'php' ) ) {
- print ");\n";
+ print "];\n";
}
if ( !strcmp( $runMode, 'text' ) ) {
if ( $count == 1 ) {