Module:translations: Difference between revisions

Jump to navigation Jump to search
m
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
mNo edit summary
mNo edit summary
Line 17: Line 17:
local language = m_languages.get_by_code(args[1])
local language = m_languages.get_by_code(args[1])
local title = args[2] or args["title"] or args["t"]
local title = args[2] or args["title"] or args["t"]
local nocat = false
local nocat = args["nocat"] ~= nil or false
if args['nocat'] ~= nil then
args["nocat"] = nil
nocat = true
args['nocat'] = nil
end
if title then title = string.gsub(title, "%s+$", "") end
if title then title = string.gsub(title, "%s+$", "") end
for k, v in pairs(args) do
for k, v in pairs(args) do
Line 63: Line 60:
end
end
end
end
if nocat then out = mw.ustring.gsub(out, "%[%[Category[^%]]+%]%]", "") end
if nocat then out = string.gsub(out, "%[%[Category[^%]]+%]%]", "") end
return out
return out
end
end


return export
return export

Navigation menu