Module:lfv-IPA: Difference between revisions

Jump to navigation Jump to search
m
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
mNo edit summary
mNo edit summary
Line 327: Line 327:
["colloquial"] = true,
["colloquial"] = true,
["nolarge"] = true,
["nolarge"] = true,
["cite"] = true,
}
}
local p = 2
local p = 2
Line 348: Line 349:
end
end
outputIPA = mw.ustring.gsub(outputIPA, "(%&nbsp%;)", " ")
outputIPA = generate_IPA(outputIPA, parameters["phon"] or false, parameters["colloquial"] or parameters["col"] or false)
local nolarge = ""
local nolarge = ""
if parameters["nolarge"] then
if parameters["nolarge"] then
nolarge = " nolarge"
nolarge = " nolarge"
end
end
if parameters["phon"] and parameters["format"] then
outputIPA = "<span class=\"IPA" .. nolarge .. "\">[" .. outputIPA .. "]</span>"
outputIPA = mw.ustring.gsub(outputIPA, "(%&nbsp%;)", " ")
elseif parameters["format"] then
outputIPA = "<span class=\"IPA" .. nolarge .. "\">/" .. outputIPA .. "/</span>"
if parameters["cite"] then
local broad = generate_IPA(outputIPA, false, parameters["colloquial"] or parameters["col"] or false)
local narrow = generate_IPA(outputIPA, true, parameters["colloquial"] or parameters["col"] or false)
if broad ~= narrow then
outputIPA = "<span class=\"IPA" .. nolarge .. "\">/" .. broad .. "/ [" .. narrow .. "]</span>"
else
outputIPA = "<span class=\"IPA" .. nolarge .. "\">/" .. outputIPA .. "/</span>"
end
else
outputIPA = generate_IPA(outputIPA, parameters["phon"] or false, parameters["colloquial"] or parameters["col"] or false)
if parameters["phon"] and parameters["format"] then
outputIPA = "<span class=\"IPA" .. nolarge .. "\">[" .. outputIPA .. "]</span>"
elseif parameters["format"] then
outputIPA = "<span class=\"IPA" .. nolarge .. "\">/" .. outputIPA .. "/</span>"
end
end
end

Navigation menu