[wp-trac] [WordPress Trac] #30506: RTL: Hours and minutes fields order reversed in post editing
WordPress Trac
noreply at wordpress.org
Wed Dec 3 13:41:09 UTC 2014
#30506: RTL: Hours and minutes fields order reversed in post editing
-------------------------------+------------------------------
Reporter: leac | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Posts, Post Types | Version: 4.0
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: ui, rtl
-------------------------------+------------------------------
Comment (by leac):
I dug into the code, and found that the code that creates all text fields
in schedule editing is in
wp-admin\includes\template.php (row 753 in 4.0.1):
{{{
/* translators: 1: month, 2: day, 3: year, 4: hour, 5: minute */
printf( __( '%1$s %2$s, %3$s @ %4$s : %5$s' ), $month, $day, $year, $hour,
$minute );
}}}
Then I checked if that string appears anywhere else. I found that it is
used one other place, in
wp-includes\script-loader.php (row 444 in 4.0.1), where it's assigned to
the dateFormat field in the postL10n object:
{{{
'dateFormat' => __('%1$s %2$s, %3$s @ %4$s : %5$s'),
}}}
That object and field is used in wp-admin/js/post.js (row 728 in 4.0.1),
after submitting the new scheduled date.
So I was thinking that the easiest solution for the reversed hour and
minute order problem would be to change the order of parameters {{{ %4$s
}}} and {{{%5$s}}} in the translation file:
{{{
%2$s %1$s, %3$s בשעה %5$s : %4$s
}}}
But that isn't a good solution semantically, because the hour and minute
aren't really supposed to be reversed: the reversal would be done for
display reasons only, and that's not semantically correct.
So I need a way to show the {{{ %4$s }}} and {{{%5$s}}} from left to
right, without changing their order in the string.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/30506#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list