Sivun "Moduuli:Universal infocard/config" versielöin eroloi

On otettu Wikipedii-späi
Syväindö on otettu iäre Syväindö on ližätty
Kawtaj (pagin | kohendukset)
pEi ole yhtehveduo kohendukses
Kawtaj (pagin | kohendukset)
pEi ole yhtehveduo kohendukses
 
Rivi 50: Rivi 50:
error = {
error = {
emptyWikidataEntity = 'Пустой элемент Викиданных',
emptyWikidataEntity = 'Пустой элемент Викиданных',
noWikidataEntity = 'Отсутствует элемент Викиданных',
noWikidataEntity = 'Wikitiedoloin alguaineh ei ole',
},
},
dataName = 'Универсальная карточка',
dataName = 'Универсальная карточка',

Nygöine versii 11. Oraskuuta 2020 kello 13.53

Tämän moduulin ohjeistuksen voi tehdä sivulle Moduuli:Universal infocard/config/ohje

function mapFunction( args )
	local entity = mw.wikibase.getEntity( args.entityId );
	if not entity or
		not entity.claims or
		not entity.claims.P17 or
		not entity.claims.P17[ 1 ] or
		not entity.claims.P17[ 1 ].mainsnak or
		entity.claims.P17[ 1 ].mainsnak.snaktype ~= 'value'
	then
		return '';
	end
	local country = mw.wikibase.getLabel( entity.claims.P17[ 1 ].mainsnak.datavalue.value.id );
	return args.frame:expandTemplate{
		title = 'wikidata-coords',
		args = {
			'EK/Kartal sijaičendat',
			['Karelian nimi'] = args.frame:expandTemplate{
				title = 'infobox/nimi',
				args = { from = args.entityId }
			},
			['mua'] = country,
			from = args.entityId,
		}
	};
end

return {
	templates = {
		default = 'Wikidata',
		title = 'infobox/nimi',
		title_Q5 = 'infobox/nimi',
		map = mapFunction,
		P1559 = 'infobox/alguperäine nimi',
		P1705 = 'infobox/alguperäine nimi',
		P373 = 'infobox/Wikiskluadu',
	},
	styles = {
		-- infobox = 'width:23em; text-align:left; font-size:88%; line-height:1.5em',
		-- error = 'width:23em; text-align:left; font-size:88%; line-height:1.5em; background:#fee7e6; border-color:#b32424',
		error = 'background:#fee7e6; border-color:#b32424',
		title = 'background:#cfe3ff; font-weight:bold',
		-- original = 'font-style:oblique',
		label = 'width:9em;',
		-- text = '',
		-- media = '',
		-- split = 'vertical-align:middle; text-align:center',
		footer = 'background:#dcebff',
	},
	i18n = {
		error = {
			emptyWikidataEntity = 'Пустой элемент Викиданных',
			noWikidataEntity = 'Wikitiedoloin alguaineh ei ole',
		},
		dataName = 'Универсальная карточка',
	},
	categories = {
		['few-properties-shown'] = 'Статьи с универсальной карточкой, отображающей мало свойств',
	},
	skipPropertyIds = {
		P21 = true, -- пол почти никогда не отображается в наших карточках
		P31 = true, -- это…
		P41 = true,
		P94 = true,
		P121 = true,
		P140 = true,
		P163 = true,
		P172 = true,
		P237 = true,
		P279 = true, -- подкласс
		P361 = true, -- часть от
		P366 = true,
		P370 = true,
		P373 = true,
		P443 = true,
		P460 = true,
		P487 = true,
		P527 = true,
		P551 = true,
		P578 = true,
		P625 = true,
		P734 = true,
		P735 = true,
		P793 = true,
		P800 = true,
		P828 = true,
		P855 = true,
		P910 = true,
		P935 = true,
		P948 = true,
		P972 = true,
		P989 = true,
		P1036 = true,
		P1038 = true,
		P1151 = true,
		P1269 = true,
		P1282 = true,
		P1290 = true,
		P1329 = true,
	--	P1332 = true, крайние точки географического объекта - вероятно, нужны, а там посмотрим
	--	P1333 = true,
	--	P1334 = true,
	--	P1335 = true,
		P1343 = true,
		P1411 = true,
		P1412 = true,
		P1424 = true,
		P1461 = true,
		P1464 = true,
		P1465 = true,
		P1482 = true,
		P1535 = true,
		P1537 = true,
		P1542 = true,
		P1552 = true,
		P1557 = true,
		P1559 = true,
		P1612 = true,
		P1705 = true,
		P1709 = true,
		P1792 = true,
		P1814 = true,
		P1889 = true,
		P1971 = true,
		P1943 = true,
		P2093 = true,
		P2184 = true,
		P2283 = true,
		P2354 = true,
		P2368 = true,
		P2521 = true,
		P2536 = true,
		P2670 = true,
		P2888 = true,
		P2868 = true,
		P2900 = true,
		P2919 = true,
		P2959 = true,
		P3095 = true,
		P3321 = true,
		P3448 = true,
		P3722 = true,
		P3876 = true,
		P3921 = true,
		P4839 = true,
		P5008 = true,
		P5125 = true,
	},
};