From 491271239463e59b1561bc94efe28dbc17b5f931 Mon Sep 17 00:00:00 2001 From: filip Date: Mon, 4 Aug 2014 19:12:15 +0200 Subject: minor improvements of diff.php + better consistency with missing.php --- langs/diff.php | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/langs/diff.php b/langs/diff.php index f86038f41..9986bf1b2 100644 --- a/langs/diff.php +++ b/langs/diff.php @@ -59,19 +59,19 @@ if (false === strstr($source_file_path, '/langs/') || $diff = _po_diff($target_lang, $resource); $issues = array( - 'missing' => 'missing strings', - 'fuzzy_or_missing' => 'fuzzy or missing strings', - 'notrans' => 'untranslated strings', - 'extra' => 'unused (old) strings', - 'dup_str' => 'duplicate strings', + 'missing' => 'missing string', + 'fuzzy_or_missing' => 'fuzzy or missing string', + 'notrans' => 'untranslated string', + 'extra' => 'unused (old) string', + 'dup_str' => 'duplicate string', ); $s = '« back to the report page for ' . $langs[$target_lang] . ''; $s .= sprintf('

Differences between %s source and %s target

', $source_file, $target_lang); -$s .= '

You can translate most of our web page resources online in Transifex.'; -$s .= ' More info in our Wiki.

'; +$s .= '

You can translate most of our web page resources online in Transifex.

'; +$s .= '

Please take a look off the translation guide on the localization Wiki page too.

'; $additional_file = ''; @@ -95,9 +95,9 @@ if($license) { $license_numbers = array_pop($license_array); $num_of_untranslated_strings = $license_numbers["untran"]; // number of all license sentences $diff['untranslated_sentences_in_license'] = $license_numbers['untranslated_sentences']; // add untranslated license sentences - $s .= '

Please translate license fully into ' . $langs[$target_lang] . ' first

'; - $s .= sprintf('

You can find it in git. ', $target_lang); // git doesn't work yet on https - $issues['untranslated_sentences_in_license'] = 'untranslated msgid strings in ' . $num_of_untranslated_strings . ' license sentences as part of a separate drakx file (look below line 4 500)'; + $s .= '

Please translate separate license file fully into ' . $langs[$target_lang] . ' first

'; + $s .= sprintf('

You can find it as a part of a separate drakx translation file in git or in Transifex. ', $target_lang); // git doesn't work yet on https + $issues['untranslated_sentences_in_license'] = 'untranslated msgid strings in ' . $num_of_untranslated_strings . ' license sentences as a part of a separate drakx translation file (it starts before the line with the string "1. License Agreement")'; } if($constitution || $license) { @@ -107,15 +107,16 @@ if($constitution || $license) { $s .= '

After translation:

'; $s .= "\t"; $new_line = "\n\n"; +$filename = ' in ' . $commit; // $file +$title_prefix = 'Report found '; foreach ($issues as $type => $name) { if (isset($diff[$type]) && count($diff[$type]) > 0) { - $filename = ' in ' . $commit; // $file if ($type == 'untranslated_lines_in_constitution') { $prefix = ''; $new_line = "\n"; @@ -126,11 +127,13 @@ foreach ($issues as $type => $name) { } else { $prefix = ';'; } - $s .= sprintf('

%d %s%s:

', count($diff[$type]), $name, $filename); + $s .= sprintf('

%s %d %s%s:

', $title_prefix, count($diff[$type]), $name . ((count($diff[$type]) > 1) ? 's' : ''), $filename); $s .= '
';
         foreach ($diff[$type] as $l)
             $s .= sprintf("%s%s%s", $prefix, rtrim(htmlspecialchars($l)), $new_line); // cut at 200: substr(rtrim(htmlspecialchars($l)), 0, 200)
         $s .= '
'; + $filename = ''; + $title_prefix = 'and also '; } } -- cgit v1.2.1