Setup script update

* removed server numbers from language strings
* changed some variable names in FormDisplay to make it more consistent
This commit is contained in:
Piotr Przybylski
2008-09-04 12:22:12 +00:00
parent 1030a66e8c
commit 296bd5679e
4 changed files with 122 additions and 101 deletions

View File

@@ -189,6 +189,34 @@ function PMA_lang($lang_key)
}
}
/**
* Returns translated field name
*
* @param string $canonical_path
* @return string
*/
function PMA_lang_name($canonical_path)
{
$lang_key = str_replace('Servers/1/', 'Servers/', $canonical_path) . '_name';
return isset($GLOBALS['str'][$lang_key])
? $GLOBALS['str'][$lang_key]
: $lang_key;
}
/**
* Returns translated field description
*
* @param string $canonical_path
* @return string
*/
function PMA_lang_desc($canonical_path)
{
$lang_key = str_replace('Servers/1/', 'Servers/', $canonical_path) . '_desc';
return isset($GLOBALS['str'][$lang_key])
? $GLOBALS['str'][$lang_key]
: '';
}
/**
* Wraps link in <a> tags and replaces argument separator in internal links
* to the one returned by PMA_get_arg_separator()