Module:RQ:pi:Gyapan
- The following documentation is located at Module:RQ:pi:Gyapan/documentation. [edit]
- Useful links: subpage list • links • transclusions • testcases • sandbox
This module is a data module providing an example for the usage of multiple Pali words in a sentence written in the Mon style. The modules returns a 3-D array (technically a Lua table), indexed as follows:
- The outer index is the page number (necessarily 1 in this case).
- 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) and its translation (item 3).
The table has one named element, "reference", that holds the name of the template (namely, {{RQ:pi:Gyapan}}
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 overlapping words or discontiguous translations.
The words are transcluded into a page using an invocation of the form {{RQ:pi:Gyapan example|1|ratthato|9}}
; this example produces the text:
- ɡyapān raṭṭhato cittamāsassa sukkhapakkhe dutiyāyaṃ nikkhantā, rājadūtā tasmiṃ yeva pakkhe dasamiyaṃ syāmaraṭṭhaṃ pāpuṇiṃsu.
- The envoys started from Japan on the second day after the new moon of the month of Citta (April) and reached Siam on the 10th of the same fortnight.
There is no advantage in including a passage for the sake of one word; one can use {{RQ:pi:Gyapan}}
directly for that purpose.
local data = {}
data.reference = "RQ:pi:Gyapan"
data[1] = {
ratthato = {
"{2-{1-ဂျပါန်} ရဋ္ဌတော} {3-{4-စိတ္တ}{5-မာသဿ}} {6-သုက္ခပက္ခေ} {7-ဒုတိယာယံ} {8-နိက္ခန္တာ}၊ {9-ရာဇဒူတာ} "..
"{12-{10-တသ္မိံ} {11-ယေ၀}} {13-ပက္ခေ} {14-ဒသမိယံ} {15-သျာမရဋ္ဌံ} {16-ပါပုဏိံသု}။",
"{2-{1-ɡyapān} raṭṭhato} {3-{4-citta}{5-māsassa}} {6-sukkhapakkhe} {7-dutiyāyaṃ} "..
"{8-nikkhantā}, {9-rājadūtā} {12-{10-tasmiṃ} {11-yeva}} {13-pakkhe} {14-dasamiyaṃ} "..
"{15-syāmaraṭṭhaṃ} {16-pāpuṇiṃsu}.",
"{9-The envoys} {8-started} {2-from {1-Japan}} {7-on the second day} "..
"{6-after the new moon} {3-{5-of the month} {4-of Citta (April)}} {8-and} "..
"{16-reached} {15-Siam} {14-on the 10th} {12-{10-of the} {11-same}} {13-fortnight}.",
}
}
return data