Module:sish-pronunc: Difference between revisions

Melinoë (talk | contribs)
No edit summary
Melinoë (talk | contribs)
No edit summary
Line 111: Line 111:
}
}


function export.tr(text, lang, sc)
function export.show(frame)
if type(lang) == "table" then
local parent_args = frame:getParent().args
lang = lang:getFullCode()
local params = {
end
[1] = { default = mw.title.getCurrentTitle().nsText == 'Template' and "Niṡkullit" or mw.title.getCurrentTitle().text },
}
local args = require("Module:parameters").process(parent_args, params)
local term = mw.ustring.lower(args[1])
local pronunciations = {
{pron = "[" .. export.crux(term) .. "]"}
}


if lang == "xcl" then
return "* " .. m_IPA.format_IPA_full{lang = lang, items = pronunciations}
mapping["ղ"]="ł"
mapping["Ղ"]="Ł"
end
 
for regex, replacement in pairs(replacements) do
text = gsub(text, regex, replacement)
end
 
text = gsub(text, '.', mapping)
return text
end
end


return export
return export