Editing Module:Dict D'ni
From Guild of Archivists
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 10: | Line 10: | ||
function p.dnifont2ots(str) | |||
local output = mw.text.trim(str) | local output = mw.text.trim(str) | ||
output = | output = output:gsub("%S+", {["S"] = "sh", | ||
["T"] = "th", | ["T"] = "th", | ||
["O"] = "oy", | ["O"] = "oy", | ||
Line 35: | Line 35: | ||
end | end | ||
function p.dnifont2nts(str) | |||
local output = mw.text.trim(str) | local output = mw.text.trim(str) | ||
output = | output = output:gsub("%S+", {["S"] = "š", | ||
["T"] = "þ", | ["T"] = "þ", | ||
["O"] = "ó", | ["O"] = "ó", | ||
["c"] = "ç", | ["c"] = "ç", | ||
["E"] = " | ["E"] = "i", | ||
["A"] = "é", | ["A"] = "é", | ||
["U"] = "ú", | ["U"] = "ú", | ||
Line 74: | Line 74: | ||
local output = '' | local output = '' | ||
local sort = dnifont2ots(mw.ustring.sub(args['dnifont'],1,1)) | local sort = dnifont2ots(mw.ustring.sub(args['dnifont'],1,1)) | ||
output = output..' | output = output..'==D\'ni==\n' | ||
output = output..'{{huge|<d\'ni>'..args['dnifont']..'</d\'ni>}}\n' | |||
output = output..'{{huge|< | output = output..'===Romanization===' | ||
output = output..' | output = output..'* [[Dnifont]]: '..args['dnifont']..'\n' | ||
output = output..'* [[Dnifont]] | output = output..'* [[OTS]]: '..dnifont2ots(args['dnifont'])..'\n' | ||
output = output..'* [[OTS]] | output = output..'* [[NTS]]: '..dnifont2nts(args['dnifont'])..' ' | ||
output = output..'* [[NTS]] | output = output..'[[Category:D\'ni words beginning with '..sort..']]\n' | ||
output = output..'[[Category:D\'ni words beginning with '..sort..']]' | |||
output = output..'[[Category:D\'ni words|'..sort..']]' | output = output..'[[Category:D\'ni words|'..sort..']]' | ||
return output | return output | ||
Line 176: | Line 169: | ||
end | end | ||
return p | return p |