Модуль:Wikidata:версиослэн висъяськемзы

Пушкесэз ӵушемын Пушкесэз ватсамын
без {{не переведено 5}}
Тупатонлэн валэктонэз ӧвӧл
750-тӥ чур:
end
 
local resultreferences = ''{};
if ( statement.references ) then
 
local allReferences = statement.references;
local hasPreferred = false;
local displayCount = 0;
for _, reference in pairs( statement.references ) do
if ( reference.snaks
Гож 760 ⟶ 761:
and reference.snaks.P248[1]
and reference.snaks.P248[1].datavalue
and reference.snaks.P248[1].datavalue.value["numeric-.id"] ) then
local entityId = "Q" .. reference.snaks.P248[1].datavalue.value["numeric-.id"];
if ( preferredSources[entityId] ) then
hasPreferred = true;
Гож 775 ⟶ 776:
and reference.snaks.P248[1]
and reference.snaks.P248[1].datavalue
and reference.snaks.P248[1].datavalue.value["numeric-.id"] ) then
local entityId = "Q" .. reference.snaks.P248[1].datavalue.value["numeric-.id"];
if ( deprecatedSources[entityId] ) then
display = false;
Гож 782 ⟶ 783:
end
end
if ( display == true ) then
if ( displayCount > 2 ) then
result = result .. moduleSources.renderReference( g_frame, options.entity, reference );
if ( options.entity and options.property ) then
table.remove( references );
local moreReferences = '<sup>[[d:' .. options.entity.id .. '#' .. string.upper( options.property ) .. '|[…]]]</sup>';
table.insert( references, moreReferences );
end
break;
end;
resultlocal refText = result .. moduleSources.renderReference( g_frame, options.entity, reference );
if ( refText ~= '' ) then
table.insert( references, refText );
displayCount = displayCount + 1;
end
end
end
end
return resulttable.concat( references );
end