Module:siwa-pron: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 256: Line 256:
end
end


function IPA_format(items)
function format_IPA_full(items)
local IPAs
local prefix = "[[w:IPA chart|IPA]]<sup>([[IPA for Siwa|key]])</sup>:&#32;"
local prefix = "[[w:IPA chart|IPA]]<sup>([[IPA for Siwa|key]])</sup>:&#32;"
local span = "<span style=\"font-size:110%;font-family:Gentium,'DejaVu Sans','Segoe UI',sans-serif>"
return prefix .. span .. items.pron .. "</span>"
IPAs = format_IPA_multiple(items)
 
return prefix .. IPAs .. category
end
 
function format_IPA_multiple(items)
local bits = {}
for _, item in ipairs(items) do
local bit = export.format_IPA(item.pron)
end
 
return table.concat(bits)
end
 
function export.format_IPA(pron)
return "<span style=\"font-size:110%;font-family:Gentium,'DejaVu Sans','Segoe UI',sans-serif>" .. pron .. "</span>"
end
end


Line 265: Line 283:
local full_pronuns = {}
local full_pronuns = {}
local IPA_args = {{pron = '[' .. phonetic .. ']'}}
local IPA_args = {{pron = '[' .. phonetic .. ']'}}
table.insert(full_pronuns, IPA_format(IPA_args))
table.insert(full_pronuns, format_IPA_full(IPA_args))
return "(''" .. dials .. "'')" .. ' ' .. table.concat(full_pronuns, ' or ')
return "(''" .. dials .. "'')" .. ' ' .. table.concat(full_pronuns, ' or ')
end
end