[wp-trac] [WordPress Trac] #13651: Problem with plural form in comments_number
WordPress Trac
noreply at wordpress.org
Fri Apr 22 20:47:07 UTC 2016
#13651: Problem with plural form in comments_number
--------------------------+------------------------
Reporter: pavelevap | Owner: ocean90
Type: defect (bug) | Status: reviewing
Priority: high | Milestone: 4.6
Component: I18N | Version: 3.0
Severity: major | Resolution:
Keywords: has-patch | Focuses:
--------------------------+------------------------
Comment (by ocean90):
[attachment:13651.4.diff] looks good so far. I suggest some changes:
* Move the `$output = str_replace( '%', number_format_i18n( $number ),
$more );` part into the declension condition.
* The data provider for the test should include a case for "Hello % world"
to test the `screen-reader-text` removal. Something like `'% Comments<span
class="screen-reader-text"> on Hello % world!</span>'`.
* The on/off flag needs a translator comment with the "Do not translate
into your own language." hint, similar to `wp_maybe_decline_date()`.
* In `test_get_comments_number_text_declension_with_custom_args()` there
is one space to much in the `remove_filter()` call.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/13651#comment:62>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list