Это временная версия статьи Модуль:Возрастные ограничения. |
Шаблоны {{ESRB}}, {{PEGI}}, {{ACB}}, {{OFLC}}, {{Рейтинги игры}}
Свойства викиданных: рейтинг ESRB (P852), рейтинг PEGI (P908), рейтинг BBFC (P2629), рейтинг CERO (P853), рейтинг USK (P914), рейтинг GSRR (P916)
local p = {}
function p.formatRatingClaim( context, options, statement )
local snak = context.formatSnak( options, statement.mainsnak )
if ( statement.qualifiers ) then
if ( statement.qualifiers.P852 ) then
snak = context.formatSnak( options, statement.qualifiers.P852[1] ) .. ': ' .. snak
elseif ( statement.qualifiers.P853 ) then
snak = context.formatSnak( options, statement.qualifiers.P853[1] ) .. ': ' .. snak
elseif ( statement.qualifiers.P908 ) then
snak = context.formatSnak( options, statement.qualifiers.P908[1] ) .. ': ' .. snak
elseif ( statement.qualifiers.P914 ) then
snak = context.formatSnak( options, statement.qualifiers.P914[1] ) .. ': ' .. snak
elseif ( statement.qualifiers.P916 ) then
snak = context.formatSnak( options, statement.qualifiers.P916[1] ) .. ': ' .. snak
elseif ( statement.qualifiers.P2629 ) then
snak = context.formatSnak( options, statement.qualifiers.P2629[1] ) .. ': ' .. snak
end
end
--References
if ( options.references ) then
snak = snak .. context.formatRefs( options, statement );
end
return snak
end
return p