- Timestamp:
- 09/02/2019 09:43:39 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/customize/class-wp-customize-date-time-control.php
r45737 r45930 174 174 </select> 175 175 <# } #> 176 < abbr class="date-timezone" aria-label="<?php esc_attr_e( 'Timezone' ); ?>" title="<?php echo esc_attr( $timezone_info['description'] ); ?>"><?php echo esc_html( $timezone_info['abbr'] ); ?></abbr>176 <p><?php echo $timezone_info['description']; ?></p> 177 177 </div> 178 178 </fieldset> … … 229 229 if ( $tz ) { 230 230 $now = new DateTime( 'now', $tz ); 231 $formatted_gmt_offset = sprintf( 'UTC%s', $this->format_gmt_offset( $tz->getOffset( $now ) / 3600 ));231 $formatted_gmt_offset = $this->format_gmt_offset( $tz->getOffset( $now ) / 3600 ); 232 232 $tz_name = str_replace( '_', ' ', $tz->getName() ); 233 233 $timezone_info['abbr'] = $now->format( 'T' ); 234 234 235 /* translators: 1: timezone name, 2: timezone abbreviation, 3: gmt offset */ 236 $timezone_info['description'] = sprintf( __( 'Timezone is %1$s (%2$s), currently %3$s.' ), $tz_name, $timezone_info['abbr'], $formatted_gmt_offset ); 235 $timezone_info['description'] = sprintf( 236 /* translators: 1: timezone name, 2: timezone abbreviation, 3: UTC abbreviation and offset, 4: UTC offset */ 237 __( 'Your timezone is set to %1$s (%2$s), currently %3$s (Coordinated Universal Time %4$s).' ), 238 $tz_name, 239 '<abbr>' . $timezone_info['abbr'] . '</abbr>', 240 '<abbr>UTC</abbr>' . $formatted_gmt_offset, 241 $formatted_gmt_offset 242 ); 237 243 } else { 238 244 $timezone_info['description'] = ''; 239 245 } 240 246 } else { 241 $formatted_gmt_offset = $this->format_gmt_offset( intval( get_option( 'gmt_offset', 0 ) ) ); 242 $timezone_info['abbr'] = sprintf( 'UTC%s', $formatted_gmt_offset ); 243 244 /* translators: %s: UTC offset */ 245 $timezone_info['description'] = sprintf( __( 'Timezone is %s.' ), $timezone_info['abbr'] ); 247 $formatted_gmt_offset = $this->format_gmt_offset( intval( get_option( 'gmt_offset', 0 ) ) ); 248 249 $timezone_info['description'] = sprintf( 250 /* translators: 1: UTC abbreviation and offset, 2: UTC offset */ 251 __( 'Your timezone is set to %1$s (Coordinated Universal Time %2$s).' ), 252 '<abbr>UTC</abbr>' . $formatted_gmt_offset, 253 $formatted_gmt_offset 254 ); 246 255 } 247 256
Note: See TracChangeset
for help on using the changeset viewer.