diff options
author | Filip Komar <filip@mageia.org> | 2014-03-22 23:02:30 +0000 |
---|---|---|
committer | Filip Komar <filip@mageia.org> | 2014-03-22 23:02:30 +0000 |
commit | 2d56e13009850f01ae81a6aec8ad66bda023bb06 (patch) | |
tree | 5de7772913965cc7daf9b5bfeb30a3cb8d007768 /langs/report.php | |
parent | 150dcccaa000a5c35b86279ffa138962615b7879 (diff) | |
download | www-2d56e13009850f01ae81a6aec8ad66bda023bb06.tar www-2d56e13009850f01ae81a6aec8ad66bda023bb06.tar.gz www-2d56e13009850f01ae81a6aec8ad66bda023bb06.tar.bz2 www-2d56e13009850f01ae81a6aec8ad66bda023bb06.tar.xz www-2d56e13009850f01ae81a6aec8ad66bda023bb06.zip |
license page converted to gettext + fix of report for empty translations (+ community refresh)
Diffstat (limited to 'langs/report.php')
-rw-r--r-- | langs/report.php | 51 |
1 files changed, 28 insertions, 23 deletions
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 <a href="/%s/%s">old page</a>', $l, $link); } + $add_translation = sprintf('<td class="missing"><a href="missing.php?s=%s&l=%s" class="action addlang">add translation</a>%s</td>', + $f, $l, $old_page + ); + if (file_exists($langF)) { $stats[$l]['files'] += 1; @@ -237,36 +241,37 @@ // regular case } else { - $cols .= sprintf('<td class="strings">' . $diff_link, - $f, $l); - - if ($num_of_missing_strings > 0) { - $cols .= $num_of_missing_strings . ' missing<br>'; - } - if ($num_of_fuzzy_or_missing_strings > 0) { - $cols .= $num_of_fuzzy_or_missing_strings . ' fuzzy or missing<br>'; - } - if ($num_of_untranslated_strings > 0) { - $cols .= $num_of_untranslated_strings . ' untranslated<br>'; - } - if ($num_of_extra_strings > 0) { - $cols .= $num_of_extra_strings . ' extra<br>'; - } - 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('<td class="strings">' . $diff_link, $f, $l); + + if ($num_of_missing_strings > 0) { + $cols .= $num_of_missing_strings . ' missing<br>'; + } + if ($num_of_fuzzy_or_missing_strings > 0) { + $cols .= $num_of_fuzzy_or_missing_strings . ' fuzzy or missing<br>'; + } + if ($num_of_untranslated_strings > 0) { + $cols .= $num_of_untranslated_strings . ' untranslated<br>'; + } + if ($num_of_extra_strings > 0) { + $cols .= $num_of_extra_strings . ' extra<br>'; + } + if ($num_of_duplicated_strings > 0) { + $cols .= $num_of_duplicated_strings . ' duplicate'; + $cols .= ($num_of_duplicated_strings > 1 ? 's' : ''); + } + $cols .= '</a>'; + $cols .= $link . '</td>'; + } else { + $cols .= $add_translation; } - $cols .= '</a>'; - $cols .= $link . '</td>'; $done = $test['a'] - $num_of_untranslated_strings - $num_of_missing_strings - $num_of_fuzzy_or_missing_strings; } } $stats[$l]['strings'] += $done; } else { - $cols .= sprintf('<td class="missing"><a href="missing.php?s=%s&l=%s" class="action addlang">add translation</a>%s</td>', - $f, $l, $old_page - ); + $cols .= $add_translation; } $num_clmns_to_repeat = 9; $num_of_col++; |