Module:Flags: Difference between revisions

Content deleted Content added
"size=" only makes it simpler
Variant check
Line 28:
if commonsName == "Nepal" or commonsName == "Ohio" then border = "" else border = "border|" end
 
-- Variant check --
-- Size of flag -- FIXME "size=" format isn't implemented yet because the parameter renders as a "{{{2}}}" string. Weird.
if territory.args[2] ~= "" then do variant = territory.args[2]
commonsName = translations.variant[territory.args[1] .. "|" .. variant] end end
 
-- Size of flag --
-- Function to define the default size for the flag if needed
function defaultSize()
Line 38 ⟶ 42:
if territory.args[3]:find("px", -2) ~= nil then size = territory.args[3] else size = defaultSize(commonsName) end
-- return '[[File:Flag_of_' .. commonsName .. '.svg|' .. border .. 'link=' .. link .. '|'.. size .. ']]'
return '[[File:Flag_of_' .. commonsName .. '.svg|' .. border .. 'link=' .. link .. '|'.. size .. ']]'
end