aboutsummaryrefslogtreecommitdiffstats
path: root/langs/report.php
diff options
context:
space:
mode:
authorRomain d'Alverny <rda@mageia.org>2012-07-02 10:25:56 +0000
committerRomain d'Alverny <rda@mageia.org>2012-07-02 10:25:56 +0000
commit4ccee5f7f5678404768d7848e83671d3dda6cc70 (patch)
tree795808f0459109deb441718b08d5f93b07bf138a /langs/report.php
parentb38c9db5e13b40473d0f094d2231ae70ee62ef76 (diff)
downloadwww-4ccee5f7f5678404768d7848e83671d3dda6cc70.tar
www-4ccee5f7f5678404768d7848e83671d3dda6cc70.tar.gz
www-4ccee5f7f5678404768d7848e83671d3dda6cc70.tar.bz2
www-4ccee5f7f5678404768d7848e83671d3dda6cc70.tar.xz
www-4ccee5f7f5678404768d7848e83671d3dda6cc70.zip
fix progress metric
Diffstat (limited to 'langs/report.php')
-rw-r--r--langs/report.php13
1 files changed, 10 insertions, 3 deletions
diff --git a/langs/report.php b/langs/report.php
index 97b6c2b59..9473a79e8 100644
--- a/langs/report.php
+++ b/langs/report.php
@@ -82,12 +82,15 @@
$cols .= sprintf('<td class="ok"><a href="%s" title="get a copy of the file">OK</a>%s%s</td>',
$langF, $extra, $link);
+
+ $done = $test['a'];
}
else {
// special case, en
if ($l == 'en') {
$cols .= '<td class="number">' . count($test['notrans']) . ' strings</td>';
$enStringsCount[$f] += $test['a'];
+ $done = $test['a'];
// regular case
} else {
@@ -99,13 +102,17 @@
$cols .= count($test['missing']) . '&nbsp;missing<br>';
}
if (count($test['notrans']) > 0) {
- $cols .= count($test['notrans']) . '&nbsp;untranslated';
+ $cols .= count($test['notrans']) . '&nbsp;untranslated<br>';
+ }
+ if (count($test['extra']) > 0) {
+ $cols .= count($test['extra']) . '&nbsp;extra';
}
$cols .= '</a>';
$cols .= $link . '</td>';
+ $done = $test['a'] - count($test['notrans']) - count($test['missing']);
}
}
- $stats[$l]['strings'] += $test['b'];
+ $stats[$l]['strings'] += $done;
} else {
$stats[$l]['files'] += 0;
@@ -116,7 +123,7 @@
}
}
- $progress = round($stats[$l]['strings'] / $stats['en']['strings'] * 100);
+ $progress = floor($stats[$l]['strings'] / $stats['en']['strings'] * 100);
$s .= sprintf(
'<td class="number">%d%%<br><span style="font-size: smaller;">%d / %d</span></td>',
$progress,