79 546
contributi
(Bot: adding Zarude "Papà" *** sovrascritto il testo esistente ***) |
(Adding plain links *** sovrascritto il testo esistente ***) |
||
local tab = require('Modulo:Wikilib/tables') -- luacheck: no unused
-- TODO: refactor link creations, shamelessly copied from AltForms-data
--[[
Arguments:
- context: a string containing a ${link} replacement. The string is a
context in which ${link} is replaced with the actual link
- formName: name of the specific form
- poke: base name of the Pokémon
--]]
local function makeSingleLink(
if formName == "" then
return ""
target = table.concat{string.fu(poke), "/Forme"}
end
return string.interp(
link = table.concat{"[[", target, "|", formName, "]]"}
})
end
--
local function makeLinks(
local contexts = {
links = '<div class="small-text">${link}</div>',
blacklinks = '<div class="small-text black-text">${link}</div>',
plainlinks = '${link}',
for name, poke in pairs(t) do▼
}
poke[index] = table.map(poke.names, function(formName)▼
for index, context in pairs(contexts) do
return makeSingleLink(black, formName, name)▼
end)▼
▲ poke[index] = table.map(poke.names, function(formName)
▲ end)
end
end
end
-- Link creation should be done AFTER copying Pokémon with same forms, in order
-- to use the right name for the link
makeLinks()
t[25] = t.pikachu
|