Module:ISO 3166: Difference between revisions

m
1 revision imported
m (Fixing global function)
m (1 revision imported)
 
(2 intermediate revisions by 2 users not shown)
Line 120:
if not args[1] then
if mw.title.getCurrentTitle().namespace ~= 0 then catnocountry = '' end
return catnocountry, '<span style="font-size:100%" class="error">"No parameter for the country given"</span>'
end
Line 133 ⟶ 134:
end
end
if mw.title.getCurrentTitle().namespace ~= 0 then catnocountry = '' end
return catnocountry
else --3166-2 code
Line 150 ⟶ 152:
end
end
if mw.title.getCurrentTitle().namespace ~= 0 then catnosubdivision = '' end
if empty then
return catnosubdivision
else
return catnosubdivision
end
end
end
if mw.title.getCurrentTitle().namespace ~= 0 then catnocountry = '' end
return catnocountry
end
Line 258:
if region == '' then
region = p.luacode({country, nocat = 'true'})
if mw.title.getCurrentTitle().namespace ~= 0 then catnocountry, catnosubdivision = '', '' end
if region == '' then
tracking = tracking .. catnocountry