// fix added toolbar in AdminTranslationsController
git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@10444 b9a71923-0436-4b27-9f14-aed3839534dd
This commit is contained in:
@@ -24,141 +24,146 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<script type="text/javascript">
|
||||
function chooseTypeTranslation(id_lang)
|
||||
{
|
||||
getE('translation_lang').value = id_lang;
|
||||
document.getElementById('typeTranslationForm').submit();
|
||||
}
|
||||
</script>
|
||||
{extends file="helper/view/view.tpl"}
|
||||
|
||||
<fieldset class="width3"><legend><img src="../img/admin/translation.gif" />{l s='Modify translations'}</legend>
|
||||
{l s='Here you can modify translations for all text input into PrestaShop.'}<br />
|
||||
{l s='First, select a section (such as Back Office or Modules), then click the flag representing the language you want to edit.'}<br /><br />
|
||||
<form method="get" action="index.php" id="typeTranslationForm">
|
||||
<input type="hidden" name="tab" value="AdminTranslations" />
|
||||
<input type="hidden" name="lang" id="translation_lang" value="0" />
|
||||
<select name="type" style="float:left; margin-right:10px;">
|
||||
{foreach $translations as $key => $translation}
|
||||
<option value="{$key}">{$translation} </option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{foreach $languages as $language}
|
||||
<a href="javascript:chooseTypeTranslation('{$language['iso_code']}')">
|
||||
<img src="{$theme_lang_dir}{$language['id_lang']}.jpg" alt="{$language['iso_code']}" title="{$language['iso_code']}" />
|
||||
</a>
|
||||
{/foreach}
|
||||
<input type="hidden" name="token" value="{$token}" />
|
||||
</form>
|
||||
</fieldset>
|
||||
|
||||
<br /><h2>{l s='Translation exchange'}</h2>
|
||||
<form action="{$url_submit}" method="post" enctype="multipart/form-data">
|
||||
<fieldset class="width3">
|
||||
<legend>
|
||||
<img src="../img/admin/import.gif" />{l s='Add / Update a language'}
|
||||
</legend>
|
||||
<div id="submitAddLangContent" style="float:left;">
|
||||
<p>{l s='You can add or update a language directly from prestashop.com here'}</p>
|
||||
<div class="warn">
|
||||
{l s='If you choose to update an existing language pack, all your previous customization in the theme named prestashop will be lost. This includes front office expressions and default e-mail templates.'}
|
||||
</div>
|
||||
{if $packs_to_update || $packs_to_install}
|
||||
<div style="font-weight:bold; float:left;">{l s='Language you want to add or update:'}
|
||||
<select id="params_import_language" name="params_import_language">
|
||||
<optgroup label="{l s='Add a language'}">
|
||||
{foreach $packs_to_install as $lang_pack}
|
||||
<option value="{$lang_pack['iso_code']}|{$lang_pack['version']}">{$lang_pack['name']}</option>
|
||||
{/foreach}
|
||||
</optgroup>
|
||||
<optgroup label="{l s='Update a language'}">
|
||||
{foreach $packs_to_update as $lang_pack}
|
||||
<option value="{$lang_pack['iso_code']}|{$lang_pack['version']}">{$lang_pack['name']}</option>
|
||||
{/foreach}
|
||||
</optgroup>
|
||||
</select>
|
||||
<input type="submit" value="{l s='Add or update the language'}" name="submitAddLanguage" class="button" />
|
||||
</div>
|
||||
{else}
|
||||
<br /><br /><p class="error">{l s='Cannot connect to prestashop.com to get languages list.'}</p></div>
|
||||
{/if}
|
||||
</div>
|
||||
</fieldset>
|
||||
</form><br /><br />
|
||||
|
||||
<form action="{$url_submit}" method="post" enctype="multipart/form-data">
|
||||
<fieldset class="width3">
|
||||
<legend>
|
||||
<img src="../img/admin/import.gif" />{l s='Import a language pack manually'}
|
||||
</legend>
|
||||
<div id="submitImportContent">
|
||||
{l s='If the name format is: isocode.gzip (e.g. fr.gzip) and the language corresponding to this package does not exist, it will automatically be created.'}
|
||||
{l s='Be careful, as it will replace all existing data for the destination language!'}<br /><br />
|
||||
{l s='Language pack to import:'} <input type="file" name="file" /> <input type="submit" value="{l s='Import'}" name="submitImport" class="button" /></p>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
<br /><br />
|
||||
|
||||
<form action="{$url_submit}" method="post" enctype="multipart/form-data">
|
||||
<fieldset class="width3">
|
||||
<legend><img src="../img/admin/export.gif" />{l s='Export a language'}</legend>
|
||||
<p>{l s='Export data from one language to a file (language pack).'}<br />
|
||||
{l s='Choose the theme from which you want to export translations.'}<br />
|
||||
<select name="iso_code" style="margin-top:10px;">
|
||||
{block name="override_tpl"}
|
||||
<script type="text/javascript">
|
||||
function chooseTypeTranslation(id_lang)
|
||||
{
|
||||
getE('translation_lang').value = id_lang;
|
||||
document.getElementById('typeTranslationForm').submit();
|
||||
}
|
||||
</script>
|
||||
|
||||
<fieldset>
|
||||
<legend><img src="../img/admin/translation.gif" />{l s='Modify translations'}</legend>
|
||||
{l s='Here you can modify translations for all text input into PrestaShop.'}<br />
|
||||
{l s='First, select a section (such as Back Office or Modules), then click the flag representing the language you want to edit.'}<br /><br />
|
||||
<form method="get" action="index.php" id="typeTranslationForm">
|
||||
<input type="hidden" name="tab" value="AdminTranslations" />
|
||||
<input type="hidden" name="lang" id="translation_lang" value="0" />
|
||||
<select name="type" style="float:left; margin-right:10px;">
|
||||
{foreach $translations as $key => $translation}
|
||||
<option value="{$key}">{$translation} </option>
|
||||
{/foreach}
|
||||
</select>
|
||||
{foreach $languages as $language}
|
||||
<option value="{$language['iso_code']}">{$language['name']}</option>
|
||||
<a href="javascript:chooseTypeTranslation('{$language['iso_code']}')">
|
||||
<img src="{$theme_lang_dir}{$language['id_lang']}.jpg" alt="{$language['iso_code']}" title="{$language['iso_code']}" />
|
||||
</a>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
<select name="theme" style="margin-top:10px;">
|
||||
{foreach $themes as $theme}
|
||||
<option value="{$theme['name']}">{$theme['name']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<input type="submit" class="button" name="submitExport" value="{l s='Export'}" />
|
||||
<input type="hidden" name="token" value="{$token}" />
|
||||
</form>
|
||||
</fieldset>
|
||||
</form>
|
||||
<br /><br />
|
||||
<form action="{$url_submit}" method="post">
|
||||
<fieldset class="width3">
|
||||
<legend><img src="../img/admin/copy_files.gif" />{l s='Copy'}</legend>
|
||||
<p>{l s='Copies data from one language to another.'}<br />
|
||||
{l s='Be careful, as it will replace all existing data for the destination language!'}<br />
|
||||
{l s='If necessary'}, <b><a href="{$url_create_language}">{l s='first create a new language'}</a></b>.</p>
|
||||
<div style="float:left;">
|
||||
<p>
|
||||
<div style="width:75px; font-weight:bold; float:left;">{l s='From:'}</div>
|
||||
<select name="fromLang">';
|
||||
{foreach $languages as $language}
|
||||
<option value="{$language['iso_code']}">{$language['name']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
<select name="fromTheme">
|
||||
{foreach $themes as $theme}
|
||||
<option value="{$theme['name']}">{$theme['name']}</option>
|
||||
{/foreach}
|
||||
</select> <span style="font-style: bold; color: red;">*</span>
|
||||
</p>
|
||||
<p>
|
||||
<div style="width:75px; font-weight:bold; float:left;">{l s='To:'}</div>
|
||||
<select name="toLang">
|
||||
{foreach $languages as $language}
|
||||
<option value="{$language['iso_code']}">{$language['name']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
<select name="toTheme">
|
||||
{foreach $themes as $theme}
|
||||
<option value="{$theme['name']}">{$theme['name']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</p>
|
||||
</div>
|
||||
<div style="float:left;">
|
||||
<input type="submit" value="{l s=' Copy '}" name="submitCopyLang" class="button" style="margin:25px 0px 0px 25px;" />
|
||||
</div>
|
||||
<p style="clear: left; padding: 16px 0px 0px 0px;"><span style="font-style: bold; color: red;">*</span> {l s='Language files (as indicated at Tools >> Languages >> Edition) must be complete to allow copying of translations'}</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
<br /><h2>{l s='Translation exchange'}</h2>
|
||||
<form action="{$url_submit}" method="post" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<legend>
|
||||
<img src="../img/admin/import.gif" />{l s='Add / Update a language'}
|
||||
</legend>
|
||||
<div id="submitAddLangContent" style="float:left;">
|
||||
<p>{l s='You can add or update a language directly from prestashop.com here'}</p>
|
||||
<div class="warn">
|
||||
{l s='If you choose to update an existing language pack, all your previous customization in the theme named prestashop will be lost. This includes front office expressions and default e-mail templates.'}
|
||||
</div>
|
||||
{if $packs_to_update || $packs_to_install}
|
||||
<div style="font-weight:bold; float:left;">{l s='Language you want to add or update:'}
|
||||
<select id="params_import_language" name="params_import_language">
|
||||
<optgroup label="{l s='Add a language'}">
|
||||
{foreach $packs_to_install as $lang_pack}
|
||||
<option value="{$lang_pack['iso_code']}|{$lang_pack['version']}">{$lang_pack['name']}</option>
|
||||
{/foreach}
|
||||
</optgroup>
|
||||
<optgroup label="{l s='Update a language'}">
|
||||
{foreach $packs_to_update as $lang_pack}
|
||||
<option value="{$lang_pack['iso_code']}|{$lang_pack['version']}">{$lang_pack['name']}</option>
|
||||
{/foreach}
|
||||
</optgroup>
|
||||
</select>
|
||||
<input type="submit" value="{l s='Add or update the language'}" name="submitAddLanguage" class="button" />
|
||||
</div>
|
||||
{else}
|
||||
<br /><br /><p class="error">{l s='Cannot connect to prestashop.com to get languages list.'}</p></div>
|
||||
{/if}
|
||||
</div>
|
||||
</fieldset>
|
||||
</form><br /><br />
|
||||
|
||||
<form action="{$url_submit}" method="post" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<legend>
|
||||
<img src="../img/admin/import.gif" />{l s='Import a language pack manually'}
|
||||
</legend>
|
||||
<div id="submitImportContent">
|
||||
{l s='If the name format is: isocode.gzip (e.g. fr.gzip) and the language corresponding to this package does not exist, it will automatically be created.'}
|
||||
{l s='Be careful, as it will replace all existing data for the destination language!'}<br /><br />
|
||||
{l s='Language pack to import:'} <input type="file" name="file" /> <input type="submit" value="{l s='Import'}" name="submitImport" class="button" /></p>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
||||
<br /><br />
|
||||
|
||||
<form action="{$url_submit}" method="post" enctype="multipart/form-data">
|
||||
<fieldset>
|
||||
<legend><img src="../img/admin/export.gif" />{l s='Export a language'}</legend>
|
||||
<p>{l s='Export data from one language to a file (language pack).'}<br />
|
||||
{l s='Choose the theme from which you want to export translations.'}<br />
|
||||
<select name="iso_code" style="margin-top:10px;">
|
||||
{foreach $languages as $language}
|
||||
<option value="{$language['iso_code']}">{$language['name']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
<select name="theme" style="margin-top:10px;">
|
||||
{foreach $themes as $theme}
|
||||
<option value="{$theme['name']}">{$theme['name']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
<input type="submit" class="button" name="submitExport" value="{l s='Export'}" />
|
||||
</fieldset>
|
||||
</form>
|
||||
<br /><br />
|
||||
<form action="{$url_submit}" method="post">
|
||||
<fieldset>
|
||||
<legend><img src="../img/admin/copy_files.gif" />{l s='Copy'}</legend>
|
||||
<p>{l s='Copies data from one language to another.'}<br />
|
||||
{l s='Be careful, as it will replace all existing data for the destination language!'}<br />
|
||||
{l s='If necessary'}, <b><a href="{$url_create_language}">{l s='first create a new language'}</a></b>.</p>
|
||||
<div style="float:left;">
|
||||
<p>
|
||||
<div style="width:75px; font-weight:bold; float:left;">{l s='From:'}</div>
|
||||
<select name="fromLang">';
|
||||
{foreach $languages as $language}
|
||||
<option value="{$language['iso_code']}">{$language['name']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
<select name="fromTheme">
|
||||
{foreach $themes as $theme}
|
||||
<option value="{$theme['name']}">{$theme['name']}</option>
|
||||
{/foreach}
|
||||
</select> <span style="font-style: bold; color: red;">*</span>
|
||||
</p>
|
||||
<p>
|
||||
<div style="width:75px; font-weight:bold; float:left;">{l s='To:'}</div>
|
||||
<select name="toLang">
|
||||
{foreach $languages as $language}
|
||||
<option value="{$language['iso_code']}">{$language['name']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
|
||||
<select name="toTheme">
|
||||
{foreach $themes as $theme}
|
||||
<option value="{$theme['name']}">{$theme['name']}</option>
|
||||
{/foreach}
|
||||
</select>
|
||||
</p>
|
||||
</div>
|
||||
<div style="float:left;">
|
||||
<input type="submit" value="{l s=' Copy '}" name="submitCopyLang" class="button" style="margin:25px 0px 0px 25px;" />
|
||||
</div>
|
||||
<p style="clear: left; padding: 16px 0px 0px 0px;"><span style="font-style: bold; color: red;">*</span> {l s='Language files (as indicated at Tools >> Languages >> Edition) must be complete to allow copying of translations'}</p>
|
||||
</fieldset>
|
||||
</form>
|
||||
{/block}
|
||||
@@ -24,23 +24,29 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<h2>{l s='Language'} : {$lang} - {$translation_type}</h2>
|
||||
{l s='Errors to translate'} : <b>{$count}</b>
|
||||
{$limit_warning}
|
||||
{if !$suoshin_exceeded}
|
||||
<form method="post" action="{$url_submit}" class="form">
|
||||
{$auto_translate}
|
||||
<input type="hidden" name="lang" value="{$lang}" />
|
||||
<input type="submit" name="submitTranslations{$type|ucfirst}" value="{l s='Update translations'}" class="button" />
|
||||
<br /><br />
|
||||
<table cellpadding="0" cellspacing="0" class="table">
|
||||
{foreach $errorsArray as $key => $value}
|
||||
<tr {if empty($value)}style="background-color:#FBB"{else}{cycle values='class="alt_row",'}{/if}>
|
||||
<td>{$key|stripslashes}</td>
|
||||
<td style="width: 430px">= <input type="text" name="{$key|md5}" value="{$value|regex_replace:'#"#':'"'|stripslashes}" style="width: 380px"></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table><br />
|
||||
<input type="submit" name="submitTranslations{$type|ucfirst}" value="{l s='Update translations'}" class="button" />
|
||||
</form>
|
||||
{/if}
|
||||
{extends file="helper/view/view.tpl"}
|
||||
|
||||
{block name="override_tpl"}
|
||||
|
||||
<h2>{l s='Language'} : {$lang} - {$translation_type}</h2>
|
||||
{l s='Errors to translate'} : <b>{$count}</b>
|
||||
{$limit_warning}
|
||||
{if !$suoshin_exceeded}
|
||||
<form method="post" action="{$url_submit}" class="form">
|
||||
{$auto_translate}
|
||||
<input type="hidden" name="lang" value="{$lang}" />
|
||||
<input type="submit" name="submitTranslations{$type|ucfirst}" value="{l s='Update translations'}" class="button" />
|
||||
<br /><br />
|
||||
<table cellpadding="0" cellspacing="0" class="table">
|
||||
{foreach $errorsArray as $key => $value}
|
||||
<tr {if empty($value)}style="background-color:#FBB"{else}{cycle values='class="alt_row",'}{/if}>
|
||||
<td>{$key|stripslashes}</td>
|
||||
<td style="width: 430px">= <input type="text" name="{$key|md5}" value="{$value|regex_replace:'#"#':'"'|stripslashes}" style="width: 380px"></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table><br />
|
||||
<input type="submit" name="submitTranslations{$type|ucfirst}" value="{l s='Update translations'}" class="button" />
|
||||
</form>
|
||||
{/if}
|
||||
|
||||
{/block}
|
||||
@@ -24,48 +24,54 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<h2>{l s='Language'} : {$lang} - {$translation_type}</h2>
|
||||
{l s='Expressions to translate'} : <b>{$count}</b>. {l s='Click on the titles to open fieldsets'}.<br /><br />
|
||||
<p>{l s='total missing expresssions:'} {$missing_translations|array_sum} </p>
|
||||
{$limit_warning}
|
||||
{if !$suoshin_exceeded}
|
||||
<form method="post" action="{$url_submit}" class="form">
|
||||
{$toggle_button}
|
||||
{$auto_translate}
|
||||
<input type="hidden" name="lang" value="{$lang}" />
|
||||
<input type="submit" name="submitTranslations{$type|ucfirst}" value="{l s='Update translations'}" class="button" />
|
||||
<br /><br />
|
||||
{foreach $tabsArray as $k => $newLang}
|
||||
{if !empty($newLang)}
|
||||
<fieldset>
|
||||
<legend style="cursor : pointer" onclick="$('#{$k}-tpl').slideToggle();">
|
||||
{$k} - <font color="blue">{$newLang|count}</font> {l s='expressions'}
|
||||
{if isset($missing_translations[$k])}(<font color="red">{$missing_translations[$k]} {l s='missing'}</font>){/if}
|
||||
</legend>
|
||||
<div name="{$type}_div" id="{$k}-tpl" style="display:{if isset($missing_translations[$k])}block{else}none{/if}">
|
||||
<table cellpadding="2">
|
||||
{foreach $newLang as $key => $value}
|
||||
<tr>
|
||||
<td style="width: 40%">{$key|stripslashes}</td>
|
||||
<td>= {*todo : md5 is already calculated in AdminTranslationsController*}
|
||||
{if $key|strlen < $textarea_sized}
|
||||
<input type="text"
|
||||
style="width: 450px"
|
||||
name="{if in_array($type, array('front', 'fields'))}{$k}_{$key|md5}{else}{$k}{$key|md5}{/if}"
|
||||
value="{$value|regex_replace:'/"/':'"'|stripslashes}" />
|
||||
{else}
|
||||
<textarea rows="{($key|strlen / $textarea_sized)|intval}"
|
||||
style="width: 450px"
|
||||
name="{if in_array($type, array('front', 'fields'))}{$k}_{$key|md5}{else}{$k}{$key|md5}{/if}"
|
||||
>{$value|regex_replace:'/"/':'"'|stripslashes}</textarea>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
</fieldset><br />
|
||||
{/if}
|
||||
{/foreach}
|
||||
<br /><input type="submit" name="submitTranslations{$type|ucfirst}" value="{l s='Update translations'}" class="button" /></form>
|
||||
{/if}
|
||||
{extends file="helper/view/view.tpl"}
|
||||
|
||||
{block name="override_tpl"}
|
||||
|
||||
<h2>{l s='Language'} : {$lang} - {$translation_type}</h2>
|
||||
{l s='Expressions to translate'} : <b>{$count}</b>. {l s='Click on the titles to open fieldsets'}.<br /><br />
|
||||
<p>{l s='total missing expresssions:'} {$missing_translations|array_sum} </p>
|
||||
{$limit_warning}
|
||||
{if !$suoshin_exceeded}
|
||||
<form method="post" action="{$url_submit}" class="form">
|
||||
{$toggle_button}
|
||||
{$auto_translate}
|
||||
<input type="hidden" name="lang" value="{$lang}" />
|
||||
<input type="submit" name="submitTranslations{$type|ucfirst}" value="{l s='Update translations'}" class="button" />
|
||||
<br /><br />
|
||||
{foreach $tabsArray as $k => $newLang}
|
||||
{if !empty($newLang)}
|
||||
<fieldset>
|
||||
<legend style="cursor : pointer" onclick="$('#{$k}-tpl').slideToggle();">
|
||||
{$k} - <font color="blue">{$newLang|count}</font> {l s='expressions'}
|
||||
{if isset($missing_translations[$k])}(<font color="red">{$missing_translations[$k]} {l s='missing'}</font>){/if}
|
||||
</legend>
|
||||
<div name="{$type}_div" id="{$k}-tpl" style="display:{if isset($missing_translations[$k])}block{else}none{/if}">
|
||||
<table cellpadding="2">
|
||||
{foreach $newLang as $key => $value}
|
||||
<tr>
|
||||
<td style="width: 40%">{$key|stripslashes}</td>
|
||||
<td>= {*todo : md5 is already calculated in AdminTranslationsController*}
|
||||
{if $key|strlen < $textarea_sized}
|
||||
<input type="text"
|
||||
style="width: 450px"
|
||||
name="{if in_array($type, array('front', 'fields'))}{$k}_{$key|md5}{else}{$k}{$key|md5}{/if}"
|
||||
value="{$value|regex_replace:'/"/':'"'|stripslashes}" />
|
||||
{else}
|
||||
<textarea rows="{($key|strlen / $textarea_sized)|intval}"
|
||||
style="width: 450px"
|
||||
name="{if in_array($type, array('front', 'fields'))}{$k}_{$key|md5}{else}{$k}{$key|md5}{/if}"
|
||||
>{$value|regex_replace:'/"/':'"'|stripslashes}</textarea>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
</fieldset><br />
|
||||
{/if}
|
||||
{/foreach}
|
||||
<br /><input type="submit" name="submitTranslations{$type|ucfirst}" value="{l s='Update translations'}" class="button" /></form>
|
||||
{/if}
|
||||
|
||||
{/block}
|
||||
@@ -24,40 +24,46 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
{$tinyMCE}
|
||||
{extends file="helper/view/view.tpl"}
|
||||
|
||||
<h2>{l s='Language'} : {$lang} - {$translation_type}</h2>
|
||||
{l s='Click on the titles to open fieldsets'}.<br /><br />
|
||||
{if !$suoshin_exceeded}
|
||||
<form method="post" action="{$url_submit}" class="form">
|
||||
{$toggle_button}
|
||||
<input type="hidden" name="lang" value="{$lang}" />
|
||||
<input type="hidden" name="type" value="{$type}" />
|
||||
<input type="submit" name="submitTranslations{$type|ucfirst}" value="{l s='Update translations'}" class="button" />
|
||||
<input type="submit" name="submitTranslations{$type|ucfirst}AndStay" value="{l s='Update and stay'}" class="button" />
|
||||
<br /><br />
|
||||
|
||||
{l s='Core e-mails:'}
|
||||
{$mail_content}
|
||||
{block name="override_tpl"}
|
||||
|
||||
{l s='Modules e-mails:'}
|
||||
{foreach $module_mails as $module_name => $mails}
|
||||
{$mails['display']}
|
||||
{/foreach}
|
||||
{$tinyMCE}
|
||||
|
||||
{if !empty($theme_mails)}
|
||||
{l s='Themes e-mails:'}
|
||||
{$bool_title = false}
|
||||
{foreach $theme_mails as $theme_or_module_name => $mails}
|
||||
{if $theme_or_module_name != 'theme_mail' && !$bool_title}
|
||||
{$bool_title = true}
|
||||
{l s='E-mails modules in theme:'}
|
||||
{/if}
|
||||
<h2>{l s='Language'} : {$lang} - {$translation_type}</h2>
|
||||
{l s='Click on the titles to open fieldsets'}.<br /><br />
|
||||
{if !$suoshin_exceeded}
|
||||
<form method="post" action="{$url_submit}" class="form">
|
||||
{$toggle_button}
|
||||
<input type="hidden" name="lang" value="{$lang}" />
|
||||
<input type="hidden" name="type" value="{$type}" />
|
||||
<input type="submit" name="submitTranslations{$type|ucfirst}" value="{l s='Update translations'}" class="button" />
|
||||
<input type="submit" name="submitTranslations{$type|ucfirst}AndStay" value="{l s='Update and stay'}" class="button" />
|
||||
<br /><br />
|
||||
|
||||
{l s='Core e-mails:'}
|
||||
{$mail_content}
|
||||
|
||||
{l s='Modules e-mails:'}
|
||||
{foreach $module_mails as $module_name => $mails}
|
||||
{$mails['display']}
|
||||
{/foreach}
|
||||
|
||||
{if !empty($theme_mails)}
|
||||
{l s='Themes e-mails:'}
|
||||
{$bool_title = false}
|
||||
{foreach $theme_mails as $theme_or_module_name => $mails}
|
||||
{if $theme_or_module_name != 'theme_mail' && !$bool_title}
|
||||
{$bool_title = true}
|
||||
{l s='E-mails modules in theme:'}
|
||||
{/if}
|
||||
{$mails['display']}
|
||||
{/foreach}
|
||||
{/if}
|
||||
<br />
|
||||
<input type="submit" name="submitTranslations{$type|ucfirst}" value="{l s='Update translations'}" class="button" />
|
||||
<input type="submit" name="submitTranslations{$type|ucfirst}AndStay" value="{l s='Update and stay'}" class="button" />
|
||||
</form>
|
||||
{/if}
|
||||
<br />
|
||||
<input type="submit" name="submitTranslations{$type|ucfirst}" value="{l s='Update translations'}" class="button" />
|
||||
<input type="submit" name="submitTranslations{$type|ucfirst}AndStay" value="{l s='Update and stay'}" class="button" />
|
||||
</form>
|
||||
{/if}
|
||||
|
||||
{/block}
|
||||
@@ -24,71 +24,77 @@
|
||||
* International Registered Trademark & Property of PrestaShop SA
|
||||
*}
|
||||
|
||||
<h2>{l s='Language'} : {$lang} - {$translation_type}</h2>
|
||||
{l s='Expressions to translate'} : <b>{$count}</b>. {l s='Click on the titles to open fieldsets'}.<br /><br />
|
||||
{$limit_warning}
|
||||
{if !$suoshin_exceeded}
|
||||
<form method="post" action="{$url_submit}" class="form">
|
||||
{$toggle_button}
|
||||
{$auto_translate}
|
||||
<input type="hidden" name="lang" value="{$lang}" />
|
||||
<input type="submit" name="submitTranslations{$type|ucfirst}" value="{l s='Update translations'}" class="button" />
|
||||
<br /><br />
|
||||
{extends file="helper/view/view.tpl"}
|
||||
|
||||
{if count($modules_translations) > 1}
|
||||
<h3 style="padding:0;margin:0;">{l s='List of Themes - Click to access theme translation:'}</h3>
|
||||
<ul style="list-style-type:none;padding:0;margin:0 0 10px 0;">
|
||||
{foreach array_keys($modules_translations) as $theme}
|
||||
<li><a href="#{$theme}" class="link">- {if $theme === 'default'}{l s='default'}{else}$theme{/if}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
{foreach $modules_translations as $theme_name => $theme}
|
||||
<h2>>{l s='Theme:'} <a name="{$theme_name}">{if $theme_name === $default_theme_name}{l s='default'}{else}{$theme_name}{/if} </h2>
|
||||
{foreach $theme as $module_name => $module}
|
||||
{l s='Module:'} <a name="{$module_name}" style="font-style:italic">{$module_name}</a>
|
||||
{foreach $module as $template_name => $newLang}
|
||||
{if !empty($newLang)}
|
||||
{$occurrences = $newLang|array_count_values}
|
||||
{if isset($occurrences[''])}
|
||||
{$missing_translations = $occurrences['']}
|
||||
{else}
|
||||
{$missing_translations = 0}
|
||||
{block name="override_tpl"}
|
||||
|
||||
<h2>{l s='Language'} : {$lang} - {$translation_type}</h2>
|
||||
{l s='Expressions to translate'} : <b>{$count}</b>. {l s='Click on the titles to open fieldsets'}.<br /><br />
|
||||
{$limit_warning}
|
||||
{if !$suoshin_exceeded}
|
||||
<form method="post" action="{$url_submit}" class="form">
|
||||
{$toggle_button}
|
||||
{$auto_translate}
|
||||
<input type="hidden" name="lang" value="{$lang}" />
|
||||
<input type="submit" name="submitTranslations{$type|ucfirst}" value="{l s='Update translations'}" class="button" />
|
||||
<br /><br />
|
||||
|
||||
{if count($modules_translations) > 1}
|
||||
<h3 style="padding:0;margin:0;">{l s='List of Themes - Click to access theme translation:'}</h3>
|
||||
<ul style="list-style-type:none;padding:0;margin:0 0 10px 0;">
|
||||
{foreach array_keys($modules_translations) as $theme}
|
||||
<li><a href="#{$theme}" class="link">- {if $theme === 'default'}{l s='default'}{else}$theme{/if}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
{foreach $modules_translations as $theme_name => $theme}
|
||||
<h2>>{l s='Theme:'} <a name="{$theme_name}">{if $theme_name === $default_theme_name}{l s='default'}{else}{$theme_name}{/if} </h2>
|
||||
{foreach $theme as $module_name => $module}
|
||||
{l s='Module:'} <a name="{$module_name}" style="font-style:italic">{$module_name}</a>
|
||||
{foreach $module as $template_name => $newLang}
|
||||
{if !empty($newLang)}
|
||||
{$occurrences = $newLang|array_count_values}
|
||||
{if isset($occurrences[''])}
|
||||
{$missing_translations = $occurrences['']}
|
||||
{else}
|
||||
{$missing_translations = 0}
|
||||
{/if}
|
||||
<fieldset>
|
||||
<legend style="cursor : pointer" onclick="$('#{$theme_name}_{$module_name}_{$template_name}').slideToggle();">{if $theme_name === 'default'}{l s='default'}{else}{$theme_name}{/if} - {$template_name}
|
||||
<font color="blue">{$newLang|count}</font> {l s='expressions'} (<font color="red">{$missing_translations}</font>)
|
||||
</legend>
|
||||
<div name="{$type}_div" id="{$theme_name}_{$module_name}_{$template_name}" style="display:{if $missing_translations}block{else}none{/if}">
|
||||
<table cellpadding="2">
|
||||
{foreach $newLang as $key => $value}
|
||||
<tr>
|
||||
<td style="width: 40%">{$key|stripslashes}</td>
|
||||
<td>=
|
||||
{* Prepare name string for md5() *}
|
||||
{capture assign="name"}{strtolower($module_name)}_{strtolower($theme_name)}_{strtolower($template_name)}_{md5($key)}{/capture}
|
||||
{if $key|strlen < $textarea_sized}
|
||||
<input type="text"
|
||||
style="width: 450px"
|
||||
name="{$name|md5}"
|
||||
value="{$value|regex_replace:'#"#':'"'|stripslashes}" />
|
||||
{else}
|
||||
<textarea rows="{($key|strlen / $textarea_sized)|intval}"
|
||||
style="width: 450px"
|
||||
name="{$name|md5}">
|
||||
{$value|regex_replace:'#"#':'"'|stripslashes}
|
||||
</textarea>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
</fieldset><br />
|
||||
{/if}
|
||||
<fieldset>
|
||||
<legend style="cursor : pointer" onclick="$('#{$theme_name}_{$module_name}_{$template_name}').slideToggle();">{if $theme_name === 'default'}{l s='default'}{else}{$theme_name}{/if} - {$template_name}
|
||||
<font color="blue">{$newLang|count}</font> {l s='expressions'} (<font color="red">{$missing_translations}</font>)
|
||||
</legend>
|
||||
<div name="{$type}_div" id="{$theme_name}_{$module_name}_{$template_name}" style="display:{if $missing_translations}block{else}none{/if}">
|
||||
<table cellpadding="2">
|
||||
{foreach $newLang as $key => $value}
|
||||
<tr>
|
||||
<td style="width: 40%">{$key|stripslashes}</td>
|
||||
<td>=
|
||||
{* Prepare name string for md5() *}
|
||||
{capture assign="name"}{strtolower($module_name)}_{strtolower($theme_name)}_{strtolower($template_name)}_{md5($key)}{/capture}
|
||||
{if $key|strlen < $textarea_sized}
|
||||
<input type="text"
|
||||
style="width: 450px"
|
||||
name="{$name|md5}"
|
||||
value="{$value|regex_replace:'#"#':'"'|stripslashes}" />
|
||||
{else}
|
||||
<textarea rows="{($key|strlen / $textarea_sized)|intval}"
|
||||
style="width: 450px"
|
||||
name="{$name|md5}">
|
||||
{$value|regex_replace:'#"#':'"'|stripslashes}
|
||||
</textarea>
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
</fieldset><br />
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
<br /><input type="submit" name="submitTranslations{$type|ucfirst}" value="{l s='Update translations'}" class="button" /></form>
|
||||
{/if}
|
||||
<br /><input type="submit" name="submitTranslations{$type|ucfirst}" value="{l s='Update translations'}" class="button" /></form>
|
||||
{/if}
|
||||
|
||||
{/block}
|
||||
Reference in New Issue
Block a user