gettext conversion

This commit is contained in:
Marc Delisle
2010-05-20 07:49:15 -04:00
parent 5636db6db9
commit c78ee96697
2 changed files with 16 additions and 24 deletions

View File

@@ -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)

View File

@@ -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
*/