From a006f23a5bda6ea933846d737dba3bd6263f09cf Mon Sep 17 00:00:00 2001 From: lLefevre Date: Tue, 15 May 2012 18:03:17 +0000 Subject: [PATCH] [-] BO : fix #PSCFV-2316 git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15322 b9a71923-0436-4b27-9f14-aed3839534dd --- .../translations/helpers/view/translation_errors.tpl | 2 +- controllers/admin/AdminTranslationsController.php | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/translations/helpers/view/translation_errors.tpl b/admin-dev/themes/default/template/controllers/translations/helpers/view/translation_errors.tpl index 66954b6b5..ba2af34a9 100644 --- a/admin-dev/themes/default/template/controllers/translations/helpers/view/translation_errors.tpl +++ b/admin-dev/themes/default/template/controllers/translations/helpers/view/translation_errors.tpl @@ -30,7 +30,7 @@

{l s='Expressions to translate'} : {$count}.
- {l s='Total missing expresssions:'} {$missing_translations}
+ {l s='Total missing expresssions:'} {$missing_translations|array_sum}

{if $post_limit_exceeded} diff --git a/controllers/admin/AdminTranslationsController.php b/controllers/admin/AdminTranslationsController.php index 318d17a7e..14d0fa001 100644 --- a/controllers/admin/AdminTranslationsController.php +++ b/controllers/admin/AdminTranslationsController.php @@ -1643,7 +1643,7 @@ class AdminTranslationsControllerCore extends AdminController { $name_var = $this->translations_informations[$this->type_selected]['var']; $GLOBALS[$name_var] = $this->fileExists(); - $count_empty = 0; + $count_empty = array(); /* List files to parse */ $string_to_translate = array(); @@ -1674,12 +1674,13 @@ class AdminTranslationsControllerCore extends AdminController if (array_key_exists(md5($key), $GLOBALS[$name_var])) $string_to_translate[$key] = html_entity_decode($GLOBALS[$name_var][md5($key)], ENT_COMPAT, 'UTF-8'); else + { $string_to_translate[$key] = ''; + if (!isset($count_empty[$key])) + $count_empty[$key] = 1; + } $this->total_expression++; - - if (empty($string_to_translate[$key])) - $count_empty++; } }