-
Notifications
You must be signed in to change notification settings - Fork 138
Description
...3.4.0/includes/admin/plugins.php says:
_n( 'Failed to query WordPress.org Plugin Directory for the following plugin:', 'Failed to query WordPress.org Plugin Directory for the following plugins:', count( $errors ), 'performance-lab' )
and
esc_html( _n( 'The following error occurred:', 'The following errors occurred:', count( $error_messages ), 'performance-lab' ) ) . '</p>' .
_n() should never be used to split between generic singular and plural, The purpose of this function is to make it possible to create grammatically correct translations for strings that contain an integer in the strings, even for languages with quite complicated deflection rules when numbers are used.
If you're expecting _n() to nicely provide two strings, you'll be surprised. Slavic languages typically have three translations for every string pair with _n(), Arabic has six (6!) translations for every occurrence of _n(), and Japanese has only one translated string (when a number is used in a string, they won't change anything else in the string to reflect whether it's singular or plural, although they DO have means to indicate general plural...
This can be fixed in two ways.
- Either make these normal strings and split between singular vs. plural with simple code, or
- Make sure to include the number of plugins or the number of errors in the strings.
The same error may be present elsewhere in the plugin. I just happened to stumble upon these occurrences.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status