[wp-trac] [WordPress Trac] #48244: script-loader.php Need to use _n() when more than one results are found

WordPress Trac noreply at wordpress.org
Mon Oct 7 19:56:09 UTC 2019


#48244: script-loader.php Need to use _n() when more than one results are found
----------------------------------------+------------------------------
 Reporter:  tobifjellner                |       Owner:  (none)
     Type:  defect (bug)                |      Status:  new
 Priority:  normal                      |   Milestone:  Awaiting Review
Component:  Script Loader               |     Version:  trunk
 Severity:  normal                      |  Resolution:
 Keywords:  good-first-bug needs-patch  |     Focuses:
----------------------------------------+------------------------------

Comment (by swissspidy):

 The correct number is only known client-side, so for correct results one
 would need to use `_n()` from the `@wordpress/i18n` JS package.

 This would need to happen in at least two places:

 https://github.com/WordPress/wordpress-
 develop/blob/3b14a06c8cb187d8abd3d4af8ea9c0ea3a475228/src/js/_enqueues/vendor/tinymce/plugins/wplink/plugin.js#L459-L469
 https://github.com/WordPress/wordpress-
 develop/blob/715a65c56142262b938d6860f840e201b1fe074a/src/js/_enqueues/admin
 /tags-suggest.js#L135-L144

 However, this is by far not the only place where plural forms in JS could
 or should be improved. In #20491 you can find a huge patch with possible
 changes.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48244#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list