ux/documentation

Template:documentation subpage Template:shortcut This is used to show usage examples (not quotations) following a definition line. The actual work is delegated to Module:usex/templates and Module:usex. See WT:USEX for some general guidelines regarding usage examples.

Parameters

Template:para
The language code of the example to be shown, e.g. en for English; see WT:LANGLIST for the full list.
Template:para
The example to be shown. It should not contain wikilinks.
Template:para, Template:para or Template:para
The English translation for examples on foreign entries.
Template:para or Template:para
The Latin transliteration for examples in non-Latin script.
Template:para
The script code, required for certain languages with multiple possible scripts; see Wiktionary:List of scripts for the full list.
Template:para
To include the translation in the same line as the example, separated from the example by em dash, assuming that the example, its translation and transliteration are short enough to fit in a single line. (Set it to 1 to choose inline mode. See also Template:temp.)
Template:para, Template:para or Template:para, Template:para
To include a qualifier for the example or quote. You can specify multiple qualifiers using q2=, q3=, etc.
Template:para
Additional information to include in a footer.
Template:para
To include a reference or link to an originating external site.
Template:para
A literal translation.
Substitutions to be applied to handle irregular transliterations in certain languages (e.g. Russian, Yiddish, Hindi). If specified, should be one or more substitution expressions separated by commas. Each substitution expression is of the form FROM//TO (FROM/TO is also accepted), where FROM is the source text as found in the example, and TO is the corresponding respelling in the source script (e.g. Cyrillic, Hebrew or Devanagari). The substitutions are applied in order and before transliteration. The idea is to phonetically respell words with irregular transliteration so that the transliteration comes out correctly, without the need to manually transliterate the entire example using Template:para. Note that FROM and TO are actually Lua patterns (see WT:LUA). This means, for example, that a hyphen in the source text needs to be "escaped" by writing it as %-. See below for an example of using this parameter. Other examples may be found in the documentation for Template:temp and Template:temp.
Template:para
To use in unnumbered sections (not following a definition). It may start the line following the definition or may be prefixed by "#:" for visual aesthetics.
Template:para
Don't add categories.
Template:para
Sortkey. Add this only when the sortkey cannot be generated from the entry name.

Usage examples are normally preceded by "#:", or by "#*" or "#*:" to hide the usage example (normally used for direct quotes).

Examples

Wikitext (from Template:cog)

# [[book]]
#: {{ux|tg|Ин '''китобро''' хондам.|I read this '''book'''.}}

Output

  1. book
    Ин китобро хондам.  — I read this book.


Wikitext (from Template:cog)

# to [[indicate]]
#: {{ux|eo|La forta vento '''indikas''' ke ŝtormo venas.|The strong wind '''indicates''' that 
a storm is coming.|ref=<ref>http://tatoeba.org/eng/sentences/show/454290</ref>}}

===References===
<references/>

Output

  1. to indicate
    La forta vento indikas ke ŝtormo venas.  — The strong wind indicates that a storm is coming.

References

<references/>


Wikitext (from Template:cog)

# ({{plural of|eo|kiu}}) [[which]] {{gloss|relative}}
#: {{ux|eo|La elementoj '''kiuj''' troviĝis sur piratflagoj estis skeletkapo, la simbolo por la morto, skeleto indikis turmentan morton,
sablohorloĝo indikis ke la tempo venis, sanganta koro malrapida kaj dolora morto kaj ponardo aŭ maĉeto signifis impulso por batali.
|The elements '''which''' were found on pirate flags were: skull, the symbol for death, skeleton indicated torturous death, hourglass
indicated that the time came, bleeding heart → slow and painful death and dagger or machete signified impulse for battle.
|ref=<sup>[//eo.wikipedia.org/wiki/Jolly_Roger]</sup>}}

Output

  1. (Template:plural of) which Template:gloss
    La elementoj kiuj troviĝis sur piratflagoj estis skeletkapo, la simbolo por la morto, skeleto indikis turmentan morton, sablohorloĝo indikis ke la tempo venis, sanganta koro malrapida kaj dolora morto kaj ponardo aŭ maĉeto signifis impulso por batali.  — The elements which were found on pirate flags were: skull, the symbol for death, skeleton indicated torturous death, hourglass indicated that the time came, bleeding heart → slow and painful death and dagger or machete signified impulse for battle.


Wikitext (from Template:cog)

# {{inflection of|eo|kelka||p}}
## [[a few]]
## [[several]]
##: {{ux|eo|'''Kelkaj''' el iliaj ovoj estas malbonaj.|'''Several''' of their eggs are bad.|inline=1}}

Output

  1. Template:inflection of
    1. a few
    2. several
      Kelkaj el iliaj ovoj estas malbonaj.  — Several of their eggs are bad.


Wikitext

#: {{ux|fr|cousu de fil blanc|blatantly obvious|lit=sewn with white thread|inline=y}}

Output

  1. cousu de fil blanc  — blatantly obvious


Wikitext (with subst=)

#: {{ux|ru|Полице́йские огороди́ли середи́ну шоссе́ на гора́х, '''всле́дствие чего́''' бегле́ц был на во́ле.|Police officers blocked the middle of the highway '''as a consequence that''' a fugitive was on the loose.|subst=шоссе́//шоссэ́}}

Output (with subst=)

  1. Полице́йские огороди́ли середи́ну шоссе́ на гора́х, всле́дствие чего́ бегле́ц был на во́ле.  — Police officers blocked the middle of the highway as a consequence that a fugitive was on the loose.


Wikitext

#: {{ux|de|fließen|to flow|q=Germany|inline=1}}
#: {{ux|de|fliessen|to flow|q=Switzerland|q2=Liechtenstein|inline=1}}

Output

  1. fließen  — to flow
    fliessen  — to flow

See also

TemplateData

Template:TemplateData header <templatedata> { "params": { "1": { "label": "language code", "description": "The language code of the example to be shown", "example": "en", "type": "string", "required": true, "suggested": true }, "2": { "label": "example", "description": "The example to be shown. Use bold to highlight the current term.", "example": "The quick brown fox jumps over the lazy dog.", "type": "string", "required": true, "suggested": true }, "3": { "aliases": [ "t", "translation" ], "label": "translation", "description": "The English translation for examples on foreign entries. Use bold to highlight the current term's translation.", "example": "Le rapide renard brun saute par dessus le chien paresseux.", "type": "string" }, "inline": { "label": "inline", "description": "To include the translation in the same line as the example, separated from the example by em dash, assuming that the example, its translation and transliteration are short enough to fit in a single line. (Set it to 1 to choose inline mode.)", "example": "1", "type": "number" }, "lit": { "label": "literal translation", "type": "string", "description": "A literal translation of an idiomatic expression in a foreign language.", "example": "to fly like plywood over Paris" }, "q": { "label": "qualifier", "type": "string", "description": "To qualify an example with a region or register, or a type of usage.", "example": "informal" }, "ref": { "label": "reference", "description": "To include a reference or link to an originating external site.", "type": "url" }, "tr": { "label": "transliteration", "type": "string", "description": "The Latin transliteration for examples in non-Latin script." }, "sc": { "label": "script code", "type": "string", "description": "The script code, required for certain languages with multiple possible scripts.", "example": "Latn" }, "subst": { "label": "substitution", "type": "string", "description": "Substitutions to be applied to handle irregular transliterations in certain languages (e.g. Russian and Yiddish; see example above). If specified, should be one or more substitution expressions separated by commas, where each substitution expression is of the form FROM//TO (FROM/TO is also accepted), where FROM is a Lua pattern and TO is the corresponding replacement expression (see WT:LUA). The substitutions are applied in order and before transliteration; hence both FROM and TO should be in the source script (e.g. Cyrillic or Hebrew).", "example": "шоссе́//шоссэ́" }, "noenum": { "label": "noenum", "description": "To use in unnumbered sections (not following a definition). It may start the line following the definition or may be prefixed by \"#:\" for visual aesthetics.", "type": "boolean" } }, "description": "This is used to show usage examples (not quotations) following a definition line.", "format": "block", "paramOrder": [ "1", "2", "3", "tr", "sc", "inline", "q", "ref", "lit", "subst", "noenum" ] } </templatedata>