Index: trunk/extensions/UploadWizard/languageStats.php |
— | — | @@ -0,0 +1,25 @@ |
| 2 | +<?php |
| 3 | + |
| 4 | +require( 'UploadWizard.i18n.php' ); |
| 5 | + |
| 6 | +$langsToTest = array_slice( $argv, 1 ); |
| 7 | + |
| 8 | + |
| 9 | +foreach ( $messages as $lang => $langDict ) { |
| 10 | + if ( count($langsToTest) and (! in_array( $lang, $langsToTest ) ) ) { |
| 11 | + continue; |
| 12 | + } |
| 13 | + $percentComplete[$lang] = 0; |
| 14 | + $total = 0; |
| 15 | + $translated = 0; |
| 16 | + foreach( $messages['en'] as $key => $val ) { |
| 17 | + $total++; |
| 18 | + if ( array_key_exists( $key, $langDict ) ) { |
| 19 | + $translated++; |
| 20 | + } |
| 21 | + } |
| 22 | + $percentage = (int)( 100 * $translated / $total ); |
| 23 | + echo "Language: $lang Translated: $translated Percentage: $percentage\n"; |
| 24 | + |
| 25 | +} |
| 26 | + |
Property changes on: trunk/extensions/UploadWizard/languageStats.php |
___________________________________________________________________ |
Added: svn:eol-style |
1 | 27 | + native |
Added: svn:executable |
2 | 28 | + * |