This article will address Template:Detect singular, a topic of great relevance in the current context. Template:Detect singular has aroused great interest in various areas, since its impact is felt in numerous spheres of society. Over the years, Template:Detect singular has acquired increasing importance, which has motivated the interest of academics, professionals and experts in the field. In this sense, it is essential to thoroughly analyze and understand Template:Detect singular, in order to be able to identify its implications and consequences. Therefore, throughout this article different aspects related to Template:Detect singular will be explored, from its origin to its influence today.
1
| This template is used on approximately 243,000 pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. |
| This template uses Lua: |
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.
{{Detect singular|value}}Returns 1 if not a list, nil if a possible list.
| Parameter | Description |
|---|---|
1
|
Required. The data to search for a list. |
There are five 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.|parse_number=. Setting |parse_number=1 will cause the first integer in the string to determine plurality.TemplateData for Detect singular
Takes a value and tries to determine whether it is singular or plural.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| Value | 1 | The data to search for a plural or a list | String | required |
| No comma? | no_comma | Set to 1 so that commas will no longer result in a plural | Boolean | suggested |
| Any comma? | Any comma? | By default, commas (or semi-colons) that are adjacent to digits are singular. Setting this to 1 turns this behavior off. | Boolean | optional |
| Parse links? | parse_links | By default, wikilinks are considered to be unparseable (singular) objects. Setting this to 1 will allow the parser to read the contents of the wikilinks and determine whether that makes the string plural. | Boolean | optional |
| Parse number? | parse_number | Setting this to 1 will cause the first integer in the string to determine plurality. | Boolean | optional |
To force a particular result, place {{Force plural}} or {{Force singular}} within the text.
{{Detect singular|Mack the Knife}} → 1{{Detect singular|May 4, 2020|no_comma=yes}} → 1{{Detect singular|Mack the Knife, Joe}} →{{Detect singular|{{hlist|first|second|third}}}} →{{Detect singular|*one *two *three}} →{{Detect singular|Dave Nellist}} → 1Override these errors like this:
{{Detect singular|Charles, Prince of Wales{{force singular}}}} → 1