Module:Test : Différence entre versions

De Wiki'speria
Aller à : navigation, rechercher
(Fonction trad (exemple))
m
 
(2 révisions intermédiaires par le même utilisateur non affichées)
Ligne 1 : Ligne 1 :
 
local p = {}
 
local p = {}
function p.Esperia()
 
    return "Bonjour la team wiki"
 
end
 
  
function p.Traduction(frame)
+
function p.alerte1(frame)
     if frame.args[1] == "Lundi" then return "Monday" end
+
     local poids = tonumber(frame.args[1])
    if frame.args[1] == "Mardi" then return "Tuesday" end
+
     local reponse = "Votre poids est acceptable"
     if frame.args[1] == "Mercredi" then return "Wednesday" end
+
     if poids > 54 then
     if frame.args[1] == "Jeudi" then return "Thursday" end
+
        reponse = "Attention, vous commencez à grossir"
    if frame.args[1] == "Vendredi" then return "Friday" end
+
     end
     if frame.args[1] == "Samedi" then return "Saturday" end
+
     return reponse
     if frame.args[1] == "Dimanche" then return "Friday" end
 
 
end
 
end
  
 
return p
 
return p

Version actuelle datée du 6 août 2020 à 11:36

Ceci est un Module de Test ayant pour but la révision de l'Extension Scribunto par tous les utilisateurs. Référent Scribunto : Nonovian


local p = {}

function p.alerte1(frame)
    local poids = tonumber(frame.args[1])
    local reponse = "Votre poids est acceptable"
    if poids > 54 then
        reponse = "Attention, vous commencez à grossir"
    end
    return reponse
end

return p