Module:head/templates: Difference between revisions

ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
 
(25 intermediate revisions by 2 users not shown)
Line 10: Line 10:
[3] = {list = true},
[3] = {list = true},
["g"] = {list = true},
["g"] = {list = true},
["label"] = {list = true},
["head"] = {},
["head"] = {},
["nocat"] = {type = "boolean"},
["nocat"] = {type = "boolean"},
Line 45: Line 46:
local p = m_parameters.process(args, params)
local p = m_parameters.process(args, params)
local language = m_languages.get_by_code(p[1])
local language = m_languages.get_by_code(p[1])
local term = mw.title.getCurrentTitle().text
local term = mw.title.getCurrentTitle().subpageText
if language.proto then
local appendix = string.gsub(string.gsub(language.name, " ", "_"), "%-", "%%-")
appendix = "Appendix:" .. appendix .. "/"
term = string.gsub(term, appendix, "")
end
return {
return {
term = term,
term = term,
language = language,
language = language,
head = p["head"],
pos = p[2],
pos = p[2],
genders = p["g"],
genders = p["g"],
head = p["head"],
nocat = p["nocat"],
nocat = p["nocat"],
labels = p["label"],
inflections = get_inflections(p[3]),
inflections = get_inflections(p[3]),
}
}