Modification de Module:Data
Aller à la navigation
Aller à la recherche
La modification peut être annulée. Veuillez vérifier les différences ci-dessous pour voir si c’est bien ce que vous voulez faire, puis publier ces changements pour finaliser l’annulation de cette modification.
Version actuelle | Votre texte | ||
Ligne 98 : | Ligne 98 : | ||
function p.premiertype(frame) | function p.premiertype(frame) | ||
local pokemon = frame | local pokemon = frame:preprocess("{{PAGENAME}}") | ||
local form | local form | ||
Ligne 113 : | Ligne 113 : | ||
then pokemon = mw.ustring.gsub(pokemon, replacing, "") | then pokemon = mw.ustring.gsub(pokemon, replacing, "") | ||
form = replaced | form = replaced | ||
return pokemon | |||
end | end | ||
end | end | ||
if true then return pokemon end | |||
local form_arg = frame.args["forme"] | local form_arg = frame.args["forme"] | ||
if form_arg == nil or form_arg == "" | if form_arg == nil or form_arg == "" | ||
Ligne 125 : | Ligne 126 : | ||
end | end | ||
local datatypes = require("Module:Data/TypesPokémon") | |||
local types = datatypes[pokemon] | local types = datatypes[pokemon] | ||
if types == nil | if types == nil | ||
then return "" | then return "Pokémon " .. pokemon .. " non trouvé." | ||
end | end | ||
local types_form = types[form] | local types_form = types[form] | ||
if types_form == nil | if types_form == nil | ||
then return "" | then return "Forme non trouvée." | ||
end | end | ||