Module:ISO 3166: Difference between revisions
Jump to navigation
Jump to search
Content added Content deleted
m (65 revisions imported: infobox) |
(restrict tracking to articlespace per request) |
||
Line 120: | Line 120: | ||
if not args[1] then |
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>' |
return catnocountry, '<span style="font-size:100%" class="error">"No parameter for the country given"</span>' |
||
end |
end |
||
Line 133: | Line 134: | ||
end |
end |
||
end |
end |
||
if mw.title.getCurrentTitle().namespace ~= 0 then catnocountry = '' end |
|||
return catnocountry |
return catnocountry |
||
else --3166-2 code |
else --3166-2 code |
||
Line 150: | Line 152: | ||
end |
end |
||
end |
end |
||
if mw.title.getCurrentTitle().namespace ~= 0 then catnosubdivision = '' end |
|||
if empty then |
|||
return catnosubdivision |
|||
else |
|||
return catnosubdivision |
|||
end |
|||
end |
end |
||
end |
end |
||
if mw.title.getCurrentTitle().namespace ~= 0 then catnocountry = '' end |
|||
return catnocountry |
return catnocountry |
||
end |
end |
||
Line 258: | Line 258: | ||
if region == '' then |
if region == '' then |
||
region = p.luacode({country, nocat = 'true'}) |
region = p.luacode({country, nocat = 'true'}) |
||
if mw.title.getCurrentTitle().namespace ~= 0 then catnocountry, catnosubdivision = '', '' end |
|||
if region == '' then |
if region == '' then |
||
tracking = tracking .. catnocountry |
tracking = tracking .. catnocountry |