Mòideal:labels/data/doc

O Wiktionary

This is the documentation page for Mòideal:labels/data

This module contains the data used by Mòideal:labels and, by extension, the templates {{Context}} , {{Label}} , {{Term-context}}

and {{Term-label}}

. It lists all recognised labels along with other information. Three tables are exported at once: labels, aliases and deprecated. The keys of these tables are label identifiers (passed to the templates), while the values are described below.

Labels[deasaich]

labels contains most data associated with the actual labels.

The following values are supported:

display
The wikitext to display for the label. If this is omitted, the displayed text will default to the label's identifier.
plain_categories
A list of categories that this label should add to a page. The categories are not adjusted depending on the language; they will be taken verbatim, and entries in all languages will be added to the same category. As this is generally undesirable, the plain_categories value should only be used when a label would only ever be used for a single language.
topical_categories
A list of language-dependent topical categories that this label should add to a page. These categories are of the form "[language code]:[category name]". For example, Roinn-seòrsa:Eòlas-fiosaig sa Bheurla.
pos_categories
A list of language-dependent part-of-speech-like categories that this label should add to a page. These categories are of the form "[language name] [category name]". For example, Roinn-seòrsa:Beurla pluralia tantum.
sense_categories
A list of sense-dependent categories that this label should add to a page. Depending on the template used, categories are either of the form "[language name] terms with [category name] senses" (when using {{Context}}

/{{Label}} ) or "[language name] [category name] terms" (when using {{Term-context}}

or {{Term-label}}

). For example, Roinn-seòrsa:Briathran àrsaidh Gàidhlig and Roinn-seòrsa:English terms with archaic senses.

regional_categories
A list of language-dependent regional/dialect categories that this label should add to a page. These categories are of the form "[category name] [language name]". For example, Roinn-seòrsa:Beurla Bhreatannach.

Aliases[deasaich]

Aliases are not labels, but work like redirects to proper labels. When a label is defined here, it "behaves" as if it were the label it "redirects" to. For example, if "American" is listed as an alias of "US", then whenever the label "American" is used in an entry, it's treated as if the label "US" had been used in its place.

The label that an alias points to does not have to be defined in the list itself. So if you want to make "American" an alias of "US", but do not create a full label for "US", that works too.

Double aliases (an alias of another alias) are not supported, and will cause a script error if used.

Deprecated[deasaich]

The deprecated table can be used to mark labels as deprecated. The key should be an identifier, and the value should be set to true. When a deprecated label identifier is used, the label is wrapped in a <span class="deprecated-label"> and the page is added to Roinn-seòrsa:Entries with deprecated labels. A single alias may be deprecated instead of the entire label.