Jump to content

ထႅမ်းပလဵတ်ႉ:auto cat/documentation

လုၵ်ႉတီႈ ဝိၵ်ႇသျိၼ်ႇၼရီႇ မႃး
ၽိုၼ်လိၵ်ႈၵူႈမိုဝ်း တွၼ်ႈတႃႇထႅမ်းပလဵတ်ႉ:auto cat[မႄးထတ်း]
တီႈၼႃႈလိၵ်ႈၼႆႉ ၶဝ်ႈပႃးဝႆႉ ၶေႃႈမုၼ်း လၢႆးၸႂ်ႉတိုဝ်းပိူင်ထၢၼ်ႈလွင်ႈၵွင်ႉသိုပ်ႇ ဢိၼ်ႇတႃႇဝီႇၶီႇ လႄႈ ၸိူဝ်းပဵၼ် လွင်ႈၼႄပၼ် ထႅမ်းပလဵၵ်ႉ ၼၼ်ႉယဝ်ႉ။
Auto cat

This template is used on category pages to automatically add a category boilerplate template. It invokes Module:auto cat, which deciphers the category name and transcludes the correct template with the correct parameters.

No parameters are needed in most cases. A few categories have optional or required parameters to help out the categorization; see below.

Most categories are handled by the poscatboiler system. See Module:category tree/poscatboiler/data/documentation for more information.

Most categories have an Edit category data button in the upper right that takes you directly to the module that implements the category.

To more easily add this template, place Lua error in မေႃႇၵျူး:parameters at line 600: attempt to index local 'param' (a boolean value). in your common.js. This will add buttons directly below the first heading. Click them to add the template and save, or add the template and preview.

This template currently recognises categories that use the following templates:

  • Lua error in မေႃႇၵျူး:parameters at line 600: attempt to index local 'param' (a boolean value).
  • Lua error in မေႃႇၵျူး:parameters at line 600: attempt to index local 'param' (a boolean value).

Note that there used to be many more templates listed. All of the categories handled by those templates are now handled by the poscatboiler system. See Module:category tree/poscatboiler/data/documentation for more information. See also specific subpages for examples of the handlers that implement many of those pages, e.g. Module:category tree/poscatboiler/data/terms by etymology.

Some categories allow or require parameters to Lua error in မေႃႇၵျူး:parameters at line 600: attempt to index local 'param' (a boolean value). to help out categorization.

Affix categories

[မႄးထတ်း]

These are categories are categories such as Category:Latin terms suffixed with -inus and Category:Japanese terms prefixed with 真っ. The types of affixes currently recognized are prefix, suffix, infix, interfix, circumfix and transfix. For these categories, the following parameters are allowed (none are required):

|alt=
The affix with diacritics. Only needed for languages with extra diacritics in their headwords (e.g. Latin, Russian, Arabic and Old English), and only if those diacritics are present. For example, for Category:Latin terms suffixed with -inus, specify Lua error in မေႃႇၵျူး:parameters at line 600: attempt to index local 'param' (a boolean value). so that the suffix in the category description, and the breadcrumb at the top of the page, are displayed as Lua error in မေႃႇၵျူး:parameters at line 600: attempt to index local 'param' (a boolean value)., with a macron.
|sort=
The sort key. Mostly only needed for Japanese. For example, for Category:Japanese terms prefixed with 真っ, use Lua error in မေႃႇၵျူး:parameters at line 600: attempt to index local 'param' (a boolean value). so that the page is properly sorted in its parent category Category:Japanese terms by prefix.
|tr=
Manual transliteration. Occasionally needed for non-Latin-script languages if the automatic transliteration is incorrect or if the language doesn't have automatic transliteration (e.g. Persian and Hebrew).
|sc=
Script code. Almost never needed.

Language categories

[မႄးထတ်း]

These are categories such as Category:French language and Category:Proto-Indo-European language. These are the root categories for the various languages represented in Wiktionary. These categories have required parameters specifying the country or countries where the language is spoken, as well as additional optional parameters:

|1=, |2=, |3=, ...
The country or countries where the language is spoken. See Category:Languages by country and its subcategories. Make sure to include the word the if warranted, e.g. the Philippines or the United States. At least one country is required unless the language is reconstructed (e.g. Proto-Indo-European) or constructed/artificial (e.g. Esperanto). If the country is truly unknown, use the value UNKNOWN.
|extinct=1
Specify that this language is extinct (no longer spoken).
|setwiki=
The name of the Wikipedia article about the language to link to. If omitted, the Wikipedia article in the language's wikidata entry or the language's category name will be used (e.g. French language). Specify |setwiki=- to show no Wikipedia article link. Preferably, the wikidata entry for the language should be added to the language's data file rather than specified manually in this template.
|setwikt=
The code of the language's Wiktionary edition. If omitted, the Wiktionary language code for the language will be used. Specify |setwikt=- to show no Wiktionary edition link.
|setsister=
The name of the category on Wikimedia Commons with files related to the language. If omitted, the category name will be used (e.g. French language). Specify |setsister=- to show no Commons category link.
|entryname=
The English term on this Wiktionary to link to. If omitted, the canonical name of the language will be used (e.g. French). Specify |entryname=- to show no entry link.

Dialect categories

[မႄးထတ်း]

These are categories are categories that refer to regional, temporal and sociolectal varieties of languages such as Category:Latin American Spanish (regional), Category:Early Modern English (temporal) and Category:Classical Persian (sociolectal), including those that don't have the containing language in their name (e.g. Category:Provençal and Category:Dari) or have only part of the containing language in their name (e.g. Category:Walser German, which is a variety of the Alemannic German language and not a variety of German). Because of the diversity of naming conventions, {{auto cat}} won't recognize or process such categories unless |dialect=1 is given. If no parameters other than |dialect=1 are given, {{auto cat}} will attempt to infer all the relevant parameters, but most of the time additional parameters need to be given, at the very least |1= specifying the region or time period of the variety in question and often |cat= specifying the parent category. The following parameters are recognized:

|dialect=1
Must be specified for {{auto cat}} to process the category.
|1=
English description of the location where the variety is spoken (for regional varieties), the time period where the variety was spoken (for temporal varieties) or the linguistic register of the variety (for sociolectal varieties). The text normally appears after the words "Terms or senses in LANGUAGE as spoken in", although both the verb ("spoken") and the preposition ("in") can be customized. Normally, the description will be linked using {{l}}; use |nolink=1 to disable this (see below). If the description names a country (or in some cases a sub-country entity such as California), and a category named Languages of country exists, the variety will automatically be categorized into this category. You can override the country or countries of the variety using |country=. If omitted, the default description is inferred from the variety name by subtracting the containing language (see |cat= and |lang= below). For example, for Category:Texas German, the containing language will be inferred as 'German', and after subtracting this, the default description becomes Texas. In some cases, this will be wrong, especially if the location is named in the variety using the adjectival form of the location, and the description must be given explicitly. For example, Category:Puerto Rican Spanish will result in a default description Puerto Rican when it should be Puerto Rico. If it's not possible to match the containing language in the variety name, |1= must be specified or an error results (unless |def= or |fulldef= are given; see below).
If the description contains the string <country>, the countries in |country= will be substituted, comma-separated with "and" before the last one. See the examples below for an example of this.
|cat=
The parent category. This is the first containing category listed at the bottom of the page and determines the trail of breadcrumbs displayed at the top of the page. This should be used to express containment relationships of regional and temporal varieties. For example, Category:Durham University English has Category:Durham English as its parent, which in turn has Category:Northumbrian English as its parent, which in turn has Category:Northern England English as its parent, etc. If the parent category is omitted, the default depends on the containing language, according to the following algorithm:
  1. The containing language is normally inferred from the variety's name by looking for the longest matching language suffix. This means, for example, that Category:Kentish Middle English will have 'Middle English' as its containing language, not merely 'English'. The containing language can be an etymology-only language; e.g. Category:Southern Brazilian Portuguese has 'Brazilian Portuguese' (code pt-BR) as its containing language. It is also possible for the variety itself to be an etymology-only language (e.g. Category:Brazilian Portuguese or Category:Provençal). In this case, the containing language is that same etymology-only language; but these categories are treated specially. The containing language can also be manually set using |lang=; this is necessary when it cannot be inferred from the name (e.g. Category:Issime Walser is a variety of etymology-only language Category:Walser German, but this language cannot be inferred because only part of its canonical name is found in the variety's name).
  2. If the containing language is an etymology-only language, the default parent category is simply the containing language's category, which has the same name as the containing language (e.g. Category:Southern Brazilian Portuguese has Category:Brazilian Portuguese as its default parent).
  3. If the containing language is a full language (i.e. not an etymology-only language), the default is normally named Regional language, e.g. Category:Regional English for Category:European English. However, if |noreg=1 is set (to indicate a non-regional variety), the default will be named language language, e.g. Category:Early Modern English should set |noreg=1 and will have Category:English language as its parent.
  4. If the variety is an etymology-only language, its default parent category will be based on the language's parent, using the above algorithm. For example, Brazilian Portuguese is an etymology-only language (code pt-BR) whose parent language is the full language Portuguese (code pt), and the default parent category of Category:Brazilian Portuguese will be Category:Regional Portuguese. (It is also possible for etymology-only languages to have other etymology-only languages as their parent; e.g. Contemporary Latin (code la-con) has etymology-only language New Latin (code la-new) as its parent, so the default parent category of Category:Contemporary Latin will be Category:New Latin.)
NOTE: This category needs to be one that is handled internally using the "raw category" subsystem of the poscatboiler system (see Module:category tree/poscatboiler/data/documentation). In particular, this means it cannot be a language category (such as Category:Mandarin lemmas), an umbrella category (such as Category:Nouns by language) or a topic category (such as Category:en:Universities). If this limitation is problematic, please contact User:Benwing2.
|lang=
Override the containing language. See |cat= above for more details. The containing language determines the default parent category (see above) and the default breadcrumb (see below). Note that if the variety directly names an etymology-only language, |lang= will automatically be inferred to be that language, and the corresponding language code(s) will be shown as part of the "additional" text following the category description.
|breadcrumb=
Override the default breadcrumb displayed for the variety in the trail of breadcrumbs displayed at the top of the page. The default breadcrumb is normally the portion of the variety's name minus the containing language suffix. For example, Category:Southern Brazilian Portuguese has containing language 'Brazilian Portuguese' and hence will have default breadcrumb Southern. If the containing language cannot be matched in the variety's name, the code will try matching any parent languages of the containing language. For example, Category:Bahian Portuguese is a subvariety of Brazilian Portuguese; if |lang=pt-BR is given to set the containing language appropriately, the name 'Brazilian Portuguese' is not a suffix of 'Bahian Portuguese', but its parent language Portuguese is, so the default breadcrumb will be Bahian. If neither the containing language nor any parent language matches, the breadcrumb is based on the entire variety (e.g. for varieties like Category:Provençal).
|noreg=
Indicate that this variety is not a regional variety. This is only necessary when |cat= isn't explicitly given, as its only purpose is to control the default parent category. See |cat= for more information.
|nolink=
Don't automatically link the description in |1= using {{l}}. This should be specified if |1= contains a description such as from the 15th to the 18th centuries that is not a Wiktionary entry, and does not have any links in it (either bare or specified using {{l}}, {{w}} or the like). (If the value of |1= has bare links in it, the effect of wrapping with {{l}} is simply to convert those bare links into links pointing to the English section of the page in question, which is generally correct.)
|verb=
Override the verb "spoken" that normally appears in the category's description. Example values are formerly spoken for an extinct variety; chiefly spoken for a variety mostly spoken in the location specified in |1= but also spoken elsewhere; written for a written-only variety; etc.
|prep=
Override the preposition "in" that normally appears in the category's description. Example values are on if the location in |1= is an island; by if |1= specifies a group of people speaking the language (e.g. Tamil Brahmins); etc. Use - to suppress the preposition (e.g. Category:Overseas Chinese sets |1=outside of [[China]] and [[Taiwan]] and |prep=-).
|def=
Override the whole description following the words "Terms or senses in". The final period should not be included.
|fulldef=
Override the entire description. The final period should not be included.
|addl=
Specify additional text to display after the "Terms or senses in ..." category description, and before any category TOC (table of contents) bar. If this is given, include the final period. Note that if the variety directly names an etymology-only language, the additional text will automatically include the language code(s) of this etymology-only language. In such a case, any text specified using |addl= will follow this auto-added text.
|othercat=
Any additional category or categories to place the variety in. Separate multiple categories with a comma, without a following space (if a space follows the comma, it will not be considered a delimiter; this allows for embedded commas in categories, which are nearly always followed by a space). Unlike the value in |cat=, there are no restrictions on what sort of categories can be specified here.
|country=
Override the country or countries where the variety is spoken. See |1= above. Separate multiple countries with a comma without a following space, as with |othercat=. The purpose of this parameter is to add the variety to additional categories named Languages of country, so that such categories will be populated with all varieties spoken in the country. If the Languages of country category does not already exist, the variety will not be added to it. As mentioned in |1= above, if |1= names a country and a corresponding Languages of country category exists, the variety will automatically be added to it, so |country= does not need to be specified. As a rule, do not specify |country= for sub-country varieties. For example, Category:Texas English should not have |country=the United States specified, since Category:Texas English is a subcategory of Category:American English, which is in Category:Languages of the United States. An exception is when a language is spoken in only a portion of a country. For example, Category:Texas Silesian should have |country=the United States specified because there is no variety named Category:American Silesian (Silesian is not normally spoken in the United States except in Texas).
|wp=
Wikipedia link to include on the variety's page. This can be a single Wikipedia page or a comma-separated list of such pages (without any space after the comma; if a space follows the comma, it will not be considered a delimiter, to allow for embedded commas in Wikipedia page names). A given Wikipedia page can be prefixed with a language code to link to a page in a non-English Wikipedia. For example, Category:Japanese Korean specifies |wp=Zainichi Korean language,ko:재일조선어 to link to the Zainichi Korean language page on the English Wikipedia as well as the page 재일조선어 on the Korean Wikipedia. If the value of a Wikipedia page is +, 1, yes, true, on or similar, the Wikipedia page will be taken from the variety name. Note that if the variety names an etymology-only language (e.g. Category:Provençal or Category:Brazilian Portuguese), the correct Wikipedia article for this variety will automatically be fetched based on the relevant Wikidata entry and added to the category page. To prevent this, specify an explicit value for |wp=; use -, 0, no, false, off or similar if you don't want any Wikipedia page displayed.
|type=
Specify the type of variety (extinct, extant, reconstructed, unattested or constructed). Extinct varieties are categorized into Category:All extinct languages. Reconstructed varieties are categorized into Category:Reconstructed languages. Unattested varieties are categorized into Category:Unattested languages. Constructed varieties are categorized into Category:Constructed languages. In all cases an "additional text" message is placed indicating that the variety is (respectively) extinct, reconstructed, unattested or constructed. If the type is not given, it is inferred based on various factors (the type of the parent category, the type of the language that the variety belongs to, and whether the name of the category or language begins with "Proto-"). If no type can be inferred, it defaults to extant.
|pagename=
Act as if the pagename is the specified value rather than its actual value. Any inferred parameters will be based off of the specified value. This is useful for testing and demonstration purposes (e.g. in documentation pages).

1. For Category:Hong Kong English, use:

{{auto cat|dialect=1|cat=Chinese English}}

Here, |1= does not need to be specified because the inferred description "Hong Kong" is correct. The language is automatically inferred as English (and in any case, this is an etymology-only language with code en-HK, from which the language can be inferred). The parent category is set to Category:Chinese English in place of the default Category:Regional English.

2. For Category:Durham University English, use:

{{auto cat|dialect=1|prep=at|{{w|Durham University}} in [[Durham]]|cat=Durham English|othercat=en:Universities}}

Here, we specify the region description in |1= but the language is automatically inferred as English. The parent category is set to Category:Durham English in place of the default Category:Regional English (which leads to a breadcrumb chain Regional » European » British » English » Northern England » Northumbrian » Durham » Durham University based on parent categories). Category:en:Universities is added as an additional parent category.

3. For Category:Limburgan-Ripuarian transitional dialects, use:

{{auto cat|dialect=1|lang=gmw-cfr|the tri-state region of <country>|cat=Ripuarian Franconian|country=Belgium,the [[Netherlands]],Germany|wp=Southeast Limburgish dialect}}

This is a more complex example. We have to set the language (Central Franconian) explicitly using |lang= because it is not inferrable from the name and the category does not refer to an etymology-only language. The description in |1= contains <country>, which substitutes the countries mentioned in |country= (which also cause the category to be added to Category:Languages of Belgium, Category:Languages of the Netherlands and Category:Languages of Germany. We also specify a parent category and Wikipedia page to link to.

4. For Category:Dobhashi, use:

{{auto cat|dialect=1|lang=bn|def=a literary register of Bengali that was in common use from the 14th century to the 19th century|type=extinct|noreg=1|wp=1}}

Here, we have to set the language (Bengali), and we override the definition after "Terms or senses in" using |def= in place of specifying |1=. Since this isn't a regional variety, we set |noreg=1 so the parent defaults to Category:Bengali language. We set |type=extinct because this variety is extinct and this cannot be inferred from the parent (which is not extinct). We also use |wp=1 to link to Dobhashi on Wikipedia.

5. For Category:The BMAC substrate, use:

{{auto cat|dialect=1|def=the [[substrate]](s) spoken in the {{w|Bactria–Margiana Archaeological Complex}} and possibly found as a {{w|substratum in Vedic Sanskrit}}|breadcrumb=BMAC}}

Here, the language in question is an etymology-only substrate language whose actual name begins with a lowercase letter (the BMAC substrate), but the dialect handler automatically takes care of the mismatch and recognizes the etymology-only language. The type is automatically inferred to be unattested based on it being a substrate language (this is done by checking the code; all substrate language codes begin with qsb-). Based on the type, the default parent is Substrate languages. We set a breadcrumb to override the default breadcrumb The BMAC substrate.

"Languages of COUNTRY" categories

[မႄးထတ်း]

These are categories such as Category:Languages of India and Category:Languages of the United States. These categories contain subcategories for all the languages and sublects spoken in the country in question. The following parameters are allowed (none are required):

|flagfile=
An image file specifying the flag of the country in question, displayed in the upper right corner of the category page. The File: prefix should be omitted. An example is |flagfile=Flag of Afghanistan (2013–2021).svg for Afghanistan. The default is Flag of country.svg; if this file does not exist, no flag is displayed. Use |flagfile=- to cause the flag to be omitted even if the appropriate flag file is present.
|wp=
A link to a Wikipedia article describing the languages of the country, such as Languages of Australia. Use |wp=+ or |wp=1 to specify that the name of the Wikipedia article is the same as the category name.
|commonscat=
A link to a Commons category describing the languages of the country, such as Commons:Category:Languages of Chad. Use |commonscat=+ or |commonscat=1 to specify that the name of the Commons category is the same as the category name.

User language competency categories

[မႄးထတ်း]

These are categories such as Category:User fr-4 indicating that the user speaks French at near-native competency. The following parameters are allowed (none are required):

|text=
The native-language text specifying a translation of the English text describing the competency of the users in the category in the language in question. An image file specifying the flag of the country in question, displayed in the upper right corner of the category page. The File: prefix should be omitted. An example is |text=Ces utilisateurs parlent <<français>> à un niveau comparable à la langue maternelle. for the translation of "These users speak French at a near-native level." The text describing the level of competency should be boldfaced and the text specifying the language should be surrounded in double angle brackets, as shown. The language in double angle brackets will be boldfaced and linked to the higher-level user-competency category (e.g. Category:User fr); in that category, double angle bracket text is linked to the language category (e.g. Category:French language). If the text is omitted, the category is placed in two cleanup categories: Category:Requests for translations in user-competency categories by language and Category:Requests for translations in user-competency categories with ##-## users (e.g. Category:Requests for translations in user-competency categories with 16-31 users). (The purpose of the latter categories is to segment the categories with missing text by number of users so that the ones with more users can be focused on first.)
|verb=
The correct verb to use in the English text, in place of "speak" or (for sign languages) "communicate in". For example, protolanguages may prefer the verb "know".
|langname=
Override the name of the language. This is chiefly used in user competency categories for invalid language codes (e.g. eml for Emiliano-Romagnol; on Wiktionary, this code is represented by two languages, Emilian with code egl and Romagnol with code rgn). Such categories should be actively eliminated by moving the users in them to the nearest valid Wiktionary code and then deleting the category when empty.

Spelled-with categories

[မႄးထတ်း]

These are categories such as Category:English terms spelled with É, Category:Japanese terms spelled with 愛 and Category:Ladino terms derived from the Hebrew root ח־ב־ר. Normally, what follows spelled with is a single character, but occasionally multiple characters are used, as in Category:Ladino terms derived from the Hebrew root ח־ב־ר. For these categories, the following parameters are allowed (none are required):

|sort=
The sort key; used to sort the page in its parent category (e.g. Category:Japanese terms by their individual characters). Only needed if the automatically generated sort key is wrong. Examples are Category:Spanish terms spelled with Î, which should use Lua error in မေႃႇၵျူး:parameters at line 600: attempt to index local 'param' (a boolean value)., and Category:Japanese terms spelled with 衛, which should use Lua error in မေႃႇၵျူး:parameters at line 600: attempt to index local 'param' (a boolean value).. Japanese and Okinawan terms use Module:Hani-sortkey to generate the sort key, but currently this always generates Chinese sort keys, which in rare cases are wrong for Japanese (for example, the autogenerated sort key for Category:Japanese terms spelled with 衛 is 行09 instead of 行10).
|char=
If the category name has a descriptive word in it, such as gershayim, this should be the actual character referred to (in this case, Lua error in မေႃႇၵျူး:parameters at line 600: attempt to index local 'param' (a boolean value).). Otherwise, it should be left out.
|context=, |context2=
Provided for compatibility purposes, but unused.

Japonic "spelled-with KANJI read as READING" categories

[မႄးထတ်း]

These are categories such as Category:Japanese terms spelled with 学 read as がく and Category:Okinawan terms spelled with 光 read as ふぃちゃい. These contain terms spelled with individual kanji read in particular ways (where the reading is written in hiragana). These categories have required parameters specifying the type(s) of reading(s):

|1=, |2=, |3=, ... (required)
The reading type(s); one or more of kun, on, goon, kan'on, kan'yōon, tōon, sōon or nanori. For example, Category:Japanese terms spelled with 学 read as がく should use Lua error in မေႃႇၵျူး:parameters at line 600: attempt to index local 'param' (a boolean value). and Category:Okinawan terms spelled with 光 read as ふぃちゃい should use Lua error in မေႃႇၵျူး:parameters at line 600: attempt to index local 'param' (a boolean value).. The particular reading type(s) can often be found on the page dedicated to the kanji in question.