ទំព័រគំរូ:បញ្ជី/doc
This page contains guidelines for creation and maintenance of lists formed by the template {{list}}
.
Quick examples
[កែប្រែ]Chess pieces in English
[កែប្រែ]- Code:
* {{list|en|chess pieces}}
- Result:
- (chess pieces) [create]
Chess pieces in Portuguese
[កែប្រែ]- Code:
* {{list|pt|chess pieces}}
- Result:
- (chess pieces) [create]
Entries
[កែប្រែ]List templates should be called at entries immediately after a See also header. Please do not use subst:.
Lists are called by {{list}}
followed by the language code and the name of the list
- Examples of possible English lists:
- Examples of possible German lists:
Criteria for inclusion
[កែប្រែ]Scope
[កែប្រែ]A list may contain all terms defined by its title: for instance, a list of "grammatical cases" ({{list|en|grammatical cases}}
) should contain every grammatical case. A hypernym may also be linked as explained below. All entries linked by a list may call it at a See also section.
Therefore, the English entry taste may contain:
- A list of senses (
{{list|en|senses}}
), including sight, smell, etc. - A list of tastes (
{{list|en|tastes}}
), including salty, sweet, bitter, etc.
Quantity
[កែប្រែ]As a guideline, do not create tiny nor enormous lists. Please try to not let a list contain less than 3 or more than 60 links, while still keeping in it all possible terms.
When a list has many terms, subdivide it into lists with different names thus different scopes. For example, instead of creating a considerably enormous list of body parts ({{list|en|body parts}}
) that would link to nail, eyeball, mandible, leg and heart, please consider creating more speficic lists such as muscles ({{list|en|muscles}}
) or bones ({{list|en|bones}}
).
Collation
[កែប្រែ]If the terms may be arranged in a common order, such as Sunday, then Monday then Tuesday at a list of days of the week, the common order is preferred. Otherwise, please use the alphabetical order or other generic collation system when possible.
Templates
[កែប្រែ]This is where the information about the list is stored.
Template name
[កែប្រែ]One script
[កែប្រែ]Their naming format is Template:list:(list name)/(language code). Examples:
- (English template) Template:list:coffees/en
- (Mandarin template) Template:list:coffees/cmn
- (French template) Template:list:coffees/fr
- (Portuguese template) Template:list:coffees/pt
Two or more scripts
[កែប្រែ]When there are two or more scripts for a language, each of them is stored inside an individual template. Each script must be specified in the template name, as follows.
- (Mandarin template in Han script) Template:list:coffees/cmn/Hani
- (Mandarin template in Latin script) Template:list:coffees/cmn/Latn
- (Serbo-Croatian template in Cyrillic script) Template:list:coffees/sh/Cyrl
- (Serbo-Croatian template in Latin script) Template:list:coffees/sh/Latn
Template layout
[កែប្រែ]All list templates should consist of a template call to {{list helper}}
and nothing else. An empty example can be loaded by using {{list preload}}
.
Parameters
[កែប្រែ]title
: The current list title, which is basically a pluralized hypernym that explains the contents of the list.- Example: A list of chess pieces would have the hypernym "chess pieces".
lang
: The current language code.sc
: The current script code, if the script is also specifiec in the template title.cat
andcat2
: Optional category names to be linked to the entry.- Note: All terms listed (but not its hypernyms) are automatically categorized by the parameters
cat
andcat2
.
- Note: All terms listed (but not its hypernyms) are automatically categorized by the parameters
appendix
: An optional appendix to be linked to the entry.hypernym
: The hypernym, as an entry to be linked.- Note: This parameter may have various links at once when necessary. For instance, a list of Gregorian calendar months would have a hypernym "Gregorian calendar month", with links to two terms.
hypernym2
andhypernym3
: Optional synonyms or alternative spellings of thehypernym
(and not additional hypernyms of different scope or meaning).- (unnamed parameters): The terms of the list.
1syn
,2syn
, etc.: An optional synonym or alternative spelling for each term of the list.
Empty example
[កែប្រែ]{{list helper|lang= |title= |cat= |appendix= |hypernym= |||}}
Short examples
[កែប្រែ]Example 1: An (uncomplete) Template:list:Gregorian calendar months/en, to be called at entries by {{list|en|Gregorian calendar months}}
.
{{list helper|lang=en |title=Gregorian calendar months |cat=Months |hypernym={{l|en|Gregorian calendar}} {{l|en|months}} |January|February|March|April|May|June}}
Example 2: An (uncomplete) Template:list:Gregorian calendar months/pt, to be called at entries by {{list|pt|Gregorian calendar months}}
.
{{list helper|lang=pt |title=Gregorian calendar months |cat=pt:Months |hypernym={{l|pt|mês}} do {{l|pt|calendário gregoriano}} |janeiro|fevereiro|março|abril|maio|junho}}
Technical documentation
[កែប្រែ]This system is made up of four meta-templates,
{{list|{{{lang}}}|{{{list name}}}}}
- Used on entries to display the list, calls
{{list helper}}
for formatting, or adds a preload link to create a template using{{list preload}}
{{list helper|{{{list name}}}|{{{lang}}}}}
- Included on ecah list template, it is responsible for the format of the line when a template exists, it uses
{{list linker}}
to link to the words correctly. - It also, when the template is shown directly, shows the documentation for that template.
{{list linker|{{{page}}}|{{{lang}}}}}
- Displays a link to the correct language section.
{{list preload}}
- Preloads an empty list-helper with some possibly useful comments.