Module:head/templates: Difference between revisions

Jump to navigation Jump to search
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
Line 44: Line 44:
local function get_data(args)
local function get_data(args)
local p = m_parameters.process(args, params)
local p = m_parameters.process(args, params)
local language = m_languages.get_by_code(p[1])
local term = p["head"] or mw.title.getCurrentTitle().text
if language.proto then
local appendix = "Appendix:" .. string.sub(language.name, " ", "_") .. "/"
if string.find(term, appendix) then
term = string.sub(term, #appendix + 1)
end
end
return {
return {
term = args["head"] or mw.title.getCurrentTitle().text,
term = term,
language = m_languages.get_by_code(p[1]),
language = language,
pos = p[2],
pos = p[2],
genders = p["g"],
genders = p["g"],

Navigation menu