ထႅမ်းပလဵတ်ႉ:Q
မေႃႇၵျူး:languages:1681: The function getByCode expects a string as its first argument, but received nil.
- The following documentation is located at ထႅမ်းပလဵတ်ႉ:Q/documentation. [edit]
- Useful links: subpage list • links • redirects • transclusions • errors (parser/module) • sandbox
- See also: Template:Ԛ (the Cyrillic letter Qa)
This module allows for easier and more consistent formatting of quotations, designed especially for the requirements of classical and ancient languages. It uses Module:Quotations as a back-end.
Parameters
[မႄးထတ်း]|1=
- The language of the quotation.
|2=
- The name of the author. If the author is listed in the relevant data module (for example, Module:Quotations/grc/data for Ancient Greek), the name will automatically link to a Wikipedia article.
|3=
- The title of the work. If the work is listed in the relevant data module (for example, Module:Quotations/grc/data for Ancient Greek), the title will automatically link to a Wikipedia article (if one exists), and there will also be a link to the work on Wikisource (if it exists there).
|4=
,|5=
,|6=
,|7=
,|8=
- The reference of the text within the work, with chapters, verses, subverses, etc. each added in a separate parameter, using as many (or as few) as are needed.
|thru=
- Used to specify a range, so if the passage is 1:120–122, use
|3=1|4=120|thru=122
. |quote=
- The actual text.
|year=
- The year or range of years of the work. This will be automatically filled in if the title is listed in the data module as above.
|t=
or|trans=
- An English translation of the text.
|transyear=
- The year of the translation.
|transauthor=
- The author of the translation.
|tr=
- A manual Latin transliteration for quotes in non-Latin script; often unnecessary, as many languages automatically transliterate.
|ts=
- Transcription for non-Latin-script text whose transliteration is markedly different from the actual pronunciation. Should not be used for IPA pronunciations.
|lit=
- A literal translation.
|notes=
- Parentheses enclosed information after the reference.
|object=
- The object or artifact on which the work is found, e.g. for ancient papyri or tombs.
|refn=
- To include references or links to a source for the quotation, such as a book or external site. They can be enclosed in
<ref>
tags or Lua error in မေႃႇၵျူး:parameters at line 600: attempt to index local 'param' (a boolean value).. |form=
- Determines the amount of information presented. The default is
full
, which displays all information.inline
skips the year, quote, and translation,work
further trims the author, andref
further eliminates the work, leaving only the chapter and verse(s). |style=
- Determines the format of the work’s title. The default is
i
(italicized). Other possible values areno
(unformatted) andq
(enclosed in quotation marks). |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 quote, 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 quote using|tr=
. 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 Lua error in မေႃႇၵျူး:parameters at line 600: attempt to index local 'param' (a boolean value). and Lua error in မေႃႇၵျူး:parameters at line 600: attempt to index local 'param' (a boolean value)..
With the exception of the first parameter, all parameters are optional; the template/module is designed to work around whatever information is given.
Operation
[မႄးထတ်း]The module accesses language-specific libraries of information on works and authors, and if the information is coded, will add formatting to the quote, such as linking the author and/or work, as well as linking to the relevant text. If no information can be found on the information given, it will simply display it with basic text formatting. Thus the following code results in the following displays:
Lua error in မေႃႇၵျူး:parameters at line 600: attempt to index local 'param' (a boolean value). → Homer, Iliad 1.23
Lua error in မေႃႇၵျူး:parameters at line 600: attempt to index local 'param' (a boolean value). → Author, Work Chapter 1.Verse 2
Here is a full list of language-specific libraries in the Module: namespace. The libraries end in /data.
Examples
[မႄးထတ်း]Wikitext (with subst=)
#* {{Q|hi|Premchand|Aatmaaraam|quote=उस धुँधले प्रकाश में उसका जर्जर शरीर, पोपला मुँह, और झुकी हुई कमर देखकर किसी '''अपरिचित''' मनुष्य को उसके पिशाच होने का भ्रम हो सकता था।|trans=In that dimmed light, his aged body, toothless mouth, and hunched-over waist might cause a '''stranger''' to mistake him for an evil spirit.|subst=अपरिचित//अप*रिचित}}
Output (with subst=)
- package.lua:80: module 'Module:Quotations/hi' not found
Here, a substitution is used to force अपरिचित to be transliterated as aparicit instead of the default apricit.