From 6cd96e78d38b63f28864fce51e3590fc3ebd10ef Mon Sep 17 00:00:00 2001 From: mMarinetti Date: Thu, 1 Mar 2012 10:13:42 +0000 Subject: [PATCH] // fix translations modules notice --- .../helpers/view/translation_modules.tpl | 22 +++++++++++++++---- .../admin/AdminTranslationsController.php | 7 ++++-- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/admin-dev/themes/default/template/controllers/translations/helpers/view/translation_modules.tpl b/admin-dev/themes/default/template/controllers/translations/helpers/view/translation_modules.tpl index 56d1eea55..3abee6038 100644 --- a/admin-dev/themes/default/template/controllers/translations/helpers/view/translation_modules.tpl +++ b/admin-dev/themes/default/template/controllers/translations/helpers/view/translation_modules.tpl @@ -30,9 +30,23 @@

{l s='Language'} : {$lang} - {$translation_type}

{l s='Expressions to translate'} : {$count}. -
{l s='Click on the titles to open fieldsets'}.

- {$limit_warning} - {if !$suoshin_exceeded} + {if $post_limit_exceeded} +
+ {if $limit_warning['error_type'] == 'suhosin'} + {l s='Warning, your hosting provider is using the suhosin patch for PHP, which limits the maximum number of fields to post in a form:'} + + {$limit_warning['post.max_vars']}{l s='for suhosin.post.max_vars.'}
+ {$limit_warning['request.max_vars']} {l s='for suhosin.request.max_vars.'}
+ {l s='Please ask your hosting provider to increase the suhosin post and request limit to'} + {else} + {l s='Warning, your PHP configuration limits the maximum number of fields to post in a form:'}
+ {$limit_warning['max_input_vars']} {l s='for max_input_vars.'}
+ {l s='Please ask your hosting provider to increase the this limit to'} + {/if} + {$limit_warning['needed_limit']} {l s='at least.'} {l s='or edit the translation file manually.'} +
+ {else} +
{l s='Click on the titles to open fieldsets'}.

{$toggle_button} @@ -94,4 +108,4 @@ {/foreach} {/if} -{/block} \ No newline at end of file +{/block} diff --git a/controllers/admin/AdminTranslationsController.php b/controllers/admin/AdminTranslationsController.php index ef81cb89d..0ff828fff 100644 --- a/controllers/admin/AdminTranslationsController.php +++ b/controllers/admin/AdminTranslationsController.php @@ -1277,7 +1277,8 @@ class AdminTranslationsControllerCore extends AdminController } else // @todo : allow to translate when english is missing - $this->warnings[] = sprintf(Tools::displayError('mail directory exists for %1$s but not for english in %s'), $lang, str_replace(_PS_ROOT_DIR_, '', $dir)); + $this->warnings[] = sprintf(Tools::displayError('mail directory exists for %1$s but not for english in %2$s'), + $lang, str_replace(_PS_ROOT_DIR_, '', $dir)); return $arr_return; } @@ -1320,7 +1321,9 @@ class AdminTranslationsControllerCore extends AdminController $str_return .= '

'.$title.' - '.$mails['empty_values'].' ' - .sprintf($this->l('missing translation(s) on %s template(s) for %s'), ''.((int)$mails['empty_values'] + (int)$mails['total_filled']).'', $obj_lang->name) + .sprintf($this->l('missing translation(s) on %1$s template(s) for %2$s'), + ''.((int)$mails['empty_values'] + (int)$mails['total_filled']).'', + $obj_lang->name) .':

'; if (!empty($mails['files']))