Module:sa-convert/testcases
- පහත දැක්වෙන උපදෙස්, Module:sa-convert/testcases/documentation හි පිහිටා ඇත. Module:sa-convert/testcases/documentation]]. [සංස්කරණය]
- ප්රයෝජනවත් සබැඳි: root page • root page’s subpages • සබැඳි • transclusions • tested module • sandbox
These tests of the conversion of Sanskrit from Devanagari to other scripts are of two types. The first type checks that a particular form results for a specific script; the second type merely checks that the forms in Devanagari and the other script have the same transliteration to the Roman alphabet. The second type is neither necessary nor sufficient for correctness, but it offers protection against finger trouble in the transliteration.
For the first type of test, the 'text' is the Devanagari text to be transliterated, the 'expected' column is the transliteration that should be produced, and the 'actual' column is what should be produced. For the second type of text, the 'text' column lists the Devanagari original, the script code of the target script, and the transliteration thereinto. The expected column gives the Latin transliteration of the Devanagari, and the actual column gives the Latin transliteration of the text into the other script. For a failed test of either type, the text in the 'expected' and 'actual' columns may be accompanied by a defence of what it is.
Single Script Pages
සංස්කරණයThe test results for each script may be viewed and updated ('refreshed') individually by following the links below:
Gujarati Javanese Balinese Saurashtra Oriya Assamese Bengali Tirhuta Kannada Telugu Malayalam Tamil Modi Tibetan Siddham Sharada Brahmi Thai Lao Khmer Sinhala Gurmukhi Burmese Cham Prachalit 'Phags-pa Chakma Grantha Kaithi Bhaiksuki Soyombo Zanabazar Square Takri Tai Tham
They may alternative be viewed and updated from the individual scripts' subsections below.
All Scripts Together
සංස්කරණය3 of 11 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
निर्वाण Laoo: ນິຣ຺ວາຓ | nirvāṇa | nirvāṇa | |
गङ्गा Laoo: ຄງ຺ຄາ | gaṅgā | gaṅgā | |
वीर Laoo: ວີຣ | vīra | vīra | |
आचार्यैः Laoo: ອາຈາຣ຺ໄຍະ | ācāryaiḥ | ācāryaiḥ | |
गोपन Laoo: ໂຄປນ | gopana | gopana | |
प्राक् Laoo: ປ຺ຣາກ຺ | prāk | prāk | |
क्रोध Laoo: ກ຺ໂຣຘ | krodha | krodha | |
आस्ये Laoo: ອາສ຺ເຍ | āsye | āsye | |
सऋक्ष Laoo: ສຣິກ຺ຩ | saṛkṣa | sarikṣa | |
संस्कृतम् Laoo: ສໍສ຺ກ຺ຣິຕມ຺ | saṃskṛtam | saṃskritam | |
नीळ Laoo: ນີຬ | nīḷa | nīḷa | |
Script error during testing: Module:languages:454: Substitution data 'Shrd-translit' does not match an existing module.stack traceback: [C]: ? [C]: in function 'error' Module:languages:454: in function 'doSubstitutions' Module:languages:403: in function 'doSubstitutions' Module:languages:478: in function 'iterateSectionSubstitutions' Module:languages:1612: in function 'transliterate' Module:sa-convert/testcases:100: in function 'one_script' Module:sa-convert/testcases:141: in function <Module:sa-convert/testcases:130> (tail call): ? [C]: in function 'xpcall' Module:UnitTests:370: in function <Module:UnitTests:329> (tail call): ? mw.lua:527: in function <mw.lua:507> [C]: ? [C]: in function 'expandTemplate' mw.lua:333: in function 'expandTemplate' Module:documentation:893: in function 'chunk' mw.lua:527: in function <mw.lua:507> [C]: ? |
Single Script Subsections
සංස්කරණයGujarati
සංස්කරණය1 of 0 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
Script error during testing: Module:languages:454: Substitution data 'sa-Gujr-translit' does not match an existing module.stack traceback: [C]: ? [C]: in function 'error' Module:languages:454: in function 'doSubstitutions' Module:languages:403: in function 'doSubstitutions' Module:languages:478: in function 'iterateSectionSubstitutions' Module:languages:1612: in function 'transliterate' Module:sa-convert/testcases:100: in function 'one_script' Module:sa-convert/testcases/Gujarati:5: in function <Module:sa-convert/testcases/Gujarati:4> (tail call): ? [C]: in function 'xpcall' Module:UnitTests:370: in function <Module:UnitTests:329> (tail call): ? mw.lua:527: in function <mw.lua:507> [C]: ? [C]: in function 'expandTemplate' mw.lua:333: in function 'expandTemplate' Module:documentation:893: in function 'chunk' mw.lua:527: in function <mw.lua:507> [C]: ? |
Javanese
සංස්කරණය1 of 0 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
Script error during testing: Module:languages:454: Substitution data 'sa-Java-translit' does not match an existing module.stack traceback: [C]: ? [C]: in function 'error' Module:languages:454: in function 'doSubstitutions' Module:languages:403: in function 'doSubstitutions' Module:languages:478: in function 'iterateSectionSubstitutions' Module:languages:1612: in function 'transliterate' Module:sa-convert/testcases:100: in function 'one_script' Module:sa-convert/testcases/Javanese:5: in function <Module:sa-convert/testcases/Javanese:4> (tail call): ? [C]: in function 'xpcall' Module:UnitTests:370: in function <Module:UnitTests:329> (tail call): ? mw.lua:527: in function <mw.lua:507> [C]: ? [C]: in function 'expandTemplate' mw.lua:333: in function 'expandTemplate' Module:documentation:893: in function 'chunk' mw.lua:527: in function <mw.lua:507> [C]: ? |
Balinese
සංස්කරණයAll tests passed. (refresh)
Text | Expected | Actual |
---|
Saurashtra
සංස්කරණයAll tests passed. (refresh)
Text | Expected | Actual |
---|
Oriya
සංස්කරණය1 of 0 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
Script error during testing: Module:languages:454: Substitution data 'sa-Orya-translit' does not match an existing module.stack traceback: [C]: ? [C]: in function 'error' Module:languages:454: in function 'doSubstitutions' Module:languages:403: in function 'doSubstitutions' Module:languages:478: in function 'iterateSectionSubstitutions' Module:languages:1612: in function 'transliterate' Module:sa-convert/testcases:100: in function 'one_script' Module:sa-convert/testcases/Oriya:5: in function <Module:sa-convert/testcases/Oriya:4> (tail call): ? [C]: in function 'xpcall' Module:UnitTests:370: in function <Module:UnitTests:329> (tail call): ? mw.lua:527: in function <mw.lua:507> [C]: ? [C]: in function 'expandTemplate' mw.lua:333: in function 'expandTemplate' Module:documentation:893: in function 'chunk' mw.lua:527: in function <mw.lua:507> [C]: ? |
Assamese
සංස්කරණය1 of 0 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
Script error during testing: Module:languages:454: Substitution data 'sa-Beng-translit' does not match an existing module.stack traceback: [C]: ? [C]: in function 'error' Module:languages:454: in function 'doSubstitutions' Module:languages:403: in function 'doSubstitutions' Module:languages:478: in function 'iterateSectionSubstitutions' Module:languages:1612: in function 'transliterate' Module:sa-convert/testcases:100: in function 'one_script' Module:sa-convert/testcases/Assamese:5: in function <Module:sa-convert/testcases/Assamese:4> (tail call): ? [C]: in function 'xpcall' Module:UnitTests:370: in function <Module:UnitTests:329> (tail call): ? mw.lua:527: in function <mw.lua:507> [C]: ? [C]: in function 'expandTemplate' mw.lua:333: in function 'expandTemplate' Module:documentation:893: in function 'chunk' mw.lua:527: in function <mw.lua:507> [C]: ? |
Bengali
සංස්කරණය2 of 1 test failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
निर्वाण | নির্ব্বাণ (Commenting on Mason's citation of the spelling of the word as निरव्वान on p10 of Kaccayano's Pali Gramar, Mazard comments in a footnote in his edition of the work, "Mason here follows the Bangladeshi convention, doubling the v in nirvana. This is not commonly found today in either Romanized or Devanagari Sanskrit, but remains the norm in the classical Bengali typeset (Sadhubasa)--a relatively recent development in the presses of Mason's day (owed to Sir Charles Wilkins).") | নির্বাণ (Modern Bengali writes নির্বাণ.) | |
Script error during testing: Module:languages:454: Substitution data 'sa-Beng-translit' does not match an existing module.stack traceback: [C]: ? [C]: in function 'error' Module:languages:454: in function 'doSubstitutions' Module:languages:403: in function 'doSubstitutions' Module:languages:478: in function 'iterateSectionSubstitutions' Module:languages:1612: in function 'transliterate' Module:sa-convert/testcases:100: in function 'one_script' Module:sa-convert/testcases/Bengali:5: in function <Module:sa-convert/testcases/Bengali:4> (tail call): ? [C]: in function 'xpcall' Module:UnitTests:370: in function <Module:UnitTests:329> (tail call): ? mw.lua:527: in function <mw.lua:507> [C]: ? [C]: in function 'expandTemplate' mw.lua:333: in function 'expandTemplate' Module:documentation:893: in function 'chunk' mw.lua:527: in function <mw.lua:507> [C]: ? |
Tirhuta
සංස්කරණයAll tests passed. (refresh)
Text | Expected | Actual |
---|
Kannada
සංස්කරණය1 of 0 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
Script error during testing: Module:languages:454: Substitution data 'sa-Knda-translit' does not match an existing module.stack traceback: [C]: ? [C]: in function 'error' Module:languages:454: in function 'doSubstitutions' Module:languages:403: in function 'doSubstitutions' Module:languages:478: in function 'iterateSectionSubstitutions' Module:languages:1612: in function 'transliterate' Module:sa-convert/testcases:100: in function 'one_script' Module:sa-convert/testcases/Kannada:5: in function <Module:sa-convert/testcases/Kannada:4> (tail call): ? [C]: in function 'xpcall' Module:UnitTests:370: in function <Module:UnitTests:329> (tail call): ? mw.lua:527: in function <mw.lua:507> [C]: ? [C]: in function 'expandTemplate' mw.lua:333: in function 'expandTemplate' Module:documentation:893: in function 'chunk' mw.lua:527: in function <mw.lua:507> [C]: ? |
Telugu
සංස්කරණය1 of 0 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
Script error during testing: Module:languages:454: Substitution data 'sa-Telu-translit' does not match an existing module.stack traceback: [C]: ? [C]: in function 'error' Module:languages:454: in function 'doSubstitutions' Module:languages:403: in function 'doSubstitutions' Module:languages:478: in function 'iterateSectionSubstitutions' Module:languages:1612: in function 'transliterate' Module:sa-convert/testcases:100: in function 'one_script' Module:sa-convert/testcases/Telugu:5: in function <Module:sa-convert/testcases/Telugu:4> (tail call): ? [C]: in function 'xpcall' Module:UnitTests:370: in function <Module:UnitTests:329> (tail call): ? mw.lua:527: in function <mw.lua:507> [C]: ? [C]: in function 'expandTemplate' mw.lua:333: in function 'expandTemplate' Module:documentation:893: in function 'chunk' mw.lua:527: in function <mw.lua:507> [C]: ? |
Malayalam
සංස්කරණය1 of 0 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
Script error during testing: Module:languages:454: Substitution data 'sa-Mlym-translit' does not match an existing module.stack traceback: [C]: ? [C]: in function 'error' Module:languages:454: in function 'doSubstitutions' Module:languages:403: in function 'doSubstitutions' Module:languages:478: in function 'iterateSectionSubstitutions' Module:languages:1612: in function 'transliterate' Module:sa-convert/testcases:100: in function 'one_script' Module:sa-convert/testcases/Malayalam:5: in function <Module:sa-convert/testcases/Malayalam:4> (tail call): ? [C]: in function 'xpcall' Module:UnitTests:370: in function <Module:UnitTests:329> (tail call): ? mw.lua:527: in function <mw.lua:507> [C]: ? [C]: in function 'expandTemplate' mw.lua:333: in function 'expandTemplate' Module:documentation:893: in function 'chunk' mw.lua:527: in function <mw.lua:507> [C]: ? |
Tamil
සංස්කරණය1 of 0 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
Script error during testing: Module:languages:454: Substitution data 'sa-Taml-translit' does not match an existing module.stack traceback: [C]: ? [C]: in function 'error' Module:languages:454: in function 'doSubstitutions' Module:languages:403: in function 'doSubstitutions' Module:languages:478: in function 'iterateSectionSubstitutions' Module:languages:1612: in function 'transliterate' Module:sa-convert/testcases:100: in function 'one_script' Module:sa-convert/testcases/Tamil:5: in function <Module:sa-convert/testcases/Tamil:4> (tail call): ? [C]: in function 'xpcall' Module:UnitTests:370: in function <Module:UnitTests:329> (tail call): ? mw.lua:527: in function <mw.lua:507> [C]: ? [C]: in function 'expandTemplate' mw.lua:333: in function 'expandTemplate' Module:documentation:893: in function 'chunk' mw.lua:527: in function <mw.lua:507> [C]: ? |
Modi
සංස්කරණය1 of 0 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
Script error during testing: Module:languages:454: Substitution data 'sa-Modi-translit' does not match an existing module.stack traceback: [C]: ? [C]: in function 'error' Module:languages:454: in function 'doSubstitutions' Module:languages:403: in function 'doSubstitutions' Module:languages:478: in function 'iterateSectionSubstitutions' Module:languages:1612: in function 'transliterate' Module:sa-convert/testcases:100: in function 'one_script' Module:sa-convert/testcases/Modi:5: in function <Module:sa-convert/testcases/Modi:4> (tail call): ? [C]: in function 'xpcall' Module:UnitTests:370: in function <Module:UnitTests:329> (tail call): ? mw.lua:527: in function <mw.lua:507> [C]: ? [C]: in function 'expandTemplate' mw.lua:333: in function 'expandTemplate' Module:documentation:893: in function 'chunk' mw.lua:527: in function <mw.lua:507> [C]: ? |
Tibetan
සංස්කරණය11 of 11 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
निर्वाण Tibt: ནི་རྭཱ་ཎ | nirvāṇa | ni rwā ṇa | |
गङ्गा Tibt: ག་ངྒཱ | gaṅgā | ga nggā | |
वीर Tibt: ཝཱི་ར | vīra | wī ra | |
आचार्यैः Tibt: ཨཱ་ཙཱ་རྱཻཿ | ācāryaiḥ | ā tsā ryaiḥ | |
गोपन Tibt: གོ་པ་ན | gopana | go pa na | |
प्राक् Tibt: པྲཱ་ཀ྄ | prāk | prā k | |
क्रोध Tibt: ཀྲོ་དྷ | krodha | kro dha | |
आस्ये Tibt: ཨཱ་སྱེ | āsye | ā sye | |
सऋक्ष Tibt: ས་རྀ་ཀྵ | saṛkṣa | sa ṛ kṣa | |
संस्कृतम् Tibt: སཾ་སྐྲྀ་ཏ་མ྄ | saṃskṛtam | saṃ skṛ ta m | |
नीळ Tibt: ནཱིळ | nīḷa | nīळ |
Siddham
සංස්කරණය1 of 0 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
Script error during testing: Module:languages:454: Substitution data 'Sidd-translit' does not match an existing module.stack traceback: [C]: ? [C]: in function 'error' Module:languages:454: in function 'doSubstitutions' Module:languages:403: in function 'doSubstitutions' Module:languages:478: in function 'iterateSectionSubstitutions' Module:languages:1612: in function 'transliterate' Module:sa-convert/testcases:100: in function 'one_script' Module:sa-convert/testcases/Siddham:5: in function <Module:sa-convert/testcases/Siddham:4> (tail call): ? [C]: in function 'xpcall' Module:UnitTests:370: in function <Module:UnitTests:329> (tail call): ? mw.lua:527: in function <mw.lua:507> [C]: ? [C]: in function 'expandTemplate' mw.lua:333: in function 'expandTemplate' Module:documentation:893: in function 'chunk' mw.lua:527: in function <mw.lua:507> [C]: ? |
Sharada
සංස්කරණය1 of 0 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
Script error during testing: Module:languages:454: Substitution data 'Shrd-translit' does not match an existing module.stack traceback: [C]: ? [C]: in function 'error' Module:languages:454: in function 'doSubstitutions' Module:languages:403: in function 'doSubstitutions' Module:languages:478: in function 'iterateSectionSubstitutions' Module:languages:1612: in function 'transliterate' Module:sa-convert/testcases:100: in function 'one_script' Module:sa-convert/testcases/Sharada:5: in function <Module:sa-convert/testcases/Sharada:4> (tail call): ? [C]: in function 'xpcall' Module:UnitTests:370: in function <Module:UnitTests:329> (tail call): ? mw.lua:527: in function <mw.lua:507> [C]: ? [C]: in function 'expandTemplate' mw.lua:333: in function 'expandTemplate' Module:documentation:893: in function 'chunk' mw.lua:527: in function <mw.lua:507> [C]: ? |
Brahmi
සංස්කරණයAll tests passed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
निर्वाण Brah: 𑀦𑀺𑀭𑁆𑀯𑀸𑀡 | nirvāṇa | nirvāṇa | |
गङ्गा Brah: 𑀕𑀗𑁆𑀕𑀸 | gaṅgā | gaṅgā | |
वीर Brah: 𑀯𑀻𑀭 | vīra | vīra | |
आचार्यैः Brah: 𑀆𑀘𑀸𑀭𑁆𑀬𑁃𑀂 | ācāryaiḥ | ācāryaiḥ | |
गोपन Brah: 𑀕𑁄𑀧𑀦 | gopana | gopana | |
प्राक् Brah: 𑀧𑁆𑀭𑀸𑀓𑁆 | prāk | prāk | |
क्रोध Brah: 𑀓𑁆𑀭𑁄𑀥 | krodha | krodha | |
आस्ये Brah: 𑀆𑀲𑁆𑀬𑁂 | āsye | āsye | |
सऋक्ष Brah: 𑀲𑀋𑀓𑁆𑀱 | saṛkṣa | saṛkṣa | |
संस्कृतम् Brah: 𑀲𑀁𑀲𑁆𑀓𑀾𑀢𑀫𑁆 | saṃskṛtam | saṃskṛtam | |
नीळ Brah: 𑀦𑀻𑀴 | nīḷa | nīḷa |
Thai
සංස්කරණය1 of 11 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
निर्वाण Thai: นิรฺวาณ | nirvāṇa | nirvāṇa | |
गङ्गा Thai: คงฺคา | gaṅgā | gaṅgā | |
वीर Thai: วีร | vīra | vīra | |
आचार्यैः Thai: อาจารฺไยะ | ācāryaiḥ | ācāryaiḥ | |
गोपन Thai: โคปน | gopana | gopana | |
प्राक् Thai: ปฺรากฺ | prāk | prāk | |
क्रोध | โกฺรธ (RID gives etymology of โกรธ as "ส. โกฺรธ".) | กฺโรธ | |
आस्ये Thai: อาสฺเย | āsye | āsye | |
सऋक्ष Thai: สฤกฺษ | saṛkṣa | saṛkṣa | |
संस्कृतम् Thai: สํสฺกฺฤตมฺ | saṃskṛtam | saṃskṛtam | |
नीळ Thai: นีฬ | nīḷa | nīḷa |
Lao
සංස්කරණය2 of 11 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
निर्वाण Laoo: ນິຣ຺ວາຓ | nirvāṇa | nirvāṇa | |
गङ्गा Laoo: ຄງ຺ຄາ | gaṅgā | gaṅgā | |
वीर Laoo: ວີຣ | vīra | vīra | |
आचार्यैः Laoo: ອາຈາຣ຺ໄຍະ | ācāryaiḥ | ācāryaiḥ | |
गोपन Laoo: ໂຄປນ | gopana | gopana | |
प्राक् Laoo: ປ຺ຣາກ຺ | prāk | prāk | |
क्रोध Laoo: ກ຺ໂຣຘ | krodha | krodha | |
आस्ये Laoo: ອາສ຺ເຍ | āsye | āsye | |
सऋक्ष Laoo: ສຣິກ຺ຩ | saṛkṣa | sarikṣa | |
संस्कृतम् Laoo: ສໍສ຺ກ຺ຣິຕມ຺ | saṃskṛtam | saṃskritam | |
नीळ Laoo: ນີຬ | nīḷa | nīḷa |
Khmer
සංස්කරණයAll tests passed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
निर्वाण Khmr: និវ៌ាណ | nirvāṇa | nirvāṇa | |
गङ्गा Khmr: គង្គា | gaṅgā | gaṅgā | |
वीर Khmr: វីរ | vīra | vīra | |
आचार्यैः Khmr: អាចាយ៌ៃះ | ācāryaiḥ | ācāryaiḥ | |
गोपन Khmr: គោបន | gopana | gopana | |
प्राक् Khmr: ប្រាក៑ | prāk | prāk | |
क्रोध Khmr: ក្រោធ | krodha | krodha | |
आस्ये Khmr: អាស្យេ | āsye | āsye | |
सऋक्ष Khmr: សឫក្ឞ | saṛkṣa | saṛkṣa | |
संस्कृतम् Khmr: សំស្ក្ឫតម៑ | saṃskṛtam | saṃskṛtam | |
नीळ Khmr: នីឡ | nīḷa | nīḷa |
Sinhala
සංස්කරණය4 of 11 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
निर्वाण Sinh: නිර්වාණ | nirvāṇa | nirwāṇa | |
गङ्गा Sinh: ගඞ්ගා | gaṅgā | gaṅgā | |
वीर Sinh: වීර | vīra | wīra | |
आचार्यैः Sinh: ආචාර්යෛඃ | ācāryaiḥ | ācāryaiḥ | |
गोपन Sinh: ගොපන | gopana | gopana | |
प्राक् Sinh: ප්රාක් | prāk | prāk | |
क्रोध Sinh: ක්රොධ | krodha | krodha | |
आस्ये Sinh: ආස්යෙ | āsye | āsye | |
सऋक्ष Sinh: සඍක්ෂ | saṛkṣa | sar̥kṣa | |
संस्कृतम् Sinh: සංස්කෘතම් | saṃskṛtam | saṁskr̥tam | |
नीळ Sinh: නීළ | nīḷa | nīḷa |
Gurmukhi
සංස්කරණය1 of 0 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
Script error during testing: Module:languages:454: Substitution data 'sa-Guru-translit' does not match an existing module.stack traceback: [C]: ? [C]: in function 'error' Module:languages:454: in function 'doSubstitutions' Module:languages:403: in function 'doSubstitutions' Module:languages:478: in function 'iterateSectionSubstitutions' Module:languages:1612: in function 'transliterate' Module:sa-convert/testcases:100: in function 'one_script' Module:sa-convert/testcases/Gurmukhi:5: in function <Module:sa-convert/testcases/Gurmukhi:4> (tail call): ? [C]: in function 'xpcall' Module:UnitTests:370: in function <Module:UnitTests:329> (tail call): ? mw.lua:527: in function <mw.lua:507> [C]: ? [C]: in function 'expandTemplate' mw.lua:333: in function 'expandTemplate' Module:documentation:893: in function 'chunk' mw.lua:527: in function <mw.lua:507> [C]: ? |
Burmese
සංස්කරණයAll tests passed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
निर्वाण Mymr: နိရွာဏ | nirvāṇa | nirvāṇa | |
गङ्गा | ဂင်္ဂါ | ဂင်္ဂါ | |
वीर Mymr: ဝီရ | vīra | vīra | |
आचार्यैः Mymr: အာစာရျဲး | ācāryaiḥ | ācāryaiḥ | |
व्यञ्जन Mymr: ဝျဉ္ဇန | vyañjana | vyañjana | |
गोपन | ဂေါပန | ဂေါပန | |
प्राक् | ပြာက် | ပြာက် | |
क्रोध Mymr: ကြောဓ | krodha | krodha | |
आस्ये Mymr: အာသျေ | āsye | āsye | |
सऋक्ष Mymr: သၒက္ၑ | saṛkṣa | saṛkṣa | |
संस्कृतम् Mymr: သံသ္ကၖတမ် | saṃskṛtam | saṃskṛtam | |
नीळ Mymr: နီဠ | nīḷa | nīḷa |
Cham
සංස්කරණයAll tests passed. (refresh)
Text | Expected | Actual |
---|
Prachalit
සංස්කරණයThe Prachalit script is termed the Newa script by Unicode. All tests passed. (refresh)
Text | Expected | Actual |
---|
'Phags-pa
සංස්කරණයAll tests passed. (refresh)
Text | Expected | Actual |
---|
Chakma
සංස්කරණයAll tests passed. (refresh)
Text | Expected | Actual |
---|
Grantha
සංස්කරණයAll tests passed. (refresh)
Text | Expected | Actual |
---|
Kaithi
සංස්කරණය1 of 0 tests failed. (refresh)
Text | Expected | Actual | |
---|---|---|---|
Script error during testing: Module:languages:454: Substitution data 'sa-Kthi-translit' does not match an existing module.stack traceback: [C]: ? [C]: in function 'error' Module:languages:454: in function 'doSubstitutions' Module:languages:403: in function 'doSubstitutions' Module:languages:478: in function 'iterateSectionSubstitutions' Module:languages:1612: in function 'transliterate' Module:sa-convert/testcases:100: in function 'one_script' Module:sa-convert/testcases/Kaithi:5: in function <Module:sa-convert/testcases/Kaithi:4> (tail call): ? [C]: in function 'xpcall' Module:UnitTests:370: in function <Module:UnitTests:329> (tail call): ? mw.lua:527: in function <mw.lua:507> [C]: ? [C]: in function 'expandTemplate' mw.lua:333: in function 'expandTemplate' Module:documentation:893: in function 'chunk' mw.lua:527: in function <mw.lua:507> [C]: ? |
Bhaiksuki
සංස්කරණයAll tests passed. (refresh)
Text | Expected | Actual |
---|
Soyombo
සංස්කරණයAll tests passed. (refresh)
Text | Expected | Actual |
---|
Zanabazar Square
සංස්කරණයAll tests passed. (refresh)
Text | Expected | Actual |
---|
Takri
සංස්කරණයAll tests passed. (refresh)
Text | Expected | Actual |
---|
Tai Tham
සංස්කරණයAll tests passed. (refresh)
Text | Expected | Actual |
---|
local tests = require('Module:UnitTests')
local tr = require('Module:sa-convert').tr
local m_languages = require("Module:languages")
local lang = m_languages.getByCode("sa")
local m_scripts = require("Module:scripts")
local deva_sc = m_scripts.getByCode("Deva")
local pali_fallback -- for transliteration.
-- A single letter field is the principal transliteration to the script, encoded as the lowercase letter usable for Template pi-alt.
-- (No transliteration, no test.) An explanation for the choice of transliteration may be given in the field whose name is formed
-- by suffix '_just', e.g fields 'l' and 'l_just' for the script encoded as 'Lana'. The explanation is printed out if the test is
-- deemed to have failed.
-- The cases are defined by the following fields:
-- Deva: The Devanagari form of the word; this is the input to the transliteration.
-- Beng etc.: The result of transliterating to that script code. The following special script codes are
-- used: as-Beng. The special value "except" may be used to suppress the use of this test when
-- the field all is supplied. The special value "fakeit" will result in a test for that
-- script as though the filed all had been supplied.
-- all: If this field is defined, the test is performed for all 'supported' scripts. In this case, if the
-- test reult is not defined for a script, the
-- test is the usually weaker test that the Devanagari and the transliteration transliterate to the
-- Latin script the same. Note that this fallback test may wrongly fail for the Bengali and Lao
-- scripts, so the required value of "except" exceptionally disables the test.
-- Beng_why etc.: Justification for the required result being what it is.
-- Beng_whynot etc.: Counter-argument. This is intended for setting out an argument for the test being
-- wrong until the some form of consensus is arrived at.
-- link: Whether the non-Latin forms should be made into links.
-- aborts: Whether there is a significant link of a conversion error causing the test as a whole
-- to halt. Such cases are processed after the others.
local cases = {
-- The first case, which may get commented out, is an example of how the test cases are set out.
{
Deva="निर्वाण", all=1, link = true,
Beng="নির্ব্বাণ",
Beng_why="Commenting on Mason's citation of the spelling of the word as निरव्वान on p10 of "..
"Kaccayano's Pali Gramar, Mazard comments in a footnote in his edition of the work, "..
'"Mason here follows the Bangladeshi convention, doubling the v in nirvana. This is not '..
'commonly found today in either Romanized or Devanagari Sanskrit, but remains the norm '..
'in the classical Bengali typeset (Sadhubasa)--a relatively recent development in the '..
"presses of Mason's day (owed to Sir Charles Wilkins)."..'"',
Beng_whynot="Modern Bengali writes নির্বাণ.",
},
-- Burmese spelling of the above is rare and highly variable on the web!
{ Deva = "गङ्गा", all=1, Mymr="ဂင်္ဂါ", link=true},
{ Deva="वीर", ["as-Beng"]="ৱীৰ", Beng="বীর", all=1, link=true},
{ Deva="आचार्यैः", all=1, link=true},
{ Deva="व्यञ्जन", ["as-Beng"]="fakeit", Beng="except", Mymr="fakeit", link=true},
{ Deva="गोपन", all=1, link=true, Mymr="ဂေါပန"},
{ Deva="प्राक्", all=1, link=true, Mymr="ပြာက်"},
{ Deva="क्रोध", all=1, link=true, Thai="โกฺรธ",
Thai_why='RID gives etymology of โกรธ as "ส. โกฺรธ".' },
{ Deva="आस्ये", all=1, link=true},
{ Deva='सऋक्ष', all=1, link=true},
{ Deva="संस्कृतम्", all=1, Java="ꦱꦁꦱ꧀ꦏꦽꦠꦩ꧀", link=true,
Java_why="See side panel at https://jv.wikipedia.org/wiki/Basa_Sangsekerta"},
{ Deva="नीळ", all=1, link=true},
}
--[[ here be the tests ]]
function tests:one_script(sc_name, risk_end)
local sc = m_scripts.getByCode(sc_name)
risk_end = not not risk_end -- Canonicalise
for _, case in pairs(cases) do
if risk_end == not not case.aborts then
local name, should, doit, just, counter, nocando
should = case[sc_name]
if should then
if should == "except" then
doit = false
elseif should == "fakeit" then
doit = true
should = nil
else
doit = true
end
else
doit = case.all
end
if doit then
local lp
just = case[sc_name.."_why"]
counter = case[sc_name.."_whynot"]
res = tr(case.Deva, sc_name)
if case.link then
lp = "{{l|sa|tr=-|"
else
lp = "{lang|sa|"
end
-- equals(name, actual, expected, options)
if res == nil or res == "" then
doit = false
elseif should then
name = self.frame:preprocess(lp..case.Deva.."}}")
should = self.frame:preprocess(lp..should.."}}")
res = self.frame:preprocess(lp..res.."}}")
else
local deva_romn = lang:transliterate(case.Deva, deva_sc)
local sc_romn = lang:transliterate(res, sc)
if not sc_romn or sc_romn == "" and deva_romn ~= "" then
pali_fallback = pali_fallback or require("Module:pi-translit").tr
sc_romn = pali_fallback(res, lang, sc_name)
end
if not sc_romn or sc_romn == "" and deva_romn ~= "" then
doit = false; -- silently don't apply a test.
else
name = self.frame:preprocess(
lp..case.Deva.."}} "..sc_name..": "..lp..res.."}}")
res = sc_romn
should = deva_romn
end
end
if doit then
if res ~= should then
if just then
should = should.."<br>("..just..")"
end
if counter then
res = res.."<br>("..counter..")"
end
end
tests:equals(name, res, should)
end
end
end
end
end
function tests:test_all()
local availableScripts = lang:getScripts()
local scripts = {}
for _, script in pairs(availableScripts) do
scripts[script:getCode()] = 1;
end
-- New scripts can be added here.
-- {Beng = 1, Mymr = 1, Thai = 1, ["as-Beng"] = 1}
scripts.Deva = nil; -- Pointless and unsupported to boot.
for _, risk_all in pairs({false, true}) do
for sc, _ in pairs(scripts) do
tests:one_script(sc, risk_all)
end
end
end
return tests