From c78ee96697b8f5119c06e0689395dbd24f9cd69e Mon Sep 17 00:00:00 2001 From: Marc Delisle Date: Thu, 20 May 2010 07:49:15 -0400 Subject: [PATCH] gettext conversion --- libraries/common.lib.php | 17 ++++++++++++++++- libraries/config.default.php | 23 ----------------------- 2 files changed, 16 insertions(+), 24 deletions(-) diff --git a/libraries/common.lib.php b/libraries/common.lib.php index 4d36eef66..ec2f8eb67 100644 --- a/libraries/common.lib.php +++ b/libraries/common.lib.php @@ -2814,7 +2814,22 @@ function PMA_duplicateFirstNewline($string){ * or $cfg['DefaultTabDatabase'] */ function PMA_getTitleForTarget($target) { - return $GLOBALS[$GLOBALS['cfg']['DefaultTabTranslationMapping'][$target]]; + +$mapping = array( + // Values for $cfg['DefaultTabTable'] + 'tbl_structure.php' => __('Structure'), + 'tbl_sql.php' => __('SQL'), + 'tbl_select.php' =>__('Search'), + 'tbl_change.php' =>__('Insert'), + 'sql.php' => __('Browse'), + + // Values for $cfg['DefaultTabDatabase'] + 'db_structure.php' => __('Structure'), + 'db_sql.php' => __('SQL'), + 'db_search.php' => __('Search'), + 'db_operations.php' => __('Operations'), +); + return $mapping[$target]; } function PMA_js($code, $print=true) diff --git a/libraries/config.default.php b/libraries/config.default.php index 64628bb5b..dc082746d 100644 --- a/libraries/config.default.php +++ b/libraries/config.default.php @@ -1055,29 +1055,6 @@ $cfg['DefaultTabDatabase'] = 'db_structure.php'; */ $cfg['DefaultTabTable'] = 'sql.php'; -/** - * Mapping between script filenames and translation keys - * - * Lookup can be performed by PMA_getTitleForTarget() - * - * @global string $cfg['DefaultTabTranslationMapping'] - */ -$cfg['DefaultTabTranslationMapping'] = array( - - // Values for $cfg['DefaultTabTable'] - 'tbl_structure.php' => 'strStructure', - 'tbl_sql.php' => 'strSQL', - 'tbl_select.php' => 'strSearch', - 'tbl_change.php' => 'strInsert', - 'sql.php' => 'strBrowse', - - // Values for $cfg['DefaultTabDatabase'] - 'db_structure.php' => 'strStructure', - 'db_sql.php' => 'strSQL', - 'db_search.php' => 'strSearch', - 'db_operations.php' => 'strOperations', -); - /******************************************************************************* * Export defaults */