Modul:World topic
| Mogoče bi radi ustvarili dokumentacijsko stran za ta Scribunto modul Urejevalci lahko preizkušate ta modul v peskovniku (ustvari | mirror) in testnihprimerih (ustvari). Prosimo, da dodate kategorije v /dok podstran. Podstrani te predloge. |
local p = {}
local Navbox = require("Module:Navbox")
local country = {
Afganistan = {""},
Albanija = {""},
["Alžirija"] = {""},
Andora = {""},
Angola = {""},
["Antigua and Barbuda"] = {""},
Argentina = {""},
Argentine = {""},
Armenija = {""},
Avstralija = {""},
Avstria = {""},
["Azerbajdžan"] = {""},
Bahamas = {"the Bahamas"},
Bahrain = {""},
["Bangladeš"] = {""},
Barbados = {""},
Belorusija = {""},
Belgija = {""},
Belize = {""},
Benin = {""},
Butan = {""},
Bolivija = {""},
["Bosna in Hercegovina"] = {""},
Botsvana = {""},
Brazilija = {""},
Brunej = {""},
Bolgarija = {""},
["Burkina Faso"] = {""},
Burundi = {""},
["Cape Verde"] = {""},
["Central African Republic"] = {"the Central African Republic"},
Ciper = {""},
["Čad"] = {""},
["Čile"] = {""},
["Črna gora"] = {""},
["Democratic Republic of the Congo"] = {"the Democratic Republic of the Congo"},
["Republic of the Congo"] = {"the Republic of the Congo"},
["Costa Rica"] = {""},
Cuba = {""},
["Czech Republic"] = {"the Czech Republic"},
Denmark = {""},
Djibouti = {""},
Dominica = {""},
["East Timor"] = {""},
["Dominican Republic"] = {"the Dominican Republic"},
Egipt = {""},
Ekvador = {""},
["El Salvador"] = {""},
["Equatorial Guinea"] = {""},
Eritreja = {""},
Estonija = {""},
Eswatini = {""},
Ehiopija = {""},
Fiji = {""},
Finland = {""},
France = {""},
Gabon = {""},
Gambija = {""},
Gruzija = {""},
Gana = {"Gana"},
Greece = {""},
Grenada = {""},
Guatemala = {""},
Guinea = {""},
["Guinea-Bissau"] = {""},
Gvajana = {""},
Haiti = {""},
["Hrvaška"] = {""},
Honduras = {""},
Hungary = {""},
Iceland = {""},
India = {""},
Indonesia = {""},
Iran = {""},
Iraq = {""},
Ireland = {"the Republic of Ireland"},
Israel = {""},
Italy = {""},
Jamaika = {""},
Japonska = {""},
Jordan = {""},
["Kamboža"] = {""},
Kamerun = {""},
Kanada = {""},
Kazahstan = {""},
Kenija = {""},
Kiribati = {""},
Kitajska = {""},
Kolumbija = {""},
Komori = {""},
Kosovo = {""},
["North Korea"] = {""},
["South Korea"] = {""},
Kuwait = {""},
Kyrgyzstan = {""},
Laos = {""},
Latvia = {""},
Lebanon = {""},
Lesotho = {""},
Liberija = {""},
Liberije = {""},
Libya = {""},
Liechtenstein = {""},
Lithuania = {""},
Luxembourg = {""},
Madagascar = {""},
Malawi = {""},
Malaysia = {""},
Maldives = {""},
Mali = {""},
Malta = {""},
["Marshall Islands"] = {"the Marshall Islands"},
Mauritania = {""},
Mauritius = {""},
Mexico = {""},
["Federated States of Micronesia"] = {"the Federated States of Micronesia"},
Moldova = {""},
Monako = {""},
Mongolija = {""},
Morocco = {""},
Mozambique = {""},
Myanmar = {""},
Namibija = {""},
Nauru = {""},
["Nemčija"] = {""},
["Nemčije"] = {""},
Nepal = {""},
Nizozemska = {""},
["New Zealand"] = {""},
Nicaragua = {""},
Niger = {""},
Nigerija = {""},
["North Macedonia"] = {""},
Norway = {""},
Oman = {""},
Pakistan = {""},
Palestine = {"State of Palestine"},
Palau = {""},
Panama = {""},
["Papua New Guinea"] = {""},
Paraguay = {""},
Peru = {""},
Philippines = {"the Philippines"},
Poland = {""},
Portugal = {""},
Qatar = {""},
Romania = {""},
Russia = {""},
Rwanda = {""},
["Saint Kitts and Nevis"] = {""},
["Saint Lucia"] = {""},
["Saint Vincent and the Grenadines"] = {""},
Samoa = {""},
["San Marino"] = {""},
["São Tomé and Príncipe"] = {""},
["Saudi Arabia"] = {""},
Senegal = {""},
["Sejšeli"] = {""},
["Sierra Leone"] = {""},
Singapor = {""},
["Slonokoščena obala"] = {""},
["Slovaška"] = {""},
Slovenija = {""},
["Solomon Islands"] = {"the Solomon Islands"},
Somalija = {""},
["South Africa"] = {""},
["South Sudan"] = {""},
Spain = {""},
Srbija = {""},
["Sri Lanka"] = {""},
Sudan = {""},
Suriname = {""},
Sweden = {""},
Switzerland = {""},
Syria = {""},
Taiwan = {""},
Tajikistan = {""},
Tanzania = {""},
Thailand = {""},
Togo = {""},
Tonga = {""},
["Trinidad and Tobago"] = {""},
Tunisia = {""},
Turkey = {""},
Turkmenistan = {""},
Tuvalu = {""},
Uganda = {""},
Ukraine = {""},
["United Arab Emirates"] = {"the United Arab Emirates"},
["United Kingdom"] = {"the United Kingdom"},
["United States"] = {"the United States"},
Uruguay = {""},
Uzbekistan = {""},
Vanuatu = {""},
["Vatican City"] = {""},
Venezuela = {""},
Vietnam = {""},
["Western Sahara"] = {""},
Yemen = {""},
Zambia = {""},
Zimbabwe = {""},
}
function p.main(frame)
local pframe = frame:getParent()
local config = frame.args
local args = pframe.args
return p._main(args)
end
function p._main(args)
if mw.title.getCurrentTitle() == "Template:World topic" then
state = "autocollapse"
else
state = args.state
end
if args[1] ~= nil or args.prefix ~= nil and (args[2] == nil or ags.suffix == nil) then
titlemid = " the"
end
if args.title ~= nil then
title = args.title
else
title = "[["..(args[1] or args.prefix or "")..(titlemid or "").." World"..(args.suffix or "").."]]"
end
if args.group1 ~= nil and args.group1 ~= "" then
group1 = args.group1
end
local sorter = {}
for n in pairs(country) do
table.insert(sorter, n)
end
table.sort(sorter)
if args.noredlinks ~= nil then
list1 = table.concat(noredlinks(args[1], args[2], args.prefix, args.suffix, sorter) )
else
list1 = table.concat(redlinks(args[1], args[2], args.prefix, args.suffix, sorter) )
end
local navarguments = {
name = args.name or "World topic",
state = state,
navbar = args.navbar or "Tnavbar",
border = args.border,
title = title,
image = args.image,
titlestyle = args.titlestyle,
bodystyle = args.bodystyle,
abovestyle = args.abovestyle,
belowstyle = args.belowstyle,
groupstyle = args.groupstyle,
liststyle = args.liststyle,
listclass = "hlist",
above = args.above,
group1 = group1,
list1 = list1
}
return Navbox._navbox(navarguments)
end
function noredlinks(args1, args2, argsprefix, argssuffix, sorter)
local list = {}
for x, y in pairs(sorter) do
if mw.title.new((args1 or argsprefix or "").." "..linktarget(y, country[y][1])..(args2 or argssuffix or "")).exists == true then
table.insert(list, li("[["..(args1 or argsprefix or "").." "..linktarget(y, country[y][1])..(args2 or
argssuffix or "").."|"..y.."]]"))
elseif y == "Georgia" or y == "Palestine" then
if mw.title.new((args1 or argsprefix or "").." "..y..(args2 or argssuffix or "")).exists == true then
table.insert(list, li("[["..(args1 or argsprefix or "").." "..y..(args2 or
argssuffix or "").."|"..y.."]]" ) )
end
end
end
return list
end
function redlinks(args1, args2, argsprefix, argssuffix, sorter)
local list = {}
for x, y in pairs(sorter) do
if y == "Georgia" or y == "Palestine" then
if mw.title.new((args1 or argsprefix or "").." "..country[y][1]..(args2 or argssuffix or "")).exists == true then
table.insert(list, li("[["..(args1 or argsprefix or "").." "..country[y][1]..(args2 or
argssuffix or "").."|"..y.."]]" ))
else
table.insert(list, li("[["..(args1 or argsprefix or "").." "..y..(args2 or
argssuffix or "").."|"..y.."]]" ))
end
else
table.insert(list, li("[["..(args1 or argsprefix or "").." " .. linktarget(y, country[y][1]) .. (args2 or
argssuffix or "").."|".. y .. "]]"))
end
end
return list
end
function li(text)
local li = mw.html.create("li")
li
:wikitext(text)
:done()
return tostring(li)
end
function linktarget(x, y)
if y ~= nil and y == "" then
return x
else
return y
end
end
return p
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.
Index:
pl ar de en es fr it arz nl ja pt ceb sv uk vi war zh ru af ast az bg zh-min-nan bn be ca cs cy da et el eo eu fa gl ko hi hr id he ka la lv lt hu mk ms min no nn ce uz kk ro simple sk sl sr sh fi ta tt th tg azb tr ur zh-yue hy my ace als am an hyw ban bjn map-bms ba be-tarask bcl bpy bar bs br cv nv eml hif fo fy ga gd gu hak ha hsb io ig ilo ia ie os is jv kn ht ku ckb ky mrj lb lij li lmo mai mg ml zh-classical mr xmf mzn cdo mn nap new ne frr oc mhr or as pa pnb ps pms nds crh qu sa sah sco sq scn si sd szl su sw tl shn te bug vec vo wa wuu yi yo diq bat-smg zu lad kbd ang smn ab roa-rup frp arc gn av ay bh bi bo bxr cbk-zam co za dag ary se pdc dv dsb myv ext fur gv gag inh ki glk gan guw xal haw rw kbp pam csb kw km kv koi kg gom ks gcr lo lbe ltg lez nia ln jbo lg mt mi tw mwl mdf mnw nqo fj nah na nds-nl nrm nov om pi pag pap pfl pcd krc kaa ksh rm rue sm sat sc trv stq nso sn cu so srn kab roa-tara tet tpi to chr tum tk tyv udm ug vep fiu-vro vls wo xh zea ty ak bm ch ny ee ff got iu ik kl mad cr pih ami pwn pnt dz rmy rn sg st tn ss ti din chy ts kcg ve









