ماژول:صندخ/قالب/بنا
توضیحات این پودمان میتواند در ماژول:صندخ/قالب/بنا/توضیحات قرار گیرد.
local general = require( 'ماژول:صندخ/ادوات' )
local building = require( 'ماژول:صندخ/ادوات/بنا' )
local localdata = require 'ماژول:صندخ/دیتا'
local wd = require "Module: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'}
}
},
}
}