From 759ba35e13078ce631c6bf2b9402852c27fb7b78 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20=C4=8Ciha=C5=99?= Date: Wed, 30 Oct 2013 13:51:18 +0100 Subject: [PATCH] Reuse existing message with translation for alt text --- libraries/navigation/Nodes/Node_Column_Container.class.php | 5 +++-- libraries/navigation/Nodes/Node_Function_Container.class.php | 5 +++-- libraries/navigation/Nodes/Node_Index_Container.class.php | 5 +++-- .../navigation/Nodes/Node_Procedure_Container.class.php | 5 +++-- libraries/navigation/Nodes/Node_Table_Container.class.php | 5 +++-- libraries/navigation/Nodes/Node_View_Container.class.php | 5 +++-- 6 files changed, 18 insertions(+), 12 deletions(-) diff --git a/libraries/navigation/Nodes/Node_Column_Container.class.php b/libraries/navigation/Nodes/Node_Column_Container.class.php index 4e70d287ab..3bb1462135 100644 --- a/libraries/navigation/Nodes/Node_Column_Container.class.php +++ b/libraries/navigation/Nodes/Node_Column_Container.class.php @@ -35,9 +35,10 @@ class Node_Column_Container extends Node ); $this->real_name = 'columns'; - $new = PMA_NodeFactory::getInstance('Node', _pgettext('Create new column', 'New')); + $new_label = _pgettext('Create new column', 'New'); + $new = PMA_NodeFactory::getInstance('Node', $new_label); $new->isNew = true; - $new->icon = PMA_Util::getImage('b_column_add.png', __('New')); + $new->icon = PMA_Util::getImage('b_column_add.png', $new_label); $new->links = array( 'text' => 'tbl_addfield.php?server=' . $GLOBALS['server'] . '&db=%3$s&table=%2$s' diff --git a/libraries/navigation/Nodes/Node_Function_Container.class.php b/libraries/navigation/Nodes/Node_Function_Container.class.php index fd4b0be3ac..6d7ff95cc0 100644 --- a/libraries/navigation/Nodes/Node_Function_Container.class.php +++ b/libraries/navigation/Nodes/Node_Function_Container.class.php @@ -33,9 +33,10 @@ class Node_Function_Container extends Node ); $this->real_name = 'functions'; - $new = PMA_NodeFactory::getInstance('Node', _pgettext('Create new function', 'New')); + $new_label = _pgettext('Create new function', 'New'); + $new = PMA_NodeFactory::getInstance('Node', $new_label); $new->isNew = true; - $new->icon = PMA_Util::getImage('b_routine_add.png', __('New')); + $new->icon = PMA_Util::getImage('b_routine_add.png', $new_label); $new->links = array( 'text' => 'db_routines.php?server=' . $GLOBALS['server'] . '&db=%2$s&token=' . $GLOBALS['token'] diff --git a/libraries/navigation/Nodes/Node_Index_Container.class.php b/libraries/navigation/Nodes/Node_Index_Container.class.php index 67b344997b..89035150cf 100644 --- a/libraries/navigation/Nodes/Node_Index_Container.class.php +++ b/libraries/navigation/Nodes/Node_Index_Container.class.php @@ -35,9 +35,10 @@ class Node_Index_Container extends Node ); $this->real_name = 'indexes'; - $new = PMA_NodeFactory::getInstance('Node', _pgettext('Create new index', 'New')); + $new_label = _pgettext('Create new index', 'New'); + $new = PMA_NodeFactory::getInstance('Node', $new_label); $new->isNew = true; - $new->icon = PMA_Util::getImage('b_index_add.png', __('New')); + $new->icon = PMA_Util::getImage('b_index_add.png', $new_label); $new->links = array( 'text' => 'tbl_indexes.php?server=' . $GLOBALS['server'] . '&create_index=1&added_fields=2' diff --git a/libraries/navigation/Nodes/Node_Procedure_Container.class.php b/libraries/navigation/Nodes/Node_Procedure_Container.class.php index ba062028f7..b46f93c024 100644 --- a/libraries/navigation/Nodes/Node_Procedure_Container.class.php +++ b/libraries/navigation/Nodes/Node_Procedure_Container.class.php @@ -33,9 +33,10 @@ class Node_Procedure_Container extends Node ); $this->real_name = 'procedures'; - $new = PMA_NodeFactory::getInstance('Node', _pgettext('Create new procedure', 'New')); + $new_label = _pgettext('Create new procedure', 'New'); + $new = PMA_NodeFactory::getInstance('Node', $new_label); $new->isNew = true; - $new->icon = PMA_Util::getImage('b_routine_add.png', __('New')); + $new->icon = PMA_Util::getImage('b_routine_add.png', $new_label); $new->links = array( 'text' => 'db_routines.php?server=' . $GLOBALS['server'] . '&db=%2$s&token=' . $GLOBALS['token'] diff --git a/libraries/navigation/Nodes/Node_Table_Container.class.php b/libraries/navigation/Nodes/Node_Table_Container.class.php index 07fdadaf71..aac3e59ca0 100644 --- a/libraries/navigation/Nodes/Node_Table_Container.class.php +++ b/libraries/navigation/Nodes/Node_Table_Container.class.php @@ -38,9 +38,10 @@ class Node_Table_Container extends Node $this->real_name = 'tables'; $this->classes = 'tableContainer'; - $new = PMA_NodeFactory::getInstance('Node', _pgettext('Create new table', 'New')); + $new_label = _pgettext('Create new table', 'New'); + $new = PMA_NodeFactory::getInstance('Node', $new_label); $new->isNew = true; - $new->icon = PMA_Util::getImage('b_table_add.png', __('New')); + $new->icon = PMA_Util::getImage('b_table_add.png', $new_label); $new->links = array( 'text' => 'tbl_create.php?server=' . $GLOBALS['server'] . '&db=%2$s&token=' . $GLOBALS['token'], diff --git a/libraries/navigation/Nodes/Node_View_Container.class.php b/libraries/navigation/Nodes/Node_View_Container.class.php index fd4100a4bb..059afc9447 100644 --- a/libraries/navigation/Nodes/Node_View_Container.class.php +++ b/libraries/navigation/Nodes/Node_View_Container.class.php @@ -34,9 +34,10 @@ class Node_View_Container extends Node $this->classes = 'viewContainer'; $this->real_name = 'views'; - $new = PMA_NodeFactory::getInstance('Node', _pgettext('Create new view', 'New')); + $new_label = _pgettext('Create new view', 'New'); + $new = PMA_NodeFactory::getInstance('Node', $new_label); $new->isNew = true; - $new->icon = PMA_Util::getImage('b_view_add.png', __('New')); + $new->icon = PMA_Util::getImage('b_view_add.png', $new_label); $new->links = array( 'text' => 'view_create.php?server=' . $GLOBALS['server'] . '&db=%2$s&token=' . $GLOBALS['token'],