// fix AdminController translations

This commit is contained in:
tDidierjean
2011-11-23 22:21:25 +00:00
parent 331c0897a7
commit 6edf05d51e
+11 -9
View File
@@ -295,20 +295,20 @@ class AdminControllerCore extends Controller
$tabs = array_reverse($tabs); $tabs = array_reverse($tabs);
$bread = ''; $bread = '';
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
foreach ($tabs AS $key => $item) foreach ($tabs AS $key => $item)
@@ -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]))