[wp-trac] [WordPress Trac] #42170: Incorrect use of _n() in /wp-includes/class-wp-customize-nav-menus.php

WordPress Trac noreply at wordpress.org
Tue Oct 10 19:44:05 UTC 2017


#42170: Incorrect use of _n() in /wp-includes/class-wp-customize-nav-menus.php
--------------------------+------------------------------
 Reporter:  tobifjellner  |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Menus         |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  close         |     Focuses:
--------------------------+------------------------------

Comment (by tobifjellner):

 Not really.
 When a phrase is scraped with _n(), it will for most target languages
 create a matrix with two forms, just like in English.
 But there are many languages that have more than two forms.
 Russian, for example:
 Singular is used for 1, 21, 31, 41, 51, 61, 71,... 101, 121...
 "Dual" is used for 2, 3, 4, 22, 23, 24, 32, 33, 34,... 102, 103, 104, 122,
 123...
 Plural is used for 5-19, 25-29,... 105-119,...

 If you just call this function with a "2", you´ll get the wrong form in
 Russian.
 Maltese uses 5 different forms, depending on which number you´ve got.
 So if you only want plural without numbers, just translate the plural
 phrase itself.

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


More information about the wp-trac mailing list