aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--langs/report_tx_git.php19
1 files changed, 11 insertions, 8 deletions
diff --git a/langs/report_tx_git.php b/langs/report_tx_git.php
index 8d420153e..edc18ccb9 100644
--- a/langs/report_tx_git.php
+++ b/langs/report_tx_git.php
@@ -184,9 +184,7 @@ foreach ($tx_resources_info as $tx_resource_info) {
$tx_all_languages[] = $tx_resource_language;
}
if ($tx_lang_completed_treshold <= $completed) {
- if (!in_array($tx_resource_language, $tx_all_langs_above_treshold)) {
- $tx_all_langs_above_treshold[] = $tx_resource_language;
- }
+ $tx_all_langs_above_treshold[$tx_resource_language][] = $tx_resource_name;
}
foreach ($report as $git_resource_info) {
$git_resource_name = $git_resource_info['resource_name'];
@@ -235,26 +233,31 @@ sort($tx_all_resource_names, SORT_STRING);
sort($git_all_resource_names, SORT_STRING);
sort($git_compare_resources, SORT_STRING);
sort($tx_all_languages);
-sort($tx_all_langs_above_treshold);
+ksort($tx_all_langs_above_treshold); // sort by lang
sort($git_all_languages);
sort($nonequal_num_of_all_strings, SORT_STRING);
$tx_only_resources = array_diff($tx_all_resource_names, $git_compare_resources);
$git_only_resources = array_diff($git_compare_resources, $tx_all_resource_names);
-$tx_only_languages = array_diff($tx_all_langs_above_treshold, $git_all_languages);
+$tx_only_languages = array_diff(array_keys($tx_all_langs_above_treshold), $git_all_languages);
$git_only_languages = array_diff($git_all_languages, $tx_all_languages);
// preparing text for languages not present yet in our git repositories
$tx_only_languages_details = '';
if (0 < count($tx_only_languages)) {
$tx_only_languages_details = "<h3>Languages with at least one resource for $resource_type translated over treshold ";
- $tx_only_languages_details .= "($tx_lang_completed_treshold %) but not present yet in our git:</h3>";
- $tx_only_languages_details .= '<p>Please add them to our git.</p><ul>';
+ $tx_only_languages_details .= "($tx_lang_completed_treshold %) but not present yet in our git:</h3><ul>";
foreach ($tx_only_languages as $tx_only_language) {
$tx_language_details = tx_call("language/$tx_only_language", '');
$tx_only_languages_details .= '<li><span class="bold">' . $tx_only_language . '</span>: ';
$tx_only_languages_details .= '<a href="http://www.transifex.com/organization/MageiaLinux/dashboard/all_resources/';
- $tx_only_languages_details .= "$tx_only_language/#1/?c=$resource_type\">" . $tx_language_details['name'] . "</a>,</li>";
+ $tx_only_languages_details .= "$tx_only_language/#1/?c=$resource_type\">" . $tx_language_details['name'] . "</a> (resources over treshold: ";
+ $resources_above_treshold = array();
+ foreach ($tx_all_langs_above_treshold[$tx_only_language] as $resource_above_treshold) {
+ $resources_above_treshold[] = $resource_above_treshold;
+ }
+ sort($resources_above_treshold);
+ $tx_only_languages_details .= implode(", ", $resources_above_treshold) . "),</li>";
}
$tx_only_languages_details .= '</ul>';
}