Aller au contenu

Module:Utilisateur:SyntaxTerror/2

Une page de Wikipédia, l'encyclopédie libre.
Ceci est une version archivée de cette page, en date du 17 août 2013 à 01:32 et modifiée en dernier par SyntaxTerror (discuter | contributions) (Nouvelle page : local Langue = { } function Langue.traductionReference(frame) local args = ( frame.getParent and frame:getParent().args ) or frame or { } local lang1 = args[1] or args["l...). Elle peut contenir des erreurs, des inexactitudes ou des contenus vandalisés non présents dans la version actuelle.
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)

 Documentation[voir] [modifier] [historique] [purger]
local Langue = { }

function Langue.traductionReference(frame)
    local args = ( frame.getParent and frame:getParent().args ) or frame or { }
    local lang1 = args[1] or args["lang1"]
    if  lang1 == nil then
        return '<span style="color:red">Erreur dans {{Traduction/Référence}} : langue non précisée.</span> [[Catégorie:Page avec code de langue invalide]]' 
    end
    local lang2 = args[4] or args["lang2"]
    if  lang2 == nil then
        return '<span style="color:red">Erreur dans {{Traduction/Référence}} : 2e langue non précisée.</span> [[Catégorie:Page avec code de langue invalide]]' 
    end
        local art1 = args[2] or args["art1"]
    if  art1 == nil then
        return '<span style="color:red">Erreur dans {{Traduction/Référence}} : nom d’article manquant.</span>'
    end
        local art2 = args[5] or args["art2"]
    if  art2 == nil then
        return '<span style="color:red">Erreur dans {{Traduction/Référence}} : nom du 2e article manquant.</span>'
    end
        local id1 = args[3] or args["id1"]
    if  id1 == nil then
        return '<span style="color:red;">Erreur dans {{m|Traduction/Référence}} : oldid manquant.</span> [[Catégorie:Page avec un oldid invalide|Reference]]'
    end
        local id2 = args[6] or args["id1"]
    if  id2 == nil then
        return '<span style="color:red;">Erreur dans {{m|Traduction/Référence}} : 2e oldid manquant.</span> [[Catégorie:Page avec un oldid invalide|Reference]]'
    end
end
    
return Langue