[wp-trac] [WordPress Trac] #42394: Customize: Order of fields in date/time control does not honor locale
WordPress Trac
noreply at wordpress.org
Wed Nov 1 21:35:22 UTC 2017
#42394: Customize: Order of fields in date/time control does not honor locale
--------------------------+--------------------
Reporter: munyagu | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 4.9
Component: Customize | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+--------------------
Changes (by westonruter):
* keywords: needs-patch => has-patch
Comment:
See [attachment:42394.0.diff] for one possible solution. It's not perfect
in particular because it isn't able to know whether the content between
the date and the time is associated with the date or the time.
I think what we need is new translation strings for the date and time
separately.
So in addition to:
{{{#!php
<?php
/* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */
$datetime_format = __( '%1$s %2$s, %3$s @ %4$s:%5$s' );
}}}
We also need:
{{{#!php
<?php
/* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */
$date_format = __( '%1$s %2$s, %3$s' );
/* translators: 1: hour, 2: minute, 3: meridian (optional) */
$time_format = __( '%1$s:%2$s %3$s' );
}}}
The meridian part gets tricky, however. Right now the meridian part is
conditionally included based on whether or not it appears in the
`time_format` option, and not whether or not it is in the translation
string.
Maybe for 4.9 we should fix the issue specifically with the year/month/day
fields, but then continue with the current hard-coded approach for the
hour/minute/meridian fields, since the time format is much less likely to
vary between locales (AFAIK).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42394#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list