Module:کارډ/کينډۍ/af420

د ويکيپېډيا، وړیا پوهنغونډ له خوا

لاسوند لپاره ددې موډيول کېدای سی په Module:کارډ/کينډۍ/af420/لاسوند کي وي

local generic = require( 'Module:کارډ/آلې' )
local org = require( 'Module:کارډ/آلې/بنسټونه' )
local building = require( 'Module:کارډ/آلې/ځای' )

local localdata = require 'Module:کارډ/ډاټا'

local datef = require 'Module:Date'
local wd = require('Module:Wikidata.Ca')

local dStart = localdata['البداية'] or localdata['بداية'] or localdata['date_formed']
if(not dStart and localdata.item )	then
				dStart = wd.claim({ property = 'P571 OR P580', item = localdata.item.id,editicon='false',formatting='c'})
end
local dEnd = localdata['النهاية'] or localdata['نهاية']  or localdata['date_dissolved'] 
if(not dEnd and localdata.item )	then 
				dEnd = wd.claim({ property = 'P576 OR P582', item = localdata.item.id,editicon='false',formatting='c'})
end

return {
	maincolor = '#80B0E0',
	thirdcolor = '#FFFFFF',
	secondcolor = '#B4B9C3',

	wikimod = 'Wikidata.Ca',

	parts = {
		generic.title(),
        {type = 'subtitle', 
            value = function ( localdata )
                    local val = localdata['الاسم الأصلي'] or localdata['اسم اصلي'] or localdata['native_name']
                    if val and localdata['لغة_الاسم_الأصلي']  then
                        return mw.ustring.format('%s <span class="nickname" lang="%s">%s</span>'
                            , val 
                            , localdata['الاسم_باللغة_الاصلية'] or ''
                            , localdata['لغة_الاسم_الأصلي']
                        )
                    end
                    return val
                end,
           wikidata= {property = 'P1559 OR P1476 OR P1448 OR P1705', list = 'notlang', conjunction = "<br />"
                   ,listrank='bestrank' ,formatting = '$text {{Language icon|NoCat=y|$language}}'}
        },

		generic.mainimage(),
		{type='table', title = 'معلومات عامة', rows = {
		    {type = 'row', label = 'البلد', value = {'بلد','country'}, wikidata= {property = 'P17'}},
			{ type = 'row', label = 'الاختصاص', value = {'اختصاص','jurisdiction'}, property = 'P1001'},
			{ type = 'row', label = '[[نظام الحكم]]', value = {'نظام الحكم','النظام'},    },
			{ type = 'row', label = 'النص التنظيمي', value = {'نص تنظيمي','regulatory_text'}, wikidata= {property = 'P92'   , conjunction='<br />'}},
			{ type = 'row', label = 'الهيئات الفرعية', value = {'هيئات','subsidiary'}, wikidata= {property = 'P355', conjunction='<br />'}},
			{ type = 'row', label = 'المكونات', value = {'مكونات','parts'}, wikidata= {property = 'P527', conjunction='<br />'}},

			{ type = 'row'
				, label = {'تسمية رأس الدولة'	,'عنوان رئيس الدولة'} 
				, defaultlabel = 'قائد&nbsp;الدولة'
				, value = {'رأس الدولة','state_head'}
				,  property = 'P35'},
			{ type = 'row'
				, label = { 'عنوان القائد', 'تسمية رأس الحكومة'	}
				, defaultlabel = 'رئيس&nbsp;الحكومة'
				, value = {'رئيس الحكومة','قائد','government_head','leader_title'}
				, wikidata={property = 'P6 OR P488 OR P1037', showDate='true', listrank='bestrank'}},
			{ type = 'row', label = 'الانتخابات', value = {'الانتخاب'}, wikidata={property = 'P2715', conjunction='<br />'}},
			{ type = 'row', label = 'الهيئة التشريعية', value = {'الهيئة التشريعية'}, property = 'P2937'},
			{ type = 'row', label = 'التكوين' 
				, value = {'البداية' ,'بداية','date_formed'}
				, wikidata = { property = 'P571 OR P580'}
			},
			{ type = 'row', label = 'النهاية'  
			  ,value = {'النهاية'	,'نهاية'  ,'date_dissolved'}
			  , wikidata = { property = 'P576 OR P582', formatting='table', qualifier='P576 OR /P1534', rowformat='$0$R0 $1', rowsubformat1='<small><br />السبب: $1</small>'}
			},
			{ type = 'row', label = 'المدة',   value = {'مدة'}
			  , wikidata = function() 
				if(dStart == nil) then return nil; end
				local t1,date1 = datef.separationJourMoisAnnee(dStart)
				if(not t1) then return nil end
				if(dEnd) then
					local t2,date2 = datef.separationJourMoisAnnee(dEnd)
					if(t2) then 
						return require( 'وحدة:مدة' )._duree( {date1.jour, date1.numMois,date1.annee  
						, date2.jour, date2.numMois,date2.annee})
					end
				end 
				return require( 'وحدة:مدة' )._duree({ date1.jour, date1.numMois,date1.annee   })
			end
			, wikidata2 ={ property = 'P2047', formatting='unitcode'}
			},

			org.headquarters(),
			generic.website(),
		}},
		{type = 'table', title ='التركيبة الأساسية', rows = {
			{ type = 'row', label = '[[حكومة ائتلافية|الأحزاب]]', value = {'الائتلاف','ائتلاف'}},
			{ type = 'row', label = '[[ حكومة وحدة وطنية |وحدة]]', value = {'وحدة'}},
			{ type = 'row', label = 'الوزراء', value = {'الوزراء','ministries'}},
			{ type = 'row', label = 'كتاب الدولة', value = {'كتاب الدولة'}},
			{ type = 'row', label = 'رجال',	value = {'رجال'},  property = 'P1540'},
			{ type = 'row', label = 'نساء',	value = {'نساء'},  property = 'P1539'},
			{ type = 'row',  label = 'متوسط العمر', value = {'متوسط العمر'} },
		}},
		{type = 'table', title ='التمثيل', rows = {
			{ type = 'row', label = localdata['البرلمان'] or 'الأغلبية', value = {'المقاعد','مقاعد'}},
			{ type = 'row', label = localdata['البرلمان2'] or 'الأغلبية', value = {'المقاعد2'}},
			{ type = 'row', label = localdata['البرلمان3'] or 'الأغلبية', value = {'المقاعد3'}},
			{ type = 'row', label = localdata['البرلمان4'] or 'الأغلبية', value = {'المقاعد4'}},
			{ type = 'row', label = localdata['البرلمان5'] or 'الأغلبية', value = {'المقاعد5'}},
			{ type = 'row', label = 'المعارضة', value = {'المعارضة'}}
		}},
		generic.logo(),
		{type = 'table', rows = {
			{type = 'navbox'
				,previousparameter = {"الحكومة السابقة",'السابقة'}
				,previousproperty = "P155 OR P1365"
				,nextparameter = {"الحكومة اللاحقة",'اللاحقة'}
				,nextproperty = "P156 OR P1366"
			}
		}}
}}