Module:Detect singular/doc: Difference between revisions
From Good Old TV Fan Wiki
Adminpeter (talk | contribs) (Created page with "<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> {{high use}} {{Lua|Module:Arguments|Module:Yesno|Module:Text}} Lua to determine whether a string is singular or plural. Designed for use in infoboxes, to determine whether labels should be singular or plural based on the corresponding data, e.g. <code><nowiki>{{#invoke:Detect singular|pluralize|Wynken, Blynken, and Nod||singular|plural}}</nowiki></code> → {{#invoke:Detect si...") |
Adminpeter (talk | contribs) No edit summary |
||
| Line 1: | Line 1: | ||
<!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> | <!-- Add categories where indicated at the bottom of this page and interwikis at Wikidata --> | ||
{{Lua|Module:Arguments|Module:Yesno|Module:Text}} | {{Lua|Module:Arguments|Module:Yesno|Module:Text}} | ||
Latest revision as of 12:59, 30 May 2022
| File:Lua-Logo.svg | This module depends on the following other modules: |
Lua to determine whether a string is singular or plural. Designed for use in infoboxes, to determine whether labels should be singular or plural based on the corresponding data, e.g.
{{#invoke:Detect singular|pluralize|Wynken, Blynken, and Nod||singular|plural}} → plural
- See Template:Detect singular for main() usage. Test cases here.
- See Template:Pluralize from text for pluralize() usage (a wrapper around main()). Test cases here.