From 631e33affe247afa8ad836851cba8cd7dccaa247 Mon Sep 17 00:00:00 2001 From: tDidierjean Date: Tue, 20 Dec 2011 16:48:05 +0000 Subject: [PATCH] // AdminTranslations: fix toolbar and remove google translate git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@11429 b9a71923-0436-4b27-9f14-aed3839534dd --- .../themes/template/translations/translation_errors.tpl | 9 ++++----- .../themes/template/translations/translation_form.tpl | 7 +++---- .../themes/template/translations/translation_mails.tpl | 9 +++------ .../themes/template/translations/translation_modules.tpl | 7 +++---- controllers/admin/AdminTranslationsController.php | 9 +++------ 5 files changed, 16 insertions(+), 25 deletions(-) diff --git a/admin-dev/themes/template/translations/translation_errors.tpl b/admin-dev/themes/template/translations/translation_errors.tpl index ca44e5ed4..1d1af5920 100644 --- a/admin-dev/themes/template/translations/translation_errors.tpl +++ b/admin-dev/themes/template/translations/translation_errors.tpl @@ -32,10 +32,10 @@ {l s='Errors to translate'} : {$count} {$limit_warning} {if !$suoshin_exceeded} -
- {$auto_translate} + + {*{$auto_translate}$*} - +

{foreach $errorsArray as $key => $value} @@ -44,8 +44,7 @@ {/foreach} -
=

- +
{/if} diff --git a/admin-dev/themes/template/translations/translation_form.tpl b/admin-dev/themes/template/translations/translation_form.tpl index adffbdfe9..9d0d58a86 100644 --- a/admin-dev/themes/template/translations/translation_form.tpl +++ b/admin-dev/themes/template/translations/translation_form.tpl @@ -33,11 +33,11 @@

{l s='total missing expresssions:'} {$missing_translations|array_sum}

{$limit_warning} {if !$suoshin_exceeded} -
+ {$toggle_button} - {include file="translations/auto_translate.tpl"} + {*{include file="translations/auto_translate.tpl"}*} - +

{foreach $tabsArray as $k => $newLang} {if !empty($newLang)} @@ -71,7 +71,6 @@
{/if} {/foreach} -
{/if} {/block} \ No newline at end of file diff --git a/admin-dev/themes/template/translations/translation_mails.tpl b/admin-dev/themes/template/translations/translation_mails.tpl index 9baf80b68..891865303 100644 --- a/admin-dev/themes/template/translations/translation_mails.tpl +++ b/admin-dev/themes/template/translations/translation_mails.tpl @@ -33,12 +33,12 @@

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

{l s='Click on the titles to open fieldsets'}.

{if !$suoshin_exceeded} -
+ {$toggle_button} - - + + {**}

{l s='Core e-mails:'} @@ -60,9 +60,6 @@ {$mails['display']} {/foreach} {/if} -
- -
{/if} diff --git a/admin-dev/themes/template/translations/translation_modules.tpl b/admin-dev/themes/template/translations/translation_modules.tpl index d121f22ed..5f3e012c9 100644 --- a/admin-dev/themes/template/translations/translation_modules.tpl +++ b/admin-dev/themes/template/translations/translation_modules.tpl @@ -32,11 +32,11 @@ {l s='Expressions to translate'} : {$count}. {l s='Click on the titles to open fieldsets'}.

{$limit_warning} {if !$suoshin_exceeded} -
+ {$toggle_button} - {include file="translations/auto_translate.tpl"} + {*{include file="translations/auto_translate.tpl"}*} - +

{if count($modules_translations) > 1} @@ -92,7 +92,6 @@ {/foreach} {/foreach} {/foreach} -
{/if} {/block} \ No newline at end of file diff --git a/controllers/admin/AdminTranslationsController.php b/controllers/admin/AdminTranslationsController.php index b016c9a6d..f6db168c7 100644 --- a/controllers/admin/AdminTranslationsController.php +++ b/controllers/admin/AdminTranslationsController.php @@ -48,6 +48,7 @@ class AdminTranslationsControllerCore extends AdminController { parent::__construct(); + $this->table = 'translations'; include_once(_PS_ADMIN_DIR_.'/../tools/tar/Archive_Tar.php'); include_once(_PS_ADMIN_DIR_.'/../tools/pear/PEAR.php'); @@ -68,17 +69,14 @@ class AdminTranslationsControllerCore extends AdminController public function initToolbar() { - $this->toolbar_btn = array(); -/* $this->toolbar_btn['save'] = array( - 'href' => self::$currentIndex.'&token='.$this->token, + 'href' => '#', 'desc' => $this->l('Update translations') ); $this->toolbar_btn['cancel'] = array( 'href' => self::$currentIndex.'&token='.$this->token, 'desc' => $this->l('Cancel') ); -*/ } public function initMain() @@ -896,7 +894,7 @@ class AdminTranslationsControllerCore extends AdminController ); // 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->base_tpl_view = 'translation_form.tpl'; @@ -906,7 +904,6 @@ class AdminTranslationsControllerCore extends AdminController public function initFormBack($lang) { $_LANGADM = $this->fileExists(_PS_TRANSLATIONS_DIR_.$lang, 'admin.php', '_LANGADM'); - $str_output = ''; // count will contain the number of expressions of the page $count = 0; $missing_translations = array();