Wiktionary:Normalization of entries

Definition from Wiktionary, the free dictionary
(Redirected from Wiktionary:Wikitext style)
Jump to: navigation, search
Application-certificate Gion.svg This is a Wiktionary policy, guideline or common practices page.
It should not be modified without discussion and consensus. Any substantial or contested changes require a VOTE.[1]
Entries: CFI - EL - NORM - NPOV - QUOTE - DELETE. Languages: LT - AXX. Others: BLOCK - BOTS.

This is a list of aspects that govern how the wikitext behind an entry should be formatted. They are invisible to the readers, e.g., following these rules makes no difference to how a user sees the page, but they do make the pages conform more to a standard format reflecting what we think of as best for the wikitext. Issues such as where to put blank lines and how many, whether to put spaces inside the == ==, or after asterisks in lists.

These norms are mandatory for bots only, so that any changes made by bots must conform to this policy. This applies to the part of a page that the bots edit, not to the entire page.[2] Editors other than bots can treat these norms as guidelines, while they are encouraged to use this format and correct pages which deviate from it.

Example entry

==English==

===Noun===
{{en-noun}}

# Noun sense.

====Synonyms====
* synonym

----

==Portuguese==

(...)

List of norms

General

  1. No whitespace at the start or end of a line. Consequently, no lines consisting only of whitespace.
  2. Not more than 1 blank line in a row.
  3. No tab characters.
  4. The template {{also}} on its own line.[3]

Templates

  1. No leading or trailing whitespace in templates (name, parameter name and value), links, categories and so on.
  2. Line breaks are not allowed in parameter names.[4]
  3. For templates with many or long parameter values, line breaks are allowed at the end of a template's name or a parameter's value, for the purpose of making the wikitext easier to read. Example about {{ru-decl-noun}}:[4]
{{ru-decl-noun
|пау́к-во́лк|пауки́-во́лки
|паука́-во́лка|пауко́в-волко́в
|пауку́-во́лку|паука́м-волка́м
|паука́-во́лка|пауко́в-волко́в
|пауко́м-во́лком|паука́ми-волка́ми
|о пауке́-во́лке|о паука́х-волка́х}}

Headings

  1. One blank line before all headings, including between two headings, except for before the first language heading.
  2. No blank line after any heading except when another heading immediately follows.
  3. No whitespace between = and heading title, i.e. ==English== and ===Noun===, not == English == or === Noun ===.
  4. No templates in headings ({{abbreviation-old}}, as well as {{initialism-old}} are deprecated, but still allowed until they are fixed).
  5. The final = of a heading must be immediately followed by a newline: no content after a heading on the same line, including spaces, tabs and comments (such as ==Old English== <!-- also known as Anglo-Saxon -->).
  6. No blank lines between the first language heading and any preceding content.[5]
  7. The horizontal rule (----) on its own line.[3]
  8. One blank line before the ---- between language sections.
  9. One blank line after the ---- between language sections.

Lists

  1. One space after "#", "*" and ":" on the start of a line.

Pronunciation sections

  1. No SAMPA or X-SAMPA is entered directly in the wikitext. They may be generated automatically from the IPA by a template.[6]

POS sections; headword lines; senses/definitions

  1. Headword lines should always use templates, such as {{en-noun}} or {{head}}, not just wikitext, as in '''example'''.[7]
  2. One blank line after the headword line.
  3. No spaces between a linked term and the opening or closing brackets, or between a linked term and the pipe. ([[example|examples]], not [[ example | examples ]])[8]

Inflection tables

  1. Each inflection table on its own line.[3]

Translation sections

  1. One blank line between each translation block (i.e. between {{trans-bottom}} and {{trans-top}}).
  2. Language names should be spelled out, not generated by templates. For example, don't use a template that converts "en" into "English" and "fr" into "French".
  3. Each of the following templates on its own line:
    {{trans-top}}, {{trans-mid}}, {{trans-bottom}}, {{trans-see}}, {{checktrans-top}}[3]

See example:

====Translations====
{{trans-top|gloss}}
* Japanese: {{t|ja|...}}
{{trans-mid}}
* Portuguese: {{t|pt|...}}
{{trans-bottom}}

{{trans-top|gloss}}
{{trans-mid}}
{{trans-bottom}}

Categories and interwikis

  1. Entries should be categorized into POS categories (like Category:English nouns) using the headword-line templates, not using manual category links.[7]
  2. These rules do not affect templates, even if the sole purpose of a template is categorizing the entry.
  3. Each category[9] or interwiki on its own line.
  4. Categories are placed at the end of each language section.[9]
  5. Each template whose only purpose is categorization on its own line.[3]
  6. No blank lines between two categories or between two interwikis.
  7. Interwikis are placed at the very end of a page.
  8. One blank line before the first interwiki in a page.
  9. No spaces:
    1. Between "[[" and "Category".
    2. Between "Category" and ":".
    3. Between ":" and the category name.
    4. Between the category name and "]]".

Incorrect spacing:

[[ Category : English nouns ]]

Correct spacing:

[[Category:English nouns]]

Modules

  1. No module invocations ({{#invoke:). Modules should be wrapped up in templates.

References