aboutsummaryrefslogtreecommitdiffstats
path: root/langs/report.php
diff options
context:
space:
mode:
authorFilip Komar <filip@mageia.org>2014-03-22 23:02:30 +0000
committerFilip Komar <filip@mageia.org>2014-03-22 23:02:30 +0000
commit2d56e13009850f01ae81a6aec8ad66bda023bb06 (patch)
tree5de7772913965cc7daf9b5bfeb30a3cb8d007768 /langs/report.php
parent150dcccaa000a5c35b86279ffa138962615b7879 (diff)
downloadwww-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.php51
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&amp;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 . '&nbsp;missing<br>';
- }
- if ($num_of_fuzzy_or_missing_strings > 0) {
- $cols .= $num_of_fuzzy_or_missing_strings . '&nbsp;fuzzy or missing<br>';
- }
- if ($num_of_untranslated_strings > 0) {
- $cols .= $num_of_untranslated_strings . '&nbsp;untranslated<br>';
- }
- if ($num_of_extra_strings > 0) {
- $cols .= $num_of_extra_strings . '&nbsp;extra<br>';
- }
- if ($num_of_duplicated_strings > 0) {
- $cols .= $num_of_duplicated_strings . '&nbsp;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 . '&nbsp;missing<br>';
+ }
+ if ($num_of_fuzzy_or_missing_strings > 0) {
+ $cols .= $num_of_fuzzy_or_missing_strings . '&nbsp;fuzzy or missing<br>';
+ }
+ if ($num_of_untranslated_strings > 0) {
+ $cols .= $num_of_untranslated_strings . '&nbsp;untranslated<br>';
+ }
+ if ($num_of_extra_strings > 0) {
+ $cols .= $num_of_extra_strings . '&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>';
+ } 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&amp;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++;