Module:labels: Difference between revisions

ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
mNo edit summary
No edit summary
Line 1: Line 1:
local export = {}
local export = {}


function export.make_labels(language, labels, nocat)
function export.make_labels(language, labels, nocat, nobrackets)
local function make_label(label_id, label, language_name)
local function make_label(label_id, label, language_name)
local categories = label["categories"]
local categories = label["categories"]
Line 24: Line 24:
end
end
local l_data = mw.loadData("Module:labels/data")
local l_data = mw.loadData("Module:labels/data")
local out = "(<i>"
local out = nobrackets and "" or "(<i>"
local cats = ""
local cats = ""
local skip_comma = false
local skip_comma = false
Line 94: Line 94:
end
end
end
end
out = out .. "</i>)"
out = out .. (nobrackets and "" or "</i>)")
return out .. (nocat and "" or cats)
return out .. (nocat and "" or cats)
end
end