Module:siwa-pron: Difference between revisions

No edit summary
No edit summary
Line 254: Line 254:
end
end


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


function format_IPA_multiple(items)
function IPA_span(items)
local bits = {}
local bits = {}
for _, item in ipairs(items) do
for _, item in ipairs(items) do
local bit = "<span style=\"font-size:110%;font-family:Gentium,'DejaVu Sans','Segoe UI',sans-serif>" .. item.pron .. "</span>"
local bit = "<span style=\"font-size:110%;font-family:Gentium,'DejaVu Sans','Segoe UI',sans-serif>[" .. item.pron .. "]</span>"
table.insert(bits, bit)
table.insert(bits, bit)
end
end
Line 274: Line 268:
end
end


function export.format_IPA(pron)
function line_format(pronunciation, dialect)
return
end
 
function make_row(phonetic, dials)
local full_pronuns = {}
local full_pronuns = {}
local IPA_args = {{pron = '[' .. phonetic .. ']'}}
local IPA_args = {{pron = '[' .. pronunciation .. ']'}}
table.insert(full_pronuns, format_IPA_full(IPA_args))
table.insert(full_pronuns, format_IPA(IPA_args))
return "(''" .. table.concat(dials, ", ") .. "'')" .. ' ' .. table.concat(full_pronuns, ' or ')
return "(''" .. table.concat(dials, ", ") .. "'')" .. ' ' .. table.concat(full_pronuns, ' or ')
end
end