[wp-meta] [Making WordPress.org] #2979: fix for multiple placeholders should be ordered

Making WordPress.org noreply at wordpress.org
Wed Jul 19 12:43:08 UTC 2017


#2979: fix for multiple placeholders should be ordered
---------------------------+------------------
 Reporter:  afzalmultani   |       Owner:
     Type:  defect         |      Status:  new
 Priority:  normal         |   Milestone:
Component:  Developer Hub  |  Resolution:
 Keywords:  has-patch      |
---------------------------+------------------
Changes (by SergeyBiryukov):

 * keywords:   => has-patch


Comment:

 Hi @afzalmultani, thank for the patch.

 `'Used by <a href="%s">1 function</a>'` and `'Used by <a href="%s">%d
 functions</a>'` are separate strings, the placeholders are not really
 interchangeable here and don't necessarily have to be numbered.

 [attachment:2979.2.diff] appears to treat them as a single string, making
 the result invalid:
 * `'Used by <a href="%1$s"> function</a>'` is missing the `%2$d`
 placeholder with the number of function.
 * `'Used by <a href="%2$d"> functions</a>'` is missing the `%1$s`
 placeholder with the permalink.

 That said, this block needs a few other adjustments:

 * Replace `1 function` with a placeholder. Some languages
 [https://codex.wordpress.org/I18n_for_WordPress_Developers#Plurals use the
 singular form for other numbers].
 * Add translator comments.
 * Replace the non-existing `#usage` anchor. Since [3626], it's either
 `#used-by` or `#uses`.

--
Ticket URL: <https://meta.trac.wordpress.org/ticket/2979#comment:2>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org


More information about the wp-meta mailing list