[wp-trac] [WordPress Trac] #33579: want to change the $monthtext in touch_time(/wp-admin/includes/template.php)

WordPress Trac noreply at wordpress.org
Fri Aug 28 04:32:00 UTC 2015


#33579: want to change the $monthtext in touch_time(/wp-
admin/includes/template.php)
--------------------------+------------------------------
 Reporter:  tmatsuur      |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Date/Time     |     Version:  4.3
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by tmatsuur):

 The date format string has been used in various places. It will not be
 able to solve if simply changing the date format string.

 Problem is I think not the point.

 It has been modified to use the data-text attribute in version 4.3.
 And, the content of this data-text attribute is the abbreviation of the
 month.

 In versions prior to 4.3, `post.js(post.min.js)` was using the contents of
 the option element.
 {{{
 sprintf( __( '%2$s' ), $monthnum, $wp_locale->get_month_abbrev(
 $wp_locale->get_month( $i ) ) )
 }}}
 In the case of Japanese environment, '%1$s-%2$s' will be translated
 '%1$s'. As a result, it becomes '08' in the case of August.
 It is important that it has been changed to the abbreviation of the month
 from a number.

 It came up now:
 function touch_time(template.php line788)
 {{{
 $month .= "\t\t\t" . '<option value="' . $monthnum . '" data-text="' .
 sprintf( __( '%2$s', 'data-text' ), $monthnum, $monthtext ) . '" ' .
 selected( $monthnum, $mm, false ) . '>';
 }}}
 And using the translation in the case of Japanese select the '%1$s'.

 How about this.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/33579#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list