Module:IPA/overview: Difference between revisions

Content deleted Content added
rm diaCode
sort Māori correctly
Line 125:
local key = lect.key or lect.parent and lect.parent.key
if key then
local asciiKey = ''
if not byKey[key] then
for s in mw.ustring.gmatch(mw.ustring.toNFD(key), '[ -~]+') do
byKey[key] = {}
asciiKey = asciiKey .. s
table.insert(keys, key)
end
table.insert(if not byKey[keyasciiKey], {then
byKey[keyasciiKey] = { name = key }
table.insert(keys, keyasciiKey)
end
table.insert(byKey[asciiKey], {
code = lect.code,
name = lect.name or lect.extName,
Line 137 ⟶ 141:
end
table.sort(keys)
for _, keyasciiKey in ipairs(keys) do
local row = t:tag('tr')
local keyCellkeyLects = row:tag('td'):wikitext('byKey[[' .. key .. ']asciiKey]')
local keyCell = row:tag('td'):wikitext('[[' .. keyLects.name .. ']]')
local keyLects = byKey[key]
local lang
if #keyLects > 1 then
keyCell:attr('rowspan', #keyLects)
table.sort(keyLects, function (a, b) return a.name < b.name end)
local keyName = mw.ustring.gsub(keykeyLects.name, '^[^/]*/', '')
for _, lect in ipairs(keyLects) do
if lect.name == keyName then