Changes between Initial Version and Version 1 of Ticket #13651, comment 51
- Timestamp:
- 02/10/2015 07:22:43 AM (8 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #13651, comment 51
initial v1 1 Since this only affects a limited number of locales, I'd like to suggest what seems to be the least obtrusive fix there.1 Since this only affects a limited number of locales, I'd like to suggest what seems to be the least obtrusive fix here. 2 2 3 3 `comments_popup_link()` is used in each and every theme, so deprecating it is probably not an option. Instead, we could introduce a switch similar to the one we have [source:tags/4.1/src/wp-includes/script-loader.php#L587 for Open Sans font]. … … 7 7 Only the actual word would be replaced, leaving surrounding tags and numbers as is. This works correctly with the standard `'% Comments'` string, as well as `'%'` or `'<b>%</b> Replies'` strings in Twenty Eleven. If the string does not contain a `%` placeholder, it would be left as is. 8 8 9 If the theme wants to use an i18n- ready string for comment number, it should either rely on core strings (for Twenty Fourteen and Twenty Fifteen, simply removing the [source:tags/4.1/src/wp-content/themes/twentyfifteen/inc/template-tags.php#L120 last two parameters] would be enough), or use `_n()` for the `$more` parameter, like we do in `comments_popup_link()` now (see [31401] and [31402]).9 If the theme wants to use an i18n-friendly string for comment number, it should either rely on core strings (for Twenty Fourteen and Twenty Fifteen, simply removing the [source:tags/4.1/src/wp-content/themes/twentyfifteen/inc/template-tags.php#L120 last two parameters] would be enough), or use `_n()` for the `$more` parameter, like we do in `comments_popup_link()` now (see [31401] and [31402]). 10 10 11 11 [attachment:13651.3.diff] includes the proposed fix and unit tests with different strings from bundled themes.