Module:RQ:pi:Sorcery
- The following documentation is located at Module:RQ:pi:Sorcery/documentation. [edit]
- Useful links: subpage list • links • transclusions • testcases • sandbox
This module is a data module providing a catalogue of passages from one particular book or article for each passage to demonstrate the existence of multiple Pali words. The modules returns a 3-D array (technically a Lua table), indexed as follows:
- The outer index is the page number.
- The second index is a character string serving as the name of the passage within the page - using the first word is the simplest scheme.
- The third index is an element number - the text (item 1), its transliteration (item 2) (optional) and its translation (item 3).
The table has one named element, "reference", that holds the name of the template (namely, {{RQ:pi:Sorcery}}
) used to identify the source to the reader and format the quote, its transliteration and its translation.
The intention is that the word will be highlighted when selected by these three indices. Words are assigned positive numbers and their boundaries are marked up in the form {number-word}. This mark up can be nested, so that words may contain other words. Different sections may have the same number; this allows for repeated words, overlapping words, and discontiguous translations.
The words are transcluded into a page using an invocation of the form {{RQ:pi:Sorcery quote|220|buddhaya|6}}
; this example produces the text:
န ဒ္ဓါ ဒ္ဓံ သိ နံ မော ဗု တိ ယ န မ္မ ဒ္ဓံ သိ နံ မော ဓ တိ ဿ န ဃ ဒ္ဓံ သိ နံ မော သံ တိ ဿ
Note that the article explains that the squares are read as clockwise knights' tours starting at the top left and that the central squares constitute an ID number.- namo buddhāya siddhaṃ ti
namo dhammassa siddhaṃ ti
namo saṃɡhassa siddhaṃ ti - Homaɡe to the Buddha. Success!
Homage to the Dharma. Success!
Homage to the Sangha. Success!
There is no advantage in including a passage for the sake of one word; one can use {{RQ:pi:Sorcery}}
directly for that purpose.
local data = {}
data.reference = "RQ:pi:Sorcery"
data[220] = {
buddhaya = {
-- The <div><ul><li> code displays tables side by side when window width allows it -->
'<div><ul><li style="display: inline-table;">'..
'<table class=wikitable>'..
'<tr><td> {1-{8-{2-န}}} </td><td> {1-{8-{3-ဒ္ဓါ}}} </td><td> {1-{4-ဒ္ဓံ}} </td></tr>'..
'<tr><td> {1-{4-သိ}} </td><td> နံ </td><td> {1-{8-{2-မော}}} </td></tr>'..
'<tr><td> {1-{8-{3-ဗု}}} </td><td> {5-တိ} </td><td> {1-{8-{3-ယ}}} </td></tr></table></li>'..
'<li style="display:inline;"> </li>'..
'<li style="display: inline-table;"><table class=wikitable>'..
'<tr><td> {2-န} </td><td> {6-မ္မ} </td><td> {4-ဒ္ဓံ} </td></tr>'..
'<tr><td> {4-သိ} </td><td> နံ </td><td> {2-မော} </td></tr>'..
'<tr><td> {6-ဓ} </td><td> {5-တိ} </td><td> {6-ဿ} </td></tr></table></li>'..
'<li style="display:inline;"> </li>'..
'<li style="display: inline-table;"><table class=wikitable>'..
'<tr><td> {2-န} </td><td> {7-ဃ} </td><td> {4-ဒ္ဓံ} </td></tr>'..
'<tr><td> {4-သိ} </td><td> နံ </td><td> {2-မော} </td></tr>'..
'<tr><td> {7-သံ} </td><td> {5-တိ} </td><td> {7-ဿ} </td></tr></table></li>'..
'</ul></div><br>'..
"Note that the article explains that the squares are read as clockwise knights' "..
'tours starting at the top left and that the central squares constitute an ID number.',
-- နမော ဗုဒ္ဓါယ သိဒ္ဓံ''' တိ<br>နမော ဓမ္မဿ သိဒ္ဓံ တိ<br>နမော သံဃဿ သိဒ္ဓံ တိ
"{1-{8-{2-namo} {3-buddhāya}} {4-siddhaṃ}} {5-ti}<br>"..
"{2-namo} {6-dhammassa} {4-siddhaṃ} {5-ti}<br>"..
"{2-namo} {7-saṃɡhassa} {4-siddhaṃ} {5-ti}",
"{1-{8-{2-Homaɡe} {3-to the Buddha}}. {4-Success!}}{5-}<br>"..
"{2-Homage} {6-to the Dharma}. {4-Success!}{5-}<br>"..
"{2-Homage} {7-to the Sangha}. {4-Success!}{5-}"
},
}
return data