Модуль:Wikidata/Places: відмінності між версіями

[неперевірена версія][перевірена версія]
Вилучено вміст Додано вміст
багато нарікань на відсутність виводу адмінподілу. Андріївка, Росія — nonsense. b} вимкнув категоризацію до вищіх адмінодиниць. що далі?
Скасовано останні 2 редагування (Shmurak і 94.178.29.220) і відновлено версію 23122249 Shmurak
Рядок 180:
local hasAdditionalQualifiers = false;
if ( statement.qualifiers ) then
--parent divisions
if ( statement.qualifiers.P131 ) then
for i, qualifier in ipairs( statement.qualifiers.P131 ) do
local parentOptions = options;
-- local parentOptions = mw.clone( options );
parentOptions['text'] = getLabel( context, qualifier, boundaries );
 
result = result .. ', ' .. context.formatSnak( parentOptions, qualifier );
insertFromSnak( qualifier, entriesToLookupCategory )
hasAdditionalQualifiers = true;
end
end
 
--country
if ( statement.qualifiers.P17 ) then
Рядок 219 ⟶ 206:
if ( boundaries ) then
local entityOptions = options;
-- local parentOptionsentityOptions = mw.clone( options );
entityOptions['text'] = getLabel( context, entity, boundaries );
baseResult = context.formatSnak( entityOptions, statement.mainsnak, circumstances );
Рядок 278 ⟶ 266:
 
local parentOptions = options;
-- local parentOptions = mw.clone( options );
parentOptions['text'] = getLabel( context, parentEntities[i], boundaries );
 
Рядок 434 ⟶ 423:
local boundaries = getTimeBoundariesFromProperties( context, {'P570', 'P577', 'P571'} );
 
local countryOptions = mw.clone( options );
if not countryOptions['text'] or countryOptions['text'] == '' then
countryOptions['text'] = getLabel( context, countryEntity, boundaries );