แม่แบบ:ux/documentation
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
[แก้ไข]|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.)
|q=
,|qN=
or|qualifier=
,|qualifierN=
- To include a qualifier for the example or quote. You can specify multiple qualifiers using q2=, q3=, etc.
|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 and Yiddish; see example below). If specified, should be one or more substitution expressions separated by commas, where each substitution expression is of the form FROM/TO, 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).
|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.
Usage examples are normally preceded by "#:
", or by "#*
" or "#*:
" to hide the usage example (normally used for direct quotes).
Examples
[แก้ไข]Wikitext (from ภาษาทาจิก китоб (kitob))
# [[book]] #: {{ux|tg|Ин '''китобро''' хондам.|I read this '''book'''.}}
Output
- book
- Ин китобро хондам.
- In kitobro xondam.
- I read this book.
Wikitext (from ภาษาเอสเปรันโต indiki)
# 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
- to indicate
- La forta vento indikas ke ŝtormo venas. [1]
- The strong wind indicates that a storm is coming.
References
[แก้ไข]
Wikitext (from ภาษาเอสเปรันโต kiuj)
# ({{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
- (พหูพจน์ของ kiu) 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.
Wikitext (from ภาษาเอสเปรันโต kelkaj)
# {{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
Wikitext
#: {{ux|fr|cousu de fil blanc|blatantly obvious|lit=sewn with white thread|inline=y}}
Output
- cousu de fil blanc ― blatantly obvious (แปลตรงตัว “sewn with white thread”)
Wikitext
#: {{ux|ru|Полицейские огородили середину шоссе́ на гора́х, '''всле́дствие чего́''' бегле́ц был на воле.|Police officers blocked the middle of the highway '''as a consequence that''' a fugitive was on the loose.|subst=шоссе́/шоссэ́}}
Output
- Полицейские огородили середину шоссе́ на гора́х, всле́дствие чего́ бегле́ц был на воле.
- โปลิต͜ซเยยซกีเย โอโกฺโรดีลี ซเยรเยดีนู โฌซเซ นา โกฺรัฅ, วฺซลเยดซตวฺีเย ชเยโกฺ บเยกฺลเยต͜ซ บึล นา โวฺลเย.
- 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
- fließen (Germany) ― to flow
- fliessen (Switzerland, Liechtenstein) ― to flow
See also
[แก้ไข]- WT:USEX
- Module:usex
- Module:usex/templates
{{uxi}}
– used for inline usage examples{{quote}}
– used for quotations{{rfex}}
– to request an example{{suffixusex}}
– usage example for suffix entries{{prefixusex}}
– usage example for prefix entries
TemplateData
[แก้ไข]This is used to show usage examples (not quotations) following a definition line.
พารามิเตอร์ | คำอธิบาย | ชนิด | สถานะ | |
---|---|---|---|---|
language code | 1 | The language code of the example to be shown
| สตริง | จำเป็น |
example | 2 | The example to be shown
| สตริง | จำเป็น |
translation | 3 t | The English translation for examples on foreign entries.
| สตริง | เลือกได้ |
transliteration | tr | The Latin transliteration for examples in non-Latin script. | สตริง | แนะนำ |
script code | sc | The script code, required for certain languages with multiple possible scripts.
| สตริง | เลือกได้ |
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.)
| จำนวน | แนะนำ |
qualifier | q | To qualify an example with a region or register, or a type of usage.
| สตริง | เลือกได้ |
reference | ref | To include a reference or link to an originating external site. | ยูอาร์แอล | เลือกได้ |
literal translation | lit | A literal translation of an idiomatic expression in a foreign language.
| สตริง | เลือกได้ |
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, 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).
| สตริง | เลือกได้ |
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. | ตรรกะ | เลือกได้ |