// fix translations modules notice

This commit is contained in:
mMarinetti
2012-03-01 10:13:42 +00:00
parent 22bdf9a3f0
commit 6cd96e78d3
2 changed files with 23 additions and 6 deletions
@@ -30,9 +30,23 @@
<h2>{l s='Language'} : {$lang} - {$translation_type}</h2>
{l s='Expressions to translate'} : <b>{$count}</b>.
<div class="hint" style="display:block;">{l s='Click on the titles to open fieldsets'}.</div><br />
{$limit_warning}
{if !$suoshin_exceeded}
{if $post_limit_exceeded}
<div class="warn">
{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:'}
<b>{$limit_warning['post.max_vars']}</b>{l s='for suhosin.post.max_vars.'}<br/>
<b>{$limit_warning['request.max_vars']}</b> {l s='for suhosin.request.max_vars.'}<br/>
{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:'}<br/>
<b>{$limit_warning['max_input_vars']}</b> {l s='for max_input_vars.'}<br/>
{l s='Please ask your hosting provider to increase the this limit to'}
{/if}
<u><b>{$limit_warning['needed_limit']}</b></u> {l s='at least.'} {l s='or edit the translation file manually.'}
</div>
{else}
<div class="hint" style="display:block;">{l s='Click on the titles to open fieldsets'}.</div><br />
<form method="post" id="{$table}_form" action="{$url_submit}" class="form">
{$toggle_button}
<input type="hidden" name="lang" value="{$lang}" />
@@ -94,4 +108,4 @@
{/foreach}
{/if}
{/block}
{/block}
@@ -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 .= '
<div class="mails_field" >
<h3 style="cursor : pointer" onclick="$(\'#'.$id_html.'\').slideToggle();">'.$title.' - <font color="red">'.$mails['empty_values'].'</font> '
.sprintf($this->l('missing translation(s) on %s template(s) for %s'), '<font color="blue">'.((int)$mails['empty_values'] + (int)$mails['total_filled']).'</font>', $obj_lang->name)
.sprintf($this->l('missing translation(s) on %1$s template(s) for %2$s'),
'<font color="blue">'.((int)$mails['empty_values'] + (int)$mails['total_filled']).'</font>',
$obj_lang->name)
.':</h3>
<div name="mails_div" id="'.$id_html.'">';
if (!empty($mails['files']))