// AdminTranslations: fix toolbar and remove google translate
This commit is contained in:
@@ -32,10 +32,10 @@
|
|||||||
{l s='Errors to translate'} : <b>{$count}</b>
|
{l s='Errors to translate'} : <b>{$count}</b>
|
||||||
{$limit_warning}
|
{$limit_warning}
|
||||||
{if !$suoshin_exceeded}
|
{if !$suoshin_exceeded}
|
||||||
<form method="post" action="{$url_submit}" class="form">
|
<form method="post" id="{$table}_form" action="{$url_submit}" class="form">
|
||||||
{$auto_translate}
|
{*{$auto_translate}$*}
|
||||||
<input type="hidden" name="lang" value="{$lang}" />
|
<input type="hidden" name="lang" value="{$lang}" />
|
||||||
<input type="submit" name="submitTranslations{$type|ucfirst}" value="{l s='Update translations'}" class="button" />
|
<input type="submit" id="{$table}_form_submit_btn" name="submitTranslations{$type|ucfirst}" value="{l s='Update translations'}" class="button" />
|
||||||
<br /><br />
|
<br /><br />
|
||||||
<table cellpadding="0" cellspacing="0" class="table">
|
<table cellpadding="0" cellspacing="0" class="table">
|
||||||
{foreach $errorsArray as $key => $value}
|
{foreach $errorsArray as $key => $value}
|
||||||
@@ -44,8 +44,7 @@
|
|||||||
<td style="width: 430px">= <input type="text" name="{$key|md5}" value="{$value|regex_replace:'#"#':'"'|stripslashes}" style="width: 380px"></td>
|
<td style="width: 430px">= <input type="text" name="{$key|md5}" value="{$value|regex_replace:'#"#':'"'|stripslashes}" style="width: 380px"></td>
|
||||||
</tr>
|
</tr>
|
||||||
{/foreach}
|
{/foreach}
|
||||||
</table><br />
|
</table>
|
||||||
<input type="submit" name="submitTranslations{$type|ucfirst}" value="{l s='Update translations'}" class="button" />
|
|
||||||
</form>
|
</form>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|||||||
@@ -33,11 +33,11 @@
|
|||||||
<p>{l s='total missing expresssions:'} {$missing_translations|array_sum} </p>
|
<p>{l s='total missing expresssions:'} {$missing_translations|array_sum} </p>
|
||||||
{$limit_warning}
|
{$limit_warning}
|
||||||
{if !$suoshin_exceeded}
|
{if !$suoshin_exceeded}
|
||||||
<form method="post" action="{$url_submit}" class="form">
|
<form method="post" id="{$table}_form" action="{$url_submit}" class="form">
|
||||||
{$toggle_button}
|
{$toggle_button}
|
||||||
{include file="translations/auto_translate.tpl"}
|
{*{include file="translations/auto_translate.tpl"}*}
|
||||||
<input type="hidden" name="lang" value="{$lang}" />
|
<input type="hidden" name="lang" value="{$lang}" />
|
||||||
<input type="submit" name="submitTranslations{$type|ucfirst}" value="{l s='Update translations'}" class="button" />
|
<input type="submit" id="{$table}_form_submit_btn" name="submitTranslations{$type|ucfirst}" value="{l s='Update translations'}" class="button" />
|
||||||
<br /><br />
|
<br /><br />
|
||||||
{foreach $tabsArray as $k => $newLang}
|
{foreach $tabsArray as $k => $newLang}
|
||||||
{if !empty($newLang)}
|
{if !empty($newLang)}
|
||||||
@@ -71,7 +71,6 @@
|
|||||||
</fieldset><br />
|
</fieldset><br />
|
||||||
{/if}
|
{/if}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
<br /><input type="submit" name="submitTranslations{$type|ucfirst}" value="{l s='Update translations'}" class="button" /></form>
|
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{/block}
|
{/block}
|
||||||
@@ -33,12 +33,12 @@
|
|||||||
<h2>{l s='Language'} : {$lang} - {$translation_type}</h2>
|
<h2>{l s='Language'} : {$lang} - {$translation_type}</h2>
|
||||||
{l s='Click on the titles to open fieldsets'}.<br /><br />
|
{l s='Click on the titles to open fieldsets'}.<br /><br />
|
||||||
{if !$suoshin_exceeded}
|
{if !$suoshin_exceeded}
|
||||||
<form method="post" action="{$url_submit}" class="form">
|
<form method="post" id="{$table}_form" action="{$url_submit}" class="form">
|
||||||
{$toggle_button}
|
{$toggle_button}
|
||||||
<input type="hidden" name="lang" value="{$lang}" />
|
<input type="hidden" name="lang" value="{$lang}" />
|
||||||
<input type="hidden" name="type" value="{$type}" />
|
<input type="hidden" name="type" value="{$type}" />
|
||||||
<input type="submit" name="submitTranslations{$type|ucfirst}" value="{l s='Update translations'}" class="button" />
|
<input type="submit" id="{$table}_form_submit_btn" 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" />
|
{*<input type="submit" name="submitTranslations{$type|ucfirst}AndStay" value="{l s='Update and stay'}" class="button" />*}
|
||||||
<br /><br />
|
<br /><br />
|
||||||
|
|
||||||
{l s='Core e-mails:'}
|
{l s='Core e-mails:'}
|
||||||
@@ -60,9 +60,6 @@
|
|||||||
{$mails['display']}
|
{$mails['display']}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
{/if}
|
{/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>
|
</form>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|||||||
@@ -32,11 +32,11 @@
|
|||||||
{l s='Expressions to translate'} : <b>{$count}</b>. {l s='Click on the titles to open fieldsets'}.<br /><br />
|
{l s='Expressions to translate'} : <b>{$count}</b>. {l s='Click on the titles to open fieldsets'}.<br /><br />
|
||||||
{$limit_warning}
|
{$limit_warning}
|
||||||
{if !$suoshin_exceeded}
|
{if !$suoshin_exceeded}
|
||||||
<form method="post" action="{$url_submit}" class="form">
|
<form method="post" id="{$table}_form" action="{$url_submit}" class="form">
|
||||||
{$toggle_button}
|
{$toggle_button}
|
||||||
{include file="translations/auto_translate.tpl"}
|
{*{include file="translations/auto_translate.tpl"}*}
|
||||||
<input type="hidden" name="lang" value="{$lang}" />
|
<input type="hidden" name="lang" value="{$lang}" />
|
||||||
<input type="submit" name="submitTranslations{$type|ucfirst}" value="{l s='Update translations'}" class="button" />
|
<input type="submit" id="{$table}_form_submit_btn" name="submitTranslations{$type|ucfirst}" value="{l s='Update translations'}" class="button" />
|
||||||
<br /><br />
|
<br /><br />
|
||||||
|
|
||||||
{if count($modules_translations) > 1}
|
{if count($modules_translations) > 1}
|
||||||
@@ -92,7 +92,6 @@
|
|||||||
{/foreach}
|
{/foreach}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
{/foreach}
|
{/foreach}
|
||||||
<br /><input type="submit" name="submitTranslations{$type|ucfirst}" value="{l s='Update translations'}" class="button" /></form>
|
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
{/block}
|
{/block}
|
||||||
@@ -48,6 +48,7 @@ class AdminTranslationsControllerCore extends AdminController
|
|||||||
{
|
{
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
|
|
||||||
|
$this->table = 'translations';
|
||||||
include_once(_PS_ADMIN_DIR_.'/../tools/tar/Archive_Tar.php');
|
include_once(_PS_ADMIN_DIR_.'/../tools/tar/Archive_Tar.php');
|
||||||
include_once(_PS_ADMIN_DIR_.'/../tools/pear/PEAR.php');
|
include_once(_PS_ADMIN_DIR_.'/../tools/pear/PEAR.php');
|
||||||
|
|
||||||
@@ -68,17 +69,14 @@ class AdminTranslationsControllerCore extends AdminController
|
|||||||
|
|
||||||
public function initToolbar()
|
public function initToolbar()
|
||||||
{
|
{
|
||||||
$this->toolbar_btn = array();
|
|
||||||
/*
|
|
||||||
$this->toolbar_btn['save'] = array(
|
$this->toolbar_btn['save'] = array(
|
||||||
'href' => self::$currentIndex.'&token='.$this->token,
|
'href' => '#',
|
||||||
'desc' => $this->l('Update translations')
|
'desc' => $this->l('Update translations')
|
||||||
);
|
);
|
||||||
$this->toolbar_btn['cancel'] = array(
|
$this->toolbar_btn['cancel'] = array(
|
||||||
'href' => self::$currentIndex.'&token='.$this->token,
|
'href' => self::$currentIndex.'&token='.$this->token,
|
||||||
'desc' => $this->l('Cancel')
|
'desc' => $this->l('Cancel')
|
||||||
);
|
);
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function initMain()
|
public function initMain()
|
||||||
@@ -896,7 +894,7 @@ class AdminTranslationsControllerCore extends AdminController
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Add js variables needed for autotranslate
|
// Add js variables needed for autotranslate
|
||||||
$this->tpl_view_vars = array_merge($this->tpl_view_vars, $this->initAutoTranslate());
|
//$this->tpl_view_vars = array_merge($this->tpl_view_vars, $this->initAutoTranslate());
|
||||||
|
|
||||||
$this->initToolbar();
|
$this->initToolbar();
|
||||||
$this->base_tpl_view = 'translation_form.tpl';
|
$this->base_tpl_view = 'translation_form.tpl';
|
||||||
@@ -906,7 +904,6 @@ class AdminTranslationsControllerCore extends AdminController
|
|||||||
public function initFormBack($lang)
|
public function initFormBack($lang)
|
||||||
{
|
{
|
||||||
$_LANGADM = $this->fileExists(_PS_TRANSLATIONS_DIR_.$lang, 'admin.php', '_LANGADM');
|
$_LANGADM = $this->fileExists(_PS_TRANSLATIONS_DIR_.$lang, 'admin.php', '_LANGADM');
|
||||||
$str_output = '';
|
|
||||||
// count will contain the number of expressions of the page
|
// count will contain the number of expressions of the page
|
||||||
$count = 0;
|
$count = 0;
|
||||||
$missing_translations = array();
|
$missing_translations = array();
|
||||||
|
|||||||
Reference in New Issue
Block a user