Toggle menu
15
236
70
27.5K
Kenshi Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
Revision as of 01:15, 19 February 2025 by Prd (talk | contribs) (Created page with "{{Documentation subpage}} {{Lua|Module:Detect singular}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia:Wikidata) --> '''Template:Detect singular''' is used to detect possible lists and is a useful tool for infoboxes, where the label may be singular (e.g., "Nickname:") but the data may be a list. == Usage == * {{tlx|{{BASEPAGENAME}}|value}} Returns {{strong|1}} if not a list, {{strong|nil}} if a pos...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template:Detect singular is used to detect possible lists and is a useful tool for infoboxes, where the label may be singular (e.g., "Nickname:") but the data may be a list.

Usage

Returns 1 if not a list, nil if a possible list.

Parameters

Parameter Description
1 Required. The data to search for a list.

Options

There are four named arguments that control the pluralization:

  • |no_comma= By default, commas (or semi-colons) will cause the text string to be considered plural. Setting |no_comma=1 turns this behavior off.
  • |any_comma= By default, commas (or semi-colons) that are adjacent to digits are singular. Setting |any_comma=1 turns this behavior off.
  • |no_and= By default, "and" causes a string to be plural. Setting |no_and=1 turns this behavior off.
  • |parse_links= By default, wikilinks are considered to be unparseable (singular) objects. Setting |parse_links=1 will allow the parser to read the contents of the wikilinks and determine whether that makes the string plural.

Overrides

To force a particular result, place {{Force plural}} or {{Force singular}} within the text.

Examples

Override these errors like this: