ماجۊل:زيبيل/قالب/بنا
توضیحات این پودمان میتواند در ماجۊل:زيبيل/قالب/بنا/توضیحات قرار گیرد.
local general = require( 'ماجۊل:زيبيل/أدوات' )
local building = require( 'ماجۊل:زيبيل/أدوات/بنا' )
local localdata = require 'ماجۊل:زيبيل/دیتا'
local wd = require "ماجۊل:Wikidata.Ca"
local formats = {
--{map icon, title icon, لون العنوان, لون العنوان الفرعی, لون النص)
-- map icon from https://www.mediawiki.org/wiki/Help:Extension:Kartographer/Icons
Q1144661 = {'circle-stroked', nil, '#B0C4DE', '#E1E1E1', '#000000', 'defaut'}, -- کا بنا
Q18761864 = {'bank', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- بانکي بنا
Q655686 = {'shop', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- تجاري بنا
Q856584 = {'library', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- مدرسه
Q622425 = {'music', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- مزقان بنا
Q274393 = {'bakery', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- نانوايي
Q3649129 = {'warehouse', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- فصلي یا مۊوقتي بنا
Q876852 = {'playground', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- تفريحي جيگا
Q751876 = {'building', 'chateau', '#00507f', '#ccc', '#ffffff', 'defaut'}, -- قصر
Q23413 = {'circle-stroked', 'chateau', '#00507f', '#ccc', '#ffffff', 'defaut'}, -- ديز
Q105731 = {'dam', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- سد
Q3914 = {'library', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- کيتابخانه
Q2977 = {'religious-christian', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- مسيحي بنا ؤ کليسا
Q16970 = {'religious-christian', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- جۊهۊدي بنا ؤ کنيسه
Q32815 = {'religious-muslim', 'mosque', '#99CC99', '#E1E1E1', '#000000', 'defaut'}, -- ايسلامي بنا ؤ مچچد
Q1777951 = {'ferry', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- کشتی معبر
Q1021645 = {'commercial', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- مبنى مکاتب
Q3947 = {'building', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- منزل
Q37654 = {'shop', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- دۊکان (ديکؤن)
Q219760 = {'shop', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- واجار
Q4989906 = {'chateau', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- معلم
Q33506 = {'museum', 'museum', '#d9b38c', '#E1E1E1', '#000000', 'defaut'}, --متحف
Q170980 = {'monument', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- مسلة
Q3689421 = {'commercial', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- ترویج سیاحی
Q1137809 = {'museum', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- قصر العدالة
Q509028 = {'circle-stroked', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- مزرعة مواشی
Q41253 = {'cinema', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- قاعة سینما
Q839954 = {'circle-stroked', 'map', '#CCCCAA', '#CCCCAA', '#000000', 'defaut'}, -- موقع أثری
Q96102071 = {'zoo', 'map', '#CCCCAA', '#CCCCAA', '#000000', 'defaut'}, -- موقع مراقبة الحیوانات
Q36728566 = {'police', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- station de rangers
Q205495 = {'fuel', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- محطة وقود
Q34627 = {'religious-jewish', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- کنیس
Q267596 = {'museum', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- معبد إغریقی
Q849706 = {'airport', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- مطار
Q27108230 = {'campsite', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- مخیم
Q748998 = {'fire-station', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- قلعة مراقبة الحرائق
Q870 = {'rail', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- أرض
Q83405 = {'warehouse', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}, -- مصنع
Q3024331 = {'religious-christian', 'chateau', '#E00000', '#E00000', '#FFFFFF', 'defaut'}, -- commanderie templière
Q174981 = {'religious-christian', 'chateau', '#000000', '#000000', '#FFFFFF', 'defaut'}, -- commanderie hospitalière
default = {'monument', nil, '#E1E1E1', '#E1E1E1', '#000000', 'defaut'}
}
local function wdformat()
local wtypes = wd.claim{ property = 'P31', formatting = 'raw', separator='/·/' }
if wtypes then wtypes = mw.text.split(wtypes, '/·/') end
local default = formats.default
--wtypes = wd.addVals(wtypes or {}, {property = 'P279'}, 1)
for i, item in pairs(wtypes or {}) do
if formats[item] then
return formats[item]
end
end
return default
end
local function setcharte()
local charte = localdata['charte']
if charte then
for i, j in pairs(formats) do
if j[2] == charte then
return j
end
end
end
return wdformat()
end
local displayformat = setcharte()
return
{
-- الألوان المستعملة لعنوان الصندخ
maincolor = displayformat[3],
secondcolor = displayformat[4],
thirdcolor = displayformat[5] ,
wikimod = 'Wikidata.Ca',
parts = {
-- زيبيل ٚ مۊحتوا
general.title({icon=displayformat[2]}),
{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', listmax = 3,
conjunction = "<br />",
listrank='bestrank' ,
formatting = '$text {{Language icon|NoCat=y|$language}}'
},
metadata = {
description = "",
option = "",
type = "",
}
},
general.logo(),
building.mainimage(),
general.locationmap(),
{
type = "table",
title = "عۊنوان",
rows = {
{
type = "row",
label = "سابق ٚ نام",
value = {"سابق_نام", "former_names", "former_name"},
-- wikidata = {property='P'},
metadata = {
description = "",
option = "", -- required / suggested / deprecated = true or false
type = "", -- number/boolean/date/url/wiki-file-name
}
},
{
type = "row",
label = "باخي نامان",
value = {"باخي_نامان", "alternate_names", "alternate_name"},
-- wikidata = {property='P'},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "نام ٚ معني",
value = {"نام_معني", "etymology"},
-- wikidata = {property='P'},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "منسۊب",
value = {"منسۊب", "namesake"},
wikidata = {property = "P138"},
metadata = {
description = "",
option = "",
type = "",
}
}
}
},
{
type = "table",
title = "کۊللي ايطلاعات",
rows = {
{
type = "row",
label = "وضع",
value = {"وضعيت", "status"},
wikidata = {property = "P5816"},
metadata = {
description = "للدلالة على حالة الإنشاء ویأخذ عادة أحد القیم التالیة: مکتمل، مهدم، مدمر، عملیات البناء معلقة، قید الإنشاء، لم یتم بناءه، مقترح، موافق على بناءه.",
option = "",
type = "",
}
},
{
type = "row",
label = "بنا نؤع",
value = {"بنا_نؤع", "نؤع", "building_type"},
wikidata = {property = "P31"},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "جرگه",
value = {"جرگه", "طبقهبندی", "classification"},
-- wikidata = {property='P'},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "مکان",
value = {"مکان", "location"},
wikidata = {property = "P276"},
metadata = {
description = "",
option = "",
type = "",
}
},
building.adminlocation(),
{
type = "row",
label = "شأر",
value = {"شأر", "location_town", "location_city"},
-- wikidata = {property='P'},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = {"grid_name"},
defaultlabel = "Grid position",
value = {"grid_position"},
-- wikidata = {property='P'},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "صاب",
value = {"صاب", "صاب", "client"},
wikidata = {property = "P88"},
metadata = {
description = "",
option = "",
type = "",
}
},
building.religion(),
building.owner(),
{
type = "row",
label = "ايداره گۊدنکسان",
value = {"ايداره گۊدنکسان", "governing_body"},
-- wikidata = {property='P'},
metadata = {
description = "",
option = "",
type = "",
}
},
building.operator(),
{
type = "row",
label = "وابستگي",
value = {"وابستگي", "affiliation"},
wikidata = {property = "P708", conjunction = "<br />"},
metadata = {
description = "",
option = "",
type = "",
}
},
building.usage(),
{
type = "row",
label = "ساکن",
value = {"ساکن","ساکنون","مستأجر", "current_tenants"},
wikidata = {property = "P466", conjunction = "<br />"},
metadata = {
description = "",
option = "",
type = "",
}
},
building.replaces(),
building.replacedby(),
building.danger(),
building.recordheld()
}
},
{
type = "table",
title = "مۊهم نۊکتهئن",
rows = {
building.cornerstonelaying(),
building.construction(),
building.opening(),
{
type = "row",
label = "جابجايي",
value = {"جابجايي زمات", "relocated_date"},
-- wikidata = {property='P'},
metadata = {
description = "",
option = "",
type = "",
}
},
building.renovation(),
building.closure(),
building.demolition(),
building.causeOfDestruction(),
building.reconstruction(),
building.significantEvent()
}
},
{
type = "table",
title = "[[پرونده:World Heritage Logo.svg|20px]] [[یۊنسکؤ جهاني میراث]]",
rows = {
{
type = "row",
label = "معیاران",
value = {"جهاني_میراث_معیار"},
wikidata = {property = "P2614", conjunction = "<br />"},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "ثبت ٚ شۊماره",
value = {"جهاني_ميراث_ثبت_شۊماره"},
wikidata = {property = "P757"},
metadata = {
description = "",
option = "",
type = "",
}
}
}
},
{
type = "table",
title = "بۊلندي",
rows = {
{
type = "row",
label = "أرقام قیاسیة",
value = function(localdata)
if (type(localdata["highest_start"]) ~= "string" and type(localdata["highest_end"]) ~= "string") then
return
end
local r
r = "Tallest in " .. (localdata["highest_region"] or "the world")
if (localdata["highest_start"] and localdata["highest_end"]) then
r = mw.ustring.format( "%s from %s to %s",
r, localdata["highest_start"], localdata["highest_end"]
)
elseif (localdata["highest_start"]) then
r = mw.ustring.format("%s since %s", r, localdata["highest_start"])
elseif (localdata["highest_end"]) then
r = mw.ustring.format("%s until %s", r, localdata["highest_end"])
end
return r .. "{{ref label|" .. (localdata["highest_reflabel"] or "talleststatus") .. "|I|}}"
end,
-- wikidata = {property='P'},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = ":: تجاوز",
value = {"الأعلى_سابقا","highest_prev"},
-- wikidata = {property='P'},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = ":: تجاوزه",
value = {"الأعلى_لاحقا","highest_next"},
-- wikidata = {property='P'},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "بۊلندي دریا جه",
value = {"ارتفاع_دریا_جه", "altitude"},
wikidata = {property = "P2044", formatting = "unitlinked"},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "چکل",
value = {"چکل", "tip"},
-- wikidata = {property='P'},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "سقف",
value = {"سقف", "roof"},
-- wikidata = {property='P'},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "جؤري طبقه",
value = {"جؤري_طبقه", "top_floor"},
-- wikidata = {property='P'},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "أعلى نقطة مراقبة",
value = {"أعلى_نقطة_مراقبة", "observatory"},
-- wikidata = {property='P'},
metadata = {
description = "",
option = "",
type = "",
}
}
}
},
{
type = "table",
title = "أندازهئن",
rows = {
building.dimensions(),
building.shape(),
{
type = "row",
label = "وزن",
value = {"وزن", "weight"},
wikidata = {property = "P2067", formatting = "unitlinked"},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "سایز",
value = {"size"},
-- wikidata = {property='P'},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "أبعاد",
value = {"دیگر ابعاد", "other_dimensions"},
-- wikidata = {property='P'},
metadata = {
description = "",
option = "",
type = "",
}
}
}
},
{
type = "table",
title = "فني جۊزئیات",
rows = {
{
type = "row",
label = "بخشان",
value = {"بخشان", "parts"},
wikidata = {property = "P527", conjunction = "<br />"},
metadata = {
description = "",
option = "",
type = "",
}
},
building.part_of(),
{
type = "row",
label = "ساختاري سيستم",
value = {"ساختاري سيستم", "structural_system", "ساختار نظام"},
metadata = {
description = "",
option = "",
type = "",
}
},
building.material(),
building.floors(),
{
type = "row",
label = "آسانسؤر",
value = {"آسانسؤر", "elevator_count"},
wikidata = {property = "P1301"},
metadata = {
description = "عدد مصاعد المبنى",
option = "",
type = "",
}
},
{
type = "row",
label = "زيمي پيلئکي",
value = {"زيمي پيلئکي", "grounds_area"},
metadata = {
description = "",
option = "",
type = "",
}
}
}
},
{
type = "table",
title = "طراحي ؤ چأگۊدن",
rows = {
building.archistyle(),
building.creator(),
{
type = "row",
label = "گسترشدهنده",
value = {"مطور", "developer", "المطور"},
wikidata = {property = "P178", conjunction = "<br />"},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "خدمات ٚ مۊهندس",
value = {"مهندس_خدمات", "services_engineer"},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "نخشهکشان",
value = {"مراقب_الکمیات","quantity_surveyor"},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "معمار ٚ شرکت",
value = {"شرکة_البناء", "architecture_firm"},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = {"تسمیة مقاول"},
defaultlabel = "المقاول الرئیسی",
value = {"مقاول_رئیسی", "المقاول_الرئیسی","main_contractor", "main_contractors"},
wikidata = {
property = "P193",
conjunction = "<br />"
},
metadata = {
description = "",
option = "",
type = "",
}
},
general.awards(),
{
type = "row",
label = "تعینکرون",
value = {"الألقاب", "designations"},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "معرۊف به",
value = {"معروف", "known_for"},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "هزینه",
value = {"هزینه", "خرج", "cost"},
wikidata = {property = "P2130", formatting = "unitlinked"},
metadata = {
description = "",
option = "",
type = "",
}
}
}
},
general.planview(),
{
type = "table",
title = "نؤساجي ايطلاعات",
rows = {
{
type = "row",
label = "معماري مۊهندس",
value = {"ren_architect"},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "نؤساجي شرکت",
value = {"ren_firm"},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "مۊهندس",
value = {"ren_engineer"},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "چأگۊدن ٚ مۊهندس",
value = {"ren_str_engineer"},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "خدمات ٚ مۊهندس",
value = {"ren_serv_engineer"},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "شأرساجي مۊهندس",
value = {"ren_civ_engineer"},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "باخي مۊهندسان",
value = {"ren_oth_designers"},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "نخشهکش",
value = {"ren_qty_surveyor"},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "أصلي پیمانکار",
value = {"ren_contractor"},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "جائزهئن",
value = {"ren_awards"},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "نؤساجي مۊشکلات",
value = {"نؤساجي مۊشکلات", "ren_cost"},
-- wikidata = {property='P'},
metadata = {
description = "",
option = "",
type = "",
}
}
}
},
{
type = "table",
title = "باخي ايطلاعات",
rows = {
{
type = "row",
label = "زنجيرهاي هؤتلان",
value = {"زنجيرهاي هؤتلان", "hotel_chain", "chain"},
-- wikidata = {property='P'},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "هؤتل ٚ ستارهئن",
value = {"ستارهئن", "hotel_rating"},
wikidata = {property='P10290'},
metadata = {
description = "چند ستاره هتل هسته یا ونه رج",
option = "",
type = "",
}
},
{
type = "row",
label = "صندلي نؤع",
value = {"صندلي نؤع", "seating_type"},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "نيشتن ٚ ظرفيت",
value = {"طاقة_استیعابیة", "seating_capacity", "capacity"},
wikidata = {property='P1083'},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "دۊکانان ٚ تعداد",
value = {"عدد_المتاجر", "number_of_stores"},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "لنگران ٚ تعداد",
value = {"عدد_المراسی", "number_of_anchors"},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "اۊتاقان ٚ تعداد",
value = {"عدد_الغرف", "number_of_rooms", "room_count", "rooms"},
wikidata = {property='P8733'},
metadata = {
description = "عدد الغرف فی مبنى",
option = "",
type = "",
}
},
{
type = "row",
label = "واحدان ٚ تعداد",
value = {"عدد_الوحدات", "number_of_units", "unit_count"},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "سۊئيتان ٚ تعداد",
value = {"عدد_الأجنحة", "number_of_suites", "suite_count", "suites"},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "رستۊرانان ٚ تعداد",
value = {"عدد_المطاعم", "number_of_restaurants"},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "مشرۊبخانهئن ٚ تعداد",
value = {"عدد_الحانات", "number_of_bars"},
metadata = {
description = "",
option = "",
type = "",
}
},
{
type = "row",
label = "اۊتۊلان ٚ تعداد",
value = {"کراج_السیارات", "مواقف_السیارات"},
metadata = {
description = "",
option = "",
type = "",
}
},
building.facilities(),
building.visitors(),
building.website(),
{
type = "row",
label = "وبجيگا",
value = {"وبجيگا"},
metadata = {
description = "",
option = "",
type = "",
}
},
building.phone_number(),
building.postal_code(),
building.coordinates()
}
},
general.geoloc({marker=displayformat[1]}),
{
type = "table",
rows = {
--, content ={'nrhp','embedded','module'}
}
},
}
}