// fix AdminController translations

This commit is contained in:
tDidierjean committed 2011-11-23 22:21:25 +00:00
1 parent 331c0897a7
commit 6edf05d51e
1 file changed
+8 -6
+8 -6
View File
@@ -298,16 +298,16 @@ class AdminControllerCore extends Controller
switch ($this->display) switch ($this->display)
{ {
case 'edit': case 'edit':
array_pop($tabs); $current_tab = array_pop($tabs);
$tabs[] = array('name' => sprintf($this->l('Edit %s'), $this->table)); $tabs[] = array('name' => sprintf($this->l('Edit %s'), $current_tab['name']));
break; break;
case 'add': case 'add':
array_pop($tabs); $current_tab = array_pop($tabs);
$tabs[] = array('name' => sprintf($this->l('Add %s'), $this->table)); $tabs[] = array('name' => sprintf($this->l('Add %s'), $current_tab['name']));
break; break;
case 'view': case 'view':
array_pop($tabs); $current_tab = array_pop($tabs);
$tabs[] = array('name' => sprintf($this->l('View %s'), $this->table)); $tabs[] = array('name' => sprintf($this->l('View %s'), $current_tab['name']));
break; break;
} }
// note : this should use a tpl file // note : this should use a tpl file
@@ -1572,6 +1572,8 @@ class AdminControllerCore extends Controller
// @todo : change AdminTab to Helper // @todo : change AdminTab to Helper
if ( isset($_LANGADM[$class.$key])) if ( isset($_LANGADM[$class.$key]))
$str = $_LANGADM[$class.$key]; $str = $_LANGADM[$class.$key];
elseif ( isset($_LANGADM['admincontroller'.$key]))
$str = $_LANGADM['admincontroller'.$key];
elseif ( isset($_LANGADM['helper'.$key])) elseif ( isset($_LANGADM['helper'.$key]))
$str = $_LANGADM['helper'.$key]; $str = $_LANGADM['helper'.$key];
elseif ( isset($_LANGADM['admintab'.$key])) elseif ( isset($_LANGADM['admintab'.$key]))