Module:WikidataIB/nolinks: Difference between revisions

From Zoophilia Wiki
Jump to navigationJump to search
meta>RexxS
create module to define some common terms which should not be linked.
 
meta>RexxS
p.itemsindex and p.items
Line 48: Line 48:
--]]
--]]
p.itemsindex = {}
p.itemsindex = {}
for i, v in ipairs(items) do
for i, v in ipairs(p.items) do
itemsindex[v] = true
p.itemsindex[v] = true
end
end


return p
return p

Revision as of 18:49, 1 January 2019

Documentation for this module may be created at Module:WikidataIB/nolinks/doc

local p ={}

--[[
The values here are the English sitelinks for items that should not be linked.
These 36 are not defininitive and may be altered to suit.
--]]
p.items = {
	"Australia",
	"Austria",
	"Belgium",
	"Canada",
	"China",
	"Denmark",
	"England",
	"France",
	"Germany",
	"Greece",
	"Hungary",
	"Iceland",
	"India",
	"Republic of Ireland",
	"Israel",
	"Italy",
	"Jamaica",
	"Japan",
	"Luxembourg",
	"Mexico",
	"Netherlands",
	"New Zealand",
	"Northern Ireland",
	"Norway",
	"Poland",
	"Portugal",
	"Russia",
	"Scotland",
	"South Africa",
	"Spain",
	"Sweden",
	"Switzerland",
	"Turkey",
	"United Kingdom",
	"United States",
	"Wales",
}

--[[
This provides a convenient way to create a test whether an item is on the list.
--]]
p.itemsindex = {}
for i, v in ipairs(p.items) do
	p.itemsindex[v] = true
end

return p