Content deleted Content added
Supporting text= aka possibility to add a text and define the link |
Introducing customizable link |
||
Line 7:
local translations = mw.loadData("Module:Flags/LocaleData")
local master = mw.loadData("Module:Flags/MasterData")
-- Assigning the parameter to a flag and a link
function p.flag(territory)
Line 125:
end
-- Customizing the link
openBrackets = "[["
closeBrackets = "]]"
flagLink = ""
textLink = ""
openBrackets = ""
closeBrackets = ""
textLink = territory.args[5] .. "|"
else flagLink = link
textLink = link .. "|"
-- Text in addition to flag
text = " " .. openBrackets .. link .. closeBrackets
▲ if territory.args[5] ~= "{{{text}}}" then
elseif territory.args[6] ~= "{{{text}}}" then
▲ text = territory.args[5]
▲ text = " [[" .. territory.args[5] .. "]]"
▲ end
end
return '[[File:' .. flagOf .. commonsName .. '.svg|' .. border .. 'link=' ..
end
return p
|