Sablon:ux
Sablon:uses lua
This template is used to show usage examples (not quotations or collocations) following a definition line. For quotations, use {{quote}}
or a more extensive quotation template. For collocations, use {{coi}}
or {{co}}
. See WT:USEX for some general guidelines regarding usage examples.
Parameters
szerkesztés|1=
- The language code of the example to be shown, e.g.
en
for English; see WT:LANGLIST for the full list. |2=
- The example to be shown. It should not contain wikilinks.
|3=
,|translation=
or|t=
- The English translation for examples on foreign entries.
|tr=
or|transliteration=
- The Latin transliteration for examples in non-Latin script.
|sc=
- The script code, required for certain languages with multiple possible scripts; see Wiktionary:List of scripts for the full list.
|inline=
- 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
{{uxi}}
.) |q=
,|qN=
or|qualifier=
,|qualifierN=
- To include a qualifier for the example or quote. You can specify multiple qualifiers using q2=, q3=, etc.
|footer=
- Additional information to include in a footer.
|ref=
- To include a reference or link to an originating external site.
|lit=
- A literal translation.
|subst=
- 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), whereFROM
is the source text as found in the example, andTO
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|tr=
. Multiple substitutions are separated by a comma with no space after it:|subst=FROM1//TO1,FROM2//TO2,FROM3//TO3
. Note thatFROM
andTO
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{{uxi}}
and{{quote}}
. |noenum=
- 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. |nocat=
- Don't add categories.
|sort=
- 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
szerkesztésExample 1
szerkesztésOn the page for Sablon:m+:
#: {{ux|tg|Ин '''китобро''' хондам.|I read this '''book'''.}}gives
- Lua-hiba a(z) Modul:0languages/doSubstitutions modulban a(z) 73. sorban: Substitution data 'tg-translit' does not match an existing module or module failed to execute: package.lua:80: module 'Module:0tg-translit' not found.
Example 2
szerkesztésOn the page for Sablon:m+:
#: {{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/>gives
- La forta vento indikas ke ŝtormo venas.[1]
- The strong wind indicates that a storm is coming.
References
Example 3
szerkesztésOn the page for Sablon:m+:
# ({{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>}}gives
- (kiu többes számú alakja) which (relative)
- 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.[1]
- 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.
Example 4
szerkesztésOn the page for Sablon:m+:
# {{inflection of|eo|kelka||p}} ## [[a few]] ## [[several]] ##: {{uxi|eo|'''Kelkaj''' el iliaj ovoj estas malbonaj.|'''Several''' of their eggs are bad.}}gives
- kelka többes számú alakja
Example 5
szerkesztésOn the page for Sablon:m+:
#: {{ux|ru|Полице́йские огороди́ли середи́ну шоссе́ на гора́х, '''всле́дствие чего́''' бегле́ц был на во́ле.|Police officers blocked the middle of the highway '''as a consequence that''' a fugitive was on the loose.|subst=шоссе́//шоссэ́}}gives
- Полице́йские огороди́ли середи́ну шоссе́ на гора́х, всле́дствие чего́ бегле́ц был на во́ле.
- Policéjskije ogorodíli seredínu šossɛ́ na goráx, vslédstvije čevó begléc byl na vóle.
- Police officers blocked the middle of the highway as a consequence that a fugitive was on the loose.
Example 6
szerkesztésOn the page for Sablon:m+:
#: {{ux|ru|[[в|В]] [[чужо́й]] [[монасты́рь]] [[со]] [[свой|свои́м]] '''уста́вом''' [[не]] [[ходить|хо́дят]]|[[when in Rome, do as the Romans do]]|lit=You don't go to another monastery with your own '''charter'''|q=proverb}}gives
- В чужо́й монасты́рь со свои́м уста́вом не хо́дят (proverb)
- V čužój monastýrʹ so svoím ustávom ne xódjat
- when in Rome, do as the Romans do
- (literally, “You don't go to another monastery with your own charter”)
Example 7
szerkesztésOn the page for Sablon:m+:
#* {{quote|hi|isake baada aayojakon ne '''parnparaagata''' lokanritya ke saatha mele kaa shubhaarnbha kiyaa।|After this the organizers started the festival with a '''traditional''' folk dance.|subst=parnparaagata//parnpa*raagata}}gives
- isake baada aayojakon ne parnparaagata lokanritya ke saatha mele kaa shubhaarnbha kiyaa।
- isake baada aayojakon ne parnpaaraagata lokanritya ke saatha mele kaa shubhaarnbha kiyaa.
- After this the organizers started the festival with a traditional folk dance.
See also
szerkesztés- WT:USEX
- Module:usex
- Module:usex/templates
{{uxi}}
– used for inline usage examples{{quote}}
– used for quotations{{co}}
– used for collocations{{rfex}}
– to request an example{{suffixusex}}
– usage example for suffix entries{{prefixusex}}
– usage example for prefix entries
TemplateData
szerkesztésThis is used to show usage examples (not quotations) following a definition line.
Paraméter | Leírás | Típus | Állapot | |
---|---|---|---|---|
language code | 1 | The language code of the example to be shown
| Karakterlánc | kötelező |
example | 2 | The example to be shown. Use '''bold''' to highlight the current term.
| Karakterlánc | kötelező |
translation | 3 t translation | The English translation for examples on foreign entries. Use '''bold''' to highlight the current term's translation.
| Karakterlánc | opcionális |
transliteration | tr | The Latin transliteration for examples in non-Latin script. | Karakterlánc | opcionális |
script code | sc | The script code, required for certain languages with multiple possible scripts.
| Karakterlánc | opcionális |
inline | inline | 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.)
| Szám | opcionális |
qualifier | q | To qualify an example with a region or register, or a type of usage.
| Karakterlánc | opcionális |
reference | ref | To include a reference or link to an originating external site. | URL | opcionális |
literal translation | lit | A literal translation of an idiomatic expression in a foreign language.
| Karakterlánc | opcionális |
substitution | subst | 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).
| Karakterlánc | opcionális |
noenum | noenum | To use in unnumbered sections (not following a definition). It may start the line following the definition or may be prefixed by "<code>#:</code>" for visual aesthetics. | Logikai | opcionális |