Пређи на садржај

Шаблон:auto cat/док

Документација за Шаблон:auto cat. [edit]
Ова страна садржи usage information, categories, interwiki links и други садржај описан шаблон.
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 importScript('User:Erutuon/addAutoCat.js'); 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:

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.

Parameters

[уреди]

Some categories allow or require parameters to {{auto cat}} to help out categorization.

Affix categories

[уреди]

These are categories are categories such as Category:Latin words suffixed with -inus and Category:Japanese words 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 words suffixed with -inus, specify {{auto cat|alt=-īnus}} so that the suffix in the category description, and the breadcrumb at the top of the page, are displayed as -īnus, with a macron.
|sort=
The sort key. Mostly only needed for Japanese. For example, for Category:Japanese words prefixed with 真っ, use {{auto cat|sort=まっ}} so that the page is properly sorted in its parent category Category:Japanese words 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 Категорија:Француски језик and Категорија:Пра-Индо-Европски језик. 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 Категорија:Језици по земљама 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. Пра-Индо-Европски) or constructed/artificial (e.g. Есперанто). 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.

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 {{auto cat|sort=I}}, and Category:Japanese terms spelled with 衛, which should use {{auto cat|sort=行10}}. Japanese and Okinawan terms use Module:zh-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, {{auto cat|char=״}}). Otherwise, it should be left out.
|context=, |context2=
Provided for compatibility purposes, but unused.

Japanese/Okinawan "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 {{auto cat|goon|kan'on}} and Category:Okinawan terms spelled with 光 read as ふぃちゃい should use {{auto cat|kun}}. The particular reading type(s) can often be found on the page dedicated to the kanji in question.