Module:IPA/overview: Difference between revisions

Content deleted Content added
fix aliases
notes
Line 4:
local lects = mw.loadData('Module:IPA/data/export')
 
local function addNotesaddNote(cell, notesnote)
cell:wikitext(string.format(' <small>(%s)</small>', table.concat(notes, '; 'note))
if #notes > 0 then
cell:wikitext(
string.format(' <small>(%s)</small>', table.concat(notes, '; '))
)
end
end
 
Line 63 ⟶ 59:
table.insert(aliases, alias)
end
addNotesaddNote(cells[1], {string.format(
'also <code>%s</code>',
string.format(
'alsotable.concat(aliases, '</code>%s, </code>',)
))
table.concat(aliases, '</code>, <code>')
)
})
end
do
Line 83 ⟶ 77:
end
cells[2]:wikitext(lect.name or lect.extName)
addNotes(cells[2],if #notes) > 0 then
addNote(cells[2], table.concat(notes, '; '))
end
end
do
local notes = {}note
local intLink = lect.link or lect.generatedLink
if intLink then
if intLink == lect.extLink then
table.insert(notes,note = 'redundant')
elseif lect.extLink then
local note = string.format('overrides [[%s]]', lect.extLink)
local intTitle = mw.title.new(intLink)
intTitle = intTitle.redirectTarget or intTitle
Line 100 ⟶ 96:
note = note .. ', a different article'
end
table.insert(notes, note)
end
end
Line 106 ⟶ 101:
s = lect.generatedLink and '([[' .. s .. ']])' or '[[' .. s .. ']]'
cells[3]:wikitext(s)
if note then
addNotes addNote(cells[3], notesnote)
)end
end
cells[4]:wikitext(