Diferencia entre revisiones de «Módulo:Ficha de videojuego»

Contenido eliminado Contenido añadido
Cambio en cómo se muestra la etiqueta respecto al texto en la fecha de lanzamiento
Más comprobaciones necesarias (que por lo visto no se hacía ninguna)
(No se muestra una edición intermedia del mismo usuario)
Línea 78:
-- Software
local Motor = argumento['motor'] or propiedad('P408') or ''
local Version = (function()
local Ver = argumento['versión'] or argumento['version'] or propiedad('P348', {['calificador'] = 'P577', ['uno'] = 'último', ['ordenar'] = 'por fecha'})
local VerFecha = argumento['versión fecha'] or argumento['version fecha']
if Ver andthen
if VerFecha then
return Version = Ver .. '<small>(' .. VerFecha .. ')</small>' end
else
return Ver
return Version = Ver
end)() or ''
end
local VersionDesa = (function()
else
local Version = argumento['versión desarrollo'] or argumento['versión desarrollo']
Version = ''
local VersionFecha = argumento['versión desarrollo fecha'] or argumento['version desarrollo fecha']
end
if Version and VersionFecha then return Version .. '<small>(' .. VersionFecha .. ')</small>' end
local VersionDesa = (function()
return Version
Ver local Version = argumento['versión desarrollo'] or argumento['versión desarrollo']
end)() or ''
VerFecha local VersionFecha = argumento['versión desarrollo fecha'] or argumento['version desarrollo fecha']
if Ver then
if VerFecha then
VersionDesa = Ver .. '<small>(' .. VerFecha .. ')</small>'
else
VersionDesa = Ver
end
else
VersionDesa = ''
end
local Plataformas = argumento['plataforma'] or argumento['plataformas'] or propiedad('P400') or ''
Línea 289 ⟶ 301:
if argumento[1] and argumento[2] and argumento[3] then
local Valor = '<li style="display:table-row"><span style="display:table-cell;font-size:70%;vertical-align:top">[[' .. argumento[1] .. '|' .. argumento[2] .. ']]</span><span style="display:table-cell">' .. argumento[3] .. '</span></li>'
local Categoria = (function()
if argumento[4] then
Categoria return= '[[Categoría:Wikipedia:Artículos que transcluyen Plantilla:Lanzamientovj usando una sintaxis incorrecta]]' end
else
returnCategoria = '[[Categoría:Wikipedia:Artículos que transcluyen Plantilla:Lanzamientovj usando la sintaxis de parámetros posicionales]]'
end)()
table.insert(Valores, Valor..Categoria)
 
Línea 304 ⟶ 318:
else
for k, v in pairs(LanzamientoDatos) do
local Valor =
for kk, vv in pairs(v[2]) do
(function()
if argumento[vv] then return argumento[vv] end
for kk, vv in pairs(v[2]) do
ifValor argumento[vv] then return= argumento[vv] end
break
end)()
end)()
if not Valor then
for kk, vv in pairs((v[3] or {})) do
if argumento[vv] then
Valor = argumento[vv]
end
end)()
or end
(function()
for kk, vv in pairs((v[3] or {})) do
if argumento[vv] then return argumento[vv] end
end
end)()
if Valor then
if v[1] == 'DESC' then
Etiqueta= (function()
ifEtiqueta v[1] == 'DESC' then return '<abbr title="Fecha desconocida">?</abbr>' end
ifelseif v[1] == 'WW' then
Etiqueta return= '<abbr title="Lanzamiento mundial">WW</abbr>' end
ifelseif v[4] then
Etiqueta return= '[[' .. v[4] .. '|' .. v[1] ..']]' end
returnelseif v[1] then
Etiqueta = (function()v[1]
end)()
else
table.insert(Valores, '<li style="display:table-row"><span style="display:table-cell;font-size:70%;vertical-align:top">' .. Etiqueta .. '</span><span style="display:table-cell">'.. Valor ..'</span></li>')
Etiqueta = (function()nil
end)()
if Etiqueta then
table.insert(Valores, '<li style="display:table-row"><span style="display:table-cell;font-size:70%;vertical-align:top">' .. Etiqueta .. '</span><span style="display:table-cell">'.. Valor ..'</span></li>')
end)()
end
end
Línea 339 ⟶ 362:
function Lanzamientovj()
local Valores = {}
if not Entidad then return end
local Obj = elementoTabla(Entidad, 'claims', 'P577')
if Obj then
for k, v in pairs(Obj) do
local Valor = FormatoFechaHora(elementoTabla(v, 'mainsnak', 'datavalue', 'value'), {['enlace']='no'})
local Region = elementoTabla(v, 'qualifiers', 'P291', 1, 'datavalue', 'value', 'id')
local Etiqueta
Etiqueta= (function()
if Region then
for kk, vv in pairs(LanzamientoDatos) do
if vv and vv[3] and (Region == vv[3][1] or Region == vv[3][2] or Region == vv[3][3]) then
if returnvv[4] and vv[1] then
Etiqueta = '[[' .. vv[4] .. '|' .. vv[1] ..']]' end
elseif vv[1] then
Etiqueta = vv[1]
end)()
end
end
else
returnEtiqueta = '<abbr title="Lanzamiento mundial">WW</abbr>'
end)() or ''
end
table.insert(Valores, '<li style="display:table-row"><span style="display:table-cell;font-size:70%;vertical-align:top">' .. Etiqueta .. '</span><span style="display:table-cell">'.. Valor ..'</span></li>')
if Etiqueta and Valor then
table.insert(Valores, '<li style="display:table-row"><span style="display:table-cell;font-size:70%;vertical-align:top">' .. Etiqueta .. '</span><span style="display:table-cell">'.. Valor ..'</span></li>')
end
end
end
Línea 401 ⟶ 432:
local Calificador = opciones['calificador']
 
local Obj = (function()
local Obj = (function()Obj2
local ObjObj3 = elementoTabla(entidad, 'claims', idPropiedad)
if type(ValorPosicional) == 'number' then returnObj2 = elementoTabla(ObjObj3, ValorPosicional) end
if ValorPosicional == 'último' then returnObj2 = elementoTabla(ObjObj3, #ObjObj3) end
end)()
 
if Calificador then
local Obj3 = elementoTabla(Obj2, 'qualifiers', Calificador)
Obj = (function()
localif Objtype(ValorPosicionalCalif) == 'number' then Obj2 = elementoTabla(ObjObj3, 'qualifiers', CalificadorValorPosicionalCalif) end
if type(ValorPosicionalCalif) == 'numberúltimo' then returnObj2 = elementoTabla(ObjObj3, ValorPosicionalCalif#Obj3) end
end
if ValorPosicionalCalif == 'último' then return elementoTabla(Obj, #Obj) end
returnObj = elementoTabla(ObjObj2, 'mainsnak')
end)()
end
return elementoTabla(Obj, 'mainsnak')
end)()
 
Tipo = elementoTabla(Obj, 'datavalue', 'type')