پرش به محتوا

ماجۊل:زيبيل/أدوات/بنا

Wikipedia جي

توضیحات این پودمان می‌تواند در ماجۊل:زيبيل/أدوات/بنا/توضیحات قرار گیرد.

local building = {}
local localdata = require("ماجۊل:زيبيل/دیتا")
local item = localdata.item

local general = require "ماجۊل:زيبيل/أدوات"

local WD = require "ماجۊل:Wikidata.Ca"

local function keyDate(event)
    if type(event) == "table" then
        for i, j in pairs(event) do
            local s = keyDate(j)
            if s then
                return s
            end
        end
    elseif type(event) ~= "string" then
        return error("invalid-datatype !! " .. type(event) .. " != string")
    elseif string.sub(event, 1, 1) == "Q" then
        return WD.claim {
            property = "P793",
            qualifier = "P518",

            qualifier2 = "P580 or P582", --i
            qualifier3 = "P580", qualifier4 = "P582",
            qualifier5 = "P585",

            colformat2 = "Y", colformat3 = "Y",
            colformat4 = "Y", colformat5 = "Y",

            rowsubformat2 = ' $3 – $4',
            rowsubformat5 = ' $5',

            formatting = "table",
            conjunction = "<br />",
            rowformat = "$1$2$5$R0",
            whitelist0 = event,
            query = "num"
        }
    elseif string.sub(event, 1, 1) == "P" then
        return WD.claim {property = event, query = "num"}
    else
        return error("invalid-entity-id : " .. event)
    end
end

function building.title()
    return general.title()
end

--Image
function building.mainimage()
    return general.mainimage()
end

function building.country()
    return {
        type = "row",
        label = "کيشور",
        value = {"دؤلت", "کيشور", "country"},
        wikidata = {
            wikimod = "Wikidata.Ca",
            property = "P17", listrank="bestrank",
            formatting = "table",
            conjunction = "<br />",
            rowformat = "{{flag|$0}}$R0",
            colformat0 = "label"
        },
        metadata = {
			description = "کيشوري گه أ وانيويس اۊن ٚ شين ايسه",
			option = "", 
			type = "string", 
        }
    }
end



function building.status()
    return {
                type = "row",
                label = "وضعيت",
                value = {"وضعيت", "status"},
                wikidata = {property = "P5816"},
                metadata = {
                    description = "مثلاً بنا سالم هسته یا نا. یا اونجه کار کننه یا نا و...",
                    option = "", 
                    type = "", 
                }
            }
end

function building.historicalregion()
    return {-- بالنسبه للمناطق التاریخیه
        type = "row",
        value = {"تاريخي سامان", "historical_region"},
        label = "تاريخي سامان",
        wikidata = {property = "P6885"},
        metadata = {
			description = "تاريخي سامان",
			option = "", 
			type = "", 
        }
    }
end

function building.adminlocation()
    return {
        type = "multi",
        rows = {
            {
                type = "row",
                value = {"آدرس", "نشانی", "address"},
                label = "آدرس",
                wikidata = {
                    wikimod = "Wikidata.Ca",
                    property = "P6375",
                    list = 2,
                    conjunction = "<br />",
                    formatting = "$text {{Language icon|NoCat=y|$language}}"
                },
		        metadata = {
					description = "",
					option = "", 
					type = "", 
		        }
            },
            {
                type = "row",
                value = {"منطقه_نوم_1","منطقه نوم 1","subdivision_name1", "subdivision1"},
                label = {"منطقه نوع 1","subdivision_type1"} ,
                defaultlabel = "منطقه 1",
                metadata = {
					description = "",
					option = "", 
					type = "", 
                }
            },
            {
                type = "row",
                value = {"منطقه نوم 2","منطقه_نوم_2","subdivision_name2", "subdivision2"},
                label = {"منطقه نوع 2","subdivision_type2"} ,
                defaultlabel = "منطقه 2",
                metadata = {
					description = "",
					option = "", 
					type = "", 
                }
            },
            {
                type = "row",
                value = {"منطقه نوم 3","منطقه_نوم_3","subdivision_name3", "subdivision3"},
                label = {"منطقه نوع 3","subdivision_type3"} ,
                defaultlabel = "منطقه 3",
                metadata = {
					description = "",
					option = "", 
					type = "", 
                }
            },
            {-- بالنسبه للمناطق الإداریه
                type = "row",
                value = {"شأرستان","ايداري منطقه","شأرستان","ايداري_منطقه","administrative_territorial"},
                label = "ايداري منطقه",
                wikidata = {wikimod = "Wikidata.Ca", property = "P131", showDate = "true" },
                metadata = {
					description = "کيشور ٚ رسمي تخسيمات ٚ دۊرۊن کؤیه شينه",
					option = "", 
					type = "", 
                }
            },
            building.historicalregion(),
            building.country()
        }
    }
end

function building.onshoreof()
    return {
        type = "row",
        label = "بندر",
        value = {"بندر","on_coast_of","baigné par"},
        wikidata = {property = "P206"},
        metadata = {
			description = "آو ٚ پألي شأران ٚ وأسي کار-أ گيته به",
			option = "", 
			type = "", 
        }
    }
end

function building.watershed()
    return {
        type = "row",
        label = "رۊخان ٚ حؤضه",
        value = "رۊخان حؤضه",
        wikidata = {property = "P4614"},
        metadata = {
			description = "",
			option = "", 
			type = "", 
        }
    }
end

function building.protectedarea()
    return {
        type = "row",
        label = "حيفاظت بۊبؤسته منطقه",
        plurallabel = "حيفاظت بۊبؤسته منطقه",
        value = {"حيفاظت بۊبؤسته منطقه", "منطقه حفاظت شده", "protected_area"},
        wikidata = {property = "P3018"},
        metadata = {
			description = "",
			option = "", 
			type = "", 
        }
    }
end

function building.island()
    return {
        type = "row",
        label = "جزیره",
        plurallabel = "جزیره",
        value = {"جزیره", "island"},
        wikidata={property = "P5130"},
        metadata = {
			description = "",
			option = "", 
			type = "", 
        }
    }
end

function building.mountainrange()
    return {
        type = "row",
        label = "رشته‌کۊ",
        plurallabel = "رشته کۊهان",
        value = {"کۊهان", "رشته‌کۊ", "mountain_range"},
        wikidata = {property = "P4552"},
        metadata = {
			description = "",
			option = "", 
			type = "", 
        }
    }
end

function building.elevation()
    return {
        type = "row",
        label = "بۊلندي",
        value = {"بۊلندي", "ارتفاع", "elevation"},
        wikidata = {
            wikimod = "Wikidata.Ca",
            property = "P2044",
            formatting = "unitlinked"
        },
        metadata = {
			description = "بۊلندي آو ٚ سطح ٚ جه",
			option = "", 
			type = "", 
        }
    }
end

function building.coordinates(args)
    return general.coordinates(args)
end

function building.website(args)
    return general.website(args)
end

function building.phone_number()
    return {
                type = "row", 
                label = "تيلفۊن ٚ شۊماره",
                value = {"تلفن", "شماره تلفن","phone_number"},
                valueStyle = {direction = "LTR", ["text-align"] = "left"},
                wikidata = {property = "P1329"},
                metadata = {
					description = "تيلفۊن ٚ شۊماره",
					option = "", 
					type = "string", 
                }
            }
end


function building.postal_code()
    return {
        type = "row", 
        label = "پؤستي کؤد",
        value = {"پؤستي کؤد","postal_code"},
        wikidata = {property = "P281"},
        metadata = {
			description = "پؤستي کؤد",
			option = "", 
			type = "", 
        }
    }
end

function building.open_days()
    return {
			type = 'row' , 
			label = 'رۊجاني گه واگۊده به' , 
        	value = {'باز','open_days'} , 
        	wikidata = {
        		wikimod = "Wikidata.Ca",
            	property='P3025', formatting='table',
        		qualifier='P3027', qualifier2='P3028', 
        		qualifier3='P3026', 
        		qualifier4='P8626',qualifier5='P8627',
                rowformat= '$0$R0 $1$4$3', 
                rowsubformat1='<small><br/>$1 – $2</small>',
                rowsubformat3='<small><br/> تعطیل روز: $3</small>',
                rowsubformat4='<small><br/>$4 – $5</small>',
    	},
        metadata = {
			description = "رۊجاني گه واگۊده به",
			option = "", 
			type = "", 
        }
	}
end

function building.cornerstonelaying()
    return {
        type = "multi",
        rows = {
            {
                type = "row",
                value = {"بينأ سال", "بينأ گۊدن سال", "groundbreaking_date", "broke_ground", "broke ground"},
                label = "سالي گه اۊن-أ بينأ بۊگۊدئد",
                wikidata = keyDate("Q18752057"),
                metadata = {
					description = "بينأ گۊدن ؤ چأگۊدن ٚ سال",
					option = "", 
					type = "date", 
                }
            }
        }
    }
end

function building.construction()
    return {
        type = "multi",
        rows = {
            {
                type = "row",
                label = "چأگۊدن ٚ شرۊع",
                value = {"چأگۊدن_شرۊع", "چأگۊدن شرۊع", "start_date", "construction_start_date"},
                wikidata = {
                    wikimod = "Wikidata.Ca",
                    property = "P793",
                    qualifier = "P580 or P585",
                    formatting = "table",
                    conjunction = "<br />",
                    rowformat = "$1",
                    whitelist0 = "Q385378,Q27136782"
                },
                --wikidata2 = {property = "P571"},
                metadata = {
					description = "چأگۊدن ٚ شرۊع بؤستن ٚ زمات",
					option = "", 
					type = "date", 
                }
            },
            {
                type = "row",
                label = "چأگۊدن ٚ آخر",
                value = {"چأگۊدن_آخر", "چأگۊدن آخر", "stop_date", "construction_stop_date"},
                --, wikidata = {property='P'},
                metadata = {
					description = "بساتن آخر گدر",
					option = "", 
					type = "date", 
                }
            },
            {
                type = "row",
                label = "نهایه الأعمال الكبرى",
                value = {"نهایه_الأعمال_الكبرى", "topped_out_date"},
                wikidata = {
                    wikimod = "Wikidata.Ca",
                    property = "P793",
                    qualifier = "P585",
                    formatting = "table",
                    conjunction = "<br />",
                    rowformat = "$1",
                    whitelist0 = "Q1075723"
                },
                metadata = {
					description = "تاریخ نهایه الأعمال الكبرى",
					option = "", 
					type = "date", 
                }
            },
            {
                type = "row",
                label = "تۊمام ٚ بؤستن",
                value = {"تۊمام ٚ بؤستن ٚ تاريخ", "تۊمام ٚ بؤستن", "est_completion", "completion_date"},
                wikidata = {
                    wikimod = "Wikidata.Ca",
                    property = "P793",
                    qualifier = "P582",
                    formatting = "table",
                    conjunction = "<br />",
                    rowformat = "$1",
                    whitelist0 = "Q385378"
                },
                metadata = {
					description = "تاریخ أعمال الانتهاء",
					option = "", 
					type = "date", 
                }
            },
            {
                type = "row",
                value = {"چأگۊدن", "ساخت و ساز", "ساخت"},
                label = "چأگۊدن",
                --wikidata = {property='P'},
                metadata = {
					description = "کئنه بينأ-یأ چأگۊدئد؟",
					option = "", 
					type = "", 
                }
            }
        }
    }
end

function building.reconstruction()
    return {
        type = "multi",
        rows = {
            {
                type = "row",
                value = {"نؤساجي شرۊع", "reconstruction_start_date"},
                label = "نؤساجي شرۊع",
                metadata = {
					description = "",
					option = "", 
					type = "date", 
                }
            },
            {
                type = "row",
                value = {"نؤساجي اتمام", "reconstruction_completion_date"},
                label = "نؤساجي اتمام",
                metadata = {
					description = "",
					option = "", 
					type = "date", 
                }
            },
            {
                type = "row",
                value = {"نؤساجي", "نؤساجي تاريخ"},
                label = "نؤساجي",
                wikidata = keyDate("Q1370468"),
                metadata = {
					description = "",
					option = "", 
					type = "date", 
                }
            }
        }
    }
end

function building.opening()
    return {
        type = "multi",
        rows = {
            {
                type = "row",
                value = {"افتتاحیه", "افتتاح", "opened", "opening_date", "opening"},
                label = "افتتاح",
                blockers = "افتتاح",
                wikidata = keyDate {"Q1417098,Q15051339"},
                metadata = {
					description = "",
					option = "", 
					type = "date", 
                }
            },
            {
                type = "row",
                value = {"رسمی افتتاح تاریخ", "inauguration_date"},
                label = "رسمي واگۊدن",
                blockers = "افتتاح",
                -- P1619 = رسمی افتتاح تاریخ
                wikidata = keyDate {"P1619"}, 
                metadata = {
					description = "",
					option = "", 
					type = "date", 
                }
            },
            {
                type = "row",
                label = "تقدیس",
                value = {"تقدیس", "consecration"},
                blockers = "افتتاح",
                wikidata = keyDate {"Q125375"}, 
                metadata = {
					description = "",
					option = "", 
					type = "", 
                }
            },
            {
                type = "row",
                value = "ساعت هارشی‌ین",
                label = "[[ساعت هارشی‌ین|أول ضوء (علم الفلك)|]]",
                blockers = "افتتاح",
                wikidata = keyDate {"Q1306940"}, 
                metadata = {
					description = "",
					option = "", 
					type = "", 
                }
            }
        }
    }
end

function building.renovation()
    return {
        type = "multi",
        rows = {
            {
                type = "row",
                description = "بروز هاکردن تاریخ",
                label = "بروز هاکردن",
                value = {"بروز هاکردن تاریخ", "renovation_date"},
                --, wikidata = {property='P'}, 
                metadata = {
					description = "",
					option = "", 
					type = "date", 
                }
            },
            {
                type = "row",
                description = "ترمیم تاریخ",
                value = {"ترمیم", "restoration"},
                label = "ترمیم",
                wikidata = keyDate {"Q217102"},
                blockers = "تجدید", 
                metadata = {
					description = "",
					option = "", 
					type = "date", 
                }
            },
            {
                type = "row",
                description = "تجدید تاریخ",
                value = {"تجدید", "renovation"},
                label = "تجدید",
                wikidata = keyDate {"Q2144402"},
                blockers = "ترمیم", 
                metadata = {
					description = "",
					option = "", 
					type = "date", 
                }
            },
            {
                type = "row",
                description = "توسعه تاریخ",
                value = {"توسعه", "توسعه", "expansion"},
                label = "توسعه",
                wikidata = keyDate {"Q9073584"},
                blockers = "تجدید", 
                metadata = {
					description = "",
					option = "", 
					type = "date", 
                }
            },
            {
                type = "row",
                value = "دیگر کارون",
                label = "دیگر کارون", 
                metadata = {
					description = "دیگر کارون تاریخ",
					option = "", 
					type = "date", 
                }
            }
        }
    }
end

function building.demolition()
    return {
        type = "multi",
        rows = {
            {
                type = "row",
                label = "رقد بدائن",
                value = {"رقد بدائن تاریخ", "date_demolished", "demolished_date"},
                wikidata = {
                    wikimod = "Wikidata.Ca",
                    property = "P576",
                    qualifier = "P770",
                    formatting = "table",
                    conjunction = "<br />",
                    rowformat = "$0$R0 $1",
                    rowsubformat1 = "<small>($1)</small>"
                },
                wikidata2 = keyDate("Q331483"), 
                metadata = {
					description = "رقد بوردن تاریخ",
					option = "", 
					type = "date", 
                }
            },
            {
                type = "row",
                label = "تخریب",
                value = {"تخریب تاریخ", "destruction_date", "destroyed"},
                wikidata = {property = "P3082"},
                wikidata2 = keyDate("Q17781833"), 
                metadata = {
					description = "تخریب تاریخ",
					option = "", 
					type = "date", 
                }
            },
            {
                type = "row",
                value = {"تخریب", "vandalism"},
                label = "تخریب",
                wikidata = keyDate("Q6160"), 
                metadata = {
					description = "تخریب تاریخ",
					option = "", 
					type = "date", 
                }
            },
            building.replacedby(),
        }
    }
end

function building.closure()
    return {
        type = "row",
        value = {"بسته شدن", "بستن", "دوسته بؤستن", "closing_date", "closed"},
        label = "دوسته بؤستن",
        wikidata = keyDate {"Q5135520"},
        wikidata2 = keyDate {"P3999"},
        wikidata3 = keyDate {"P576"}, 
        metadata = {
			description = "دوسته بؤستن ٚ تاریخ",
			option = "", 
			type = "date", 
        }
    }
end

function building.maintenance()
    return {
        type = "row",
        value = {"حفظ", "maintenance"},
        label = "حفظ",
        wikidata = {
            wikimod = "Wikidata.Ca",
            property = "P126",
            showDate = "true",
            conjunction = "<br />"
        }, 
        metadata = {
			description = "حفظ تاریخ",
			option = "", 
			type = "date", 
        }
    }
end

function building.usage()
    return {
        type = "row",
        label = "کار",
        value = {"کار","کار گۊدن","usage"},
        wikidata = {
            wikimod = "Wikidata.Ca",
            property = "P366",
            showDate = "true",
            conjunction = "<br />",
            list = "bestrank"
        }, 
        metadata = {
			description = "زمونی که کار کرده و باز بی‌یه",
			option = "", 
			type = "", 
        }
    }
end

function building.operator()
    return {
        type = "row",
        label = "ايداره",
        value = {"اپراتور", "کارزن", "کارگیر", "operator", "اداره"},
        wikidata = {
            wikimod = "Wikidata.Ca",
            property = "P137",
            showDate = "true",
            conjunction = "<br />"
        }, 
        metadata = {
			description = "اپراتور ونه کی بییه",
			option = "", 
			type = "", 
        }
    }
end

function building.transport()
    return {
        type = "multi",
        rows = {
            {type = "row", label = "موقف", value = "موقف"},
            {type = "row", label = "محطه", value = "محطه"},
            {type = "row", label = "مترو", value = "مترو"},
            {type = "row", label = "ترموای", value = {"قطار", "ترموای"}},
            {type = "row", label = "ترن", value = {"ترن"}}
        }
    }
end

function building.part_of() 
    return {
        type = "row",
        label = "ايته بخش جه",
        value = "ايته بخش جه",
        wikidata = {
            property = "P361"
        }, 
        metadata = {
			description = "",
			option = "", 
			type = "", 
        }
    }
end

function building.orientation()
    return {
        type = "row",
        label = "جهت",
        value = {"جهت", "orientation"},
        wikidata = {property = "P7469", numval = "1"}, 
        metadata = {
			description = "",
			option = "", 
			type = "", 
        }
    }
end

function building.archistyle()
    return {
        type = "multi",
        rows = {
            {
                type = "row",
                label = "معماري سبک",
                plurallabel = "معماري سبکان",
                value = {"معماري سبک", "معماری الگو", "architectural_style", "architecture"},
                wikidata = {
                    wikimod = "Wikidata.Ca",
                    property = "P149 OR P135"
                }, 
		        metadata = {
					description = "نمط المعماری المنتهج فی التشیید",
					option = "", 
					type = "", 
		        }
            }
        }
    }
end

function building.creator()
    return {
        type = "multi",
        rows = {
            {
                type = "row",
                label = "معمار ٚ مۊهندس",
                plurallabel = "معماري مۊهندسان",
                value = {"معمار", "معمار ٚ مۊهندس", "مهندس معمار", "architect"},
                wikidata = {property = "P84", conjunction = "<br />"}, 
		        metadata = {
					description = "مهندس معمار",
					option = "", 
					type = "", 
		        }
            },
            {
                type = "row",
                label = "شأرساجي مۊهندس",
                plurallabel = "شأرساجي مۊهندسان",
                value = {"شهرسازی مهندس", "شأرساجي مۊهندس", "civil_engineer"},
                --wikidata = {property = "P", conjunction = "<br />"}, 
		        metadata = {
					description = "شأرساجي مۊهندس",
					option = "", 
					type = "", 
		        }
            },
            {
                type = "row",
                label = "ساخت ٚ مۊهندس",
                plurallabel = "ساخت ٚ مۊهندسان",
                value = {"مۊهندس", "ساخت ٚ مۊهندس"},
                "structural_engineer",
                wikidata = {property = "P631", conjunction = "<br />"}, 
		        metadata = {
					description = "ساخت مهندس",
					option = "", 
					type = "", 
		        }
            },
            {
                type = "row",
                label = "طراح",
                plurallabel = "طراحان",
                value = {"دیزاینر", "طراح", "designer"},
                wikidata = {property = "P170", conjunction = "<br />"}, 
		        metadata = {
					description = "",
					option = "", 
					type = "", 
		        }
            },
            {
                type = "row",
                label = "باخي طراحان",
                value = {"باخي_طراحان", "other_designers"}, 
		        metadata = {
					description = "",
					option = "", 
					type = "", 
		        }
            }
        }
    }
end

function building.owner()
    return {
        type = "multi",
        rows = {
            {
                type = "row",
                description = "زيمي صاب",
                label = "زيمي صاب",
                value = {"زيمي صاب", "landlord"},
                --, wikidata = {property='P'}, 
		        metadata = {
					description = "",
					option = "", 
					type = "", 
		        }
            },
            {
                type = "row",
                label = "أولي صاب",
                plurallabel = "أولي مالکان",
                value = "اولی مالک", 
		        metadata = {
					description = "",
					option = "", 
					type = "", 
		        }
            },
            {
                type = "row",
                label = "هأسأيي مالک",
                plurallabel = "هأسايي مالکان",
                value = "هأسايي مالک", 
		        metadata = {
					description = "",
					option = "", 
					type = "", 
		        }
            },
            {
                type = "row",
                label = "صاب",
                plurallabel = "مالکان",
                value = {"مالک", "owner", "صاب"},
                wikidata = {
                	wikimod = "Wikidata.Ca", 
                	property = "P127",
                	conjunction="<br />",
                	showDate="true"
                }, 
		        metadata = {
					description = "",
					option = "", 
					type = "", 
		        }
            }
        }
    }
end

function building.religion()
    return {
        type = "row",
        label = "دین",
        value = {"مذهب", "دین", "religion"},
        wikidata={property = "P140"}, 
        metadata = {
			description = "",
			option = "", 
			type = "", 
        }
    }
end

function building.shape()
    return {
        type = "row",
        label = "شكل",
        value = {"شكل", "shape"},
        property = "P1419", 
        metadata = {
			description = "هندسی شکل",
			option = "", 
			type = "", 
        }
    }
end

function building.dimensions()
    return {
        type = "multi",
        rows = {
            {
                type = "row",
                label = "بۊلندي",
                value = {"ارتفاع", "height"},
                wikidata = {
                    wikimod = "Wikidata.Ca",
                    property = "P2048",
                    qualifier = "P1013",
                    colformat0 = "unitlinked",
                    formatting = "table",
                    conjunction = "<br />",
                    rowformat = "$0$R0 $1",
                    rowsubformat1 = "<small><br />($1)</small>",
                    blacklist1 = "Q31271474,Q24192182,Q131214,Q852590"
                }, 
		        metadata = {
					description = "",
					option = "", 
					type = "", 
		        }
            },
            {
                type = "row",
                label = "هندسي ارتفاع",
                value = "ارتفاع",
                wikidata = {
                    wikimod = "Wikidata.Ca",
                    property = "P2048",
                    list = "bestrank",
                    colformat0 = "unitlinked",
                    formatting = "table",
                    qualifier = "P1013",
                    rowformat = "$0$R0",
                    whitelist1 = "Q24192182"
                }, 
		        metadata = {
					description = "",
					option = "", 
					type = "", 
		        }
            },
            {
                type = "row",
                label = "هأوايي ارتفاع",
                value = {"هأوايي برج", "antenna_spire"},
                wikidata = {
                    wikimod = "Wikidata.Ca",
                    property = "P2048",
                    list = "bestrank",
                    colformat0 = "unitlinked",
                    formatting = "table",
                    qualifier = "P1013",
                    rowformat = "$0$R0",
                    whitelist1 = "Q131214,Q852590"
                }, 
		        metadata = {
					description = "",
					option = "", 
					type = "", 
		        }
            },
            {
                type = "row",
                label = "جؤري طبقه",
                value = {"جؤري طبقه", "top_floor"},
                wikidata = {
                    wikimod = "Wikidata.Ca",
                    property = "P2048",
                    colformat0 = "unitlinked",
                    formatting = "table",
                    qualifier = "P1013",
                    rowformat = "$0$R0",
                    whitelist1 = "Q31271474"
                }, 
		        metadata = {
					description = "",
					option = "", 
					type = "", 
		        }
            },
            {
                type = "row",
                label = "جۊلفي",
                value = "جۊلفي",
                wikidata = {
                    wikimod = "Wikidata.Ca",
                    property = "P2610",
                    formatting = "unit"
                }, 
		        metadata = {
					description = "",
					option = "", 
					type = "", 
		        }
            },
            {
                type = "row",
                label = "طۊل",
                value = "طۊل",
                wikidata = {
                    wikimod = "Wikidata.Ca",
                    property = "P2043",
                    formatting = "unit"
                }, 
		        metadata = {
					description = "",
					option = "", 
					type = "", 
		        }
            },
            {
                type = "row",
                label = "عرض",
                value = "عرض",
                wikidata = {
                    wikimod = "Wikidata.Ca",
                    property = "P2049",
                    formatting = "unit"
                }, 
		        metadata = {
					description = "",
					option = "", 
					type = "", 
		        }
            },
            {
                type = "row",
                label = "بروته بیّه",
                value = "بروته",
                wikidata = {
                    wikimod = "Wikidata.Ca",
                    property = "P2050",
                    formatting = "unit"
                }, 
		        metadata = {
					description = "",
					option = "", 
					type = "", 
		        }
            },
            {
                type = "row",
                label = "قطر",
                value = {"قطر", "بنای قطر", "diameter"},
                wikidata = {
                    wikimod = "Wikidata.Ca",
                    property = "P2386",
                    formatting = "unit"
                }, 
		        metadata = {
					description = "",
					option = "", 
					type = "", 
		        }
            },
            {
                type = "row",
                label = "محیط",
                value = {"محیط", "بنای محیط", "circumference"},
                wikidata = {
                    wikimod = "Wikidata.Ca",
                    property = "P2547",
                    formatting = "unit"
                }, 
		        metadata = {
					description = "",
					option = "", 
					type = "", 
		        }
            },
            {
                type = "row",
                label = "پيلئکي",
                value = {"مساحت", "پيلئکي"},
                wikidata = {
                    wikimod = "Wikidata.Ca",
                    property = "P2046",
                    formatting = "table",
                    conjunction = "<br />",
                    qualifier = "P518",
                    rowformat = "$0$R0 $1",
                    rowsubformat1 = "<small>($1)</small>",
                    colformat0 = "unitlinked"
                }, 
		        metadata = {
					description = "",
					option = "", 
					type = "", 
		        }
            },
            {
                type = "row",
                label = "حجم",
                value = {"حجم", "volume"},
                wikidata = {
                    wikimod = "Wikidata.Ca",
                    property = "P2234",
                    formatting = "unit"
                }, 
		        metadata = {
					description = "",
					option = "", 
					type = "", 
		        }
            },
            {
                type = "row",
                label = "زمینی مسافت",
                value = {"مسافت", "clearance"},
                wikidata = {
                    wikimod = "Wikidata.Ca",
                    property = "P2793",
                    formatting = "unit"
                }, 
		        metadata = {
					description = "",
					option = "", 
					type = "", 
		        }
            }
        }
    }
end

function building.floors()
    return {
        type = "multi",
        rows = {
            {
                type = "row",
                label = "مساحه الطابق",
                value = {"مساحه_الطابق_الواحد", "floor_area"}, 
		        metadata = {
					description = "",
					option = "", 
					type = "", 
		        }
            },
            {
                type = "row",
                label = "طبقه‌ئن",
                value = {
                    "طبقه‌ئن",
                    "طبقات",
                    "چن طبقه",
                    "چند طبقه",
                    "floors above ground",
                    "floor_count"
                },
                wikidata={property = "P1101"}, 
		        metadata = {
					description = "",
					option = "", 
					type = "", 
		        }
            },
            {
                type = "row",
                label = "جيرزيمي طبقه",
                value = {
                    "بنه‌وری طبقه",
                    "بنه‌وری طبقه‌ئون",
                    "جيرزيمي طبقه",
                    "floors below ground"
                },
                wikidata={property = "P1139"}, 
		        metadata = {
					description = "",
					option = "", 
					type = "", 
		        }
            }
        }
    }
end

function building.causeOfDestruction()
    return {
        type = "row",
        label = "رقد بدائن دلیل",
        value = {"رقد بدائن دلیل", "cause of destruction"},
        wikidata = {property = "P770"}, 
        metadata = {
			description = "",
			option = "", 
			type = "", 
        }
    }
end
building.destroyedby = building.causeOfDestruction

function building.material()
    return {
        type = "row",
        label = "ماده‌ئن",
        plurallabel = "بينأ ماده‌ئن",
        value = {"ماده بنا", "مواد", "material"},
        wikidata = {
            wikimod = "Wikidata.Ca",
            property = "P186",
            qualifier = "P518",
            formatting = "table",
            conjunction = "<br />",
            rowformat = "$0$R0 $1",
            rowsubformat1 = "<small>($1)</small>"
        }, 
        metadata = {
			description = "",
			option = "", 
			type = "", 
        }
    }
end

function building.colour()
    return {
        type = "row",
        label = "رنگ",
        plurallabel = "رنگان",
        value = {"رنگ", "رنگ"},
        wikidata={property = "P462"}, 
        metadata = {
			description = "",
			option = "", 
			type = "", 
        }
    }
end

function building.inscription()
    return {
        type = "row",
        label = "علامتون",
        value = {"علامتون"},
        wikidata = {
            wikimod = "Wikidata.Ca",
            property = "P1684",
            listmax = 1
        }, 
        metadata = {
			description = "نقوش والعلامات والتوقیعات على الموضوع",
			option = "", 
			type = "", 
        }
    }
end

function building.equipment()
    return {
        type = "row",
        description = "تجهیزاتی که ونه دله کار بزونه",
        label = "تجهیزات",
        plurallabel = "تجهیزات",
        value = {"تجهیزات"},
        wikidata={property = "P912"}, 
        metadata = {
			description = "",
			option = "", 
			type = "", 
        }
    }
end

function building.replaces()
    return {
        type = "row",
        label = "تغییر مکان",
        value = {"تغییر مکان","replaces"},
        wikidata={property = "P1398"}, 
        metadata = {
			description = "",
			option = "", 
			type = "", 
        }
    }
end

function building.replacedby()
    return {
        type = "row",
        label = "تغییر مکان توسط",
        value = {"تغییر مکان توسط","replaced_by"},
        wikidata={property = "P167"}, 
        metadata = {
			description = "",
			option = "", 
			type = "", 
        }
    }
end

function building.visitors()
    return {
        type = "row",
        label = "دئنکسان ٚ تعداد",
        value = {"هارشاکرون", "زائرون", "بازدیدکرون"},
        wikidata = {
            wikimod = "Wikidata.Ca",
            property = "P1174",
            showDate = "true",
            conjunction = "<br />",
            list = "bestrank"
        }, 
        metadata = {
			description = "",
			option = "", 
			type = "", 
        }
    }
end

function building.protection()
    return {
        type = "row",
        label = "Statut patrimonial",
        value = {"classement", "protection"},
        --wikidata = {property ='P1425'}, 
        metadata = {
			description = "",
			option = "", 
			type = "", 
        }
    }
end

function building.unesco()
    local id = localdata["رقم"]
    if (id == "-") then
        return nil
    end
    if id then
        id = "[http://whc.unesco.org/ar/list/" .. id .. " " .. id .. "]"
    else
        id = wd.formatAndCat {entity = item, property = "P757", urlpattern = "http://whc.unesco.org/ar/list/$1"}
    end
    if (not id) then
        return nil
    end
    return {
        type = "table",
        title = "[[File:World Heritage Emblem.svg|15px|alt=Logo du patrimoine mondial|link=موقع تراث عالمی]] تراث عالمی",
        rows = {
            {type = "row", label = "Désignation", value = "nom unesco"},
            {
                type = "row",
                label = "نوع",
                value = "نوع",
                wikidata = {property = "P1435", targetvalue = {"Q16617071", "Q52683527", "Q52683530"}}, 
		        metadata = {
					description = "",
					option = "", 
					type = "", 
		        }
            },
            {
                type = "row",
                label = "سال",
                value = "سال",
                wikidata = {
                    property = "P1435",
                    targetvalue = {"Q9259", "Q16617071", "Q52683527", "Q52683530"},
                    showonlyqualifier = {"P580"}
                }, 
		        metadata = {
					description = "",
					option = "", 
					type = "", 
		        }
            },
            {
                type = "row",
                label = "رقم التعریف",
                value = function()
                    return id
                end, 
		        metadata = {
					description = "",
					option = "", 
					type = "", 
		        }
            },
            {
                type = "row",
                label = "معیارون",
                singularlabel = "معیار",
                value = function(localdata)
                    if localdata["معیارون"] then
                        return "[http://whc.unesco.org/ar/criteres/" .. localdata["معیارون"] .. "]"
                    end
                end,
                wikidata = function(item)
                    local str, numclaims =
                        wd.formatStatements {
                        entity = item,
                        property = "P2614",
                        link = "-",
                        conjtype = " ",
                        returnnumberofvalues = true
                    }
                    if str then
                        return wd.formatAndCat {
                            value = "[http://whc.unesco.org/ar/criteres/$1 " .. str .. "]",
                            entity = item,
                            property = "P2614"
                        }, numclaims
                    end
                end, 
		        metadata = {
					description = "",
					option = "", 
					type = "", 
		        }
            },
            {type = "row", label = "Surface", value = "surface unesco"},
            {type = "row", label = "Zone tampon", value = "surface zone tampon unesco"}
        }
    }
end

function building.danger()
    return {
        type = "row",
        label = "خطر",
        plurallabel = "خطرات",
        value = {"خطر", "danger", "dangers"},
        wikidata = {
            wikimod = "Wikidata.Ca",
            property = "P3335",
            listmax = 5
        }, 
        metadata = {
			description = "مخاطر التی یتعرض لها",
			option = "", 
			type = "", 
        }
    }
end

function building.policy()
    return {
        type = "row",
        label = "قانون",
        plurallabel = "قوانین",
        value = {"قانون", "policy"},
        wikidata = {
            wikimod = "Wikidata.Ca",
            property = "P5023",
            listmax = 5
        }, 
        metadata = {
			description = "سیاسه والقوانین المتبعه",
			option = "", 
			type = "", 
        }
    }
end

function building.geoloc(params)
    return general.geoloc(params)
end

function building.awards()
    return general.awards(params)
end

function building.recordheld()
    return {
        type = "row",
        label = "رکورد",
        plurallabel = "رکوردها",
        value = {"رکورد", "record"},
        wikidata = {
            wikimod = "Wikidata.Ca",
            property = "P1000",
            showDate = "true",
            listmax = 3,
            conjunction = "<br />"
        }, 
        metadata = {
			description = "رکوردهایی که ونه وسه ثبت بیه",
			option = "", 
			type = "", 
        }
    }
end

function building.significantEvent()
    return {
        type = "row",
        label = "مۊهم ٚ تفاقان",
        value = {"اتفاقون", "مۊهم ٚ تفاقان", "significant_event", "events"},
        wikidata = {
            wikimod = "Wikidata.Ca",
            formatting = "table",
            property = "P793",
            qualifier1 = "P642",
            qualifier2 = "P585",
            qualifier3 = "P580",
            qualifier4 = "P582",
            rowsubformat1 = "$1 <small>$3</small>",
            rowsubformat2 = "$2 :",
            rowsubformat3 = "<br />($3$4)",
            rowsubformat4 = "&nbsp; - $4",
            rowformat = "* $2 $0 $1 $R0",

            conjunction = "<br />",
            blacklist0 = "Q18752057,Q385378,Q1370468,Q15051339,Q1417098," ..
                "Q125375,Q1306940,Q217102,Q2144402,Q18621193,Q331483," .. "Q17781833,Q6160,Q5135520"
        }, 
        metadata = {
			description = "مهم مهم اتفاقونی که ونه وسه دکته",
			option = "", 
			type = "", 
        }
    }
end

function building.facilities()
    return {
        type = "row", 
        label = "امکانات",
        value = {"امکانات", "facilities"},
        wikidata = {
            wikimod = "Wikidata.Ca",
            property = "P2670",
            formatting = "table",
            qualifier1 = "P1114 OR P31 OR P580 OR P582 OR P149",
            qualifier6 = "P1114",
            qualifier2 = "P31",
            qualifier3 = "P580",
            qualifier4 = "P582",
            qualifier5 = "P149",
            rowsubformat1 = ":<small>$6$2$3$5</small>",
            rowsubformat6 = "&nbsp;عدد $6",
            rowsubformat2 = "<br />&nbsp;$2",
            rowsubformat3 = "<br />&nbsp;(منذ $3$4)",
            rowsubformat4 = "&nbsp; حتى $4",
            rowsubformat5 = "&nbsp;''معماری سبک'': $5",
            rowformat = "* '''$0'''$R0 $1"
        },
        metadata = {
			description = "ايمکاناتي گه بينأ دأره",
			option = "", 
			type = "string", 
        }
    }
end


return building