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:
parent
7ceebc2a27
commit
c569b75494
|
@ -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'))); ?>
|
<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 />
|
<br />
|
||||||
<?php
|
<?php
|
||||||
_e('This timezone is currently in ');
|
|
||||||
$now = localtime(time(),true);
|
$now = localtime(time(),true);
|
||||||
if ($now['tm_isdst']) _e('daylight savings');
|
if ($now['tm_isdst']) _e('This timezone is currently in daylight savings time.');
|
||||||
else _e('standard');
|
else _e('This timezone is currently in standard time.');
|
||||||
_e(' time.');
|
|
||||||
?>
|
?>
|
||||||
<br />
|
<br />
|
||||||
<?php
|
<?php
|
||||||
|
@ -170,13 +168,14 @@ if (empty($tzstring)) { // set the Etc zone if no timezone string exists
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($found) {
|
if ($found) {
|
||||||
_e('This timezone switches to ');
|
_e(' ');
|
||||||
$tr['isdst'] ? _e('daylight savings time') : _e('standard time');
|
$message = $tr['isdst'] ?
|
||||||
_e(' on: ');
|
__('This timezone switches to daylight savings time on: %s.') :
|
||||||
|
__('This timezone switches to standard time on: %s.');
|
||||||
$tz = new DateTimeZone($tzstring);
|
$tz = new DateTimeZone($tzstring);
|
||||||
$d = new DateTime( "@{$tr['ts']}" );
|
$d = new DateTime( "@{$tr['ts']}" );
|
||||||
$d->setTimezone($tz);
|
$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 {
|
} else {
|
||||||
_e('This timezone does not observe daylight savings time.');
|
_e('This timezone does not observe daylight savings time.');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue