Diferencia entre revisiones de «Módulo:Clasificaciónvj»
mSin resumen de edición |
mSin resumen de edición |
||
Línea 10: | Línea 10: | ||
local enVariasLineas = require('Módulo:Formato texto').enVariasLineas |
local enVariasLineas = require('Módulo:Formato texto').enVariasLineas |
||
--:: |
--::Constantes |
||
local imagenesPEGI = { |
local imagenesPEGI = { |
||
Línea 21: | Línea 21: | ||
['18'] = '[[Archivo:Newpegi 18.svg|20px|PEGI 18]]', |
['18'] = '[[Archivo:Newpegi 18.svg|20px|PEGI 18]]', |
||
} |
} |
||
--::Cargar imágenes en base a la clasificación |
|||
local imagenesESRB = { |
local imagenesESRB = { |
||
['RP'] |
['RP'] = '[[Archivo:ESRB 2013 Rating Pending.svg|20px|Pendiente de clasificación]]', |
||
['Rate Pending'] |
['Rate Pending'] = '[[Archivo:ESRB 2013 Rating Pending.svg|20pxPendiente de clasificación]]', |
||
['Pendiente'] |
['Pendiente'] = '[[Archivo:ESRB 2013 Rating Pending.svg|20pxPendiente de clasificación]]', |
||
['EC'] |
['EC'] = '[[Archivo:ESRB 2013 Early Childhood.svg|20px|Niños pequeños]]', |
||
['K-A'] |
['K-A'] = '[[Archivo:ESRB - K-Av2.svg|20px|Kids to Adults]]', |
||
['Kids to Adults'] |
['Kids to Adults'] = '[[Archivo:ESRB - K-Av2.svg|20px|Kids to Adults]]', |
||
['E'] |
['E'] = '[[Archivo:ESRB 2013 Everyone.svg|20px|Todos]]', |
||
['Todos'] |
['Todos'] = '[[Archivo:ESRB 2013 Everyone.svg|20px|Todos]]', |
||
['Everyone'] |
['Everyone'] = '[[Archivo:ESRB 2013 Everyone.svg|20px|Todos]]', |
||
['E10'] |
['E10'] = '[[Archivo:ESRB 2013 Everyone 10+.svg|20px|Todos +10]]', |
||
['Todos +10'] |
['Todos +10'] = '[[Archivo:ESRB 2013 Everyone 10+.svg|20px|Todos +10]]', |
||
['Everyone +10'] |
['Everyone +10'] = '[[Archivo:ESRB 2013 Everyone 10+.svg|20px|Todos +10]]', |
||
['T'] |
['T'] = '[[Archivo:ESRB 2013 Teen.svg|20px|Adolescentes]]', |
||
['Adolescentes'] |
['Adolescentes'] = '[[Archivo:ESRB 2013 Teen.svg|20px|Adolescentes]]', |
||
['Teen'] |
['Teen'] = '[[Archivo:ESRB 2013 Teen.svg|20px|Adolescentes]]', |
||
['M'] |
['M'] = '[[Archivo:ESRB 2013 Mature.svg|20px|Maduro]]', |
||
['M+17'] |
['M+17'] = '[[Archivo:ESRB 2013 Mature.svg|20px|Maduro]]', |
||
['Maduro'] |
['Maduro'] = '[[Archivo:ESRB 2013 Mature.svg|20px|Maduro]]', |
||
['Mature'] |
['Mature'] = '[[Archivo:ESRB 2013 Mature.svg|20px|Maduro]]', |
||
['AO'] |
['AO'] = '[[Archivo:ESRB 2013 Adults Only.svg|20px|Sólo adultos]]', |
||
['Adultos'] |
['Adultos'] = '[[Archivo:ESRB 2013 Adults Only.svg|20px|Sólo adultos]]', |
||
['Adult Only'] |
['Adult Only'] = '[[Archivo:ESRB 2013 Adults Only.svg|20px|Sólo adultos]]', |
||
} |
} |
||
local imagenesCERO = { |
local imagenesCERO = { |
||
['SY'] |
['SY'] = '[[Archivo:CERO Shin Sa Yo Tei.svg|20px|CERO Shin Sa Yo Tei]]', |
||
['RP'] |
['RP'] = '[[Archivo:CERO Shin Sa Yo Tei.svg|20px|CERO Shin Sa Yo Tei]]', |
||
['KD'] |
['KD'] = '[[Archivo:CERO Kyouiku Deitabeisu.svg|20px|CERO Kyouiku Deitabeisu]]', |
||
['A'] |
['A'] = '[[Archivo:CERO A.svg|20px|CERO A]]', |
||
['B'] |
['B'] = '[[Archivo:CERO B.svg|20px|CERO B]]', |
||
['C'] |
['C'] = '[[Archivo:CERO C.svg|20px|CERO C]]', |
||
['D'] |
['D'] = '[[Archivo:CERO D.svg|20px|CERO D]]', |
||
['Z'] |
['Z'] = '[[Archivo:CERO Z.svg|20px|CERO Z]]', |
||
['KT'] |
['KT'] = '[[Archivo:CERO Kitei Teikikou.svg|20px|CERO Kitei Teikikou]]', |
||
} |
} |
||
local imagenesUSK = { |
local imagenesUSK = { |
||
['RP'] |
['RP'] = '[[Archivo:USK - Rating pending.svg|20px|USK Rating pending]]', |
||
['EA'] |
['EA'] = '[[Archivo:USK - Rating pending.svg|20px|USK Rating pending.svg]]', |
||
['0'] |
['0'] = '[[Archivo:Usk white.png|20pxUSK 0]]', |
||
['6'] |
['6'] = '[[Archivo:USK6 neu2.svg|20pxUSK 6]]', |
||
['12'] |
['12'] = '[[Archivo:USK12 neu2.svg|20pxUSK 12]]', |
||
['16'] |
['16'] = '[[Archivo:USK16 neu2.svg|20pxUSK 16]]', |
||
['18'] |
['18'] = '[[Archivo:USK18 neu2.svg|20pxUSK 18]]', |
||
} |
} |
||
local imagenesIFCO = { |
local imagenesIFCO = { |
||
['G'] |
['G'] = '[[Archivo:General home video.png|20px|IFCO G]]', |
||
['PG'] |
['PG'] = '[[Archivo:PG home video.png|20px|IFCO PG]]', |
||
['12'] |
['12'] = '[[Archivo:12 home video.png|20px|IFCO 12]]', |
||
['15'] |
['15'] = '[[Archivo:15 home video.png|20px|IFCO 15]]', |
||
['18'] |
['18'] = '[[Archivo:18 home video.png|20px|IFCO 18]]', |
||
} |
} |
||
local imagenesBBFC = { |
local imagenesBBFC = { |
||
['U'] |
['U'] = '[[Archivo:BBFC U 150px-height.png|20px|BBFC ]]', |
||
['PG'] |
['PG'] = '[[Archivo:BBFC PG 150px-height 0.png|20px|BBFC PG]]', |
||
['12'] |
['12'] = '[[Archivo:BBFC 12 150px-height 0.png|20px|BBFC 12]]', |
||
['15'] |
['15'] = '[[Archivo:BBFC 15.svg|22px|BBFC 15]]', |
||
['18'] |
['18'] = '[[Archivo:BBFC 18 150px-height 0.png|20px|BBFC 18]]', |
||
} |
} |
||
local imagenesOFLC = { |
local imagenesOFLC = { |
||
['E'] |
['E'] = '[[Archivo:OFLC small E.svg|20px|OFLC E]]', |
||
['G'] |
['G'] = '[[Archivo:Australian OFLC G tag logo.svg|20px|OFLC G]]', |
||
['PG'] |
['PG'] = '[[Archivo:PG classification tag from OFLC.svg|20px|OFLC PG]]', |
||
['M'] |
['M'] = '[[Archivo:Australian OFLC M logo.svg|20px|OFLC M]]', |
||
['MA'] |
['MA'] = '[[Archivo:MA 15+ classification tag from OFLC.svg|20px|OFLC MA]]', |
||
['R'] |
['R'] = '[[Archivo:OFLC small R18+.svg||OFLC R]]', |
||
['X'] |
['X'] = '[[Archivo:OFLC X 18 classification tag.svg|20px|OFLC X]]', |
||
} |
} |
||
local imagenesBARS = { |
local imagenesBARS = { |
||
['L'] |
['L'] = '[[Archivo:DJCTQ - L.svg|20px|BARS L]]', |
||
['10'] |
['10'] = '[[Archivo:DJCTQ - 10.svg|20px|BARS 10]]', |
||
['12'] |
['12'] = '[[Archivo:DJCTQ - 12.svg|20px|BARS 12]]', |
||
['14'] |
['14'] = '[[Archivo:DJCTQ - 14.svg|20px|BARS 14]]', |
||
['16'] |
['16'] = '[[Archivo:DJCTQ - 16.svg|20px|BARS 16]]', |
||
['18'] |
['18'] = '[[Archivo:DJCTQ - 18.svg|20px|BARS 18]]', |
||
} |
} |
||
local imagenesRARS = { |
local imagenesRARS = { |
||
['0'] |
['0'] = '[[Archivo:RARS rating 0+.svg|19px|RARS 0]]', |
||
['6'] |
['6'] = '[[Archivo:RARS rating 6+.svg|19px|RARS 6]]', |
||
['12'] |
['12'] = '[[Archivo:RARS rating 12+.svg|19px|RARS 12]]', |
||
['16'] |
['16'] = '[[Archivo:RARS rating 16+.svg|19px|RARS 16]]', |
||
['18'] |
['18'] = '[[Archivo:RARS rating 18+.svg|19px|RARS 18]]', |
||
} |
} |
||
local imagenesGRAC = { |
local imagenesGRAC = { |
||
['T'] |
['T'] = '[[Archivo:GRB Test.svg|19px|GRAC T]]', |
||
['All'] |
['All'] = '[[Archivo:GRB ALL.svg|19px|GRAC Todos]]', |
||
['12'] |
['12'] = '[[Archivo:GRB 12.svg|19px|GRAC 12]]', |
||
['15'] |
['15'] = '[[Archivo:GRB 15.svg|19px|GRAC 15]]', |
||
['18'] |
['18'] = '[[Archivo:GRB 18.svg|19px|GRAC 18]]', |
||
} |
} |
||
local imagenesGSRR = { |
local imagenesGSRR = { |
||
['G'] |
['G'] = '[[Archivo:GSRR G logo.svg|20px|GSRR G]]', |
||
['6'] |
['6'] = '[[Archivo:GSRR P logo.svg|20px|GSRR 6]]', |
||
['12'] |
['12'] = '[[Archivo:GSRR PG 12 logo.svg|20px|GSRR 12]]', |
||
['15'] |
['15'] = '[[Archivo:GSRR PG 15 logo.svg|20px|GSRR 15]]', |
||
['18'] |
['18'] = '[[Archivo:GSRR R logo.svg|20px|GSRR 18]]', |
||
} |
} |
||
local imagenesApple = { |
local imagenesApple = { |
||
['4'] |
['4'] = '[[Archivo:Apple rating 4+.svg|24px|Apple 4]]', |
||
['9'] |
['9'] = '[[Archivo:Apple rating 9+.svg|24px|Apple 9]]', |
||
['12'] |
['12'] = '[[Archivo:Apple rating 12+.svg|30px|Apple 12]]', |
||
['17'] |
['17'] = '[[Archivo:Apple rating 17+.svg|30px|Apple 17]]', |
||
} |
} |
||
Línea 169: | Línea 171: | ||
USK = (propiedad('P914', {uno='sí'})):sub(5,6) |
USK = (propiedad('P914', {uno='sí'})):sub(5,6) |
||
else |
else |
||
USK= argumento ['USK'] |
USK = argumento ['USK'] |
||
end |
end |
||
Línea 176: | Línea 178: | ||
PEGI = (propiedad('P908', {uno='sí'})):sub(6) |
PEGI = (propiedad('P908', {uno='sí'})):sub(6) |
||
else |
else |
||
BBFC = argumento ['BBFC'] |
|||
end |
end |
||
⚫ | |||
⚫ | |||
if propiedad('P908') then |
|||
BBFC = (propiedad('2629', {uno='sí'})):sub(13) |
|||
else |
|||
⚫ | |||
end |
|||
⚫ | |||
--OFLK |
|||
OFLC = argumento ['OFLC'] |
OFLC = argumento ['OFLC'] |
||
--BARS |
|||
BARS = argumento ['BARS'] |
BARS = argumento ['BARS'] |
||
--Apple |
|||
Apple = argumento ['Apple'] |
Apple = argumento ['Apple'] |
||
--GRAC |
|||
GRAC = argumento ['GRAC'] |
GRAC = argumento ['GRAC'] |
||
--RARS |
|||
RARS = argumento ['RARS'] |
RARS = argumento ['RARS'] |
||
--GSSR |
|||
GSRR = argumento ['GSRR'] |
GSRR = argumento ['GSRR'] |
||
--IFCO |
|||
IFCO = argumento ['IFCO'] |
IFCO = argumento ['IFCO'] |
||
⚫ | |||
⚫ | |||
--::/Valores |
--::/Valores |
Revisión del 20:00 18 mar 2019
A continuación se muestra la documentación transcluida desde la subpágina /doc. [salta a la caja de código]
Esta documentación explica el funcionamiento del módulo en un contexto técnico. Para instrucciones sobre el uso de la plantilla asociada, véase la documentación de la misma en {{Clasificaciónvj}}
.
Este módulo implementa la plantilla {{Clasificaciónvj}}
. Su propósito es obtener las clasificasciones de contenido tanto desde parámetros locales como desde Wikidata, así como también facilitar la ampliación de la lista de clasificaciones a través de un módulo separado (además der hacer el módulo principal más eficiente).
Funciones
p.clasificacionvj()
, la función pública destinada obtener los parámetros desde la plantilla y pasarlos ap.main()
.p.main()
, la función destinada a ser usada (o importada) en este u otros módulos. Analiza los parámetros y los formatea a través de las siguientes funciones.evaluar()
la función para concatetar el valor-imagen y establecer el formato.enVariasLineas()
copia de la funciónMódulo:Formato texto.enVariasLineas()
, modificado para satisfacer las listas con estilo CSS en tablas (table
,table-row
ytable-cell
).obtenerClasif()
función envoltura paraMódulo:Tablas.elemento()
, para obtener el valor de la propiedades de clasificaciones.
Agregar clasificaciones
Véase la documentación de Módulo:Clasificaciónvj/datos.
Notas
- Datos adicionales
Se había considerado agregar descriptor de contenido (P7367) y elementos interactivos (P8428) dentro de los valores de clasificación de contenido, por ejemplo:
Luego de debatirlo en el IRC, se decidió prescindir de dichas propiedades, por lo que solo se mostrará la clasificación.
- Cantidad de valores por cada descriptor
Hay casos en los que se puede llegar a haber más de un valor (almacenado en Wikidata), dependiendo de las clasificaciones asignadas a lo largo de la historia. Los íconos de descripciones se mostrarán uno al lado del otro, pero no se proveerá más información; se está debatiendo si es pertinente obtenerlo (un ejemplo)
Por favor, añade las categorías en la subpágina de documentación y los interwikis en Wikidata. Subpáginas de este módulo.
local z = {}
local argumentos -- Tabla de argumentos con los que se llama a la función
local argumento={} -- Argumentos eliminando los argumentos sin datos
local Entidad -- Tabla con los datos en Wikidata del libro.
local algunaPropiedadEnlazaWikidata
local ModuloArgumentos = require('Módulo:Argumentos')
local ModuloWikidata = require('Módulo:Wikidata')
local enVariasLineas = require('Módulo:Formato texto').enVariasLineas
--::Constantes
local imagenesPEGI = {
['3'] = '[[Archivo:Newpegi 3.svg|20px|PEGI 3]]',
['4'] = '[[Archivo:Newpegi 4+.svg|20px|PEGI 4+]]',
['6'] = '[[Archivo:Newpegi 6+.svg|20px|PEGI 6+]]',
['7'] = '[[Archivo:Newpegi 7.svg|20px|PEGI 7]]',
['12'] = '[[Archivo:Newpegi 12.svg|20px|PEGI 12]]',
['16'] = '[[Archivo:Newpegi 16.svg|20px|PEGI 16]]',
['18'] = '[[Archivo:Newpegi 18.svg|20px|PEGI 18]]',
}
--::Cargar imágenes en base a la clasificación
local imagenesESRB = {
['RP'] = '[[Archivo:ESRB 2013 Rating Pending.svg|20px|Pendiente de clasificación]]',
['Rate Pending'] = '[[Archivo:ESRB 2013 Rating Pending.svg|20pxPendiente de clasificación]]',
['Pendiente'] = '[[Archivo:ESRB 2013 Rating Pending.svg|20pxPendiente de clasificación]]',
['EC'] = '[[Archivo:ESRB 2013 Early Childhood.svg|20px|Niños pequeños]]',
['K-A'] = '[[Archivo:ESRB - K-Av2.svg|20px|Kids to Adults]]',
['Kids to Adults'] = '[[Archivo:ESRB - K-Av2.svg|20px|Kids to Adults]]',
['E'] = '[[Archivo:ESRB 2013 Everyone.svg|20px|Todos]]',
['Todos'] = '[[Archivo:ESRB 2013 Everyone.svg|20px|Todos]]',
['Everyone'] = '[[Archivo:ESRB 2013 Everyone.svg|20px|Todos]]',
['E10'] = '[[Archivo:ESRB 2013 Everyone 10+.svg|20px|Todos +10]]',
['Todos +10'] = '[[Archivo:ESRB 2013 Everyone 10+.svg|20px|Todos +10]]',
['Everyone +10'] = '[[Archivo:ESRB 2013 Everyone 10+.svg|20px|Todos +10]]',
['T'] = '[[Archivo:ESRB 2013 Teen.svg|20px|Adolescentes]]',
['Adolescentes'] = '[[Archivo:ESRB 2013 Teen.svg|20px|Adolescentes]]',
['Teen'] = '[[Archivo:ESRB 2013 Teen.svg|20px|Adolescentes]]',
['M'] = '[[Archivo:ESRB 2013 Mature.svg|20px|Maduro]]',
['M+17'] = '[[Archivo:ESRB 2013 Mature.svg|20px|Maduro]]',
['Maduro'] = '[[Archivo:ESRB 2013 Mature.svg|20px|Maduro]]',
['Mature'] = '[[Archivo:ESRB 2013 Mature.svg|20px|Maduro]]',
['AO'] = '[[Archivo:ESRB 2013 Adults Only.svg|20px|Sólo adultos]]',
['Adultos'] = '[[Archivo:ESRB 2013 Adults Only.svg|20px|Sólo adultos]]',
['Adult Only'] = '[[Archivo:ESRB 2013 Adults Only.svg|20px|Sólo adultos]]',
}
local imagenesCERO = {
['SY'] = '[[Archivo:CERO Shin Sa Yo Tei.svg|20px|CERO Shin Sa Yo Tei]]',
['RP'] = '[[Archivo:CERO Shin Sa Yo Tei.svg|20px|CERO Shin Sa Yo Tei]]',
['KD'] = '[[Archivo:CERO Kyouiku Deitabeisu.svg|20px|CERO Kyouiku Deitabeisu]]',
['A'] = '[[Archivo:CERO A.svg|20px|CERO A]]',
['B'] = '[[Archivo:CERO B.svg|20px|CERO B]]',
['C'] = '[[Archivo:CERO C.svg|20px|CERO C]]',
['D'] = '[[Archivo:CERO D.svg|20px|CERO D]]',
['Z'] = '[[Archivo:CERO Z.svg|20px|CERO Z]]',
['KT'] = '[[Archivo:CERO Kitei Teikikou.svg|20px|CERO Kitei Teikikou]]',
}
local imagenesUSK = {
['RP'] = '[[Archivo:USK - Rating pending.svg|20px|USK Rating pending]]',
['EA'] = '[[Archivo:USK - Rating pending.svg|20px|USK Rating pending.svg]]',
['0'] = '[[Archivo:Usk white.png|20pxUSK 0]]',
['6'] = '[[Archivo:USK6 neu2.svg|20pxUSK 6]]',
['12'] = '[[Archivo:USK12 neu2.svg|20pxUSK 12]]',
['16'] = '[[Archivo:USK16 neu2.svg|20pxUSK 16]]',
['18'] = '[[Archivo:USK18 neu2.svg|20pxUSK 18]]',
}
local imagenesIFCO = {
['G'] = '[[Archivo:General home video.png|20px|IFCO G]]',
['PG'] = '[[Archivo:PG home video.png|20px|IFCO PG]]',
['12'] = '[[Archivo:12 home video.png|20px|IFCO 12]]',
['15'] = '[[Archivo:15 home video.png|20px|IFCO 15]]',
['18'] = '[[Archivo:18 home video.png|20px|IFCO 18]]',
}
local imagenesBBFC = {
['U'] = '[[Archivo:BBFC U 150px-height.png|20px|BBFC ]]',
['PG'] = '[[Archivo:BBFC PG 150px-height 0.png|20px|BBFC PG]]',
['12'] = '[[Archivo:BBFC 12 150px-height 0.png|20px|BBFC 12]]',
['15'] = '[[Archivo:BBFC 15.svg|22px|BBFC 15]]',
['18'] = '[[Archivo:BBFC 18 150px-height 0.png|20px|BBFC 18]]',
}
local imagenesOFLC = {
['E'] = '[[Archivo:OFLC small E.svg|20px|OFLC E]]',
['G'] = '[[Archivo:Australian OFLC G tag logo.svg|20px|OFLC G]]',
['PG'] = '[[Archivo:PG classification tag from OFLC.svg|20px|OFLC PG]]',
['M'] = '[[Archivo:Australian OFLC M logo.svg|20px|OFLC M]]',
['MA'] = '[[Archivo:MA 15+ classification tag from OFLC.svg|20px|OFLC MA]]',
['R'] = '[[Archivo:OFLC small R18+.svg||OFLC R]]',
['X'] = '[[Archivo:OFLC X 18 classification tag.svg|20px|OFLC X]]',
}
local imagenesBARS = {
['L'] = '[[Archivo:DJCTQ - L.svg|20px|BARS L]]',
['10'] = '[[Archivo:DJCTQ - 10.svg|20px|BARS 10]]',
['12'] = '[[Archivo:DJCTQ - 12.svg|20px|BARS 12]]',
['14'] = '[[Archivo:DJCTQ - 14.svg|20px|BARS 14]]',
['16'] = '[[Archivo:DJCTQ - 16.svg|20px|BARS 16]]',
['18'] = '[[Archivo:DJCTQ - 18.svg|20px|BARS 18]]',
}
local imagenesRARS = {
['0'] = '[[Archivo:RARS rating 0+.svg|19px|RARS 0]]',
['6'] = '[[Archivo:RARS rating 6+.svg|19px|RARS 6]]',
['12'] = '[[Archivo:RARS rating 12+.svg|19px|RARS 12]]',
['16'] = '[[Archivo:RARS rating 16+.svg|19px|RARS 16]]',
['18'] = '[[Archivo:RARS rating 18+.svg|19px|RARS 18]]',
}
local imagenesGRAC = {
['T'] = '[[Archivo:GRB Test.svg|19px|GRAC T]]',
['All'] = '[[Archivo:GRB ALL.svg|19px|GRAC Todos]]',
['12'] = '[[Archivo:GRB 12.svg|19px|GRAC 12]]',
['15'] = '[[Archivo:GRB 15.svg|19px|GRAC 15]]',
['18'] = '[[Archivo:GRB 18.svg|19px|GRAC 18]]',
}
local imagenesGSRR = {
['G'] = '[[Archivo:GSRR G logo.svg|20px|GSRR G]]',
['6'] = '[[Archivo:GSRR P logo.svg|20px|GSRR 6]]',
['12'] = '[[Archivo:GSRR PG 12 logo.svg|20px|GSRR 12]]',
['15'] = '[[Archivo:GSRR PG 15 logo.svg|20px|GSRR 15]]',
['18'] = '[[Archivo:GSRR R logo.svg|20px|GSRR 18]]',
}
local imagenesApple = {
['4'] = '[[Archivo:Apple rating 4+.svg|24px|Apple 4]]',
['9'] = '[[Archivo:Apple rating 9+.svg|24px|Apple 9]]',
['12'] = '[[Archivo:Apple rating 12+.svg|30px|Apple 12]]',
['17'] = '[[Archivo:Apple rating 17+.svg|30px|Apple 17]]',
}
function z.main(frame)
ModuloWikidata:setFrame(frame)
local argumento = ModuloArgumentos.obtenerArgumentosConValor(frame)
Entidad = mw.wikibase.getEntityObject() or {}
--::Valores con dato disponible en Wikidata
--CERO
if propiedad('P853') then
CERO = ((propiedad('P853', {uno='sí'})) ):sub(1,1)
else
CERO = argumento['CERO']
end
--ESRB
if propiedad('P852') then
ESRB = ((propiedad('P852', {uno='sí'})) ):sub(1)
else
ESRB = argumento ['ESRB']
end
--USK
if propiedad('P914') then
USK = (propiedad('P914', {uno='sí'})):sub(5,6)
else
USK = argumento ['USK']
end
--PEGI
if propiedad('P908') then
PEGI = (propiedad('P908', {uno='sí'})):sub(6)
else
BBFC = argumento ['BBFC']
end
--BBFC
if propiedad('P908') then
BBFC = (propiedad('2629', {uno='sí'})):sub(13)
else
BBFC = argumento['BBFC']
end
--::Valores sin dato disponible en Wikidata
OFLC = argumento ['OFLC']
BARS = argumento ['BARS']
Apple = argumento ['Apple']
GRAC = argumento ['GRAC']
RARS = argumento ['RARS']
GSRR = argumento ['GSRR']
IFCO = argumento ['IFCO']
--::/Valores
return enVariasLineas({
evaluar('PEGI', PEGI , imagenesPEGI),
evaluar('ESRB', ESRB, imagenesESRB),
evaluar('CERO', CERO, imagenesCERO),
evaluar('Unterhaltungssoftware Selbstkontrolle|USK', USK, imagenesUSK),
evaluar('IFCO', IFCO, imagenesIFCO),
evaluar('BBFC', BBFC, imagenesBBFC),
evaluar('OFLC', OFLC, imagenesOFLC),
evaluar('BARS', BARS, imagenesBARS),
evaluar('RARS', RARS, imagenesRARS),
evaluar('GRAC', GRAC, imagenesGRAC),
evaluar('GSRR', GSRR, imagenesGSRR),
evaluar('App Store|Apple', Apple, imagenesApple)
})
end
function evaluar(literal, valor, imagenes, nota)
if not valor then
return
end
local imagen
if imagenes then
imagen = imagenes[valor]
end
if imagen and nota then
return '<b> [[' .. literal .. ']] </b>' .. imagen .. '<small>' .. nota .. '</small>'
elseif imagen then
return '<b> [[' .. literal .. ']] </b>' .. imagen
else
return '<b> [[' .. literal .. ']] </b>' .. valor
end
end
function propiedad(idPropiedad,opciones)
if Entidad and Entidad.claims and Entidad.claims[idPropiedad] then
if not opciones then
opciones = {}
end
opciones['propiedad'] = idPropiedad
valorPropiedad = ModuloWikidata.getPropiedad(opciones,Entidad.claims[idPropiedad])
if valorPropiedad and valorPropiedad:match('%[%[:d:') then
algunaPropiedadEnlazaWikidata = true
end
return valorPropiedad
end
end
return z