Template:Detect singular/doc

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 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

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Detect singular in articles based on its TemplateData.

TemplateData for Detect singular

Takes a value and tries to determine whether it is singular or plural.

Template parameters

ParameterDescriptionTypeStatus
Value1

The data to search for a plural or a list

Stringrequired
No comma?no_comma

Set to 1 so that commas will no longer result in a plural

Booleansuggested
No and?no_and

By default, "and" causes a string to be plural. Setting this to 1 turns this behavior off.

Booleanoptional
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.

Booleanoptional
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.

Booleanoptional
Parse number?parse_number

Setting this to 1 will cause the first integer in the string to determine plurality.

Booleanoptional

Overrides

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

Examples

Override these errors like this:


Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.