From c9f8e04fc0f461f8cb3cc875b95e5d055267065c Mon Sep 17 00:00:00 2001 From: filip Date: Tue, 2 Dec 2014 19:26:35 +0100 Subject: adding a list of resources over treshold for language not in a git --- langs/report_tx_git.php | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'langs/report_tx_git.php') 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 = "

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:

"; - $tx_only_languages_details .= '

Please add them to our git.