وحدة:Wikidata/Software

من أرابيكا، الموسوعة الحرة

هذه هي النسخة الحالية من هذه الصفحة، وقام بتعديلها عبود السكاف (نقاش | مساهمات) في 20:45، 5 مايو 2016 (أنشأ الصفحة ب'local p = {} --Property:P348 function p.formatVersionClaim( context, options, statement ) local snak = context.formatSnak( options, statement.mainsnak ) if ( stat...'). العنوان الحالي (URL) هو وصلة دائمة لهذه النسخة.

(فرق) → نسخة أقدم | نسخة حالية (فرق) | نسخة أحدث ← (فرق)
اذهب إلى التنقل اذهب إلى البحث
local p = {}

--Property:P348
function p.formatVersionClaim( context, options, statement )
    local snak = context.formatSnak( options, statement.mainsnak )

	if ( statement.qualifiers ) then
		--Operation system
		if ( statement.qualifiers.P400 ) then
			snak = context.formatSnak( options, statement.qualifiers.P400[1] ) .. ': ' .. snak
		end

		--Name
		if ( statement.qualifiers.P1476 ) then
			snak = snak .. ' «' .. context.formatSnak( options, statement.qualifiers.P1476[1] ) .. '»'
		end

		--Date of release
		if ( statement.qualifiers.P577 ) then
			snak = snak .. ' (' .. context.formatSnak( options, statement.qualifiers.P577[1] ) .. ')'
		elseif ( statement.qualifiers.P585 ) then
			snak = snak .. ' (' .. context.formatSnak( options, statement.qualifiers.P585[1] ) .. ')'
		end
	end

	--References
    if ( options.references ) then
		snak = snak .. context.formatRefs( options, statement );
	end

    return snak
end

--Property:P1195
function p.formatExtension( context, options, value )
	return '<code>.' .. value .. '</code>'
end

return p