ထာမ်ပလိက်:template cat
- ပွမဗက် လိက်စၟတ်သမ္တီမချူလဝ်နကဵုခၞံဗဒှ်အပ္ဍဲ ထာမ်ပလိက်:template cat/documentationအတေံ။ [ပလေဝ်ဒါန်]
- လေန်မရပ်စပ်သုၚ်စောဲ: စရၚ်မုက်လိက်ဂၠေံဂၠေံ • လေန်ဂမၠိုၚ် • မပြံၚ်လှာဲဂၠံၚ်ဍာဲဂမၠိုၚ် • ပရေၚ်မပံၚ်စပ်ဂမၠိုၚ် • မဗၠေတ်ဗၠေၚ်ဂမၠိုၚ် (မပါ်ပ္တိတ်တၞဟ်ခြာပိုဒ်/မဝ်ဂျူ) • ကဠာသံၚ်ဗ္တဳ
Usage
[ပလေဝ်ဒါန်]This template is used to apply consistent categorization to templates, similar to {{module cat}} for modules. Unlike for {{module cat}}, {{template cat}} must always be invoked explicitly, either on the template's documentation page or inside of a <noinclude>...</noinclude> block at the end of the template page itself. (Note that, normally, categories placed on the documentation page of a template must be enclosed in <includeonly>...</includeonly>, but this is not necessary for {{template cat}}, which automatically recognizes that it is being run on a documentation page and produces no output, to avoid categorizing the documentation page unnecessarily.)
{{template cat}} takes the following parameters, all of which may be omitted:
|1=- Comma-separated list of category types, such as
hw,headwordorheadword-linefor headword-line templates;TOCfor TOC (table-of contents navigation) templates;perspronorpersonal pronounsfor personal pronoun box templates; etc. There should be no space following the comma. Category types are in turn mapped to actual categories using a table listed below. Note that many category types have a canonical form (e.g.headword-line) and shorter aliases (e.g.hwandheadword), which produce identical results when used in|1=. If|1=is omitted, the category type is inferred from the template name after removing any language or script code and truncating anything starting with a slash, according to a table listed below. A category type may be followed by a colon and a sort base, which overrides the automatically-generated one. Underscores are replaced with spaces; for example,{{ase-prod intro}}might use{{tcat|signprod:_}}to categorize into Category:American Sign Language sign production templates with a sort key consisting of a space character (so that the template appears at the beginning of the list of template, before all more specific sign production templates). If a sort base is not explicitly given, it is inferred from the portion of the template name following any language or script code, based on the particular category type. |lang=- Comma-separated list of language, family or script codes (see ထာမ်ပလိက်:slink, ထာမ်ပလိက်:slink and ထာမ်ပလိက်:slink, respectively) that the template applies to. Families must be prefixed by
fam:(e.g.fam:gmwfor West Germanic), because the family code by itself stands for the corresponding proto-language, consistent with template naming conventions (e.g.ineby itself does not refer to the Indo-European family but to the Proto-Indo-European language). If|lang=is omitted, it is inferred from the template name. If the template name does not begin with a language or script code, an error will be thrown unless both|1=and|lang=are provided. |pagename=- Name of template being categorized in place of the current pagename, for documentation or testing purposes.
|json=1- Output the category data (including the computed sort bases) in JSON, instead of outputting actual categories. Useful for testing purposes.
Examples
[ပလေဝ်ဒါန်]- On the page Template:eo-personal pronouns,
{{template cat}}by itself (or its shortcut{{tcat}}) categorizes into Category:Esperanto navigation templates (with sortkeyPERSONAL PRONOUNS) and Category:Personal pronoun box templates (with sortkeyESPERANTO). - On the page Template:bg-noun,
{{template cat}}by itself (or its shortcut{{tcat}}) categorizes into Category:Bulgarian headword-line templates (with sortkeyNOUN). - On the page Template:ru-categoryTOC,
{{template cat}}by itself (or its shortcut{{tcat}}) categorizes into Category:Russian navigation templates (with sortkeyTOC) and Category:TOC templates (with sortkeyRUSSIAN). - On the page Template:Cyrl-categoryTOC/full,
{{template cat}}by itself (or its shortcut{{tcat}}) categorizes into Category:Cyrillic script templates (with sortkeyTOC) and Category:TOC templates (with sortkeyCYRILLIC). Note that the suffix/fullhas been ignored, and compare with the previous example; script-level templates are not currently subcategorized, so all templates for a script like Cyrillic go directly into Category:Cyrillic script templates, instead of a nonexistent Category:Cyrillic script navigation templates, as is the case for a language like Russian. - On the page Template:U:hu:conj-cond-2o,
{{template cat}}by itself (or its shortcut{{tcat}}) categorizes into Category:Hungarian usage templates (with sortkeyCONJ-COND-2O).
Pattern to category type mapping
[ပလေဝ်ဒါန်]The following patterns are processed in order, from top to bottom, to generate the category type. The first pattern that matches determines the category type. The patterns are anchored on both ends, i.e. they must match the entire template name after removing any language prefixes, pseudo-namespace prefixes (e.g. U: and RQ:) and truncating anything starting with a slash. If no pattern matches, an error occurs unless the category type (or types) is given explicitly in |1=.
| Pattern | Inferred category type |
|---|---|
decl%-.*proper.* | noun inflection-table |
infl%-.*proper.* | noun inflection-table |
decl%-.*pron.* | pronoun inflection-table |
infl%-.*pron.* | pronoun inflection-table |
decl%-noun.* | noun inflection-table |
infl%-noun.* | noun inflection-table |
noun | လာၚ်က္ဍိုပ်မအရေဝ် |
noun[ -]form | လာၚ်က္ဍိုပ်မအရေဝ် |
noun[ -]pl | လာၚ်က္ဍိုပ်မအရေဝ် |
noun[ -]plonly | လာၚ်က္ဍိုပ်မအရေဝ် |
noun%-.* | noun inflection-table |
ndecl | noun inflection-table |
ndecl%-.* | noun inflection-table |
proper[ -]?noun | လာၚ်က္ဍိုပ်မအရေဝ် |
proper[ -]?noun[ -]form | လာၚ်က္ဍိုပ်မအရေဝ် |
proper[ -]?noun[ -]pl | လာၚ်က္ဍိုပ်မအရေဝ် |
proper[ -]?noun[ -]plonly | လာၚ်က္ဍိုပ်မအရေဝ် |
pnoun | လာၚ်က္ဍိုပ်မအရေဝ် |
pnoun[ -]form | လာၚ်က္ဍိုပ်မအရေဝ် |
pnoun[ -]pl | လာၚ်က္ဍိုပ်မအရေဝ် |
pnoun[ -]plonly | လာၚ်က္ဍိုပ်မအရေဝ် |
propn | လာၚ်က္ဍိုပ်မအရေဝ် |
propn[ -]form | လာၚ်က္ဍိုပ်မအရေဝ် |
propn[ -]pl | လာၚ်က္ဍိုပ်မအရေဝ် |
propn[ -]plonly | လာၚ်က္ဍိုပ်မအရေဝ် |
proper[ -]?noun%-.* | noun inflection-table |
pnoun%-.* | noun inflection-table |
propn%-.* | noun inflection-table |
pron | လာၚ်က္ဍိုပ်မအရေဝ် |
pronoun | လာၚ်က္ဍိုပ်မအရေဝ် |
pron[ -]form | လာၚ်က္ဍိုပ်မအရေဝ် |
pronoun[ -]form | လာၚ်က္ဍိုပ်မအရေဝ် |
prondecl | pronoun inflection-table |
prondecl%-.* | pronoun inflection-table |
decl%-adj.* | adjective inflection-table |
infl%-adj.* | adjective inflection-table |
adj | လာၚ်က္ဍိုပ်မအရေဝ် |
adjective | လာၚ်က္ဍိုပ်မအရေဝ် |
adj[ -]form | လာၚ်က္ဍိုပ်မအရေဝ် |
adjective[ -]form | လာၚ်က္ဍိုပ်မအရေဝ် |
adj[ -]comp | လာၚ်က္ဍိုပ်မအရေဝ် |
adjective[ -]comp | လာၚ်က္ဍိုပ်မအရေဝ် |
adj[ -]sup | လာၚ်က္ဍိုပ်မအရေဝ် |
adjective[ -]sup | လာၚ်က္ဍိုပ်မအရေဝ် |
adj%-.* | adjective inflection-table |
adecl | adjective inflection-table |
adecl%-.* | adjective inflection-table |
verb | headword-line |
conj | verb inflection-table |
conj[0-9 -].* | verb inflection-table |
conjug.* | verb inflection-table |
infl%-verb.* | verb inflection-table |
.*IPA.* | pronunciation |
pronunciation | pronunciation |
pr | pronunciation |
p | pronunciation |
.*form of | form-of |
.*personal pronouns | personal pronoun |
.*demonstrative.* | demonstrative |
.*interrogative.* | interrogative |
.*possessives | possessive |
.*possessive .* | possessive |
.*reflexives | reflexive |
.*reflexive .* | reflexive |
.*correlatives | pro-form |
.*correlative .* | pro-form |
.*relative .* | relative |
.*articles | article |
.*prefixes | affix |
.*suffixes | affix |
.*TOC | TOC |
.*numbers | number |
.*numerals | number |
.*ordinals | ordinal |
.*cardinals | cardinal |
.*digits | digit |
.*xlit | orthographic conversion |
.*translit | orthographic conversion |
.*variant | orthographic variant |
.*regional | regional variant |
prod .* | sign production |
Category type to category mapping
[ပလေဝ်ဒါန်]| Category type | Canonical category type | Categories |
|---|---|---|
TOC | (same) | |
adjective inflection-table | (same) | |
adecl | adjective inflection-table | |
adjdecl | adjective inflection-table | |
adjinfl | adjective inflection-table | |
adposition | (same) | |
adpositions | adposition | |
postposition | adposition | |
postpositions | adposition | |
preposition | adposition | |
prepositions | adposition | |
affix | (same) | |
affixes | affix | |
prefix | affix | |
prefixes | affix | |
suffix | affix | |
suffixes | affix | |
article | (same) | |
articles | article | |
auto-table | (same) | |
table | auto-table | |
cardinal | (same) | |
cardinals | cardinal | |
definition | (same) | |
def | definition | |
defn | definition | |
demonstrative | (same) | |
demonstratives | demonstrative | |
digit | (same) | |
digits | digit | |
entry | (same) | |
etymology | (same) | |
etym | etymology | |
form-of | (same) | |
form of | form-of | |
headword-line | (same) | |
headword | headword-line | |
hw | headword-line | |
interrogative | (same) | |
interrogatives | interrogative | |
link | (same) | |
list | (same) | |
morphology | (same) | |
morph | morphology | |
navigation | (same) | |
nav | navigation | |
noun inflection-table | (same) | |
ndecl | noun inflection-table | |
noundecl | noun inflection-table | |
nouninfl | noun inflection-table | |
number | (same) | |
numbers | number | |
ordinal | (same) | |
ordinals | ordinal | |
orthographic conversion | (same) | |
orthconv | orthographic conversion | |
scriptconv | orthographic conversion | |
translit | orthographic conversion | |
transliteration | orthographic conversion | |
xlit | orthographic conversion | |
orthographic variant | (same) | |
orthvar | orthographic variant | |
scriptvar | orthographic variant | |
personal pronoun | (same) | |
personal pronouns | personal pronoun | |
perspron | personal pronoun | |
possessive | (same) | |
possessives | possessive | |
pro-form | (same) | |
pro-forms | pro-form | |
pronoun inflection-table | (same) | |
prondecl | pronoun inflection-table | |
proninfl | pronoun inflection-table | |
pronunciation | (same) | |
pron | pronunciation | |
quotation | (same) | |
quote | quotation | |
reference | (same) | |
ref | reference | |
reflexive | (same) | |
reflexives | reflexive | |
regional variant | (same) | |
regvar | regional variant | |
relative | (same) | |
relatives | relative | |
sign production | (same) | |
signprod | sign production | |
usage | (same) | |
verb inflection-table | (same) | |
conj | verb inflection-table | |
verbinfl | verb inflection-table | |