Module:IPA/overview: Difference between revisions

Content deleted Content added
rm diaCode
simpler
 
(One intermediate revision by the same user not shown)
Line 125:
local key = lect.key or lect.parent and lect.parent.key
if key then
local asciiKey = mw.ustring.gsub(mw.ustring.toNFD(key), '[^ -~]', '')
if not byKey[key] then
if not byKey[keyasciiKey] = {}then
table.insert(keys,byKey[asciiKey] = { name = key) }
table.insert(keys, asciiKey)
end
table.insert(byKey[keyasciiKey], {
code = lect.code,
name = lect.name or lect.extName,
Line 137 ⟶ 138:
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