Module:example: Difference between revisions

Jump to navigation Jump to search
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
Line 9: Line 9:
if not args[2] then error("a sentence must be provided to {{example}}") end
if not args[2] then error("a sentence must be provided to {{example}}") end
local translation = args[3] and ('<dl><dd>' .. args[3] .. '</dd></dl>') or ""
local translation = args[3] and ('<dl><dd>' .. args[3] .. '</dd></dl>') or ""
local cats = (args["nocats"] and args["nocats"] ~= "") and "" or ("[[Category:" .. language.name .. " terms with usage examples]]")
local cats = (args["nocat"] and args["nocat"] ~= "") and "" or ("[[Category:" .. language.name .. " terms with usage examples]]")
return '<div class="h-example">' .. m_formatting.wrap_face(args[2], language, "example") .. translation .. '</div>' .. cats
return '<div class="h-example">' .. m_formatting.wrap_face(args[2], language, "example") .. translation .. '</div>' .. cats
end
end


return export
return export

Navigation menu