r57339 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57338‎ | r57339 | r57340 >
Date:18:32, 3 October 2009
Author:siebrand
Status:deferred
Tags:
Comment:
Testing helps. Works better now.
Modified paths:
  • /trunk/extensions/Translate/scripts/groupStatistics.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Translate/scripts/groupStatistics.php
@@ -82,7 +82,7 @@
8383 )
8484 );
8585
86 -$optionsWithArgs = array( 'groups', 'output', 'skiplanguages', 'most' );
 86+$optionsWithArgs = array( 'groups', 'output', 'skiplanguages' );
8787 require( dirname( __FILE__ ) . '/cli.inc' );
8888
8989 class TranslateStatsOutput extends WikiStatsOutput {
@@ -110,8 +110,8 @@
111111 * 'text' : Text with tabs.
112112 --most : [SCOPE]: report on the 50 most spoken languages. Skipzero is
113113 ignored. If a valid scope is defined, the group list is
114 - has been chosen, the localisation levels are weighted
115 - and reported.
 114+ ignored and the localisation levels are weighted and
 115+ reported.
116116 * mediawiki:
117117 core-mostused (30%)
118118 core (30%)
@@ -125,7 +125,7 @@
126126 combined with --most.
127127 --nol10n : do not add localised language name if I18ntags is installed.
128128 --continent : add a continent column. Only available when output is
129 - 'wiki'.
 129+ 'wiki' or not specified.
130130
131131 END;
132132 STDERR( $msg );
@@ -191,7 +191,8 @@
192192 }
193193 $out->element( 'Code', true );
194194 $out->element( 'Language', true );
195 -if( $options['output'] == 'wiki' && isset( $options['continent'] ) ) {
 195+if( ( $options['output'] == 'wiki' || $options['output'] == 'default' ) &&
 196+ isset( $options['continent'] ) ) {
196197 $out->element( 'Continent', true );
197198 }
198199
@@ -299,7 +300,7 @@
300301 $out->element( $code );
301302
302303 // Fill language name field
303 - if( $options['output'] == 'wiki' &&
 304+ if( ( $options['output'] == 'wiki' || $options['output'] == 'default' ) &&
304305 !isset( $options['nol10n'] ) &&
305306 function_exists( 'efI18nTagsInit' ) ) {
306307 $out->element( "{{#languagename:" . $code . "}}" );
@@ -308,11 +309,12 @@
309310 }
310311
311312 // Fill continent field
312 - if( $options['output'] == 'wiki' && isset( $options['continent'] ) ) {
 313+ if( ( $options['output'] == 'wiki' || $options['output'] == 'default' ) &&
 314+ isset( $options['continent'] ) ) {
313315 if( $mostSpokenLanguages[$code][4] == 'multiple' ) {
314316 $continent = '';
315317 } else {
316 - $content = "{{int:timezoneregion-" . $mostSpokenLanguages[$code][4] . "}}";
 318+ $continent = "{{int:timezoneregion-" . $mostSpokenLanguages[$code][4] . "}}";
317319 }
318320 $out->element( $continent );
319321 }

Status & tagging log