Template talk:Pluralize from text

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Changes to the template are needed[edit]

@Hike395, the current argument syntax isn't optimal. I found myself having to write {{Pluralize from text|{{{param|}}}|||s}} which I find very unclear code. How to change this? There are a few options.

I personally don't feel that there was ever a need for args[1] and args[2] to be the singular and plural versions of the parameter, as only one of those could ever be used and no one promises you that the content of those arguments are actually singular or plural - that's the reason this template exists.

Another option would be to add named parameters. So in the above case where I need only the plural output it could just write {{Pluralize from text|param|plural=s}}.

The above two changes greatly simplify the template and make it easier to use. Gonnym (talk) 16:02, 27 January 2022 (UTC)[reply]

@Gonnym:  Done Implemented |singular=, |plural=, |link=. Updated documentation. — hike395 (talk) 07:31, 28 January 2022 (UTC)[reply]