Ticket #9112: i18n-gettext-contexts-3.diff

File i18n-gettext-contexts-3.diff, 2.9 KB (added by nbachiyski, 3 years ago)

Timezones format

  • wp-admin/options-general.php

     
    1111 
    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/** 
    1618 * Display JavaScript on the page. 
     
    123125?> 
    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/> 
    131133<span class="setting-description"><?php _e('Unfortunately, you have to manually update this for Daylight Savings Time. Lame, we know, but will be fixed in the future.'); ?></span> 
     
    147149<?php echo wp_timezone_choice($tzstring); ?> 
    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 
    155157        $now = localtime(time(),true); 
     
    168170                } 
    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.') : 
    174176                                __('This timezone switches to standard time on: %s.'); 
    175177                        $tz = new DateTimeZone($tzstring); 
    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.'); 
    181183                }