[wp-trac] [WordPress Trac] #48319: About wp_date function when locale is 'ja'

WordPress Trac noreply at wordpress.org
Wed Oct 16 13:09:13 UTC 2019


#48319: About wp_date function when locale is 'ja'
--------------------------+---------------------
 Reporter:  tmatsuur      |       Owner:  (none)
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.3
Component:  Date/Time     |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+---------------------

Comment (by remcotolsma):

 I also think there is currently an issue when in a translation a backslash
 is used.

 {{{#!php

 global $wp_locale;

 $month_translation = 'ABCD \ 1234';

 $wp_locale->month['10'] = $month_translation;
 $wp_locale->month_abbrev[ $month_translation ] = $month_translation;

 echo date_i18n( 'F' ); // Result: 'ABCD  1234'

 }}}

 Maybe the charlist for `addcslashes` should be 'A..Za..z\\'...

 https://github.com/pronamic/wp-
 datetime/commit/1b38e58f081db58c120ff808ce9f782d2ba3648f

 We should add some unit tests for these cases in WordPress test library.

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


More information about the wp-trac mailing list