uxi/documentation

Revision as of 21:00, 15 September 2020 by Root (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Template:documentation subpage This is used to show inline 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.

The template call Template:temp works identically to Template:temp. It is intended for usage examples that are short enough that the example, its transliteration (if needed) and any idiomatic or literal translations can all fit on a single line, separated by em dashes.

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, Template:para or Template:para, Template:para
To include a qualifier for the example. You can specify multiple qualifiers using q2=, q3=, etc.
Template:para
To include a reference or link to an originating external site.
Template:para
A literal translation.
Template:para
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
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]]
#: {{uxi|tg|Ин '''китобро''' хондам.|I read this '''book'''.}}

Output

  1. book
    Template:uxi


Wikitext (from Template:cog)

# to [[indicate]]
#: {{uxi|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
    Template:uxi

References

<references/>


Wikitext (from Template:cog)

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

Output

  1. Template:inflection of
    1. a few
    2. several
      Template:uxi


Wikitext

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

Output

  1. Template:uxi


Wikitext

#: {{uxi|ru|Полицейские огородили середину шоссе́ на гора́х.|Police officers blocked the middle of the highway.|subst=шоссе́//шоссэ́}}

Output

  1. Template:uxi


Wikitext

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

Output

  1. Template:uxi
    Template:uxi

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" }, "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" }, "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" }, "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" }, "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, 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. 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", "example": "true" } }, "description": "This is used to show inline usage examples (not quotations) following a definition line. ", "format": "block" } </templatedata>