Index: trunk/extensions/Translate/scripts/createMessageIndex.php |
— | — | @@ -22,7 +22,7 @@ |
23 | 23 | |
24 | 24 | Options: |
25 | 25 | --help Show this help text |
26 | | - --progress Report on progress (default: false) |
| 26 | + --quiet Only output errors |
27 | 27 | |
28 | 28 | EOT |
29 | 29 | ); |
— | — | @@ -33,8 +33,4 @@ |
34 | 34 | showUsage(); |
35 | 35 | } |
36 | 36 | |
37 | | -if ( isset( $options['progress'] ) ) { |
38 | | - MessageIndexRebuilder::execute(); |
39 | | -} else { |
40 | | - MessageIndexRebuilder::execute( false ); |
41 | | -} |
| 37 | +MessageIndexRebuilder::execute(); |
\ No newline at end of file |
Index: trunk/extensions/Translate/utils/MessageIndexRebuilder.php |
— | — | @@ -13,15 +13,13 @@ |
14 | 14 | */ |
15 | 15 | |
16 | 16 | class MessageIndexRebuilder { |
17 | | - public static function execute( $reportProgress = true ) { |
| 17 | + public static function execute() { |
18 | 18 | $groups = MessageGroups::singleton()->getGroups(); |
19 | 19 | |
20 | 20 | $hugearray = array(); |
21 | 21 | $postponed = array(); |
22 | 22 | |
23 | | - if( $reportProgress ) { |
24 | | - STDOUT( "Working with ", 'main' ); |
25 | | - } |
| 23 | + STDOUT( "Working with ", 'main' ); |
26 | 24 | |
27 | 25 | foreach ( $groups as $g ) { |
28 | 26 | if ( !$g->exists() ) continue; |
— | — | @@ -31,11 +29,11 @@ |
32 | 30 | continue; |
33 | 31 | } |
34 | 32 | |
35 | | - self::checkAndAdd( $hugearray, $g, false, $reportProgress ); |
| 33 | + self::checkAndAdd( $hugearray, $g ); |
36 | 34 | } |
37 | 35 | |
38 | 36 | foreach ( $postponed as $g ) { |
39 | | - self::checkAndAdd( $hugearray, $g, true, $reportProgress ); |
| 37 | + self::checkAndAdd( $hugearray, $g, true ); |
40 | 38 | } |
41 | 39 | |
42 | 40 | global $wgCacheDirectory; |
— | — | @@ -45,7 +43,7 @@ |
46 | 44 | $writer->close(); |
47 | 45 | } |
48 | 46 | |
49 | | - protected static function checkAndAdd( &$hugearray, $g, $ignore = false, $reportProgress = true ) { |
| 47 | + protected static function checkAndAdd( &$hugearray, $g, $ignore = false ) { |
50 | 48 | if ( $g instanceof MessageGroupBase ) { |
51 | 49 | $cache = new MessageGroupCache( $g ); |
52 | 50 | if ( $cache->exists() ) { |
— | — | @@ -61,9 +59,7 @@ |
62 | 60 | |
63 | 61 | $id = $g->getId(); |
64 | 62 | |
65 | | - if( $reportProgress ) { |
66 | | - STDOUT( "$id ", 'main' ); |
67 | | - } |
| 63 | + STDOUT( "$id ", 'main' ); |
68 | 64 | |
69 | 65 | $namespace = $g->getNamespace(); |
70 | 66 | |