وحدة:بطاقة/قالب/حيوانهذه الصفحة شرح لوحدة من وحدات البطاقات المبنية اعتمادا على وحدة:بطاقة. وتستعمل في {{بطاقة حيوان}}.
-- Credits:
-- Original from [[fr:Special:Permalink/221747498|fr:Module:Infobox/Animal]]
-- forked by وهراني @arwiki (ar:وحدة:بطاقة/قالب/حيوان)
-- Version: 20230705
local generic = require ("وحدة:بطاقة/أدوات")
local localdata = require ('وحدة:بطاقة/بيانات' )
local person = require ('وحدة:بطاقة/أدوات/شخص')
local speciesformats = {
--{espèce, espèce, couleur titre, couleur sous-titre, couleur texte, icône) doivent être classés du plus spécifique au plus général
Q144= {'Q144', 'chien', '#947151', '#B08660', '#000000', 'defaut'}, -- brun foncé
Q146= {'Q146', 'chat', '#474747', '#787878', '#FFFFFF', 'defaut'}, -- noir/gris
Q726= {'Q726', 'cheval', '#D2B48C', '#D2B48C', '#FFFFFF', 'defaut'}, -- brun clair (comme [[Modèle:Infobox Cheval]])
Q36341= {'Q36341', 'ours brun', '#8A5030', '#B37659', '#FFFFFF', 'defaut'}, -- brun soutenu
Q839769= {'Q839769', 'ours brun', '#8A5030', '#B37659', '#FFFFFF', 'defaut'}, -- brun soutenu
Q237260= {'Q237260', 'ours brun', '#8A5030', '#B37659', '#FFFFFF', 'defaut'}, -- brun soutenu
}
local function setformat()
local wd = require "Module:Wikidata.Ca"
local wtypes = wd.claim{ property = 'P31', formatting = 'raw', separator='/·/' }
if wtypes then wtypes = mw.text.split(wtypes, '/·/') end
--wtypes = wd.addVals(wtypes or {}, {property = 'P279'}, 1)
for i, item in pairs(wtypes or {}) do
if speciesformats[item] then
return speciesformats[item]
end
end
return {'Q', '', '#DFDFDF', '#D9D9D9', '#000000', 'defaut'}
end
local function setcharte()
local charte = localdata['charte']
if charte then
for i, j in pairs(speciesformats) do
if j[2] == charte then
return j
end
end
end
return setformat()
end
local personformat = setcharte()
return {
maincolor = personformat[3],
secondcolor = personformat[4],
--thirdcolor = personformat[5],
wikimod='Wikidata.Ca',
description = "بطاقة تعريفية للحيوانات المشهورة",
parts = {
generic.title(),
generic.mainimage(),
{type = 'table', title = "معلومات عامة", rows = {
person.othernames(),
{
type = "row",
label = "نسبة الاسم إلى",
value = {"سبب_تسمية", "namesake"},
wikidata = {property = "P138"},
metadata = {
description = "",
option = "",
type = "",
}
},
{type = 'row', label = 'الأصل', value = {'أصل', "بلد أصلي"}, property = 'P495'},
{type = 'row', label = 'تاريخ الولادة', value = {'تاريخ الولادة','birth_date'}, property = 'P569'},
{type = 'row', label = 'مكان الولادة', value = {'مكان الولادة','birth_place'}, property = 'P19'},
{type = 'row', label = 'مكان العيش', value = {'مكان العيش','residence'},
wikidata = {property = 'P551', listrank='bestrank', showDate='true'}},
{type = 'row', label = 'تاريخ الوفاة', value = {'تاريخ الوفاة','death_date'}, property = 'P570'},
{type = 'row', label = 'مكان الوفاة', value = {'مكان الوفاة','death_place'}, property = 'P20'},
{type = 'row', label = 'سبب الوفاة', value = {'سبب الوفاة','death cause'}, property = 'P509'},
person.family(),
person.occupation(),
{type = 'row',
label = 'مجال النشاط',
value = {'نشاط','field of work'},
wikidata = {property = 'P101'}
},
{type = 'row',
label = 'ظهر في',
value = {'ظهر_في','present_in','appearance'},
wikidata = {
property = 'P1441', formatting='table', qualifier1='P577',
rowformat='* $1 $0$R0', rowsubformat1="$1:",
showDate='true'
}
},
{
type = "row",
label = "المالك",
plurallabel = "الملاك",
value = {"مالك", "owner", "المالك"},
wikidata = {
property = "P127",
conjunction="<br />",
showDate="true"
},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = 'row',
label = 'عمل عند',
value = {'عمل عند','employer'},
wikidata = {
conjunction='<br />',
property = 'P108',
showDate = 'true', sorttype= 'chronological'
},
metadata = {
description = "الجهة الموظفة",
option = "",
type = "",
}
},
{
type = "row",
label = "أحداث مهمة",
value = {"أحداث", "تواريخ_مهمة", "significant_event", "events"},
wikidata = {property = "P793"}
},
person.awards(),
generic.website(),
{type = 'navbox', inner=true,
previousparameter = {"سبقه","سابق","سابقه",'predecessor'},
previousproperty = "P155",
nextparameter = {"تبعه","لاحق","تاليه",'successor'},
nextproperty = "P156"
},
}},
{type = 'table', title = 'بيانات بيولوجية', rows = {
{type = 'row',
label = '[[نوع (تصنيف)|نوع]]',
value = {'نوع','species'},
wikidata = {
property = 'P10241', formatting ='table', rowformat="$0$R0"
--targetclass = {"Q16521","Q55983715"}-- n'affiche que les "taxons" ou les "groupe d'organismes connu par un nom commun"
}
},
{type = 'row',
label = '[[سلالة (حيوانات أليفة)|السلالة]]',
value = {'سلالة','race'},
wikidata = {property = 'P4743'}
},
{type = 'row',
label = 'اللون',
value = {'لون','color'},
wikidata = {property = 'P462'},
metadata = {
description = "",
option = "",
type = "",
}
},
{type = 'row', label = 'الجنس', value = {'جنس','sex'}, property = 'P21'},
{
type = 'row',
label = 'الطول',
value = {'طول','height'},
wikidata = {property = 'P2048', formatting='unitcode'},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = 'row',
label = 'الوزن',
value = {'وزن','weight'},
wikidata = {property = 'P2067', formatting='unitcode'},
metadata = {
description = "",
option = "",
type = "",
}
},
}},
{type = 'table', title = 'الهوامش', rows = {
{type = 'row1col', value = {'هوامش','notes','footnotes'}},
}},
}
}
|
Index:
pl ar de en es fr it arz nl ja pt ceb sv uk vi war zh ru af ast az bg zh-min-nan bn be ca cs cy da et el eo eu fa gl ko hi hr id he ka la lv lt hu mk ms min no nn ce uz kk ro simple sk sl sr sh fi ta tt th tg azb tr ur zh-yue hy my ace als am an hyw ban bjn map-bms ba be-tarask bcl bpy bar bs br cv nv eml hif fo fy ga gd gu hak ha hsb io ig ilo ia ie os is jv kn ht ku ckb ky mrj lb lij li lmo mai mg ml zh-classical mr xmf mzn cdo mn nap new ne frr oc mhr or as pa pnb ps pms nds crh qu sa sah sco sq scn si sd szl su sw tl shn te bug vec vo wa wuu yi yo diq bat-smg zu lad kbd ang smn ab roa-rup frp arc gn av ay bh bi bo bxr cbk-zam co za dag ary se pdc dv dsb myv ext fur gv gag inh ki glk gan guw xal haw rw kbp pam csb kw km kv koi kg gom ks gcr lo lbe ltg lez nia ln jbo lg mt mi tw mwl mdf mnw nqo fj nah na nds-nl nrm nov om pi pag pap pfl pcd krc kaa ksh rm rue sm sat sc trv stq nso sn cu so srn kab roa-tara tet tpi to chr tum tk tyv udm ug vep fiu-vro vls wo xh zea ty ak bm ch ny ee ff got iu ik kl mad cr pih ami pwn pnt dz rmy rn sg st tn ss ti din chy ts kcg ve
Portal di Ensiklopedia Dunia