aboutsummaryrefslogtreecommitdiffstats
path: root/langs/report.php
diff options
context:
space:
mode:
authorFilip Komar <filip@mageia.org>2013-08-10 14:55:24 +0000
committerFilip Komar <filip@mageia.org>2013-08-10 14:55:24 +0000
commit4e92fedb5a6314351b255ae19d64227339b95274 (patch)
treec4524a4585359adb8d24ac416a6ecab0470aa402 /langs/report.php
parentfc6c1393fde5eba8d2491d3510e3bd4ecea69cd3 (diff)
downloadwww-4e92fedb5a6314351b255ae19d64227339b95274.tar
www-4e92fedb5a6314351b255ae19d64227339b95274.tar.gz
www-4e92fedb5a6314351b255ae19d64227339b95274.tar.bz2
www-4e92fedb5a6314351b255ae19d64227339b95274.tar.xz
www-4e92fedb5a6314351b255ae19d64227339b95274.zip
report page extended to show duplicate strings in lang files
Diffstat (limited to 'langs/report.php')
-rw-r--r--langs/report.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/langs/report.php b/langs/report.php
index 9a3e6967a..05d002836 100644
--- a/langs/report.php
+++ b/langs/report.php
@@ -105,6 +105,7 @@
$test = _lang_diff($f, $langF);
$num_of_untranslated_strings = count($test['notrans']);
+ $num_of_duplicated_strings = count($test['dup_str']);
if ($link == 'about/constitution') {
$dest_constitution = sprintf('%s/%s/%s/%s_%s.md', APP_ROOT, $l, 'about/constitution', 'mageia.org_statutes', $l);
@@ -167,6 +168,9 @@
if (count($test['extra']) > 0) {
$extra = ' <span class="small">' . sprintf($diff_link, $f, $l) . '+' . count($test['extra']) . '</a></span>';
}
+ if ($num_of_duplicated_strings > 0) {
+ $extra .= ' <span class="small">' . sprintf($diff_link, $f, $l) . 'dup: ' . $num_of_duplicated_strings . '</a></span>';
+ }
$cols .= sprintf('<td class="ok"><a href="%s" title="get a copy of the file">OK</a>%s%s</td>',
$langF, $extra, $link);
@@ -192,7 +196,11 @@
$cols .= $num_of_untranslated_strings . '&nbsp;untranslated<br>';
}
if (count($test['extra']) > 0) {
- $cols .= count($test['extra']) . '&nbsp;extra';
+ $cols .= count($test['extra']) . '&nbsp;extra<br>';
+ }
+ if ($num_of_duplicated_strings > 0) {
+ $cols .= $num_of_duplicated_strings . '&nbsp;duplicate';
+ $cols .= ($num_of_duplicated_strings > 1 ? 's' : '');
}
$cols .= '</a>';
$cols .= $link . '</td>';