Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #38918, comment 13


Ignore:
Timestamp:
10/03/2017 06:52:55 PM (7 years ago)
Author:
SergeyBiryukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #38918, comment 13

    initial v1  
    11I think it's exactly one of the cases where we should check for `1 === count( $errors )` specifically instead of using `_n()`, to avoid displaying the singular string for [https://codex.wordpress.org/I18n_for_WordPress_Developers#Plurals 21, 31, etc. in some languages].
    22
    3 Using `%l` and `wp_sprintf()` seems fine, but we only use it two places in core: in `get_the_taxonomies()` and on Credits page. The goal there is to display a "smart" list with an Oxford comma and such: `%s, %s, and %s` for more than 2 items or `%s and %s` for only 2 items.
     3Using `%l` and `wp_sprintf()` seems fine, but we only use it in two places in core: in `get_the_taxonomies()` and on Credits page. The goal there is to display a "smart" list with an Oxford comma and such: `%s, %s, and %s` for more than 2 items or `%s and %s` for only 2 items.
    44
    55As noted above, it's rare for plugin deletion error message to contain multiple filenames, so I think there's no need for this list to be "smart", a simple `implode( ', ', $errors )` should be fine as well.