Module:siwa-pron: Difference between revisions
No edit summary |
No edit summary |
||
| Line 254: | Line 254: | ||
end | end | ||
function | function format_IPA(items) | ||
return "[[w:IPA chart|IPA]]<sup>([[IPA for Siwa|key]])</sup>: " .. IPA_span(items) | |||
end | end | ||
function | 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 | function line_format(pronunciation, dialect) | ||
local full_pronuns = {} | local full_pronuns = {} | ||
local IPA_args = {{pron = '[' .. | local IPA_args = {{pron = '[' .. pronunciation .. ']'}} | ||
table.insert(full_pronuns, | 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 | ||