From fe31c40f0ad09fd061a42b26a118e33b9b7ba010 Mon Sep 17 00:00:00 2001 From: Filip Komar Date: Sat, 7 Jun 2014 11:29:08 +0000 Subject: a workaround for navigation & license resource --- langs/report_test.php | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'langs') diff --git a/langs/report_test.php b/langs/report_test.php index a24a78f20..952e86a37 100644 --- a/langs/report_test.php +++ b/langs/report_test.php @@ -65,6 +65,14 @@ $restore_languages = FALSE; $restore_resources = FALSE; + if (isset($one_language) && $one_language != 'all') { + $otherLangs = array('en', $one_language); + $restore_languages = TRUE; + } else { + $otherLangs = get_other_langs(); + } + $times[] = time_debug('get_other_langs'); + if (isset($one_resource) && $one_resource != 'all') { $enFiles = array($one_resource); $restore_resources = TRUE; @@ -72,7 +80,7 @@ $enFiles = array_merge(array('../_nav/langs/en.pot'), get_lang_references('*.lang'), get_lang_references('*.pot')); // added navigation file /* START OF A WORKAROUND FOR TIMEOUTS */ foreach($enFiles as $enFile) { - if($enFile != 'en/about/license.pot' && $enFile != '../_nav/langs/en.pot') { + if ($restore_languages || ($enFile != 'en/about/license.pot' && $enFile != '../_nav/langs/en.pot')) { $enFiles_tmp[] = $enFile; } } @@ -81,14 +89,8 @@ sort($enFiles); } $num_of_enFiles = count($enFiles); + $times[] = time_debug('num_of_enFiles'); - if (isset($one_language) && $one_language != 'all') { - $otherLangs = array('en', $one_language); - $restore_languages = TRUE; - } else { - $otherLangs = get_other_langs(); - } - $times[] = time_debug('get_other_langs'); $enStringsCount = array(); $report = array(); @@ -369,6 +371,10 @@ } $thfiles = '' . implode('', $lang_line) . '' . PHP_EOL; + if (!$restore_languages && !$restore_resources) { + echo '

Note that navigation resource and license resource are currently not shown in this full report as they take a significant amount of time to process.

'; + $count = ' '; + } if ($restore_languages) { echo '

Restore all languages.

'; $count = ' '; -- cgit v1.2.1