Bản mẫu:ux
| Bản mẫu này sử dụng Lua: |
Bản mẫu này được sử dụng để hiển thị các câu ví dụ sử dụng (không phải trích dẫn hoặc cụm từ) của một định nghĩa nhất định. Bản mẫu này thêm trang vào thể loại "Mục từ có ví dụ cách sử dụng" và đóng vai trò là bộ mô tả nội dung có thể đọc được bằng máy để xử lý tự động, đồng thời gắn thẻ ngôn ngữ văn bản cho trình đọc màn hình hoặc phần mềm tự động hóa khác.
Đối với các trích dẫn, vui lòng sử dụng các bản mẫu trích dẫn. Đối với cụm từ, vui lòng sử dụng {{coi}} hoặc {{co}}. Để biết hướng dẫn chung về các câu ví dụ sử dụng, vui lòng xem WT:USEX.
Tham số
[sửa]|1=- Mã ngôn ngữ của ví dụ cần hiển thị, ví dụ
vicho tiếng Việt; xem danh sách đầy đủ tại WT:LANGLIST. |2=- Câu ví dụ cần hiển thị. Không nên chứa các liên kết wiki.
|3=,|translation=or|t=- Bản dịch tiếng Việt cho câu ví dụ.
|tr=or|transliteration=- Bản chuyển tự (sang bảng chữ cái Latinh) cho các câu ví dụ sử dụng hệ chữ viết không phải Latinh.
|sc=- Mã hệ chữ viết, cần thiết cho một số ngôn ngữ có nhiều hệ thống chữ viết; xem danh sách đầy đủ tại Wiktionary:Danh sách hệ chữ viết.
|inline=- Nếu đặt là
autohệ thống sẽ tự động quyết định hiển thị toàn bộ ví dụ (bao gồm câu ví dụ, chuyển tự, bản dịch và các giá trị hiển thị khác) ở dạng trong dòng (một dòng duy nhất) hay đa dòng (sử dụng nhiều dòng để hiển thị riêng biệt). Thuật toán hiện tại khá cơ bản: Tính tổng số ký tự hiển thị (đối với các ngôn ngữ châu Á, đặc biệt là tiếng Trung-Nhật-Hàn, mỗi ký tự được tính là hai). Nếu tổng số lớn hơn 100, nó sẽ sử dụng định dạng đa dòng; nếu không, nó sẽ sử dụng định dạng trong dòng. Nếu đặt là1,yes,y,true,on, hoặc các giá trị tương tự, nó sẽ luôn sử dụng định dạng trong dòng. Nếu không, nó sẽ luôn sử dụng định dạng đa dòng. Xem thêm{{uxi}}, một bản mẫu khác luôn sử dụng định dạng trong dòng. |q=,|qN=hoặc|qualifier=,|qualifierN=- Thêm một từ hạn định cho câu ví dụ. Có thể chỉ định nhiều từ hạn định bằng cách sử dụng q2=, q3=, ....
|footer=- Thông tin bổ sung được bao gồm ở chân trang.
|ref=- Tham khảo hoặc liên kết đến một trang web bên ngoài gốc.
|audio=- Tập tin âm thanh ghi lại cách phát âm của câu ví dụ.
|lit=- Bản dịch theo nghĩa đen.
|subst=- Được sử dụng để xử lý chuyển tự không đều cho một số ngôn ngữ (ví dụ: tiếng Nga, tiếng Yiddish, tiếng Hindi). Nếu được chỉ định, nó phải là một hoặc nhiều biểu thức thay thế, phân tách bằng dấu phẩy. Mỗi biểu thức có định dạng
FROM//TO(cũng chấp nhậnFROM/TO), trong đóFROMlà văn bản gốc tìm thấy trong câu ví dụ vàTOlà cách viết lại tương ứng trong cùng hệ thống chữ viết gốc (ví dụ: Cyrillic, Hebrew hoặc Devanagari). Các thay thế được áp dụng theo thứ tự và trước khi chuyển tự. Mục đích là để "viết lại" những từ có cách chuyển tự không đều, đảm bảo chuyển tự hiển thị chính xác mà không cần phải dùng|tr=để chuyển tự thủ công toàn bộ câu. Nhiều thay thế được phân tách bằng dấu phẩy và không có dấu cách sau dấu phẩy:|subst=FROM1//TO1,FROM2//TO2,FROM3//TO3. Lưu ý rằngFROMvàTOthực chất là các mẫu Lua (xem WT:LUA). Điều này có nghĩa là, ví dụ, dấu gạch ngang trong văn bản gốc cần được "thoát", viết là%-. Xem các ví dụ bên dưới về việc sử dụng tham số này. Other examples may be found in the documentation for{{uxi}}and{{quote}}. |noenum=- Sử dụng cho các phần không được đánh số (không nằm sau một định nghĩa cụ thể). Có thể được đặt trên một dòng riêng sau định nghĩa hoặc thêm tiền tố "
#:" để làm đẹp bố cục. |nocat=- Không thêm vào thể loại.
|sort=- Khóa sắp xếp. Chỉ cần thêm khi khóa sắp xếp không thể được tự động tạo từ tên mục từ.
Các ví dụ sử dụng thường được đặt trước tiền tố "#:". Cũng có thể sử dụng "#*" hoặc "#*:" để ẩn ví dụ (thường dùng cho các trích dẫn trực tiếp).
Ví dụ
[sửa]Ví dụ 1
[sửa]On the page for tiếng Tajik китоб (kitob):
#: {{ux|tg|Ин '''китобро''' хондам.|Tôi đã đọc '''cuốn sách''' này.}} gives
- Ин китобро хондам.
- In kitobro xondam.
- Tôi đã đọc cuốn sách này.
Ví dụ 2
[sửa]On the page for tiếng Quốc tế ngữ indiki, using |ref=:
#: {{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
Ví dụ 3
[sửa]On the page for tiếng Quốc tế ngữ kiuj, using |ref=:
# ({{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
- (Số nhiều của 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.
- 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.
Ví dụ 4
[sửa]On the page for tiếng Quốc tế ngữ kelkaj, using {{uxi}}:
# {{inflection of|eo|kelka||p}}
## [[a few]]
## [[several]]
##: {{uxi|eo|'''Kelkaj''' el iliaj ovoj estas malbonaj.|'''Several''' of their eggs are bad.}}
gives
Ví dụ 5
[sửa]On the page for tiếng Nga вследствие (vsledstvije), using |subst=:
#: {{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.
Ví dụ 6
[sửa]On the page for tiếng Nga устав (ustav), using |lit= and |q=:
#: {{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
- (nghĩa đen: “You don't go to another monastery with your own charter”)
Ví dụ 7
[sửa]On the page for tiếng Hindi परंपरागत (paramprāgat), using |subst=:
#* {{quote|hi|इसके बाद आयोजकों ने '''परंपरागत''' लोकनृत्य के साथ मेले का शुभारंभ किया।|After this the organizers started the festival with a '''traditional''' folk dance.|subst=परंपरागत//परंप*रागत}} gives
- इसके बाद आयोजकों ने परंपरागत लोकनृत्य के साथ मेले का शुभारंभ किया।
- iske bād āyojkõ ne paramparāgat loknŕtya ke sāth mele kā śubhārambh kiyā.
- After this the organizers started the festival with a traditional folk dance.
Ví dụ 8
[sửa]On the page for tiếng Bồ Đào Nha chegar, using |qualifier= to add a qualifier:
#* {{ux|pt|Em algumas horas '''chegaremos''' em Londres.|qualifier=Brazil|t=In a few hours '''we will arrive''' at London.}} gives
- Em algumas horas chegaremos em Londres. (Brazil)
- In a few hours we will arrive at London.
Xem thêm
[sửa]- Wiktionary:Example sentences
- Wiktionary:Quotations
{{uxi}}– used for inline usage examples{{uxa}}– used for usage examples with automatic inline determination{{rfex}}– to request an example- For affix entries:
{{affixusex}}– usage example specifically for affix entries (prefixes, suffixes, etc.){{suffixusex}}– usage example only for suffix entries{{prefixusex}}– usage example only for prefix entries
- For collocations:
- Module:usex
- Module:usex/templates
TemplateData
[sửa]TemplateData cho ux
This is used to show usage examples (not quotations) following a definition line.
| Tham số | Miêu tả | Kiểu | Trạng thái | |
|---|---|---|---|---|
| language code | 1 | The language code of the example to be shown
| Chuỗi dài | bắt buộc |
| example | 2 | The example to be shown. Use '''bold''' to highlight the current term.
| Chuỗi dài | bắt buộc |
| translation | 3 t translation | The English translation for examples on foreign entries. Use '''bold''' to highlight the current term's translation.
| Chuỗi dài | tùy chọn |
| transliteration | tr transliteration | The Latin transliteration for examples in non-Latin script. | Chuỗi dài | tùy chọn |
| script code | sc | The script code, required for certain languages with multiple possible scripts.
| Chuỗi dài | tùy chọn |
| inline | inline | Set to 1 to include the translation and any transliteration in the same line as the example. Transliterations are set off using parens and translations using an em dash. Set to 'auto' to auto-determine whether to display inline or multiline.
| Số | tùy chọn |
| qualifier | q qualifier | To qualify an example with a region or register, or a type of usage.
| Chuỗi dài | tùy chọn |
| reference | ref | To include a reference or link to an originating external site. | URL | tùy chọn |
| audio | audio | An audio file that contains the example sentence in spoken form. | Tập tin | tùy chọn |
| literal translation | lit | A literal translation of an idiomatic expression in a foreign language.
| Chuỗi dài | tùy chọn |
| 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).
| Chuỗi dài | tùy chọn |
| 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. | Luận lý | tùy chọn |
| nocat | nocat | Don't add categories | Luận lý | tùy chọn |