Use full strings for i18n friendliness. Props nbachiyski. see #3962

git-svn-id: http://svn.automattic.com/wordpress/trunk@10770 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2009-03-11 15:46:16 +00:00
parent 7ceebc2a27
commit c569b75494
1 changed files with 7 additions and 8 deletions

View File

@ -152,11 +152,9 @@ if (empty($tzstring)) { // set the Etc zone if no timezone string exists
<span id="local-time"><?php printf(__('Current time in %1$s is <code>%2$s</code>'), get_option('timezone_string'), date_i18n(__('Y-m-d G:i:s'))); ?>
<br />
<?php
_e('This timezone is currently in ');
$now = localtime(time(),true);
if ($now['tm_isdst']) _e('daylight savings');
else _e('standard');
_e(' time.');
if ($now['tm_isdst']) _e('This timezone is currently in daylight savings time.');
else _e('This timezone is currently in standard time.');
?>
<br />
<?php
@ -170,13 +168,14 @@ if (empty($tzstring)) { // set the Etc zone if no timezone string exists
}
if ($found) {
_e('This timezone switches to ');
$tr['isdst'] ? _e('daylight savings time') : _e('standard time');
_e(' on: ');
_e(' ');
$message = $tr['isdst'] ?
__('This timezone switches to daylight savings time on: %s.') :
__('This timezone switches to standard time on: %s.');
$tz = new DateTimeZone($tzstring);
$d = new DateTime( "@{$tr['ts']}" );
$d->setTimezone($tz);
echo date_i18n(__('Y-m-d \a\t g:i a T'),$d->format('U'));
printf( $message, date_i18n(__('Y-m-d \a\t g:i a T'), $d->format('U') ) );
} else {
_e('This timezone does not observe daylight savings time.');
}