Изменения
fix
return prev;
return prev;
end
end
end
end
local boundaries = nil;
local boundaries = nil;
if actualDateBoundariesProperties ~= nil then
if actualDateBoundariesProperties ~= nil then
boundaries = getTimeBoundariesFromProperties( context, actualDateBoundariesProperties );
boundaries = context.getTimeBoundariesFromProperties( context, actualDateBoundariesProperties );
if (boundaries == nil) and (property == 'P131' or property == 'P159') then
if (boundaries == nil) and (property == 'P131' or property == 'P159') then
boundaries = {os.time() * 1000, os.time() * 1000};
boundaries = {os.time() * 1000, os.time() * 1000};
result = result .. context.formatRefs( options, statement );
result = result .. context.formatRefs( options, statement );
end
end
if categorizeByPlace then
if not options.nocat and options.nocat ~= '' and categorizeByPlace then
if property == 'P19' then result = result .. getCategory( 'P1464', entriesToLookupCategory ); end
if property == 'P19' then result = result .. getCategory( 'P1464', entriesToLookupCategory ); end
if property == 'P20' then result = result .. getCategory( 'P1465', entriesToLookupCategory ); end
if property == 'P20' then result = result .. getCategory( 'P1465', entriesToLookupCategory ); end
-- get current of historic name of place
-- get current of historic name of place
function getLabel( context, entityId, boundaries )
function getLabel( context, entityId, boundaries )
return context.getLabelWithLang( context, {}, entityId, boundaries, historicNamesProperties, historicNamesPropertySelectors )
end
end
local countryEntityId = statement.mainsnak.datavalue.value.id;
local countryEntityId = statement.mainsnak.datavalue.value.id;
local endDateTimestamp = calculateEndDateTimestamp( context, options, statement );
local endDateTimestamp = calculateEndDateTimestamp( context, options, statement );
local boundaries = getTimeBoundariesFromProperties( context, {'P570', 'P577', 'P571'} );
local boundaries = context.getTimeBoundariesFromProperties( context, {'P570', 'P577', 'P571'} );
if deleteTwinAncestors( countryEntityId, string.upper(options.property), options.entity.id ) then
if deleteTwinAncestors( countryEntityId, string.upper(options.property), options.entity.id ) then
local flag = Flags.getFlag( context, countryEntityId, endDateTimestamp );
local flag = Flags.getFlag( context, countryEntityId, endDateTimestamp );
if flag then
if not options.noflag and options.noflag ~= '' and flag then
return flag .. ' <span class="country-name">' ..
return flag .. ' <span class="country-name">' ..
context.formatStatementDefault( context, countryOptions, statement ) ..
context.formatStatementDefault( context, countryOptions, statement ) ..