aboutsummaryrefslogtreecommitdiffstats
path: root/langs
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2012-06-11 12:30:34 +0000
committerRomain d'Alverny <rda@mageia.org>2012-06-11 12:30:34 +0000
commitd1d2e6d84e8deaff24af0d75d28b07e8df892248 (patch)
tree3011e16b33caa24a89a198584a0b43bb9631e1c0 /langs
parent62c35e88653ab292b39eb0971579161801547ad2 (diff)
downloadwww-d1d2e6d84e8deaff24af0d75d28b07e8df892248.tar
www-d1d2e6d84e8deaff24af0d75d28b07e8df892248.tar.gz
www-d1d2e6d84e8deaff24af0d75d28b07e8df892248.tar.bz2
www-d1d2e6d84e8deaff24af0d75d28b07e8df892248.tar.xz
www-d1d2e6d84e8deaff24af0d75d28b07e8df892248.zip
change report direction
Diffstat (limited to 'langs')
-rw-r--r--langs/report.php56
1 files changed, 21 insertions, 35 deletions
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 = '<a href="diff.php?s=%s&l=%s" title="see detailed diff">';
- $s = '';
- foreach ($enFiles as $f) {
+ foreach ($otherLangs as $l) {
if (is_dir($f)) continue;
-
+
$stats['en']['files'] += 1;
- $s .= sprintf('<tr><td><a href="%s">%s</a></td>',
- $f, $f);
+ $s .= sprintf('<tr><th>%s (%s)</th>',
+ $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(
+ '<td class="number">%d / %d</td>
+ <td class="number">%d%%</td>',
+ $stats[$l]['strings'],
+ $stats['en']['strings'],
+ round($stats[$l]['strings'] / $stats['en']['strings'] * 100)
+ );
+
$s .= '</tr>';
}
- $th = ''; $th2 = '';
- array_shift($otherLangs);
- foreach ($otherLangs as $l) {
- $th .= '<th><span class="lv">' . $langs[$l] . '</span></th>';
- $th2 .= '<th>' . $l . '</th>';
- }
-
- $ths = '';
- foreach ($stats as $l => $data) {
- if ($l == 'en') continue;
- $ths .= '<th nowrap style="text-align: center;">' . $data['files'] . ' / ' . $data['strings'] . '<br>' . round($data['strings'] / $stats['en']['strings'] * 100). '%</th>';
- }
+ $thfiles = '<th>' . implode('</th><th>', $enFiles) . '</th>';
echo <<<S
<table border="1">
-<thead>
- <tr>
- <th colspan="2" rowspan="2"><span class="lv">English</span></th>
- {$th}
- </tr>
- <tr>
- {$th2}
- </tr>
- <tr>
- <th colspan="2">Reference</th>
- </tr>
- <tr>
- <th>{$stats['en']['files']} files</th>
- <th col="scol">{$stats['en']['strings']}&nbsp;strings</th>
- {$ths}
- </tr>
-</thead>
+<thead><tr>
+ <th>Language</th>
+ {$thfiles}
+ <th>Translated strings</th>
+ <th>Completeness</th>
+</tr></thead>
<tbody>
{$s}
</tbody>