Modifiche

Modulo:Headword/templates

28 byte aggiunti, 00:14, 15 mag 2014
nessun oggetto della modifica
local m_headword = require("Module:headword")
 
local export = {}
function export.head_t(frame)
local m_utilities = require("Module:utilities")
local args = frame:getParent().args
PAGENAME = mw.title.getCurrentTitle().text
SUBPAGENAME = mw.title.getCurrentTitle().subpageText
NAMESPACE = mw.title.getCurrentTitle().nsText
-- 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
m_headwordrequire("Module:headword").full_headword(lang, sc, heads, tr, genders, inflections, categories, sort_key) .. m_utilitiesrequire("Module:utilities").format_categories(categories, lang, sort_key)
end
return export
Utente anonimo

Menu di navigazione