Index: trunk/phase3/maintenance/language/transstat.php |
— | — | @@ -48,16 +48,16 @@ |
49 | 49 | # Select an output engine |
50 | 50 | switch ( $options['output'] ) { |
51 | 51 | case 'wiki': |
52 | | - $wgOut = new wikiStatsOutput(); |
| 52 | + $output = new wikiStatsOutput(); |
53 | 53 | break; |
54 | 54 | case 'metawiki': |
55 | | - $wgOut = new metawikiStatsOutput(); |
| 55 | + $output = new metawikiStatsOutput(); |
56 | 56 | break; |
57 | 57 | case 'text': |
58 | | - $wgOut = new textStatsOutput(); |
| 58 | + $output = new textStatsOutput(); |
59 | 59 | break; |
60 | 60 | case 'csv': |
61 | | - $wgOut = new csvStatsOutput(); |
| 61 | + $output = new csvStatsOutput(); |
62 | 62 | break; |
63 | 63 | default: |
64 | 64 | showUsage(); |
— | — | @@ -67,17 +67,17 @@ |
68 | 68 | $wgLanguages = new languages(); |
69 | 69 | |
70 | 70 | # Header |
71 | | -$wgOut->heading(); |
72 | | -$wgOut->blockstart(); |
73 | | -$wgOut->element( 'Language', true ); |
74 | | -$wgOut->element( 'Code', true ); |
75 | | -$wgOut->element( 'Translated', true ); |
76 | | -$wgOut->element( '%', true ); |
77 | | -$wgOut->element( 'Obsolete', true ); |
78 | | -$wgOut->element( '%', true ); |
79 | | -$wgOut->element( 'Problematic', true ); |
80 | | -$wgOut->element( '%', true ); |
81 | | -$wgOut->blockend(); |
| 71 | +$output->heading(); |
| 72 | +$output->blockstart(); |
| 73 | +$output->element( 'Language', true ); |
| 74 | +$output->element( 'Code', true ); |
| 75 | +$output->element( 'Translated', true ); |
| 76 | +$output->element( '%', true ); |
| 77 | +$output->element( 'Obsolete', true ); |
| 78 | +$output->element( '%', true ); |
| 79 | +$output->element( 'Problematic', true ); |
| 80 | +$output->element( '%', true ); |
| 81 | +$output->blockend(); |
82 | 82 | |
83 | 83 | $wgGeneralMessages = $wgLanguages->getGeneralMessages(); |
84 | 84 | $wgRequiredMessagesNumber = count( $wgGeneralMessages['required'] ); |
— | — | @@ -93,31 +93,31 @@ |
94 | 94 | $messages = $wgLanguages->getMessages( $code ); |
95 | 95 | $messagesNumber = count( $messages['translated'] ); |
96 | 96 | $requiredMessagesNumber = count( $messages['required'] ); |
97 | | - $requiredMessagesPercent = $wgOut->formatPercent( $requiredMessagesNumber, $wgRequiredMessagesNumber ); |
| 97 | + $requiredMessagesPercent = $output->formatPercent( $requiredMessagesNumber, $wgRequiredMessagesNumber ); |
98 | 98 | $obsoleteMessagesNumber = count( $messages['obsolete'] ); |
99 | | - $obsoleteMessagesPercent = $wgOut->formatPercent( $obsoleteMessagesNumber, $messagesNumber, true ); |
| 99 | + $obsoleteMessagesPercent = $output->formatPercent( $obsoleteMessagesNumber, $messagesNumber, true ); |
100 | 100 | $messagesWithMismatchVariables = $wgLanguages->getMessagesWithMismatchVariables( $code ); |
101 | 101 | $emptyMessages = $wgLanguages->getEmptyMessages( $code ); |
102 | 102 | $messagesWithWhitespace = $wgLanguages->getMessagesWithWhitespace( $code ); |
103 | 103 | $nonXHTMLMessages = $wgLanguages->getNonXHTMLMessages( $code ); |
104 | 104 | $messagesWithWrongChars = $wgLanguages->getMessagesWithWrongChars( $code ); |
105 | 105 | $problematicMessagesNumber = count( array_unique( array_merge( $messagesWithMismatchVariables, $emptyMessages, $messagesWithWhitespace, $nonXHTMLMessages, $messagesWithWrongChars ) ) ); |
106 | | - $problematicMessagesPercent = $wgOut->formatPercent( $problematicMessagesNumber, $messagesNumber, true ); |
| 106 | + $problematicMessagesPercent = $output->formatPercent( $problematicMessagesNumber, $messagesNumber, true ); |
107 | 107 | |
108 | 108 | # Output them |
109 | | - $wgOut->blockstart(); |
110 | | - $wgOut->element( "$language" ); |
111 | | - $wgOut->element( "$code" ); |
112 | | - $wgOut->element( "$requiredMessagesNumber/$wgRequiredMessagesNumber" ); |
113 | | - $wgOut->element( $requiredMessagesPercent ); |
114 | | - $wgOut->element( "$obsoleteMessagesNumber/$messagesNumber" ); |
115 | | - $wgOut->element( $obsoleteMessagesPercent ); |
116 | | - $wgOut->element( "$problematicMessagesNumber/$messagesNumber" ); |
117 | | - $wgOut->element( $problematicMessagesPercent ); |
118 | | - $wgOut->blockend(); |
| 109 | + $output->blockstart(); |
| 110 | + $output->element( "$language" ); |
| 111 | + $output->element( "$code" ); |
| 112 | + $output->element( "$requiredMessagesNumber/$wgRequiredMessagesNumber" ); |
| 113 | + $output->element( $requiredMessagesPercent ); |
| 114 | + $output->element( "$obsoleteMessagesNumber/$messagesNumber" ); |
| 115 | + $output->element( $obsoleteMessagesPercent ); |
| 116 | + $output->element( "$problematicMessagesNumber/$messagesNumber" ); |
| 117 | + $output->element( $problematicMessagesPercent ); |
| 118 | + $output->blockend(); |
119 | 119 | } |
120 | 120 | |
121 | 121 | # Footer |
122 | | -$wgOut->footer(); |
| 122 | +$output->footer(); |
123 | 123 | |
124 | 124 | |