This tests transliteration of Sanskrit from the Tamil script to the Roman script. This might come to include some varieties of Prakrit. All tests passed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
நிர்வாண | nirvāṇa | nirvāṇa | |
க³ங்க³ா | gaṅgā | gaṅgā | |
வீர | vīra | vīra | |
ஆசார்யைஃ | ācāryaiḥ | ācāryaiḥ | |
கே³ாபந | gopana | gopana | |
ப்ராக் | prāk | prāk | |
க்ரோத⁴ | krodha | krodha | |
ஆஸ்யே | āsye | āsye | |
ஸ𑌋க்ஷ | saṛkṣa | saṛkṣa | |
ஸஂஸ்க்ரு²தம் | saṃskṛtam | saṃskṛtam | |
நீள | nīḷa | nīḷa | |
ப்ரஜ்ஞா | prajñā | prajñā | |
மாஂஸ | māṃsa | māṃsa | |
அஂஹு | aṃhu | aṃhu | |
து³ஃக² | duḥkha | duḥkha | |
து³𑌃க² | duḥkha | duḥkha | |
ஜிக⁴ாஂஸா | jighāṃsā | jighāṃsā | |
ஹிஂஸ | hiṃsa | hiṃsa | |
ஶத | śata | śata | |
த³ாந | dāna | dāna | |
ஜ²ஞ்ஜ²ா | jhañjhā | jhañjhā | |
யௌவந | yauvana | yauvana | |
கெ³ௗதம | gautama | gautama | |
ப⁴ாவம் | bhāvam | bhāvam | |
த⁴ர்ம | dharma | dharma | |
ஏகம்² | ekaṃ | ekaṃ | |
பாபேப்⁴யோ | pāpebhyo | pāpebhyo | |
ஶுச𑌃 | śucaḥ | śucaḥ | |
ஸர்வ | sarva | sarva |
local scdef, langdef = 'Taml', 'sa'
local canonical_def
local ti = table.insert
return require("Module:transliteration module testcases"){
module = "sa-Taml-translit",
examples = { -- Tamil script, translation, script (always Taml, but perhaps a dash of Grantha), language
{"நிர்வாண", "nirvāṇa"},
{"க³ங்க³ா", "gaṅgā"},
{"வீர", "vīra"},
{"ஆசார்யைஃ", "ācāryaiḥ"},
{"கே³ாபந", "gopana"},
{"ப்ராக்", "prāk"},
{"க்ரோத⁴", "krodha"},
{"ஆஸ்யே", "āsye"},
{"ஸ𑌋க்ஷ", "saṛkṣa"},
{"ஸஂஸ்க்ரு²தம்", "saṃskṛtam"},
{"நீள", "nīḷa"},
{"ப்ரஜ்ஞா", "prajñā"},
{"மாஂஸ", "māṃsa"},
{"அஂஹு", "aṃhu"},
{"து³ஃக²", "duḥkha"},
{"து³𑌃க²", "duḥkha"},
{"ஜிக⁴ாஂஸா", "jighāṃsā"},
{"ஹிஂஸ", "hiṃsa"},
{"ஶத", "śata"},
{"த³ாந", "dāna"},
{"ஜ²ஞ்ஜ²ா", "jhañjhā"},
{"யௌவந", "yauvana"},
{"கெ³ௗதம", "gautama"},
{"ப⁴ாவம்", "bhāvam"},
{"த⁴ர்ம", "dharma"},
{"ஏகம்²", "ekaṃ"},
{"பாபேப்⁴யோ", "pāpebhyo"},
{"ஶுச𑌃", "śucaḥ"},
{"ஸர்வ", "sarva"},
--[[
{ "", "", "", "" },
--]]
},
sc = scdef, lang = langdef,
func_with_link = function(text, should, sc, lang)
local canonical_name
if not canonical_def then
local lang_object = require('Module:languages').getByCode(langdef)
or error('The language code ' .. langdef .. ' is not valid.')
canonical_def = lang_object:getCanonicalName()
end
local label = {}
if lang and lang ~= langdef then
local lang_object = require('Module:languages').getByCode(lang)
or error('The language code ' .. lang .. ' is not valid.')
canonical_name = lang_object:getCanonicalName()
ti(label, lang);
ti(label, ': ')
else
canonical_name = canonical_def
end
ti(label, '<span class="');
ti(label, sc or scdef);
ti(label, '" lang="');
ti(label, lang or langdef);
ti(label, '">[[');
ti(label, text)
ti(label, '#')
ti(label, canonical_name)
ti(label, '|')
ti(label, text)
ti(label, ']]</span>')
return table.concat(label)
end
}