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 80: | Line 80: | ||
end | end | ||
output = output..'{{#vardefine:language| | output = output..'{{#vardefine:language|D\'ni}}' | ||
output = output..'<h2>D\'ni</h2>\n' | output = output..'<h2>D\'ni</h2>\n' | ||
output = output..'{{huge|<dni> | output = output..'{{huge|<dni>'..args['dnifont']..'</dni>}}\n' | ||
output = output..'<h3>Romanization</h3>\n' | output = output..'<h3>Romanization</h3>\n' | ||
output = output..'* [[Dnifont]]: [[Dnifont::'..args['dnifont']..']]\n' | output = output..'* [[Dnifont]]: [[Dnifont::'..args['dnifont']..']]\n' | ||
output = output..'* [[OTS]] | output = output..'* [[OTS]]: '..dnifont2ots(args['dnifont'])..'\n' | ||
output = output..'* [[NTS]] | output = output..'* [[NTS]]: '..dnifont2nts(args['dnifont'])..' ' | ||
output = output..'[[Category:D\'ni words beginning with '..sort..']]' | output = output..'[[Category:D\'ni words beginning with '..sort..']]\n' | ||
output = output..'[[Category:D\'ni words|'..sort..']]' | output = output..'[[Category:D\'ni words|'..sort..']]' | ||
Line 177: | Line 177: | ||
function p. | function p.smw_dict_line(frame) | ||
-- If called via #invoke, use the args passed into the invoking template. | -- If called via #invoke, use the args passed into the invoking template. | ||
-- Otherwise, for testing purposes, assume args are being passed directly in. | -- Otherwise, for testing purposes, assume args are being passed directly in. | ||
Line 189: | Line 189: | ||
preprocessSingleArg(1) | preprocessSingleArg(1) | ||
preprocessSingleArg(2) | preprocessSingleArg(2) | ||
preprocessSingleArg(3) | |||
pagename = string.lower(args[1]) | |||
word = string.gsub(pagename,'Dictionary:','') | |||
if (args[2] == nil) then | |||
dnifont = "" | |||
else | else | ||
dnifont = "<dni>"..args[2].."</dni>" | |||
end | end | ||
if (args[3] == nil) then | |||
gloss = "" | |||
else | else | ||
gloss = string.gsub(string.gsub(args[3],'%[%[%s*[Cc]ategory%s*:.-%]%]', ''),"|","{{!}}") | |||
end | end | ||
output = "'''''[["..pagename.."|"..word.." ]]''''' "..dnifont.." - "..gloss | |||
return output --frame:preprocess(_dni_entry()) | |||
return output --frame:preprocess( | |||
end | end | ||