Content deleted Content added
allow name override |
Copy from sandbox |
||
(6 intermediate revisions by 2 users not shown) | |||
Line 203:
text = name
elseif mn=="a" then --abbr
text = name==country and (clink==
else --country link (default)
text = clink=="" and name or "[["..clink..csec.."|"..name.."]]"
Line 217:
--Define separator
local separator = " "
if ms=="x" then --no separator
separator = ""
Line 262:
if iname==placeholder then
if require('Module:yesno')(args["noredlink"]) == false
if country ~= '' and data.alias == nil then
iname = ''▼
iname = ''
image = "[[:Template:Country data "..country.."]]" if args["noredlink"] == "notext" then
end
end
if (args["missingcategory"] or '') ~= '' then
Line 284 ⟶ 289:
out = text
elseif ms=="x" or ms=="n" or ms=="l" then --no separator, non-breaking space, or line break
out = text.."<span class=\"flagicon nowrap\">"..separator..image.."</span>"
elseif ms=="t" then --table cell
out = "style=\"text-align:"..(nalign or "left").."\"|"..text.."||style=\"text-align:"..(align or "center").."\"|<span class=\"flagicon\">"..image.."</span>"
else --fixed-width span box (default)
local width = args["width"] or args["w"] or require("Module:Flaglist").luawidth(size)
out = text.."<span class=\"nowrap\"> <span class=\"flagicon\" style=\"display:inline-block;width:"..width.."px;text-align:"..(align or "right").."\">"..image.."</span></span>"
end
else --image left of name
Line 300 ⟶ 305:
else --fixed-width span box (default)
local width = nopx(args["width"] or args["w"]) or require("Module:Flaglist").luawidth(size)
out = "<span class=\"nowrap\"><span class=\"flagicon\" style=\"display:inline-block;width:"..width.."px;text-align:"..(align or "left").."\">"..image.."</span> </span>"..text
end
▲ end
end
Line 321 ⟶ 323:
end
p[''] = p.main
return p
|