From 4e92fedb5a6314351b255ae19d64227339b95274 Mon Sep 17 00:00:00 2001 From: Filip Komar Date: Sat, 10 Aug 2013 14:55:24 +0000 Subject: report page extended to show duplicate strings in lang files --- langs/report.php | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'langs/report.php') 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 = ' ' . sprintf($diff_link, $f, $l) . '+' . count($test['extra']) . ''; } + if ($num_of_duplicated_strings > 0) { + $extra .= ' ' . sprintf($diff_link, $f, $l) . 'dup: ' . $num_of_duplicated_strings . ''; + } $cols .= sprintf('OK%s%s', $langF, $extra, $link); @@ -192,7 +196,11 @@ $cols .= $num_of_untranslated_strings . ' untranslated
'; } if (count($test['extra']) > 0) { - $cols .= count($test['extra']) . ' extra'; + $cols .= count($test['extra']) . ' extra
'; + } + if ($num_of_duplicated_strings > 0) { + $cols .= $num_of_duplicated_strings . ' duplicate'; + $cols .= ($num_of_duplicated_strings > 1 ? 's' : ''); } $cols .= ''; $cols .= $link . ''; -- cgit v1.2.1