Make WordPress Core

Changeset 10836


Ignore:
Timestamp:
03/25/2009 04:55:28 PM (17 years ago)
Author:
westi
Message:

Improve translation support for timezone settings. See #9112 props nbachiyski.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/options-general.php

    r10833 r10836  
    1212$title = __('General Settings');
    1313$parent_file = 'options-general.php';
     14/* translators: date and time format for exact current time, mainly about timezones, see http://php.net/date */
     15$timezone_format = _x('Y-m-d G:i:s', 'timezone date format');
    1416
    1517/**
     
    124126</select>
    125127<?php _e('hours') ?>
    126 <span id="utc-time"><?php printf(__('<abbr title="Coordinated Universal Time">UTC</abbr> time is <code>%s</code>'), date_i18n(__('Y-m-d G:i:s'), false, 'gmt')); ?></span>
     128<span id="utc-time"><?php printf(__('<abbr title="Coordinated Universal Time">UTC</abbr> time is <code>%s</code>'), date_i18n( $time_format, false, 'gmt')); ?></span>
    127129<?php if ($current_offset) : ?>
    128         <span id="local-time"><?php printf(__('UTC %1$s is <code>%2$s</code>'), $current_offset_name, date_i18n(__('Y-m-d G:i:s'))); ?></span>
     130        <span id="local-time"><?php printf(__('UTC %1$s is <code>%2$s</code>'), $current_offset_name, date_i18n($time_format)); ?></span>
    129131<?php endif; ?>
    130132<br/>
     
    148150</select>
    149151
    150 <span id="utc-time"><?php printf(__('<abbr title="Coordinated Universal Time">UTC</abbr> time is <code>%s</code>'), date_i18n(__('Y-m-d G:i:s'), false, 'gmt')); ?></span>
     152    <span id="utc-time"><?php printf(__('<abbr title="Coordinated Universal Time">UTC</abbr> time is <code>%s</code>'), date_i18n($timezone_format, false, 'gmt')); ?></span>
    151153<?php if (get_option('timezone_string')) : ?>
    152         <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'))); ?>
     154        <span id="local-time"><?php printf(__('UTC %1$s is <code>%2$s</code>'), $current_offset_name, date_i18n($timezone_format)); ?></span>
    153155        <br />
    154156        <?php
     
    169171
    170172                if ( isset($found) && $found === true ) {
    171                         _e(' ');
     173                        echo ' ';
    172174                        $message = $tr['isdst'] ?
    173175                                __('This timezone switches to daylight savings time on: %s.') :
     
    176178                        $d = new DateTime( "@{$tr['ts']}" );
    177179                        $d->setTimezone($tz);
    178                         printf( $message, date_i18n(__('Y-m-d \a\t g:i a T'), $d->format('U') ) );
     180                        printf( $message, /* translators: next daylight savings change time format, see http://php.net/date */ date_i18n(_x('Y-m-d G:i:s T', 'next daylight savings change time format'), $d->format('U') ) );
    179181                } else {
    180182                        _e('This timezone does not observe daylight savings time.');
Note: See TracChangeset for help on using the changeset viewer.