[wp-trac] [WordPress Trac] #51727: REST:API One of the new strings should use _n()
WordPress Trac
noreply at wordpress.org
Sat Nov 7 21:50:52 UTC 2020
#51727: REST:API One of the new strings should use _n()
--------------------------+-----------------------------
Reporter: tobifjellner | Owner: SergeyBiryukov
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 5.6
Component: REST API | Version: trunk
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
--------------------------+-----------------------------
Comment (by SergeyBiryukov):
These two strings also need the same adjustment:
{{{
if ( isset( $args['minItems'] ) && count( $value ) < $args['minItems'] ) {
/* translators: 1: Parameter, 2: Number. */
return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s must
contain at least %2$s items.' ), $param, number_format_i18n(
$args['minItems'] ) ) );
}
if ( isset( $args['maxItems'] ) && count( $value ) > $args['maxItems'] ) {
/* translators: 1: Parameter, 2: Number. */
return new WP_Error( 'rest_invalid_param', sprintf( __( '%1$s must
contain at most %2$s items.' ), $param, number_format_i18n(
$args['maxItems'] ) ) );
}
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/51727#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list