Index: trunk/extensions/Translate/scripts/groupStatistics.php |
— | — | @@ -84,7 +84,7 @@ |
85 | 85 | ) |
86 | 86 | ); |
87 | 87 | |
88 | | -$optionsWithArgs = array( 'groups', 'output', 'skiplanguages' ); |
| 88 | +$optionsWithArgs = array( 'groups', 'output', 'skiplanguages', 'legenddetail', 'legendsummary' ); |
89 | 89 | require( dirname( __FILE__ ) . '/cli.inc' ); |
90 | 90 | |
91 | 91 | class TranslateStatsOutput extends wikiStatsOutput { |
— | — | @@ -95,6 +95,10 @@ |
96 | 96 | function summaryheading() { |
97 | 97 | echo "\n" . '{| class="sortable wikitable" border="2" cellpadding="4" cellspacing="0" style="background-color: #F9F9F9; border: 1px #AAAAAA solid; border-collapse: collapse; clear:both;"' . "\n"; |
98 | 98 | } |
| 99 | + |
| 100 | + function addFreeText( $freeText ) { |
| 101 | + echo $freeText; |
| 102 | + } |
99 | 103 | } |
100 | 104 | |
101 | 105 | if ( isset( $options['help'] ) ) showUsage(); |
— | — | @@ -138,6 +142,10 @@ |
139 | 143 | 'wiki' or not specified. |
140 | 144 | --summary : add a summary with counts and scores per continent category |
141 | 145 | and totals. Only available for a valid 'most' value. |
| 146 | + --legenddetail : Page name for legend to be transcluded at the top of |
| 147 | + the details table |
| 148 | + --legendsummary : Page name for legend to be transcluded at the top of |
| 149 | + the summary table |
142 | 150 | |
143 | 151 | END; |
144 | 152 | STDERR( $msg ); |
— | — | @@ -214,6 +222,10 @@ |
215 | 223 | // Default sorting order by language code, users can sort wiki output. |
216 | 224 | ksort( $languages ); |
217 | 225 | |
| 226 | +if( $options['legenddetail'] ) { |
| 227 | + $out->addFreeText( "{{" . $options['legenddetail'] . "}}\n" ); |
| 228 | +} |
| 229 | + |
218 | 230 | // Output headers |
219 | 231 | $out->heading(); |
220 | 232 | $out->blockstart(); |
— | — | @@ -421,6 +433,10 @@ |
422 | 434 | $out->footer(); |
423 | 435 | |
424 | 436 | if( $reportScore && isset( $options['summary'] ) ) { |
| 437 | + if( $reportScore && $options['legendsummary'] ) { |
| 438 | + $out->addFreeText( "{{" . $options['legendsummary'] . "}}\n" ); |
| 439 | + } |
| 440 | + |
425 | 441 | $out->summaryheading(); |
426 | 442 | |
427 | 443 | $out->blockstart(); |