[wp-trac] [WordPress Trac] #47798: WP Events Dashboard widget could be improved for multi-days events
WordPress Trac
noreply at wordpress.org
Tue Jan 21 20:20:27 UTC 2020
#47798: WP Events Dashboard widget could be improved for multi-days events
-------------------------------------------+-----------------------
Reporter: imath | Owner: desrosj
Type: enhancement | Status: assigned
Priority: normal | Milestone: 5.4
Component: Administration | Version: 4.8
Severity: normal | Resolution:
Keywords: has-patch early needs-testing | Focuses: ui
-------------------------------------------+-----------------------
Comment (by audrasjb):
The last patch works fine on my side.
I'm only wondering about the translators context comments. Not a big deal
but I believe we usually use something like:
{{{
$response_body['events'][ $key ]['formatted_date'] = sprintf(
/* Translators: %1$s: starting month. %2$d: starting day. %2$d:
ending day. %4$d: year */
__( '%1$s %2$d–%3$d, %4$d' ),
$month_start,
date_i18n( __( 'j' ), $timestamp ),
date_i18n( __( 'j' ), $end_timestamp ),
date_i18n( __( 'Y' ), $timestamp )
);
}}}
Instead of:
{{{
/* Translators: %1$s is for the month, %2$d is for the starting day, %2$d
is for the ending day, %4$d is for the year */
$response_body['events'][ $key ]['formatted_date'] = sprintf(
__( '%1$s %2$d–%3$d, %4$d' ),
$month_start,
date_i18n( __( 'j' ), $timestamp ),
date_i18n( __( 'j' ), $end_timestamp ),
date_i18n( __( 'Y' ), $timestamp )
);
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/47798#comment:25>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list