Module:Test: Difference between revisions

no edit summary
No edit summary
No edit summary
Line 23: Line 23:
         Lithia = 15
         Lithia = 15
     }
     }
    local lang = args.lang and ("/" .. args.lang) or ""


     local character = args[1]
     local character = args[1]
Line 32: Line 30:
     local transString = ""
     local transString = ""
     local link = args.link and (data == "base" and character or args.link) or ""
     local link = args.link and (data == "base" and character or args.link) or ""
    local lang = args.link and args.lang and ("/" .. args.lang) or ""


     if data == "base" then
     if data == "base" then
Line 47: Line 46:


     local image = mw.html.create('div'):addClass('image-cropped')
     local image = mw.html.create('div'):addClass('image-cropped')
     image:tag('div'):addClass('image-wrap'):wikitext("[[File:Character Face " .. CHARACTER_ID[character] .. "-FACE " .. pathIndex .. jobIndex .. transString .. ".png|||link=" .. link .. "]]")
     image:tag('div'):addClass('image-wrap'):wikitext("[[File:Character Face " .. CHARACTER_ID[character] .. "-FACE " .. pathIndex .. jobIndex .. transString .. ".png|link=" .. link .. lang .. "]]")


     return tostring(image)
     return tostring(image)