From 2d56e13009850f01ae81a6aec8ad66bda023bb06 Mon Sep 17 00:00:00 2001 From: Filip Komar Date: Sat, 22 Mar 2014 23:02:30 +0000 Subject: license page converted to gettext + fix of report for empty translations (+ community refresh) --- langs/report.php | 51 ++++++++++++++++++++++++++++----------------------- 1 file changed, 28 insertions(+), 23 deletions(-) (limited to 'langs/report.php') diff --git a/langs/report.php b/langs/report.php index e3f1099ab..118b0883c 100644 --- a/langs/report.php +++ b/langs/report.php @@ -126,6 +126,10 @@ $old_page = sprintf('by recycling old page', $l, $link); } + $add_translation = sprintf('add translation%s', + $f, $l, $old_page + ); + if (file_exists($langF)) { $stats[$l]['files'] += 1; @@ -237,36 +241,37 @@ // regular case } else { - $cols .= sprintf('' . $diff_link, - $f, $l); - - if ($num_of_missing_strings > 0) { - $cols .= $num_of_missing_strings . ' missing
'; - } - if ($num_of_fuzzy_or_missing_strings > 0) { - $cols .= $num_of_fuzzy_or_missing_strings . ' fuzzy or missing
'; - } - if ($num_of_untranslated_strings > 0) { - $cols .= $num_of_untranslated_strings . ' untranslated
'; - } - if ($num_of_extra_strings > 0) { - $cols .= $num_of_extra_strings . ' extra
'; - } - if ($num_of_duplicated_strings > 0) { - $cols .= $num_of_duplicated_strings . ' duplicate'; - $cols .= ($num_of_duplicated_strings > 1 ? 's' : ''); + if(($num_of_missing_strings + $num_of_fuzzy_or_missing_strings + $num_of_untranslated_strings) < $test['a']) { + $cols .= sprintf('' . $diff_link, $f, $l); + + if ($num_of_missing_strings > 0) { + $cols .= $num_of_missing_strings . ' missing
'; + } + if ($num_of_fuzzy_or_missing_strings > 0) { + $cols .= $num_of_fuzzy_or_missing_strings . ' fuzzy or missing
'; + } + if ($num_of_untranslated_strings > 0) { + $cols .= $num_of_untranslated_strings . ' untranslated
'; + } + if ($num_of_extra_strings > 0) { + $cols .= $num_of_extra_strings . ' extra
'; + } + if ($num_of_duplicated_strings > 0) { + $cols .= $num_of_duplicated_strings . ' duplicate'; + $cols .= ($num_of_duplicated_strings > 1 ? 's' : ''); + } + $cols .= ''; + $cols .= $link . ''; + } else { + $cols .= $add_translation; } - $cols .= ''; - $cols .= $link . ''; $done = $test['a'] - $num_of_untranslated_strings - $num_of_missing_strings - $num_of_fuzzy_or_missing_strings; } } $stats[$l]['strings'] += $done; } else { - $cols .= sprintf('add translation%s', - $f, $l, $old_page - ); + $cols .= $add_translation; } $num_clmns_to_repeat = 9; $num_of_col++; -- cgit v1.2.1