Content deleted Content added
BrandonXLF (talk | contribs) No edit summary |
BrandonXLF (talk | contribs) Attempt to make link to country |
||
Line 12:
if string.match(image, "(.-)%.(.*)") then
file = frame:expandTemplate{title = "flagicon image", args = {
elseif string.match(image, ".-%s%(.-%)") then
local country, var = string.match(image,"(.-)%s%((.-)%)")
file = frame:expandTemplate{title = "flagdeco", args = {
else
file = frame:expandTemplate{title = "flagdeco", args = {
end
return file
end
function getCountry(country)
local title = mw.title.new(country)
if not title or not title.exists then
return country
end
return '[[' .. country .. ']]'
end
Line 34 ⟶ 44:
table.insert(entries, {
image = image,
country = getCountry(args[i + 1]),
post = args[i + 2] and ' (' .. args[i + 2] .. ')' or ''
})
|