Module:siwa-pron: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 172: Line 172:
table.insert(bits, bit)
table.insert(bits, bit)
end
end
return table.concat(bits)
return table.concat(bits)
end
end
Line 189: Line 188:
["e"] = {type = 'boolean', default = true},
["e"] = {type = 'boolean', default = true},
["w"] = {type = 'boolean', default = true},
["w"] = {type = 'boolean', default = true},
["acc"] = {list = true},
}
}
local args = require("Module:parameters").process(frame:getParent().args, params)
local args = require("Module:parameters").process(frame:getParent().args, params)
local term = args[1]
local term = args[1]
local accent = args.acc
local categories = {}
local categories = {}
Line 200: Line 197:
if args.a then
if args.a then
ipa = ipa .. line_format(export.crux(term, false, false), accent and #accent > 0 or {'Aingo'})
ipa = ipa .. line_format(export.crux(term, false, false), {'Aingo'})
end
end
Line 208: Line 205:
ipa = ipa .. "\n* "
ipa = ipa .. "\n* "
end
end
ipa = ipa .. line_format(export.crux(term, true, false), accent and #accent > 0 or {'Eastern'})
ipa = ipa .. line_format(export.crux(term, true, false), {'Eastern'})
table.insert(categories, "Siwa terms with Eastern IPA pronunciation")
table.insert(categories, "Siwa terms with Eastern IPA pronunciation")
else end
else end
Line 218: Line 215:
ipa = ipa .. "\n* "
ipa = ipa .. "\n* "
end
end
ipa = ipa .. line_format(export.crux(term, false, true), accent and #accent > 0 or {'Western'})
ipa = ipa .. line_format(export.crux(term, false, true), {'Western'})
table.insert(categories, "Siwa terms with Western IPA pronunciation")
table.insert(categories, "Siwa terms with Western IPA pronunciation")
elseif export.crux(term, false, false) == export.crux(term, false, true) or export.crux(term, false, false) == export.crux(term, true, false) then
elseif export.crux(term, false, false) == export.crux(term, false, true) or export.crux(term, false, false) == export.crux(term, true, false) then