Module:qhv-pron: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 59: Line 59:


local function format_IPA(items)
local function format_IPA(items)
return "[[w:IPA chart|IPA]]<sup>([[IPA for Siwa|key]])</sup>:&#32;" .. IPA_span(items)
return "[[w:IPA chart|IPA]]<sup>([[IPA for High Valyrian|key]])</sup>:&#32;" .. IPA_span(items)
end
end


Line 78: Line 78:
end
end


function separate_word(term, a, e, w)
function separate_word(term)
local result = {}
local result = {}
for word in gsplit(term, " ") do
for word in gsplit(term, " ") do
table.insert(result, export.crux(word))
table.insert(result, crux(word))
end
end
Line 90: Line 90:
function export.show(frame)
function export.show(frame)
local params = {
local params = {
[1] = { default = mw.title.getCurrentTitle().nsText == 'Template' and "uįo·sauṡṡi" or mw.title.getCurrentTitle().text },
[1] = { default = mw.title.getCurrentTitle().nsText == 'Template' and "drakarys" or mw.title.getCurrentTitle().text },
}
}
local args = require("Module:parameters").process(frame:getParent().args, params)
local args = require("Module:parameters").process(frame:getParent().args, params)
Line 97: Line 97:
local ipa = "* "
local ipa = "* "
ipa = ipa .. line_format(separate_word(term), {'Modern'})
ipa = ipa .. line_format(separate_word(term), {'Modern'})
if crux(term) ~= oldcrux(term) then
ipa = ipa .. "\n" .. line_format(separate_word(term), {'Antique'})
end
return ipa
end
end


return export
return export