Modul:Irish/VocabularyTable
Penampilan
Usage
[sunting]To use, first copy and paste the module header and footer:
{{#invoke:Irish/VocabularyTable |FloatingTable }}
In between, add the vocabulary words one at a time: first the term, then the translation, separated by pipes. For example:
{{#invoke:Irish/VocabularyTable |FloatingTable |Gaeilge|the Irish language |Gaeltacht|Irish-speaking region }}
You can include an arbitrary number of terms in each list.
In the current version, every list item includes a pronunciation link to an Irish language pronunciation database. In future this should be made more flexible, so it can be eliminated entirely or for individual terms.
See also
[sunting]local p = {};
p.FloatingTable = function(frame)
local returnString = "{| \n|- \n|foo \n|bar \n|}"
local returnTable = p.FloatingTableHeader()
local term = ""
local i = 0;
for index, value in pairs(frame.args) do
if(i == 0) then
term = value
i = 1
else
returnTable = returnTable .. p.FloatingTableRow(term, value)
i = 0
end
end
returnTable = returnTable .. p.FloatingTableFooter()
return returnTable
end
p.FloatingTableHeader = function(frame)
return "{| class=\"wikitable floatright\"\n |-\n!colspan=3 style=\"background:lightgreen\" |Vocabulary\n"
end
p.FloatingTableFooter = function(frame)
return "|}"
end
p.FloatingTableRow = function(term1, term2)
local returnValue = "|- \n|" .. term1 .. "\n|" .. term2 .. "\n"
local returnValue = returnValue .. "| [https://www.teanglann.ie/en/fuaim/" .. term1 .. " pronunciation]\n"
return returnValue
end
return p