Modifiche
nessun oggetto della modifica
local export = {}
function export.head_t(frame)
local args = frame:getParent().args
-- Get language and script information
local lang = args[1] or (NAMESPACE mw.title.getCurrentTitle().nsText == "Template" and "und") or error("Language code has not been specified. Please pass parameter 1 to the template.")
local sc = args["sc"] or ""; if sc == "" then sc = nil end
lang = require("Module:languages").getByCode(lang) or error("The language code \"" .. lang .. "\" is not valid.")
local nolink = args["f" .. i .. "nolink"]; if nolink == "" then nolink = nil end
local parts = {label = label, accel = accel, nolink = nolink}
local m_scripts = nil
while label do
if term or alt then
if sc then
m_scripts = m_scripts or require("Module:scripts")
sc = (sc and (m_scripts.getByCode(sc) or error("The script code \"" .. sc .. "\" is not valid.")) or nil)
end
table.insert(parts, {term = term, alt = alt, sc = sc, id = id, genders = {gender}})
end
return
end
return export