gettext conversion

This commit is contained in:
Marc Delisle
2010-05-12 12:53:08 -04:00
parent c38f34393f
commit 00604060e8
4 changed files with 5 additions and 8 deletions

View File

@@ -1535,10 +1535,10 @@ function PMA_extractValueFromFormattedSize($formatted_size)
*/
function PMA_localisedDate($timestamp = -1, $format = '')
{
global $datefmt, $month, $day_of_week;
global $month, $day_of_week;
if ($format == '') {
$format = $datefmt;
$format = __('%B %d, %Y at %I:%M %p');
}
if ($timestamp == -1) {
@@ -1818,7 +1818,7 @@ function PMA_linkOrButton($url, $message, $tag_params = array(),
/**
* Returns a given timespan value in a readable format.
*
* @uses $GLOBALS['timespanfmt']
* @uses __('%s days, %s hours, %s minutes and %s seconds')
* @uses sprintf()
* @uses floor()
* @param int the timespan
@@ -1840,7 +1840,7 @@ function PMA_timespanFormat($seconds)
if ($days > 0 || $hours > 0 || $minutes > 0) {
$seconds -= $minutes * 60;
}
return sprintf($GLOBALS['timespanfmt'], (string)$days, (string)$hours, (string)$minutes, (string)$seconds);
return sprintf(__('%s days, %s hours, %s minutes and %s seconds'), (string)$days, (string)$hours, (string)$minutes, (string)$seconds);
}
/**

View File

@@ -27,8 +27,6 @@ $byteUnits = array(__('B'), __('KiB'), __('MiB'), __('GiB'), __('TiB'), __('PiB'
$day_of_week = array(__('Sun'), __('Mon'), __('Tue'), __('Wed'), __('Thu'), __('Fri'), __('Sat'));
$month = array(__('Jan'), __('Feb'), __('Mar'), __('Apr'), __('May'), __('Jun'), __('Jul'), __('Aug'), __('Sep'), __('Oct'), __('Nov'), __('Dec'));
/* l10n: See http://www.php.net/manual/en/function.strftime.php to define the format string */
$datefmt = __('%B %d, %Y at %I:%M %p');
$timespanfmt = __('%s days, %s hours, %s minutes and %s seconds');
$strAbortedClients = __('Aborted');
$strAccessDenied = __('Access denied');

View File

@@ -25,7 +25,7 @@ function PMA_transformation_text_plain__dateformat($buffer, $options = array(),
if (empty($options[1])) {
if ($options[2] == 'local') {
$options[1] = $GLOBALS['datefmt'];
$options[1] = __('%B %d, %Y at %I:%M %p');
} else {
$options[1] = 'Y-m-d H:i:s';
}

View File

@@ -257,7 +257,6 @@ class PMA_PDF extends TCPDF {
} // end of the "Error()" method
function Header()
{
// $datefmt
// We only show this if we find something in the new pdf_pages table
// This function must be named "Header" to work with the FPDF library