diff options
author | filip <filip.komar@gmail.com> | 2016-08-23 21:53:59 +0200 |
---|---|---|
committer | filip <filip.komar@gmail.com> | 2016-08-23 21:53:59 +0200 |
commit | 639fd4562e90c93f28b9edc6a2ffa6182ede3d56 (patch) | |
tree | 82b6e80605a1189bc16c1ade63b0f991a3cf2b93 /langs/report_tx_git.php | |
parent | 00c1436ef1d6e17e3b42cf975cc327e86e414947 (diff) | |
download | www-639fd4562e90c93f28b9edc6a2ffa6182ede3d56.tar www-639fd4562e90c93f28b9edc6a2ffa6182ede3d56.tar.gz www-639fd4562e90c93f28b9edc6a2ffa6182ede3d56.tar.bz2 www-639fd4562e90c93f28b9edc6a2ffa6182ede3d56.tar.xz www-639fd4562e90c93f28b9edc6a2ffa6182ede3d56.zip |
added % translated in TX for resource(s) not present in git if called by language
Diffstat (limited to 'langs/report_tx_git.php')
-rw-r--r-- | langs/report_tx_git.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/langs/report_tx_git.php b/langs/report_tx_git.php index 0e6749ed9..4f56b9e1b 100644 --- a/langs/report_tx_git.php +++ b/langs/report_tx_git.php @@ -508,7 +508,7 @@ foreach ($tx_resources as $one_resource) { $tx_resource_name = str_replace('page-', '', $tx_resource_name); // unify resource names $one_resource['tx_resource_name'] = $tx_resource_name; $one_resource['statistic'] = $tx_stat_for_resource; - $tx_resources_info[] = $one_resource; + $tx_resources_info[$tx_resource_name] = $one_resource; } } } @@ -529,6 +529,7 @@ if ('Webpages' == $resource_type) { $report = generating_report(get_other_langs(), $enFiles); } else { $tx_resources_not_yet_in_git = array(); + $translated_in_tx = ' translated in Transifex'; foreach ($git_resources as $git_resource_details) { $tx_name = $git_resource_details['tx_name']; if (!empty($wanted_resource) && $tx_name != $wanted_resource) { @@ -555,7 +556,10 @@ if ('Webpages' == $resource_type) { $report_language_codes = array($wanted_language); } else { $report_language_codes = array(); - $tx_resources_not_yet_in_git[] = $tx_name; + $completion = $tx_resources_info[$tx_name]['statistic'][$wanted_language]['completed']; + $completion .= $translated_in_tx; + $translated_in_tx = ''; + $tx_resources_not_yet_in_git[] = "$tx_name ($completion)"; $resources_not_yet_in_git = implode(", ", $tx_resources_not_yet_in_git); $errors['lang_not_in_git'] = "Language $wanted_lang_name is not present in git for $resources_not_yet_in_git resource."; } |