From d1d2e6d84e8deaff24af0d75d28b07e8df892248 Mon Sep 17 00:00:00 2001 From: Romain d'Alverny Date: Mon, 11 Jun 2012 12:30:34 +0000 Subject: change report direction --- langs/report.php | 56 +++++++++++++++++++++----------------------------------- 1 file changed, 21 insertions(+), 35 deletions(-) (limited to 'langs/report.php') diff --git a/langs/report.php b/langs/report.php index e405c5003..f0c7d13fc 100644 --- a/langs/report.php +++ b/langs/report.php @@ -40,17 +40,16 @@ $diff_link = ''; - $s = ''; - foreach ($enFiles as $f) { + foreach ($otherLangs as $l) { if (is_dir($f)) continue; - + $stats['en']['files'] += 1; - $s .= sprintf('%s', - $f, $f); + $s .= sprintf('%s (%s)', + $langs[$l], $l); - foreach ($otherLangs as $l) { + foreach ($enFiles as $f) { $langF = str_replace('.en.lang', '.' . $l . '.lang', $f); $langF = $l . substr($langF, 2); @@ -103,41 +102,28 @@ ); } } + + $s .= sprintf( + '%d / %d + %d%%', + $stats[$l]['strings'], + $stats['en']['strings'], + round($stats[$l]['strings'] / $stats['en']['strings'] * 100) + ); + $s .= ''; } - $th = ''; $th2 = ''; - array_shift($otherLangs); - foreach ($otherLangs as $l) { - $th .= '' . $langs[$l] . ''; - $th2 .= '' . $l . ''; - } - - $ths = ''; - foreach ($stats as $l => $data) { - if ($l == 'en') continue; - $ths .= '' . $data['files'] . ' / ' . $data['strings'] . '
' . round($data['strings'] / $stats['en']['strings'] * 100). '%'; - } + $thfiles = '' . implode('', $enFiles) . ''; echo << - - - English - {$th} - - - {$th2} - - - Reference - - - {$stats['en']['files']} files - {$stats['en']['strings']} strings - {$ths} - - + + Language + {$thfiles} + Translated strings + Completeness + {$s} -- cgit v1.2.1