Module:siwa-pron: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 266: Line 266:
["e"] = {type = 'boolean', default = true},
["e"] = {type = 'boolean', default = true},
["w"] = {type = 'boolean', default = true},
["w"] = {type = 'boolean', default = true},
["dia"] = {},
}
}
Line 276: Line 277:
if detect_dialect(term) == "w" then
if detect_dialect(term) == "w" then
args.e = false; args.a = false
args.e = false; args.a = false
ipa = ipa .. line_format(separate_word(term, false, false, true), {'Western'})
ipa = ipa .. line_format(separate_word(term, false, false, true), {args.dia or 'Western'})
if mw.title.getCurrentTitle().nsText ~= 'Template' then  
if mw.title.getCurrentTitle().nsText ~= 'Template' then  
table.insert(categories, "Western Siwa lemmas")
table.insert(categories, "Western Siwa lemmas")
Line 283: Line 284:
elseif detect_dialect(term) == "e" then
elseif detect_dialect(term) == "e" then
args.w = false; args.a = false
args.w = false; args.a = false
ipa = ipa .. line_format(separate_word(term, false, true, false), {'Eastern'})
ipa = ipa .. line_format(separate_word(term, false, true, false), {args.dia or 'Eastern'})
if mw.title.getCurrentTitle().nsText ~= 'Template' then  
if mw.title.getCurrentTitle().nsText ~= 'Template' then  
table.insert(categories, "Eastern Siwa lemmas")
table.insert(categories, "Eastern Siwa lemmas")
Line 289: Line 290:
end
end
elseif args.a then
elseif args.a then
ipa = ipa .. line_format(separate_word(term, true, false, false), {'Aingo'})
ipa = ipa .. line_format(separate_word(term, true, false, false), {args.dia or 'Aingo'})
end
end
Line 296: Line 297:
ipa = ipa .. "\n* "
ipa = ipa .. "\n* "
end
end
ipa = ipa .. line_format(separate_word(term, true, true, false), {'Eastern'})
ipa = ipa .. line_format(separate_word(term, true, true, false), {args.dia or 'Eastern'})
if mw.title.getCurrentTitle().nsText ~= 'Template' then  
if mw.title.getCurrentTitle().nsText ~= 'Template' then  
table.insert(categories, "Siwa lemmas with Eastern IPA pronunciation")
table.insert(categories, "Siwa lemmas with Eastern IPA pronunciation")
Line 306: Line 307:
ipa = ipa .. "\n* "
ipa = ipa .. "\n* "
end
end
ipa = ipa .. line_format(separate_word(term, true, false, true), {'Western'})
ipa = ipa .. line_format(separate_word(term, true, false, true), {args.dia or 'Western'})
if find(ipa, "ɤ") then
if find(ipa, "ɤ") then
ipa = ipa .. "\n** "
ipa = ipa .. "\n** "
ipa = ipa .. line_format(gsub(separate_word(term, false, false, true),"ɤ","ɵ"), {'Regna'})
ipa = ipa .. line_format(gsub(separate_word(term, false, false, true),"ɤ","ɵ"), {args.dia or 'Regna'})
end
end
if mw.title.getCurrentTitle().nsText ~= 'Template' then  
if mw.title.getCurrentTitle().nsText ~= 'Template' then