Wikipedia avwiki https://av.wikipedia.org/wiki/%D0%91%D0%B5%D1%82%D3%80%D0%B5%D1%80%D0%B0%D0%B1_%D0%B3%D1%8C%D1%83%D0%BC%D0%B5%D1%80 MediaWiki 1.48.0-wmf.3 first-letter Медиа Хъулухъалъулаб БахӀс ГӀахьалчи ГӀахьалчиясул бахӀс Википедия Википедиялъул бахӀс Файл Файлалъул бахӀс MediaWiki MediaWiki-ялъул бахӀс Халип Халипалъул бахӀс Кумек Кумекалъул бахӀс Категория Категориялъул бахӀс TimedText TimedText talk Модуль Обсуждение модуля Event Event talk Генуб 0 2799 102340 101036 2026-11-05T06:40:46Z M. Omarius 10562 /* ГӀадамазул къадар */ 102340 wikitext text/x-wiki {{Infobox Dagestan inhabited locality |av_name = Генуб |ru_name = |inhabloc_type = Росу |inhabloc_type_ref = |inhabloc_cat = |inhabloc_cat_ref = |abolished_date = |loc_name1 = |loc_lang1 = |other_name = |image_skyline = Генуб 2.jpg |image_caption = Росдал цо роххен |image_flag = |flag_caption = |flag_border = |image_coa = |coa_caption = |etymology = "[[Гени|Ге́ни]]" абураб рагӀудаса |anthem = |anthem_ref = |image_map = |map_caption = |area_km2 = |district_map = Russia Dagestan Onsokolo District |map_label_position = |pushpin_map_caption = |pushpin_outside = |coordinates = |adm_district_jur = [[Онсоколо мухъ]] |adm_selsoviet_type = Росдал совет |adm_selsoviet_jur = Генуб росу |established_title = |established_date = |established_date_ref = |current_cat_date = |current_cat_date_ref = |abolished_date_ref = |representative_body = |representative_body_ref = |leader_title = |leader_title_ref = |leader_name = |leader_name_ref = |elevation_footnotes = |elevation_m = 495 |pop_2010census = |pop_2010census_ref = |pop_latest_date = 2025 ценз |pop_latest_ref = {{ЧР|Генуб|л}} |pop_latest = {{ЧР|Генуб|р}} |pop_2010census_rank = |pop_density = |population_demonym = Гена́л |ethnicity = [[Аварал]] |adm_city_jur = |capital_of = |adm_ctr_of = |adm_ctr_of1 = |adm_inhabloc_jur = |adm_city_jur_ref = |adm_inhabloc_jur_ref = |capital_of_ref = |adm_ctr_of2 = |adm_ctr_of1_ref = |adm_ctr_of2_ref = |adm_ctr_of_ref = |mun_district_jur = |urban_okrug_jur = |urban_settlement_jur = |mun_admctr_of = |mun_admctr_of1 = |rural_settlement_jur = |mun_admctr_of2 = |postal_codes = |postal_codes_ref = |dialing_codes = |dialing_codes_ref = |website = |embedded = |module = |pop_census = |pop_census_ref = |pop_census_rank = |federal_subject = |prev_name1= }} '''Гéнуб''' ккола [[Дагъистан]] республикалъул [[Унсоколо мухъ]]алъул кӀиабилеб кӀудияб росу. == Ракьхъвай == Генуб росу буго [[Гендерил мугӀрул|Гендерил щобикь]], [[АваргӀор|АваргӀорул]] рагӀалда. [[Шура|Шура]] ва [[МахӀачхъала]] шагьаралгун гьеб рекӀинабун буго [[Гендерил тунел]]. ==Этимология== ''Ге́нуб'' лӀугьана авар ''ге́ни'' абураб рагӀудасан, ''-б'' локативалъул (5 серия) квекудалъун. Гьелда рекъон ''Генуб''-алъул магӀна ккола «гени жаниб бугеб [бакӀ]». == Демография == {{ЧагӀазул рикӀкӀен|Генуб}} {{ЧагӀазул рикӀкӀен|Генуб|д}} Генуб буго моноэтникияб [[Аварал|авар]] росу, эб ккола [[Хьиндалазул бо|хьиндалазул бол]] чи гӏемерал росабазул цояб. Росдал чагӀазда ''гена́л'' абула. == Тарих == Цо тарихчагӀазул рикӀкӀадуда рекъон, жакъасеб Генуб росу бугеб бакӀалда гӀадамаз бетӀербахъи гьабулеб букӀанин 400-го соналдаса цебегоян цо пикруги буго, амма гьеб мекъ буго. Генур, аскӀоса гӀебедего гӀадин, гӀасрабаца руго бетӀербахъи гьабулел чагӀи. ТӀоцебе хъвалеб пикру буго росдал тарихчи МухӀамаднабил Ибрагьимовас жиндирго «Генуб. Тарихалъул нугӀзал» абураб тӀохьода <ref>«Гимры. Свидетели истории» Магомеднаби Ахмадович</ref>. Тарихчи, устаз Расул МухӀамадовасул, рикӀкӀадуда рекъон, Генуб росу ккола некӀсияб Сарир (яги Авар) абураб пачалихълъиядул тахшагьарлъун. Гьеб рикӀкӀен мекъ бугин чӀезабуна тарихчи [[Тимур Айтберов]]ас. Гьелдаса бахъун Генуб росдал тарих тӀалаб гьабун гьелъул цӀех-рех гьабичӀого тана гӀалимзабаз. Гьединлъидал Генуб росдал кьучӀаб тарих жакъаги мажгьулго хутӀулеб буго. === Генуб Кавказалъул рагъулӀ === {{main|Генуб росу бахъи}} [[Файл:Sturm_aul_Gimry_1891.jpg|thumb|left|250px|Паранц Рубоца бахъараб «Штурм аула Гимры» — абураб сурат (1891)]] Генуб ккола [[Кавказ]]алдаго ва тӀолабго дунялалдаго жал машгьурлъарал, кӀиявго Дагъистаналъул [[Имам ГъазимухӀамад]] ва [[имам Шамиль|Шамил]], жанир гьарураб ва гӀураб росулъун. 1817—1864 с.с. [[Россия]]лъул пачаяс [[Кавказ]]алъул халкъал мукӀур гьарун, гьел Россиялда гъоркь инаризелъиялъул мурадалда гьабураб, кӀудияб Кавказалъул рагъул заманаялъ, Генуб росулӀ Пачаясул рикӀкӀен гӀемерал рагъухъабазда данде вагъана Дагъистаналъул тӀоцевесев имам Генуса ГъазимухӀамад. 1832 соналъул 17 октябралъ генерал Розенил бетӀерлъиялда гъоркь букӀараб рагъулазул къокъаялъ Генуб росу кверде босана, халат бахъараб рагъудаса хадуб. ГӀурусазул рикӀкӀен букӀана гьеб рагъулӀ 10 азаргоялдаса цӀикӀкӀун. Гьеб къоялъ букӀараб хӀалуцараб, захӀматаб, чванлъаб рагъудаса хадуб, гӀурусал Генуре лӀугьана. Гьеб заманаялъ, [[Дагъистан]]алъул имам ГъазимухӀамад 15 муридгун цадахъ Гендерил къварилъухъ бугеб рокъор жанир рукӀана. Муридзабазда гьоркьов вукӀана Дагъистаналъул ва [[Буртиялъ|Чачанистаналъул]] вукӀинисев имам Шамилги. РикӀкӀен цӀикӀкӀарал гӀурусазул боялдаса хвасарлъиялде щаклъи ккедал, имам ГъазимухӀамадица хиял гьабуна, гӀурусазул боялде тӀаде кӀанцӀизе, гьелдалъун гьелги машгъул гьарун, рокъор жанир ругел муридзаби нахъасан къватӀире рорчӀизе. ХӀакъикъаталдаги гьедин ккана, рокъосан къватӀиве «Аллагьу Акбар»-инги ахӀулаго кӀанцӀарав ГъазимухӀамад тушбабазул хучдузда тӀаде ккана ва гьеб бакӀалда шагьидлъана. Рокъор жанир рукӀарал муридзаби нахъасан лӀутун инчӀо, «имам хваралъур хвезе хӀадур руго» — янги ахӀулаго гьез байбихьана тущманасда кьаби щвезабизе. Гьенир гьел киналго шагьидлъана цо имам Шамилги гьесда цадахъ вукӀарав гендерил будунги хутӀизегӀан, гьев кӀиявго квачараб хасало мехалъ ругънада рецӀцӀулаго рохьосан лӀутун Унсоколоре ана. Гьеб рагъулӀ гӀурусазул 480 го чиясе зарал ккана ва 41 чи чӀвана. ГъазимухӀамад чӀваялдалъун ва Генуб росу гӀурусаз босиялдалъун Кавказалъул рагъул тӀоцебесеб бутӀа лӀугӀана. === Генуб жакъасеб мехалъ === [[Файл:Бомбежка села Гимры.jpg|left|250px|thumb|2007 соналъ Генуб росдал рохьобе бомба бай]] [[1990]] - билеб соналдаса байбихьун жакъа-къоялде щвезегӀанги Генуб росулӀ рачӀун, гӀурусаз росу хъирщула. 2007 соналъул 15 декабралъ росулӀ лъазабуна КТО (гъачагъазда данде гьабулеб рагъулаб ищ) — абун цӀарги лъун, росдал сахал гӀолохъаби хъирщун гьел чӀвазе. Гьеб "рагъулаб ищ" гьабиялъе хӀужжалъун бачана 15 декабрялъ росулӀ, Дагъистаналъул Халкъияб Мажлисалъул депутат ГъазимухӀамад МухӀамадов чӀвай<ref>[http://ug.rian.ru/army/20090728/81849711.html Режим СКПО в дагестанском селе Гимры будет снят в начале августа, сообщает МВД]{{Хвараб регӀел|date=September 2023 |bot=InternetArchiveBot |fix-attempted=yes }}</ref>. [[2012 сон]]алъул [[10 январь|10 январалъ ]]Генубе бачӀана 150 гоялдаса цӀикӀкӀун рагъулаб бакӀаб техника. Россиялъул низам цӀунулез росу сверун ккуна. Жанире—къватӀире гӀадамал риччачӀо. Къаси сагӀат 8-гоялдаса радал сагӀат 7-го тӀубазегӀан рукъалъул рагьдегицин рахъине изну букӀинчӀо гендерие. Росу чанго батӀияб секторалде бикьун, щибаб рокъоре лӀугьун рукъзал хъирщана<ref>[http://www.kavkaz-uzel.ru/articles/199041/ В Дагестане жители Унцукульского района заявляют о блокировании силовиками селения Гимры]</ref>. [[13 январь|13 январалъ]] рузманалдаса рахъарал гендерил гӀолилал рукӀана росдал къулгӀадухъ хабар-кӀалалда. Цересан ине рукӀарал низам цӀунулез гьезие рагӀи балагьана. Ккана дагӀба, низам цӀунулез гьаваялде кьвагьана цо чанго нухалъ. Гьеб рагӀарал росуцоял ва рузман къоялъ росулъе бичи-хисиялъе рачӀун рукӀарал гьалбал тӀаде руссана. ЧӀахӀиял гӀадамаз гӀолилал нахъе рачана ва низам цӀунулел нахъе ана. Гьелдаса хадуб росулӀ кӀудияб данделъи гьабуна<ref>{{Cite web |title=В Гимрах состоялся сход сельчан |url=http://gimry.ucoz.com/news/v_gimrakh_sostojalsja_skhod_selchan/2012-01-13-14 |access-date=2012-06-04 |archive-date=2013-05-14 |archive-url=https://web.archive.org/web/20130514194040/http://gimry.ucoz.com/news/v_gimrakh_sostojalsja_skhod_selchan/2012-01-13-14 |url-status=dead }}</ref>, ва росдал жамагӀаталъ жидерго вакилзаби ритӀана, росдал аххада чадралги чӀван ругел низам цӀунулезухъе. Вакилзабаз гьезда абуна, метералде росулӀа къватӀире инчӀони Рихьуни ГЭСги рахан, республикаялъулаб нух [[МахӀачхъала]] - Мамрашги рахан жамагӀаталъ рази гьечӀеблъи загьир гьабизе буго-ян. Нахъисеб къоялъ радал 10-го тӀубалелде гьез росу тана. == МагӀишат == * Генуб буго 400 МВт къуваталъул, лъагӀалида жаниб 1,28 млрд кВт·ч. кьолеб Рихьуни, яги Иргьан ГЭС. * Консервазул завод ООО «Генуб». == Тарихиял бакӀал == * Гендерил сангар (Имам ГъазимухӀамад шагьидлъараб бакӀ) * Имамзабазул аллея (росдал бакьулӀ) * Накъшубандияб тӀарикъаталъул щайих [[Генуса ГӀабдуллагь-хӀажи|Генуса ГӀабдуллагь хӀажияс]] бараб бихьиназул хӀамам * Шамилги ГъазимухӀамадги цӀалараб мадраса * Гендерил тарихияб музей * Мадраса * [[Гендерил машинабазул тоннель]] == Машгьурал росуцоял == * [[Имам Шамил]] * [[Имам ГъазимухӀамад]] * [[Генуса ГӀабдуллагь-хӀажи|ГӀабдуллагь-хӀажияв устар]] — Накъшубандияб тӀарикъаталъул щайих * ГъазимухӀамад МухӀамадов - Дагъистаналъул ХС депутат * [[Сулайманов, ГӀалил МухӀамад|МухӀамад Сулайманов]] — [[Имарат Кавказ]]алъул 3-ев амир * [[ГӀабдулаев, ХӀажил МухӀамад|МухӀамад ГӀабдулаев]] — [[Имарат Кавказ]]алъул 4-ев амир * [[ХӀажидадаев, Шамилил Ибрагьим|Ибрагьим ХӀажидадаев]] — «ЖамагӀат ШаригӀат» абураб жигьад гьабулезул гӀуцӀцӀиялъул амир == Линкал == * [http://www.gimry.ucoz.com Генуб росдал культурияб ва харбазул сайт]{{Хвараб регӀел|date=April 2026 |bot=InternetArchiveBot |fix-attempted=yes }} == ХӀужаби == <references/> {{Унсоколо мухъалъул росаби}} {{Дагъистан}} [[Категория:Дагъистаналъул районал]] ajkqfa8yhiuknt0ltnh8qhm4b1p1kcx 102341 102340 2026-11-05T06:41:34Z M. Omarius 10562 /* Линкал */ 102341 wikitext text/x-wiki {{Infobox Dagestan inhabited locality |av_name = Генуб |ru_name = |inhabloc_type = Росу |inhabloc_type_ref = |inhabloc_cat = |inhabloc_cat_ref = |abolished_date = |loc_name1 = |loc_lang1 = |other_name = |image_skyline = Генуб 2.jpg |image_caption = Росдал цо роххен |image_flag = |flag_caption = |flag_border = |image_coa = |coa_caption = |etymology = "[[Гени|Ге́ни]]" абураб рагӀудаса |anthem = |anthem_ref = |image_map = |map_caption = |area_km2 = |district_map = Russia Dagestan Onsokolo District |map_label_position = |pushpin_map_caption = |pushpin_outside = |coordinates = |adm_district_jur = [[Онсоколо мухъ]] |adm_selsoviet_type = Росдал совет |adm_selsoviet_jur = Генуб росу |established_title = |established_date = |established_date_ref = |current_cat_date = |current_cat_date_ref = |abolished_date_ref = |representative_body = |representative_body_ref = |leader_title = |leader_title_ref = |leader_name = |leader_name_ref = |elevation_footnotes = |elevation_m = 495 |pop_2010census = |pop_2010census_ref = |pop_latest_date = 2025 ценз |pop_latest_ref = {{ЧР|Генуб|л}} |pop_latest = {{ЧР|Генуб|р}} |pop_2010census_rank = |pop_density = |population_demonym = Гена́л |ethnicity = [[Аварал]] |adm_city_jur = |capital_of = |adm_ctr_of = |adm_ctr_of1 = |adm_inhabloc_jur = |adm_city_jur_ref = |adm_inhabloc_jur_ref = |capital_of_ref = |adm_ctr_of2 = |adm_ctr_of1_ref = |adm_ctr_of2_ref = |adm_ctr_of_ref = |mun_district_jur = |urban_okrug_jur = |urban_settlement_jur = |mun_admctr_of = |mun_admctr_of1 = |rural_settlement_jur = |mun_admctr_of2 = |postal_codes = |postal_codes_ref = |dialing_codes = |dialing_codes_ref = |website = |embedded = |module = |pop_census = |pop_census_ref = |pop_census_rank = |federal_subject = |prev_name1= }} '''Гéнуб''' ккола [[Дагъистан]] республикалъул [[Унсоколо мухъ]]алъул кӀиабилеб кӀудияб росу. == Ракьхъвай == Генуб росу буго [[Гендерил мугӀрул|Гендерил щобикь]], [[АваргӀор|АваргӀорул]] рагӀалда. [[Шура|Шура]] ва [[МахӀачхъала]] шагьаралгун гьеб рекӀинабун буго [[Гендерил тунел]]. ==Этимология== ''Ге́нуб'' лӀугьана авар ''ге́ни'' абураб рагӀудасан, ''-б'' локативалъул (5 серия) квекудалъун. Гьелда рекъон ''Генуб''-алъул магӀна ккола «гени жаниб бугеб [бакӀ]». == Демография == {{ЧагӀазул рикӀкӀен|Генуб}} {{ЧагӀазул рикӀкӀен|Генуб|д}} Генуб буго моноэтникияб [[Аварал|авар]] росу, эб ккола [[Хьиндалазул бо|хьиндалазул бол]] чи гӏемерал росабазул цояб. Росдал чагӀазда ''гена́л'' абула. == Тарих == Цо тарихчагӀазул рикӀкӀадуда рекъон, жакъасеб Генуб росу бугеб бакӀалда гӀадамаз бетӀербахъи гьабулеб букӀанин 400-го соналдаса цебегоян цо пикруги буго, амма гьеб мекъ буго. Генур, аскӀоса гӀебедего гӀадин, гӀасрабаца руго бетӀербахъи гьабулел чагӀи. ТӀоцебе хъвалеб пикру буго росдал тарихчи МухӀамаднабил Ибрагьимовас жиндирго «Генуб. Тарихалъул нугӀзал» абураб тӀохьода <ref>«Гимры. Свидетели истории» Магомеднаби Ахмадович</ref>. Тарихчи, устаз Расул МухӀамадовасул, рикӀкӀадуда рекъон, Генуб росу ккола некӀсияб Сарир (яги Авар) абураб пачалихълъиядул тахшагьарлъун. Гьеб рикӀкӀен мекъ бугин чӀезабуна тарихчи [[Тимур Айтберов]]ас. Гьелдаса бахъун Генуб росдал тарих тӀалаб гьабун гьелъул цӀех-рех гьабичӀого тана гӀалимзабаз. Гьединлъидал Генуб росдал кьучӀаб тарих жакъаги мажгьулго хутӀулеб буго. === Генуб Кавказалъул рагъулӀ === {{main|Генуб росу бахъи}} [[Файл:Sturm_aul_Gimry_1891.jpg|thumb|left|250px|Паранц Рубоца бахъараб «Штурм аула Гимры» — абураб сурат (1891)]] Генуб ккола [[Кавказ]]алдаго ва тӀолабго дунялалдаго жал машгьурлъарал, кӀиявго Дагъистаналъул [[Имам ГъазимухӀамад]] ва [[имам Шамиль|Шамил]], жанир гьарураб ва гӀураб росулъун. 1817—1864 с.с. [[Россия]]лъул пачаяс [[Кавказ]]алъул халкъал мукӀур гьарун, гьел Россиялда гъоркь инаризелъиялъул мурадалда гьабураб, кӀудияб Кавказалъул рагъул заманаялъ, Генуб росулӀ Пачаясул рикӀкӀен гӀемерал рагъухъабазда данде вагъана Дагъистаналъул тӀоцевесев имам Генуса ГъазимухӀамад. 1832 соналъул 17 октябралъ генерал Розенил бетӀерлъиялда гъоркь букӀараб рагъулазул къокъаялъ Генуб росу кверде босана, халат бахъараб рагъудаса хадуб. ГӀурусазул рикӀкӀен букӀана гьеб рагъулӀ 10 азаргоялдаса цӀикӀкӀун. Гьеб къоялъ букӀараб хӀалуцараб, захӀматаб, чванлъаб рагъудаса хадуб, гӀурусал Генуре лӀугьана. Гьеб заманаялъ, [[Дагъистан]]алъул имам ГъазимухӀамад 15 муридгун цадахъ Гендерил къварилъухъ бугеб рокъор жанир рукӀана. Муридзабазда гьоркьов вукӀана Дагъистаналъул ва [[Буртиялъ|Чачанистаналъул]] вукӀинисев имам Шамилги. РикӀкӀен цӀикӀкӀарал гӀурусазул боялдаса хвасарлъиялде щаклъи ккедал, имам ГъазимухӀамадица хиял гьабуна, гӀурусазул боялде тӀаде кӀанцӀизе, гьелдалъун гьелги машгъул гьарун, рокъор жанир ругел муридзаби нахъасан къватӀире рорчӀизе. ХӀакъикъаталдаги гьедин ккана, рокъосан къватӀиве «Аллагьу Акбар»-инги ахӀулаго кӀанцӀарав ГъазимухӀамад тушбабазул хучдузда тӀаде ккана ва гьеб бакӀалда шагьидлъана. Рокъор жанир рукӀарал муридзаби нахъасан лӀутун инчӀо, «имам хваралъур хвезе хӀадур руго» — янги ахӀулаго гьез байбихьана тущманасда кьаби щвезабизе. Гьенир гьел киналго шагьидлъана цо имам Шамилги гьесда цадахъ вукӀарав гендерил будунги хутӀизегӀан, гьев кӀиявго квачараб хасало мехалъ ругънада рецӀцӀулаго рохьосан лӀутун Унсоколоре ана. Гьеб рагъулӀ гӀурусазул 480 го чиясе зарал ккана ва 41 чи чӀвана. ГъазимухӀамад чӀваялдалъун ва Генуб росу гӀурусаз босиялдалъун Кавказалъул рагъул тӀоцебесеб бутӀа лӀугӀана. === Генуб жакъасеб мехалъ === [[Файл:Бомбежка села Гимры.jpg|left|250px|thumb|2007 соналъ Генуб росдал рохьобе бомба бай]] [[1990]] - билеб соналдаса байбихьун жакъа-къоялде щвезегӀанги Генуб росулӀ рачӀун, гӀурусаз росу хъирщула. 2007 соналъул 15 декабралъ росулӀ лъазабуна КТО (гъачагъазда данде гьабулеб рагъулаб ищ) — абун цӀарги лъун, росдал сахал гӀолохъаби хъирщун гьел чӀвазе. Гьеб "рагъулаб ищ" гьабиялъе хӀужжалъун бачана 15 декабрялъ росулӀ, Дагъистаналъул Халкъияб Мажлисалъул депутат ГъазимухӀамад МухӀамадов чӀвай<ref>[http://ug.rian.ru/army/20090728/81849711.html Режим СКПО в дагестанском селе Гимры будет снят в начале августа, сообщает МВД]{{Хвараб регӀел|date=September 2023 |bot=InternetArchiveBot |fix-attempted=yes }}</ref>. [[2012 сон]]алъул [[10 январь|10 январалъ ]]Генубе бачӀана 150 гоялдаса цӀикӀкӀун рагъулаб бакӀаб техника. Россиялъул низам цӀунулез росу сверун ккуна. Жанире—къватӀире гӀадамал риччачӀо. Къаси сагӀат 8-гоялдаса радал сагӀат 7-го тӀубазегӀан рукъалъул рагьдегицин рахъине изну букӀинчӀо гендерие. Росу чанго батӀияб секторалде бикьун, щибаб рокъоре лӀугьун рукъзал хъирщана<ref>[http://www.kavkaz-uzel.ru/articles/199041/ В Дагестане жители Унцукульского района заявляют о блокировании силовиками селения Гимры]</ref>. [[13 январь|13 январалъ]] рузманалдаса рахъарал гендерил гӀолилал рукӀана росдал къулгӀадухъ хабар-кӀалалда. Цересан ине рукӀарал низам цӀунулез гьезие рагӀи балагьана. Ккана дагӀба, низам цӀунулез гьаваялде кьвагьана цо чанго нухалъ. Гьеб рагӀарал росуцоял ва рузман къоялъ росулъе бичи-хисиялъе рачӀун рукӀарал гьалбал тӀаде руссана. ЧӀахӀиял гӀадамаз гӀолилал нахъе рачана ва низам цӀунулел нахъе ана. Гьелдаса хадуб росулӀ кӀудияб данделъи гьабуна<ref>{{Cite web |title=В Гимрах состоялся сход сельчан |url=http://gimry.ucoz.com/news/v_gimrakh_sostojalsja_skhod_selchan/2012-01-13-14 |access-date=2012-06-04 |archive-date=2013-05-14 |archive-url=https://web.archive.org/web/20130514194040/http://gimry.ucoz.com/news/v_gimrakh_sostojalsja_skhod_selchan/2012-01-13-14 |url-status=dead }}</ref>, ва росдал жамагӀаталъ жидерго вакилзаби ритӀана, росдал аххада чадралги чӀван ругел низам цӀунулезухъе. Вакилзабаз гьезда абуна, метералде росулӀа къватӀире инчӀони Рихьуни ГЭСги рахан, республикаялъулаб нух [[МахӀачхъала]] - Мамрашги рахан жамагӀаталъ рази гьечӀеблъи загьир гьабизе буго-ян. Нахъисеб къоялъ радал 10-го тӀубалелде гьез росу тана. == МагӀишат == * Генуб буго 400 МВт къуваталъул, лъагӀалида жаниб 1,28 млрд кВт·ч. кьолеб Рихьуни, яги Иргьан ГЭС. * Консервазул завод ООО «Генуб». == Тарихиял бакӀал == * Гендерил сангар (Имам ГъазимухӀамад шагьидлъараб бакӀ) * Имамзабазул аллея (росдал бакьулӀ) * Накъшубандияб тӀарикъаталъул щайих [[Генуса ГӀабдуллагь-хӀажи|Генуса ГӀабдуллагь хӀажияс]] бараб бихьиназул хӀамам * Шамилги ГъазимухӀамадги цӀалараб мадраса * Гендерил тарихияб музей * Мадраса * [[Гендерил машинабазул тоннель]] == Машгьурал росуцоял == * [[Имам Шамил]] * [[Имам ГъазимухӀамад]] * [[Генуса ГӀабдуллагь-хӀажи|ГӀабдуллагь-хӀажияв устар]] — Накъшубандияб тӀарикъаталъул щайих * ГъазимухӀамад МухӀамадов - Дагъистаналъул ХС депутат * [[Сулайманов, ГӀалил МухӀамад|МухӀамад Сулайманов]] — [[Имарат Кавказ]]алъул 3-ев амир * [[ГӀабдулаев, ХӀажил МухӀамад|МухӀамад ГӀабдулаев]] — [[Имарат Кавказ]]алъул 4-ев амир * [[ХӀажидадаев, Шамилил Ибрагьим|Ибрагьим ХӀажидадаев]] — «ЖамагӀат ШаригӀат» абураб жигьад гьабулезул гӀуцӀцӀиялъул амир == Галерея == <gallery> Файл:Село Гимры.JPG|Жакъа Генуб File:Аул Гимры.jpg|Росдал гӀаммаб сурат File:Village Gimry in Dagestan2.jpg|Росдал аслияб рахъ </gallery> == Линкал == * [http://www.gimry.ucoz.com Генуб росдал культурияб ва харбазул сайт]{{Хвараб регӀел|date=April 2026 |bot=InternetArchiveBot |fix-attempted=yes }} == ХӀужаби == <references/> {{Унсоколо мухъалъул росаби}} {{Дагъистан}} [[Категория:Дагъистаналъул районал]] eqt28mw3s342p4u0u5cworwuvk6ukn7 Шамилил мухъ 0 8721 102359 100840 2026-11-05T09:48:45Z M. Omarius 10562 102359 wikitext text/x-wiki {{Infobox Dagestanian district | av_name = Шамилил мухъ | ru_name = | loc_name1 = | loc_lang1 = | loc_name2 = | loc_lang2 = | image_view = С-Нижний Батлух, Шамильского района 2013-04-05 20-15.jpg | image_caption = Гъоркьа Бакълъухъ, мухъалъул росабазул цояб | image_flag = | image_coa = Coat of Arms of Shamilsky rayon (Dagestan).jpg | image_map = {{Russia district OSM map}} | map_caption = Шамилил мухъ Дагъистаналъул картаялда | pushpin_map = | coordinates = {{coord|42|27|N|46|33|E|type:adm2nd_region:RU|display=inline,title}} | district = | type = | city = | city_ref = | established_date = | established_date_ref = | adm_ctr_name = [[ХӀебда]] | adm_ctr_ref = <ref name="RDagestan_admlaw" /> <!-- government --> | mun_formation1_leader_name = | mun_formation1_representative_body = | mun_formation1_representative_body_ref = | mun_formation1_leader_title = | mun_formation1_leader_title_ref = | mun_formation1_leader_name_ref = <!-- area --> | area_km2 = {{Infobox Dagestanian district/area|Шамилил мухъ}} | area_km2_ref = <ref name='82_8006001'>{{Cite web |url=http://www.gks.ru/dbscripts/munst/munst82/DBInet.cgi?pl=8006001 |title=Республика Дагестан. Общая площадь земель муниципального образования |trans-title= Дагъистаналъул Республика. Муниципалаб гӀуцӀалил ракьазул тӀолаб гӀатӀилъи |access-date=2016-07-14 |archive-date=2017-08-06 |archive-url=https://web.archive.org/web/20170806223020/http://www.gks.ru/dbscripts/munst/munst82/DBInet.cgi?pl=8006001 }}</ref> | area_rank = 15 <!-- population --> | pop_latest = {{ЧагӀазул рикӀкӀен|Шамилил мухъ|р}} | pop_latest_date = {{ЧагӀазул рикӀкӀен|Шамилил мухъ|с}} | pop_latest_ref = {{ЧагӀазул рикӀкӀен|Шамилил мухъ|л}} | population_rank = | population_density = | urban_pop = 0 | rural_pop = 100 | ethnicity = [[Аварал]] <!-- administrative status --> | no_of_towns_of_district_significance = | no_of_urban-type_settlements_of_district_significance = | no_of_selsoviets_type1 = 15 | no_of_selsoviets_type2 = 10 | no_of_rural_localities = 52 | selsoviet_type1 = росдал совет | selsoviet_type2 = ''росу'' | counts_ref = <ref name="OKATO2" /> <!-- administrative status --> | mun_formation1 = Шамилил муниципалаб мухъ | mun_formation2 = | mun_formation1_ref = <ref name="RDagestan_mun" /> | mun_formation1_no_of_urban_settlements = | mun_formation1_no_of_rural_settlements = 25 | mun_formation1_counts_ref = <ref name="RDagestan_mun" /> | website = }} '''Шамилил мухъ''', цебесеб '''Къахӏиб мухъ''', буго [[Дагъистаналъул административияб рикьи|административиябгун территориалаб цвелги]]<ref name="RDagestan_admlaw">{{Cite web |url=http://docs.cntd.ru/document/802038531 |title=Закон Республики Дагестан от 10 апреля 2002 года N 16 «Об административно-территориальном устройстве Республики Дагестан» |trans-title= Дагъистаналъул Республикаялъул акт 2002 сонил 10 апрелалдаса N 16 «Дагъистаналъул Республикалъул административиябгун территориалаб гӀуцӀи́ялъул» |access-date=2016-09-23 |archive-date=2018-04-02 |archive-url=https://web.archive.org/web/20180402175449/http://docs.cntd.ru/document/802038531 }}</ref> [[Муниципалаб гӀуцӀел|муниципалаб гӀуцӀелги]]<ref name="RDagestan_mun">{{cite web |url = https://docs.cntd.ru/document/802037479 |title = Закон Республики Дагестан от 13 января 2005 года № 6 «О статусе муниципальных образований Республики Дагестан» |trans-title=Дагъистаналъул Республикаялъул акт 2005 сонил 13 январалдаса N 6 «Дагъистаналъул Республикаялъул муниципалал гӀуцӀалабазул статусалъул»|archive-url = https://web.archive.org/web/20220407093518/https://docs.cntd.ru/document/802037479 |archive-date = 2022-04-07 |access-date = 2022-06-20 }}</ref> ([[Муницпалаб район (Россия)|муниципалаб район]]), жиб Россиялъул [[Дагъистан|Дагъистаналда]] гъорлӀ бугеб. Элъул территориялъул гӀатӀилъи буго {{Infobox Dagestanian district/area|Шамилил мухъ}} кв. км.<ref name='82_8006001' /> Мухъалъул административияб центер ккола [[ХӀебда]]. == География == Шамилил мухъ буго [[Дагъистан]]алъул жанубиябгин бакътӀерхьул рахъалда. ГӀурхъи цураб буго шималалда — [[Хунзахъ мухъ|Хунзахъ]], бакъбаккуда — [[Гъуниб мухъ|Гъуниб]], жанубиябгин бакъбаккуда — [[ЧӀарада мухъ|ЧӀарада]], жанубиябгин бакътӀерхьуда [[ЛъаратӀа мухъ|ЛъаратӀа]], бакътӀерхьуда — [[ЦӀумада мухъ|ЦӀумада]] ва шималиябгин бакътӀерхьудехун [[ГӀахьвахъ мухъ|ГӀахьвахъ]] мухъазулгун.<ref>[http://dagestan.roskazna.ru/news/6090/6073 Шамилил мухъ]{{Хвараб регӀел|date=September 2023 |bot=InternetArchiveBot |fix-attempted=yes }}</ref>. Территориялъул гӀатӀилъи буго {{Infobox Dagestanian district/area|Шамилил мухъ}} км<sup>2</sup>, элъул рахъалъ, Дагъистаналъул цогидал мухъазда гьоркьоб, Кули мухъ буго 15-абилеб бакӀалда (республикалъул тӀолаб гӀатӀилъудаса {{#expr: {{Infobox Dagestanian district/area|Шамилил мухъ}} * 100 / {{Infobox Dagestanian district/area|Дагъистан}} round 2|R}}&nbsp;%). == Демография == {{ЧагӀазул рикӀкӀен| Шамилил мухъ }} {{ЧагӀазул рикӀкӀен| Шамилил мухъ |график}} === Националаб гӀуцӀи === ТӀолго россиялъулаб 2010 сонил цензалда рекъон, националаб гуцӏи букӏана хадусеб:<ref>{{cite web|url=http://dagstat.gks.ru/wps/wcm/connect/rosstat_ts/dagstat/resources/cafa4e00421f0cb8805fcc2d59c15b71/ВПН+том3.rar|title=ВПН том 3. Таблица 4. Население по национальности и владению русским языком по городским округам и муниципальным районам республики Дагестан|access-date=2019-10-27|archive-url=https://web.archive.org/web/20171011191513/http://dagstat.gks.ru/wps/wcm/connect/rosstat_ts/dagstat/resources/cafa4e00421f0cb8805fcc2d59c15b71/%D0%92%D0%9F%D0%9D+%D1%82%D0%BE%D0%BC3.rar|archive-date=2017-10-11|url-status=dead}}</ref>: {|class="wikitable" |- ! Этникияб<br>къокъа !! РикӀкӀен,<br>чи !! БутӀа<br>% |- | [[аварал]] || align="right" | 27,744 || align="right" | 98.7&nbsp;% |- | цогидал || align="right" | 378 || align="right" | 1,3&nbsp;% |- | '''киналниги''' || align="right" | '''28,122''' || align="right" | '''100&nbsp;%''' |} ТӀолго россиялъулаб 2020–2021 соназул цензалда рекъон:<ref>{{Cite web |url=https://05.rosstat.gov.ru/itogi |title=Территориальный орган Федеральной службы государственной системы по Республики Дагестан — итоги Всероссийской переписи населения 2020 года |access-date=2023-07-08 |archive-date=2023-07-08 |archive-url=https://web.archive.org/web/20230708124610/https://05.rosstat.gov.ru/itogi }}</ref>: {|class="wikitable" |- ! Этникияб<br>къокъа !! РикӀкӀен,<br>чи !! БутӀа<br>% |- | [[аварал]] || align="right" | 29,532 || align="right" | 97.06&nbsp;% |- | цогидал || align="right" | 894 || align="right" | 2.94&nbsp;% |- | '''киналниги''' || align="right" | '''30,426''' || align="right" | '''100,00&nbsp;%''' |} ==Административиябги муниципалабги статус== Административияб рикьуда жаниб, Шамилил мухъ буго республикалъул [[Дагъистаналъул административияб рикьи|41 районалъул]] цояб.<ref name="RDagestan_admlaw" /> Эб бикьула 10 [[Дагъистаналъул росдал советал|росдал советалдеги]], 15 росдадеги, жидеца кинабниги 52 росу жанибе бачарал.<ref name="OKATO2">{{OKATO reference|82 246}}</ref> Муниципалаб гӀуцӀел гӀадин, мухъ гъорлӀе бачун буго Шамилил муниципалаб районлъун.<ref name="RDagestan_mun" /> Элъул анцӏго росдал советги анцӏила щуго росуги гъорлӏе бачун буго муниципалаб районалде къоло щуго муницпалаб гӀуцӀеллъун, жиндир [[росдал поселение]] абун статус бугеб.<ref name="RDagestan_mun" /> [[Вачи]] ''[[росу#Россия|росу]]'' буго административиябги<ref name="RDagestan_admlaw" /> муниципалабги<ref name="OKTMO">{{OKTMO reference|82 646}}</ref> районалъул центер. == Росаби == Шамилил мухъалда буго 52 росдалаб чӀел-бакӀ.<ref name="реестрАТЕ">{{Cite web |url=http://minyustrd.ru/otkrytye-dannye/item/id/148 |title=Единый реестр административно-территориальных единиц Республики Дагестан от 27.07.2018 N 00|trans-title=Дагъистаналъул Республикалъул административ-территориалал цвелазул цохӀояб реестер N 00, 2018, 07 июлалдаса |access-date=2020-06-19 |archive-date=2020-06-22 |archive-url=https://web.archive.org/web/20200622030725/http://minyustrd.ru/otkrytye-dannye/item/id/148 |url-status=live }}</ref><ref name="RDagestan_admlaw" /> == Референсал == {{Reflist}} {{Шамилил мухъ}} {{Дагъистан}} [[Категория:Дагъистаналъул мухъал]] b30scmu4djfflto4vprn06s4yr0o0ov Модуль:WikidataIB 828 13078 102358 93444 2026-11-05T08:35:57Z M. Omarius 10562 102358 Scribunto text/plain -- Version: 2023-07-10 -- Module to implement use of a blacklist and whitelist for infobox fields -- Can take a named parameter |qid which is the Wikidata ID for the article -- if not supplied, it will use the Wikidata ID associated with the current page. -- Fields in blacklist are never to be displayed, i.e. module must return nil in all circumstances -- Fields in whitelist return local value if it exists or the Wikidata value otherwise -- The name of the field that this function is called from is passed in named parameter |name -- The name is compulsory when blacklist or whitelist is used, -- so the module returns nil if it is not supplied. -- blacklist is passed in named parameter |suppressfields (or |spf) -- whitelist is passed in named parameter |fetchwikidata (or |fwd) require("strict") local p = {} local cdate -- initialise as nil and only load _complex_date function if needed -- Module:Complex date is loaded lazily and has the following dependencies: -- Module:Calendar -- Module:ISOdate -- Module:DateI18n -- Module:I18n/complex date -- Module:Ordinal -- Module:I18n/ordinal -- Module:Yesno -- Module:Formatnum -- Module:Linguistic -- -- The following, taken from https://www.mediawiki.org/wiki/Wikibase/DataModel#Dates_and_times, -- is needed to use Module:Complex date which seemingly requires date precision as a string. -- It would work better if only the authors of the mediawiki page could spell 'millennium'. local dp = { [6] = "millennium", [7] = "century", [8] = "decade", [9] = "year", [10] = "month", [11] = "day", } local i18n = { ["errors"] = { ["property-not-found"] = "Property not found.", ["No property supplied"] = "No property supplied", ["entity-not-found"] = "Wikidata entity not found.", ["unknown-claim-type"] = "Unknown claim type.", ["unknown-entity-type"] = "Unknown entity type.", ["qualifier-not-found"] = "Qualifier not found.", ["site-not-found"] = "Wikimedia project not found.", ["labels-not-found"] = "No labels found.", ["descriptions-not-found"] = "No descriptions found.", ["aliases-not-found"] = "No aliases found.", ["unknown-datetime-format"] = "Unknown datetime format.", ["local-article-not-found"] = "Article is available on Wikidata, but not on Wikipedia", ["dab-page"] = " (dab)", }, ["months"] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }, ["century"] = "century", ["BC"] = "BC", ["BCE"] = "BCE", ["ordinal"] = { [1] = "st", [2] = "nd", [3] = "rd", ["default"] = "th" }, ["filespace"] = "File", ["Unknown"] = "Unknown", ["NaN"] = "Not a number", -- set the following to the name of a tracking category, -- e.g. "[[Category:Articles with missing Wikidata information]]", or "" to disable: ["missinginfocat"] = "[[Category:Articles with missing Wikidata information]]", ["editonwikidata"] = "Edit this on Wikidata", ["latestdatequalifier"] = function (date) return "before " .. date end, -- some languages, e.g. Bosnian use a period as a suffix after each number in a date ["datenumbersuffix"] = "", ["list separator"] = ", ", ["multipliers"] = { [0] = "", [3] = " thousand", [6] = " million", [9] = " billion", [12] = " trillion", } } -- This allows an internationisation module to override the above table if 'en' ~= mw.getContentLanguage():getCode() then require("Module:i18n").loadI18n("Module:WikidataIB/i18n", i18n) end -- This piece of html implements a collapsible container. Check the classes exist on your wiki. local collapsediv = '<div class="mw-collapsible mw-collapsed" style="width:100%; overflow:auto;" data-expandtext="{{int:show}}" data-collapsetext="{{int:hide}}">' -- Some items should not be linked. -- Each wiki can create a list of those in Module:WikidataIB/nolinks -- It should return a table called itemsindex, containing true for each item not to be linked local donotlink = {} local nolinks_exists, nolinks = pcall(mw.loadData, "Module:WikidataIB/nolinks") if nolinks_exists then donotlink = nolinks.itemsindex end -- To satisfy Wikipedia:Manual of Style/Titles, certain types of items are italicised, and others are quoted. -- The submodule [[Module:WikidataIB/titleformats]] lists the entity-ids used in 'instance of' (P31), -- which allows this module to identify the values that should be formatted. -- WikidataIB/titleformats exports a table p.formats, which is indexed by entity-id, and contains the value " or '' local formats = {} local titleformats_exists, titleformats = pcall(mw.loadData, "Module:WikidataIB/titleformats") if titleformats_exists then formats = titleformats.formats end ------------------------------------------------------------------------------- -- Private functions ------------------------------------------------------------------------------- -- ------------------------------------------------------------------------------- -- makeOrdinal needs to be internationalised along with the above: -- takes cardinal number as a numeric and returns the ordinal as a string -- we need three exceptions in English for 1st, 2nd, 3rd, 21st, .. 31st, etc. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local makeOrdinal = function(cardinal) local ordsuffix = i18n.ordinal.default if cardinal % 10 == 1 then ordsuffix = i18n.ordinal[1] elseif cardinal % 10 == 2 then ordsuffix = i18n.ordinal[2] elseif cardinal % 10 == 3 then ordsuffix = i18n.ordinal[3] end -- In English, 1, 21, 31, etc. use 'st', but 11, 111, etc. use 'th' -- similarly for 12 and 13, etc. if (cardinal % 100 == 11) or (cardinal % 100 == 12) or (cardinal % 100 == 13) then ordsuffix = i18n.ordinal.default end return tostring(cardinal) .. ordsuffix end ------------------------------------------------------------------------------- -- findLang takes a "langcode" parameter if supplied and valid -- otherwise it tries to create it from the user's set language ({{int:lang}}) -- failing that it uses the wiki's content language. -- It returns a language object ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local findLang = function(langcode) local langobj langcode = mw.text.trim(langcode or "") if mw.language.isKnownLanguageTag(langcode) then langobj = mw.language.new( langcode ) else langcode = mw.getCurrentFrame():callParserFunction('int', {'lang'}) if mw.language.isKnownLanguageTag(langcode) then langobj = mw.language.new( langcode ) else langobj = mw.language.getContentLanguage() end end return langobj end ------------------------------------------------------------------------------- -- _getItemLangCode takes a qid parameter (using the current page's qid if blank) -- If the item for that qid has property country (P17) it looks at the first preferred value -- If the country has an official language (P37), it looks at the first preferred value -- If that official language has a language code (P424), it returns the first preferred value -- Otherwise it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local _getItemLangCode = function(qid) qid = mw.text.trim(qid or ""):upper() if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return end local prop17 = mw.wikibase.getBestStatements(qid, "P17")[1] if not prop17 or prop17.mainsnak.snaktype ~= "value" then return end local qid17 = prop17.mainsnak.datavalue.value.id local prop37 = mw.wikibase.getBestStatements(qid17, "P37")[1] if not prop37 or prop37.mainsnak.snaktype ~= "value" then return end local qid37 = prop37.mainsnak.datavalue.value.id local prop424 = mw.wikibase.getBestStatements(qid37, "P424")[1] if not prop424 or prop424.mainsnak.snaktype ~= "value" then return end return prop424.mainsnak.datavalue.value end ------------------------------------------------------------------------------- -- roundto takes a number (x) -- and returns it rounded to (sf) significant figures ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local roundto = function(x, sf) if x == 0 then return 0 end local s = 1 if x < 0 then x = -x s = -1 end if sf < 1 then sf = 1 end local p = 10 ^ (math.floor(math.log10(x)) - sf + 1) x = math.floor(x / p + 0.5) * p * s -- if it's integral, cast to an integer: if x == math.floor(x) then x = math.floor(x) end return x end ------------------------------------------------------------------------------- -- decimalToDMS takes a decimal degrees (x) with precision (p) -- and returns degrees/minutes/seconds according to the precision ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local decimalToDMS = function(x, p) -- if p is not supplied, use a precision around 0.1 seconds if not tonumber(p) then p = 1e-4 end local d = math.floor(x) local ms = (x - d) * 60 if p > 0.5 then -- precision is > 1/2 a degree if ms > 30 then d = d + 1 end ms = 0 end local m = math.floor(ms) local s = (ms - m) * 60 if p > 0.008 then -- precision is > 1/2 a minute if s > 30 then m = m +1 end s = 0 elseif p > 0.00014 then -- precision is > 1/2 a second s = math.floor(s + 0.5) elseif p > 0.000014 then -- precision is > 1/20 second s = math.floor(10 * s + 0.5) / 10 elseif p > 0.0000014 then -- precision is > 1/200 second s = math.floor(100 * s + 0.5) / 100 else -- cap it at 3 dec places for now s = math.floor(1000 * s + 0.5) / 1000 end return d, m, s end ------------------------------------------------------------------------------- -- decimalPrecision takes a decimal (x) with precision (p) -- and returns x rounded approximately to the given precision -- precision should be between 1 and 1e-6, preferably a power of 10. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local decimalPrecision = function(x, p) local s = 1 if x < 0 then x = -x s = -1 end -- if p is not supplied, pick an arbitrary precision if not tonumber(p) then p = 1e-4 elseif p > 1 then p = 1 elseif p < 1e-6 then p = 1e-6 else p = 10 ^ math.floor(math.log10(p)) end x = math.floor(x / p + 0.5) * p * s -- if it's integral, cast to an integer: if x == math.floor(x) then x = math.floor(x) end -- if it's less than 1e-4, it will be in exponent form, so return a string with 6dp -- 9e-5 becomes 0.000090 if math.abs(x) < 1e-4 then x = string.format("%f", x) end return x end ------------------------------------------------------------------------------- -- formatDate takes a datetime of the usual format from mw.wikibase.entity:formatPropertyValues -- like "1 August 30 BCE" as parameter 1 -- and formats it according to the df (date format) and bc parameters -- df = ["dmy" / "mdy" / "y"] default will be "dmy" -- bc = ["BC" / "BCE"] default will be "BCE" ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local format_Date = function(datetime, dateformat, bc) local datetime = datetime or "1 August 30 BCE" -- in case of nil value -- chop off multiple vales and/or any hours, mins, etc. -- keep anything before punctuation - we just want a single date: local dateval = string.match( datetime, "[%w ]+") local dateformat = string.lower(dateformat or "dmy") -- default to dmy local bc = string.upper(bc or "") -- can't use nil for bc -- we only want to accept two possibilities: BC or default to BCE if bc == "BC" then bc = "&nbsp;" .. i18n["BC"] -- prepend a non-breaking space. else bc = "&nbsp;" .. i18n["BCE"] end local postchrist = true -- start by assuming no BCE local dateparts = {} for word in string.gmatch(dateval, "%w+") do if word == "BCE" or word == "BC" then -- *** internationalise later *** postchrist = false else -- we'll keep the parts that are not 'BCE' in a table dateparts[#dateparts + 1] = word end end if postchrist then bc = "" end -- set AD dates to no suffix *** internationalise later *** local sep = "&nbsp;" -- separator is nbsp local fdate = table.concat(dateparts, sep) -- set formatted date to same order as input -- if we have day month year, check dateformat if #dateparts == 3 then if dateformat == "y" then fdate = dateparts[3] elseif dateformat == "mdy" then fdate = dateparts[2] .. sep .. dateparts[1] .. "," .. sep .. dateparts[3] end elseif #dateparts == 2 and dateformat == "y" then fdate = dateparts[2] end return fdate .. bc end ------------------------------------------------------------------------------- -- dateFormat is the handler for properties that are of type "time" -- It takes timestamp, precision (6 to 11 per mediawiki), dateformat (y/dmy/mdy), BC format (BC/BCE), -- a plaindate switch (yes/no/adj) to en/disable "sourcing circumstances"/use adjectival form, -- any qualifiers for the property, the language, and any adjective to use like 'before'. -- It passes the date through the "complex date" function -- and returns a string with the internatonalised date formatted according to preferences. ------------------------------------------------------------------------------- -- Dependencies: findLang(); cdate(); dp[] ------------------------------------------------------------------------------- local dateFormat = function(timestamp, dprec, df, bcf, pd, qualifiers, lang, adj, model) -- output formatting according to preferences (y/dmy/mdy/ymd) df = (df or ""):lower() -- if ymd is required, return the part of the timestamp in YYYY-MM-DD form -- but apply Year zero#Astronomers fix: 1 BC = 0000; 2 BC = -0001; etc. if df == "ymd" then if timestamp:sub(1,1) == "+" then return timestamp:sub(2,11) else local yr = tonumber(timestamp:sub(2,5)) - 1 yr = ("000" .. yr):sub(-4) if yr ~= "0000" then yr = "-" .. yr end return yr .. timestamp:sub(6,11) end end -- A year can be stored like this: "+1872-00-00T00:00:00Z", -- which is processed here as if it were the day before "+1872-01-01T00:00:00Z", -- and that's the last day of 1871, so the year is wrong. -- So fix the month 0, day 0 timestamp to become 1 January instead: timestamp = timestamp:gsub("%-00%-00T", "-01-01T") -- just in case date precision is missing dprec = dprec or 11 -- override more precise dates if required dateformat is year alone: if df == "y" and dprec > 9 then dprec = 9 end -- complex date only deals with precisions from 6 to 11, so clip range dprec = dprec>11 and 11 or dprec dprec = dprec<6 and 6 or dprec -- BC format is "BC" or "BCE" bcf = (bcf or ""):upper() -- plaindate only needs the first letter (y/n/a) pd = (pd or ""):sub(1,1):lower() if pd == "" or pd == "n" or pd == "f" or pd == "0" then pd = false end -- in case language isn't passed lang = lang or findLang().code -- set adj as empty if nil adj = adj or "" -- extract the day, month, year from the timestamp local bc = timestamp:sub(1, 1)=="-" and "BC" or "" local year, month, day = timestamp:match("[+-](%d*)-(%d*)-(%d*)T") local iso = tonumber(year) -- if year is missing, let it throw an error -- this will adjust the date format to be compatible with cdate -- possible formats are Y, YY, YYY0, YYYY, YYYY-MM, YYYY-MM-DD if dprec == 6 then iso = math.floor( (iso - 1) / 1000 ) + 1 end if dprec == 7 then iso = math.floor( (iso - 1) / 100 ) + 1 end if dprec == 8 then iso = math.floor( iso / 10 ) .. "0" end if dprec == 10 then iso = year .. "-" .. month end if dprec == 11 then iso = year .. "-" .. month .. "-" .. day end -- add "circa" (Q5727902) from "sourcing circumstances" (P1480) local sc = not pd and qualifiers and qualifiers.P1480 if sc then for k1, v1 in pairs(sc) do if v1.datavalue and v1.datavalue.value.id == "Q5727902" then adj = "circa" break end end end -- deal with Julian dates: -- no point in saying that dates before 1582 are Julian - they are by default -- doesn't make sense for dates less precise than year -- we can suppress it by setting |plaindate, e.g. for use in constructing categories. local calendarmodel = "" if tonumber(year) > 1582 and dprec > 8 and not pd and model == "http://www.wikidata.org/entity/Q1985786" then calendarmodel = "julian" end if not cdate then cdate = require("Module:Complex date")._complex_date end local fdate = cdate(calendarmodel, adj, tostring(iso), dp[dprec], bc, "", "", "", "", lang, 1) -- this may have QuickStatements info appended to it in a div, so remove that fdate = fdate:gsub(' <div style="display: none;">[^<]*</div>', '') -- it may also be returned wrapped in a microformat, so remove that fdate = fdate:gsub("<[^>]*>", "") -- there may be leading zeros that we should remove fdate = fdate:gsub("^0*", "") -- if a plain date is required, then remove any links (like BC linked) if pd then fdate = fdate:gsub("%[%[.*|", ""):gsub("]]", "") end -- if 'circa', use the abbreviated form *** internationalise later *** fdate = fdate:gsub('circa ', '<abbr title="circa">c.</abbr>&nbsp;') -- deal with BC/BCE if bcf == "BCE" then fdate = fdate:gsub('BC', 'BCE') end -- deal with mdy format if df == "mdy" then fdate = fdate:gsub("(%d+) (%w+) (%d+)", "%2 %1, %3") end -- deal with adjectival form *** internationalise later *** if pd == "a" then fdate = fdate:gsub(' century', '-century') end return fdate end ------------------------------------------------------------------------------- -- parseParam takes a (string) parameter, e.g. from the list of frame arguments, -- and makes "false", "no", and "0" into the (boolean) false -- it makes the empty string and nil into the (boolean) value passed as default -- allowing the parameter to be true or false by default. -- It returns a boolean. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local parseParam = function(param, default) if type(param) == "boolean" then param = tostring(param) end if param and param ~= "" then param = param:lower() if (param == "false") or (param:sub(1,1) == "n") or (param == "0") then return false else return true end else return default end end ------------------------------------------------------------------------------- -- _getSitelink takes the qid of a Wikidata entity passed as |qid= -- It takes an optional parameter |wiki= to determine which wiki is to be checked for a sitelink -- If the parameter is blank, then it uses the local wiki. -- If there is a sitelink to an article available, it returns the plain text link to the article -- If there is no sitelink, it returns nil. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local _getSitelink = function(qid, wiki) qid = (qid or ""):upper() if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end wiki = wiki or "" local sitelink if wiki == "" then sitelink = mw.wikibase.getSitelink(qid) else sitelink = mw.wikibase.getSitelink(qid, wiki) end return sitelink end ------------------------------------------------------------------------------- -- _getCommonslink takes an optional qid of a Wikidata entity passed as |qid= -- It returns one of the following in order of preference: -- the Commons sitelink of the Wikidata entity - but not if onlycat=true and it's not a category; -- the Commons sitelink of the topic's main category of the Wikidata entity; -- the Commons category of the Wikidata entity - unless fallback=false. ------------------------------------------------------------------------------- -- Dependencies: _getSitelink(); parseParam() ------------------------------------------------------------------------------- local _getCommonslink = function(qid, onlycat, fallback) qid = (qid or ""):upper() if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end onlycat = parseParam(onlycat, false) if fallback == "" then fallback = nil end local sitelink = _getSitelink(qid, "commonswiki") if onlycat and sitelink and sitelink:sub(1,9) ~= "Category:" then sitelink = nil end if not sitelink then -- check for topic's main category local prop910 = mw.wikibase.getBestStatements(qid, "P910")[1] if prop910 then local tmcid = prop910.mainsnak.datavalue and prop910.mainsnak.datavalue.value.id sitelink = _getSitelink(tmcid, "commonswiki") end if not sitelink then -- check for list's main category local prop1754 = mw.wikibase.getBestStatements(qid, "P1754")[1] if prop1754 then local tmcid = prop1754.mainsnak.datavalue and prop1754.mainsnak.datavalue.value.id sitelink = _getSitelink(tmcid, "commonswiki") end end end if not sitelink and fallback then -- check for Commons category (string value) local prop373 = mw.wikibase.getBestStatements(qid, "P373")[1] if prop373 then sitelink = prop373.mainsnak.datavalue and prop373.mainsnak.datavalue.value if sitelink then sitelink = "Category:" .. sitelink end end end return sitelink end ------------------------------------------------------------------------------- -- The label in a Wikidata item is subject to vulnerabilities -- that an attacker might try to exploit. -- It needs to be 'sanitised' by removing any wikitext before use. -- If it doesn't exist, return the id for the item -- a second (boolean) value is also returned, value is true when the label exists ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local labelOrId = function(id, lang) if lang == "default" then lang = findLang().code end local label if lang then label = mw.wikibase.getLabelByLang(id, lang) else label = mw.wikibase.getLabel(id) end if label then return mw.text.nowiki(label), true else return id, false end end ------------------------------------------------------------------------------- -- linkedItem takes an entity-id and returns a string, linked if possible. -- This is the handler for "wikibase-item". Preferences: -- 1. Display linked disambiguated sitelink if it exists -- 2. Display linked label if it is a redirect -- 3. TBA: Display an inter-language link for the label if it exists other than in default language -- 4. Display unlinked label if it exists -- 5. Display entity-id for now to indicate a label could be provided -- dtxt is text to be used instead of label, or nil. -- shortname is boolean switch to use P1813 (short name) instead of label if true. -- lang is the current language code. -- uselbl is boolean switch to force display of the label instead of the sitelink (default: false) -- linkredir is boolean switch to allow linking to a redirect (default: false) -- formatvalue is boolean switch to allow formatting as italics or quoted (default: false) ------------------------------------------------------------------------------- -- Dependencies: labelOrId(); donotlink[] ------------------------------------------------------------------------------- local linkedItem = function(id, args) local lprefix = (args.lp or args.lprefix or args.linkprefix or ""):gsub('"', '') -- toughen against nil values passed local lpostfix = (args.lpostfix or ""):gsub('"', '') local prefix = (args.prefix or ""):gsub('"', '') local postfix = (args.postfix or ""):gsub('"', '') local dtxt = args.dtxt local shortname = args.shortname or args.sn local lang = args.lang or "en" -- fallback to default if missing local uselbl = args.uselabel or args.uselbl uselbl = parseParam(uselbl, false) local linkredir = args.linkredir linkredir = parseParam(linkredir, false) local formatvalue = args.formatvalue or args.fv formatvalue = parseParam(formatvalue, false) -- see if item might need italics or quotes local fmt = "" if next(formats) and formatvalue then for k, v in ipairs( mw.wikibase.getBestStatements(id, "P31") ) do if v.mainsnak.datavalue and formats[v.mainsnak.datavalue.value.id] then fmt = formats[v.mainsnak.datavalue.value.id] break -- pick the first match end end end local disp local sitelink = mw.wikibase.getSitelink(id) local label, islabel if dtxt then label, islabel = dtxt, true elseif shortname then -- see if there is a shortname in our language, and set label to it for k, v in ipairs( mw.wikibase.getBestStatements(id, "P1813") ) do if v.mainsnak.datavalue.value.language == lang then label, islabel = v.mainsnak.datavalue.value.text, true break end -- test for language match end -- loop through values of short name -- if we have no label set, then there was no shortname available if not islabel then label, islabel = labelOrId(id) shortname = false end else label, islabel = labelOrId(id) end if mw.site.siteName ~= "Wikimedia Commons" then if sitelink then if not (dtxt or shortname) then -- if sitelink and label are the same except for case, no need to process further if sitelink:lower() ~= label:lower() then -- strip any namespace or dab from the sitelink local pos = sitelink:find(":") or 0 local slink = sitelink if pos > 0 then local pfx = sitelink:sub(1,pos-1) if mw.site.namespaces[pfx] then -- that prefix is a valid namespace, so remove it slink = sitelink:sub(pos+1) end end -- remove stuff after commas or inside parentheses - ie. dabs slink = slink:gsub("%s%(.+%)$", ""):gsub(",.+$", "") -- if uselbl is false, use sitelink instead of label if not uselbl then -- use slink as display, preserving label case - find("^%u") is true for 1st char uppercase if label:find("^%u") then label = slink:gsub("^(%l)", string.upper) else label = slink:gsub("^(%u)", string.lower) end end end end if donotlink[label] then disp = prefix .. fmt .. label .. fmt .. postfix else disp = "[[" .. lprefix .. sitelink .. lpostfix .. "|" .. prefix .. fmt .. label .. fmt .. postfix .. "]]" end elseif islabel then -- no sitelink, label exists, so check if a redirect with that title exists, if linkredir is true -- display plain label by default disp = prefix .. fmt .. label .. fmt .. postfix if linkredir then local artitle = mw.title.new(label, 0) -- only nil if label has invalid chars if not donotlink[label] and artitle and artitle.redirectTarget then -- there's a redirect with the same title as the label, so let's link to that disp = "[[".. lprefix .. label .. lpostfix .. "|" .. prefix .. fmt .. label .. fmt .. postfix .. "]]" end end -- test if article title exists as redirect on current Wiki else -- no sitelink and no label, so return whatever was returned from labelOrId for now -- add tracking category [[Category:Articles with missing Wikidata information]] -- for enwiki, just return the tracking category if mw.wikibase.getGlobalSiteId() == "enwiki" then disp = i18n.missinginfocat else disp = prefix .. label .. postfix .. i18n.missinginfocat end end else local ccat = mw.wikibase.getBestStatements(id, "P373")[1] if ccat and ccat.mainsnak.datavalue then ccat = ccat.mainsnak.datavalue.value disp = "[[" .. lprefix .. "Category:" .. ccat .. lpostfix .. "|" .. prefix .. label .. postfix .. "]]" elseif sitelink then -- this asumes that if a sitelink exists, then a label also exists disp = "[[" .. lprefix .. sitelink .. lpostfix .. "|" .. prefix .. label .. postfix .. "]]" else -- no sitelink and no Commons cat, so return label from labelOrId for now disp = prefix .. label .. postfix end end return disp end ------------------------------------------------------------------------------- -- sourced takes a table representing a statement that may or may not have references -- it looks for a reference sourced to something not containing the word "wikipedia" -- it returns a boolean = true if it finds a sourced reference. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local sourced = function(claim) if claim.references then for kr, vr in pairs(claim.references) do local ref = mw.wikibase.renderSnaks(vr.snaks) if not ref:find("Wiki") then return true end end end end ------------------------------------------------------------------------------- -- setRanks takes a flag (parameter passed) that requests the values to return -- "b[est]" returns preferred if available, otherwise normal -- "p[referred]" returns preferred -- "n[ormal]" returns normal -- "d[eprecated]" returns deprecated -- multiple values are allowed, e.g. "preferred normal" (which is the default) -- "best" will override the other flags, and set p and n ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local setRanks = function(rank) rank = (rank or ""):lower() -- if nothing passed, return preferred and normal -- if rank == "" then rank = "p n" end local ranks = {} for w in string.gmatch(rank, "%a+") do w = w:sub(1,1) if w == "b" or w == "p" or w == "n" or w == "d" then ranks[w] = true end end -- check if "best" is requested or no ranks requested; and if so, set preferred and normal if ranks.b or not next(ranks) then ranks.p = true ranks.n = true end return ranks end ------------------------------------------------------------------------------- -- parseInput processes the Q-id , the blacklist and the whitelist -- if an input parameter is supplied, it returns that and ends the call. -- it returns (1) either the qid or nil indicating whether or not the call should continue -- and (2) a table containing all of the statements for the propertyID and relevant Qid -- if "best" ranks are requested, it returns those instead of all non-deprecated ranks ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- local parseInput = function(frame, input_parm, property_id) -- There may be a local parameter supplied, if it's blank, set it to nil input_parm = mw.text.trim(input_parm or "") if input_parm == "" then input_parm = nil end -- return nil if Wikidata is not available if not mw.wikibase then return false, input_parm end local args = frame.args -- can take a named parameter |qid which is the Wikidata ID for the article. -- if it's not supplied, use the id for the current page local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end -- if there's no Wikidata item for the current page return nil if not qid then return false, input_parm end -- The blacklist is passed in named parameter |suppressfields local blacklist = args.suppressfields or args.spf or "" -- The whitelist is passed in named parameter |fetchwikidata local whitelist = args.fetchwikidata or args.fwd or "" if whitelist == "" then whitelist = "NONE" end -- The name of the field that this function is called from is passed in named parameter |name local fieldname = args.name or "" if blacklist ~= "" then -- The name is compulsory when blacklist is used, so return nil if it is not supplied if fieldname == "" then return false, nil end -- If this field is on the blacklist, then return nil if blacklist:find(fieldname) then return false, nil end end -- If we got this far then we're not on the blacklist -- The blacklist overrides any locally supplied parameter as well -- If a non-blank input parameter was supplied return it if input_parm then return false, input_parm end -- We can filter out non-valid properties if property_id:sub(1,1):upper() ~="P" or property_id == "P0" then return false, nil end -- Otherwise see if this field is on the whitelist: -- needs a bit more logic because find will return its second value = 0 if fieldname is "" -- but nil if fieldname not found on whitelist local _, found = whitelist:find(fieldname) found = ((found or 0) > 0) if whitelist ~= 'ALL' and (whitelist:upper() == "NONE" or not found) then return false, nil end -- See what's on Wikidata (the call always returns a table, but it may be empty): local props = {} if args.reqranks.b then props = mw.wikibase.getBestStatements(qid, property_id) else props = mw.wikibase.getAllStatements(qid, property_id) end if props[1] then return qid, props end -- no property on Wikidata return false, nil end ------------------------------------------------------------------------------- -- createicon assembles the "Edit at Wikidata" pen icon. -- It returns a wikitext string inside a span class="penicon" -- if entityID is nil or empty, the ID associated with current page is used -- langcode and propertyID may be nil or empty ------------------------------------------------------------------------------- -- Dependencies: i18n[]; ------------------------------------------------------------------------------- local createicon = function(langcode, entityID, propertyID) langcode = langcode or "" if not entityID or entityID == "" then entityID= mw.wikibase.getEntityIdForCurrentPage() end propertyID = propertyID or "" local icon = "&nbsp;<span class='penicon autoconfirmed-show'>[[" -- "&nbsp;<span data-bridge-edit-flow='overwrite' class='penicon'>[[" -> enable Wikidata Bridge .. i18n["filespace"] .. ":OOjs UI icon edit-ltr-progressive.svg |frameless |text-top |10px |alt=" .. i18n["editonwikidata"] .. "|link=https://www.wikidata.org/wiki/" .. entityID if langcode ~= "" then icon = icon .. "?uselang=" .. langcode end if propertyID ~= "" then icon = icon .. "#" .. propertyID end icon = icon .. "|" .. i18n["editonwikidata"] .. "]]</span>" return icon end ------------------------------------------------------------------------------- -- assembleoutput takes the sequence table containing the property values -- and formats it according to switches given. It returns a string or nil. -- It uses the entityID (and optionally propertyID) to create a link in the pen icon. ------------------------------------------------------------------------------- -- Dependencies: parseParam(); ------------------------------------------------------------------------------- local assembleoutput = function(out, args, entityID, propertyID) -- sorted is a boolean passed to enable sorting of the values returned -- if nothing or an empty string is passed set it false -- if "false" or "no" or "0" is passed set it false local sorted = parseParam(args.sorted, false) -- noicon is a boolean passed to suppress the trailing "edit at Wikidata" icon -- for use when the value is processed further by the infobox -- if nothing or an empty string is passed set it false -- if "false" or "no" or "0" is passed set it false local noic = parseParam(args.noicon, false) -- list is the name of a template that a list of multiple values is passed through -- examples include "hlist" and "ubl" -- setting it to "prose" produces something like "1, 2, 3, and 4" local list = args.list or "" -- sep is a string that is used to separate multiple returned values -- if nothing or an empty string is passed set it to the default -- any double-quotes " are stripped out, so that spaces may be passed -- e.g. |sep=" - " local sepdefault = i18n["list separator"] local separator = args.sep or "" separator = string.gsub(separator, '"', '') if separator == "" then separator = sepdefault end -- collapse is a number that determines the maximum number of returned values -- before the output is collapsed. -- Zero or not a number result in no collapsing (default becomes 0). local collapse = tonumber(args.collapse) or 0 -- replacetext (rt) is a string that is returned instead of any non-empty Wikidata value -- this is useful for tracking and debugging local replacetext = mw.text.trim(args.rt or args.replacetext or "") -- if there's anything to return, then return a list -- comma-separated by default, but may be specified by the sep parameter -- optionally specify a hlist or ubl or a prose list, etc. local strout if #out > 0 then if sorted then table.sort(out) end -- if there's something to display and a pen icon is wanted, add it the end of the last value local hasdisplay = false for i, v in ipairs(out) do if v ~= i18n.missinginfocat then hasdisplay = true break end end if not noic and hasdisplay then out[#out] = out[#out] .. createicon(args.langobj.code, entityID, propertyID) end if list == "" then strout = table.concat(out, separator) elseif list:lower() == "prose" then strout = mw.text.listToText( out ) else strout = mw.getCurrentFrame():expandTemplate{title = list, args = out} end if collapse >0 and #out > collapse then strout = collapsediv .. strout .. "</div>" end else strout = nil -- no items had valid reference end if replacetext ~= "" and strout then strout = replacetext end return strout end ------------------------------------------------------------------------------- -- rendersnak takes a table (propval) containing the information stored on one property value -- and returns the value as a string and its language if monolingual text. -- It handles data of type: -- wikibase-item -- time -- string, url, commonsMedia, external-id -- quantity -- globe-coordinate -- monolingualtext -- It also requires linked, the link/pre/postfixes, uabbr, and the arguments passed from frame. -- The optional filter parameter allows quantities to be be filtered by unit Qid. ------------------------------------------------------------------------------- -- Dependencies: parseParam(); labelOrId(); i18n[]; dateFormat(); -- roundto(); decimalPrecision(); decimalToDMS(); linkedItem(); ------------------------------------------------------------------------------- local rendersnak = function(propval, args, linked, lpre, lpost, pre, post, uabbr, filter) lpre = lpre or "" lpost = lpost or "" pre = pre or "" post = post or "" args.lang = args.lang or findLang().code -- allow values to display a fixed text instead of label local dtxt = args.displaytext or args.dt if dtxt == "" then dtxt = nil end -- switch to use display of short name (P1813) instead of label local shortname = args.shortname or args.sn shortname = parseParam(shortname, false) local snak = propval.mainsnak or propval local dtype = snak.datatype local dv = snak.datavalue dv = dv and dv.value -- value and monolingual text language code returned local val, mlt if propval.rank and not args.reqranks[propval.rank:sub(1, 1)] then -- val is nil: value has a rank that isn't requested ------------------------------------ elseif snak.snaktype == "somevalue" then -- value is unknown val = i18n["Unknown"] ------------------------------------ elseif snak.snaktype == "novalue" then -- value is none -- val = "No value" -- don't return anything ------------------------------------ elseif dtype == "wikibase-item" then -- data type is a wikibase item: -- it's wiki-linked value, so output as link if enabled and possible local qnumber = dv.id if linked then val = linkedItem(qnumber, args) else -- no link wanted so check for display-text, otherwise test for lang code local label, islabel if dtxt then label = dtxt else label, islabel = labelOrId(qnumber) local langlabel = mw.wikibase.getLabelByLang(qnumber, args.lang) if langlabel then label = mw.text.nowiki( langlabel ) end end val = pre .. label .. post end -- test for link required ------------------------------------ elseif dtype == "time" then -- data type is time: -- time is in timestamp format -- date precision is integer per mediawiki -- output formatting according to preferences (y/dmy/mdy) -- BC format as BC or BCE -- plaindate is passed to disable looking for "sourcing cirumstances" -- or to set the adjectival form -- qualifiers (if any) is a nested table or nil -- lang is given, or user language, or site language -- -- Here we can check whether args.df has a value -- If not, use code from Module:Sandbox/RexxS/Getdateformat to set it from templates like {{Use mdy dates}} val = dateFormat(dv.time, dv.precision, args.df, args.bc, args.pd, propval.qualifiers, args.lang, "", dv.calendarmodel) ------------------------------------ -- data types which are strings: elseif dtype == "commonsMedia" or dtype == "external-id" or dtype == "string" or dtype == "url" then -- commonsMedia or external-id or string or url -- all have mainsnak.datavalue.value as string if (lpre == "" or lpre == ":") and lpost == "" then -- don't link if no linkpre/postfix or linkprefix is just ":" val = pre .. dv .. post elseif dtype == "external-id" then val = "[" .. lpre .. dv .. lpost .. " " .. pre .. dv .. post .. "]" else val = "[[" .. lpre .. dv .. lpost .. "|" .. pre .. dv .. post .. "]]" end -- check for link requested (i.e. either linkprefix or linkpostfix exists) ------------------------------------ -- data types which are quantities: elseif dtype == "quantity" then -- quantities have mainsnak.datavalue.value.amount and mainsnak.datavalue.value.unit -- the unit is of the form http://www.wikidata.org/entity/Q829073 -- -- implement a switch to turn on/off numerical formatting later local fnum = true -- -- a switch to turn on/off conversions - only for en-wiki local conv = parseParam(args.conv or args.convert, false) -- if we have conversions, we won't have formatted numbers or scales if conv then uabbr = true fnum = false args.scale = "0" end -- -- a switch to turn on/off showing units, default is true local showunits = parseParam(args.su or args.showunits, true) -- -- convert amount to a number local amount = tonumber(dv.amount) or i18n["NaN"] -- -- scale factor for millions, billions, etc. local sc = tostring(args.scale or ""):sub(1,1):lower() local scale if sc == "a" then -- automatic scaling if amount > 1e15 then scale = 12 elseif amount > 1e12 then scale = 9 elseif amount > 1e9 then scale = 6 elseif amount > 1e6 then scale = 3 else scale = 0 end else scale = tonumber(args.scale) or 0 if scale < 0 or scale > 12 then scale = 0 end scale = math.floor(scale/3) * 3 end local factor = 10^scale amount = amount / factor -- ranges: local range = "" -- check if upper and/or lower bounds are given and significant local upb = tonumber(dv.upperBound) local lowb = tonumber(dv.lowerBound) if upb and lowb then -- differences rounded to 2 sig fig: local posdif = roundto(upb - amount, 2) / factor local negdif = roundto(amount - lowb, 2) / factor upb, lowb = amount + posdif, amount - negdif -- round scaled numbers to integers or 4 sig fig if (scale > 0 or sc == "a") then if amount < 1e4 then amount = roundto(amount, 4) else amount = math.floor(amount + 0.5) end end if fnum then amount = args.langobj:formatNum( amount ) end if posdif ~= negdif then -- non-symmetrical range = " +" .. posdif .. " -" .. negdif elseif posdif ~= 0 then -- symmetrical and non-zero range = " ±" .. posdif else -- otherwise range is zero, so leave it as "" end else -- round scaled numbers to integers or 4 sig fig if (scale > 0 or sc == "a") then if amount < 1e4 then amount = roundto(amount, 4) else amount = math.floor(amount + 0.5) end end if fnum then amount = args.langobj:formatNum( amount ) end end -- unit names and symbols: -- extract the qid in the form 'Qnnn' from the value.unit url -- and then fetch the label from that - or symbol if unitabbr is true local unit = "" local usep = "" local usym = "" local unitqid = string.match( dv.unit, "(Q%d+)" ) if filter and unitqid ~= filter then return nil end if unitqid and showunits then local uname = mw.wikibase.getLabelByLang(unitqid, args.lang) or "" if uname ~= "" then usep, unit = " ", uname end if uabbr then -- see if there's a unit symbol (P5061) local unitsymbols = mw.wikibase.getBestStatements(unitqid, "P5061") -- construct fallback table, add local lang and multiple languages local fbtbl = mw.language.getFallbacksFor( args.lang, mw.language.FALLBACK_STRICT ) table.insert( fbtbl, 1, args.lang ) table.insert( fbtbl, "mul" ) table.insert( fbtbl, "en" ) local found = false for idx1, us in ipairs(unitsymbols) do for idx2, fblang in ipairs(fbtbl) do if us.mainsnak.datavalue.value.language == fblang then usym = us.mainsnak.datavalue.value.text found = true break end end -- loop through fallback table if found then break end end -- loop through values of P5061 if found then usep, unit = "&nbsp;", usym end end end -- format display: if conv then if range == "" then val = mw.getCurrentFrame():expandTemplate{title = "cvt", args = {amount, unit}} else val = mw.getCurrentFrame():expandTemplate{title = "cvt", args = {lowb, "to", upb, unit}} end elseif unit == "$" or unit == "£" then val = unit .. amount .. range .. i18n.multipliers[scale] else val = amount .. range .. i18n.multipliers[scale] .. usep .. unit end ------------------------------------ -- datatypes which are global coordinates: elseif dtype == "globe-coordinate" then -- 'display' parameter defaults to "inline, title" *** unused for now *** -- local disp = args.display or "" -- if disp == "" then disp = "inline, title" end -- -- format parameter switches from deg/min/sec to decimal degrees -- default is deg/min/sec -- decimal degrees needs |format = dec local form = (args.format or ""):lower():sub(1,3) if form ~= "dec" then form = "dms" end -- not needed for now -- -- show parameter allows just the latitude, or just the longitude, or both -- to be returned as a signed decimal, ignoring the format parameter. local show = (args.show or ""):lower() if show ~= "longlat" then show = show:sub(1,3) end -- local lat, long, prec = dv.latitude, dv.longitude, dv.precision if show == "lat" then val = decimalPrecision(lat, prec) elseif show == "lon" then val = decimalPrecision(long, prec) elseif show == "longlat" then val = decimalPrecision(long, prec) .. ", " .. decimalPrecision(lat, prec) else local ns = "N" local ew = "E" if lat < 0 then ns = "S" lat = - lat end if long < 0 then ew = "W" long = - long end if form == "dec" then lat = decimalPrecision(lat, prec) long = decimalPrecision(long, prec) val = lat .. "°" .. ns .. " " .. long .. "°" .. ew else local latdeg, latmin, latsec = decimalToDMS(lat, prec) local longdeg, longmin, longsec = decimalToDMS(long, prec) if latsec == 0 and longsec == 0 then if latmin == 0 and longmin == 0 then val = latdeg .. "°" .. ns .. " " .. longdeg .. "°" .. ew else val = latdeg .. "°" .. latmin .. "′" .. ns .. " " val = val .. longdeg .. "°".. longmin .. "′" .. ew end else val = latdeg .. "°" .. latmin .. "′" .. latsec .. "″" .. ns .. " " val = val .. longdeg .. "°" .. longmin .. "′" .. longsec .. "″" .. ew end end end ------------------------------------ elseif dtype == "monolingualtext" then -- data type is Monolingual text: -- has mainsnak.datavalue.value as a table containing language/text pairs -- collect all the values in 'out' and languages in 'mlt' and process them later val = pre .. dv.text .. post mlt = dv.language ------------------------------------ else -- some other data type so write a specific handler val = "unknown data type: " .. dtype end -- of datatype/unknown value/sourced check return val, mlt end ------------------------------------------------------------------------------- -- propertyvalueandquals takes a property object, the arguments passed from frame, -- and a qualifier propertyID. -- It returns a sequence (table) of values representing the values of that property -- and qualifiers that match the qualifierID if supplied. ------------------------------------------------------------------------------- -- Dependencies: parseParam(); sourced(); labelOrId(); i18n.latestdatequalifier(); format_Date(); -- makeOrdinal(); roundto(); decimalPrecision(); decimalToDMS(); assembleoutput(); ------------------------------------------------------------------------------- local function propertyvalueandquals(objproperty, args, qualID) -- needs this style of declaration because it's re-entrant -- onlysourced is a boolean passed to return only values sourced to other than Wikipedia -- if nothing or an empty string is passed set it true local onlysrc = parseParam(args.onlysourced or args.osd, true) -- linked is a a boolean that enables the link to a local page via sitelink -- if nothing or an empty string is passed set it true local linked = parseParam(args.linked, true) -- prefix is a string that may be nil, empty (""), or a string of characters -- this is prefixed to each value -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local prefix = (args.prefix or ""):gsub('"', '') -- postfix is a string that may be nil, empty (""), or a string of characters -- this is postfixed to each value -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local postfix = (args.postfix or ""):gsub('"', '') -- linkprefix is a string that may be nil, empty (""), or a string of characters -- this creates a link and is then prefixed to each value -- useful when when multiple values are returned and indirect links are needed -- any double-quotes " are stripped out, so that spaces may be passed local lprefix = (args.linkprefix or args.lp or ""):gsub('"', '') -- linkpostfix is a string that may be nil, empty (""), or a string of characters -- this is postfixed to each value when linking is enabled with lprefix -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local lpostfix = (args.linkpostfix or ""):gsub('"', '') -- wdlinks is a boolean passed to enable links to Wikidata when no article exists -- if nothing or an empty string is passed set it false local wdl = parseParam(args.wdlinks or args.wdl, false) -- unitabbr is a boolean passed to enable unit abbreviations for common units -- if nothing or an empty string is passed set it false local uabbr = parseParam(args.unitabbr or args.uabbr, false) -- qualsonly is a boolean passed to return just the qualifiers -- if nothing or an empty string is passed set it false local qualsonly = parseParam(args.qualsonly or args.qo, false) -- maxvals is a string that may be nil, empty (""), or a number -- this determines how many items may be returned when multiple values are available -- setting it = 1 is useful where the returned string is used within another call, e.g. image local maxvals = tonumber(args.maxvals) or 0 -- pd (plain date) is a string: yes/true/1 | no/false/0 | adj -- to disable/enable "sourcing cirumstances" or use adjectival form for the plain date local pd = args.plaindate or args.pd or "no" args.pd = pd -- allow qualifiers to have a different date format; default to year unless qualsonly is set args.qdf = args.qdf or args.qualifierdateformat or args.df or (not qualsonly and "y") local lang = args.lang or findLang().code -- qualID is a string list of wanted qualifiers or "ALL" qualID = qualID or "" -- capitalise list of wanted qualifiers and substitute "DATES" qualID = qualID:upper():gsub("DATES", "P580, P582") local allflag = (qualID == "ALL") -- create table of wanted qualifiers as key local qwanted = {} -- create sequence of wanted qualifiers local qorder = {} for q in mw.text.gsplit(qualID, "%p") do -- split at punctuation and iterate local qtrim = mw.text.trim(q) if qtrim ~= "" then qwanted[mw.text.trim(q)] = true qorder[#qorder+1] = qtrim end end -- qsep is the output separator for rendering qualifier list local qsep = (args.qsep or ""):gsub('"', '') -- qargs are the arguments to supply to assembleoutput() local qargs = { ["osd"] = "false", ["linked"] = tostring(linked), ["prefix"] = args.qprefix, ["postfix"] = args.qpostfix, ["linkprefix"] = args.qlinkprefix or args.qlp, ["linkpostfix"] = args.qlinkpostfix, ["wdl"] = "false", ["unitabbr"] = tostring(uabbr), ["maxvals"] = 0, ["sorted"] = tostring(args.qsorted), ["noicon"] = "true", ["list"] = args.qlist, ["sep"] = qsep, ["langobj"] = args.langobj, ["lang"] = args.langobj.code, ["df"] = args.qdf, ["sn"] = parseParam(args.qsn or args.qshortname, false), } -- all proper values of a Wikidata property will be the same type as the first -- qualifiers don't have a mainsnak, properties do local datatype = objproperty[1].datatype or objproperty[1].mainsnak.datatype -- out[] holds the a list of returned values for this property -- mlt[] holds the language code if the datatype is monolingual text local out = {} local mlt = {} for k, v in ipairs(objproperty) do local hasvalue = true if (onlysrc and not sourced(v)) then -- no value: it isn't sourced when onlysourced=true hasvalue = false else local val, lcode = rendersnak(v, args, linked, lprefix, lpostfix, prefix, postfix, uabbr) if not val then hasvalue = false -- rank doesn't match elseif qualsonly and qualID then -- suppress value returned: only qualifiers are requested else out[#out+1], mlt[#out+1] = val, lcode end end -- See if qualifiers are to be returned: local snak = v.mainsnak or v if hasvalue and v.qualifiers and qualID ~= "" and snak.snaktype~="novalue" then -- collect all wanted qualifier values returned in qlist, indexed by propertyID local qlist = {} local timestart, timeend = "", "" -- loop through qualifiers for k1, v1 in pairs(v.qualifiers) do if allflag or qwanted[k1] then if k1 == "P1326" then local ts = v1[1].datavalue.value.time local dp = v1[1].datavalue.value.precision qlist[k1] = dateFormat(ts, dp, args.qdf, args.bc, pd, "", lang, "before") elseif k1 == "P1319" then local ts = v1[1].datavalue.value.time local dp = v1[1].datavalue.value.precision qlist[k1] = dateFormat(ts, dp, args.qdf, args.bc, pd, "", lang, "after") elseif k1 == "P580" then timestart = propertyvalueandquals(v1, qargs)[1] or "" -- treat only one start time as valid elseif k1 == "P582" then timeend = propertyvalueandquals(v1, qargs)[1] or "" -- treat only one end time as valid else local q = assembleoutput(propertyvalueandquals(v1, qargs), qargs) -- we already deal with circa via 'sourcing circumstances' if the datatype was time -- circa may be either linked or unlinked *** internationalise later *** if datatype ~= "time" or q ~= "circa" and not (type(q) == "string" and q:find("circa]]")) then qlist[k1] = q end end end -- of test for wanted end -- of loop through qualifiers -- set date separator local t = timestart .. timeend -- *** internationalise date separators later *** local dsep = "&ndash;" if t:find("%s") or t:find("&nbsp;") then dsep = " &ndash; " end -- set the order for the list of qualifiers returned; start time and end time go last if next(qlist) then local qlistout = {} if allflag then for k2, v2 in pairs(qlist) do qlistout[#qlistout+1] = v2 end else for i2, v2 in ipairs(qorder) do qlistout[#qlistout+1] = qlist[v2] end end if t ~= "" then qlistout[#qlistout+1] = timestart .. dsep .. timeend end local qstr = assembleoutput(qlistout, qargs) if qualsonly then out[#out+1] = qstr else out[#out] = out[#out] .. " (" .. qstr .. ")" end elseif t ~= "" then if qualsonly then if timestart == "" then out[#out+1] = timeend elseif timeend == "" then out[#out+1] = timestart else out[#out+1] = timestart .. dsep .. timeend end else out[#out] = out[#out] .. " (" .. timestart .. dsep .. timeend .. ")" end end end -- of test for qualifiers wanted if maxvals > 0 and #out >= maxvals then break end end -- of for each value loop -- we need to pick one value to return if the datatype was "monolingualtext" -- if there's only one value, use that -- otherwise look through the fallback languages for a match if datatype == "monolingualtext" and #out >1 then lang = mw.text.split( lang, '-', true )[1] local fbtbl = mw.language.getFallbacksFor( lang ) table.insert( fbtbl, 1, lang ) local bestval = "" local found = false for idx1, lang1 in ipairs(fbtbl) do for idx2, lang2 in ipairs(mlt) do if (lang1 == lang2) and not found then bestval = out[idx2] found = true break end end -- loop through values of property end -- loop through fallback languages if found then -- replace output table with a table containing the best value out = { bestval } else -- more than one value and none of them on the list of fallback languages -- sod it, just give them the first one out = { out[1] } end end return out end ------------------------------------------------------------------------------- -- Common code for p.getValueByQual and p.getValueByLang ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; assembleoutput; ------------------------------------------------------------------------------- local _getvaluebyqual = function(frame, qualID, checkvalue) -- The property ID that will have a qualifier is the first unnamed parameter local propertyID = mw.text.trim(frame.args[1] or "") if propertyID == "" then return "no property supplied" end if qualID == "" then return "no qualifier supplied" end -- onlysourced is a boolean passed to return property values -- only when property values are sourced to something other than Wikipedia -- if nothing or an empty string is passed set it true -- if "false" or "no" or 0 is passed set it false local onlysrc = parseParam(frame.args.onlysourced or frame.args.osd, true) -- set the requested ranks flags frame.args.reqranks = setRanks(frame.args.rank) -- set a language object and code in the frame.args table frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code local args = frame.args -- check for locally supplied parameter in second unnamed parameter -- success means no local parameter and the property exists local qid, props = parseInput(frame, args[2], propertyID) local linked = parseParam(args.linked, true) local lpre = (args.linkprefix or args.lp or ""):gsub('"', '') local lpost = (args.linkpostfix or ""):gsub('"', '') local pre = (args.prefix or ""):gsub('"', '') local post = (args.postfix or ""):gsub('"', '') local uabbr = parseParam(args.unitabbr or args.uabbr, false) local filter = (args.unit or ""):upper() local maxvals = tonumber(args.maxvals) or 0 if filter == "" then filter = nil end if qid then local out = {} -- Scan through the values of the property -- we want something like property is "pronunciation audio (P443)" in propertyID -- with a qualifier like "language of work or name (P407)" in qualID -- whose value has the required ID, like "British English (Q7979)", in qval for k1, v1 in ipairs(props) do if v1.mainsnak.snaktype == "value" then -- check if it has the right qualifier local v1q = v1.qualifiers if v1q and v1q[qualID] then if onlysrc == false or sourced(v1) then -- if we've got this far, we have a (sourced) claim with qualifiers -- so see if matches the required value -- We'll only deal with wikibase-items and strings for now if v1q[qualID][1].datatype == "wikibase-item" then if checkvalue(v1q[qualID][1].datavalue.value.id) then out[#out + 1] = rendersnak(v1, args, linked, lpre, lpost, pre, post, uabbr, filter) end elseif v1q[qualID][1].datatype == "string" then if checkvalue(v1q[qualID][1].datavalue.value) then out[#out + 1] = rendersnak(v1, args, linked, lpre, lpost, pre, post, uabbr, filter) end end end -- of check for sourced end -- of check for matching required value and has qualifiers else return nil end -- of check for string if maxvals > 0 and #out >= maxvals then break end end -- of loop through values of propertyID return assembleoutput(out, frame.args, qid, propertyID) else return props -- either local parameter or nothing end -- of test for success return nil end ------------------------------------------------------------------------------- -- _location takes Q-id and follows P276 (location) -- or P131 (located in the administrative territorial entity) or P706 (located on terrain feature) -- from the initial item to higher level territories/locations until it reaches the highest. -- An optional boolean, 'first', determines whether the first item is returned (default: false). -- An optional boolean 'skip' toggles the display to skip to the last item (default: false). -- It returns a table containing the locations - linked where possible, except for the highest. ------------------------------------------------------------------------------- -- Dependencies: findLang(); labelOrId(); linkedItem ------------------------------------------------------------------------------- local _location = function(qid, first, skip) first = parseParam(first, false) skip = parseParam(skip, false) local locs = {"P276", "P131", "P706"} local out = {} local langcode = findLang():getCode() local finished = false local count = 0 local prevqid = "Q0" repeat local prop for i1, v1 in ipairs(locs) do local proptbl = mw.wikibase.getBestStatements(qid, v1) if #proptbl > 1 then -- there is more than one higher location local prevP131, prevP131id if prevqid ~= "Q0" then prevP131 = mw.wikibase.getBestStatements(prevqid, "P131")[1] prevP131id = prevP131 and prevP131.mainsnak.datavalue and prevP131.mainsnak.datavalue.value.id end for i2, v2 in ipairs(proptbl) do local parttbl = v2.qualifiers and v2.qualifiers.P518 if parttbl then -- this higher location has qualifier 'applies to part' (P518) for i3, v3 in ipairs(parttbl) do if v3.snaktype == "value" and v3.datavalue.value.id == prevqid then -- it has a value equal to the previous location prop = proptbl[i2] break end -- of test for matching last location end -- of loop through values of 'applies to part' else -- there's no qualifier 'applies to part' (P518) -- so check if the previous location had a P131 that matches this alternate if qid == prevP131id then prop = proptbl[i2] break end -- of test for matching previous P131 end end -- of loop through parent locations -- fallback to second value if match not found prop = prop or proptbl[2] elseif #proptbl > 0 then prop = proptbl[1] end if prop then break end end -- check if it's an instance of (P31) a country (Q6256) or sovereign state (Q3624078) -- and terminate the chain if it is local inst = mw.wikibase.getAllStatements(qid, "P31") if #inst > 0 then for k, v in ipairs(inst) do local instid = v.mainsnak.datavalue and v.mainsnak.datavalue.value.id -- stop if it's a country (or a country within the United Kingdom if skip is true) if instid == "Q6256" or instid == "Q3624078" or (skip and instid == "Q3336843") then prop = nil -- this will ensure this is treated as top-level location break end end end -- get the name of this location and update qid to point to the parent location if prop and prop.mainsnak.datavalue then if not skip or count == 0 then local args = { lprefix = ":" } out[#out+1] = linkedItem(qid, args) -- get a linked value if we can end qid, prevqid = prop.mainsnak.datavalue.value.id, qid else -- This is top-level location, so get short name except when this is the first item -- Use full label if there's no short name or this is the first item local prop1813 = mw.wikibase.getAllStatements(qid, "P1813") -- if there's a short name and this isn't the only item if prop1813[1] and (#out > 0)then local shortname -- short name is monolingual text, so look for match to the local language -- choose the shortest 'short name' in that language for k, v in pairs(prop1813) do if v.mainsnak.datavalue.value.language == langcode then local name = v.mainsnak.datavalue.value.text if (not shortname) or (#name < #shortname) then shortname = name end end end -- add the shortname if one is found, fallback to the label -- but skip it if it's "USA" if shortname ~= "USA" then out[#out+1] = shortname or labelOrId(qid) else if skip then out[#out+1] = "US" end end else -- no shortname, so just add the label local loc = labelOrId(qid) -- exceptions go here: if loc == "United States of America" then out[#out+1] = "United States" else out[#out+1] = loc end end finished = true end count = count + 1 until finished or count >= 10 -- limit to 10 levels to avoid infinite loops -- remove the first location if not required if not first then table.remove(out, 1) end -- we might have duplicate text for consecutive locations, so remove them if #out > 2 then local plain = {} for i, v in ipairs(out) do -- strip any links plain[i] = v:gsub("^%[%[[^|]*|", ""):gsub("]]$", "") end local idx = 2 repeat if plain[idx] == plain[idx-1] then -- duplicate found local removeidx = 0 if (plain[idx] ~= out[idx]) and (plain[idx-1] == out[idx-1]) then -- only second one is linked, so drop the first removeidx = idx - 1 elseif (plain[idx] == out[idx]) and (plain[idx-1] ~= out[idx-1]) then -- only first one is linked, so drop the second removeidx = idx else -- pick one removeidx = idx - (os.time()%2) end table.remove(out, removeidx) table.remove(plain, removeidx) else idx = idx +1 end until idx >= #out end return out end ------------------------------------------------------------------------------- -- _getsumofparts scans the property 'has part' (P527) for values matching a list. -- The list (args.vlist) consists of a string of Qids separated by spaces or any usual punctuation. -- If the matched values have a qualifer 'quantity' (P1114), those quantites are summed. -- The sum is returned as a number (i.e. 0 if none) -- a table of arguments is supplied implementing the usual parameters. ------------------------------------------------------------------------------- -- Dependencies: setRanks; parseParam; parseInput; sourced; assembleoutput; ------------------------------------------------------------------------------- local _getsumofparts = function(args) local vallist = (args.vlist or ""):upper() if vallist == "" then return end args.reqranks = setRanks(args.rank) local f = {} f.args = args local qid, props = parseInput(f, "", "P527") if not qid then return 0 end local onlysrc = parseParam(args.onlysourced or args.osd, true) local sum = 0 for k1, v1 in ipairs(props) do if (onlysrc == false or sourced(v1)) and v1.mainsnak.snaktype == "value" and v1.mainsnak.datavalue.type == "wikibase-entityid" and vallist:match( v1.mainsnak.datavalue.value.id ) and v1.qualifiers then local quals = v1.qualifiers["P1114"] if quals then for k2, v2 in ipairs(quals) do sum = sum + v2.datavalue.value.amount end end end end return sum end ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- -- Public functions ------------------------------------------------------------------------------- ------------------------------------------------------------------------------- -- _getValue makes the functionality of getValue available to other modules ------------------------------------------------------------------------------- -- Dependencies: setRanks; parseInput; propertyvalueandquals; assembleoutput; parseParam; sourced; -- labelOrId; i18n.latestdatequalifier; format_Date; makeOrdinal; roundto; decimalPrecision; decimalToDMS; ------------------------------------------------------------------------------- p._getValue = function(args) -- parameter sets for commonly used groups of parameters local paraset = tonumber(args.ps or args.parameterset or 0) if paraset == 1 then -- a common setting, not usable in infoboxes because the 2018 RFC requires sources args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "no" args.noicon = "true" elseif paraset == 2 then -- equivalent to raw, not usable in infoboxes because the 2018 RFC requires sources args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "no" args.noicon = "true" args.linked = "no" args.pd = "true" elseif paraset == 3 then -- parameterset 1, but usable in infoboxes because the 2018 RFC requires sources args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "yes" args.noicon = "true" end -- implement eid parameter local eid = args.eid if eid == "" then return nil elseif eid then args.qid = eid end local propertyID = mw.text.trim(args[1] or "") args.reqranks = setRanks(args.rank) -- replacetext (rt) is a string that is returned instead of any non-empty Wikidata value -- this is useful for tracking and debugging, so we set fetchwikidata=ALL to fill the whitelist local replacetext = mw.text.trim(args.rt or args.replacetext or "") if replacetext ~= "" then args.fetchwikidata = "ALL" end local f = {} f.args = args local entityid, props = parseInput(f, f.args[2], propertyID) if not entityid then return props -- either the input parameter or nothing end -- qual is a string containing the property ID of the qualifier(s) to be returned -- if qual == "ALL" then all qualifiers returned -- if qual == "DATES" then qualifiers P580 (start time) and P582 (end time) returned -- if nothing or an empty string is passed set it nil -> no qualifiers returned local qualID = mw.text.trim(args.qual or ""):upper() if qualID == "" then qualID = nil end -- set a language object and code in the args table args.langobj = findLang(args.lang) args.lang = args.langobj.code -- table 'out' stores the return value(s): local out = propertyvalueandquals(props, args, qualID) -- format the table of values and return it as a string: return assembleoutput(out, args, entityid, propertyID) end ------------------------------------------------------------------------------- -- getValue is used to get the value(s) of a property -- The property ID is passed as the first unnamed parameter and is required. -- A locally supplied parameter may optionaly be supplied as the second unnamed parameter. -- The function will now also return qualifiers if parameter qual is supplied ------------------------------------------------------------------------------- -- Dependencies: _getValue; setRanks; parseInput; propertyvalueandquals; assembleoutput; parseParam; sourced; -- labelOrId; i18n.latestdatequalifier; format_Date; makeOrdinal; roundto; decimalPrecision; decimalToDMS; ------------------------------------------------------------------------------- p.getValue = function(frame) local args= frame.args if not args[1] then args = frame:getParent().args if not args[1] then return i18n.errors["No property supplied"] end end return p._getValue(args) end ------------------------------------------------------------------------------- -- getPreferredValue is used to get a value, -- (or a comma separated list of them if multiple values exist). -- If preferred ranks are set, it will return those values, otherwise values with normal ranks -- now redundant to getValue with |rank=best ------------------------------------------------------------------------------- -- Dependencies: p.getValue; setRanks; parseInput; propertyvalueandquals; assembleoutput; -- parseParam; sourced; labelOrId; i18n.latestdatequalifier; format_Date; -- makeOrdinal; roundto; decimalPrecision; decimalToDMS; ------------------------------------------------------------------------------- p.getPreferredValue = function(frame) frame.args.rank = "best" return p.getValue(frame) end ------------------------------------------------------------------------------- -- getCoords is used to get coordinates for display in an infobox -- whitelist and blacklist are implemented -- optional 'display' parameter is allowed, defaults to nil - was "inline, title" ------------------------------------------------------------------------------- -- Dependencies: setRanks(); parseInput(); decimalPrecision(); ------------------------------------------------------------------------------- p.getCoords = function(frame) local propertyID = "P625" -- if there is a 'display' parameter supplied, use it -- otherwise default to nothing local disp = frame.args.display or "" if disp == "" then disp = nil -- default to not supplying display parameter, was "inline, title" end -- there may be a format parameter to switch from deg/min/sec to decimal degrees -- default is deg/min/sec -- decimal degrees needs |format = dec local form = (frame.args.format or ""):lower():sub(1,3) if form ~= "dec" then form = "dms" end -- just deal with best values frame.args.reqranks = setRanks("best") local qid, props = parseInput(frame, frame.args[1], propertyID) if not qid then return props -- either local parameter or nothing else local dv = props[1].mainsnak.datavalue.value local lat, long, prec = dv.latitude, dv.longitude, dv.precision lat = decimalPrecision(lat, prec) long = decimalPrecision(long, prec) local lat_long = { lat, long } lat_long["display"] = disp lat_long["format"] = form -- invoke template Coord with the values stored in the table return frame:expandTemplate{title = 'coord', args = lat_long} end end ------------------------------------------------------------------------------- -- getQualifierValue is used to get a formatted value of a qualifier -- -- The call needs: a property (the unnamed parameter or 1=) -- a target value for that property (pval=) -- a qualifier for that target value (qual=) -- The usual whitelisting and blacklisting of the property is implemented -- The boolean onlysourced= parameter can be set to return nothing -- when the property is unsourced (or only sourced to Wikipedia) ------------------------------------------------------------------------------- -- Dependencies: parseParam(); setRanks(); parseInput(); sourced(); -- propertyvalueandquals(); assembleoutput(); -- labelOrId(); i18n.latestdatequalifier(); format_Date(); -- findLang(); makeOrdinal(); roundto(); decimalPrecision(); decimalToDMS(); ------------------------------------------------------------------------------- p.getQualifierValue = function(frame) -- The property ID that will have a qualifier is the first unnamed parameter local propertyID = mw.text.trim(frame.args[1] or "") -- The value of the property we want to match whose qualifier value is to be returned -- is passed in named parameter |pval= local propvalue = frame.args.pval -- The property ID of the qualifier -- whose value is to be returned is passed in named parameter |qual= local qualifierID = frame.args.qual -- A filter can be set like this: filter=P642==Q22674854 local filter, fprop, fval local ftable = mw.text.split(frame.args.filter or "", "==") if ftable[2] then fprop = mw.text.trim(ftable[1]) fval = mw.text.trim(ftable[2]) filter = true end -- onlysourced is a boolean passed to return qualifiers -- only when property values are sourced to something other than Wikipedia -- if nothing or an empty string is passed set it true -- if "false" or "no" or 0 is passed set it false local onlysrc = parseParam(frame.args.onlysourced or frame.args.osd, true) -- set a language object and language code in the frame.args table frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code -- set the requested ranks flags frame.args.reqranks = setRanks(frame.args.rank) -- check for locally supplied parameter in second unnamed parameter -- success means no local parameter and the property exists local qid, props = parseInput(frame, frame.args[2], propertyID) if qid then local out = {} -- Scan through the values of the property -- we want something like property is P793, significant event (in propertyID) -- whose value is something like Q385378, construction (in propvalue) -- then we can return the value(s) of a qualifier such as P580, start time (in qualifierID) for k1, v1 in pairs(props) do if v1.mainsnak.snaktype == "value" and v1.mainsnak.datavalue.type == "wikibase-entityid" then -- It's a wiki-linked value, so check if it's the target (in propvalue) and if it has qualifiers if v1.mainsnak.datavalue.value.id == propvalue and v1.qualifiers then if onlysrc == false or sourced(v1) then -- if we've got this far, we have a (sourced) claim with qualifiers -- which matches the target, so apply the filter and find the value(s) of the qualifier we want if not filter or (v1.qualifiers[fprop] and v1.qualifiers[fprop][1].datavalue.value.id == fval) then local quals = v1.qualifiers[qualifierID] if quals then -- can't reference qualifer, so set onlysourced = "no" (args are strings, not boolean) local qargs = frame.args qargs.onlysourced = "no" local vals = propertyvalueandquals(quals, qargs, qid) for k, v in ipairs(vals) do out[#out + 1] = v end end end end -- of check for sourced end -- of check for matching required value and has qualifiers end -- of check for wikibase entity end -- of loop through values of propertyID return assembleoutput(out, frame.args, qid, propertyID) else return props -- either local parameter or nothing end -- of test for success return nil end ------------------------------------------------------------------------------- -- getSumOfParts scans the property 'has part' (P527) for values matching a list. -- The list is passed in parameter vlist. -- It consists of a string of Qids separated by spaces or any usual punctuation. -- If the matched values have a qualifier 'quantity' (P1114), those quantities are summed. -- The sum is returned as a number or nothing if zero. ------------------------------------------------------------------------------- -- Dependencies: _getsumofparts; ------------------------------------------------------------------------------- p.getSumOfParts = function(frame) local sum = _getsumofparts(frame.args) if sum == 0 then return end return sum end ------------------------------------------------------------------------------- -- getValueByQual gets the value of a property which has a qualifier with a given entity value -- The call needs: -- a property ID (the unnamed parameter or 1=Pxxx) -- the ID of a qualifier for that property (qualID=Pyyy) -- either the Wikibase-entity ID of a value for that qualifier (qvalue=Qzzz) -- or a string value for that qualifier (qvalue=abc123) -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: _getvaluebyqual; parseParam; setRanks; parseInput; sourced; -- assembleoutput; ------------------------------------------------------------------------------- p.getValueByQual = function(frame) local qualID = frame.args.qualID -- The Q-id of the value for the qualifier we want to match is in named parameter |qvalue= local qval = frame.args.qvalue or "" if qval == "" then return "no qualifier value supplied" end local function checkQID(id) return id == qval end return _getvaluebyqual(frame, qualID, checkQID) end ------------------------------------------------------------------------------- -- getValueByLang gets the value of a property which has a qualifier P407 -- ("language of work or name") whose value has the given language code -- The call needs: -- a property ID (the unnamed parameter or 1=Pxxx) -- the MediaWiki language code to match the language (lang=xx[-yy]) -- (if no code is supplied, it uses the default language) -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: _getvaluebyqual; parseParam; setRanks; parseInput; sourced; assembleoutput; ------------------------------------------------------------------------------- p.getValueByLang = function(frame) -- The language code for the qualifier we want to match is in named parameter |lang= local langcode = findLang(frame.args.lang).code local function checkLanguage(id) -- id should represent a language like "British English (Q7979)" -- it should have string property "Wikimedia language code (P424)" -- qlcode will be a table: local qlcode = mw.wikibase.getBestStatements(id, "P424") if (#qlcode > 0) and (qlcode[1].mainsnak.datavalue.value == langcode) then return true end end return _getvaluebyqual(frame, "P407", checkLanguage) end ------------------------------------------------------------------------------- -- getValueByRefSource gets the value of a property which has a reference "stated in" (P248) -- whose value has the given entity-ID. -- The call needs: -- a property ID (the unnamed parameter or 1=Pxxx) -- the entity ID of a value to match where the reference is stated in (match=Qzzz) -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p.getValueByRefSource = function(frame) -- The property ID that we want to check is the first unnamed parameter local propertyID = mw.text.trim(frame.args[1] or ""):upper() if propertyID == "" then return "no property supplied" end -- The Q-id of the value we want to match is in named parameter |qvalue= local qval = (frame.args.match or ""):upper() if qval == "" then qval = "Q21540096" end local unit = (frame.args.unit or ""):upper() if unit == "" then unit = "Q4917" end local onlysrc = parseParam(frame.args.onlysourced or frame.args.osd, true) -- set the requested ranks flags frame.args.reqranks = setRanks(frame.args.rank) -- set a language object and code in the frame.args table frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code local linked = parseParam(frame.args.linked, true) local uabbr = parseParam(frame.args.uabbr or frame.args.unitabbr, false) -- qid not nil means no local parameter and the property exists local qid, props = parseInput(frame, frame.args[2], propertyID) if qid then local out = {} local mlt= {} for k1, v1 in ipairs(props) do if onlysrc == false or sourced(v1) then if v1.references then for k2, v2 in ipairs(v1.references) do if v2.snaks.P248 then for k3, v3 in ipairs(v2.snaks.P248) do if v3.datavalue.value.id == qval then out[#out+1], mlt[#out+1] = rendersnak(v1, frame.args, linked, "", "", "", "", uabbr, unit) if not mlt[#out] then -- we only need one match per property value -- unless datatype was monolingual text break end end -- of test for match end -- of loop through values "stated in" end -- of test that "stated in" exists end -- of loop through references end -- of test that references exist end -- of test for sourced end -- of loop through values of propertyID if #mlt > 0 then local langcode = frame.args.lang langcode = mw.text.split( langcode, '-', true )[1] local fbtbl = mw.language.getFallbacksFor( langcode ) table.insert( fbtbl, 1, langcode ) local bestval = "" local found = false for idx1, lang1 in ipairs(fbtbl) do for idx2, lang2 in ipairs(mlt) do if (lang1 == lang2) and not found then bestval = out[idx2] found = true break end end -- loop through values of property end -- loop through fallback languages if found then -- replace output table with a table containing the best value out = { bestval } else -- more than one value and none of them on the list of fallback languages -- sod it, just give them the first one out = { out[1] } end end return assembleoutput(out, frame.args, qid, propertyID) else return props -- no property or local parameter supplied end -- of test for success end ------------------------------------------------------------------------------- -- getPropertyIDs takes most of the usual parameters. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented. -- It returns the Entity-IDs (Qids) of the values of a property if it is a Wikibase-Entity. -- Otherwise it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p._getPropertyIDs = function(args) args.reqranks = setRanks(args.rank) args.langobj = findLang(args.lang) args.lang = args.langobj.code -- change default for noicon to true args.noicon = tostring(parseParam(args.noicon or "", true)) local f = {} f.args = args local pid = mw.text.trim(args[1] or ""):upper() -- get the qid and table of claims for the property, or nothing and the local value passed local qid, props = parseInput(f, args[2], pid) if not qid then return props end if not props[1] then return nil end local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 local out = {} for i, v in ipairs(props) do local snak = v.mainsnak if ( snak.datatype == "wikibase-item" ) and ( v.rank and args.reqranks[v.rank:sub(1, 1)] ) and ( snak.snaktype == "value" ) and ( sourced(v) or not onlysrc ) then out[#out+1] = snak.datavalue.value.id end if maxvals > 0 and #out >= maxvals then break end end return assembleoutput(out, args, qid, pid) end p.getPropertyIDs = function(frame) local args = frame.args return p._getPropertyIDs(args) end ------------------------------------------------------------------------------- -- getQualifierIDs takes most of the usual parameters. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented. -- It takes a property-id as the first unnamed parameter, and an optional parameter qlist -- which is a list of qualifier property-ids to search for (default is "ALL") -- It returns the Entity-IDs (Qids) of the values of a property if it is a Wikibase-Entity. -- Otherwise it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p.getQualifierIDs = function(frame) local args = frame.args args.reqranks = setRanks(args.rank) args.langobj = findLang(args.lang) args.lang = args.langobj.code -- change default for noicon to true args.noicon = tostring(parseParam(args.noicon or "", true)) local f = {} f.args = args local pid = mw.text.trim(args[1] or ""):upper() -- get the qid and table of claims for the property, or nothing and the local value passed local qid, props = parseInput(f, args[2], pid) if not qid then return props end if not props[1] then return nil end -- get the other parameters local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 local qlist = args.qlist or "" if qlist == "" then qlist = "ALL" end qlist = qlist:gsub("[%p%s]+", " ") .. " " local out = {} for i, v in ipairs(props) do local snak = v.mainsnak if ( v.rank and args.reqranks[v.rank:sub(1, 1)] ) and ( snak.snaktype == "value" ) and ( sourced(v) or not onlysrc ) then if v.qualifiers then for k1, v1 in pairs(v.qualifiers) do if qlist == "ALL " or qlist:match(k1 .. " ") then for i2, v2 in ipairs(v1) do if v2.datatype == "wikibase-item" and v2.snaktype == "value" then out[#out+1] = v2.datavalue.value.id end -- of test that id exists end -- of loop through qualifier values end -- of test for kq in qlist end -- of loop through qualifiers end -- of test for qualifiers end -- of test for rank value, sourced, and value exists if maxvals > 0 and #out >= maxvals then break end end -- of loop through property values return assembleoutput(out, args, qid, pid) end ------------------------------------------------------------------------------- -- getPropOfProp takes two propertyIDs: prop1 and prop2 (as well as the usual parameters) -- If the value(s) of prop1 are of type "wikibase-item" then it returns the value(s) of prop2 -- of each of those wikibase-items. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p._getPropOfProp = function(args) -- parameter sets for commonly used groups of parameters local paraset = tonumber(args.ps or args.parameterset or 0) if paraset == 1 then -- a common setting args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "no" args.noicon = "true" elseif paraset == 2 then -- equivalent to raw args.rank = "best" args.fetchwikidata = "ALL" args.onlysourced = "no" args.noicon = "true" args.linked = "no" args.pd = "true" elseif paraset == 3 then -- third set goes here end args.reqranks = setRanks(args.rank) args.langobj = findLang(args.lang) args.lang = args.langobj.code local pid1 = args.prop1 or args.pid1 or "" local pid2 = args.prop2 or args.pid2 or "" if pid1 == "" or pid2 == "" then return nil end local f = {} f.args = args local qid1, statements1 = parseInput(f, args[1], pid1) -- parseInput nulls empty args[1] and returns args[1] if nothing on Wikidata if not qid1 then return statements1 end -- otherwise it returns the qid and a table for the statement local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 local qualID = mw.text.trim(args.qual or ""):upper() if qualID == "" then qualID = nil end local out = {} for k, v in ipairs(statements1) do if not onlysrc or sourced(v) then local snak = v.mainsnak if snak.datatype == "wikibase-item" and snak.snaktype == "value" then local qid2 = snak.datavalue.value.id local statements2 = {} if args.reqranks.b then statements2 = mw.wikibase.getBestStatements(qid2, pid2) else statements2 = mw.wikibase.getAllStatements(qid2, pid2) end if statements2[1] then local out2 = propertyvalueandquals(statements2, args, qualID) out[#out+1] = assembleoutput(out2, args, qid2, pid2) end end -- of test for valid property1 value end -- of test for sourced if maxvals > 0 and #out >= maxvals then break end end -- of loop through values of property1 return assembleoutput(out, args, qid1, pid1) end p.getPropOfProp = function(frame) local args= frame.args if not args.prop1 and not args.pid1 then args = frame:getParent().args if not args.prop1 and not args.pid1 then return i18n.errors["No property supplied"] end end return p._getPropOfProp(args) end ------------------------------------------------------------------------------- -- getAwardCat takes most of the usual parameters. If the item has values of P166 (award received), -- then it examines each of those awards for P2517 (category for recipients of this award). -- If it exists, it returns the corresponding category, -- with the item's P734 (family name) as sort key, or no sort key if there is no family name. -- The sort key may be overridden by the parameter |sortkey (alias |sk). -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p.getAwardCat = function(frame) frame.args.reqranks = setRanks(frame.args.rank) frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code local args = frame.args args.sep = " " local pid1 = args.prop1 or "P166" local pid2 = args.prop2 or "P2517" if pid1 == "" or pid2 == "" then return nil end -- locally supplied value: local localval = mw.text.trim(args[1] or "") local qid1, statements1 = parseInput(frame, localval, pid1) if not qid1 then return localval end -- linkprefix (strip quotes) local lp = (args.linkprefix or args.lp or ""):gsub('"', '') -- sort key (strip quotes, hyphens and periods): local sk = (args.sortkey or args.sk or ""):gsub('["-.]', '') -- family name: local famname = "" if sk == "" then local p734 = mw.wikibase.getBestStatements(qid1, "P734")[1] local p734id = p734 and p734.mainsnak.snaktype == "value" and p734.mainsnak.datavalue.value.id or "" famname = mw.wikibase.getSitelink(p734id) or "" -- strip namespace and disambigation local pos = famname:find(":") or 0 famname = famname:sub(pos+1):gsub("%s%(.+%)$", "") if famname == "" then local lbl = mw.wikibase.getLabel(p734id) famname = lbl and mw.text.nowiki(lbl) or "" end end local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 local qualID = mw.text.trim(args.qual or ""):upper() if qualID == "" then qualID = nil end local out = {} for k, v in ipairs(statements1) do if not onlysrc or sourced(v) then local snak = v.mainsnak if snak.datatype == "wikibase-item" and snak.snaktype == "value" then local qid2 = snak.datavalue.value.id local statements2 = {} if args.reqranks.b then statements2 = mw.wikibase.getBestStatements(qid2, pid2) else statements2 = mw.wikibase.getAllStatements(qid2, pid2) end if statements2[1] and statements2[1].mainsnak.snaktype == "value" then local qid3 = statements2[1].mainsnak.datavalue.value.id local sitelink = mw.wikibase.getSitelink(qid3) -- if there's no local sitelink, create the sitelink from English label if not sitelink then local lbl = mw.wikibase.getLabelByLang(qid3, "en") if lbl then if lbl:sub(1,9) == "Category:" then sitelink = mw.text.nowiki(lbl) else sitelink = "Category:" .. mw.text.nowiki(lbl) end end end if sitelink then if sk ~= "" then out[#out+1] = "[[" .. lp .. sitelink .. "|" .. sk .. "]]" elseif famname ~= "" then out[#out+1] = "[[" .. lp .. sitelink .. "|" .. famname .. "]]" else out[#out+1] = "[[" .. lp .. sitelink .. "]]" end -- of check for sort keys end -- of test for sitelink end -- of test for category end -- of test for wikibase item has a value end -- of test for sourced if maxvals > 0 and #out >= maxvals then break end end -- of loop through values of property1 return assembleoutput(out, args, qid1, pid1) end ------------------------------------------------------------------------------- -- getIntersectCat takes most of the usual parameters. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented -- It takes two properties, |prop1 and |prop2 (e.g. occupation and country of citizenship) -- Each property's value is a wiki-base entity -- For each value of the first parameter (ranks implemented) it fetches the value's main category -- and then each value of the second parameter (possibly substituting a simpler description) -- then it returns all of the categories representing the intersection of those properties, -- (e.g. Category:Actors from Canada). A joining term may be supplied (e.g. |join=from). -- The item's P734 (family name) is the sort key, or no sort key if there is no family name. -- The sort key may be overridden by the parameter |sortkey (alias |sk). ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; propertyvalueandquals assembleoutput; ------------------------------------------------------------------------------- p.getIntersectCat = function(frame) frame.args.reqranks = setRanks(frame.args.rank) frame.args.langobj = findLang(frame.args.lang) frame.args.lang = frame.args.langobj.code local args = frame.args args.sep = " " args.linked = "no" local pid1 = args.prop1 or "P106" local pid2 = args.prop2 or "P27" if pid1 == "" or pid2 == "" then return nil end local qid, statements1 = parseInput(frame, "", pid1) if not qid then return nil end local qid, statements2 = parseInput(frame, "", pid2) if not qid then return nil end -- topics like countries may have different names in categories from their label in Wikidata local subs_exists, subs = pcall(mw.loadData, "Module:WikidataIB/subs") local join = args.join or "" local onlysrc = parseParam(args.onlysourced or args.osd, true) local maxvals = tonumber(args.maxvals) or 0 -- linkprefix (strip quotes) local lp = (args.linkprefix or args.lp or ""):gsub('"', '') -- sort key (strip quotes, hyphens and periods): local sk = (args.sortkey or args.sk or ""):gsub('["-.]', '') -- family name: local famname = "" if sk == "" then local p734 = mw.wikibase.getBestStatements(qid, "P734")[1] local p734id = p734 and p734.mainsnak.snaktype == "value" and p734.mainsnak.datavalue.value.id or "" famname = mw.wikibase.getSitelink(p734id) or "" -- strip namespace and disambigation local pos = famname:find(":") or 0 famname = famname:sub(pos+1):gsub("%s%(.+%)$", "") if famname == "" then local lbl = mw.wikibase.getLabel(p734id) famname = lbl and mw.text.nowiki(lbl) or "" end end local cat1 = {} for k, v in ipairs(statements1) do if not onlysrc or sourced(v) then -- get the ID representing the value of the property local pvalID = (v.mainsnak.snaktype == "value") and v.mainsnak.datavalue.value.id if pvalID then -- get the topic's main category (P910) for that entity local p910 = mw.wikibase.getBestStatements(pvalID, "P910")[1] if p910 and p910.mainsnak.snaktype == "value" then local tmcID = p910.mainsnak.datavalue.value.id -- use sitelink or the English label for the cat local cat = mw.wikibase.getSitelink(tmcID) if not cat then local lbl = mw.wikibase.getLabelByLang(tmcID, "en") if lbl then if lbl:sub(1,9) == "Category:" then cat = mw.text.nowiki(lbl) else cat = "Category:" .. mw.text.nowiki(lbl) end end end cat1[#cat1+1] = cat end -- of test for topic's main category exists end -- of test for property has vaild value end -- of test for sourced if maxvals > 0 and #cat1 >= maxvals then break end end local cat2 = {} for k, v in ipairs(statements2) do if not onlysrc or sourced(v) then local cat = rendersnak(v, args) if subs[cat] then cat = subs[cat] end cat2[#cat2+1] = cat end if maxvals > 0 and #cat2 >= maxvals then break end end local out = {} for k1, v1 in ipairs(cat1) do for k2, v2 in ipairs(cat2) do if sk ~= "" then out[#out+1] = "[[" .. lp .. v1 .. " " .. join .. " " .. v2 .. "|" .. sk .. "]]" elseif famname ~= "" then out[#out+1] = "[[" .. lp .. v1 .. " " .. join .. " " .. v2 .. "|" .. famname .. "]]" else out[#out+1] = "[[" .. lp .. v1 .. " " .. join .. " " .. v2 .. "]]" end -- of check for sort keys end end args.noicon = "true" return assembleoutput(out, args, qid, pid1) end ------------------------------------------------------------------------------- -- qualsToTable takes most of the usual parameters. -- The usual whitelisting, blacklisting, onlysourced, etc. are implemented. -- A qid may be given, and the first unnamed parameter is the property ID, which is of type wikibase item. -- It takes a list of qualifier property IDs as |quals= -- For a given qid and property, it creates the rows of an html table, -- each row being a value of the property (optionally only if the property matches the value in |pval= ) -- each cell being the first value of the qualifier corresponding to the list in |quals ------------------------------------------------------------------------------- -- Dependencies: parseParam; setRanks; parseInput; sourced; ------------------------------------------------------------------------------- p.qualsToTable = function(frame) local args = frame.args local quals = args.quals or "" if quals == "" then return "" end args.reqranks = setRanks(args.rank) local propertyID = mw.text.trim(args[1] or "") local f = {} f.args = args local entityid, props = parseInput(f, "", propertyID) if not entityid then return "" end args.langobj = findLang(args.lang) args.lang = args.langobj.code local pval = args.pval or "" local qplist = mw.text.split(quals, "%p") -- split at punctuation and make a sequential table for i, v in ipairs(qplist) do qplist[i] = mw.text.trim(v):upper() -- remove whitespace and capitalise end local col1 = args.firstcol or "" if col1 ~= "" then col1 = col1 .. "</td><td>" end local emptycell = args.emptycell or "&nbsp;" -- construct a 2-D array of qualifier values in qvals local qvals = {} for i, v in ipairs(props) do local skip = false if pval ~= "" then local pid = v.mainsnak.datavalue and v.mainsnak.datavalue.value.id if pid ~= pval then skip = true end end if not skip then local qval = {} local vqualifiers = v.qualifiers or {} -- go through list of wanted qualifier properties for i1, v1 in ipairs(qplist) do -- check for that property ID in the statement's qualifiers local qv, qtype if vqualifiers[v1] then qtype = vqualifiers[v1][1].datatype if qtype == "time" then if vqualifiers[v1][1].snaktype == "value" then qv = mw.wikibase.renderSnak(vqualifiers[v1][1]) qv = frame:expandTemplate{title="dts", args={qv}} else qv = "?" end elseif qtype == "url" then if vqualifiers[v1][1].snaktype == "value" then qv = mw.wikibase.renderSnak(vqualifiers[v1][1]) local display = mw.ustring.match( mw.uri.decode(qv, "WIKI"), "([%w ]+)$" ) if display then qv = "[" .. qv .. " " .. display .. "]" end end else qv = mw.wikibase.formatValue(vqualifiers[v1][1]) end end -- record either the value or a placeholder qval[i1] = qv or emptycell end -- of loop through list of qualifiers -- add the list of qualifier values as a "row" in the main list qvals[#qvals+1] = qval end end -- of for each value loop local out = {} for i, v in ipairs(qvals) do out[i] = "<tr><td>" .. col1 .. table.concat(qvals[i], "</td><td>") .. "</td></tr>" end return table.concat(out, "\n") end ------------------------------------------------------------------------------- -- getGlobe takes an optional qid of a Wikidata entity passed as |qid= -- otherwise it uses the linked item for the current page. -- If returns the Qid of the globe used in P625 (coordinate location), -- or nil if there isn't one. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getGlobe = function(frame) local qid = frame.args.qid or frame.args[1] or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end local coords = mw.wikibase.getBestStatements(qid, "P625")[1] local globeid if coords and coords.mainsnak.snaktype == "value" then globeid = coords.mainsnak.datavalue.value.globe:match("(Q%d+)") end return globeid end ------------------------------------------------------------------------------- -- getCommonsLink takes an optional qid of a Wikidata entity passed as |qid= -- It returns one of the following in order of preference: -- the Commons sitelink of the linked Wikidata item; -- the Commons sitelink of the topic's main category of the linked Wikidata item; ------------------------------------------------------------------------------- -- Dependencies: _getCommonslink(); _getSitelink(); parseParam() ------------------------------------------------------------------------------- p.getCommonsLink = function(frame) local oc = frame.args.onlycat or frame.args.onlycategories local fb = parseParam(frame.args.fallback or frame.args.fb, true) return _getCommonslink(frame.args.qid, oc, fb) end ------------------------------------------------------------------------------- -- getSitelink takes the qid of a Wikidata entity passed as |qid= -- It takes an optional parameter |wiki= to determine which wiki is to be checked for a sitelink -- If the parameter is blank, then it uses the local wiki. -- If there is a sitelink to an article available, it returns the plain text link to the article -- If there is no sitelink, it returns nil. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getSiteLink = function(frame) return _getSitelink(frame.args.qid, frame.args.wiki or mw.text.trim(frame.args[1] or "")) end ------------------------------------------------------------------------------- -- getLink has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid= -- If there is a sitelink to an article on the local Wiki, it returns a link to the article -- with the Wikidata label as the displayed text. -- If there is no sitelink, it returns the label as plain text. -- If there is no label in the local language, it displays the qid instead. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getLink = function(frame) local itemID = mw.text.trim(frame.args[1] or frame.args.qid or "") if itemID == "" then return end local sitelink = mw.wikibase.getSitelink(itemID) local label = labelOrId(itemID) if sitelink then return "[[:" .. sitelink .. "|" .. label .. "]]" else return label end end ------------------------------------------------------------------------------- -- getLabel has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid= -- It returns the Wikidata label for the local language as plain text. -- If there is no label in the local language, it displays the qid instead. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getLabel = function(frame) local itemID = mw.text.trim(frame.args[1] or frame.args.qid or "") if itemID == "" then return end local lang = frame.args.lang or "" if lang == "" then lang = nil end local label = labelOrId(itemID, lang) return label end ------------------------------------------------------------------------------- -- label has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid= -- if no qid is supplied, it uses the qid associated with the current page. -- It returns the Wikidata label for the local language as plain text. -- If there is no label in the local language, it returns nil. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.label = function(frame) local qid = mw.text.trim(frame.args[1] or frame.args.qid or "") if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return end local lang = frame.args.lang or "" if lang == "" then lang = nil end local label, success = labelOrId(qid, lang) if success then return label end end ------------------------------------------------------------------------------- -- getAT (Article Title) -- has the qid of a Wikidata entity passed as the first unnamed parameter or as |qid= -- If there is a sitelink to an article on the local Wiki, it returns the sitelink as plain text. -- If there is no sitelink or qid supplied, it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getAT = function(frame) local itemID = mw.text.trim(frame.args[1] or frame.args.qid or "") if itemID == "" then return end return mw.wikibase.getSitelink(itemID) end ------------------------------------------------------------------------------- -- getDescription has the qid of a Wikidata entity passed as |qid= -- (it defaults to the associated qid of the current article if omitted) -- and a local parameter passed as the first unnamed parameter. -- Any local parameter passed (other than "Wikidata" or "none") becomes the return value. -- It returns the article description for the Wikidata entity if the local parameter is "Wikidata". -- Nothing is returned if the description doesn't exist or "none" is passed as the local parameter. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getDescription = function(frame) local desc = mw.text.trim(frame.args[1] or "") local itemID = mw.text.trim(frame.args.qid or "") if itemID == "" then itemID = nil end if desc:lower() == 'wikidata' then return mw.wikibase.getDescription(itemID) elseif desc:lower() == 'none' then return nil else return desc end end ------------------------------------------------------------------------------- -- getAliases has the qid of a Wikidata entity passed as |qid= -- (it defaults to the associated qid of the current article if omitted) -- and a local parameter passed as the first unnamed parameter. -- It implements blacklisting and whitelisting with a field name of "alias" by default. -- Any local parameter passed becomes the return value. -- Otherwise it returns the aliases for the Wikidata entity with the usual list options. -- Nothing is returned if the aliases do not exist. ------------------------------------------------------------------------------- -- Dependencies: findLang(); assembleoutput() ------------------------------------------------------------------------------- p.getAliases = function(frame) local args = frame.args local fieldname = args.name or "" if fieldname == "" then fieldname = "alias" end local blacklist = args.suppressfields or args.spf or "" if blacklist:find(fieldname) then return nil end local localval = mw.text.trim(args[1] or "") if localval ~= "" then return localval end local whitelist = args.fetchwikidata or args.fwd or "" if whitelist == "" then whitelist = "NONE" end if not (whitelist == 'ALL' or whitelist:find(fieldname)) then return nil end local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid or not mw.wikibase.entityExists(qid) then return nil end local aliases = mw.wikibase.getEntity(qid).aliases if not aliases then return nil end args.langobj = findLang(args.lang) local langcode = args.langobj.code args.lang = langcode local out = {} for k1, v1 in pairs(aliases) do if v1[1].language == langcode then for k1, v2 in ipairs(v1) do out[#out+1] = v2.value end break end end return assembleoutput(out, args, qid) end ------------------------------------------------------------------------------- -- pageId returns the page id (entity ID, Qnnn) of the current page -- returns nothing if the page is not connected to Wikidata ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.pageId = function(frame) return mw.wikibase.getEntityIdForCurrentPage() end ------------------------------------------------------------------------------- -- formatDate is a wrapper to export the private function format_Date ------------------------------------------------------------------------------- -- Dependencies: format_Date(); ------------------------------------------------------------------------------- p.formatDate = function(frame) return format_Date(frame.args[1], frame.args.df, frame.args.bc) end ------------------------------------------------------------------------------- -- location is a wrapper to export the private function _location -- it takes the entity-id as qid or the first unnamed parameter -- optional boolean parameter first toggles the display of the first item -- optional boolean parameter skip toggles the display to skip to the last item -- parameter debug=<y/n> (default 'n') adds error msg if not a location ------------------------------------------------------------------------------- -- Dependencies: _location(); ------------------------------------------------------------------------------- p.location = function(frame) local debug = (frame.args.debug or ""):sub(1, 1):lower() if debug == "" then debug = "n" end local qid = mw.text.trim(frame.args.qid or frame.args[1] or ""):upper() if qid == "" then qid=mw.wikibase.getEntityIdForCurrentPage() end if not qid then if debug ~= "n" then return i18n.errors["entity-not-found"] else return nil end end local first = mw.text.trim(frame.args.first or "") local skip = mw.text.trim(frame.args.skip or "") return table.concat( _location(qid, first, skip), ", " ) end ------------------------------------------------------------------------------- -- checkBlacklist implements a test to check whether a named field is allowed -- returns true if the field is not blacklisted (i.e. allowed) -- returns false if the field is blacklisted (i.e. disallowed) -- {{#if:{{#invoke:WikidataIB |checkBlacklist |name=Joe |suppressfields=Dave; Joe; Fred}} | not blacklisted | blacklisted}} -- displays "blacklisted" -- {{#if:{{#invoke:WikidataIB |checkBlacklist |name=Jim |suppressfields=Dave; Joe; Fred}} | not blacklisted | blacklisted}} -- displays "not blacklisted" ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.checkBlacklist = function(frame) local blacklist = frame.args.suppressfields or frame.args.spf or "" local fieldname = frame.args.name or "" if blacklist ~= "" and fieldname ~= "" then if blacklist:find(fieldname) then return false else return true end else -- one of the fields is missing: let's call that "not on the list" return true end end ------------------------------------------------------------------------------- -- emptyor returns nil if its first unnamed argument is just punctuation, whitespace or html tags -- otherwise it returns the argument unchanged (including leading/trailing space). -- If the argument may contain "=", then it must be called explicitly: -- |1=arg -- (In that case, leading and trailing spaces are trimmed) -- It finds use in infoboxes where it can replace tests like: -- {{#if: {{#invoke:WikidatIB |getvalue |P99 |fwd=ALL}} | <span class="xxx">{{#invoke:WikidatIB |getvalue |P99 |fwd=ALL}}</span> | }} -- with a form that uses just a single call to Wikidata: -- {{#invoke |WikidataIB |emptyor |1= <span class="xxx">{{#invoke:WikidataIB |getvalue |P99 |fwd=ALL}}</span> }} ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.emptyor = function(frame) local s = frame.args[1] or "" if s == "" then return nil end local sx = s:gsub("%s", ""):gsub("<[^>]*>", ""):gsub("%p", "") if sx == "" then return nil else return s end end ------------------------------------------------------------------------------- -- labelorid is a public function to expose the output of labelOrId() -- Pass the Q-number as |qid= or as an unnamed parameter. -- It returns the Wikidata label for that entity or the qid if no label exists. ------------------------------------------------------------------------------- -- Dependencies: labelOrId ------------------------------------------------------------------------------- p.labelorid = function(frame) return (labelOrId(frame.args.qid or frame.args[1])) end ------------------------------------------------------------------------------- -- getLang returns the MediaWiki language code of the current content. -- If optional parameter |style=full, it returns the language name. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getLang = function(frame) local style = (frame.args.style or ""):lower() local langcode = mw.language.getContentLanguage().code if style == "full" then return mw.language.fetchLanguageName( langcode ) end return langcode end ------------------------------------------------------------------------------- -- getItemLangCode takes a qid parameter (using the current page's qid if blank) -- If the item for that qid has property country (P17) it looks at the first preferred value -- If the country has an official language (P37), it looks at the first preferred value -- If that official language has a language code (P424), it returns the first preferred value -- Otherwise it returns nothing. ------------------------------------------------------------------------------- -- Dependencies: _getItemLangCode() ------------------------------------------------------------------------------- p.getItemLangCode = function(frame) return _getItemLangCode(frame.args.qid or frame.args[1]) end ------------------------------------------------------------------------------- -- findLanguage exports the local findLang() function -- It takes an optional language code and returns, in order of preference: -- the code if a known language; -- the user's language, if set; -- the server's content language. ------------------------------------------------------------------------------- -- Dependencies: findLang ------------------------------------------------------------------------------- p.findLanguage = function(frame) return findLang(frame.args.lang or frame.args[1]).code end ------------------------------------------------------------------------------- -- getQid returns the qid, if supplied -- failing that, the Wikidata entity ID of the "category's main topic (P301)", if it exists -- failing that, the Wikidata entity ID associated with the current page, if it exists -- otherwise, nothing ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getQid = function(frame) local qid = (frame.args.qid or ""):upper() -- check if a qid was passed; if so, return it: if qid ~= "" then return qid end -- check if there's a "category's main topic (P301)": qid = mw.wikibase.getEntityIdForCurrentPage() if qid then local prop301 = mw.wikibase.getBestStatements(qid, "P301") if prop301[1] then local mctid = prop301[1].mainsnak.datavalue.value.id if mctid then return mctid end end end -- otherwise return the page qid (if any) return qid end ------------------------------------------------------------------------------- -- followQid takes four optional parameters: qid, props, list and all. -- If qid is not given, it uses the qid for the connected page -- or returns nil if there isn't one. -- props is a list of properties, separated by punctuation. -- If props is given, the Wikidata item for the qid is examined for each property in turn. -- If that property contains a value that is another Wikibase-item, that item's qid is returned, -- and the search terminates, unless |all=y when all of the qids are returned, separated by spaces. -- If |list= is set to a template, the qids are passed as arguments to the template. -- If props is not given, the qid is returned. ------------------------------------------------------------------------------- -- Dependencies: parseParam() ------------------------------------------------------------------------------- p._followQid = function(args) local qid = (args.qid or ""):upper() local all = parseParam(args.all, false) local list = args.list or "" if list == "" then list = nil end if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end local out = {} local props = (args.props or ""):upper() if props ~= "" then for p in mw.text.gsplit(props, "%p") do -- split at punctuation and iterate p = mw.text.trim(p) for i, v in ipairs( mw.wikibase.getBestStatements(qid, p) ) do local linkedid = v.mainsnak.datavalue and v.mainsnak.datavalue.value.id if linkedid then if all then out[#out+1] = linkedid else return linkedid end -- test for all or just the first one found end -- test for value exists for that property end -- loop through values of property to follow end -- loop through list of properties to follow end if #out > 0 then local ret = "" if list then ret = mw.getCurrentFrame():expandTemplate{title = list, args = out} else ret = table.concat(out, " ") end return ret else return qid end end p.followQid = function(frame) return p._followQid(frame.args) end ------------------------------------------------------------------------------- -- globalSiteID returns the globalSiteID for the current wiki -- e.g. returns "enwiki" for the English Wikipedia, "enwikisource" for English Wikisource, etc. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.globalSiteID = function(frame) return mw.wikibase.getGlobalSiteId() end ------------------------------------------------------------------------------- -- siteID returns the root of the globalSiteID -- e.g. "en" for "enwiki", "enwikisource", etc. -- treats "en-gb" as "en", etc. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.siteID = function(frame) local txtlang = frame:callParserFunction('int', {'lang'}) or "" -- This deals with specific exceptions: be-tarask -> be-x-old if txtlang == "be-tarask" then return "be_x_old" end local pos = txtlang:find("-") local ret = "" if pos then ret = txtlang:sub(1, pos-1) else ret = txtlang end return ret end ------------------------------------------------------------------------------- -- projID returns the code used to link to the reader's language's project -- e.g "en" for [[:en:WikidataIB]] -- treats "en-gb" as "en", etc. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.projID = function(frame) local txtlang = frame:callParserFunction('int', {'lang'}) or "" -- This deals with specific exceptions: be-tarask -> be-x-old if txtlang == "be-tarask" then return "be-x-old" end local pos = txtlang:find("-") local ret = "" if pos then ret = txtlang:sub(1, pos-1) else ret = txtlang end return ret end ------------------------------------------------------------------------------- -- formatNumber formats a number according to the the supplied language code ("|lang=") -- or the default language if not supplied. -- The number is the first unnamed parameter or "|num=" ------------------------------------------------------------------------------- -- Dependencies: findLang() ------------------------------------------------------------------------------- p.formatNumber = function(frame) local lang local num = tonumber(frame.args[1] or frame.args.num) or 0 lang = findLang(frame.args.lang) return lang:formatNum( num ) end ------------------------------------------------------------------------------- -- examine dumps the property (the unnamed parameter or pid) -- from the item given by the parameter 'qid' (or the other unnamed parameter) -- or from the item corresponding to the current page if qid is not supplied. -- e.g. {{#invoke:WikidataIB |examine |pid=P26 |qid=Q42}} -- or {{#invoke:WikidataIB |examine |P26 |Q42}} or any combination of these -- or {{#invoke:WikidataIB |examine |P26}} for the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.examine = function( frame ) local args if frame.args[1] or frame.args.pid or frame.args.qid then args = frame.args else args = frame:getParent().args end local par = {} local pid = (args.pid or ""):upper() local qid = (args.qid or ""):upper() par[1] = mw.text.trim( args[1] or "" ):upper() par[2] = mw.text.trim( args[2] or "" ):upper() table.sort(par) if par[2]:sub(1,1) == "P" then par[1], par[2] = par[2], par[1] end if pid == "" then pid = par[1] end if qid == "" then qid = par[2] end local q1 = qid:sub(1,1) if pid:sub(1,1) ~= "P" then return "No property supplied" end if q1 ~= "Q" and q1 ~= "M" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return "No item for this page" end return "<pre>" .. mw.dumpObject( mw.wikibase.getAllStatements( qid, pid ) ) .. "</pre>" end ------------------------------------------------------------------------------- -- checkvalue looks for 'val' as a wikibase-item value of a property (the unnamed parameter or pid) -- from the item given by the parameter 'qid' -- or from the Wikidata item associated with the current page if qid is not supplied. -- It only checks ranks that are requested (preferred and normal by default) -- If property is not supplied, then P31 (instance of) is assumed. -- It returns val if found or nothing if not found. -- e.g. {{#invoke:WikidataIB |checkvalue |val=Q5 |pid=P31 |qid=Q42}} -- or {{#invoke:WikidataIB |checkvalue |val=Q5 |P31 |qid=Q42}} -- or {{#invoke:WikidataIB |checkvalue |val=Q5 |qid=Q42}} -- or {{#invoke:WikidataIB |checkvalue |val=Q5 |P31}} for the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.checkvalue = function( frame ) local args if frame.args.val then args = frame.args else args = frame:getParent().args end local val = args.val if not val then return nil end local pid = mw.text.trim(args.pid or args[1] or "P31"):upper() local qid = (args.qid or ""):upper() if pid:sub(1,1) ~= "P" then return nil end if qid:sub(1,1) ~= "Q" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end local ranks = setRanks(args.rank) local stats = {} if ranks.b then stats = mw.wikibase.getBestStatements(qid, pid) else stats = mw.wikibase.getAllStatements( qid, pid ) end if not stats[1] then return nil end if stats[1].mainsnak.datatype == "wikibase-item" then for k, v in pairs( stats ) do local ms = v.mainsnak if ranks[v.rank:sub(1,1)] and ms.snaktype == "value" and ms.datavalue.value.id == val then return val end end end return nil end ------------------------------------------------------------------------------- -- url2 takes a parameter url= that is a proper url and formats it for use in an infobox. -- If no parameter is supplied, it returns nothing. -- This is the equivalent of Template:URL -- but it keeps the "edit at Wikidata" pen icon out of the microformat. -- Usually it will take its url parameter directly from a Wikidata call: -- e.g. {{#invoke:WikidataIB |url2 |url={{wdib |P856 |qid=Q23317 |fwd=ALL |osd=no}} }} ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.url2 = function(frame) local txt = frame.args.url or "" if txt == "" then return nil end -- extract any icon local url, icon = txt:match("(.+)&nbsp;(.+)") -- make sure there's at least a space at the end url = (url or txt) .. " " icon = icon or "" -- extract any protocol like https:// local prot = url:match("(https*://).+[ \"\']") -- extract address local addr = "" if prot then addr = url:match("https*://(.+)[ \"\']") or " " else prot = "//" addr = url:match("[^%p%s]+%.(.+)[ \"\']") or " " end -- strip trailing / from end of domain-only url and add <wbr/> before . and / local disp, n = addr:gsub( "^([^/]+)/$", "%1" ):gsub("%/", "<wbr/>/"):gsub("%.", "<wbr/>.") return '<span class="url">[' .. prot .. addr .. " " .. disp .. "]</span>&nbsp;" .. icon end ------------------------------------------------------------------------------- -- getWebsite fetches the Official website (P856) and formats it for use in an infobox. -- This is similar to Template:Official website but with a url displayed, -- and it adds the "edit at Wikidata" pen icon beyond the microformat if enabled. -- A local value will override the Wikidata value. "NONE" returns nothing. -- e.g. {{#invoke:WikidataIB |getWebsite |qid= |noicon= |lang= |url= }} ------------------------------------------------------------------------------- -- Dependencies: findLang(); parseParam(); ------------------------------------------------------------------------------- p.getWebsite = function(frame) local url = frame.args.url or "" if url:upper() == "NONE" then return nil end local urls = {} local quals = {} local qid = frame.args.qid or "" if url and url ~= "" then urls[1] = url else if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return nil end local prop856 = mw.wikibase.getBestStatements(qid, "P856") for k, v in pairs(prop856) do if v.mainsnak.snaktype == "value" then urls[#urls+1] = v.mainsnak.datavalue.value if v.qualifiers and v.qualifiers["P1065"] then -- just take the first archive url (P1065) local au = v.qualifiers["P1065"][1] if au.snaktype == "value" then quals[#urls] = au.datavalue.value end -- test for archive url having a value end -- test for qualifers end -- test for website having a value end -- loop through website(s) end if #urls == 0 then return nil end local out = {} for i, u in ipairs(urls) do local link = quals[i] or u local prot, addr = u:match("(http[s]*://)(.+)") addr = addr or u local disp, n = addr:gsub("%.", "<wbr/>%.") out[#out+1] = '<span class="url">[' .. link .. " " .. disp .. "]</span>" end local langcode = findLang(frame.args.lang).code local noicon = parseParam(frame.args.noicon, false) if url == "" and not noicon then out[#out] = out[#out] .. createicon(langcode, qid, "P856") end local ret = "" if #out > 1 then ret = mw.getCurrentFrame():expandTemplate{title = "ubl", args = out} else ret = out[1] end return ret end ------------------------------------------------------------------------------- -- getAllLabels fetches the set of labels and formats it for display as wikitext. -- It takes a parameter 'qid' for arbitrary access, otherwise it uses the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getAllLabels = function(frame) local args = frame.args or frame:getParent().args or {} local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid or not mw.wikibase.entityExists(qid) then return i18n["entity-not-found"] end local labels = mw.wikibase.getEntity(qid).labels if not labels then return i18n["labels-not-found"] end local out = {} for k, v in pairs(labels) do out[#out+1] = v.value .. " (" .. v.language .. ")" end return table.concat(out, "; ") end ------------------------------------------------------------------------------- -- getAllDescriptions fetches the set of descriptions and formats it for display as wikitext. -- It takes a parameter 'qid' for arbitrary access, otherwise it uses the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getAllDescriptions = function(frame) local args = frame.args or frame:getParent().args or {} local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid or not mw.wikibase.entityExists(qid) then return i18n["entity-not-found"] end local descriptions = mw.wikibase.getEntity(qid).descriptions if not descriptions then return i18n["descriptions-not-found"] end local out = {} for k, v in pairs(descriptions) do out[#out+1] = v.value .. " (" .. v.language .. ")" end return table.concat(out, "; ") end ------------------------------------------------------------------------------- -- getAllAliases fetches the set of aliases and formats it for display as wikitext. -- It takes a parameter 'qid' for arbitrary access, otherwise it uses the current page. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.getAllAliases = function(frame) local args = frame.args or frame:getParent().args or {} local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid or not mw.wikibase.entityExists(qid) then return i18n["entity-not-found"] end local aliases = mw.wikibase.getEntity(qid).aliases if not aliases then return i18n["aliases-not-found"] end local out = {} for k1, v1 in pairs(aliases) do local lang = v1[1].language local val = {} for k1, v2 in ipairs(v1) do val[#val+1] = v2.value end out[#out+1] = table.concat(val, ", ") .. " (" .. lang .. ")" end return table.concat(out, "; ") end ------------------------------------------------------------------------------- -- showNoLinks displays the article titles that should not be linked. ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- p.showNoLinks = function(frame) local out = {} for k, v in pairs(donotlink) do out[#out+1] = k end table.sort( out ) return table.concat(out, "; ") end ------------------------------------------------------------------------------- -- checkValidity checks whether the first unnamed parameter represents a valid entity-id, -- that is, something like Q1235 or P123. -- It returns the strings "true" or "false". -- Change false to nil to return "true" or "" (easier to test with #if:). ------------------------------------------------------------------------------- -- Dependencies: none ------------------------------------------------------------------------------- function p.checkValidity(frame) local id = mw.text.trim(frame.args[1] or "") if mw.wikibase.isValidEntityId(id) then return true else return false end end ------------------------------------------------------------------------------- -- getEntityFromTitle returns the Entity-ID (Q-number) for a given title. -- Modification of Module:ResolveEntityId -- The title is the first unnamed parameter. -- The site parameter determines the site/language for the title. Defaults to current wiki. -- The showdab parameter determines whether dab pages should return the Q-number or nil. Defaults to true. -- Returns the Q-number or nil if it does not exist. ------------------------------------------------------------------------------- -- Dependencies: parseParam ------------------------------------------------------------------------------- function p.getEntityFromTitle(frame) local args=frame.args if not args[1] then args=frame:getParent().args end if not args[1] then return nil end local title = mw.text.trim(args[1]) local site = args.site or "" local showdab = parseParam(args.showdab, true) local qid = mw.wikibase.getEntityIdForTitle(title, site) if qid then local prop31 = mw.wikibase.getBestStatements(qid, "P31")[1] if not showdab and prop31 and prop31.mainsnak.datavalue.value.id == "Q4167410" then return nil else return qid end end end ------------------------------------------------------------------------------- -- getDatePrecision returns the number representing the precision of the first best date value -- for the given property. -- It takes the qid and property ID -- The meanings are given at https://www.mediawiki.org/wiki/Wikibase/DataModel#Dates_and_times -- 0 = 1 billion years .. 6 = millennium, 7 = century, 8 = decade, 9 = year, 10 = month, 11 = day -- Returns 0 (or the second unnamed parameter) if the Wikidata does not exist. ------------------------------------------------------------------------------- -- Dependencies: parseParam; sourced; ------------------------------------------------------------------------------- function p.getDatePrecision(frame) local args=frame.args if not args[1] then args=frame:getParent().args end local default = tonumber(args[2] or args.default) or 0 local prop = mw.text.trim(args[1] or "") if prop == "" then return default end local qid = args.qid or "" if qid == "" then qid = mw.wikibase.getEntityIdForCurrentPage() end if not qid then return default end local onlysrc = parseParam(args.onlysourced or args.osd, true) local stat = mw.wikibase.getBestStatements(qid, prop) for i, v in ipairs(stat) do local prec = (onlysrc == false or sourced(v)) and v.mainsnak.datavalue and v.mainsnak.datavalue.value and v.mainsnak.datavalue.value.precision if prec then return prec end end return default end return p ------------------------------------------------------------------------------- -- List of exported functions ------------------------------------------------------------------------------- --[[ _getValue getValue getPreferredValue getCoords getQualifierValue getSumOfParts getValueByQual getValueByLang getValueByRefSource getPropertyIDs getQualifierIDs getPropOfProp getAwardCat getIntersectCat getGlobe getCommonsLink getSiteLink getLink getLabel label getAT getDescription getAliases pageId formatDate location checkBlacklist emptyor labelorid getLang getItemLangCode findLanguage getQID followQid globalSiteID siteID projID formatNumber examine checkvalue url2 getWebsite getAllLabels getAllDescriptions getAllAliases showNoLinks checkValidity getEntityFromTitle getDatePrecision --]] ------------------------------------------------------------------------------- ql7i3j6aywa93pfslfr0svyicj7ctkn Модуль:Infobox 828 13299 102342 89678 2026-11-05T07:20:54Z M. Omarius 10562 102342 Scribunto text/plain local p = {} local args = {} local origArgs = {} local root local empty_row_categories = {} local category_in_empty_row_pattern = '%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*]]' local has_rows = false local yesno = require("Module:Yesno") local lists = { plainlist_t = { patterns = { '^plainlist$', '%splainlist$', '^plainlist%s', '%splainlist%s' }, found = false, styles = 'Plainlist/styles.css' }, hlist_t = { patterns = { '^hlist$', '%shlist$', '^hlist%s', '%shlist%s' }, found = false, styles = 'Hlist/styles.css' } } local function has_list_class(args_to_check) for _, list in pairs(lists) do if not list.found then for _, arg in pairs(args_to_check) do for _, pattern in ipairs(list.patterns) do if mw.ustring.find(arg or '', pattern) then list.found = true break end end if list.found then break end end end end end local function isUntitledChildBox(sval) return sval and ( sval:match( '^%s*<%s*[Tt][Rr]' ) or sval:match( '^%s*\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127%s*<%s*[Tt][Rr]' ) ) end local function fixChildBoxes(sval, tt) local function notempty( s ) return s and s:match( '%S' ) end if notempty(sval) then local marker = '<span class=special_infobox_marker>' local s = sval -- start moving templatestyles and categories inside of table rows local slast = '' while slast ~= s do slast = s s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(%[%[%s*[Cc][Aa][Tt][Ee][Gg][Oo][Rr][Yy]%s*:[^]]*%]%])', '%2%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>%s*)(\127[^\127]*UNIQ%-%-templatestyles%-%x+%-QINU[^\127]*\127)', '%2%1') end -- end moving templatestyles and categories inside of table rows s = mw.ustring.gsub(s, '(<%s*[Tt][Rr])', marker .. '%1') s = mw.ustring.gsub(s, '(</[Tt][Rr]%s*>)', '%1' .. marker) if s:match(marker) then s = mw.ustring.gsub(s, marker .. '%s*' .. marker, '') s = mw.ustring.gsub(s, '([\r\n]|-[^\r\n]*[\r\n])%s*' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '%s*([\r\n]|-)', '%1') s = mw.ustring.gsub(s, '(</[Cc][Aa][Pp][Tt][Ii][Oo][Nn]%s*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '(<%s*[Tt][Aa][Bb][Ll][Ee][^<>]*>%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '^(%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, '([\r\n]%{|[^\r\n]*[\r\n]%s*)' .. marker, '%1') s = mw.ustring.gsub(s, marker .. '(%s*</[Tt][Aa][Bb][Ll][Ee]%s*>)', '%1') s = mw.ustring.gsub(s, marker .. '(%s*\n|%})', '%1') end if s:match(marker) then local subcells = mw.text.split(s, marker) s = '' for k = 1, #subcells do if k == 1 then s = s .. subcells[k] .. '</' .. tt .. '></tr>' elseif k == #subcells then local rowstyle = ' style="display:none"' if notempty(subcells[k]) then rowstyle = '' end s = s .. '<tr' .. rowstyle ..'><' .. tt .. ' colspan=2>\n' .. subcells[k] elseif notempty(subcells[k]) then if (k % 2) == 0 then s = s .. subcells[k] else s = s .. '<tr><' .. tt .. ' colspan=2>\n' .. subcells[k] .. '</' .. tt .. '></tr>' end end end end -- the next two lines add a newline at the end of lists for the PHP parser -- [[Special:Diff/849054481]] -- remove when [[:phab:T191516]] is fixed or OBE s = mw.ustring.gsub(s, '([\r\n][%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:][^\r\n]*)$', '%1\n') s = mw.ustring.gsub(s, '^([%*#;:])', '\n%1') s = mw.ustring.gsub(s, '^(%{%|)', '\n%1') return s else return sval end end -- Cleans empty tables local function cleanInfobox() root = tostring(root) if has_rows == false then root = mw.ustring.gsub(root, '<table[^<>]*>%s*</table>', '') end end -- Returns the union of the values of two tables, as a sequence. local function union(t1, t2) local vals = {} for k, v in pairs(t1) do vals[v] = true end for k, v in pairs(t2) do vals[v] = true end local ret = {} for k, v in pairs(vals) do table.insert(ret, k) end return ret end -- Returns a table containing the numbers of the arguments that exist -- for the specified prefix. For example, if the prefix was 'data', and -- 'data1', 'data2', and 'data5' exist, it would return {1, 2, 5}. local function getArgNums(prefix) local nums = {} for k, v in pairs(args) do local num = tostring(k):match('^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -- Adds a row to the infobox, with either a header cell -- or a label/data cell combination. local function addRow(rowArgs) if rowArgs.header and rowArgs.header ~= '_BLANK_' then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class, args.headerclass }) root :tag('tr') :addClass(rowArgs.rowclass) :addClass( isUntitledChildBox( rowArgs.header ) and 'infobox-hiddenrow' or nil ) :cssText(rowArgs.rowstyle) :tag('th') :attr('colspan', '2') :addClass('infobox-header') :addClass(rowArgs.class) :addClass(args.headerclass) -- @deprecated next; target .infobox-<name> .infobox-header :cssText(args.headerstyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.header, 'th')) if rowArgs.data and not yesno(args.decat) then root:wikitext( '[[Category:Pages using infobox templates with ignored data cells]]' ) end elseif rowArgs.data and rowArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ rowArgs.rowclass, rowArgs.class }) local row = root:tag('tr') row:addClass(rowArgs.rowclass) row:cssText(rowArgs.rowstyle) if rowArgs.label then row :tag('th') :attr('scope', 'row') :addClass('infobox-label') -- @deprecated next; target .infobox-<name> .infobox-label :cssText(args.labelstyle) :cssText(rowArgs.rowcellstyle) :wikitext(rowArgs.label) :done() else row:addClass( isUntitledChildBox( rowArgs.data ) and 'infobox-hiddenrow' or nil ) end local dataCell = row:tag('td') dataCell :attr('colspan', not rowArgs.label and '2' or nil) :addClass(not rowArgs.label and 'infobox-full-data' or 'infobox-data') :addClass(rowArgs.class) -- @deprecated next; target .infobox-<name> .infobox(-full)-data :cssText(rowArgs.datastyle) :cssText(rowArgs.rowcellstyle) :wikitext(fixChildBoxes(rowArgs.data, 'td')) else table.insert(empty_row_categories, rowArgs.data or '') end end local function renderTitle() if not args.title then return end has_rows = true has_list_class({args.titleclass}) root :tag('caption') :addClass('infobox-title') :addClass(args.titleclass) -- @deprecated next; target .infobox-<name> .infobox-title :cssText(args.titlestyle) :wikitext(args.title) end local function renderAboveRow() if not args.above then return end has_rows = true has_list_class({ args.aboveclass }) root :tag('tr') :addClass( isUntitledChildBox( args.above ) and 'infobox-hiddenrow' or nil ) :tag('th') :attr('colspan', '2') :addClass('infobox-above') :addClass(args.aboveclass) -- @deprecated next; target .infobox-<name> .infobox-above :cssText(args.abovestyle) :wikitext(fixChildBoxes(args.above,'th')) end local function renderBelowRow() if not args.below then return end has_rows = true has_list_class({ args.belowclass }) root :tag('tr') :addClass( isUntitledChildBox( args.below ) and 'infobox-hiddenrow' or nil ) :tag('td') :attr('colspan', '2') :addClass('infobox-below') :addClass(args.belowclass) -- @deprecated next; target .infobox-<name> .infobox-below :cssText(args.belowstyle) :wikitext(fixChildBoxes(args.below,'td')) end local function addSubheaderRow(subheaderArgs) if subheaderArgs.data and subheaderArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ subheaderArgs.rowclass, subheaderArgs.class }) local row = root:tag('tr') row:addClass(subheaderArgs.rowclass) row:addClass( isUntitledChildBox( subheaderArgs.data ) and 'infobox-hiddenrow' or nil ) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-subheader') :addClass(subheaderArgs.class) :cssText(subheaderArgs.datastyle) :cssText(subheaderArgs.rowcellstyle) :wikitext(fixChildBoxes(subheaderArgs.data, 'td')) else table.insert(empty_row_categories, subheaderArgs.data or '') end end local function renderSubheaders() if args.subheader then args.subheader1 = args.subheader end if args.subheaderrowclass then args.subheaderrowclass1 = args.subheaderrowclass end local subheadernums = getArgNums('subheader') for k, num in ipairs(subheadernums) do addSubheaderRow({ data = args['subheader' .. tostring(num)], -- @deprecated next; target .infobox-<name> .infobox-subheader datastyle = args.subheaderstyle, rowcellstyle = args['subheaderstyle' .. tostring(num)], class = args.subheaderclass, rowclass = args['subheaderrowclass' .. tostring(num)] }) end end local function addImageRow(imageArgs) if imageArgs.data and imageArgs.data:gsub(category_in_empty_row_pattern, ''):match('^%S') then has_rows = true has_list_class({ imageArgs.rowclass, imageArgs.class }) local row = root:tag('tr') row:addClass(imageArgs.rowclass) row:addClass( isUntitledChildBox( imageArgs.data ) and 'infobox-hiddenrow' or nil ) local dataCell = row:tag('td') dataCell :attr('colspan', '2') :addClass('infobox-image') :addClass(imageArgs.class) :cssText(imageArgs.datastyle) :wikitext(fixChildBoxes(imageArgs.data, 'td')) else table.insert(empty_row_categories, imageArgs.data or '') end end local function renderImages() if args.image then args.image1 = args.image end if args.caption then args.caption1 = args.caption end local imagenums = getArgNums('image') for k, num in ipairs(imagenums) do local caption = args['caption' .. tostring(num)] local data = mw.html.create():wikitext(args['image' .. tostring(num)]) if caption then data :tag('div') :addClass('infobox-caption') -- @deprecated next; target .infobox-<name> .infobox-caption :cssText(args.captionstyle) :wikitext(caption) end addImageRow({ data = tostring(data), -- @deprecated next; target .infobox-<name> .infobox-image datastyle = args.imagestyle, class = args.imageclass, rowclass = args['imagerowclass' .. tostring(num)] }) end end -- When autoheaders are turned on, preprocesses the rows local function preprocessRows() if not args.autoheaders then return end local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) local lastheader for k, num in ipairs(rownums) do if args['header' .. tostring(num)] then if lastheader then args['header' .. tostring(lastheader)] = nil end lastheader = num elseif args['data' .. tostring(num)] and args['data' .. tostring(num)]:gsub( category_in_empty_row_pattern, '' ):match('^%S') then local data = args['data' .. tostring(num)] if data:gsub(category_in_empty_row_pattern, ''):match('%S') then lastheader = nil end end end if lastheader then args['header' .. tostring(lastheader)] = nil end end -- Gets the union of the header and data argument numbers, -- and renders them all in order local function renderRows() local rownums = union(getArgNums('header'), getArgNums('data')) table.sort(rownums) for k, num in ipairs(rownums) do addRow({ header = args['header' .. tostring(num)], label = args['label' .. tostring(num)], data = args['data' .. tostring(num)], datastyle = args.datastyle, class = args['class' .. tostring(num)], rowclass = args['rowclass' .. tostring(num)], -- @deprecated next; target .infobox-<name> rowclass rowstyle = args['rowstyle' .. tostring(num)], rowcellstyle = args['rowcellstyle' .. tostring(num)] }) end end local function renderNavBar() if not args.name then return end has_rows = true root :tag('tr') :tag('td') :attr('colspan', '2') :addClass('infobox-navbar') :wikitext(require('Module:Navbar')._navbar{ args.name, mini = 1, }) end local function renderItalicTitle() local italicTitle = args['italic title'] and mw.ustring.lower(args['italic title']) if italicTitle == '' or italicTitle == 'force' or italicTitle == 'yes' then root:wikitext(require('Module:Italic title')._main({})) end end -- Categories in otherwise empty rows are collected in empty_row_categories. -- This function adds them to the module output. It is not affected by -- args.decat because this module should not prevent module-external categories -- from rendering. local function renderEmptyRowCategories() for _, s in ipairs(empty_row_categories) do root:wikitext(s) end end -- Render tracking categories. args.decat == turns off tracking categories. local function renderTrackingCategories() if yesno(args.decat) then return end if args.child == 'yes' then if args.title then root:wikitext( '[[Category:Pages using embedded infobox templates with the title parameter]]' ) end elseif #(getArgNums('data')) == 0 and mw.title.getCurrentTitle().namespace == 0 then root:wikitext('[[Category:Articles using infobox templates with no data rows]]') end end --[=[ Loads the templatestyles for the infobox. TODO: FINISH loading base templatestyles here rather than in MediaWiki:Common.css. There are 4-5000 pages with 'raw' infobox tables. See [[Mediawiki_talk:Common.css/to_do#Infobox]] and/or come help :). When we do this we should clean up the inline CSS below too. Will have to do some bizarre conversion category like with sidebar. ]=] local function loadTemplateStyles() local frame = mw.getCurrentFrame() local hlist_templatestyles = '' if lists.hlist_t.found then hlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.hlist_t.styles } } end local plainlist_templatestyles = '' if lists.plainlist_t.found then plainlist_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = lists.plainlist_t.styles } } end -- See function description local base_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = 'Module:Infobox/styles.css' } } local templatestyles = '' if args['templatestyles'] then templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['templatestyles'] } } end local child_templatestyles = '' if args['child templatestyles'] then child_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['child templatestyles'] } } end local grandchild_templatestyles = '' if args['grandchild templatestyles'] then grandchild_templatestyles = frame:extensionTag{ name = 'templatestyles', args = { src = args['grandchild templatestyles'] } } end return table.concat({ -- hlist -> plainlist -> base is best-effort to preserve old Common.css ordering. -- this ordering is not a guarantee because the rows of interest invoking -- each class may not be on a specific page hlist_templatestyles, plainlist_templatestyles, base_templatestyles, templatestyles, child_templatestyles, grandchild_templatestyles }) end -- common functions between the child and non child cases local function structure_infobox_common() renderSubheaders() renderImages() preprocessRows() renderRows() renderBelowRow() renderNavBar() renderItalicTitle() renderEmptyRowCategories() renderTrackingCategories() cleanInfobox() end -- Specify the overall layout of the infobox, with special settings if the -- infobox is used as a 'child' inside another infobox. local function _infobox() if args.child ~= 'yes' then root = mw.html.create('table') root :addClass(args.subbox == 'yes' and 'infobox-subbox' or 'infobox') :addClass(args.bodyclass) -- @deprecated next; target .infobox-<name> :cssText(args.bodystyle) has_list_class({ args.bodyclass }) renderTitle() renderAboveRow() else root = mw.html.create() root :wikitext(args.title) end structure_infobox_common() return loadTemplateStyles() .. root end -- If the argument exists and isn't blank, add it to the argument table. -- Blank arguments are treated as nil to match the behaviour of ParserFunctions. local function preprocessSingleArg(argName) if origArgs[argName] and origArgs[argName] ~= '' then args[argName] = origArgs[argName] end end -- Assign the parameters with the given prefixes to the args table, in order, in -- batches of the step size specified. This is to prevent references etc. from -- appearing in the wrong order. The prefixTable should be an array containing -- tables, each of which has two possible fields, a "prefix" string and a -- "depend" table. The function always parses parameters containing the "prefix" -- string, but only parses parameters in the "depend" table if the prefix -- parameter is present and non-blank. local function preprocessArgs(prefixTable, step) if type(prefixTable) ~= 'table' then error("Non-table value detected for the prefix table", 2) end if type(step) ~= 'number' then error("Invalid step value detected", 2) end -- Get arguments without a number suffix, and check for bad input. for i,v in ipairs(prefixTable) do if type(v) ~= 'table' or type(v.prefix) ~= "string" or (v.depend and type(v.depend) ~= 'table') then error('Invalid input detected to preprocessArgs prefix table', 2) end preprocessSingleArg(v.prefix) -- Only parse the depend parameter if the prefix parameter is present -- and not blank. if args[v.prefix] and v.depend then for j, dependValue in ipairs(v.depend) do if type(dependValue) ~= 'string' then error('Invalid "depend" parameter value detected in preprocessArgs') end preprocessSingleArg(dependValue) end end end -- Get arguments with number suffixes. local a = 1 -- Counter variable. local moreArgumentsExist = true while moreArgumentsExist == true do moreArgumentsExist = false for i = a, a + step - 1 do for j,v in ipairs(prefixTable) do local prefixArgName = v.prefix .. tostring(i) if origArgs[prefixArgName] then -- Do another loop if any arguments are found, even blank ones. moreArgumentsExist = true preprocessSingleArg(prefixArgName) end -- Process the depend table if the prefix argument is present -- and not blank, or we are processing "prefix1" and "prefix" is -- present and not blank, and if the depend table is present. if v.depend and (args[prefixArgName] or (i == 1 and args[v.prefix])) then for j,dependValue in ipairs(v.depend) do local dependArgName = dependValue .. tostring(i) preprocessSingleArg(dependArgName) end end end end a = a + step end end -- Parse the data parameters in the same order that the old {{infobox}} did, so -- that references etc. will display in the expected places. Parameters that -- depend on another parameter are only processed if that parameter is present, -- to avoid phantom references appearing in article reference lists. local function parseDataParameters() preprocessSingleArg('autoheaders') preprocessSingleArg('child') preprocessSingleArg('bodyclass') preprocessSingleArg('subbox') preprocessSingleArg('bodystyle') preprocessSingleArg('title') preprocessSingleArg('titleclass') preprocessSingleArg('titlestyle') preprocessSingleArg('above') preprocessSingleArg('aboveclass') preprocessSingleArg('abovestyle') preprocessArgs({ {prefix = 'subheader', depend = {'subheaderstyle', 'subheaderrowclass'}} }, 10) preprocessSingleArg('subheaderstyle') preprocessSingleArg('subheaderclass') preprocessArgs({ {prefix = 'image', depend = {'caption', 'imagerowclass'}} }, 10) preprocessSingleArg('captionstyle') preprocessSingleArg('imagestyle') preprocessSingleArg('imageclass') preprocessArgs({ {prefix = 'header'}, {prefix = 'data', depend = {'label'}}, {prefix = 'rowclass'}, {prefix = 'rowstyle'}, {prefix = 'rowcellstyle'}, {prefix = 'class'} }, 50) preprocessSingleArg('headerclass') preprocessSingleArg('headerstyle') preprocessSingleArg('labelstyle') preprocessSingleArg('datastyle') preprocessSingleArg('below') preprocessSingleArg('belowclass') preprocessSingleArg('belowstyle') preprocessSingleArg('name') -- different behaviour for italics if blank or absent args['italic title'] = origArgs['italic title'] preprocessSingleArg('decat') preprocessSingleArg('templatestyles') preprocessSingleArg('child templatestyles') preprocessSingleArg('grandchild templatestyles') end -- If called via #invoke, use the args passed into the invoking template. -- Otherwise, for testing purposes, assume args are being passed directly in. function p.infobox(frame) if frame == mw.getCurrentFrame() then origArgs = frame:getParent().args else origArgs = frame end parseDataParameters() return _infobox() end -- For calling via #invoke within a template function p.infoboxTemplate(frame) origArgs = {} for k,v in pairs(frame.args) do origArgs[k] = mw.text.trim(v) end parseDataParameters() return _infobox() end return p kueb5p6xeoq6x7bxu2zyyl7pmxgesrs Данте Алигйери 0 14356 102337 101104 2026-11-04T22:00:41Z InternetArchiveBot 12052 Rescuing 1 sources and tagging 0 as dead. #IABot (v2.0.9.6) 102337 wikitext text/x-wiki {{Хъвадарухъан|цӀар=Данте Алигйери|премиял=|пиша={{Hlist| * [[ШагІир]] * [[прозачи]] * мацІалъул теоретик * сиясаталъул теоретик * пачалихъияв хъулухъчи }}|гьунаралъул_сонал=1292–1321|мазгьаб=''[[Dolce Stil Novo]]''|жанр=|асаразул_мацӀ=[[Итал мацӀ|Итал]], тосканаялъулаб сверел, [[Латин мацӀ|латин]]|машгьурал_асарал=[[Илагьияб комедия]]|дебют=|шапакъатал=|лъимал=''васал:'' Пьетро ва Якопо <br>''яс:'' Антония|автограф=|гъулбас=|website=|сайт=|lib=|викитека=|викигъамас=|альма_матер=|лъади=[[Джемма Донати]]|оригинал_цӀар=Dante Alighieri|тӀубараб_цӀар=|код=it|сурат=Portrait de Dante.jpg|гӀеблъи=|гъоркьхъвай=[[wikt:posthumous|Хун хадусеб]] портрел [[темпера]]ялда<br />[[Сандро Боттичелли]]л хӀалтӀи, 1495|жинс=m|гьавидал_цӀар=Дуранте ди Алигйеро дельи Алигйери<br />{{lang-it|Durante di Alighiero degli Alighieri}}|тӀокӀцӀар=|гьавуна={{circa|1265}}|эбел=Белла|гьавураб_бакӀ=[[Флоренция]], [[Флоренциялъул Республика]]|хвана=14 сентябрь, 1321 (гӀ.-ш. 56 сон)|хвараб_бакӀ=[[Равенна]], [[Папал пачалихъ]]|вукъараб_бакӀ=[[Дантел хоб-рукъ]]|ватӀанчилъи={{Флагификация|Флоренциялъул Республика}}|миллат=[[Италиял|Италияв]]|эмен=[[Алигйеро ди Беллинчоне]]|викицитата=}} '''Данте Алигйери''' ( {{Lang-it|Dante Alighieri}}, {{ХФА|ˈdante aliˈɡjɛːri}}), батизе бегьула, хъанч балелъул '''Дуранте ди Алигйеро делйи Алигйери''' {{lang-it|Durante di Alighiero degli Alighieri}}{{refn|The name 'Dante' is understood to be a [[hypocorism]] of the name 'Durante', though no document known to survive from Dante's lifetime refers to him as such (including his own writings). A document prepared for Dante's son Jacopo refers to "Durante, often called Dante". He may have been named for his maternal grandfather Durante degli Abati.<ref>{{cite book |last=Gorni |first=Guglielmo |date=2009 |title=Dante: storia di un visionario |location=Rome |publisher=Gius. Laterza & Figli |chapter=Nascita e anagrafe di Dante |isbn=9788858101742}}</ref>|group=note}} ва гӀемериселъ [[Мононим|цо]] '''Данте''' абун рехсолев;<ref>{{Cite Merriam-Webster|Dante|access-date=20 май 2019}}</ref> {{c.|1265}} – 1321, [[Равенна]], [[Папал пачалихъ]])<!--full dates in infobox--> вукӀана [[Итал поэзия|итал поэт]], хъвадарухъан, философиячи<ref>{{Cite book|last1=Wetherbee|first1=Winthrop|url=https://plato.stanford.edu/archives/fall2018/entries/dante/|title=The Stanford Encyclopedia of Philosophy|last2=Aleksander|first2=Jason|date=30 април 2018|publisher=Metaphysics Research Lab, Stanford University|editor-last=Zalta|editor-first=Edward N.|via=Stanford Encyclopedia of Philosophy}}</ref>, эргъохъан, литературияб итал мацӀалъе кьучӀ лъуразул цояв. Гьесул ''[[Илагьияб комедия]]'', оригиналалда жибго Коммедия ({{lang|it|Comedìa}}, гьанжесеб итал: ''Commedia'') ва хадуб илагьияб абун [[Джованни Боккаччо|Джованни Боккаччоца]] эпитет кьураб<ref>[[Edward Hutton (writer)|Hutton, Edward]] (1910).''[http://www.gutenberg.org/ebooks/46722 Giovanni Boccaccio, a Biographical Study]''. p. 273.</ref>, рикӀкӀуна [[Гьоркьохъел гӀасраби|Гьоркьохъел гӀасрабазул]] бищун кӀвар бугел поэмабазул цояблъун ва [[Итал мацӀ|итал мацӀалда]] бугеб бищун кӀудияб литературияб хӀалтӀилъун.<ref>{{cite book|last=Bloom|first=Harold|url=https://archive.org/details/westerncanonbook00bloo|title=The Western Canon|publisher=Riverhead Books|year=1994|isbn=9781573225144|author-link=Harold Bloom|url-access=registration}}</ref><ref>{{cite book|last1=Shaw|first1=Prue|title=Reading Dante: From Here to Eternity|url=https://archive.org/details/readingdantefrom0000shaw|date=2014|publisher=Liveright Publishing Corporation|isbn=978-0-87140-742-9|location=New York|pages=Introduction}}</ref> Данте машгьур вуго гӀемерисел шигӀраби латин мацӀалда хъван, гьел цохӀо лъай бугел гӀадамазе гурони цӀализе щолареб заманалда жинца адабияталда гӀадатаб халкъияб мацӀ хӀалтӀизабизе байбихьиялъ. Гьесул ''[[De vulgari eloquentia]]'' (''Халкъияб мацӀалъулӀ пасихӀлъиялъул хӀакъалъулӀ'') букӀана тӀоцебесеб гӀелмияб хӀалтӀи, халкъияб мацӀ цӀуну хъвараб. Эс жиндирго [[La Vita Nuova|''La Vita Nuova'']] (ЦӀияб гӀумру, 1295) ва ''Илагьияб комедия'' гӀадал асаразулӀ тоскан диалект хӀалтӀизабиялъ квекана жакъасеб къоялде стандартаб итал мацӀ гӀуцӀизе. Эсул хӀалтӀуца гьабуна прецедент, жинда хадур [[Петрарка]] ва [[Боккаччо]] гӀадал цӀар рагӀарал итал хъвадарухъаби рилӀунел рукӀараб. Дантеца цӀакъ кӀудияб рол хӀана [[итал литература]] цебетӀеялъе. Эс [[ЖужахӀ|жужахӀалъул]], [[Пургаторий|пургаториялъул]] ва [[Алжан|алжаналъул]] гьабураб сипат лӀугьана инспирациялъул иццлъун [[БакътӀерхьул махщел|БакътӀерхьул махщалил]] ва литературалъул дагьабги гӀатӀидаб горсверуе.<ref>{{cite book|last=Haller|first=Elizabeth K.|title=Icons of the Middle Ages: Rulers, Writers, Rebels, and Saints|date=2012|publisher=Greenwood|isbn=978-0-313-34080-2|editor-last=Matheson|editor-first=Lister M.|volume=1|location=Santa Barbara, CA|page=244|chapter=Dante Alighieri|chapter-url=https://books.google.com/books?id=rETxD8KcnUIC&pg=PA244}}</ref><ref>{{Cite book|last=Murray|first=Charles A.|url=https://archive.org/details/humanaccomplishm00murr|title=Human accomplishment: the pursuit of excellence in the arts and sciences, 800 B.C. to 1950|date=2003|publisher=HarperCollins|isbn=978-0-06-019247-1|edition=1st|location=New York|oclc=52047270|url-access=registration}}</ref>. Гьеб гуребги, Данте рикӀкӀуна тӀоцевесев чилъун, жинца хурхараб лӀамухъил рифмияб (''[[terza rima]]'') схема хӀалтӀизабурав. Эсда абула итал мацӀалъул "эмен"–илан<ref>{{cite book|title=The Cambridge Companion to Dante's 'Commedia'|date=2018|publisher=Cambridge University Press|isbn=9781108421294|editor1-last=Barański|editor1-first=Zygmunt G.|page=108|editor2-last=Gilson|editor2-first=Simon}}</ref>, ва [[Италия|Италиялда]] гьесде гӀемериселъ абула ''{{lang|it|il Sommo Poeta}}'' ("тӀадегӀанав шагӀир") абунги. Данте, Петрарка ва Боккаччо итал литературалъул {{lang|it|tre corone}} ("лъабго таж") абун кӀодо гьарула. == Цебесеб гӀумру == == Лъайщвей ва поэзия == == Флоренция ва сиясат == == Флоренциялдаса къватӀиве витӀи == == Хвел ва вукъи == == Ирс == == Гьунар == === "ЦӀияб гӀумру" === === "Илагьияб комедия" === ==== Анализ ==== ==== Маданияталде асар ==== == Библиография == ===ХӀалтӀабазул сияхӀ=== Дантел бищун кӀвар бугел хӀалтӀаби руго хадусел<ref>Wilkins, E. (1920). [https://www.jstor.org/stable/432861?Search=yes&resultItemClick=true&searchText=dante+bibliography&searchUri=%2Faction%2FdoBasicSearch%3FQuery%3Ddante%2Bbibliography&ab_segments=0%2Fbasic_search_gsv2%2Fcontrol&refreqid=fastly-default%3Aeebd8a1a203ff022ed5e6b42cbd60d4e&seq=1#metadata_info_tab_contents An Introductory Dante Bibliography]. Modern Philology, 17(11), 623-632.</ref><ref>Bibliothèque nationale de France {BnF Data}. "[https://data.bnf.fr/en/11898585/dante_alighieri/ Dante Alighieri (1265-1321)]".</ref> * ''Il Fiore'' ва ''Detto d'Amore'' (1283–7) * ''[[La Vita Nuova]]'' ("ЦӀияб гӀумру", 1294) * ''[[De vulgari eloquentia]]'' ("Халкъияб мацӀалъулӀ пасихӀлъиялъул хӀакъалъулӀ", 1302–5; латин мацӀалда эссе) * ''[[Convivio]]'' ("Банкет", 1307) * ''[[De Monarchia]]'' (1313; Дунялияб ва динияб хӀакимлъиялъул хӀакъалъулӀ трактат, латиналда) * ''[[Divine Comedy]]'' (1320) * ''[[Eclogues (Dante)|Эклогал]]'' (1320) * ''Quaestio de aqua et terra'' ("Лъел ва ракьалъулӀ хӀакъалъулӀ суал", 1320; гьоркьохъел гӀасрабазулаб космологиялда проблемабазул бахӀс, латиналда) * ''[[Le Rime]]'' (гьанжесел критиказ бакӀарараб) <gallery mode="packed" heights="200"> Файл:Purgatory (148974358).jpg|''Илагьияб комедиялъул'' пургаториялъул иллюстрация, Густав Дорел хӀалтӀи Файл:Paradiso by Gustave Dore (148199891).jpg|''Илагьияб комедиялъул'' алжаналъул иллюстрация, Густав Дорел хӀалтӀи Файл:Paradiso Canto 31 (148200393).jpg|''Илагьияб комедиялъул'' алжаналъул иллюстрация, Густав Дорел хӀалтӀи </gallery> == Гьунарлъиялда == == Ралагье гьединго == == Баянал == {{reflist|group=note}} == Цитатаби == {{Reflist|30em}} == Референсал == * {{cite book|last=Allitt|first=John Stewart|title=Dante, il Pellegrino|publisher=Villa di Serio (BG)|year=2011|edition=Edizioni Villadiseriane|language=it}} * Teodolinda Barolini (ed.). ''Dante's Lyric Poetry: Poems of Youth and of the 'Vita Nuova'''. University of Toronto Press, 2014. * {{cite book|last=Gardner|first=Edmund Garratt|url=https://archive.org/details/dantedante00gardrich|title=Dante|publisher=Oxford University Press|year=1921|location=London|oclc=690699123|author-link=Edmund Garratt Gardner|access-date=7 March 2016}} * {{cite book|last=Hede|first=Jesper|title=Reading Dante: The Pursuit of Meaning|url=https://archive.org/details/readingdantepurs0000hede|publisher=Lexington Books|year=2007|isbn=978-0-7391-2196-2|location=Lanham}} * {{cite book|last=Miles|first=Thomas|title=Kierkegaard and the Patristic and Medieval Traditions|publisher=Ashgate|year=2008|isbn=978-0-7546-6391-1|editor-last=Stewart|editor-first=Jon|pages=223–236|chapter=Dante: Tours of Hell: Mapping the Landscape of Sin and Despair}} * {{cite book|last=Raffa|first=Guy P.|title=The Complete Danteworlds: A Reader's Guide to the Divine Comedy|publisher=University of Chicago Press|year=2009|isbn=978-0-226-70270-4|location=Chicago}} * {{cite book|last=Raffa|first=Guy P.|title=Dante's Bones: How a Poet Invented Italy|url=https://archive.org/details/dantesboneshowpo0000raff|publisher=[[Belknap Press]]|year=2020|isbn=978-0-674-98083-9|location=Cambridge, Massachusetts}} * {{cite book|last=Scartazzini|first=Giovanni Andrea|title=La Divina Commedia riveduta e commentata (4 volumes)|year=1874–1890|oclc=558999245|author-link=Giovanni Andrea Scartazzini}} * {{cite book|last=Scartazzini|first=Giovanni Andrea|title=Enciclopedia dantesca: dizionario critico e ragionato di quanto concerne la vita e le opere di Dante Alighieri (2 volumes)|year=1896–1898|oclc=12202483}} * {{cite book|last=Scott|first=John A.|title=Dante's Political Purgatory|url=https://archive.org/details/dantespoliticalp0000scot|publisher=University of Pennsylvania Press|year=1996|isbn=978-0-585-12724-8|location=Philadelphia}} * {{cite book|last=Seung|first=T.K.|title=The Fragile Leaves of the Sibyl: Dante's Master Plan|url=https://archive.org/details/fragileleavesofs0000unse|publisher=Newman Press|year=1962|location=Westminster, MD|oclc=1426455|author-link=T. K. Seung}} * {{cite book|last=Toynbee|first=Paget|url=https://archive.org/details/adictionaryprop00toyngoog|title=A Dictionary of the Proper Names and Notable Matters in the Works of Dante|publisher=The Clarendon Press|year=1898|location=London|oclc=343895|access-date=7 март 2016}} * {{cite book|last=Whiting|first=Mary Bradford|url=https://archive.org/details/cu31924011891698|title=Dante the Man and the Poet|publisher=W. Heffer & Sons|year=1922|location=Cambridge|oclc=224789}} * Guénon, René (1925). ''The Esoterism of Dante'', trans. by C.B. Berhill, in the ''Perennial Wisdom Series''. Ghent, NY: Sophia Perennis et Universalis, 1996. viii, 72 p. ''N.B''.: Originally published in French, entitled L'Esoterisme de Danté, in 1925. {{ISBN|0-900588-02-0}} == КъватӀисел регӀелал == {{Sister project links|s=Author:Dante Alighieri|wikt=no|voy=no|b=no|n=no|v=no|d=Q1067}} * {{StandardEbooks|Standard Ebooks URL=https://standardebooks.org/ebooks/dante-alighieri/}} * {{Gutenberg author|id=507}} * {{Internet Archive author|sname=Dante}} * {{Librivox author|id=1189}} * {{Curlie|Arts/Literature/Periods_and_Movements/Medieval/Dante_Alighieri/}} * [https://onemorelibrary.com/index.php/en/search-results/author/dante-alighieri-381?order=loc&ord_t=asc Works by Dante Alighieri]{{Хвараб регӀел|date=May 2026 |bot=InternetArchiveBot |fix-attempted=yes }} at [https://onemorelibrary.com/index.php/en One More Library] {{Webarchive|url=https://web.archive.org/web/20200817164938/https://onemorelibrary.com/index.php/en/ |date=2020-08-17 }} (Works in English, Italian, Latin, Arabic, German, French and Spanish) * {{cite SEP|url-id=dante|title=Dante Alighieri|last=Wetherbee|first=Winthrop}} * The [http://www.museocasadidante.it/en/ Dante Museum in Florence]: his life, his books and a history & literature blog about Dante * The [https://web.archive.org/web/20170830160755/http://www.worldofdante.org/ World of Dante] multimedia, texts, maps, gallery, searchable database, music, teacher resources, timeline * The [http://etcweb.princeton.edu/dante/index.html Princeton Dante Project] {{Webarchive|url=https://web.archive.org/web/20090603094521/http://etcweb.princeton.edu/dante/index.html |date=2009-06-03 }} texts and multimedia * The [http://dante.dartmouth.edu/ Dartmouth Dante Project] searchable database of commentary * [http://www.danteonline.it/english/home_ita.asp Dante Online] manuscripts of works, images and text transcripts by Società Dantesca Italiana * [http://dante.ilt.columbia.edu/ Digital Dante] {{Webarchive|url=https://web.archive.org/web/20040326133000/http://dante.ilt.columbia.edu/ |date=2004-03-26 }} – ''Divine Comedy'' with commentary, other works, scholars on Dante * [http://oyc.yale.edu/italian-language-and-literature/ital-310 Open Yale Course on Dante] by [[Yale University]] * [http://perunaenciclopediadantescadigitale.eu/dantesources/en/ DanteSources] project about Dante's primary sources developed by [[Istituto di Scienza e Tecnologie dell'Informazione|ISTI]]-[[National Research Council (Italy)|CNR]] and the [[University of Pisa]] * [https://web.archive.org/web/20100113213731/http://www.intratext.com/Catalogo/Autori/AUT11.HTM Works] Italian and Latin texts, concordances and frequency lists by [[IntraText]] * [https://research.bowdoin.edu/dante-today/ Dante Today] {{Webarchive|url=https://web.archive.org/web/20180111043549/https://research.bowdoin.edu/dante-today/ |date=2018-01-11 }} citings and sightings of Dante in contemporary culture * [https://web.archive.org/web/20230601164556/https://repository.upenn.edu/bibdant/ Bibliotheca Dantesca] journal dedicated to all tendencies in Dante studies * Edmund Garratt Gardner (1908). "[[wikisource:Catholic Encyclopedia (1913)/Dante Alighieri|Dante Alighieri]]". In ''Catholic Encyclopedia''. '''4'''. New York: Robert Appleton Company. * Arthur John Butler (1911). "[[wikisource:1911 Encyclopædia Britannica/Dante|Dante]]". In Chisholm, Hugh (ed.). ''Encyclopædia Britannica''. '''7.''' (11th ed.). Cambridge University Press. pp.&nbsp;810–817. {{Данте|state=uncollapsed}} {{Divine Comedy navbox}} {{Social and political philosophy}} {{History of Catholic theology}} {{Seven Deadly Sins}} [[Категория:Данте Алигйери| ]] [[Категория:1265 соналъ гьарурал]] [[Категория:1321 соналъ хварал]] [[Категория:XIV гӀасруялъул итал шагӀирзаби]] [[Категория:XIV гӀасруялъул итал хъвадарухъаби]] [[Категория:XIV гӀасруялъул латин хъвадарухъаби]] [[Категория:XIV гӀасруялъул Флоренциялъул Республикаялъдаса гӀадамал]] [[Категория:АптекачагӀи]] [[Категория:Католикиял шагӀирзаби]] [[Категория:Насраниял хъвадарухъаби]] [[Категория:Флоренциялъул маданият]] [[Категория:ДемонологиячагӀи]] [[Категория:Эпосиял шагӀирзаби]] [[Категория:Италиялъул къватӀире гъурал]] [[Категория:Итал мацӀалъул хъвадарухъаби]] [[Категория:Итал хъвадарухъаби бихьинал]] [[Категория:Итал сиясиял философиячагӀи]] [[Категория:Гъоркьохъел гӀасрабазул латин шагӀирзаби]] [[Категория:Флоренциялдаса сиясатчагӀи]] [[Категория:СонетачагӀи]] [[Категория:Флоренциялдаса хъвадарухъаби]] s8p5xnmxtwcr6tvwezdsmqq5wusi0wq Модуль:Infobox/styles.css 828 15038 102343 94551 2026-11-05T07:22:09Z M. Omarius 10562 102343 sanitized-css text/css /* {{pp|small=y}} */ /* * This TemplateStyles sheet deliberately does NOT include the full set of * infobox styles. We are still working to migrate all of the manual * infoboxes. See [[MediaWiki talk:Common.css/to do#Infobox]] * DO NOT ADD THEM HERE */ /* NOTE: This is maintained both here and in [[MediaWiki:Common.css]] until migration is complete. * Starting with bare minimum for the benefit of [[mw:Manual:Safemode]]. */ @media (min-width: 640px) { .infobox { /* @noflip */ margin-left: 1em; /* @noflip */ float: right; /* @noflip */ clear: right; width: 22em; } } /* * not strictly certain these styles are necessary since the modules now * exclusively output infobox-subbox or infobox, not both * just replicating the module faithfully */ .infobox-subbox { padding: 0; border: none; margin: -3px; width: auto; min-width: 100%; font-size: 100%; clear: none; float: none; background-color: transparent; color:inherit; } .infobox-3cols-child { margin: -3px; } .infobox .navbar { font-size: 100%; } /* remove when infobox is not a table anymore */ .infobox-hiddenrow, /* we mean it, Minerva. but also Vector 2022 in the future at some point */ body.skin--responsive.skin--responsive .infobox .infobox-hiddenrow { display: none; } /* Dark theme: [[William Wragg]], [[Coral Castle]] */ @media screen { html.skin-theme-clientpref-night .infobox-full-data:not(.notheme) > div:not(.notheme)[style] { background: #1f1f23 !important; /* switch with var( --color-base ) when supported. */ color: #f8f9fa; } } @media screen and (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .infobox-full-data:not(.notheme) > div:not(.notheme)[style] { background: #1f1f23 !important; /* switch with var( --color-base ) when supported. */ color: #f8f9fa; } } /* Since infobox is a table, many infobox templates take advantage of this to * add columns and rows to the infobox itself rather than as part of a new table * inside them. This class should be discouraged and removed on the long term, * but allows us to at least identify these tables going forward * Currently in use on: [[Module:Infobox3cols]] * Fixes issue described in [[phab:F55300125]] on Vector 2022. */ @media (min-width: 640px) { body.skin--responsive .infobox-table { display: table !important; } body.skin--responsive .infobox-table > caption { display: table-caption !important; } body.skin--responsive .infobox-table > tbody { display: table-row-group; } body.skin--responsive .infobox-table th, body.skin--responsive .infobox-table td { padding-left: inherit; padding-right: inherit; } } bi1nsztkx4350a55cuzjhaotvp5h216 Шумер мацӀ 0 15114 102338 102173 2026-11-04T22:23:28Z InternetArchiveBot 12052 Rescuing 1 sources and tagging 0 as dead. #IABot (v2.0.9.6) 102338 wikitext text/x-wiki {{Infobox language | name = Шумер мацӀ | nativename = {{cuneiform|{{lang|sux|𒅴𒂠}}}}<br/>''Эмегир'' | states = [[Шумер]] ва [[Аккад]] | region = [[Месопотамияб]] (гьанжесеб [[ГӀиракъ]]) | era = ТӀоцебесеб нугӀлъи буго гӀ-ш. н. щ. 3000 соналъ. Унгоги мацӀ тӀагӀана н. щ. 2000–1800 саназ; классикияб мацӀ гӀадин хӀалтӀизабулаан 100 соналде щвезегӀан. | familycolor = Isolate | family = [[Изолатаб мацӀ]] | script = [[ЛъотӀохъвай|Шумергун аккадияб лъотӀохъвай]] | iso2 = sux | iso3 = sux | glotto = sume1241 | glottorefname = Sumerian | map = Sumerian 26th c Adab.jpg | mapcaption = <center>сайгъатазул сияхӀ, [[Адаб (шагьар)|Адаб шагьар]], [[26 сон н. щ.|Н. щ. 26 сон]]</center> | notice = IPA }} '''Шумер мацӀ''' <span class="noexcerpt">({{lang|sux|{{cuneiform|sux|[[:wikt:𒅴𒂠|𒅴𒂠]]}} {{transl|sux|Emegir}}}} "[[экзоним ва эндоним|рахьдал мацӀ]]")</span> — [[Шумер|некӀсияб Шумералъул]] мацӀ. Бищун некӀсияб букӀиналъе нугӀлъи чӀезабураб мацӀ. Эб рикӀкӀуна [[Изолатаб мацӀ|изолатлъун]], жинда кӀалъалел некӀсияб [[Месопотамия|Месопотамиялда]], гьанжесеб [[ГӀиракъ|ГӀиракъалъул]] территориялда рукӀараб. [[Аккад мацӀ|Аккадалъ]] кӀалъазе хӀалтӀизабулеб мацӀ гӀадин, шумер хисана н. щ. 2000 соналда сверухъ (мухӀканаб мехалда тӀасан руго бахӀсал),<ref name=woods/> амма шумер мацӀ хӀалтӀизабулеб букӀана динияб, байрамазулаб, адабияталъулаб ва гӀелмияб мацӀ гӀадин аккад-мацӀаб Месопотамиялда, Ассирия ва Вавилония гӀадинал пачалихъазда, I гӀасруялде щвезегӀанги.<ref name=oates79/><ref name=grayson80/><ref>{{книга|автор=Канева И. Т.|заглавие=Шумерский язык|ссылка=|место=СПб.|издательство=Петербургское Востоковедение|год=2006|страницы=6—7|isbn=5-85803-302-8}}</ref> Гьелдаса хадуб гьеб кӀочана XIX гӀасруялъ-лъагӀан, ассирологистаз гьелда хъварал щагӀил таблицабазда тӀадхъваял цӀализе байбихьизегӀан. МацӀ хъвалаан жалго шумераз ургъараб [[лӀутӀахъвай|лӀотӀохъвавудалъун]]. МацӀалъул [[Изолат мацӀ|генетикиял хурхенал чӀезарун гьечӀо]].<ref name="Языкознание Шумерский язык">''Дьяконов, Игорь Михайлович|Дьяконов И. М.'' {{Статья ЛЭС|[http://tapemark.narod.ru/les/589b.html Шумерский язык]}}</ref> [[Фонетика|фонетикаялъул]] реконструкция гьаби захӀмалъизабулеб буго лъотӀохъвавул графикалъ. Ккола [[Агглютинация (лингвистика)|агглютинативияб]] ва [[Эргативлъи|эргативияб]] мацӀлъун. Вербазул системалда руго гӀемерал [[ЦеберегӀел (лингвистика)|префиксал]], [[Буссинаби (лингвистика)|буссинаби]], амма гьечӀо [[Мех (лингвистика)|мехалъул]] [[Грамматикияб категория|категориял]]. РагӀабазул гӀадатаб тартиб — [[РагӀабазул тартибалъул типология|SOV]] ([[субъект (лингвистика)|субъект]] — [[Объект (лингвистика)|объект]] — [[предикат]]).<ref name="Языкознание Шумерский язык"/> ==МугъчӀваял== ;Баянлъелал {{notelist |refs= {{efn |name="Prince table"|1=Numbers 1-12; table after J.D. Prince,{{sfn|Prince|1914|p=74}} who said: "Delitzsch gives the Sumerian numerals (pp. 60-62) somewhat differently from Langdon (p. 117) and MSL (pp. xvii-xviii), as shown in the following comparative table:"{{sfn|Prince|1908|p=xvii}} <table style="border:1px solid gray; border-collapse:collapse; margin:1em 0 0 3em; cellpadding:2px 0; cellspacing:0" cellpadding=4px> <tr><th>Delitzsch{{sfn|Delitzsch|1914|p=60-62}}</th><th style="border:1px solid gray">Langdon{{sfn|Langdon|1911|p=117}}</th><th style="border:1px solid gray">MSL{{sfn|Prince|1908|p=xvii-xviii}}</th></tr> <tr><td style="border:1px solid gray">as, ge, din, dilli</td><td style="border:1px solid gray">aš</td><td style="border:1px solid gray">diš</td></tr> <tr><td style="border:1px solid gray">mina, min</td><td style="border:1px solid gray">min, man</td><td style="border:1px solid gray">man, min, dab, tab</td></tr> <tr><td style="border:1px solid gray">eš</td><td style="border:1px solid gray">eššu</td><td style="border:1px solid gray">eš, iš</td></tr> <tr><td style="border:1px solid gray">limmu</td><td style="border:1px solid gray">lammu</td><td style="border:1px solid gray">limmu</td></tr> <tr><td style="border:1px solid gray">ia</td><td style="border:1px solid gray">ia</td><td style="border:1px solid gray">ia</td></tr> <tr><td style="border:1px solid gray">aš</td><td style="border:1px solid gray">ašša</td><td style="border:1px solid gray">aš</td></tr> <tr><td style="border:1px solid gray">umun, imin</td><td style="border:1px solid gray">imin</td><td style="border:1px solid gray">iminna</td></tr> <tr><td style="border:1px solid gray">ussu</td><td style="border:1px solid gray">ussu</td><td style="border:1px solid gray">us</td></tr> <tr><td style="border:1px solid gray">ilimmu</td><td style="border:1px solid gray">elimmu</td><td style="border:1px solid gray">ilim</td></tr> <tr><td style="border:1px solid gray">u, ģa; a, ģa</td><td style="border:1px solid gray">u</td><td style="border:1px solid gray">u</td></tr> <tr><td style="border:1px solid gray">neš, niš</td><td style="border:1px solid gray">niš</td><td style="border:1px solid gray">niš</td></tr> <tr><td style="border:1px solid gray">usu</td><td style="border:1px solid gray">usu</td><td style="border:1px solid gray">usu, es, is</td></tr> </table> }} }}<!--end notelist--> ;Цитатаби {{reflist|30em|refs= <!-- <ref name=deutscher2007>{{cite book |title=Syntactic Change in Akkadian: The Evolution of Sentential Complementation |author=Deutscher, Guy |author-link=Guy Deutscher (linguist) |publisher=[[Oxford University Press|Oxford University Press US]] |year=2007 |isbn=978-0-19-953222-3 |pages=20–21 |url=https://books.google.com/books?id=XFwUxmCdG94C}}</ref> --> <ref name=woods>Woods C. 2006 "[http://oi.uchicago.edu/pdf/OIS2.pdf Bilingualism, Scribal Learning, and the Death of Sumerian]". In S. L. Sanders (ed) ''Margins of Writing, Origins of Culture'': 91–120 Chicago ([https://web.archive.org/web/20130429121058/http://oi.uchicago.edu/pdf/OIS2.pdf Archive]).</ref> <ref name=oates79>[[Joan Oates]] (1979). ''Babylon'' [Revised Edition] Thames and Hudston, Ltd. 1986 p. 30, 52–53.</ref> <ref name=grayson80>The A.K. Grayson, ''Penguin Encyclopedia of Ancient Civilizations'', ed. Arthur Cotterell, Penguin Books Ltd. 1980. p. 92</ref> <ref name=michal04>Piotr Michalowski, "Sumerian," ''The Cambridge Encyclopedia of the World's Ancient Languages'' (2004, Cambridge), pg. 22</ref> <ref name=michal06>Michalowski, P., 2006: "[http://oi.uchicago.edu/pdf/OIS2.pdf The Lives of the Sumerian Language] {{Webarchive|url=https://web.archive.org/web/20130429121058/http://oi.uchicago.edu/pdf/OIS2.pdf |date=2013-04-29 }}", in S.L. Sanders (ed.), ''Margins of Writing, Origins of Cultures'', Chicago, 159–184</ref> <ref name=michal08>Michalowski, Piotr (2008): "Sumerian". In: Woodard, Roger D. (ed.) ''The Ancient Languages of Mesopotamia, Egypt and Aksum''. Cambridge University Press. P.16</ref> <ref name=michal08p17>Michalowski, Piotr (2008): "Sumerian". In: Woodard, Roger D. (ed.) ''The Ancient Languages of Mesopotamia, Egypt and Aksum''. Cambridge University Press. P.17</ref> <!-- <ref name=Edzard>{{cite book|last=Edzard|first=Dietz Otto|title=Sumerian Grammar|year=2003|publisher=Koninklijke Brill NV|location=Leiden|isbn=1589832523}}</ref> --> <ref name=etcsl2005>{{cite web |title=Sumerian language |url=http://etcsl.orinst.ox.ac.uk/edition2/language.php |date=2005-03-29 |work=The ETCSL project |publisher=Faculty of Oriental Studies, University of Oxford |access-date=2011-07-30}}</ref> <ref name="Piotr Michalowski 2004, Pages 19-59">Piotr Michalowski, "Sumerian," ''The Cambridge Encyclopedia of the World's Ancient Languages." Ed. Roger D. Woodard (2004, Cambridge University Press). Pages 19–59</ref> }} ==Библиография== {{refbegin}} *{{cite book |last=Attinger |first=Pascal |year=1993 |title=Eléments de linguistique sumérienne: La construction de du<sub>11</sub>/e/di |url=https://archive.org/details/elementsdelingui0000atti |publisher=Vandenhoeck&Ruprecht |location=Göttingen |isbn=3-7278-0869-1}} * <!--{{sfn|Delitzsch|1914|p=}}--> {{cite book |last=Delitzsch |first=Friedrich |title=Grundzüge der sumerischen Grammatik |url=https://books.google.com/books?id=j1ZhAAAAMAAJ |year=1914 |publisher=J. C. Hinrichs |oclc=923551546}} *{{cite book |last=Dewart |first=Leslie |year=1989 |title=Evolution and Consciousness: The Role of Speech in the Origin and Development of Human Nature |url=https://archive.org/details/evolutionconscio0000dewa |publisher=University of Toronto Press |location=Toronto |isbn=0-8020-2690-7}} *{{cite journal |last=Diakonoff |first=I. M. |year=1976 |title=Ancient Writing and Ancient Written Language: Pitfalls and Peculiarities in the Study of Sumerian |url=https://oi.uchicago.edu/sites/oi.uchicago.edu/files/uploads/shared/docs/as20.pdf#page=113 |journal=Assyriological Studies |volume=20 |issue=Sumerological Studies in Honor of Thorkild Jakobsen |pages=99–121 |access-date=2022-02-11 |archive-date=2019-08-03 |archive-url=https://web.archive.org/web/20190803063106/https://oi.uchicago.edu/sites/oi.uchicago.edu/files/uploads/shared/docs/as20.pdf#page=113 |url-status=dead}} *{{cite book |last=Edzard |first=Dietz Otto |year=2003 |title=Sumerian Grammar |url=https://archive.org/details/sumeriangrammar0000edza |publisher=Brill |location=Leiden |isbn=90-04-12608-2}} (grammar treatment for the advanced student) * <!--{{sfn|Halloran pdf|1999|p=}}--> {{cite web |last=Halloran |first=John |title=Sumerian Lexicon |url=https://www.sumerian.org/sumerian.pdf |date=11 August 1999 |website=Sumerian Language Page |access-date=20 February 2021 |ref={{harvid|Halloran pdf|1999}}}} * <!--{{sfn|Halloran|2006|p=}}--> {{cite book |last=Halloran |first=John Alan |title=Sumerian Lexicon: A Dictionary Guide to the Ancient Sumerian Language |url=https://books.google.com/books?id=39hiAAAAMAAJ |year=2006 |publisher=Logogram Pub. |isbn=978-0978-64291-4}} *Hayes, John (1990; 2nd ed. 2000), ''A Manual of Sumerian: Grammar and Texts''. UNDENA, Malibu CA. {{ISBN|0-89003-197-5}}. (primer for the beginning student) *Hayes, John (1997), ''Sumerian''. Languages of the World/Materials #68, LincomEuropa, Munich. {{ISBN|3-929075-39-3}}. (41 pp. précis of the grammar) *Jestin, J. (1951), ''Abrégé de Grammaire Sumérienne'', Geuthner, Paris. {{ISBN|2-7053-1743-0}}. (118pp overview and sketch, in French) * <!--{{sfn|Langdon|1911|p=}} --> {{cite book |last=Langdon |first=Stephen Herbert |title=A Sumerian Grammar and Chrestomathy, with a Vocabulary of the Principal Roots in Sumerian, and List of the Most Important Syllabic and Vowel Transcriptions, by Stephen Langdon ... |url=https://books.google.com/books?id=oVJNAQAACAAJ |year=1911 |publisher=P. Geuthner |oclc=251014503}} *{{Cite journal |doi=10.2307/1359671 |last1=Michalowski |first1=Piotr |year=1980 |title=Sumerian as an Ergative Language |url=https://archive.org/details/sim_journal-of-cuneiform-studies_1980-04_32_2/page/86 |journal=Journal of Cuneiform Studies |volume=32 |issue=2 |pages=86–103 |jstor=1359671 |s2cid=164022054 }} *Michalowski,Piotr, (2004), "Sumerian", ''The Cambridge Encyclopedia of the World's Ancient Languages'' pp 19–59, ed. Roger Woodward. Cambridge: Cambridge University Press, {{ISBN|978-05-2156-256-0}}. * <!--{{sfn|Prince|1908|p=}}--> {{cite book |last=Prince |first=John D. |title=Materials for a Sumerian lexicon with a grammatical introduction |url=https://books.google.com/books?id=Fxk7AQAAMAAJ&pg=PR17 |year=1908 |publisher=Hinrichs |series=Assyriologische Bibliothek, 19 |oclc=474982763}} * <!--{{sfn|Prince|1914|p=74}}--> {{cite journal |last1=Prince |first1=J. Dynely |title=Delitzsch's Sumerian Grammar |journal=American Journal of Semitic Languages and Literatures |doi=10.1086/369755 |volume=31 |number=1 |issn=1062-0516 |publisher=U of Chicago |url=https://books.google.com/books?id=teVNAQAAMAAJ&pg=PA74 |date=October 1914 |pages=67–78 |s2cid=170226826 |doi-access=free }} *Rubio, Gonzalo (2007), "Sumerian Morphology". In ''Morphologies of Asia and Africa'', vol. 2, pp.&nbsp;1327–1379. Edited by Alan S. Kaye. Eisenbrauns, Winona Lake, IN, {{ISBN|1-57506-109-0}}. *{{cite book |last=Thomsen |first=Marie-Louise |year=2001 |orig-year=1984 |title=The Sumerian Language: An Introduction to Its History and Grammatical Structure |publisher=Akademisk Forlag |location=Copenhagen |isbn=87-500-3654-8}} (Well-organized with over 800 translated text excerpts.) *{{cite book |last=Volk |first=Konrad |year=1997 |title=A Sumerian Reader |publisher=Pontificio Istituto Biblico |location=Rome |isbn=88-7653-610-8}} (collection of Sumerian texts, some transcribed, none translated) {{refend}} ==ТӀадеги цӀалиялъе== {{refbegin}} *{{cite book |url=https://archive.org/details/sumerischesglos00deligoog |title=Sumerisches glossar |author=Friedrich Delitzsch |year=1914 |publisher=J. C. Hinrichs |page=[https://archive.org/details/sumerischesglos00deligoog/page/n328 295] |access-date=2011-07-05}} *Ebeling, J., & Cunningham, G. (2007). ''Analysing literary Sumerian : corpus-based approaches''. London: Equinox. {{ISBN|1-84553-229-5}} *Halloran, J. A. (2007). ''Sumerian lexicon: a dictionary guide to the ancient Sumerian language''. Los Angeles, Calif: Logogram. {{ISBN|0-9786429-1-0}} {{refend}} *[[Shin Shifra]], Jacob Klein (1996). ''In Those Far Days''. Tel Aviv, [[Am Oved]] and The Israeli Center for Libraries' project for translating Exemplary Literature to Hebrew. This is an anthology of Sumerian and Akkadian poetry, translated into Hebrew. ==КъватӀисел регӀелал== {{external links|date=January 2017}} *''General'' **[http://users.teilar.gr/~g1951d/ Akkadian Unicode Font] (to see Cuneiform text) [https://web.archive.org/web/20110721083505/http://users.teilar.gr/~g1951d/Akkadian256.zip Archive] *''Linguistic overviews'' **[http://www.eltereader.hu/en/kiadvanyok/english-gabor-zolyomi-an-introduction-to-the-grammar-of-sumerian/ Gábor Zólyomi: An Introduction to the Grammar of Sumerian] [[Open Access]] textbook, Budapest 2017 **[http://cdli.ucla.edu/pubs/cdlp/cdlp0002_20160104.pdf Introduction to Sumerian grammar by Daniel A. Foxvog] at [[Cuneiform Digital Library Initiative|CDLI]] ([https://web.archive.org/web/20130626075002/http://home.comcast.net/~foxvog/Grammar.pdf Archive]) **[http://hdl.handle.net/1887/16107 ''A Descriptive Grammar of Sumerian'' by Abraham Hendrik Jagersma] (preliminary version) **[http://homepages.fh-giessen.de/kausen/wordtexte/Sumerisch.doc Sumerisch (An overview of Sumerian by Ernst Kausen, in German)]<!--Based on Gabor Zolyomi's description AND rather detailed, → sufficiently different from Rubio, Foxvog AND the ETCSL overview to be useful, IMO.--> **[https://web.archive.org/web/20151031113742/http://www.etana.org/sites/default/files/coretexts/14505.pdf Chapter VI of ''Magie chez les Chaldéens et les origines accadiennes''] (1874) by [[François Lenormant]]: the state of the art in the dawn of Sumerology, by the author of the first ever [http://www.orientalstudies.ru/rus/images/pdf/b_kaneva_2006.pdf] grammar of "Akkadian" *''Dictionaries'' **[https://web.archive.org/web/20210605041059/http://psd.museum.upenn.edu/nepsd-frame.html Electronic Pennsylvania Sumerian Dictionary (EPSD)] **[http://cdli.ucla.edu/pubs/cdlp/cdlp0003_20160104.pdf Elementary Sumerian Glossary by Daniel A. Foxvog (after M. Civil 1967)] **[http://sumerian.org/sumerlex.htm Sumerian Lexicon, Version 3.0, by John A. Halloran] **[http://sumer.grazhdani.eu/index.php Sumerian Lexicon – Electronic Search] *''Corpora'' **[http://etcsl.orinst.ox.ac.uk/ The Electronic Text Corpus of Sumerian Literature (ETCSL)]. Includes translations. **[http://www.cdli.ucla.edu/ CDLI: Cuneiform Digital Library Initiative] a large corpus of Sumerian texts in transliteration, largely from the Early Dynastic and Ur III periods, accessible with images. *''Research'' **[https://web.archive.org/web/20090114024621/http://www-etcsl.orient.ox.ac.uk/edition2/etcslpublications.php Online publications arising from the ETCSL project] ([[Portable Document Format|PDF]]) **[http://www.assziriologia.hu/downloads/gz_structural_interference.pdf Structural Interference from Akkadian in Old Babylonian Sumerian by Gábor Zólyomi] {{Webarchive|url=https://web.archive.org/web/20210228041703/http://www.assziriologia.hu/downloads/gz_structural_interference.pdf |date=2021-02-28 }} ([[Portable Document Format|PDF]]) **[https://web.archive.org/web/20080803183452/http://www.assziriologia.hu/site/publikaciok_zg.jsp Other online publications by Gábor Zólyomi] ([[Portable Document Format|PDF]]) **[http://www-personal.umich.edu/~piotrm/DIGLOS~1.htm The Life and Death of the Sumerian Language in Comparative Perspective] by Piotr Michalowski **[https://web.archive.org/web/20090520135916/http://static.cdli.ucla.edu/staff/johnson/johnson.html Online publications by Cale Johnson] ([[Portable Document Format|PDF]]) **Eléments de linguistique sumérienne (by Pascal Attinger, 1993; in French), at the digital library [http://doc.rero.ch/ RERO DOC]: [http://doc.rero.ch/record/8833/files/Attinger_Pascal_-_El_ments_de_linguistique_sum_rienne_1993_1.pdf Parts 1–4], [http://doc.rero.ch/record/8833/files/Attinger_Pascal_-_El_ments_de_linguistique_sum_rienne_1993_2.pdf Part 5]. **[https://web.archive.org/web/20070111192046/http://website.leidenuniv.nl/~deutscherg/NotUnfolding/Orientalia-Sumerian.doc The Origin of Ergativity in Sumerian, and the Inversion in Pronominal Agreement: A Historical Explanation Based on Neo-Aramaic parallels, by E. Coghill & G. Deutscher, 2002] at the [[Internet Archive]] {{Wikibooks|en:Sumerian|Sumerian language}} {{sister project |project=wiktionary |text=[[Wiktionary]] has a word list at '''''[[Wiktionary:Appendix:Sumerian basic vocabulary|Appendix:Sumerian basic vocabulary]]'''''}} {{language families}} {{Ancient Mesopotamia}} {{Eurasian languages}} {{Authority control}} {{DEFAULTSORT:Сумер мацӀ}} [[Категория:Сумер мацӀ| ]] [[Категория:Агглютинативияб мацӀ]] [[Категория:ЛъутӀаб хъвай]] [[Категория:Сумер]] [[Категория:Субъект–объект–верб мацӀал]] [[Категория:Азиялъул изолят мацӀал]] aittijjvjsjghms3k6vr6zhqmxdj3wn Халип:Wikidata1 10 17504 102349 83291 2026-11-05T08:16:12Z M. Omarius 10562 102349 wikitext text/x-wiki <includeonly>{{safesubst:#invoke:Wd|main}}</includeonly><noinclude> {{Documentation}} </noinclude> aqnmh4azo4jle51xny4knl3b1hl9873 Халип:Hlist/styles.css 10 19494 102344 89913 2026-11-05T07:23:31Z M. Omarius 10562 102344 sanitized-css text/css /* {{pp-template}} */ /* * hlist styles are defined in core and Minerva and differ in Minerva. The * current definitions here (2023-01-01) are sufficient to override Minerva * without use of the hlist-separated class. The most problematic styles were * related to margin, padding, and the bullet. Check files listed at * [[MediaWiki talk:Common.css/to do#hlist-separated]] */ /* * TODO: When the majority of readership supports it (or some beautiful world * in which grade C support is above the minimum threshold), use :is() */ .hlist dl, .hlist ol, .hlist ul { margin: 0; padding: 0; } /* Display list items inline */ .hlist dd, .hlist dt, .hlist li { /* * don't trust the note that says margin doesn't work with inline * removing margin: 0 makes dds have margins again * We also want to reset margin-right in Minerva */ margin: 0; display: inline; } /* Display requested top-level lists inline */ .hlist.inline, .hlist.inline dl, .hlist.inline ol, .hlist.inline ul, /* Display nested lists inline */ .hlist dl dl, .hlist dl ol, .hlist dl ul, .hlist ol dl, .hlist ol ol, .hlist ol ul, .hlist ul dl, .hlist ul ol, .hlist ul ul { display: inline; } /* Hide empty list items */ .hlist .mw-empty-li { display: none; } /* TODO: :not() can maybe be used here to remove the later rule. naive test * seems to work. more testing needed. like so: *.hlist dt:not(:last-child)::after { * content: ": "; *} *.hlist dd:not(:last-child)::after, *.hlist li:not(:last-child)::after { * content: " · "; * font-weight: bold; *} */ /* Generate interpuncts */ .hlist dt::after { content: ": "; } .hlist dd::after, .hlist li::after { content: "\a0· "; font-weight: bold; } .hlist dd:last-child::after, .hlist dt:last-child::after, .hlist li:last-child::after { content: none; } /* Add parentheses around nested lists */ .hlist dd dd:first-child::before, .hlist dd dt:first-child::before, .hlist dd li:first-child::before, .hlist dt dd:first-child::before, .hlist dt dt:first-child::before, .hlist dt li:first-child::before, .hlist li dd:first-child::before, .hlist li dt:first-child::before, .hlist li li:first-child::before { content: " ("; font-weight: normal; } .hlist dd dd:last-child::after, .hlist dd dt:last-child::after, .hlist dd li:last-child::after, .hlist dt dd:last-child::after, .hlist dt dt:last-child::after, .hlist dt li:last-child::after, .hlist li dd:last-child::after, .hlist li dt:last-child::after, .hlist li li:last-child::after { content: ")"; font-weight: normal; } /* Put ordinals in front of ordered list items */ .hlist ol { counter-reset: listitem; } .hlist ol > li { counter-increment: listitem; } .hlist ol > li::before { content: " " counter(listitem) "\a0"; } .hlist dd ol > li:first-child::before, .hlist dt ol > li:first-child::before, .hlist li ol > li:first-child::before { content: " (" counter(listitem) "\a0"; } c4a9gdxc068l0us4sz11634bne7iv2z Генал 0 20237 102339 98914 2026-11-05T06:35:51Z M. Omarius 10562 Перенаправление на [[Генуб#Демография]] 102339 wikitext text/x-wiki #REDIRECT [[Генуб#Демография|Генуб]] r586g5lyhygr5o9rg2axg4li1pm33z9 Халип:Infobox Russian inhabited locality 10 20462 102345 96784 2026-11-05T08:03:55Z M. Omarius 10562 102345 wikitext text/x-wiki <includeonly>{{#invoke:Template wrapper|wrap|_template = Infobox settlement | _alias-map = area_km2_ref:area_footnotes, area_km2:area_total_km2, embedded:module | _exclude = en_name, ru_name, other_lang, inhabloc_type, inhabloc_type_ref, inhabloc_cat, inhabloc_cat_ref, abolished_date, abolished_date_ref, loc_name1, loc_lang1, loc_lang2, loc_name2, loc_lang3, loc_name3, loc_lang4, loc_name4, other_name, flag_caption, image_coa, coa_caption, anthem_ref, map_label_position, federal_subject, federal_subject_ref, adm_district_jur, adm_district_jur_ref, adm_selsoviet_type, adm_selsoviet_jur, adm_selsoviet_jur_ref, established_title, established_date, established_date_ref, current_cat_date, current_cat_date_ref, representative_body, representative_body_ref, leader_title_ref, leader_name_ref, pop_2021census, pop_2021census_ref, pop_2010census, pop_2010census_ref, pop_latest_date, pop_latest_ref, pop_latest, pop_2021census_rank, pop_2010census_rank, pop_density, adm_city_jur, capital_of, adm_ctr_of, adm_ctr_of1, adm_inhabloc_jur, adm_city_jur_ref, adm_inhabloc_jur_ref, capital_of_ref, adm_ctr_of2, adm_ctr_of1_ref, adm_ctr_of2_ref, adm_ctr_of_ref, mun_district_jur, urban_okrug_jur, urban_settlement_jur, mun_admctr_of, mun_admctr_of1, mun_district_jur_ref, urban_okrug_jur_ref, urban_settlement_jur_ref, rural_settlement_jur, rural_settlement_jur_ref, mun_admctr_of_ref, mun_admctr_of2, mun_admctr_of1_ref, mun_admctr_of2_ref, postal_codes, postal_codes_ref, dialing_codes, dialing_codes_ref, holiday, holiday_ref, twin_towns | _reuse = name, native_name, native_name_lang, other_name, type, translit_lang1, Other, translit_lang1_type, translit_lang1_info, translit_lang1_type1, translit_lang1_info1, translit_lang1_type2, translit_lang1_info2, translit_lang1_type3, translit_lang1_info3, translit_lang1_type4, translit_lang1_info4, image_flag, flag_alt, image_shield, shield_alt, anthem, pushpin_map, pushpin_label_position, pushpin_map_caption, coordinates, subdivision_type, subdivision_name, subdivision_type1, subdivision_name1, subdivision_type2, subdivision_name2, subdivision_type3, subdivision_name3, established_title, established_date, established_title1, established_date1, governing_body, leader_title, leader_name, population_as_of, population_footnotes, population_total, pop_est_as_of, pop_est_footnotes, population_est, population_rank, population_density_km2, population_demonym, demographics_type1, demographics1_title1, demographics1_info1, demographics1_title2, demographics1_info2, demographics1_title3, demographics1_info3, demographics_type2, demographics2_footnotes, demographics2_title1, demographics2_info1, demographics2_title2, demographics2_info2, demographics2_title3, demographics2_info3, demographics2_title4, demographics2_info4, timezeon1, utc_offset1, postal_code_type, postal_code, area_code_type, area_code, code1_name, code1_info, blank_name_sec1, blank_info_sec1, blank1_name_sec1, blank1_info_sec1, website, mapframe, mapframe-area_km2, image_map1 | template_name = Infobox Russian inhabited locality | name = {{if empty|{{{en_name|}}}|{{PAGENAMEBASE}}}} | native_name = {{{ru_name|}}} | native_name_lang = ru <!--Russian language--> | other_name = {{#if:<!--A-->{{{other_name|}}}|<!--thenA:--><span class="nickname">{{{other_name}}}</span><!-- ---->{{#if:<!--B-->{{{other_lang|}}} |<!--thenB:--><span style="font-size:0.95em; font-weight:bold; color:#555; position:relative;">&nbsp;({{{other_lang}}})</span><!-- -----endB:-->}}<!-- ---endA:-->}} | type = {{#if:{{{inhabloc_type|}}} | {{{inhabloc_type}}}{{{inhabloc_type_ref|}}} | {{#if: {{{inhabloc_cat|}}} | [[Types of inhabited localities in Russia|{{{inhabloc_cat}}}]]{{{inhabloc_cat_ref|}}} }} }}{{#if: {{{abolished_date|}}} | <br />(abolished) }} | translit_lang1 = {{#if: {{{loc_name1|}}} | Other }} | translit_lang1_type = {{{loc_lang1|}}} | translit_lang1_info = {{{loc_name1|}}} | translit_lang1_type1 = {{{loc_lang2|}}} | translit_lang1_info1 = {{{loc_name2|}}} | translit_lang1_type2 = {{{loc_lang3|}}} | translit_lang1_info2 = {{{loc_name3|}}} | translit_lang1_type3 = {{{loc_lang4|}}} | translit_lang1_info3 = {{{loc_name4|}}} | translit_lang1_type4 = {{{other_lang|}}} | translit_lang1_info4 = {{{other_name|}}} | image_flag = {{if empty|{{{image_flag|}}} | {{wikidata|property|raw|P41}} }} | flag_alt = {{{flag_caption|}}} | image_shield = {{if empty|{{{image_coa|}}} | {{wikidata|property|raw|P94}} }} | shield_alt = {{{coa_caption|}}} | anthem = {{{anthem|}}}{{{anthem_ref|}}} <!-- maps and coordinates --> | mapframe = yes | pushpin_map = {{#if: {{{pushpin_map|}}} | {{{pushpin_map}}} | {{#if: {{{coordinates|}}} OR {{wikidata|property|P625}} | {{#if:{{{federal_subject|}}}|Russia#{{Infobox Russian inhabited locality/PosMapFS|{{{federal_subject|}}}|PosMapParam}}|Russia }} }} }} | pushpin_label_position = {{{map_label_position|}}} | pushpin_caption = {{{pushpin_map_caption|Location of {{if empty|{{{en_name|}}}|{{PAGENAMEBASE}}}}}}} | coordinates = {{#if: {{{coordinates|}}} | {{{coordinates}}} | {{#if: {{wikidata|property|P625}} | {{Coords|format=dms|display=inline,title}} }} }} | subdivision_type = Country | subdivision_name = Russia | subdivision_type1 = [[Federal subjects of Russia|Federal subject]] | subdivision_name1 = {{Infobox Russian inhabited locality/federal subject|{{{federal_subject|}}}}}{{{federal_subject_ref|}}} | subdivision_type2 = [[Districts of Russia|Administrative district]] | subdivision_name2 = {{{adm_district_jur|}}}{{{adm_district_jur_ref|}}} | subdivision_type3 = {{ifempty|{{{adm_selsoviet_type|}}}[[Selsoviet]]}} | subdivision_name3 = {{{adm_selsoviet_jur|}}}{{{adm_selsoviet_jur_ref|}}} | established_title = {{if empty|{{{established_title|}}} | Founded }} | established_date = {{#if: {{{established_date|}}} | {{{established_date}}}{{{established_date_ref|}}} | {{wikidata|property|edit@end|P571}}{{wikidata|reference|P571}} }} | established_title1 = {{if empty|{{{inhabloc_cat|}}}|Current}} status since | established_date1 = {{{current_cat_date|}}}{{{current_cat_date_ref|}}} | extinct_title = {{#if: {{{abolished_date|}}} | Abolished}} | extinct_date = {{{abolished_date|}}}{{{abolished_date_ref|}}} | governing_body = {{{representative_body|}}}{{{representative_body_ref|}}} | leader_title = {{#if:{{{leader_title|}}} | {{{leader_title}}}{{{leader_title_ref|}}} | Leader }} | leader_name = {{{leader_name|}}}{{{leader_name_ref|}}} | elevation_footnotes = {{if empty | {{{elevation_footnotes|}}} | {{wikidata|reference|P2044}} }} | elevation_m = {{if empty | {{{elevation_m|}}} | {{wikidata|property|raw|P2044}} }} <!-- population --> | population_as_of = {{#if: {{{pop_2021census|}}} | [[Russian Census (2021)|2021&nbsp;Census]] | {{#if: {{{pop_2010census|}}} | [[Russian Census (2010)|2010&nbsp;Census]] }}}} | population_footnotes = {{#if: {{{pop_2021census|}}} | {{#if: {{{pop_2021census_ref|}}} | {{{pop_2021census_ref}}} |<ref name="2021Census">{{ru-pop-ref|2021Census}}</ref> }} | {{#if: {{{pop_2010census|}}} | {{#if: {{{pop_2010census_ref|}}} | {{{pop_2010census_ref}}} |<ref name="2010Census">{{ru-pop-ref|2010Census}}</ref> }} }} }} | population_total = {{{pop_2021census|{{{pop_2010census|}}}}}} | pop_est_as_of = {{#if: <!-- wikidata pop as of 01.01.25 is set --> {{wikidata|property|raw|P1082|P585=2025-01-01}} | 2025 | <!-- use template parameter --> {{#invoke:WikidataIB|getValue|P1082|{{{pop_latest_date|}}}|qual=P585|rank=best|fwd=ALL|qualsonly=true|noicon=true|list=p-1}} }} | pop_est_footnotes = {{#if: <!-- wikidata pop as of 01.01.25 is set --> {{wikidata|property|raw|P1082|P585=2025-01-01}} | {{#if:{{wikidata|reference|P1082|P585=2025-01-01}}|{{wikidata|reference|P1082|P585=2025-01-01}}}} | <!-- use template parameter --> {{{pop_latest_ref|}}} }} | population_est = {{#if: {{#invoke:WikidataIB|getValue|P1082|{{{pop_latest|}}}|ps=3|list=p-1}} | {{#invoke:WikidataIB|getValue|P1082|{{{pop_latest|}}}|ps=3|list=p-1}} <!-- begin pct change -->{{#switch:{{{pop_2021census|{{{pop_2010census|}}}}}}|0|=|#default=({{#ifexpr: {{formatnum:{{{pop_2021census|{{{pop_2010census|}}}}}}|R}} < {{formatnum:{{#invoke:WikidataIB|getValue|P1082|{{{pop_latest|}}}|ps=3|list=p-1}}|R}}|{{#tag:span|+{{#expr: ( ( {{formatnum:{{#invoke:WikidataIB|getValue|P1082|{{{pop_latest|}}}|ps=3|list=p-1}}|R}} / {{formatnum:{{{pop_2021census|{{{pop_2010census|}}}}}}|R}} -1 ) round 3 ) *100 }}%|style="color:green;"}}|{{#tag:span|{{#expr: ( ( {{formatnum:{{#invoke:WikidataIB|getValue|P1082|{{{pop_latest|}}}|ps=3|list=p-1}}|R}} / {{formatnum:{{{pop_2021census|{{{pop_2010census|}}}}}}|R}} -1 ) round 3 ) *100 }}%|style="color:red;"}} }} }})<!-- end pct change --> | <!-- use template parameter --> {{{pop_latest|}}} }} | population_rank = {{#if: {{{pop_2021census_rank|{{{pop_2010census_rank|}}}}}} | [[List of cities and towns in Russia by population|{{{pop_2021census_rank|{{{pop_2010census_rank|}}}}}}]] {{#if: {{{pop_2021census_rank|}}} | in 2021| {{#if: {{{pop_2010census_rank|}}} | in 2010}}}}}} | population_density_km2 = {{If empty | {{{pop_density|}}} | auto }} | population_demonym = {{if empty | {{{population_demonym|}}} | {{wikidata|property|edit@end|P1549}} }} <!-- demographics (section 1) --> | demographics_type1 = {{#ifexpr: {{#if: {{{adm_city_jur|}}} | 1 | 0 }} + {{#if: {{{capital_of|}}} | 1 | 0 }} + {{#if: {{{adm_ctr_of|}}} | 1 | 0 }} + {{#if: {{{adm_ctr_of1|}}} | 1 | 0 }} > 0 | <div style="text-align: center;">[[Subdivisions_of_Russia#Administrative_divisions|Administrative status]]</div> }} | demographics1_title1 = <span style="font-weight:normal;">Subordinated to</span> | demographics1_info1 = {{if empty|{{{adm_city_jur|}}}|{{{adm_inhabloc_jur|}}}}}{{if empty|{{{adm_city_jur_ref|}}}|{{{adm_inhabloc_jur_ref|}}}}} | demographics1_title2 = <span style="font-weight:normal;">Capital of</span> | demographics1_info2 = {{{capital_of|}}}{{{capital_of_ref|}}} | demographics1_title3 = <span style="font-weight:normal;">[[Administrative centre|Capital]] of</span> | demographics1_info3 = {{{adm_ctr_of1|}}}{{#if: {{{adm_ctr_of2|}}}|,}}{{{adm_ctr_of1_ref|}}}<!-- -->{{#if: {{{adm_ctr_of2|}}} |&#32;{{{adm_ctr_of2|}}}{{{adm_ctr_of2_ref|}}} }}<!-- -->{{{adm_ctr_of|}}}{{{adm_ctr_of_ref|}}} | demographics_type2 = {{#ifexpr: {{#if: {{{mun_district_jur|}}} | 1 | 0 }} + {{#if: {{{urban_okrug_jur|}}} | 1 | 0 }} + {{#if: {{{urban_settlement_jur|}}} | 1 | 0 }} + {{#if: {{{mun_admctr_of|}}} | 1 | 0 }} + {{#if: {{{mun_admctr_of1|}}} | 1 | 0 }} > 0 | <div style="text-align: center;">[[Subdivisions_of_Russia#Municipal_divisions|Municipal status]]</div> }} | demographics2_footnotes = <!-- for references: use <ref> tags --> | demographics2_title1 = {{#if: {{{mun_district_jur|}}} | <span style="font-weight:normal;">[[Districts of Russia|Municipal district]]</span> }}<!-- -->{{#if: {{{urban_okrug_jur|}}} | <span style="font-weight:normal;">Urban okrug</span> }} | demographics2_info1 = {{#if: {{{mun_district_jur|}}} | {{{mun_district_jur}}}{{{mun_district_jur_ref|}}} | {{#if: {{{urban_okrug_jur|}}} | {{{urban_okrug_jur}}}{{{urban_okrug_jur_ref|}}} }} }} | demographics2_title2 = <span style="font-weight:normal;">Urban settlement</span> | demographics2_info2 = {{{urban_settlement_jur|}}}{{{urban_settlement_jur_ref|}}} | demographics2_title3 = <span style="font-weight:normal;">Rural settlement</span> | demographics2_info3 = {{{rural_settlement_jur|}}}{{{rural_settlement_jur_ref|}}} | demographics2_title4 = <span style="font-weight:normal;">[[Administrative centre|Capital]] of</span> | demographics2_info4 = {{{mun_admctr_of|}}}{{{mun_admctr_of_ref|}}}<!-- -->{{{mun_admctr_of1|}}}{{#if: {{{mun_admctr_of2|}}} |,}}{{{mun_admctr_of1_ref|}}}<!-- -->{{#if: {{{mun_admctr_of2|}}} |&#32;{{{mun_admctr_of2|}}}{{{mun_admctr_of2_ref|}}} }} | time_zone1 = {{Russia Time Zone Wikidata|timezone}} | utc_offset1 = {{Russia Time Zone Wikidata|utc_offset}} | postal_code_type = [[Postal codes in Russia|Postal code{{pluralize from text|{{#if: {{{postal_codes|}}} | {{{postal_codes|}}} | {{wikidata|properties|edit@end|P281}} }}|plural=s|any_comma=1}}]]{{#if: {{{postal_codes|}}}{{wikidata|properties|P281}} | {{#if: {{{postal_codes_ref|}}} | {{{postal_codes_ref}}} |<ref name="PostalCode">Почта России. Информационно-вычислительный центр ОАСУ РПО. (''Russian Post''). [http://vinfo.russianpost.ru/servlet/department Поиск объектов почтовой связи] (''Postal Objects Search'') {{in lang|ru}}</ref>}} }} | postal_code = {{If empty | {{{postal_codes|}}} | {{wikidata|properties|edit@end|P281}} }} | area_code_type = [[Telephone numbers in Russia|Dialing code]]{{pluralize from text|{{{dialing_codes|}}}|plural=s|any_comma=1}} | area_code = {{#if: {{{dialing_codes|}}} |+7&nbsp;{{{dialing_codes}}} }}{{{dialing_codes_ref|}}} | code1_name = [[OKTMO]] ID | code1_info = {{wikidata|property|P764}} <!-- custom fields (section 1) --> | custom_label_sec1 = {{#if: {{{inhabloc_cat|}}} | {{{inhabloc_cat}}}&nbsp;Day | Holiday}} | custom_data_sec1 = {{{holiday|}}}{{{holiday_ref|}}} | custom_label2_sec1 = [[List of twin towns and sister cities in Russia|Twin towns]] | custom_data2_sec1 = {{{twin_towns|}}} | website = {{#if: {{{website|}}} | {{URL|{{{website}}} }} }} }}{{#invoke:Check for conflicting parameters|check | template = [[Template:Infobox Russian inhabited locality]] | cat = {{main other|Category:Pages using infobox Russian inhabited locality with conflicting parameters}} | area_km2_ref; area_footnotes | area_km2; area_total_km2 | embedded; module | adm_city_jur; adm_inhabloc_jur | adm_city_jur_ref; adm_inhabloc_jur_ref | pushpin_label_position; map_label_position }}{{main other|<!-- Invoke maintenance category for missing parameters -->{{#if:{{{en_name|}}}||[[Category:Russian inhabited locality articles requiring maintenance]]}}<!-- -->{{#if:{{{ru_name|}}}||[[Category:Russian inhabited locality articles requiring maintenance]]}}<!-- -->{{#if:{{{federal_subject|}}}||[[Category:Russian inhabited locality articles requiring maintenance]]}}<!--end main other-->}}</includeonly><noinclude> {{Documentation}} </noinclude> lekbvdrzwtbf6n0ggg7t362fx6n8zus Гъодобериса Идрис 0 22291 102335 102095 2026-11-04T16:06:14Z Mahamadi Baza 15906 /* ГӀагарлъи */ 102335 wikitext text/x-wiki {{Пачалихъияв хъулухъчи|хъулухъ=[[ГӀанди сверухълъи#Административияб рикьи|Гумбеталда]] [[наиб]]|цевесев=Даниял Апашев|хадусев=ХӀажиясул ХӀадис|период_авал=[[19 Феврал|19 феврал]] [[1898]]|период_ахир=[[март]] [[1904]]|цӀаралъул_оригинал=[[Гъодоберисеб мацӀ|гъодоб]]. ''Гъидусу Идриси''|хвараб_къо-моцӀ=[[март]] [[1904]]|гьавураб_бакӀ=[[Гъодобери]], [[Болъихъ мухъ|ТӀехӀнуцаллъи]], [[Шималияб Кавказалъул имамат]]|гьавураб_къо-моцӀ=1849|хвараб_бакӀ=[[Дагъистаналъул вилаят|Дагъистаналъул област]], [[Россиялъул империя]]|миллат=[[Гъодоберисел|гъодоберисев]] [[Аварал|аварав]]|лъимал=[[МухӀаммадилазул Идрисил АхӀмаднаби|АхӀмаднаби]], МухӀама, Жабар, Батули, Бахумеседу|эмен=МухӀама|лъади=Каримат|эбел=?|дин=[[Ислам|ислам]]|шапакъатал=[[Файл:RUS Imperial Order of Saint Stanislaus ribbon.svg|40px]]}} '''Гъодобериса Идрис<ref name=":3">{{Cite web|url=https://www.gazavat.ru/history3.php?rub=17&art=172|title=ПИСАТЕЛИ ДАГЕСТАНСКОГО ЗАРУБЕЖЬЯ|lang=ru|author=А. Муртазалиев|website=gazavat.ru|archive-url=https://web.archive.org/web/20241114030555/http://www.gazavat.ru/history3.php?art=172&rub=17|archive-date=2024-11-14|access-date=|url-status=live}}</ref>''', гьединго '''Идрис МухӀамаев<ref name=":4">{{Книга|автор=Козубский Е. И.|заглавие=Дагестанский сборник. Выпуск 1|год=1902|язык=ru|место=Темир-Хан-Шура|страницы=418|всего страниц=689}}</ref>'''<ref name=":0">{{Статья|ссылка=https://toonsitli.ucoz.ru/file/po_sledam_predkov.pdf|автор=Ш. Исаев|заглавие=По следам предков (ахвахцы)|год=2005|издание=toonsitli.ucoz.ru}}</ref> яги '''Идрис-наиб<ref name=":2">{{Cite web|url=https://index.kodifikant.ru/ru/05007000011000300|title=Почтовый индекс улица Идриса Наиба, с. Годобери, Ботлихский р-н, республика Дагестан|website=index.kodifikant.ru|access-date=2025-07-27}}</ref>''' ([[1849 сон|1849]], [[Гъодобери (Болъихъ мухъ)|Гъодобери]], [[Болъихъ мухъ|ТӀехӀнуцаллъи]], [[Шималияб Кавказалъул имамат]] — [[март]] [[1904]], [[Дагъистаналъул вилаят|Дагъистаналъул област]], [[Россиялъул империя]]) — XIX гӀасруялда [[Дагъистан|Дагъистаналда]] рагъулав ва административияб хӀаракатчи, [[Россиялъул империя|Россиялъул]] административияб системаялда вукӀарав наиб<ref name=":02">{{Статья|ссылка=https://toonsitli.ucoz.ru/file/po_sledam_predkov.pdf|автор=Ш. Исаев|заглавие=По следам предков (ахвахцы)|год=2005|издание=toonsitli.ucoz.ru}}</ref>, ракьул бетӀергьан. == Биография == Идрис гьавуна 1849 соналъ [[Гъодобери (Болъихъ мухъ)|Гъодобери]] росулӀ. Гьесул эмен вукӀун вуго МухӀама абурав чи<ref name=":5">Дагъистан Республикаялъул централияб пачалихъияб архив. ТӀехӀнуцал наиблъиялъул Гъодобери росдал хъизамазул сияхӀ (1886)</ref>. Цо биценалда рекъон, Идрисил эбел [[Къеди]] [[Нуцалзабазул рукъ|нуцабазул]] чиясул къоролайлъун йикӀун йиго ва жиндирго гьитӀинав вас АмирхӀамзагун цадахъ Гъодоберие гочун йиго ва гьений МухӀамае росасе ана<ref name=":1">{{Книга|автор=Газимагомедов И.|заглавие=Кеди и кединцы: История села Кеди|год=2022|язык=av|место=Махачкала|страницы=141|всего страниц=735}}</ref>.   Дагъистан [[Россиялъул империя|Россиялъул империялде]] гъорлӀе ун хадуб гьес пачалихъияб хъулухъ гьабулаан. Дагъистан областалъул [[ГӀанди сверухълъи|ГӀанди]] ва [[Авар сверухълъи|Авар округазда]] наибасул хъулухъал тӀуразарулаан<ref name=":42">{{Книга|автор=Козубский Е. И.|заглавие=Дагестанский сборник. Выпуск 1|год=1902|язык=ru|место=Темир-Хан-Шура|страницы=418|всего страниц=689}}</ref>. Гьел хъулухъазда гьесие щвана халкъалъ адаб гьабулев гӀакъилав ва ритӀухъав нухмалъулев хӀисабалда цӀар. [[Кавказалъул рагъ|Кавказалъул рагъул]] чӀунтиялдаса хадуб мугӀрузул жамгӀият щулалъиялъе кӀудияб квербакъи гьабуна Гъодобериса Идрисица. [[Файл:Официальная_часть._Высочайший_приказ_по_военному_ведомству.jpg|ссылка=https://ru.wikipedia.org/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:%D0%9E%D1%84%D0%B8%D1%86%D0%B8%D0%B0%D0%BB%D1%8C%D0%BD%D0%B0%D1%8F_%D1%87%D0%B0%D1%81%D1%82%D1%8C._%D0%92%D1%8B%D1%81%D0%BE%D1%87%D0%B0%D0%B9%D1%88%D0%B8%D0%B9_%D0%BF%D1%80%D0%B8%D0%BA%D0%B0%D0%B7_%D0%BF%D0%BE_%D0%B2%D0%BE%D0%B5%D0%BD%D0%BD%D0%BE%D0%BC%D1%83_%D0%B2%D0%B5%D0%B4%D0%BE%D0%BC%D1%81%D1%82%D0%B2%D1%83.jpg|мини|298x298пкс|19 февралалъул 1898 соналъул Идрис МухӀамаев Гумбеталда наиблъун тӀамиялъул буюрухъ]] 1877 соналъ [[ЧачаналӀ|Чачаналда]] ва [[Дагъистан|Дагъистаналда]] багъарараб восстаниялъул заманалда гьес Россиялъул администрациялъул рахъги ккун, гьел восстаниял гӀадада ва халкъалъе хӀинкъи бугеллъун рикӀкӀун, гьел чӀезариялъулъ гӀахьаллъи гьабуна. [[МигӀарсо|МигӀасдерил]] лъарахъ ккараб рагъулӀ лъукъана гьев, квегӀаб хӀатӀил кӀудияб килищги батӀалъун<ref name=":03">{{Статья|ссылка=https://toonsitli.ucoz.ru/file/po_sledam_predkov.pdf|автор=Ш. Исаев|заглавие=По следам предков (ахвахцы)|год=2005|издание=toonsitli.ucoz.ru}}</ref>.   Идрис вукӀана ракьул бетӀергьан. Гьесул букӀана [[Беледи]] абулеб колода магӀишат, гьениб гьес гӀи-боцӀи хьихьулаан. Живго жиндаго чӀун магӀишаталъе нухмалъи гьабизе захӀмат букӀиналъ, гьес кулиги аскӀор ругел ракьалги [[АнсалтӀа|ансазе]] ижараялъ кьолаан. Ругел баяназда рекъон, гьесул магӀишаталда букӀана гӀага-шагарго 2000 чахъу, 2 чу, 8 оц, 15 гӀака<ref>{{Книга|автор=Османов М-З. О., Гарданов В. К.|заглавие=Формы традиционного скотоводства народов Дагестана в XIX - начале XX в|год=1990|язык=ru|страницы=87|всего страниц=294}}</ref>.   Хвана Идрис наиб [[1904|1904 соналъул]] [[Март|марталда]]. == ГӀагарлъи == Идрисица ячана [[Имам Шамил|Шамил имамасул]] хазиначи КӀкӀаратӀаса ХӀажиясул яс Каримат. Гьесул щуго лъимадул цӀарал ва цо-цо баянал лъала: * [[МухӀаммадилазул Идрисил АхӀмаднаби|'''АхӀмаднаби''']] хъулухъ гьабулев вукӀана МугӀрузул республикаялъул ГӀанди округалъул рагъулав комиссарлъун. Эмиграция гьабун хадув гьев вищана Германиялда бугеб Шималияб Кавказалъул миллияб комитеталъул председателлъун. Гьес чехай ячана, гьезул йикӀун йиго кӀиго яс<ref name=":32">{{Cite web|url=https://www.gazavat.ru/history3.php?rub=17&art=172|title=ПИСАТЕЛИ ДАГЕСТАНСКОГО ЗАРУБЕЖЬЯ|lang=ru|author=А. Муртазалиев|website=gazavat.ru|archive-url=https://web.archive.org/web/20241114030555/http://www.gazavat.ru/history3.php?art=172&rub=17|archive-date=2024-11-14|access-date=|url-status=live}}</ref>. * '''ЖахӀбар''', кӀудияв (яги кӀудиязул цояв) вас, гьавуна 1882 соналъ<ref name=":5" />.   * '''МухӀама''', гьавуна 1885 соналъ<ref name=":5" />. * '''Мухӏамадибир''' * '''Батули''' росасе кьун йиго [[КӀкӀаратӀа]] росулӀе. Лъалеб буго гьелъул вукӀанин вас Идрис, советияб заманалда «ватӀаналъул хиянатчи» вугин абун гӀайибги гӀунтӀизабун репрессиял гьавурав, амма хадуб реабилитация гьабурав<ref>{{Cite web|url=https://chernovik.net/content/hronograf/vozvrashchyonnoe-imya|title=[ Возвращённое имя ] {{!}} Черновик|website=chernovik.net|access-date=2026-06-28}}</ref>.   * '''Бахумеседу''' росасе ана КӀкӀаратӀаса Загъалав наибасе, жив Шамил имамасул Тавуш-МухӀамад наибасул васлъун вукӀарав. Гьезул хъизамалда жаниб щуго васги лъабго ясги рукӀана: МухӀамадрасул, Идрис, МухӀамад, Апанди, Сапарбег, ПатӀимат, Загьидат, Умайгьанат<ref>{{Книга|автор=Алигазиев А. А.|заглавие=Карата: Из прошлое в будущее|язык=ru|год=2019|страницы=128|всего страниц=752}}</ref>.   Идрисил яц Батули КӀаратӀаса ХӀажиясул вас ва Кариматил вац ХӀадис наибасул лъади йикӀана<ref name=":12">{{Книга|автор=Газимагомедов И.|заглавие=Кеди и кединцы: История села Кеди|год=2022|язык=av|место=Махачкала|страницы=141|всего страниц=735}}</ref>. Идрисил эбел цадахъав вац вуго АмирхӀамза, [[Къеди]] ШагӀбанилал тухумалъул чи. Гьев вукӀана 1844 соналъ Шамилил муридзабаз чӀварав Къеди нуцалчиясул вас, гьебго соналъ, чӀвай-хъвеялдаса ворчӀун, эбелгун цадахъ гочана Гъодобериве. Балугълъиялде вахиндал, гьев тӀадвуссана гӀагараб росулӀе<ref name=":13">{{Книга|автор=Газимагомедов И.|заглавие=Кеди и кединцы: История села Кеди|год=2022|язык=av|место=Махачкала|страницы=141|всего страниц=735}}</ref>. == Шапакъатал == 1901 соналъул [[1 январь|1 январалъул]] тӀадегӀанаб буюрухъалдалъун Гъодобериса Идрис наибасе кьуна Святой Станиславил II даражаялъул орден<ref>{{Cite web|url=https://ria1914.info/index.php?title=%D0%92%D1%8B%D1%81%D0%BE%D1%87%D0%B0%D0%B9%D1%88%D0%B8%D0%B5_%D0%BF%D1%80%D0%B8%D0%BA%D0%B0%D0%B7%D1%8B,_%D1%82%D0%B5%D0%BA%D1%81%D1%82%D0%BE%D0%B2%D0%B0%D1%8F_%D0%B2%D0%B5%D1%80%D1%81%D0%B8%D1%8F,_1901,_%D1%8F%D0%BD%D0%B2%D0%B0%D1%80%D1%8C|title=Высочайшие приказы, текстовая версия, 1901, январь — Офицеры русской императорской армии|website=ria1914.info|access-date=2026-09-10}}</ref>. == РакӀалдещвей == [[Дагъистан|Дагъистаналъул]] [[Болъихъ мухъ|Болъихъ мухъалъул]] [[Гъодобери (Болъихъ мухъ)|Гъодобери росдал]] цо къватӀалъе кьун буго Идрисил цӀар<ref name=":22">{{Cite web|url=https://index.kodifikant.ru/ru/05007000011000300|title=Почтовый индекс улица Идриса Наиба, с. Годобери, Ботлихский р-н, республика Дагестан|website=index.kodifikant.ru|access-date=2025-07-27}}</ref>. == МугъчӀваял == [[ru: Идрис из Годобери]] 68c7pe4u3q47lb9h9iufnswipgofpsy 102336 102335 2026-11-04T16:11:38Z Mahamadi Baza 15906 /* */ 102336 wikitext text/x-wiki {{Пачалихъияв хъулухъчи|хъулухъ=[[ГӀанди сверухълъи#Административияб рикьи|Гумбеталда]] [[наиб]]|цевесев=Даниял Апашев|хадусев=ХӀажиясул ХӀадис|период_авал=[[19 Феврал|19 феврал]] [[1898]]|период_ахир=[[март]] [[1904]]|цӀаралъул_оригинал=[[Гъодоберисеб мацӀ|гъодоб]]. ''Гъидусу Идриси''|хвараб_къо-моцӀ=[[март]] [[1904]]|гьавураб_бакӀ=[[Гъодобери]], [[Болъихъ мухъ|ТӀехӀнуцаллъи]], [[Шималияб Кавказалъул имамат]]|гьавураб_къо-моцӀ=1849|хвараб_бакӀ=[[Дагъистаналъул вилаят|Дагъистаналъул област]], [[Россиялъул империя]]|миллат=[[Гъодоберисел|гъодоберисев]] [[Аварал|аварав]]|лъимал=[[МухӀаммадилазул Идрисил АхӀмаднаби|АхӀмаднаби]], МухӀама, МухӀамадибир, ЖахӀбар, Батули, Бахумеседу|эмен=МухӀама|лъади=Каримат|эбел=?|дин=[[Ислам|ислам]]|шапакъатал=[[Файл:RUS Imperial Order of Saint Stanislaus ribbon.svg|40px]]}} '''Гъодобериса Идрис<ref name=":3">{{Cite web|url=https://www.gazavat.ru/history3.php?rub=17&art=172|title=ПИСАТЕЛИ ДАГЕСТАНСКОГО ЗАРУБЕЖЬЯ|lang=ru|author=А. Муртазалиев|website=gazavat.ru|archive-url=https://web.archive.org/web/20241114030555/http://www.gazavat.ru/history3.php?art=172&rub=17|archive-date=2024-11-14|access-date=|url-status=live}}</ref>''', гьединго '''Идрис МухӀамаев<ref name=":4">{{Книга|автор=Козубский Е. И.|заглавие=Дагестанский сборник. Выпуск 1|год=1902|язык=ru|место=Темир-Хан-Шура|страницы=418|всего страниц=689}}</ref>'''<ref name=":0">{{Статья|ссылка=https://toonsitli.ucoz.ru/file/po_sledam_predkov.pdf|автор=Ш. Исаев|заглавие=По следам предков (ахвахцы)|год=2005|издание=toonsitli.ucoz.ru}}</ref> яги '''Идрис-наиб<ref name=":2">{{Cite web|url=https://index.kodifikant.ru/ru/05007000011000300|title=Почтовый индекс улица Идриса Наиба, с. Годобери, Ботлихский р-н, республика Дагестан|website=index.kodifikant.ru|access-date=2025-07-27}}</ref>''' ([[1849 сон|1849]], [[Гъодобери (Болъихъ мухъ)|Гъодобери]], [[Болъихъ мухъ|ТӀехӀнуцаллъи]], [[Шималияб Кавказалъул имамат]] — [[март]] [[1904]], [[Дагъистаналъул вилаят|Дагъистаналъул област]], [[Россиялъул империя]]) — XIX гӀасруялда [[Дагъистан|Дагъистаналда]] рагъулав ва административияб хӀаракатчи, [[Россиялъул империя|Россиялъул]] административияб системаялда вукӀарав наиб<ref name=":02">{{Статья|ссылка=https://toonsitli.ucoz.ru/file/po_sledam_predkov.pdf|автор=Ш. Исаев|заглавие=По следам предков (ахвахцы)|год=2005|издание=toonsitli.ucoz.ru}}</ref>, ракьул бетӀергьан. == Биография == Идрис гьавуна 1849 соналъ [[Гъодобери (Болъихъ мухъ)|Гъодобери]] росулӀ. Гьесул эмен вукӀун вуго МухӀама абурав чи<ref name=":5">Дагъистан Республикаялъул централияб пачалихъияб архив. ТӀехӀнуцал наиблъиялъул Гъодобери росдал хъизамазул сияхӀ (1886)</ref>. Цо биценалда рекъон, Идрисил эбел [[Къеди]] [[Нуцалзабазул рукъ|нуцабазул]] чиясул къоролайлъун йикӀун йиго ва жиндирго гьитӀинав вас АмирхӀамзагун цадахъ Гъодоберие гочун йиго ва гьений МухӀамае росасе ана<ref name=":1">{{Книга|автор=Газимагомедов И.|заглавие=Кеди и кединцы: История села Кеди|год=2022|язык=av|место=Махачкала|страницы=141|всего страниц=735}}</ref>.   Дагъистан [[Россиялъул империя|Россиялъул империялде]] гъорлӀе ун хадуб гьес пачалихъияб хъулухъ гьабулаан. Дагъистан областалъул [[ГӀанди сверухълъи|ГӀанди]] ва [[Авар сверухълъи|Авар округазда]] наибасул хъулухъал тӀуразарулаан<ref name=":42">{{Книга|автор=Козубский Е. И.|заглавие=Дагестанский сборник. Выпуск 1|год=1902|язык=ru|место=Темир-Хан-Шура|страницы=418|всего страниц=689}}</ref>. Гьел хъулухъазда гьесие щвана халкъалъ адаб гьабулев гӀакъилав ва ритӀухъав нухмалъулев хӀисабалда цӀар. [[Кавказалъул рагъ|Кавказалъул рагъул]] чӀунтиялдаса хадуб мугӀрузул жамгӀият щулалъиялъе кӀудияб квербакъи гьабуна Гъодобериса Идрисица. [[Файл:Официальная_часть._Высочайший_приказ_по_военному_ведомству.jpg|ссылка=https://ru.wikipedia.org/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:%D0%9E%D1%84%D0%B8%D1%86%D0%B8%D0%B0%D0%BB%D1%8C%D0%BD%D0%B0%D1%8F_%D1%87%D0%B0%D1%81%D1%82%D1%8C._%D0%92%D1%8B%D1%81%D0%BE%D1%87%D0%B0%D0%B9%D1%88%D0%B8%D0%B9_%D0%BF%D1%80%D0%B8%D0%BA%D0%B0%D0%B7_%D0%BF%D0%BE_%D0%B2%D0%BE%D0%B5%D0%BD%D0%BD%D0%BE%D0%BC%D1%83_%D0%B2%D0%B5%D0%B4%D0%BE%D0%BC%D1%81%D1%82%D0%B2%D1%83.jpg|мини|298x298пкс|19 февралалъул 1898 соналъул Идрис МухӀамаев Гумбеталда наиблъун тӀамиялъул буюрухъ]] 1877 соналъ [[ЧачаналӀ|Чачаналда]] ва [[Дагъистан|Дагъистаналда]] багъарараб восстаниялъул заманалда гьес Россиялъул администрациялъул рахъги ккун, гьел восстаниял гӀадада ва халкъалъе хӀинкъи бугеллъун рикӀкӀун, гьел чӀезариялъулъ гӀахьаллъи гьабуна. [[МигӀарсо|МигӀасдерил]] лъарахъ ккараб рагъулӀ лъукъана гьев, квегӀаб хӀатӀил кӀудияб килищги батӀалъун<ref name=":03">{{Статья|ссылка=https://toonsitli.ucoz.ru/file/po_sledam_predkov.pdf|автор=Ш. Исаев|заглавие=По следам предков (ахвахцы)|год=2005|издание=toonsitli.ucoz.ru}}</ref>.   Идрис вукӀана ракьул бетӀергьан. Гьесул букӀана [[Беледи]] абулеб колода магӀишат, гьениб гьес гӀи-боцӀи хьихьулаан. Живго жиндаго чӀун магӀишаталъе нухмалъи гьабизе захӀмат букӀиналъ, гьес кулиги аскӀор ругел ракьалги [[АнсалтӀа|ансазе]] ижараялъ кьолаан. Ругел баяназда рекъон, гьесул магӀишаталда букӀана гӀага-шагарго 2000 чахъу, 2 чу, 8 оц, 15 гӀака<ref>{{Книга|автор=Османов М-З. О., Гарданов В. К.|заглавие=Формы традиционного скотоводства народов Дагестана в XIX - начале XX в|год=1990|язык=ru|страницы=87|всего страниц=294}}</ref>.   Хвана Идрис наиб [[1904|1904 соналъул]] [[Март|марталда]]. == ГӀагарлъи == Идрисица ячана [[Имам Шамил|Шамил имамасул]] хазиначи КӀкӀаратӀаса ХӀажиясул яс Каримат. Гьесул анлӀго лъимадул цӀарал ва цо-цо баянал лъала: * [[МухӀаммадилазул Идрисил АхӀмаднаби|'''АхӀмаднаби''']] хъулухъ гьабулев вукӀана МугӀрузул республикаялъул ГӀанди округалъул рагъулав комиссарлъун. Эмиграция гьабун хадув гьев вищана Германиялда бугеб Шималияб Кавказалъул миллияб комитеталъул председателлъун. Гьес чехай ячана, гьезул йикӀун йиго кӀиго яс<ref name=":32">{{Cite web|url=https://www.gazavat.ru/history3.php?rub=17&art=172|title=ПИСАТЕЛИ ДАГЕСТАНСКОГО ЗАРУБЕЖЬЯ|lang=ru|author=А. Муртазалиев|website=gazavat.ru|archive-url=https://web.archive.org/web/20241114030555/http://www.gazavat.ru/history3.php?art=172&rub=17|archive-date=2024-11-14|access-date=|url-status=live}}</ref>. * '''ЖахӀбар''', кӀудияв (яги кӀудиязул цояв) вас, гьавуна 1882 соналъ<ref name=":5" />.   * '''МухӀама''', гьавуна 1885 соналъ<ref name=":5" />. * '''МухӀамадибир''' * '''Батули''' росасе кьун йиго [[КӀкӀаратӀа]] росулӀе. Лъалеб буго гьелъул вукӀанин вас Идрис, советияб заманалда «ватӀаналъул хиянатчи» вугин абун гӀайибги гӀунтӀизабун репрессиял гьавурав, амма хадуб реабилитация гьабурав<ref>{{Cite web|url=https://chernovik.net/content/hronograf/vozvrashchyonnoe-imya|title=[ Возвращённое имя ] {{!}} Черновик|website=chernovik.net|access-date=2026-06-28}}</ref>.   * '''Бахумеседу''' росасе ана КӀкӀаратӀаса Загъалав наибасе, жив Шамил имамасул Тавуш-МухӀамад наибасул васлъун вукӀарав. Гьезул хъизамалда жаниб щуго васги лъабго ясги рукӀана: МухӀамадрасул, Идрис, МухӀамад, Апанди, Сапарбег, ПатӀимат, Загьидат, Умайгьанат<ref>{{Книга|автор=Алигазиев А. А.|заглавие=Карата: Из прошлое в будущее|язык=ru|год=2019|страницы=128|всего страниц=752}}</ref>.   Идрисил яц Батули КӀаратӀаса ХӀажиясул вас ва Кариматил вац ХӀадис наибасул лъади йикӀана<ref name=":12">{{Книга|автор=Газимагомедов И.|заглавие=Кеди и кединцы: История села Кеди|год=2022|язык=av|место=Махачкала|страницы=141|всего страниц=735}}</ref>. Идрисил эбел цадахъав вац вуго АмирхӀамза, [[Къеди]] ШагӀбанилал тухумалъул чи. Гьев вукӀана 1844 соналъ Шамилил муридзабаз чӀварав Къеди нуцалчиясул вас, гьебго соналъ, чӀвай-хъвеялдаса ворчӀун, эбелгун цадахъ гочана Гъодобериве. Балугълъиялде вахиндал, гьев тӀадвуссана гӀагараб росулӀе<ref name=":13">{{Книга|автор=Газимагомедов И.|заглавие=Кеди и кединцы: История села Кеди|год=2022|язык=av|место=Махачкала|страницы=141|всего страниц=735}}</ref>. == Шапакъатал == 1901 соналъул [[1 январь|1 январалъул]] тӀадегӀанаб буюрухъалдалъун Гъодобериса Идрис наибасе кьуна Святой Станиславил II даражаялъул орден<ref>{{Cite web|url=https://ria1914.info/index.php?title=%D0%92%D1%8B%D1%81%D0%BE%D1%87%D0%B0%D0%B9%D1%88%D0%B8%D0%B5_%D0%BF%D1%80%D0%B8%D0%BA%D0%B0%D0%B7%D1%8B,_%D1%82%D0%B5%D0%BA%D1%81%D1%82%D0%BE%D0%B2%D0%B0%D1%8F_%D0%B2%D0%B5%D1%80%D1%81%D0%B8%D1%8F,_1901,_%D1%8F%D0%BD%D0%B2%D0%B0%D1%80%D1%8C|title=Высочайшие приказы, текстовая версия, 1901, январь — Офицеры русской императорской армии|website=ria1914.info|access-date=2026-09-10}}</ref>. == РакӀалдещвей == [[Дагъистан|Дагъистаналъул]] [[Болъихъ мухъ|Болъихъ мухъалъул]] [[Гъодобери (Болъихъ мухъ)|Гъодобери росдал]] цо къватӀалъе кьун буго Идрисил цӀар<ref name=":22">{{Cite web|url=https://index.kodifikant.ru/ru/05007000011000300|title=Почтовый индекс улица Идриса Наиба, с. Годобери, Ботлихский р-н, республика Дагестан|website=index.kodifikant.ru|access-date=2025-07-27}}</ref>. == МугъчӀваял == [[ru: Идрис из Годобери]] awdhf7p0ce5tznqykegcseprh8ax0zq 102348 102336 2026-11-05T08:15:30Z Mahamadi Baza 15906 /* */ 102348 wikitext text/x-wiki {{Пачалихъияв хъулухъчи|хъулухъ=[[ГӀанди сверухълъи#Административияб рикьи|Гумбеталда]] [[наиб]]|цевесев=Даниял Апашев|хадусев=ХӀажиясул ХӀадис|период_авал=[[19 Феврал|19 феврал]] [[1898]]|период_ахир=[[март]] [[1904]]|цӀаралъул_оригинал=[[Гъодоберисеб мацӀ|гъодоб]]. ''Гъидусу Идриси''|хвараб_къо-моцӀ=[[март]] [[1904]]|гьавураб_бакӀ=[[Гъодобери]], [[Болъихъ мухъ|ТӀехӀнуцаллъи]], [[Шималияб Кавказалъул имамат]]|гьавураб_къо-моцӀ=1849|хвараб_бакӀ=[[Дагъистаналъул вилаят|Дагъистаналъул област]], [[Россиялъул империя]]|миллат=[[Гъодоберисел|гъодоберисев]] [[Аварал|аварав]]|лъимал=[[МухӀаммадилазул Идрисил АхӀмаднаби|АхӀмаднаби]], МухӀамадибир, ЖахӀбар, Батули, Бахумеседу|эмен=МухӀама|лъади=Каримат|эбел=?|дин=[[Ислам|ислам]]|шапакъатал=[[Файл:RUS Imperial Order of Saint Stanislaus ribbon.svg|40px]]}} '''Гъодобериса Идрис<ref name=":3">{{Cite web|url=https://www.gazavat.ru/history3.php?rub=17&art=172|title=ПИСАТЕЛИ ДАГЕСТАНСКОГО ЗАРУБЕЖЬЯ|lang=ru|author=А. Муртазалиев|website=gazavat.ru|archive-url=https://web.archive.org/web/20241114030555/http://www.gazavat.ru/history3.php?art=172&rub=17|archive-date=2024-11-14|access-date=|url-status=live}}</ref>''', гьединго '''Идрис МухӀамаев<ref name=":4">{{Книга|автор=Козубский Е. И.|заглавие=Дагестанский сборник. Выпуск 1|год=1902|язык=ru|место=Темир-Хан-Шура|страницы=418|всего страниц=689}}</ref>'''<ref name=":0">{{Статья|ссылка=https://toonsitli.ucoz.ru/file/po_sledam_predkov.pdf|автор=Ш. Исаев|заглавие=По следам предков (ахвахцы)|год=2005|издание=toonsitli.ucoz.ru}}</ref> яги '''Идрис-наиб<ref name=":2">{{Cite web|url=https://index.kodifikant.ru/ru/05007000011000300|title=Почтовый индекс улица Идриса Наиба, с. Годобери, Ботлихский р-н, республика Дагестан|website=index.kodifikant.ru|access-date=2025-07-27}}</ref>''' ([[1849 сон|1849]], [[Гъодобери (Болъихъ мухъ)|Гъодобери]], [[Болъихъ мухъ|ТӀехӀнуцаллъи]], [[Шималияб Кавказалъул имамат]] — [[март]] [[1904]], [[Дагъистаналъул вилаят|Дагъистаналъул област]], [[Россиялъул империя]]) — XIX гӀасруялда [[Дагъистан|Дагъистаналда]] рагъулав ва административияб хӀаракатчи, [[Россиялъул империя|Россиялъул]] административияб системаялда вукӀарав наиб<ref name=":02">{{Статья|ссылка=https://toonsitli.ucoz.ru/file/po_sledam_predkov.pdf|автор=Ш. Исаев|заглавие=По следам предков (ахвахцы)|год=2005|издание=toonsitli.ucoz.ru}}</ref>, ракьул бетӀергьан. == Биография == Идрис гьавуна 1849 соналъ [[Гъодобери (Болъихъ мухъ)|Гъодобери]] росулӀ. Гьесул эмен вукӀун вуго МухӀама абурав чи<ref name=":5">Дагъистан Республикаялъул централияб пачалихъияб архив. ТӀехӀнуцал наиблъиялъул Гъодобери росдал хъизамазул сияхӀ (1886)</ref>. Цо биценалда рекъон, Идрисил эбел [[Къеди]] [[Нуцалзабазул рукъ|нуцабазул]] чиясул къоролайлъун йикӀун йиго ва жиндирго гьитӀинав вас АмирхӀамзагун цадахъ Гъодоберие гочун йиго ва гьений МухӀамае росасе ана<ref name=":1">{{Книга|автор=Газимагомедов И.|заглавие=Кеди и кединцы: История села Кеди|год=2022|язык=av|место=Махачкала|страницы=141|всего страниц=735}}</ref>.   Дагъистан [[Россиялъул империя|Россиялъул империялде]] гъорлӀе ун хадуб гьес пачалихъияб хъулухъ гьабулаан. Дагъистан областалъул [[ГӀанди сверухълъи|ГӀанди]] ва [[Авар сверухълъи|Авар округазда]] наибасул хъулухъал тӀуразарулаан<ref name=":42">{{Книга|автор=Козубский Е. И.|заглавие=Дагестанский сборник. Выпуск 1|год=1902|язык=ru|место=Темир-Хан-Шура|страницы=418|всего страниц=689}}</ref>. Гьел хъулухъазда гьесие щвана халкъалъ адаб гьабулев гӀакъилав ва ритӀухъав нухмалъулев хӀисабалда цӀар. [[Кавказалъул рагъ|Кавказалъул рагъул]] чӀунтиялдаса хадуб мугӀрузул жамгӀият щулалъиялъе кӀудияб квербакъи гьабуна Гъодобериса Идрисица. [[Файл:Официальная_часть._Высочайший_приказ_по_военному_ведомству.jpg|ссылка=https://ru.wikipedia.org/wiki/%D0%A4%D0%B0%D0%B9%D0%BB:%D0%9E%D1%84%D0%B8%D1%86%D0%B8%D0%B0%D0%BB%D1%8C%D0%BD%D0%B0%D1%8F_%D1%87%D0%B0%D1%81%D1%82%D1%8C._%D0%92%D1%8B%D1%81%D0%BE%D1%87%D0%B0%D0%B9%D1%88%D0%B8%D0%B9_%D0%BF%D1%80%D0%B8%D0%BA%D0%B0%D0%B7_%D0%BF%D0%BE_%D0%B2%D0%BE%D0%B5%D0%BD%D0%BD%D0%BE%D0%BC%D1%83_%D0%B2%D0%B5%D0%B4%D0%BE%D0%BC%D1%81%D1%82%D0%B2%D1%83.jpg|мини|298x298пкс|19 февралалъул 1898 соналъул Идрис МухӀамаев Гумбеталда наиблъун тӀамиялъул буюрухъ]] 1877 соналъ [[ЧачаналӀ|Чачаналда]] ва [[Дагъистан|Дагъистаналда]] багъарараб восстаниялъул заманалда гьес Россиялъул администрациялъул рахъги ккун, гьел восстаниял гӀадада ва халкъалъе хӀинкъи бугеллъун рикӀкӀун, гьел чӀезариялъулъ гӀахьаллъи гьабуна. [[МигӀарсо|МигӀасдерил]] лъарахъ ккараб рагъулӀ лъукъана гьев, квегӀаб хӀатӀил кӀудияб килищги батӀалъун<ref name=":03">{{Статья|ссылка=https://toonsitli.ucoz.ru/file/po_sledam_predkov.pdf|автор=Ш. Исаев|заглавие=По следам предков (ахвахцы)|год=2005|издание=toonsitli.ucoz.ru}}</ref>.   Идрис вукӀана ракьул бетӀергьан. Гьесул букӀана [[Беледи]] абулеб колода магӀишат, гьениб гьес гӀи-боцӀи хьихьулаан. Живго жиндаго чӀун магӀишаталъе нухмалъи гьабизе захӀмат букӀиналъ, гьес кулиги аскӀор ругел ракьалги [[АнсалтӀа|ансазе]] ижараялъ кьолаан. Ругел баяназда рекъон, гьесул магӀишаталда букӀана гӀага-шагарго 2000 чахъу, 2 чу, 8 оц, 15 гӀака<ref>{{Книга|автор=Османов М-З. О., Гарданов В. К.|заглавие=Формы традиционного скотоводства народов Дагестана в XIX - начале XX в|год=1990|язык=ru|страницы=87|всего страниц=294}}</ref>.   Хвана Идрис наиб [[1904|1904 соналъул]] [[Март|марталда]]. == ГӀагарлъи == Идрисица ячана [[Имам Шамил|Шамил имамасул]] хазиначи КӀкӀаратӀаса ХӀажиясул яс Каримат. Гьесул щуго лъимадул цӀарал ва цо-цо баянал лъала: * [[МухӀаммадилазул Идрисил АхӀмаднаби|'''АхӀмаднаби''']] хъулухъ гьабулев вукӀана МугӀрузул республикаялъул ГӀанди округалъул рагъулав комиссарлъун. Эмиграция гьабун хадув гьев вищана Германиялда бугеб Шималияб Кавказалъул миллияб комитеталъул председателлъун. Гьес чехай ячана, гьезул йикӀун йиго кӀиго яс<ref name=":32">{{Cite web|url=https://www.gazavat.ru/history3.php?rub=17&art=172|title=ПИСАТЕЛИ ДАГЕСТАНСКОГО ЗАРУБЕЖЬЯ|lang=ru|author=А. Муртазалиев|website=gazavat.ru|archive-url=https://web.archive.org/web/20241114030555/http://www.gazavat.ru/history3.php?art=172&rub=17|archive-date=2024-11-14|access-date=|url-status=live}}</ref>. * '''ЖахӀбар''', кӀудияв (яги кӀудиязул цояв) вас, гьавуна 1882 соналъ<ref name=":5" />.   * '''МухӀамадибир''', гьавуна 1885 соналъ<ref name=":5" />. * '''Батули''' росасе кьун йиго [[КӀкӀаратӀа]] росулӀе. Лъалеб буго гьелъул вукӀанин вас Идрис, советияб заманалда «ватӀаналъул хиянатчи» вугин абун гӀайибги гӀунтӀизабун репрессиял гьавурав, амма хадуб реабилитация гьабурав<ref>{{Cite web|url=https://chernovik.net/content/hronograf/vozvrashchyonnoe-imya|title=[ Возвращённое имя ] {{!}} Черновик|website=chernovik.net|access-date=2026-06-28}}</ref>.   * '''Бахумеседу''' росасе ана КӀкӀаратӀаса Загъалав наибасе, жив Шамил имамасул Тавуш-МухӀамад наибасул васлъун вукӀарав. Гьезул хъизамалда жаниб щуго васги лъабго ясги рукӀана: МухӀамадрасул, Идрис, МухӀамад, Апанди, Сапарбег, ПатӀимат, Загьидат, Умайгьанат<ref>{{Книга|автор=Алигазиев А. А.|заглавие=Карата: Из прошлое в будущее|язык=ru|год=2019|страницы=128|всего страниц=752}}</ref>.   Идрисил яц Батули КӀаратӀаса ХӀажиясул вас ва Кариматил вац ХӀадис наибасул лъади йикӀана<ref name=":12">{{Книга|автор=Газимагомедов И.|заглавие=Кеди и кединцы: История села Кеди|год=2022|язык=av|место=Махачкала|страницы=141|всего страниц=735}}</ref>. Идрисил эбел цадахъав вац вуго АмирхӀамза, [[Къеди]] ШагӀбанилал тухумалъул чи. Гьев вукӀана 1844 соналъ Шамилил муридзабаз чӀварав Къеди нуцалчиясул вас, гьебго соналъ, чӀвай-хъвеялдаса ворчӀун, эбелгун цадахъ гочана Гъодобериве. Балугълъиялде вахиндал, гьев тӀадвуссана гӀагараб росулӀе<ref name=":13">{{Книга|автор=Газимагомедов И.|заглавие=Кеди и кединцы: История села Кеди|год=2022|язык=av|место=Махачкала|страницы=141|всего страниц=735}}</ref>. == Шапакъатал == 1901 соналъул [[1 январь|1 январалъул]] тӀадегӀанаб буюрухъалдалъун Гъодобериса Идрис наибасе кьуна Святой Станиславил II даражаялъул орден<ref>{{Cite web|url=https://ria1914.info/index.php?title=%D0%92%D1%8B%D1%81%D0%BE%D1%87%D0%B0%D0%B9%D1%88%D0%B8%D0%B5_%D0%BF%D1%80%D0%B8%D0%BA%D0%B0%D0%B7%D1%8B,_%D1%82%D0%B5%D0%BA%D1%81%D1%82%D0%BE%D0%B2%D0%B0%D1%8F_%D0%B2%D0%B5%D1%80%D1%81%D0%B8%D1%8F,_1901,_%D1%8F%D0%BD%D0%B2%D0%B0%D1%80%D1%8C|title=Высочайшие приказы, текстовая версия, 1901, январь — Офицеры русской императорской армии|website=ria1914.info|access-date=2026-09-10}}</ref>. == РакӀалдещвей == [[Дагъистан|Дагъистаналъул]] [[Болъихъ мухъ|Болъихъ мухъалъул]] [[Гъодобери (Болъихъ мухъ)|Гъодобери росдал]] цо къватӀалъе кьун буго Идрисил цӀар<ref name=":22">{{Cite web|url=https://index.kodifikant.ru/ru/05007000011000300|title=Почтовый индекс улица Идриса Наиба, с. Годобери, Ботлихский р-н, республика Дагестан|website=index.kodifikant.ru|access-date=2025-07-27}}</ref>. == МугъчӀваял == [[ru: Идрис из Годобери]] 0jcxl46r804kzwir43i4kzidw3ijea5 Халип:Infobox Dagestan inhabited locality/салугъамас 10 22367 102346 2026-11-05T08:09:24Z M. Omarius 10562 Новая страница: «{{ГӀБ инфобокс | name = {{{av_name|{{{av_name|{{PAGENAMEBASE}}}}}}}} | official_name = | native_name = {{{ru_name|{{{name|}}}}}} | native_name_lang = <!-- ISO 639-2 code e.g. "fr" for French. If more than one, use {{lang}} instead --> | other_name = | settlement_type = {{#if:{{{inhabloc_type|}}} | {{{inhabloc_type}}}{{{inhabloc_type_ref|}}} | {{#if: {{{inhabloc_cat|}}} | Ро...» 102346 wikitext text/x-wiki {{ГӀБ инфобокс | name = {{{av_name|{{{av_name|{{PAGENAMEBASE}}}}}}}} | official_name = | native_name = {{{ru_name|{{{name|}}}}}} | native_name_lang = <!-- ISO 639-2 code e.g. "fr" for French. If more than one, use {{lang}} instead --> | other_name = | settlement_type = {{#if:{{{inhabloc_type|}}} | {{{inhabloc_type}}}{{{inhabloc_type_ref|}}} | {{#if: {{{inhabloc_cat|}}} | [[Россиялда чӀел-бакӀазул тайпаби|{{{inhabloc_cat}}}]]{{{inhabloc_cat_ref|}}} }} }}{{#if: {{{abolished_date|}}} | <br />(тӀагӀинабураб) }} <!-- transliteration(s) --> | translit_lang1 = {{#if: {{{loc_name1|}}} | Цогидал транскрипцияби }} | translit_lang1_type = {{{loc_lang1|}}} | translit_lang1_info = {{{loc_name1|}}} | translit_lang1_type1 = {{{loc_lang2|}}} | translit_lang1_info1 = {{{loc_name2|}}} | translit_lang1_type2 = {{{loc_lang3|}}} | translit_lang1_info2 = {{{loc_name3|}}} | translit_lang1_type3 = {{{loc_lang4|}}} | translit_lang1_info3 = {{{loc_name4|}}} | translit_lang1_type4 = | translit_lang1_info4 = <!-- etc., up to translit_lang1_type6 / translit_lang1_info6 --> | translit_lang2 = {{#if: {{{other_name|}}} | Цогидал }} | translit_lang2_type = {{{other_lang|}}} | translit_lang2_info = {{{other_name|}}} | translit_lang2_type1 = | translit_lang2_info1 = | translit_lang2_type2 = | translit_lang2_info2 = <!-- etc., up to translit_lang2_type6 / translit_lang2_info6 --> <!-- images, nickname, motto --> | image_skyline = {{{image_skyline|}}} | imagesize = | image_alt = | image_caption = {{{image_caption|}}} | image_flag = {{#if: {{{image_flag|}}} | {{{image_flag}}} | {{w-d|property|raw|P41}} }} | flag_size = 125px | flag_alt = {{{flag_caption|}}} | flag_border = {{{flag_border|}}} | flag_link = | image_seal = | seal_size = | seal_alt = | seal_link = | seal_type = | image_shield = {{#if: {{{image_coa|}}} | {{{image_coa|}}} | {{w-d|property|raw|P94}} }} | shield_size = 70px | shield_alt = {{{coa_caption|}}} | shield_link = | image_blank_emblem = | blank_emblem_type = <!-- defaults to Logo --> | blank_emblem_size = | blank_emblem_alt = | blank_emblem_link = | etymology = {{{etymology|}}} | nickname = {{{nickname|}}} | motto = | anthem = {{{anthem|}}}{{{anthem_ref|}}} <!-- maps and coordinates --> | image_map = {{{image_map|}}} | mapsize = | map_alt = | map_caption = {{{map_caption|}}} | image_map1 = {{#if: {{Infobox mapframe}} | {{hidden | header = {{{av_name|{{PAGENAMEBASE}}}}} бугеб мес| headercss=height:5px; | content = <div class="center" style="margin-top:1em">{{Infobox mapframe|area_km2={{#if: {{{area_km2|}}} | {{{area_km2}}} | {{w-d|property|raw|P2046}} }} }}</div>}} }} | mapsize1 = | map_alt1 = | map_caption1 = | pushpin_map = {{#if:{{{district_map|}}}|{{{district_map|}}}}}#Russia Dagestan#Russia | pushpin_label_position = {{{map_label_position|right}}}<!-- position of the pushpin label: left, right, top, bottom, none --> | pushpin_label = <!-- only necessary if "name" or "official_name" are too long --> | pushpin_map_alt = | pushpin_mapsize = | pushpin_relief = | pushpin_map_caption = {{{pushpin_map_caption|{{{av_name|{{PAGENAMEBASE}}}}} картаялда}}} | pushpin_outside = {{{pushpin_outside|}}} | coordinates = {{#if: {{{coordinates|}}} | {{{coordinates}}} | {{#if: {{w-d|property|P625}} | {{WikidataCoord|display=inline,title}} }} }} | coor_pinpoint = <!-- to specify exact location of coordinates (was coor_type) --> | coordinates_footnotes = <!-- for references: use <ref> tags --> | grid_name = <!-- name of a regional grid system --> | grid_position = <!-- position on the regional grid system --> <!-- location --> | subdivision_type = Пачалихъ | subdivision_name = [[Россия]] | subdivision_type1 = [[Россиялъул федералал субйектал|Республика]] | subdivision_name1 = [[Дагъистан]] | subdivision_type2 = [[Россиялъул районал|Адм. район]] | subdivision_name2 = {{{adm_district_jur|}}}{{{adm_district_jur_ref|}}} | subdivision_type3 = {{{adm_selsoviet_type|[[Росдал совет]]}}} | subdivision_name3 = {{{adm_selsoviet_jur|}}}<ref name="RDagestan_mun">{{cite web |url = https://docs.cntd.ru/document/802037479 |title = Закон Республики Дагестан от 13 января 2005 года № 6 «О статусе муниципальных образований Республики Дагестан» |trans-title=Дагъистаналъул Республикаялъул акт 2005 сонил 13 январалдаса N 6 «Дагъистаналъул Республикаялъул муниципалал гӀуцӀабазул статусалъул»|archive-url = https://web.archive.org/web/20220407093518/https://docs.cntd.ru/document/802037479 |archive-date = 2022-04-07 |access-date = 2022-06-20 }}</ref> | subdivision_type4 = | subdivision_name4 = | subdivision_type5 = | subdivision_name5 = | subdivision_type6 = | subdivision_name6 = <!-- established --> | established_title = {{#if: {{{established_title|}}} | {{{established_title}}} | КьучӀ лъей }} | established_date = {{#if: {{{established_date|}}} | {{{established_date}}}{{{established_date_ref|}}} | {{w-d|property|edit@end|P571}}{{w-d|reference|P571}} }} | established_title1 = {{{inhabloc_cat|Гьанжесеб}}} статус щвей | established_date1 = {{{current_cat_date|}}}{{{current_cat_date_ref|}}} | extinct_title = {{#if: {{{abolished_date|}}} | ТӀагӀинаби}} | extinct_date = {{{abolished_date|}}}{{{abolished_date_ref|}}} | founder = | named_for = <!-- seat, smaller parts --> | seat_type = <!-- defaults to: Seat --> | seat = | seat1_type = <!-- defaults to: Former seat --> | seat1 = | parts_type = <!-- defaults to: Boroughs --> | parts_style = <!-- list, coll (collapsed list), para (paragraph format) --> | parts = <!-- parts text, or header for parts list --> | p1 = | p2 = <!-- etc., up to p50: for separate parts to be listed--> <!-- government type, leaders --> | government_footnotes = <!-- for references: use <ref> tags --> | government_type = | governing_body = {{{representative_body|}}}{{{representative_body_ref|}}} | leader_party = | leader_title = {{#if:{{{leader_title|}}} | {{{leader_title}}}{{{leader_title_ref|}}} | БетӀер }} | leader_name = {{{leader_name|}}}{{{leader_name_ref|}}} | leader_title1 = | leader_name1 = <!-- etc., up to leader_title4 / leader_name4 --> <!-- display settings --> | total_type = <!-- to set a non-standard label for total area and population rows --> | unit_pref = <!-- enter: Imperial, to display imperial before metric --> <!-- area --> | area_footnotes = {{#if: {{{area_km2_ref|}}} | {{{area_km2_ref}}} }} | area_magnitude = <!-- use only to set a special wikilink --> | dunam_link = <!-- If dunams are used, this specifies which dunam to link. --> | area_total_km2 = {{#if: {{{area_km2|}}} | {{{area_km2}}} }} | area_total_sq_mi = <!-- see table @ Template:Infobox settlement for details --> | area_total_ha = | area_total_acre = | area_total_dunam = <!-- used in Middle East articles only --> | area_land_km2 = | area_land_sq_mi = | area_land_ha = | area_land_acre = | area_land_dunam = <!-- used in Middle East articles only --> | area_water_km2 = | area_water_sq_mi = | area_water_ha = | area_water_acre = | area_water_dunam = <!-- used in Middle East articles only --> | area_water_percent = | area_urban_footnotes = <!-- for references: use <ref> tags --> | area_urban_km2 = | area_urban_sq_mi = | area_urban_ha = | area_urban_acre = | area_urban_dunam = <!-- used in Middle East articles only --> | area_rural_footnotes = <!-- for references: use <ref> tags --> | area_rural_km2 = | area_rural_sq_mi = | area_rural_ha = | area_rural_acre = | area_rural_dunam = <!-- used in Middle East articles only --> | area_metro_footnotes = <!-- for references: use <ref> tags --> | area_metro_km2 = | area_metro_sq_mi = | area_metro_ha = | area_metro_acre = | area_metro_dunam = <!-- used in Middle East articles only --> | area_rank = | area_blank1_title = | area_blank1_km2 = | area_blank1_sq_mi = | area_blank1_ha = | area_blank1_acre = | area_blank1_dunam = <!-- used in Middle East articles only --> | area_blank2_title = | area_blank2_km2 = | area_blank2_sq_mi = | area_blank2_ha = | area_blank2_acre = | area_blank2_dunam = <!-- used in Middle East articles only --> | area_note = <!-- dimensions --> | dimensions_footnotes = <!-- for references: use <ref> tags --> | length_km = | length_mi = | width_km = | width_mi = <!-- elevation --> | elevation_footnotes = {{#if: {{{elevation_footnotes|}}} | {{{elevation_footnotes}}} | {{w-d|reference|P2044}} }} | elevation_m = {{#if: {{{elevation_m|}}} | {{{elevation_m}}} | {{w-d|property|raw|P2044}} }} | elevation_ft = | elevation_point = <!-- for denoting the measurement point --> | elevation_max_footnotes = <!-- for references: use <ref> tags --> | elevation_max_m = | elevation_max_ft = | elevation_max_point = <!-- for denoting the measurement point --> | elevation_max_rank = | elevation_min_footnotes = <!-- for references: use <ref> tags --> | elevation_min_m = | elevation_min_ft = | elevation_min_point = <!-- for denoting the measurement point --> | elevation_min_rank = <!-- population --> | population_as_of = {{#if: {{{pop_2021census|}}} | [[Russian Census (2021)|2021&nbsp;Census]] | {{#if: {{{pop_2010census|}}} | [[Russian Census (2010)|2010&nbsp;Census]] }}}} | population_footnotes = {{#if: {{{pop_2021census|}}} | {{#if: {{{pop_2021census_ref|}}} | {{{pop_2021census_ref}}} |<ref name="2021Census">{{ru-pop-ref|2021Census}}</ref> }} | {{#if: {{{pop_2010census|}}} | {{#if: {{{pop_2010census_ref|}}} | {{{pop_2010census_ref}}} |<ref name="2010Census">{{ru-pop-ref|2010Census}}</ref> }} }} }} | population_total = {{{pop_2021census|{{{pop_2010census|}}}}}} | pop_est_as_of = {{#if: <!-- wikidata pop as of 01.01.25 is set --> {{wikidata|property|raw|P1082|P585=2025-01-01}} | 2025 | <!-- use template parameter --> {{#invoke:WikidataIB|getValue|P1082|{{{pop_latest_date|}}}|qual=P585|rank=best|fwd=ALL|qualsonly=true|noicon=true|list=p-1}} }} | pop_est_footnotes = {{#if: <!-- wikidata pop as of 01.01.25 is set --> {{wikidata|property|raw|P1082|P585=2025-01-01}} | {{#if:{{wikidata|reference|P1082|P585=2025-01-01}}|{{wikidata|reference|P1082|P585=2025-01-01}}}} | <!-- use template parameter --> {{{pop_latest_ref|}}} }} | population_est = {{#if: {{#invoke:WikidataIB|getValue|P1082|{{{pop_latest|}}}|ps=3|list=p-1}} | {{#invoke:WikidataIB|getValue|P1082|{{{pop_latest|}}}|ps=3|list=p-1}} <!-- begin pct change -->{{#switch:{{{pop_2021census|{{{pop_2010census|}}}}}}|0|=|#default=({{#ifexpr: {{formatnum:{{{pop_2021census|{{{pop_2010census|}}}}}}|R}} < {{formatnum:{{#invoke:WikidataIB|getValue|P1082|{{{pop_latest|}}}|ps=3|list=p-1}}|R}}|{{#tag:span|+{{#expr: ( ( {{formatnum:{{#invoke:WikidataIB|getValue|P1082|{{{pop_latest|}}}|ps=3|list=p-1}}|R}} / {{formatnum:{{{pop_2021census|{{{pop_2010census|}}}}}}|R}} -1 ) round 3 ) *100 }}%|style="color:green;"}}|{{#tag:span|{{#expr: ( ( {{formatnum:{{#invoke:WikidataIB|getValue|P1082|{{{pop_latest|}}}|ps=3|list=p-1}}|R}} / {{formatnum:{{{pop_2021census|{{{pop_2010census|}}}}}}|R}} -1 ) round 3 ) *100 }}%|style="color:red;"}} }} }})<!-- end pct change --> | <!-- use template parameter --> {{{pop_latest|}}} }} | population_rank = {{#if: {{{pop_2021census_rank|{{{pop_2010census_rank|}}}}}} | [[List of cities and towns in Russia by population|{{{pop_2021census_rank|{{{pop_2010census_rank|}}}}}}]] {{#if: {{{pop_2021census_rank|}}} | in 2021| {{#if: {{{pop_2010census_rank|}}} | in 2010}}}}}} | population_density_km2 = {{If empty | {{{pop_density|}}} | auto }} | population_demonym = {{#if: {{{population_demonym|}}} | {{{population_demonym}}} | {{w-d|property|edit@end|P1549}} }} | population_note = {{#if: {{{ethnicity|}}}|({{{ethnicity|}}})}} <!-- demographics (section 1) --> | demographics_type1 = {{#ifexpr: {{#if: {{{adm_city_jur|}}} | 1 | 0 }} + {{#if: {{{capital_of|}}} | 1 | 0 }} + {{#if: {{{adm_ctr_of|}}} | 1 | 0 }} + {{#if: {{{adm_ctr_of1|}}} | 1 | 0 }} > 0 | <div style="text-align: center;">[[Россиялъул административияб рикьи|Административияб статус]]</div> }} | demographics1_footnotes = <!-- for references: use <ref> tags --> | demographics1_title1 = <span style="font-weight:normal;">Субординация</span> | demographics1_info1 = {{{adm_city_jur|{{{adm_inhabloc_jur|}}}}}}{{{adm_city_jur_ref|{{{adm_inhabloc_jur_ref|}}}}}} | demographics1_title2 = <span style="font-weight:normal;">{{#if: {{{adm_city_jur|{{{adm_inhabloc_jur|Шагьар}}}}}}|Тахшагьар|Центер}}</span> | demographics1_info2 = {{{capital_of|}}}{{{capital_of_ref|}}} | demographics1_title3 = <span style="font-weight:normal;">[[Административияб центер|Центер]]</span> | demographics1_info3 = {{{adm_ctr_of1|}}}{{#if: {{{adm_ctr_of2|}}}|,}}{{{adm_ctr_of1_ref|}}}<!-- -->{{#if: {{{adm_ctr_of2|}}} |&#32;{{{adm_ctr_of2|}}}{{{adm_ctr_of2_ref|}}} }}<!-- -->{{{adm_ctr_of|}}}{{{adm_ctr_of_ref|}}} | demographics1_title4 = | demographics1_info4 = <!-- etc., up to demographics1_title5 / demographics1_info5 --> <!-- demographics (section 2) --> | demographics_type2 = {{#ifexpr: {{#if: {{{mun_district_jur|}}} | 1 | 0 }} + {{#if: {{{urban_okrug_jur|}}} | 1 | 0 }} + {{#if: {{{urban_settlement_jur|}}} | 1 | 0 }} + {{#if: {{{mun_admctr_of|}}} | 1 | 0 }} + {{#if: {{{mun_admctr_of1|}}} | 1 | 0 }} > 0 | <div style="text-align: center;">[[Россиялъул административияб рикьи#Муниципалаб_рикьи|Муниципалаб статус]]</div> }} | demographics2_footnotes = <!-- for references: use <ref> tags --> | demographics2_title1 = {{#if: {{{mun_district_jur|}}} | <span style="font-weight:normal;">[[Россиялъул районал|Муниципалаб мухъ]]</span> }}<!-- -->{{#if: {{{urban_okrug_jur|}}} | <span style="font-weight:normal;">Шагьрияб округ</span> }} | demographics2_info1 = {{#if: {{{mun_district_jur|}}} | {{{mun_district_jur}}}{{{mun_district_jur_ref|<ref name="RDagestan_mun"/>}}} | {{#if: {{{urban_okrug_jur|}}} | {{{urban_okrug_jur}}}{{{urban_okrug_jur_ref|}}} }} }} | demographics2_title2 = <span style="font-weight:normal;">Шагьрияб чӀел</span> | demographics2_info2 = {{{urban_settlement_jur|}}}{{{urban_settlement_jur_ref|}}} | demographics2_title3 = <span style="font-weight:normal;">Росдалаб чӀел</span> | demographics2_info3 = {{{rural_settlement_jur|}}}{{{rural_settlement_jur_ref|}}} | demographics2_title4 = <span style="font-weight:normal;">[[Административияб центр|Центер]]</span> | demographics2_info4 = {{{mun_admctr_of|}}}{{{mun_admctr_of_ref|}}}<!-- -->{{{mun_admctr_of1|}}}{{#if: {{{mun_admctr_of2|}}} |,}}{{{mun_admctr_of1_ref|}}}<!-- -->{{#if: {{{mun_admctr_of2|}}} |&#32;{{{mun_admctr_of2|}}}{{{mun_admctr_of2_ref|}}} }} <!-- time zone(s) --> | timezone1 = {{Russia Time Zone Wikidata|timezone}} | utc_offset1 = {{Russia Time Zone Wikidata|utc_offset}} | timezone1_DST = | utc_offset1_DST = | timezone2 = | utc_offset2 = | timezone2_DST = | utc_offset2_DST = <!-- postal codes, area code --> | postal_code_type = [[Россиялда почалъул кодал|Почалъул индекс(ал)]]{{#if: {{{postal_codes|}}}{{w-d|properties|P281}} | {{#if: {{{postal_codes_ref|}}} | {{{postal_codes_ref}}} |<ref name="PostalCode">Почта России. Информационно-вычислительный центр ОАСУ РПО. (''Russian Post''). [http://vinfo.russianpost.ru/servlet/department Поиск объектов почтовой связи] (''Postal Objects Search'') {{in lang|ru}}</ref>}} }} | postal_code = {{#if: {{{postal_codes|}}} | {{{postal_codes|}}} | {{w-d|properties|edit@end|P281}} }} | postal2_code_type = <!-- enter ZIP Code, Postcode, Post code, Postal code... --> | postal2_code = | area_code_type = [[Россиялда телефоналъул кодал|Телефоналъул код(ал)]] | area_code = {{#if: {{{dialing_codes|}}} |+7&nbsp;{{{dialing_codes}}} }}{{{dialing_codes_ref|}}} | geocode = | iso_code = | registration_plate_type = | registration_plate = | code1_name = [[ОКАТО]] код | code1_info = {{w-d|property|P721}} | code2_name = [[OKTMO]] код | code2_info = {{w-d|property|P764}} <!-- blank fields (section 1) --> | blank_name_sec1 = | blank_info_sec1 = | blank1_name_sec1 = | blank1_info_sec1 = | blank2_name_sec1 = | blank2_info_sec1 = <!-- etc., up to blank7_name_sec1 / blank7_info_sec1 --> <!-- blank fields (section 2) --> | blank_name_sec2 = | blank_info_sec2 = | blank1_name_sec2 = | blank1_info_sec2 = | blank2_name_sec2 = | blank2_info_sec2 = <!-- etc., up to blank7_name_sec2 / blank7_info_sec2 --> <!-- website, footnotes --> | website = {{#if: {{{website|}}} | {{URL|{{{website}}} }} }} | footnotes = | module = {{{embedded|{{{module|}}}}}} }}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox Dagestan inhabited locality with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox Dagestan inhabited locality]] with unknown parameter "_VALUE_"|ignoreblank=y| | abolished_date | abolished_date_ref | adm_city_jur | adm_city_jur_ref | adm_ctr_of | adm_ctr_of_ref | adm_ctr_of1 | adm_ctr_of1_ref | adm_ctr_of2 | adm_ctr_of2_ref | adm_district_jur | adm_district_jur_ref | adm_inhabloc_jur | adm_inhabloc_jur_ref | adm_selsoviet_jur | adm_selsoviet_jur_ref | adm_selsoviet_type | anthem | anthem_ref | area_km2 | area_km2_ref | capital_of | capital_of_ref | coa_caption | coordinates | current_cat_date | current_cat_date_ref | dialing_codes | dialing_codes_ref | elevation_footnotes | elevation_m | embedded | av_name | ethnicity | etymology | established_date | established_date_ref | established_title | federal_subject | federal_subject_ref | flag_border | flag_caption | image_caption | image_coa | image_flag | image_map | image_skyline | inhabloc_cat | inhabloc_cat_ref | inhabloc_type | inhabloc_type_ref | leader_name | leader_name_ref | leader_title | leader_title_ref | loc_lang1 | loc_lang2 | loc_lang3 | loc_lang4 | loc_name1 | loc_name2 | loc_name3 | loc_name4 | map_caption | map_label_position | module | mun_admctr_of | mun_admctr_of_ref | mun_admctr_of1 | mun_admctr_of1_ref | mun_admctr_of2 | mun_admctr_of2_ref | mun_district_jur | mun_district_jur_ref | other_lang | other_name | pop_2010census | pop_2010census_rank | pop_2010census_ref | pop_census | pop_census_rank | pop_census_ref | pop_density | pop_latest | pop_latest_date | pop_latest_ref | population_demonym | postal_codes | postal_codes_ref | prev_name1 | pushpin_map | pushpin_map_caption | pushpin_outside | representative_body | representative_body_ref | ru_name | rural_settlement_jur | rural_settlement_jur_ref | urban_okrug_jur | urban_okrug_jur_ref | urban_settlement_jur | urban_settlement_jur_ref | website |district_map |nickname | name}}<noinclude> {{Documentation}} </noinclude> s1s6mo9kc8j4oskc0x26omucfkj9sgt 102347 102346 2026-11-05T08:15:24Z M. Omarius 10562 102347 wikitext text/x-wiki {{ГӀБ инфобокс | name = {{{av_name|{{{av_name|{{PAGENAMEBASE}}}}}}}} | official_name = | native_name = {{{ru_name|{{{name|}}}}}} | native_name_lang = <!-- ISO 639-2 code e.g. "fr" for French. If more than one, use {{lang}} instead --> | other_name = | settlement_type = {{#if:{{{inhabloc_type|}}} | {{{inhabloc_type}}}{{{inhabloc_type_ref|}}} | {{#if: {{{inhabloc_cat|}}} | [[Россиялда чӀел-бакӀазул тайпаби|{{{inhabloc_cat}}}]]{{{inhabloc_cat_ref|}}} }} }}{{#if: {{{abolished_date|}}} | <br />(тӀагӀинабураб) }} <!-- transliteration(s) --> | translit_lang1 = {{#if: {{{loc_name1|}}} | Цогидал транскрипцияби }} | translit_lang1_type = {{{loc_lang1|}}} | translit_lang1_info = {{{loc_name1|}}} | translit_lang1_type1 = {{{loc_lang2|}}} | translit_lang1_info1 = {{{loc_name2|}}} | translit_lang1_type2 = {{{loc_lang3|}}} | translit_lang1_info2 = {{{loc_name3|}}} | translit_lang1_type3 = {{{loc_lang4|}}} | translit_lang1_info3 = {{{loc_name4|}}} | translit_lang1_type4 = | translit_lang1_info4 = <!-- etc., up to translit_lang1_type6 / translit_lang1_info6 --> | translit_lang2 = {{#if: {{{other_name|}}} | Цогидал }} | translit_lang2_type = {{{other_lang|}}} | translit_lang2_info = {{{other_name|}}} | translit_lang2_type1 = | translit_lang2_info1 = | translit_lang2_type2 = | translit_lang2_info2 = <!-- etc., up to translit_lang2_type6 / translit_lang2_info6 --> <!-- images, nickname, motto --> | image_skyline = {{{image_skyline|}}} | imagesize = | image_alt = | image_caption = {{{image_caption|}}} | image_flag = {{#if: {{{image_flag|}}} | {{{image_flag}}} | {{w-d|property|raw|P41}} }} | flag_size = 125px | flag_alt = {{{flag_caption|}}} | flag_border = {{{flag_border|}}} | flag_link = | image_seal = | seal_size = | seal_alt = | seal_link = | seal_type = | image_shield = {{#if: {{{image_coa|}}} | {{{image_coa|}}} | {{w-d|property|raw|P94}} }} | shield_size = 70px | shield_alt = {{{coa_caption|}}} | shield_link = | image_blank_emblem = | blank_emblem_type = <!-- defaults to Logo --> | blank_emblem_size = | blank_emblem_alt = | blank_emblem_link = | etymology = {{{etymology|}}} | nickname = {{{nickname|}}} | motto = | anthem = {{{anthem|}}}{{{anthem_ref|}}} <!-- maps and coordinates --> | image_map = {{{image_map|}}} | mapsize = | map_alt = | map_caption = {{{map_caption|}}} | image_map1 = {{#if: {{Infobox mapframe}} | {{hidden | header = {{{av_name|{{PAGENAMEBASE}}}}} бугеб мес| headercss=height:5px; | content = <div class="center" style="margin-top:1em">{{Infobox mapframe|area_km2={{#if: {{{area_km2|}}} | {{{area_km2}}} | {{w-d|property|raw|P2046}} }} }}</div>}} }} | mapsize1 = | map_alt1 = | map_caption1 = | pushpin_map = {{#if:{{{district_map|}}}|{{{district_map|}}}}}#Russia Dagestan#Russia | pushpin_label_position = {{{map_label_position|right}}}<!-- position of the pushpin label: left, right, top, bottom, none --> | pushpin_label = <!-- only necessary if "name" or "official_name" are too long --> | pushpin_map_alt = | pushpin_mapsize = | pushpin_relief = | pushpin_map_caption = {{{pushpin_map_caption|{{{av_name|{{PAGENAMEBASE}}}}} картаялда}}} | pushpin_outside = {{{pushpin_outside|}}} | coordinates = {{#if: {{{coordinates|}}} | {{{coordinates}}} | {{#if: {{w-d|property|P625}} | {{WikidataCoord|display=inline,title}} }} }} | coor_pinpoint = <!-- to specify exact location of coordinates (was coor_type) --> | coordinates_footnotes = <!-- for references: use <ref> tags --> | grid_name = <!-- name of a regional grid system --> | grid_position = <!-- position on the regional grid system --> <!-- location --> | subdivision_type = Пачалихъ | subdivision_name = [[Россия]] | subdivision_type1 = [[Россиялъул федералал субйектал|Республика]] | subdivision_name1 = [[Дагъистан]] | subdivision_type2 = [[Россиялъул районал|Адм. район]] | subdivision_name2 = {{{adm_district_jur|}}}{{{adm_district_jur_ref|}}} | subdivision_type3 = {{{adm_selsoviet_type|[[Росдал совет]]}}} | subdivision_name3 = {{{adm_selsoviet_jur|}}}<ref name="RDagestan_mun">{{cite web |url = https://docs.cntd.ru/document/802037479 |title = Закон Республики Дагестан от 13 января 2005 года № 6 «О статусе муниципальных образований Республики Дагестан» |trans-title=Дагъистаналъул Республикаялъул акт 2005 сонил 13 январалдаса N 6 «Дагъистаналъул Республикаялъул муниципалал гӀуцӀабазул статусалъул»|archive-url = https://web.archive.org/web/20220407093518/https://docs.cntd.ru/document/802037479 |archive-date = 2022-04-07 |access-date = 2022-06-20 }}</ref> | subdivision_type4 = | subdivision_name4 = | subdivision_type5 = | subdivision_name5 = | subdivision_type6 = | subdivision_name6 = <!-- established --> | established_title = {{#if: {{{established_title|}}} | {{{established_title}}} | КьучӀ лъей }} | established_date = {{#if: {{{established_date|}}} | {{{established_date}}}{{{established_date_ref|}}} | {{w-d|property|edit@end|P571}}{{w-d|reference|P571}} }} | established_title1 = {{{inhabloc_cat|Гьанжесеб}}} статус щвей | established_date1 = {{{current_cat_date|}}}{{{current_cat_date_ref|}}} | extinct_title = {{#if: {{{abolished_date|}}} | ТӀагӀинаби}} | extinct_date = {{{abolished_date|}}}{{{abolished_date_ref|}}} | founder = | named_for = <!-- seat, smaller parts --> | seat_type = <!-- defaults to: Seat --> | seat = | seat1_type = <!-- defaults to: Former seat --> | seat1 = | parts_type = <!-- defaults to: Boroughs --> | parts_style = <!-- list, coll (collapsed list), para (paragraph format) --> | parts = <!-- parts text, or header for parts list --> | p1 = | p2 = <!-- etc., up to p50: for separate parts to be listed--> <!-- government type, leaders --> | government_footnotes = <!-- for references: use <ref> tags --> | government_type = | governing_body = {{{representative_body|}}}{{{representative_body_ref|}}} | leader_party = | leader_title = {{#if:{{{leader_title|}}} | {{{leader_title}}}{{{leader_title_ref|}}} | БетӀер }} | leader_name = {{{leader_name|}}}{{{leader_name_ref|}}} | leader_title1 = | leader_name1 = <!-- etc., up to leader_title4 / leader_name4 --> <!-- display settings --> | total_type = <!-- to set a non-standard label for total area and population rows --> | unit_pref = <!-- enter: Imperial, to display imperial before metric --> <!-- area --> | area_footnotes = {{#if: {{{area_km2_ref|}}} | {{{area_km2_ref}}} }} | area_magnitude = <!-- use only to set a special wikilink --> | dunam_link = <!-- If dunams are used, this specifies which dunam to link. --> | area_total_km2 = {{#if: {{{area_km2|}}} | {{{area_km2}}} }} | area_total_sq_mi = <!-- see table @ Template:Infobox settlement for details --> | area_total_ha = | area_total_acre = | area_total_dunam = <!-- used in Middle East articles only --> | area_land_km2 = | area_land_sq_mi = | area_land_ha = | area_land_acre = | area_land_dunam = <!-- used in Middle East articles only --> | area_water_km2 = | area_water_sq_mi = | area_water_ha = | area_water_acre = | area_water_dunam = <!-- used in Middle East articles only --> | area_water_percent = | area_urban_footnotes = <!-- for references: use <ref> tags --> | area_urban_km2 = | area_urban_sq_mi = | area_urban_ha = | area_urban_acre = | area_urban_dunam = <!-- used in Middle East articles only --> | area_rural_footnotes = <!-- for references: use <ref> tags --> | area_rural_km2 = | area_rural_sq_mi = | area_rural_ha = | area_rural_acre = | area_rural_dunam = <!-- used in Middle East articles only --> | area_metro_footnotes = <!-- for references: use <ref> tags --> | area_metro_km2 = | area_metro_sq_mi = | area_metro_ha = | area_metro_acre = | area_metro_dunam = <!-- used in Middle East articles only --> | area_rank = | area_blank1_title = | area_blank1_km2 = | area_blank1_sq_mi = | area_blank1_ha = | area_blank1_acre = | area_blank1_dunam = <!-- used in Middle East articles only --> | area_blank2_title = | area_blank2_km2 = | area_blank2_sq_mi = | area_blank2_ha = | area_blank2_acre = | area_blank2_dunam = <!-- used in Middle East articles only --> | area_note = <!-- dimensions --> | dimensions_footnotes = <!-- for references: use <ref> tags --> | length_km = | length_mi = | width_km = | width_mi = <!-- elevation --> | elevation_footnotes = {{#if: {{{elevation_footnotes|}}} | {{{elevation_footnotes}}} | {{w-d|reference|P2044}} }} | elevation_m = {{#if: {{{elevation_m|}}} | {{{elevation_m}}} | {{w-d|property|raw|P2044}} }} | elevation_ft = | elevation_point = <!-- for denoting the measurement point --> | elevation_max_footnotes = <!-- for references: use <ref> tags --> | elevation_max_m = | elevation_max_ft = | elevation_max_point = <!-- for denoting the measurement point --> | elevation_max_rank = | elevation_min_footnotes = <!-- for references: use <ref> tags --> | elevation_min_m = | elevation_min_ft = | elevation_min_point = <!-- for denoting the measurement point --> | elevation_min_rank = <!-- population --> | population_as_of = {{#if: {{{pop_2021census|}}} | [[Russian Census (2021)|2021&nbsp;Census]] | {{#if: {{{pop_2010census|}}} | [[Russian Census (2010)|2010&nbsp;Census]] }}}} | population_footnotes = {{#if: {{{pop_2021census|}}} | {{#if: {{{pop_2021census_ref|}}} | {{{pop_2021census_ref}}} |<ref name="2021Census">{{ru-pop-ref|2021Census}}</ref> }} | {{#if: {{{pop_2010census|}}} | {{#if: {{{pop_2010census_ref|}}} | {{{pop_2010census_ref}}} |<ref name="2010Census">{{ru-pop-ref|2010Census}}</ref> }} }} }} | population_total = {{{pop_2021census|{{{pop_2010census|}}}}}} | pop_est_as_of = {{#if: <!-- wikidata pop as of 01.01.25 is set --> {{wikidata1|property|raw|P1082|P585=2025-01-01}} | 2025 | <!-- use template parameter --> {{#invoke:WikidataIB|getValue|P1082|{{{pop_latest_date|}}}|qual=P585|rank=best|fwd=ALL|qualsonly=true|noicon=true|list=p-1}} }} | pop_est_footnotes = {{#if: <!-- wikidata pop as of 01.01.25 is set --> {{wikidata1|property|raw|P1082|P585=2025-01-01}} | {{#if:{{wikidata1|reference|P1082|P585=2025-01-01}}|{{wikidata1|reference|P1082|P585=2025-01-01}}}} | <!-- use template parameter --> {{{pop_latest_ref|}}} }} | population_est = {{#if: {{#invoke:WikidataIB|getValue|P1082|{{{pop_latest|}}}|ps=3|list=p-1}} | {{#invoke:WikidataIB|getValue|P1082|{{{pop_latest|}}}|ps=3|list=p-1}} <!-- begin pct change -->{{#switch:{{{pop_2021census|{{{pop_2010census|}}}}}}|0|=|#default=({{#ifexpr: {{formatnum:{{{pop_2021census|{{{pop_2010census|}}}}}}|R}} < {{formatnum:{{#invoke:WikidataIB|getValue|P1082|{{{pop_latest|}}}|ps=3|list=p-1}}|R}}|{{#tag:span|+{{#expr: ( ( {{formatnum:{{#invoke:WikidataIB|getValue|P1082|{{{pop_latest|}}}|ps=3|list=p-1}}|R}} / {{formatnum:{{{pop_2021census|{{{pop_2010census|}}}}}}|R}} -1 ) round 3 ) *100 }}%|style="color:green;"}}|{{#tag:span|{{#expr: ( ( {{formatnum:{{#invoke:WikidataIB|getValue|P1082|{{{pop_latest|}}}|ps=3|list=p-1}}|R}} / {{formatnum:{{{pop_2021census|{{{pop_2010census|}}}}}}|R}} -1 ) round 3 ) *100 }}%|style="color:red;"}} }} }})<!-- end pct change --> | <!-- use template parameter --> {{{pop_latest|}}} }} | population_rank = {{#if: {{{pop_2021census_rank|{{{pop_2010census_rank|}}}}}} | [[List of cities and towns in Russia by population|{{{pop_2021census_rank|{{{pop_2010census_rank|}}}}}}]] {{#if: {{{pop_2021census_rank|}}} | in 2021| {{#if: {{{pop_2010census_rank|}}} | in 2010}}}}}} | population_density_km2 = {{If empty | {{{pop_density|}}} | auto }} | population_demonym = {{#if: {{{population_demonym|}}} | {{{population_demonym}}} | {{w-d|property|edit@end|P1549}} }} | population_note = {{#if: {{{ethnicity|}}}|({{{ethnicity|}}})}} <!-- demographics (section 1) --> | demographics_type1 = {{#ifexpr: {{#if: {{{adm_city_jur|}}} | 1 | 0 }} + {{#if: {{{capital_of|}}} | 1 | 0 }} + {{#if: {{{adm_ctr_of|}}} | 1 | 0 }} + {{#if: {{{adm_ctr_of1|}}} | 1 | 0 }} > 0 | <div style="text-align: center;">[[Россиялъул административияб рикьи|Административияб статус]]</div> }} | demographics1_footnotes = <!-- for references: use <ref> tags --> | demographics1_title1 = <span style="font-weight:normal;">Субординация</span> | demographics1_info1 = {{{adm_city_jur|{{{adm_inhabloc_jur|}}}}}}{{{adm_city_jur_ref|{{{adm_inhabloc_jur_ref|}}}}}} | demographics1_title2 = <span style="font-weight:normal;">{{#if: {{{adm_city_jur|{{{adm_inhabloc_jur|Шагьар}}}}}}|Тахшагьар|Центер}}</span> | demographics1_info2 = {{{capital_of|}}}{{{capital_of_ref|}}} | demographics1_title3 = <span style="font-weight:normal;">[[Административияб центер|Центер]]</span> | demographics1_info3 = {{{adm_ctr_of1|}}}{{#if: {{{adm_ctr_of2|}}}|,}}{{{adm_ctr_of1_ref|}}}<!-- -->{{#if: {{{adm_ctr_of2|}}} |&#32;{{{adm_ctr_of2|}}}{{{adm_ctr_of2_ref|}}} }}<!-- -->{{{adm_ctr_of|}}}{{{adm_ctr_of_ref|}}} | demographics1_title4 = | demographics1_info4 = <!-- etc., up to demographics1_title5 / demographics1_info5 --> <!-- demographics (section 2) --> | demographics_type2 = {{#ifexpr: {{#if: {{{mun_district_jur|}}} | 1 | 0 }} + {{#if: {{{urban_okrug_jur|}}} | 1 | 0 }} + {{#if: {{{urban_settlement_jur|}}} | 1 | 0 }} + {{#if: {{{mun_admctr_of|}}} | 1 | 0 }} + {{#if: {{{mun_admctr_of1|}}} | 1 | 0 }} > 0 | <div style="text-align: center;">[[Россиялъул административияб рикьи#Муниципалаб_рикьи|Муниципалаб статус]]</div> }} | demographics2_footnotes = <!-- for references: use <ref> tags --> | demographics2_title1 = {{#if: {{{mun_district_jur|}}} | <span style="font-weight:normal;">[[Россиялъул районал|Муниципалаб мухъ]]</span> }}<!-- -->{{#if: {{{urban_okrug_jur|}}} | <span style="font-weight:normal;">Шагьрияб округ</span> }} | demographics2_info1 = {{#if: {{{mun_district_jur|}}} | {{{mun_district_jur}}}{{{mun_district_jur_ref|<ref name="RDagestan_mun"/>}}} | {{#if: {{{urban_okrug_jur|}}} | {{{urban_okrug_jur}}}{{{urban_okrug_jur_ref|}}} }} }} | demographics2_title2 = <span style="font-weight:normal;">Шагьрияб чӀел</span> | demographics2_info2 = {{{urban_settlement_jur|}}}{{{urban_settlement_jur_ref|}}} | demographics2_title3 = <span style="font-weight:normal;">Росдалаб чӀел</span> | demographics2_info3 = {{{rural_settlement_jur|}}}{{{rural_settlement_jur_ref|}}} | demographics2_title4 = <span style="font-weight:normal;">[[Административияб центр|Центер]]</span> | demographics2_info4 = {{{mun_admctr_of|}}}{{{mun_admctr_of_ref|}}}<!-- -->{{{mun_admctr_of1|}}}{{#if: {{{mun_admctr_of2|}}} |,}}{{{mun_admctr_of1_ref|}}}<!-- -->{{#if: {{{mun_admctr_of2|}}} |&#32;{{{mun_admctr_of2|}}}{{{mun_admctr_of2_ref|}}} }} <!-- time zone(s) --> | timezone1 = {{Russia Time Zone Wikidata|timezone}} | utc_offset1 = {{Russia Time Zone Wikidata|utc_offset}} | timezone1_DST = | utc_offset1_DST = | timezone2 = | utc_offset2 = | timezone2_DST = | utc_offset2_DST = <!-- postal codes, area code --> | postal_code_type = [[Россиялда почалъул кодал|Почалъул индекс(ал)]]{{#if: {{{postal_codes|}}}{{w-d|properties|P281}} | {{#if: {{{postal_codes_ref|}}} | {{{postal_codes_ref}}} |<ref name="PostalCode">Почта России. Информационно-вычислительный центр ОАСУ РПО. (''Russian Post''). [http://vinfo.russianpost.ru/servlet/department Поиск объектов почтовой связи] (''Postal Objects Search'') {{in lang|ru}}</ref>}} }} | postal_code = {{#if: {{{postal_codes|}}} | {{{postal_codes|}}} | {{w-d|properties|edit@end|P281}} }} | postal2_code_type = <!-- enter ZIP Code, Postcode, Post code, Postal code... --> | postal2_code = | area_code_type = [[Россиялда телефоналъул кодал|Телефоналъул код(ал)]] | area_code = {{#if: {{{dialing_codes|}}} |+7&nbsp;{{{dialing_codes}}} }}{{{dialing_codes_ref|}}} | geocode = | iso_code = | registration_plate_type = | registration_plate = | code1_name = [[ОКАТО]] код | code1_info = {{w-d|property|P721}} | code2_name = [[OKTMO]] код | code2_info = {{w-d|property|P764}} <!-- blank fields (section 1) --> | blank_name_sec1 = | blank_info_sec1 = | blank1_name_sec1 = | blank1_info_sec1 = | blank2_name_sec1 = | blank2_info_sec1 = <!-- etc., up to blank7_name_sec1 / blank7_info_sec1 --> <!-- blank fields (section 2) --> | blank_name_sec2 = | blank_info_sec2 = | blank1_name_sec2 = | blank1_info_sec2 = | blank2_name_sec2 = | blank2_info_sec2 = <!-- etc., up to blank7_name_sec2 / blank7_info_sec2 --> <!-- website, footnotes --> | website = {{#if: {{{website|}}} | {{URL|{{{website}}} }} }} | footnotes = | module = {{{embedded|{{{module|}}}}}} }}{{#invoke:Check for unknown parameters|check|unknown={{main other|[[Category:Pages using infobox Dagestan inhabited locality with unknown parameters|_VALUE_{{PAGENAME}}]]}}|preview=Page using [[Template:Infobox Dagestan inhabited locality]] with unknown parameter "_VALUE_"|ignoreblank=y| | abolished_date | abolished_date_ref | adm_city_jur | adm_city_jur_ref | adm_ctr_of | adm_ctr_of_ref | adm_ctr_of1 | adm_ctr_of1_ref | adm_ctr_of2 | adm_ctr_of2_ref | adm_district_jur | adm_district_jur_ref | adm_inhabloc_jur | adm_inhabloc_jur_ref | adm_selsoviet_jur | adm_selsoviet_jur_ref | adm_selsoviet_type | anthem | anthem_ref | area_km2 | area_km2_ref | capital_of | capital_of_ref | coa_caption | coordinates | current_cat_date | current_cat_date_ref | dialing_codes | dialing_codes_ref | elevation_footnotes | elevation_m | embedded | av_name | ethnicity | etymology | established_date | established_date_ref | established_title | federal_subject | federal_subject_ref | flag_border | flag_caption | image_caption | image_coa | image_flag | image_map | image_skyline | inhabloc_cat | inhabloc_cat_ref | inhabloc_type | inhabloc_type_ref | leader_name | leader_name_ref | leader_title | leader_title_ref | loc_lang1 | loc_lang2 | loc_lang3 | loc_lang4 | loc_name1 | loc_name2 | loc_name3 | loc_name4 | map_caption | map_label_position | module | mun_admctr_of | mun_admctr_of_ref | mun_admctr_of1 | mun_admctr_of1_ref | mun_admctr_of2 | mun_admctr_of2_ref | mun_district_jur | mun_district_jur_ref | other_lang | other_name | pop_2010census | pop_2010census_rank | pop_2010census_ref | pop_census | pop_census_rank | pop_census_ref | pop_density | pop_latest | pop_latest_date | pop_latest_ref | population_demonym | postal_codes | postal_codes_ref | prev_name1 | pushpin_map | pushpin_map_caption | pushpin_outside | representative_body | representative_body_ref | ru_name | rural_settlement_jur | rural_settlement_jur_ref | urban_okrug_jur | urban_okrug_jur_ref | urban_settlement_jur | urban_settlement_jur_ref | website |district_map |nickname | name}}<noinclude> {{Documentation}} </noinclude> gr243npxkjdnvzimux7rwxq3db7dxdn Модуль:Complex date 828 22368 102350 2026-11-05T08:17:29Z M. Omarius 10562 Новая страница: «--[[ __ __ _ _ ____ _ _ | \/ | ___ __| |_ _| | ___ _ / ___|___ _ __ ___ _ __ | | _____ __ __| | __ _| |_ ___ | |\/| |/ _ \ / _` | | | | |/ _ (_) | / _ \| '_ ` _ \| '_ \| |/ _ \ \/ / / _` |/ _` | __/ _ \ | | | | (_) | (_| | |_| | | __/_| |__| (_) | | | | | | |_) | | __/> < | (_| | (_| | || __/ |_| |_|\___/ \__,_|\__,_|_|\___(_)\____\___/|_| |_| |_| .__/|_|\___/_/\_\ \__...» 102350 Scribunto text/plain --[[ __ __ _ _ ____ _ _ | \/ | ___ __| |_ _| | ___ _ / ___|___ _ __ ___ _ __ | | _____ __ __| | __ _| |_ ___ | |\/| |/ _ \ / _` | | | | |/ _ (_) | / _ \| '_ ` _ \| '_ \| |/ _ \ \/ / / _` |/ _` | __/ _ \ | | | | (_) | (_| | |_| | | __/_| |__| (_) | | | | | | |_) | | __/> < | (_| | (_| | || __/ |_| |_|\___/ \__,_|\__,_|_|\___(_)\____\___/|_| |_| |_| .__/|_|\___/_/\_\ \__,_|\__,_|\__\___| |_| This module is intended for creation of complex date phrases in variety of languages. Once deployed, please do not modify this code without applying the changes first at Module:Complex date/sandbox and testing at Module:Complex date/sandbox/testcases. Authors and maintainers: * User:Sn1per - first draft of the original version * User:Jarekt - corrections and expansion of the original version ]] -- List of external modules and functions local p = {Error = nil} local i18n = require('Module:i18n/complex date') -- used for translations of date related phrases local ISOdate = require('Module:ISOdate')._ISOdate -- used for parsing dates in YYYY-MM-DD and related formats local Calendar -- loaded lazily -- ================================================== -- === Internal functions =========================== -- ================================================== local function langSwitch(list,lang) local langList = mw.language.getFallbacksFor(lang) table.insert(langList,1,lang) table.insert(langList,math.max(#langList,2),'default') for i,language in ipairs(langList) do if list[language] then return list[language] end end end -- ================================================== local function formatnum1(numStr, lang) -- mostly require('Module:Formatnum').formatNum function used to translate a number to use different numeral characters, -- except that it it does not call that function unless the language is on the list "LList" local LList = {bn=1,bpy=1,kn=1,hi=1,mr=1,new=1,pa=1,gu=1,fa=1,glk=1,mzn=1,ur=1,ar=1,ckb=1,ks=1,lo=1,['or']=1,bo=1,['ml-old']=1,mn=1,te=1,th=1} if LList[lang] then -- call only when the language is on the list numStr = require('Module:Formatnum').formatNum(numStr, lang, 1) end return numStr end -- ================================================== local function getISODate(datestr, datetype, lang, num, case) -- translate dates in the format YYYY, YYYY-MM, and YYYY-MM-DD if not case and i18n.Translations[datetype] then -- look up the grammatical case needed and call ISOdate module local rec = langSwitch(i18n.Translations[datetype], lang) if type(rec)=='table' then case = rec.case[num] end end return ISOdate(datestr, lang, case, '', 1) end -- ======================================================================= local function translatePhrase(date1, date2, operation, lang, state) -- use tables in Module:i18n/complex date to translate a phrase if not i18n.Translations[operation] then p.Error = string.format('<span style="background-color:red;">Error in [[Module:Complex date]]: input parameter "%s" is not recognized.</span>', operation or 'nil') return '' end local dateStr = langSwitch(i18n.Translations[operation], lang) if type(dateStr)=='table' then dateStr = dateStr[1] end if type(dateStr)=='function' then local dateFunc = dateStr local nDates = i18n.Translations[operation]['nDates'] if nDates==2 then -- 2 date phrase dateStr = dateFunc(date1, date2, state) else -- 1 date phrase dateStr = dateFunc(date1, state) end end if type(dateStr)=='string' then -- replace parts of the string '$date1' and '$date2' with date1 and date2 strings dateStr = mw.ustring.gsub(dateStr, '$date1', date1) dateStr = mw.ustring.gsub(dateStr, '$date2', date2) else -- Special case of more complex phrases that can be build out of simple phrases -- If complex case is not translated to "lang" than build it out of simpler ones local x = dateStr dateStr = p._complex_date(x.conj, x.adj1, date1, x.units1, x.era1, x.adj2, date2, x.units2, x.era2, lang, 2) end return dateStr end -- ======================================================================= local function oneDatePhrase(dateStr, adj, era, units, lang, num, case, state) -- translate a single date phrase if num==2 then state.adj, state.era, state.units, state.precision = state.adj2, state.era2, state.units2, state.precision2 end -- dateStr can have many forms: ISO date, year or a number for -- decade, century or millennium if units == '' then -- unit is "year", "month", "day" dateStr = getISODate(dateStr, adj, lang, num, case) else -- units is "decade", "century", "millennium'' dateStr = translatePhrase(dateStr, '', units, lang, state) end -- add adjective ("early", "mid", etc.) or preposition ("before", "after", -- "circa", etc.) to the date if adj ~= '' then dateStr = translatePhrase(dateStr, '', adj, lang, state) else -- only era? dateStr = formatnum1(dateStr, lang) end -- add era if era ~= '' then dateStr = translatePhrase(dateStr, '', era, lang, state) end return dateStr end -- ======================================================================= local function twoDatePhrase(date1, date2, state, lang) -- translate a double date phrase local dateStr, case local era='' if state.era1 == state.era2 then -- if both eras are the same than add it only once era = state.era1 state.era1 = '' state.era2 = '' end case = {nil, nil} if i18n.Translations[state.conj] then local rec = langSwitch(i18n.Translations[state.conj], lang) if type(rec)=='table' then case = rec.case end end date1 = oneDatePhrase(date1, state.adj1, state.era1, state.units1, lang, 1, case[1], state) date2 = oneDatePhrase(date2, state.adj2, state.era2, state.units2, lang, 2, case[2], state) dateStr = translatePhrase(date1, date2, state.conj, lang, state) if era ~= '' then dateStr = translatePhrase(dateStr, '', era, lang, state) end return dateStr end -- ======================================================================= local function otherPhrases(date1, date2, operation, era, lang, state) -- translate specialized phrases local dateStr = '' if operation == 'islamic' then if date2=='' then date2 = mw.getCurrentFrame():callParserFunction('#time', 'xmY', date1) end date1 = getISODate(date1, operation, lang, 1, nil) date2 = getISODate(date2, operation, lang, 2, nil) if era == '' then era = 'ad' end dateStr = translatePhrase(date1, '', era, lang, state) .. ' (' .. translatePhrase(date2, '', 'ah', lang, state) .. ')' era = '' elseif operation == 'julian' then if not date2 and date1 then -- Convert from Julian to Gregorian calendar date if Calendar == nil then Calendar = require("Module:Calendar") -- lazy loding (only if needed) end local JDN = Calendar._date2jdn(date1, 0) if JDN then date2 = date1 -- first date is assumed to be Julian date1 = Calendar._jdn2date(JDN, 1) end end date1 = getISODate(date1, operation, lang, 1, nil) date2 = getISODate(date2, operation, lang, 2, nil) dateStr = translatePhrase(date1, date2, operation, lang, state) dateStr = mw.ustring.gsub(mw.ustring.gsub(dateStr, '%( ', '('), ' %)', ')') -- in case date2 is empty elseif operation == 'turn of the year' or operation == 'turn of the decade' or operation == 'turn of the century' then local dt = 1 if operation == 'turn of the decade' then dt=10 end if not date2 or date2=='' then date2=tostring(tonumber(date1)-dt) end if era~='bp' and era~='bc' then date1, date2 = date2, date1 end if operation == 'turn of the year' then date1 = ISOdate(date1, lang, '', '', 1) date2 = ISOdate(date2, lang, '', '', 1) else date1 = formatnum1(date1, lang) date2 = formatnum1(date2, lang) end dateStr = translatePhrase(date1, date2, operation, lang, state) elseif operation == 'year unknown' then dateStr = translatePhrase('', '', operation, lang, state) .. '<div style="display: none;">Unknown date</div>' elseif operation == 'unknown' then dateStr = tostring(mw.message.new( "exif-unknowndate" ):inLanguage( lang )) .. '<div style="display: none;">Unknown date</div>' end -- add era if era ~= '' then dateStr = translatePhrase(dateStr, '', era, lang, state) end return dateStr end -- ======================================================================= local function checkAliases(str1, str2, sType) -- some inputs have many aliases - reconcile them and ensure string is playing a proper role local out = '' if str1 and str1~='' then local a = i18n.Synonyms[str1] -- look up synonyms of "str1" if a then out = a[1] else p.Error = string.format('<span style="background-color:red;">Error in [[Module:Complex date]]: %s is not recognized.</span>', str1) end elseif str2 and str2~='' then -- if "str1" of type "sType" is empty than maybe ... local a = i18n.Synonyms[str2] -- ..."str2" is of the same type and is not empty if a and a[2]==sType then out = a[1] str2 = '' end end return out, str2 end -- ======================================================================= local function datePrecision(dateStr, units) -- "in this module "Units" is a string like millennium, century, or decade -- "precision" is wikibase compatible date precision number: 6=millennium, 7=century, 8=decade, 9=year, 10=month, 11=day -- based on string or numeric input calculate "Units" and "precision" local precision if type(units)=='number' then precision = units if precision>11 then precision=11 end -- clip the range of precision values if precision==6 then units='millennium' elseif precision==7 then units='century' elseif precision==8 then units='decade' else units = '' end elseif type(units)=='string' then units = string.lower(units) if units=='millennium' then precision=6 elseif units=='century' then precision=7 elseif units=='decade' then precision=8 else precision=9 end end if units=='' or precision==9 then local sLen = mw.ustring.len(dateStr) if sLen<= 4 then precision=9 elseif sLen== 7 then precision=10 elseif sLen>=10 then precision=11 end units='' end if precision==6 and dateStr.match( dateStr, '%d000' )~=nil then dateStr = tostring(math.floor(tonumber(dateStr)/1000) +1) elseif precision==7 and mw.ustring.match( dateStr, '%d%d00' )~=nil then dateStr = tostring(math.floor(tonumber(dateStr)/100) +1) end return dateStr, units, precision end -- ======================================================================= local function isodate2timestamp(dateStr, precision, era) -- convert date string to timestamps used by Quick Statements local tStamp = nil if era == 'ah' or precision<6 then return nil elseif era ~= '' then local eraLUT = {ad='+', bc='-', bp='-' } era = eraLUT[era] else era='+' end -- convert isodate to timestamp used by quick statements if precision>=9 then if string.match(dateStr,"^%d%d%d%d$") then -- if YYYY format tStamp = era .. dateStr .. '-00-00T00:00:00Z/9' elseif string.match(dateStr,"^%d%d%d%d%-%d%d$") then -- if YYYY-MM format tStamp = era .. dateStr .. '-00T00:00:00Z/10' elseif string.match(dateStr,"^%d%d%d%d%-%d%d%-%d%d$") then -- if YYYY-MM-DD format tStamp = era .. dateStr .. 'T00:00:00Z/11' end elseif precision==8 then -- decade tStamp = era .. dateStr .. '-00-00T00:00:00Z/8' elseif precision==7 then -- century local d = tostring(tonumber(dateStr)-1) tStamp = era .. d .. '50-00-00T00:00:00Z/7' elseif precision==6 then local d = tostring(tonumber(dateStr)-1) tStamp = era .. d .. '500-00-00T00:00:00Z/6' end return tStamp end -- ======================================================================= local function oneDateQScode(dateStr, adj, era, precision) -- create QuickStatements string for "one date" dates local outputStr = '' local d = isodate2timestamp(dateStr, precision, era) if not d then return '' end local rLUT = { early='Q40719727' , mid='Q40719748', late='Q40719766', ['1quarter']='Q40690303' , ['2quarter']='Q40719649' , ['3quarter']='Q40719662', ['4quarter']='Q40719674', spring='Q40720559' , summer='Q40720564' , autumn='Q40720568' , winter='Q40720553', firsthalf='Q40719687', secondhalf='Q40719707' } local qLUT = {['from']='P580', ['until']='P582', ['after']='P1319', ['before']='P1326', ['by']='P1326'} local refine = rLUT[adj] local qualitier = qLUT[adj] if adj=='' then outputStr = d elseif adj=='circa' then outputStr = d..",P1480,Q5727902" elseif refine then outputStr = d..",P4241,"..refine elseif precision>7 and qualitier then local century = string.gsub(d, 'Z%/%d+', 'Z/7') outputStr = century ..",".. qualitier ..","..d end return outputStr end -- ======================================================================= local function twoDateQScode(date1, date2, state) -- create QuickStatements string for "two date" dates if state.adj1~='' or state.adj2~='' or state.era1~=state.era2 then return '' -- QuickStatements string are not generated for two date phrases with adjectives end local outputStr = '' local d1 = isodate2timestamp(date1, state.precision1, state.era1) local d2 = isodate2timestamp(date2, state.precision2, state.era2) if (not d1) or (not d2) then return '' end -- find date with lower precision in common to both dates local cd local year1 = tonumber(string.sub(d1,2,5)) local year2 = tonumber(string.sub(d2,2,5)) local k = 0 for i = 1,10,1 do if string.sub(d1,1,i)==string.sub(d2,1,i) then k = i -- find last matching letter end end if k>=9 then -- same month, since "+YYYY-MM-" is in common cd = isodate2timestamp(string.sub(d1,2,8), 10, state.era1) elseif k>=6 and k<9 then -- same year, since "+YYYY-" is in common cd = isodate2timestamp(tostring(year1), 9, state.era1) elseif k==4 then -- same decade(k=4, precision=8), since "+YYY" is in common cd = isodate2timestamp(tostring(year1), 8, state.era1) elseif k==3 then -- same century(k=3, precision=7) since "+YY" is in common local d = tostring(math.floor(year1/100) +1) -- convert 1999 -> 20 cd = isodate2timestamp( d, 7, state.era1) elseif k==2 then -- same millennium (k=2, precision=6), since "+Y" is in common local d = tostring(math.floor(year1/1000) +1) -- convert 1999 -> 2 cd = isodate2timestamp( d, 6, state.era1) end if not cd then return '' end --if not cd then -- return ' <br/>error: ' .. d1.." / " .. d2.." / ".. (cd or '') .." / ".. string.sub(d1,2,5).." / " .. string.sub(d2,2,5).." / " .. tostring(k) --end -- if (state.conj=='from-until') or (state.conj=='and' and year1==year2-1) then outputStr = cd ..",P580,".. d1 ..",P582,".. d2 elseif (state.conj=='between') or (state.conj=='or' and year1==year2-1) then outputStr = cd ..",P1319,".. d1 ..",P1326,".. d2 elseif state.conj=='circa2' then outputStr = cd ..",P1319,".. d1 ..",P1326,".. d2 ..",P1480,Q5727902" end return outputStr end -- ======================================================================= local function processInputParams(conj, adj1, date1, units1, era1, adj2, date2, units2, era2, lang, passNr) -- process inputs and save date in state array local state = {} state.conj = string.lower(conj or '') state.adj1 = string.lower(adj1 or '') state.adj2 = string.lower(adj2 or '') state.era1 = string.lower(era1 or '') state.era2 = string.lower(era2 or '') state.units1 = string.lower(units1 or '') state.units2 = string.lower(units2 or '') -- if date 1 is missing but date 2 is provided than swap them if date1 == '' and date2 ~= '' then date1 = date2 date2 = '' state = {adj1 = state.adj2, era1 = state.era2, units1 = state.units2, adj2 = '', era2 = '', units2 = '', conj=state.conj, num=1} end if date2 ~= '' then state.nDates = 2 elseif date1 ~= '' then state.nDates = 1 else state.nDates = 0 end -- reconcile alternative names for text inputs local conj = checkAliases(state.conj ,'' ,'j') state.adj1 ,conj = checkAliases(state.adj1 ,conj,'a') state.units1,conj = checkAliases(state.units1,conj,'p') state.era1 ,conj = checkAliases(state.era1 ,conj,'e') state.special,conj = checkAliases('',conj,'c') state.adj2 = checkAliases(state.adj2 ,'','a') state.units2 = checkAliases(state.units2,'','p') state.era2 = checkAliases(state.era2 ,'','e') state.conj = conj state.lang = lang if p.Error~=nil then return nil end -- calculate date precision value date1, state.units1, state.precision1 = datePrecision(date1, state.units1) date2, state.units2, state.precision2 = datePrecision(date2, state.units2) -- Handle special cases -- Some complex phrases can be created out of simpler ones. Therefore on pass # 1 we try to create -- the phrase using complex phrase and if that is not found than on the second pass we try to build -- the phrase out of the simpler ones if passNr==1 then if state.adj1=='circa' and state.nDates == 2 then state.conj = 'circa2' state.adj1 = '' state.adj2 = '' end if state.nDates == 2 and state.adj1=='late' and state.adj2=='early' and state.conj=='and' and state.units1==state.units2 and state.era1==state.era2 then if state.units1=='century' then state.conj='turn of the century' elseif state.units1=='decade' then state.conj='turn of the decade' elseif state.units1=='' then state.conj='turn of the year' end state.adj1 = '' state.adj2 = '' state.units1 = '' state.units2 = '' end end state.adj, state.era, state.units, state.precision = state.adj1, state.era1, state.units1, state.precision1 return date1, date2, state end -- ================================================== -- === External functions =========================== -- ================================================== function p.Era(frame) -- process inputs local dateStr local args = frame.args if not (args.lang and mw.language.isSupportedLanguage(args.lang)) then args.lang = frame:callParserFunction( "int", "lang" ) -- get user's chosen language end local lang = args['lang'] local dateStr = args['date'] or '' local eraType = string.lower(args['era'] or '') dateStr = ISOdate(dateStr, lang, '', '', 1) if eraType then eraType = checkAliases(eraType ,'','e') dateStr = translatePhrase(dateStr, '', eraType, lang, {}) end return dateStr end -- ======================================================================= function p._complex_date(conj, adj1, date1, units1, era1, adj2, date2, units2, era2, lang, passNr) local Output='' local state -- process inputs and save date in state array date1, date2, state = processInputParams(conj, adj1, date1, units1, era1, adj2, date2, units2, era2, lang, passNr) if p.Error~=nil then return nil end local errorStr = string.format( '\n*conj=%s, adj1=%s, era1=%s, unit1=%s, prec1=%i, adj2=%s, era2=%s, unit2=%s, prec2=%i, special=%s', state.conj, state.adj1, state.era1, state.units1, state.precision1, state.adj2, state.era2, state.units2, state.precision2, state.special) -- call specialized functions local QScode = '' if state.special~='' then Output = otherPhrases(date1, date2, state.special, state.era1, lang, state) elseif state.conj~='' then QScode = twoDateQScode(date1, date2, state) Output = twoDatePhrase(date1, date2, state, lang) elseif state.adj1~='' or state.era1~='' or state.units1~='' then Output = oneDatePhrase(date1, state.adj1, state.era1, state.units1, lang, 1, nil, state) QScode = oneDateQScode(date1, state.adj1, state.era1, state.precision1) elseif date1~='' then Output = ISOdate(date1, lang, '', 'dtstart', '100-999') end if p.Error~=nil then return errorStr end -- if there is any wikicode in the string than execute it if mw.ustring.find(Output, '{') then Output = mw.getCurrentFrame():preprocess(Output) end if QScode and #QScode>0 then QScode = ' <div style="display: none;">date QS:P,' .. QScode .. '</div>' end return Output .. QScode end -- ======================================================================= function p._complex_date_cer(conj, adj1, date1, units1, era1, adj2, date2, units2, era2, certainty, lang) -- same as p._complex_date but with extra parameter for certainty: probably, possibly, presumably, etc. local dateStr = p._complex_date(conj, adj1, date1, units1, era1, adj2, date2, units2, era2, lang, 1) certainty = checkAliases(certainty, conj, 'r') local LUT = {probably='Q56644435', presumably='Q18122778', possibly='Q30230067', circa='Q5727902' } if certainty and LUT[certainty] then local state = {} date1, date2, state = processInputParams(conj, adj1, date1, units1, era1, adj2, date2, units2, era2, lang, 1) dateStr = translatePhrase(dateStr, '', certainty, lang, state) dateStr = string.gsub(dateStr, '(%<div style="display: none;"%>date QS:P,[^%<]+)(%</div%>)', '%1,P1480,' .. LUT[certainty] .. '%2' ) end return dateStr end -- ======================================================================= function p.complex_date(frame) -- process inputs local dateStr local args = frame.args if not (args.lang and mw.language.isSupportedLanguage(args.lang)) then args.lang = frame:callParserFunction( "int", "lang" ) -- get user's chosen language end local date1 = args['date1'] or args['2'] or args['date'] or '' local date2 = args['date2'] or args['3'] or '' local conj = args['conj'] or args['1'] or '' local adj1 = args['adj1'] or args['adj'] or '' local adj2 = args['adj2'] or '' local units1 = args['precision1'] or args['precision'] or '' local units2 = args['precision2'] or args['precision'] or '' local era1 = args['era1'] or args['era'] or '' local era2 = args['era2'] or args['era'] or '' local certainty = args['certainty'] local lang = args['lang'] dateStr = p._complex_date_cer(conj, adj1, date1, units1, era1, adj2, date2, units2, era2, certainty, lang) if p.Error~=nil then dateStr = p.Error .. '[[Category:Pages using Complex date template with incorrect parameter]]' end return dateStr end return p ppv1t08ydt8a9x36u2iltdsomq7mcr5 Модуль:I18n/complex date 828 22369 102351 2026-11-05T08:19:54Z M. Omarius 10562 Новая страница: «--[[ __ __ _ _ ___ _ ___ __ _ _ _ | \/ | ___ __| |_ _| | ___ _|_ _/ |( _ ) _ __ / /__ ___ _ __ ___ _ __ | | _____ __ __| | __ _| |_ ___ | |\/| |/ _ \ / _` | | | | |/ _ (_)| || |/ _ \| '_ \ / / __/ _ \| '_ ` _ \| '_ \| |/ _ \ \/ / / _` |/ _` | __/ _ \ | | | | (_) | (_| | |_| | | __/_ | || | (_) | | | |/ / (_| (_) | | | | | | |_) | | __/> < | (_| |...» 102351 Scribunto text/plain --[[ __ __ _ _ ___ _ ___ __ _ _ _ | \/ | ___ __| |_ _| | ___ _|_ _/ |( _ ) _ __ / /__ ___ _ __ ___ _ __ | | _____ __ __| | __ _| |_ ___ | |\/| |/ _ \ / _` | | | | |/ _ (_)| || |/ _ \| '_ \ / / __/ _ \| '_ ` _ \| '_ \| |/ _ \ \/ / / _` |/ _` | __/ _ \ | | | | (_) | (_| | |_| | | __/_ | || | (_) | | | |/ / (_| (_) | | | | | | |_) | | __/> < | (_| | (_| | || __/ |_| |_|\___/ \__,_|\__,_|_|\___(_)___|_|\___/|_| |_/_/ \___\___/|_| |_| |_| .__/|_|\___/_/\_\ \__,_|\__,_|\__\___| |_| This code was copied from Commons please request changes there. Maintainers: *Jarekt ]] local function Ordinal(...) return require('Module:Ordinal-cd')._Ordinal(...) end local function Roman(...) return require('Module:Roman-cd')._Numeral(...) end -- ========================================================================== -- === Local Helper functions ============================================== -- ========================================================================== -- form of French "of" based on "precision", which is wikibase compatible date precision format: -- 6=millennium, 7=century, 8=decade, 9=year, 10=month, 11=day -- 1 2 3 4 5 mill cent deca year month day local frOf = {'du','du','du','du','du', 'du', 'du', 'de', 'de', 'de', 'du'} local function decYear(state,lang,case) --Declension of word "year" in several languages if state.precision == 9 then yearCase = { fi={xxx='vuosien', gen='vuoden', ill='vuoteen', ptv='vuotta', ela='vuodesta', ine='vuonna'}, sl={insP='letoma', ins='letom', gen='leta', loc='letu'}, hsb={insP='lětami', ins='lětom', gen='lěta', loc='lěće'} } return yearCase[lang][case] .. ' ' else return '' end end local function decCentury(lang,case) --Declension of word "century" in several languages centuryCase = { pl={nom='wiek', gen='wieku', ins='wiekiem', loc='wieku', default = 'wiek'}, hsb={nom='lětstotk', gen='lětstotka', ins='lětstotkom', loc='lětstotku', default = 'lětstotk'} } return centuryCase[lang][case] or centuryCase[lang]['default'] end local function decMillennium(lang,case) --Declension of word "century" in several languages millenniumCase = { pl={nom='tysiąclecie', gen='tysiąclecia', ins='tysiącleciem', loc='tysiącleciu', default = 'tysiąclecie'}, hsb={nom='lěttysac', gen='lěttysaca', ins='lěttysacom', loc='lěttysacu', default = 'lěttysac'} } return millenniumCase[lang][case] or millenniumCase[lang]['default'] end -- ========================================================================== -- === Output data structure =============================================== -- ========================================================================== local p = {} --[[ Multiple formats are possible: 1) string with key words "$date1" and "$date2" which will be replaced later by the date strings 2) function which can be used to create output string * Function INPUTS: - date1 and date2 string with date strings. "$date1" and "$date2" can also be used which will be replaced latter - state is a table with full description of the phrase we are trying to construct. It includes state.precision1 (and 2) which is wikibase compatible date precision format: 6=millennium, 7=century, 8=decade, 9=year, 10=month, 11=day 3) table with following fields: * table[1] is either string or a function * table.case is a 2 element table with Grammatical cases used by given language to alter month name or other adjective related to date # 1 and 2 ]] p.Translations = { -- ========================================== -- === Two date phrases ===================== -- ========================================== ['from-until'] = { nDates = 2, ar='من $date1 إلى $date2', ['be-tarask']={'з $date1 да $date2', case={'gen','gen'}}, bn='$date1 থেকে $date2 পর্যন্ত', ca='$date1 fins $date2', ckb='لە $date1 تاوەکوو $date2', cs='$date1 až $date2', da='fra $date1 til $date2', de='$date1 bis $date2', el='από $date1 έως $date2', en='from $date1 until $date2', ['en-gb']='from $date1 until $date2', ['en-ca']='from $date1 until $date2', eo='de $date1 al $date2', es='de $date1 a $date2', et='$date1 kuni $date2', fa='از $date1 تا $date2', fi='$date1–$date2', -- välisenä aikana fr=function(date1, date2, state) -- could actually be better should be "d'octobre à mars 2013' not "de octore 2013 à mars 2013" if state.precision > 10 then -- precision > month return 'du $date1 au $date2' else -- "DE septebmbre" / "D'octobre" return require("Module:Linguistic").of(date1, 'fr') .. " à $date2" end end, gl='de $date1 a $date2', --Template:From until used 'desde $date1 ata $date2' he='מ- $date1 עד $date2', hr='od $date1 do $date2', hsb={'wot $date1 do $date2', case={'gen','gen'}}, hu='$date1 – $date2', it='dal $date1 al $date2', ja='$date1から$date2まで', mk='од $date1 до $date2', ml='$date1 മുതൽ $date2 വരെ', nb='fra $date1 til $date2', nds='$date1 bet $date2', nn='fra $date1 til $date2', nl='$date1 tot $date2', no='fra $date1 til $date2', pl={'od $date1 do $date2', case={'gen','gen'}}, ro='din $date1 până în $date2', pt='de $date1 a $date2', qu="$date1 p'unchawmanta $date2 p\'unchawkama", ru={'с $date1 по $date2', case={'gen','gen'}}, sk={'od $date1 do $date2', case={'gen','gen'}}, sl={'od $date1 do $date2', case={'gen','gen'}}, sv='från $date1 till $date2', uk={'з $date1 до $date2', case={'gen','gen'}}, ur='از $date1 تا $date2', vi='từ $date1 đến $date2', ['zh-hans']='从$date1到$date2', ['zh-hant']='從$date1到$date2', default='<span style="color:red">$date1 - $date2</span>', }, ['between']={ nDates = 2, ar='بين $date1 و $date2', ['be-tarask']={'між $date1 і $date2', case={'ins','ins'}}, bn='$date1 এবং $date2-এর মাঝামাঝি', ca='entre $date1 i $date2', ckb='لەنێوان $date1 و $date2', cs={'mezi $date1 a $date2', case={'ins','ins'}}, da='mellem $date1 og $date2', de='zwischen $date1 und $date2', el='μεταξύ $date1 και $date2', en='between $date1 and $date2', ['en-gb']='between $date1 and $date2', ['en-ca']='between $date1 and $date2', eo='inter $date1 kaj $date2', es='entre $date1 y $date2', et='$date1 ja $date2 vahel', fa='بین $date1 و $date2', fi={function(date1, date2, state) return decYear(state,'fi','xxx') .. '$date1 ja $date2 välisenä aikana' end, case={'gen','gen'}}, fr='entre $date1 et $date2', gl='entre $date1 e $date2', he='בין $date1 ו- $date2', hr='između $date1 i $date2', hsb={'mjez $date1 a $date2', case={'ins','ins'}}, hu='$date1 és $date2 között', hi='$date1 और $date2 के बीच', it='tra il $date1 e il $date2', ja='$date1と$date2の間', mk='помеѓу $date1 и $date2', ml='$date1, $date2 എന്നിവയ്ക്കിടയ്ക്ക്', nb='mellom $date1 og $date2', nds='twischen $date1 un $date2', nn='mellom $date1 og $date2', nl='tussen $date1 en $date2', no='mellom $date1 og $date2', pl={'między $date1 a $date2', case={'ins','ins'}}, ro='între $date1 și $date2', pt='entre $date1 e $date2', qu="$date1 p'unchawpa $date2 p'unchawpapas chawpin", ru={'между $date1 и $date2', case={'ins','ins'}}, sk={'medzi $date1 a $date2', case={'ins','ins'}}, sl={function(date1, date2, state) return 'med ' .. decYear(state,'sl','insP') .. '$date1 in $date2' end, case={'ins','ins'}}, sv='mellan $date1 och $date2', uk={'між $date1 та $date2', case={'ins','ins'}}, ur='بین $date1 و $date2', vec='tra el $date1 e el $date2', vi='giữa $date1 và $date2', ['zh-hans']='在$date1到$date2之间', ['zh-hant']='在$date1到$date2之間', default='<span style="color:red">$date1 - $date2</span>', }, ['or'] = { nDates = 2, ar='$date1 أو $date2', ['be-tarask']='$date1 ці $date2', bn='$date1 অথবা $date2', ca='$date1 o $date2', ckb='$date1 یان $date2', cs='$date1 nebo $date2', da='$date1 eller $date2', de='$date1 oder $date2', el='$date1 ή $date2', en='$date1 or $date2', ['en-gb']='$date1 or $date2', ['en-ca']='$date1 or $date2', eo='$date1 aŭ $date2', es='$date1 o $date2', et='$date1 või $date2', fa='$date1 یا $date2', fi='$date1 tai $date2', fr='$date1 ou $date2', gl='$date1 ou $date2', he='$date1 או $date2', hr='$date1 ili $date2', hsb='$date1 abo $date2', hu='$date1 vagy $date2', it='$date1 o $date2', ja='$date1または$date2', mk='$date1 или $date2', ml='$date1 അഥവാ $date2', nb='$date1 eller $date2', nn='$date1 eller $date2', nds='$date1 oder $date2', nl='$date1 of $date2', no='$date1 eller $date2', pl='$date1 lub $date2', pt='$date1 ou $date2', qu='$date1 icha $date2', ro='$date1 sau $date2', ru='$date1 или $date2', sk='$date1 alebo $date2', sl='$date1 ali $date2', sv='$date1 eller $date2', uk='$date1 або $date2', ur='$date1 یا $date2', th='$date1 หรือ $date2', vi='$date1 hoặc $date2', ['zh-hans']='$date1或$date2', ['zh-hant']='$date1或$date2', default=function(date1, date2, state) return require("Module:linguistic").conj({date1, date2}, state.lang, 'or') end, }, ['and'] = { nDates = 2, ar='$date1 و $date2', ['be-tarask']='$date1 і $date2', bn='$date1 এবং $date2', ca='$date1 i $date2', ckb='$date1 و $date2', cs='$date1 a $date2', da='$date1 og $date2', de='$date1 und $date2', el='$date1 και $date2', en='$date1 and $date2', ['en-gb']='$date1 and $date2', ['en-ca']='$date1 and $date2', eo='$date1 kaj $date2', es='$date1 y $date2', et='$date1 ja $date2', fa='$date1 و $date2', fi='$date1 ja $date2', fr='$date1 et $date2', gl='$date1 e $date2', he='$date1 ו- $date2', hu='$date1 és $date2', hsb='$date1 a $date2', it='$date1 e $date2', ja='$date1および$date2', mk='$date1 и $date2', ml='$date1 ഒപ്പം $date2', nb='$date1 og $date2', nn='$date1 og $date2', nds='$date1 un $date2', nl='$date1 en $date2', no='$date1 og $date2', pl='$date1 i $date2', pt='$date1 e $date2', qu='$date1wan $date2pas', ro='$date1 și $date2', ru='$date1 и $date2', sk='$date1 a $date2', sl='$date1 in $date2', sv='$date1 och $date2', uk='$date1 та $date2', ur='$date1 و $date2', vi='$date1 và $date2', ['zh-hans']='$date1和$date2', ['zh-hant']='$date1和$date2', default=function(date1, date2, state) return require("Module:linguistic").conj({date1, date2}, state.lang, 'and') end, }, -- ========================================== -- === Prepositions ========================= -- ========================================== ['by'] = { nDates = 1, ar='حوالي $date1', ['be-tarask']={'да $date1', case={'gen',''}}, bn='$date1 কর্তৃক', ca='vers $date1', ckb='نزیکی $date1', cs={'kolem $date1', case={'gen',''}}, da='mod $date1', de='spätestens $date1', el='έως $date1', en='by $date1', ['en-gb']='by $date1', ['en-ca']='by $date1', eo='ne post $date1', es='para $date1', et='hiljemalt $date1', fa='توسط $date1', fi={function(date1, state) return decYear(state,'fi','ill') .. '$date1 mennessä' end, case={'ill',''}}, fr='$date1 (au plus tard)', gl='cara a $date1', he='עד $date1', hr='do $date1', hsb={'do $date1', case={'gen',''}}, it='entro il $date1', ja='$date1まで', mk='кон $date1', ml='$date1-ൽ', nb='innen $date1', nn='innan $date1', nds='$date1 oder vördem al', nl='tegen $date1', no='innen $date1', pl={'przed $date1', case={'ins',''}}, pt='por $date1', qu="$date1 p'unchawkama", ro='de $date1', ru={'к $date1', case={'dat',''}}, sk={'okolo $date1', case={'gen',''}}, sl={function(date1, state) return 'najpozneje ' .. decYear(state,'sl','gen') .. ' $date1' end, case={'gen',''}}, sv='senast $date1', uk={'до $date1', case={'dat',''}}, ur='توسط $date1', vi='vào $date1', -- need to insert "đã" somewhere later in the sentence --> ['zh-hans']='$date1前后', ['zh-hant']='$date1前后', default='<span style="color:red">by $date1</span>', }, ['before'] = { nDates = 1, ar='قبل $date1', ['be-tarask']={'перад $date1', case={'ins',''}}, bn='$date1-এর আগে', bg='Преди $date1', ca='abans $date1', ckb='پێش $date1', cs={'před $date1', case={'ins',''}}, da='før $date1', de='vor $date1', el='πριν από $date1', en='before $date1', ['en-gb']='before $date1', ['en-ca']='before $date1', eo='antaŭ $date1', es='antes de $date1', et='enne $date1', fa='پیش از $date1', fi={function(date1, state) return 'ennen ' .. decYear(state,'fi','ptv') .. '$date1' end, case={'ptv',''}}, fr='avant $date1', gl='antes do $date1', he='לפני $date1', hr='prije $date1', hsb={'do $date1', case={'gen',''}}, hu='$date1 előtt', it='prima del $date1', ja='$date1より前', mk='пред $date1', ml='$date1-നു മുമ്പ്', nb='før $date1', nn='før $date1', nds='vör $date1', nl='voor $date1', no='før $date1', pl={'przed $date1', case={'ins',''}}, pt='antes de $date1', qu="$date1 p'unchaw ñawpan", ro='înainte de $date1', ru={'ранее $date1', case={'gen',''}}, sk={'pred $date1', case={'ins',''}}, sl={function(date1, state) return 'pred ' .. decYear(state,'sl','ins') .. ' $date1' end, case={'ins',''}}, sv='före $date1', uk={'до $date1', case={'gen',''}}, ur='قبل $date1', vi='trước $date1', ['zh-hans']='在$date1之前', ['zh-hant']='在$date1之前', default='<span style="color:red">before $date1</span>', }, ['from'] = { nDates = 1, ar='من $date1', ['be-tarask']={'з $date1', case={'gen',''}}, bn='$date1 থেকে', ckb='لە $date1', cs={'od $date1', case={'gen',''}}, de='Seit $date1', el='από $date1', en='from $date1', ['en-gb']='from $date1', ['en-ca']='from $date1', eo='ekde $date1', es='desde $date1', et='alates $date1', fa='از $date1', fi={function(date1, state) return decYear(state,'fi','ela') .. '$date1 alkaen' end, case={'ela',''}}, fr= function(date1, state) return 'à partir '.. frOf[state.precision] ..' $date1' end, gl='desde o $date1', he='מ- $date1', hr='od $date1', hsb={'wot $date1', case={'gen',''}}, it='dal $date1', ja='$date1から', nds='vonaf $date1', mk='од $date1', nb='fra $date1', nn='frå $date1', ml='$date1 മുതൽ', nl='vanaf $date1', no='fra $date1', pl={'od $date1', case={'gen',''}}, qu="$date1 p'unchawmanta", ro='din $date1', ru={'С $date1', case={'gen',''}}, sk={'od $date1', case={'gen',''}}, sl={function(date1, state) return 'od ' .. decYear(state,'sl','gen') .. ' $date1' end, case={'gen',''}}, sv='från $date1', uk={'з $date1', case={'gen',''}}, ur='از $date1', vi='từ $date1', ['zh-hans']='自$date1', ['zh-hant']='自$date1', default='<span style="color:red">from $date1</span>', }, ['until'] = { nDates = 1, ['be-tarask']={'усутыч да $date1', case={'gen',''}}, bn='$date1 পর্যন্ত', ckb='تاوەکوو $date1', cs={'do $date1', case={'gen', ''}}, de='bis $date1', en='until $date1', ['en-gb']='until $date1', ['en-ca']='until $date1', eo='ĝis $date1', es='hasta $date1', fr=function(date1, state) if state.precision > 10 then -- precision > month return "jusqu'au $date1" else return "jusqu'à $date1" end end, hr='do $date1', hsb={'do $date1', case={'gen',''}}, it='al $date1', nb='til $date1', nl='tot $date1', nn='til $date1', ml='$date1 വരെ', pl={'do $date1', case={'gen',''}}, ru={'вплоть до $date1', case={'gen',''}}, sk={'do $date1', case={'gen', ''}}, uk={'аж до $date1', case={'gen',''}}, ur='تک $date1', ['zh-hans']='直到$date1', ['zh-hant']='直到$date1', default='<span style="color:red">until $date1</span>', }, ['after'] = { nDates = 1, ar='بعد $date1', ['be-tarask']={'пасьля $date1', case={'gen',''}}, bn='$date1-এর পরে', ca='després de $date1', ckb='دوای $date1', cs={'po $date1', case={'loc',''}}, de='nach $date1', da='efter $date1', el='μετά από $date1', en='after $date1', ['en-gb']='after $date1', ['en-ca']='after $date1', eo='post $date1', es='después de $date1', et='pärast $date1', fa='پس از $date1', fi={function(date1, state) return decYear(state,'fi','gen') .. '$date1 jälkeen' end, case={'gen',''}}, fr='après $date1', gl='despois do $date1', he='לאחר $date1', hr='nakon $date1', hu='$date1 után', hsb={'po $date1', case={'loc',''}}, it='dopo il $date1', ja='$date1より後', mk='по $date1', ml='$date1-നു ശേഷം', nb='etter $date1', nn='etter $date1', nds='na $date1', nl='na $date1', no='etter $date1', pl={'po $date1', case={'loc',''}}, pt='após $date1', qu="$date1 p'unchaw qhipan", ro='după $date1', ru={'после $date1', case={'gen',''}}, sk={'po $date1', case={'loc',''}}, sl={function(date1, state) return 'po ' .. decYear(state,'sl','loc') .. ' $date1' end, case={'loc',''}}, sv='efter $date1', uk={'після $date1', case={'gen',''}}, ur='بعد $date1', vi='sau $date1', ['zh-hans']='在$date1之后', ['zh-hant']='在$date1之後', default='<span style="color:red">after $date1</span>', }, -- ========================================== -- === Adjectives =========================== -- ========================================== ['early'] = { nDates = 1, ar='بداية $date1', ['be-tarask']={'пачатак $date1', case={'gen',''}}, bn='$date1-এর শুরুতে', ca='al principi de $date1', ckb='سەرەتای $date1', cs={'začátek $date1', case={'gen',''}}, da='tidlig $date1', de='Anfang $date1', el='αρχές του $date1', en='early $date1', ['en-gb']='early $date1', ['en-ca']='early $date1', eo='komence de $date1', es='a principios de $date1', et='$date1 algus', fa='اوایل $date1', fi={function(date1, state) return decYear(state,'fi','gen') .. '$date1 alku' end, case={'gen',''}}, fr='début $date1', gl='a principios de $date1', he='תחילת $date1', hr='početak $date1', hsb={'spočatk $date1', case={'gen',''}}, hu='$date1 elején', it='inizio del $date1', ja='$date1初頭', mk='почеток на $date1', ml='$date1 ആദ്യപാദം', nb='tidlig $date1', nn='tidleg $date1', nds='Anfang $date1', nl='begin $date1', no='tidlig $date1', pl={'początek $date1', case={'gen',''}}, pt='a princípios de $date1', qu="$date1 ñawpaq p'unchawkunapi", ro='începând cu $date1', ru={'начало $date1', case={'gen',''}}, sk={'začiatok $date1', case={'gen',''}}, sl=function(date1, state)-- could actually be better should be "d'octobre à mars 2013' not "de octore 2013 à mars 2013" if state.precision == 9 then -- precision > month return 'zgodnje leto $date1' else -- "DE septebmbre" / "D'octobre" return 'zgodnji $date1' end end, sv='början av $date1', uk={'початок $date1', case={'gen',''}}, ur='ابتدا $date1', vi='đầu năm $date1', ['zh-hans']='$date1早期', ['zh-hant']='$date1早期', default='<span style="color:red">early $date1</span>', }, ['mid'] = { nDates = 1, ar='منتصف $date1', ['be-tarask']={'сярэдзіна $date1', case={'gen',''}}, bn='$date1-এর মাঝামাঝি', ca='a mitjan $date1', ckb='ناوەڕاستی $date1', cs={'polovina $date1', case={'gen',''}}, da='midten af $date1', de='Mitte $date1', el='μέσα του $date1', en='mid $date1', ['en-gb']='mid $date1', ['en-ca']='mid $date1', eo='meze de $date1', es='a mediados de $date1', et='$date1 keskel', fa='اواسط $date1', fi={function(date1, state) return decYear(state,'fi','gen') .. '$date1 puoliväli' end, case={'gen',''}}, fr='mi $date1', gl='a mediados de $date1', he='אמצע $date1', hr='sredina $date1', hsb={'srjedź $date1', case={'gen',''}}, hu='$date1 közepén', it='metà del $date1', ja='$date1半ば', mk='средина на $date1', ml='$date1 മദ്ധ്യം', nb='midten av $date1', nn='midten av $date1', nds='Midd $date1', nl='midden $date1', no='midten av $date1', pl={'środek $date1', case={'gen',''}}, pt='meados de $date1', qu="$date1 chawpin p'unchawkunapi", ro='mijlocul lui $date1', ru={'середина $date1', case={'gen',''}}, sk={'polovica $date1', case={'gen',''}}, sl={function(date1, state) return 'sredina ' .. decYear(state,'sl','gen') .. ' $date1' end, case={'gen',''}}, sv='mitten av $date1', uk={'середина $date1', case={'gen',''}}, ur='وسط $date1', vi='giữa năm $date1', ['zh-hans']='$date1中期', ['zh-hant']='$date1中期', default='<span style="color:red">mid $date1</span>', }, ['late'] = { nDates = 1, ar='نهاية $date1', bn='$date1-এর শেষে', ['be-tarask']={'канец $date1', case={'gen',''}}, ca='al final de $date1', ckb='کۆتاییی $date1', cs='konec $date1', da='sen $date1', de='Ende $date1', el='τέλη του $date1', en='late $date1', ['en-gb']='late $date1', ['en-ca']='late $date1', eo='fine de $date1', es='a fines de $date1', et='$date1 lõpp', fa='اواخر $date1', fi={function(date1, state) return decYear(state,'fi','gen') .. '$date1 loppu' end, case={'gen',''}}, fr='fin $date1', gl='a finais de $date1', he='סוף $date1', hr='kraj $date1', hsb={'kónc $date1', case={'gen',''}}, hu='$date1 végén', it='fine del $date1', ja='$date1末', mk='крајот на $date1', ml='$date1 അന്ത്യപാദം', nb='sent $date1', no='seint $date1', nds='Enn $date1', nl='eind $date1', no='sent $date1', pl={'koniec $date1', case={'gen',''}}, pt='ao final de $date1', qu="$date1 qhipaq p'unchawkunapi", ro='sfârșitul lui $date1', ru={'конец $date1', case={'gen',''}}, sk={'koniec $date1', case={'gen',''}}, sl={function(date1, state) return 'pozno ' .. decYear(state,'sl','gen') .. ' $date1' end, case={'gen',''}}, sv='slutet av $date1', uk={'кінець $date1', case={'gen',''}}, ur='اخیر $date1', vi='cuối năm $date1', ['zh-hans']='$date1晚期', ['zh-hant']='$date1晚期', default='<span style="color:red">late $date1</span>', }, ['circa'] = { nDates = 1, ar='حوالي $date1', ['be-tarask']={'каля $date1', case={'gen',''}}, bn='প্রায় $date1', ckb='بەنزیکی $date1', ca='cap a $date1', cs='cca $date1', da='ca. $date1', de='etwa $date1', el='περ. $date1', en='c. $date1', ['en-gb']='circa $date1', ['en-ca']='circa $date1', eo='ĉirkaŭ $date1', es='hacia $date1', -- suggestion use "hacia"/"hacia el" or leave the latin circa or ca. et='ca. $date1', fa='حوالی $date1', -- template:Circa used 'حدود $date1' fi={function(date1, state) return 'suunnilleen ' .. decYear(state,'fi','ine') .. '$date1' end, case={'ine',''}}, -- template:Circa used 'noin $date1' fr=function(date1, state) if state.precision >= 11 then -- precision >= day return 'vers le $date1' else return 'vers $date1' end end, gl='entre $date1', -- template:Circa used 'cara a $date1' he='בסביבות $date1', hr='oko $date1', hsb={'wokoło $date1', case={'gen',''}}, hu='$date1 körül', it='$date1 circa', ja='$date1頃', ko='$date1경', mk='~ $date1', -- template:Circa used 'o. $date1' ml= 'ഉദ്ദേശം $date1', nb='ca. $date1', nn='ca. $date1', nds='üm un bi $date1', nl='ca. $date1', no='ca. $date1', pl={'około $date1', case={'gen',''}}, pt='cerca de $date1', qu='$date1chá', ro='circa $date1', ru={'около $date1', case={'gen',''}}, sk='cca $date1', sl={function(date1, state) return 'ok. ' .. decYear(state,'sl','gen') .. ' $date1' end, case={'gen',''}}, sv='c:a $date1', -- template:Circa used 'ca $date1' uk={'близько $date1', case={'gen', ''}}, ur='قریباً $date1', vi='vào khoảng $date1', ['zh-hans']='约$date1', ['zh-hant']='約$date1', default='<span style="color:red">circa $date1</span>', }, ['uncertain'] = { nDates = 1, ['zh-hans']='$date1(?)', ['zh-hant']='$date1(?)', default='$date1 (?)', }, probably = { -- see Q56644435 nDates = 1, ast = 'probablemente $date1', bn = 'সম্ভবত $date1', ca = 'probablement $date1', ckb = 'لەوانەیە $date1', cs = 'pravděpodobně $date1', de = 'wahrscheinlich $date1', el = 'πιθανόν $date1', en = 'probably $date1', ['en-gb']='probably $date1', ['en-ca']='probably $date1', eo = 'probable $date1', es = 'probable $date1', fa = 'احتمالاً $date1', fr = 'probablement $date1', he = 'כפי הנראה $date1', hu = 'feltehetőleg $date1', it = 'probabile $date1', mk = 'веројатно $date1', ml = 'ഒരുപക്ഷേ $date1', nl = 'waarschijnlijk $date1', pl = 'prawdopodobnie $date1', pt = 'provavelmente $date1', ru = 'вероятно $date1', sv = 'antagligen $date1', uk = 'ймовірно $date1', default='<span style="color:red">probably $date1</span>', }, possibly = { -- see Q30230067 nDates = 1, ast = 'posiblemente $date1', bn = 'যথাসম্ভব $date1', ckb = 'لەوانەیە $date1', cs = 'možná $date1', de = 'möglicherweise $date1', en = 'possibly $date1', ['en-gb']='possibly $date1', ['en-ca']='possibly $date1', eo = 'eble $date1', el = 'πιθανόν $date1', fa = 'احتمالاً $date1', fr = 'peut-être $date1', hu = 'talán $date1', mk = 'можеби $date1', ml = 'മിക്കവാറും $date1', nl = 'mogelijk $date1', pl = 'być może $date1', pt = 'possivelmente $date1', ro = 'poate $date1', ru = 'возможно $date1', sv = 'möjligen $date1', uk = 'можливо $date1', default='<span style="color:red">possibly $date1</span>', }, presumably = { -- see Q18122778 nDates = 1, ast = 'presumiblemente $date1', ckb = 'دەشێت $date1', de = 'vermutlich $date1', en = 'presumably $date1', ['en-gb']='presumably $date1', ['en-ca']='presumably $date1', fr = 'présumé $date1', it = 'presumibilmente $date1', ml = 'ഊഹപ്രകാരം $date1', ru = 'предположительно $date1', pl = 'przypuszczalnie $date1', uk = 'здогадно $date1', default='<span style="color:red">presumably $date1</span>', }, ['year unknown']= { nDates = 0, ca='Any desconegut', ['be-tarask']='Год невядомы', bn='অজানা বছর', ckb='ساڵی نەزاندراو', cs='neznámý rok', de='Jahr unbekannt', el='άγνωστο έτος', en='year unknown', ['en-gb']='year unknown', ['en-ca']='year unknown', eo='jaro nesciata', es='Año desconocido', fa='سال نامعلوم', fi='tuntematon vuosi', fr='Année inconnue', he='שנה לא ידועה', hsb='lěto njeznate', hr='nepoznata godina', it='anno sconosciuto', ja='年代不明', la='Sine anno', ml='വർഷം ലഭ്യമല്ല', mk='непозната година', nb='ukjent år', nn='ukjent år', nl='zonder jaar', no='ukjent år', pl='rok nieznany', qu='Mana riqsisqa wata', ru='Год неизвестен', sk='neznámy rok', sl='neznano leto', sv='Okänt år', uk='рік невідомий', ur='سال نامعلوم', vi='không rõ năm', ['zh-hans']='年份未知', ['zh-hant']='年份未知', default='<span style="color:red">year unknown</span>', }, -- ========================================== -- === Parts of a whole ===================== -- ========================================== ['firsthalf'] = { nDates = 1, ar='النصف الأول من $date1', ['be-tarask']={'першая палова $date1', case={'gen',''}}, bn='$date1-এর প্রথমার্ধ', ca='1a meitat de $date1', ckb='نیوەی یەکەمی $date1', cs={'1. polovina $date1', case={'gen',''}}, da='1. halvdel af $date1', de='1. Hälfte $date1', el='πρώτο μισό του $date1', en='first half of $date1', ['en-gb']='first half of $date1', ['en-ca']='first half of $date1', eo='unua duono de $date1', es='primera mitad de $date1', et='$date1 esimene pool', fa='نیمهٔ نخست $date1', fi={function(date1, state) return decYear(state,'fi','gen') .. '$date1 alkupuolisko' end, case={'gen',''}}, fr='1<sup>re</sup> moitié de $date1', gl='primeira metade de $date1', he='במחצית הראשונה של $date1', hsb={'prěnja połojca $date1', case={'gen',''}}, hu='$date1 első felében', hr='prva polovina $date1', it='prima metà del $date1', ja='$date1上半期', mk='прва половина на $date1', ml='$date1 ആദ്യപകുതി', nb='første halvdel av $date1', nn='fyrste halvdelen av $date1', nds='1. Helft $date1', nl='eerste helft $date1', no='første halvdel av $date1', pl={'pierwsza połowa $date1', case={'gen',''}}, pt='primeira metade de $date1', qu='$date1 ñawpaq kuskanpi', ro='prima jumătate a lui $date1', ru={'первая половина $date1', case={'gen',''}}, sk={'1. polovica $date1', case={'gen',''}}, sl={function(date1, state) return 'prva polovica ' .. decYear(state,'sl','gen') .. ' $date1' end, case={'gen',''}}, sv='första halvan av $date1', uk={'перша половина $date1', case={'gen',''}}, ur='نصف اول $date1', vi='nửa đầu năm $date1', ['zh-hans']='$date1上半期', ['zh-hant']='$date1上半期', default='<span style="color:red">first half of $date1</span>', }, ['secondhalf'] = { nDates = 1, ar='النصف الثاني من $date1', ['be-tarask']={'другая палова $date1', case={'gen',''}}, bn='$date1-এর দ্বিতীয়ার্ধ', ca='2a meitat de $date1', ckb='نیوەی دووەمی $date1', cs={'2. polovina $date1', case={'gen',''}}, da='2. halvdel af $date1', de='2. Hälfte $date1', el='δεύτερο μισό του $date1', en='second half of $date1', ['en-gb']='second half of $date1', ['en-ca']='second half of $date1', eo='dua duono de $date1', es='segunda mitad de $date1', et='$date1 teine pool', fa='نیمهٔ دوم $date1', fi={function(date1, state) return decYear(state,'fi','gen') .. '$date1 loppupuolisko' end, case={'gen',''}}, fr='2<sup>e</sup> moitié de $date1', gl='segunda metade de $date1', he='במחצית השנייה של $date1', hsb={'druha połojca $date1', case={'gen',''}}, hr='druga polovina $date1', hu='$date1 második felében', it='seconda metà del $date1', ja='$date1下半期', mk='втора половина на $date1', ml='$date1 രണ്ടാം പകുതി', nb='andre halvdel av $date1', nn='andre halvdelen av $date1', nds='2. Helft vun $date1', nl='tweede helft $date1', no='andre halvdel av $date1', pl={'druga połowa $date1', case={'gen',''}}, pt='segunda metade de $date1', qu='$date1 qhipaq kuskanpi', ro='a doua jumătate a lui $date1', ru={'вторая половина $date1', case={'gen',''}}, sk={'2. polovica $date1', case={'gen',''}}, sl={'druga polovica {{IfNum | $date0 | leta}} $date1', case={'gen',''}}, sv='andra halvan av $date1', uk={'друга половина $date1', case={'gen',''}}, ur='نصف آخر $date1', vi='nửa cuối năm $date1', ['zh-hans']='$date1下半期', ['zh-hant']='$date1下半期', default='<span style="color:red">second half of $date1</span>', }, ['1quarter']= { nDates = 1, bn='$date1-এর প্রথম ত্রৈমাসিক', ['be-tarask']={'першая чвэрць $date1', case={'gen',''}}, ckb='چارەکی یەکەمی $date1', cs={'1. čtvrtina $date1', case={'gen',''}}, de='erstes Viertel $date1', en='first quarter of $date1', ['en-gb']='first quarter of $date1', ['en-ca']='first quarter of $date1', eo='unua kvarono de $date1', es='primer cuarto del $date1', fa='ربع نخست $date1', fi={function(date1, state) return decYear(state,'fi','gen') .. '$date1 ensimmäinen neljännes' end, case={'gen',''}}, fr= function(date1, state) return 'premier quart '.. frOf[state.precision] ..' $date1' end, he='רבעון ראשון של $date1', hsb={'prěnja štwórćina $date1', case={'gen',''}}, hr='prva četvrtina $date1', it='primo quarto del $date1', ja='$date1第1四半期', ml='$date1 ഒന്നാം ത്രൈമാസം', nb='første kvartal av $date1', nl='eerste kwart $date1', nn='fyrste kvartalet av $date1', no='første kvartal av $date1', pl={'pierwsza ćwiartka $date1', case={'gen',''}}, qu='$date1 ñawpaq ñiqin tawa phatmanpi', ru={'первая четверть $date1', case={'gen',''}}, sk={'1. štvrtina $date1', case={'gen',''}}, sl={'prva četrtina {{IfNum | $date0 | leta}} $date1', case={'gen',''}}, sl={function(date1, state) return 'prva četrtina ' .. decYear(state,'sl','gen') .. ' $date1' end, case={'gen',''}}, sv='första kvartalet av $date1', uk={'1-ша чверть $date1', case={'gen',''}}, ur='پہلی سہ ماہی $date1', vi='quý 1 năm $date1', ['zh-hans']='$date1第一季度', ['zh-hant']='$date1第一季度', default='<span style="color:red">first quarter of $date1</span>', }, ['2quarter']= { nDates = 1, ['be-tarask']={'другая чвэрць $date1', case={'gen',''}}, bn='$date1-এর দ্বিতীয় ত্রৈমাসিক', ckb='چارەکی دووەمی $date1', cs={'2. čtvrtina $date1', case={'gen',''}}, de='zweites Viertel $date1', en='second quarter of $date1', ['en-gb']='second quarter of $date1', ['en-ca']='second quarter of $date1', eo='dua kvarono de $date1', es='segundo cuarto del $date1', fa='ربع دوم $date1', fi={function(date1, state) return decYear(state,'fi','gen') .. '$date1 toinen neljännes' end, case={'gen',''}}, fr= function(date1, state) return 'deuxième quart '.. frOf[state.precision] ..' $date1' end, he='רבעון שני של $date1', hsb={'druha štwórćina $date1', case={'gen',''}}, hr='druga četvrtina $date1', it='secondo quarto del $date1', ja='$date1第2四半期', ml='$date1 രണ്ടാം ത്രൈമാസം', nb='andre kvartal av $date1', nl='tweede kwart $date1', nn='andre kvartalet av $date1', no='andre kvartal av $date1', pl={'druga ćwiartka $date1', case={'gen',''}}, qu='$date1 iskay ñiqin tawa phatmanpi', ru={'вторая четверть $date1', case={'gen',''}}, sk={'2. štvrtina $date1', case={'gen',''}}, sl={function(date1, state) return 'druga četrtina ' .. decYear(state,'sl','gen') .. ' $date1' end, case={'gen',''}}, sv='andra kvartalet av $date1', uk={'2-га чверть $date1', case={'gen',''}}, ur='دوسری سہ ماہی $date1', vi='quý 2 năm $date1', ['zh-hans']='$date1第二季度', ['zh-hant']='$date1第二季度', default='<span style="color:red">second quarter of $date1</span>', }, ['3quarter']= { nDates = 1, ['be-tarask']={'трэцяя чвэрць $date1', case={'gen',''}}, bn='$date1-এর তৃতীয় ত্রৈমাসিক', ckb='چارەکی سێیەمی $date1', cs={'3. čtvrtina $date1', case={'gen',''}}, de='drittes Viertel $date1', en='third quarter of $date1', ['en-gb']='third quarter of $date1', ['en-ca']='third quarter of $date1', eo='tria kvarono de $date1', es='tercer cuarto del $date1', fa='ربع سوم $date1', fi={function(date1, state) return decYear(state,'fi','gen') .. '$date1 kolmas neljännes' end, case={'gen',''}}, fr= function(date1, state) return 'troisième quart '.. frOf[state.precision] ..' $date1' end, he='רבעון שלישי של $date1', hsb={'třeća štwórćina $date1', case={'gen',''}}, hr='treća četvrtina $date1', it='terzo quarto del $date1', ja='$date1第3四半期', ml='$date1 മൂന്നാം ത്രൈമാസം', nb='tredje kvartal av $date1', nl='derde kwart $date1', nn='tredje kvartalet av $date1', no='tredje kvartal av $date1', pl={'trzecia ćwiartka $date1', case={'gen',''}}, qu='$date1 kimsa ñiqin tawa phatmanpi', sk={'3. štvrtina $date1', case={'gen',''}}, sl={function(date1, state) return 'tretja četrtina ' .. decYear(state,'sl','gen') .. ' $date1' end, case={'gen',''}}, ru={'третья четверть $date1', case={'gen',''}}, sv='tredje kvartalet av $date1', uk={'3-тя чверть $date1', case={'gen',''}}, ur='تیسری سہ ماہی $date1', vi='quý 3 năm $date1', ['zh-hans']='$date1第三季度', ['zh-hant']='$date1第三季度', default='<span style="color:red">third quarter of $date1</span>', }, ['4quarter']= { nDates = 1, ['be-tarask']={'чацьвёртая чвэрць $date1', case={'gen',''}}, bn='$date1-এর চতুর্থ ত্রৈমাসিক', ckb='چارەکی چوارەمی $date1', cs={'4. čtvrtina $date1', case={'gen',''}}, de='letztes Viertel $date1', en='fourth quarter of $date1', ['en-gb']='fourth quarter of $date1', ['en-ca']='fourth quarter of $date1', eo='kvara kvarono de $date1', es='último cuarto del $date1', fa='ربع چهارم $date1', fi={function(date1, state) return decYear(state,'fi','gen') .. '$date1 viimeinen neljännes' end, case={'gen',''}}, fr= function(date1, state) return 'quatrième quart '.. frOf[state.precision] ..' $date1' end, he='רבעון רביעי של $date1', hsb={'poslednja štwórćina $date1', case={'gen',''}}, hr='četvrta četvrtina $date1', it='quarto quarto del $date1', ja='$date1第4四半期', ml='$date1 നാലാം ത്രൈമാസം', nb='fjerde kvartal av $date1', nl='vierde kwart $date1', nn='tredje kvartalet av $date1', no='fjerde kvartal av $date1', pl={'czwarta ćwiartka $date1', case={'gen',''}}, qu='$date1 qhipaq ñiqin tawa phatmanpi', ru={'последняя четверть $date1', case={'gen',''}}, sk={'4. štvrtina $date1', case={'gen',''}}, sl={function(date1, state) return 'zadnja četrtina ' .. decYear(state,'sl','gen') .. ' $date1' end, case={'gen',''}}, sv='fjärde kvartalet av $date1', uk={'4-та чверть $date1', case={'gen',''}}, ur='چوتھی سہ ماہی $date1', vi='quý 4 năm $date1', ['zh-hans']='$date1第四季度', ['zh-hant']='$date1第四季度', default='<span style="color:red">forth quarter of $date1</span>', }, -- ========================================== -- === Seasons ============================== -- ========================================== ['spring'] = { nDates = 1, ar='ربيع $date1', ['be-tarask']='вясна $date1', bn='বসন্তকাল $date1', ca='primavera $date1', ckb='بەھاری $date1', cs={'jaro $date1', case={'gen', ''}}, da='Forår $date1', de='Frühling $date1', en='Spring $date1', ['en-gb']='Spring $date1', ['en-ca']='Spring $date1', eo='printempo $date1', es='primavera de $date1', et='$date1 kevad', fa='بهار $date1', fi='Kevät $date1', fr='printemps $date1', gl='primavera $date1', he='אביב $date1', hr='proljeće $date1', hsb='nalěćo $date1', hu='$date1 tavasza', it='primavera $date1', ja='{{#if:$date1|$date1年}}春', mk='пролет $date1', ml='$date1 വസന്തം', nb='våren $date1', nds='Vörjohr $date1', nn='våren $date1', nl='voorjaar $date1', no='våren $date1', pl='wiosna $date1', pt='primavera de $date1', ro='primăvara lui $date1', ru='весна $date1', sk={'jar $date1', case={'gen', ''}}, sl='pomlad $date1', sv='våren $date1', uk='весна $date1', ur='بہار $date1', vi='mùa đông năm $date1', ['zh-hans']='{{#if:$date1|$date1年}}春季', ['zh-hant']='{{#if:$date1|$date1年}}春季', default='<span style="color:red">Spring $date1</span>', }, ['summer'] = { nDates = 1, ar='صيف $date1', ['be-tarask']='лета $date1', bn='গ্রীষ্মকাল $date1', ca='estiu $date1', ckb='ھاوینی $date1', cs={'léto $date1', case={'gen', ''}}, da='Sommer $date1', de='Sommer $date1', en='Summer $date1', ['en-gb']='Summer $date1', ['en-ca']='Summer $date1', eo='somero $date1', es='verano de $date1', et='$date1 suvi', fa='تابستان $date1', fi='Kesä $date1', fr='été $date1', gl='verán $date1', he='קיץ $date1', hr='ljeto $date1', hsb='lěćo $date1', hu='$date1 nyara', it='estate $date1', ja='{{#if:$date1|$date1年}}夏', mk='лето $date1', ml='$date1 വേനൽ', nb='sommeren $date1', nds='Sommer $date1', nn='sumaren $date1', nl='zomer $date1', no='sommeren $date1', pl='lato $date1', pt='verão de $date1', ro='vara lui $date1', ru='лето $date1', sk={'leto $date1', case={'gen', ''}}, sl='poletje $date1', sv='sommaren $date1', uk='літо $date1', ur='گرما $date1', vi='mùa hè năm $date1', ['zh-hans']='{{#if:$date1|$date1年}}夏季', ['zh-hant']='{{#if:$date1|$date1年}}夏季', default='<span style="color:red">Summer $date1</span>', }, ['autumn'] = { nDates = 1, ar='خريف $date1', ['be-tarask']='восень $date1', bn='শরত্কাল $date1', ca='tardor $date1', ckb='پاییزی $date1', cs={'podzim $date1', case={'gen', ''}}, da='Efterår $date1', de='Herbst $date1', en='Autumn $date1', ['en-gb']='Autumn $date1', ['en-ca']='Autumn $date1', eo='aŭtuno $date1', es='otoño de $date1', et='$date1 sügis', fa='پاییز $date1', fi='Syksy $date1', fr='automne $date1', gl='outono $date1', he='סתיו $date1', hr='jesen $date1', hsb='nazyma $date1', hu='$date1 ősze', it='autunno $date1', ja='{{#if:$date1|$date1年}}秋', mk='есен $date1', ml='$date1 ശരത്കാലം', nb='høsten $date1', nds='Harvst $date1', nn='hausten $date1', nl='herfst $date1', no='høsten $date1', pl='jesień $date1', pt='outono de $date1', ro='toamna lui $date1', ru='осень $date1', sk={'jeseň $date1', case={'gen', ''}}, sl='jesen $date1', sv='hösten $date1', uk='осінь $date1', ur='خزاں $date1', vi='mùa thu năm $date1', ['zh-hans']='{{#if:$date1|$date1年}}秋季', ['zh-hant']='{{#if:$date1|$date1年}}秋季', default='<span style="color:red">Autumn $date1</span>', }, ['winter'] = { nDates = 1, ar='شتاء $date1', ['be-tarask']='зіма $date1', bn='শীতকাল $date1', ca='hivern $date1', ckb='زستانی $date1', cs={'zima $date1', case={'gen', ''}}, da='Vinter $date1', de='Winter $date1', en='Winter $date1', ['en-gb']='Winter $date1', ['en-ca']='Winter $date1', eo='vintro $date1', es='invierno de $date1', et='$date1 talv', fa='زمستان $date1', fi='Talvi $date1', fr='hiver $date1', gl='inverno $date1', he='חורף $date1', hr='zima $date1', hsb='zyma $date1', hu='$date1 tele', it='inverno $date1', ja='{{#if:$date1|$date1年}}冬', mk='зима $date1', ml='$date1 ശൈത്യകാലം', nds='Winter $date1', nl='winter $date1', nb='vinteren $date1', nn='vinteren $date1', no='vinteren $date1', pl='zima $date1', pt='inverno de $date1', ro='iarna lui $date1', ru='зима $date1', sk={'zima $date1', case={'gen', ''}}, sl='zima $date1', sv='vintern $date1', uk='зима $date1', ur='سرما $date1', vi='mùa đông năm $date1', ['zh-hans']='{{#if:$date1|$date1年}}冬季', ['zh-hant']='{{#if:$date1|$date1年}}冬季', default='<span style="color:red">Winter $date1</span>', }, -- ========================================== -- === Decade/Century/Millennium ============ -- ========================================== ['decade'] = { nDates = 1, ar='أعوام $date1', ['be-tarask']='$date1-я гады', bn='$date1-এর দশক', ca='dècada del $date1', ckb='دەیەی $date1', cs=function(date1, state) return ((date1 % 100 == 0) and 'první dekáda' or ((date1 % 100) .. '. léta')) .. ' ' .. (math.floor(date1 / 100) + 1) .. '. století' end, da="$date1'erne", de='$date1er-Jahre', el='δεκαετία του $date1', en='$date1s', ['en-gb']='$date1s', ['en-ca']='$date1s', eo='$date1-aj jaroj', es='años $date1', et='$date1ndad', fa='دههٔ $date1', fi='$date1-luvulla', fr='années $date1', gl='anos $date1', he='שנות ה-$date1', hr='$date1-ih', hsb='$date1te lěta', hu='$date1-s évek', it="{{#ifexpr: $date1 mod 100 = 0 | primo decennio del {{Roman|{{#expr: ($date1 / 100) + 1}}}} sec. | anni '{{#expr: $date1 mod 100 }} del {{Roman|{{#expr: floor($date1 / 100) + 1}}}} sec.}}", ja='$date1年代', mk='$date1-ти', ml='ദശകം $date1-ൽ', nb='$date1-årene', nn='$date1-åra', nds='Johren $date1', nl='jaren $date1', no='$date1-årene', pl=function(date1, state) local str = 'lata '..(date1 % 100)..'. ' if (date1 % 100 == 0) then str = 'pierwsza dekada ' elseif (date1 % 100 == 10) then str = 'druga dekada ' end return str .. Roman(math.floor(date1 / 100) + 1) .. ' wieku' end, pt='década de $date1', qu='$date1 watakuna', ro='anii $date1', ru='$date1-е годы', sk=function(date1, state) return ((date1 % 100 == 0) and 'prvé desaťročie' or ((date1 % 100) .. '. roky')) .. ' ' .. (math.floor(date1 / 100) + 1) .. '. storočia' end, sl='$date1-ta leta', sv='$date1-talet{{#switch:$date1|1300|1400|1500|1600|1700|1800|1900|2000|2100=&nbsp;(decennium)}}', uk='$date1-ті роки', ur='دہائی $date1', vi='thập niên $date1', ['zh-hans']='$date1年代', ['zh-hant']='$date1年代', default='<span style="color:red">$date1s</span>', }, ['century'] = { nDates = 1, ar='القرن $date1', ['be-tarask']=function(date1, state) return Ordinal(date1, 'be-tarask') .. ' стагодзьдзе' end, bn=function(date1, state) return Ordinal(date1, 'bn') .. ' শতাব্দী' end, ca='segle {{small-caps|{{lc:{{Roman year|$date1}}}}}}', ckb='سەدەی $date1', cs='$date1. století', da='$date1. århundrede', de='$date1. Jahrhundert', el='$date1ος αιώνας', en=function(date1, state) return Ordinal(date1, 'en') .. ' century' end, ['en-gb']=function(date1, state) return Ordinal(date1, 'en-gb') .. ' century' end, ['en-ca']=function(date1, state) return Ordinal(date1, 'en-ca') .. ' century' end, eo='$date1-a jarcento', es=function(date1, state) return 'siglo ' .. Roman(date1) end, et='$date1. sajand', fa='سدهٔ $date1', fi='{{#expr: ($date1 - 1) * 100}}-luvulla', fr=function(date1, state) return Ordinal(date1, 'fr', 'roman', 'm') .. ' siècle' end, gl=function(date1, state) return 'século ' .. Roman(date1) end, he='המאה ה-$date1', hr='$date1. stoljeće', hsb='$date1. lětstotk', hu='$date1. évszázad', it=function(date1, state) return Roman(date1) .. ' sec.' end, ja='$date1世紀', la='saeculum $date1', mk=function(date1, state) return Roman(date1) .. ' век' end, ml='$date1-ആം നൂറ്റാണ്ട്', nb=function(date1, state) return Ordinal(date1, 'nb') .. ' århundre' end, nn=function(date1, state) return 'det ' .. Ordinal(date1, 'no') .. ' århundre' end, nds='$date1. Johrhunnert', nl='$date1e eeuw', no=function(date1, state) return Ordinal(date1, 'no') .. ' århundre' end, pl=function(date1, state) return Roman(date1) .. ' ' .. decCentury('pl',state.case) end, pt=function(date1, state) return 'século ' .. Roman(date1) end, qu='$date1 ñiqin pachakwata', ro='secolul al $date1-lea', ru=function(date1, state) return Roman(date1) .. ' век' end, sk='$date1. storočie', sl=function(date1, state) return Ordinal(date1, 'sl') .. '. stoletje' end, sv='{{#expr:$date1 - 1}}00-talet', tt=function(date1, state) return Roman(date1) .. ' гасыр' end, uk=function(date1, state) return Roman(date1) .. ' ст.' end, ur='صدی $date1', vi='thế kỷ $date1', ['zh-hans']='$date1世纪', ['zh-hant']='$date1世紀', default='<span style="color:red">$date1 century</span>', }, ['millennium'] = { nDates = 1, ['be-tarask']=function(date1, state) return Ordinal(date1, 'be-tarask') .. ' тысячагодзьдзе' end, bn=function(date1, state) return Ordinal(date1, 'bn') .. ' সহস্রাব্দ' end, ckb=function(date1, state) return 'ھەزارەی ' .. Ordinal(date1, 'ckb') end, cs='$date1. tisíciletí', de='$date1. Jahrtausend', en=function(date1, state) return Ordinal(date1, 'en') .. ' millennium' end, ['en-gb']=function(date1, state) return Ordinal(date1, 'en-gb') .. ' millennium' end, ['en-ca']=function(date1, state) return Ordinal(date1, 'en-ca') .. ' millennium' end, eo='$date1-a jarmilo', es=function(date1, state) return Roman(date1) .. ' milenio' end, fa=function(date1, state) return 'هزارهٔ ' .. Ordinal(date1, 'fa') end, fr=function(date1, state) return Ordinal(date1, 'fr', 'roman', 'm') .. ' millénaire' end, hr='$date1. tisućljeće', hsb='$date1. lěttysac', it=function(date1, state) return Roman(date1) .. ' millennio' end, ja='$date1千年紀', la='millennium $date1', ml='$date1-മത്തെ സഹസ്രാബ്ദം', nb=function(date1, state) return Ordinal(date1, 'nb') .. ' årtusen' end, nn=function(date1, state) return Ordinal(date1, 'no') .. ' tusenår' end, nl='$date1e millennium', no=function(date1, state) return Ordinal(date1, 'no') .. ' årtusen' end, pl=function(date1, state) return Roman(date1) .. ' ' .. decMillennium('pl',state.case) end, pt=function(date1, state) return Roman(date1) .. ' milénio' end, qu='$date1 ñiqin waranqawata', ru=function(date1, state) return Roman(date1) .. ' тысячелетие' end, sk='$date1. tisícročie', sl=function(date1, state) return Ordinal(date1, 'sl') .. '. tisočletje' end, sv=function(date1, state) return Ordinal(date1, 'sv') .. ' årtusendet' end, uk=function(date1, state) return Roman(date1) .. ' тис.' end, ur=function(date1, state) return 'ہزارہ ' .. Ordinal(date1, 'ur') end, vi='thiên niên kỷ $date1', ['zh-hans']=function(date1, state) return Ordinal(date1, 'zh-hans') .. '千年' end, ['zh-hant']=function(date1, state) return Ordinal(date1, 'zh-hant') .. '千年' end, --default='{{Please translate|$date1 millennium|Module:I18n/complex date}}', default='<span style="color:red">$date1 millennium</span>', }, ['million'] = { ckb = '$date1 میلیۆن ساڵ', de = '$date1 Millionen Jahre', en = '$date1 million years', ['en-gb'] = '$date1 million years', ['en-ca'] = '$date1 million years', eo = '$date1 milionoj da jaroj', es = '$date1 millones de años', nl = '$date1e miljoen jaar', fr = '$date1 millions d’années', it = '$date1 milioni di anni', ml = function(date1, state) if date1 >= 10 then return (date1 / 10) .. ' കോടി വർഷങ്ങൾ' -- 100 lakh = 1 crore else return (date1 * 10) .. ' ലക്ഷം വർഷങ്ങൾ' end end, nb = '$date1 millioner år', nl = '$date1 miljoen jaar', nn = '$date1 millionar år', pl = '$date1 milionów lat', pt = '$date1 milhões de anos', ru = '$date1 миллиона лет', uk = '$date1 мільйони років', ur = '$date1 ملین سال', ['zh-hans'] = '$date1百万年', ['zh-hant'] = '$date1百万年', default='<span style="color:red">$date1 million years</span>', nDates = 1, }, ['billion'] = { ckb = '$date1 بیلیۆن ساڵ', de = '$date1 Milliarden Jahre', en = '$date1 billion years', ['en-gb'] = '$date1 billion years', ['en-ca'] = '$date1 billion years', es = '$date1 mil millones de años', nl = '$date1e miljard jaar', fr = '$date1 milliard d’années', it = '$date1 miliardi di anni', ml = function(date1, state) return (date1 * 10) .. ' കോടി വർഷങ്ങൾ' end, nb = '$date1 milliarder år', nl = '$date1 miljard jaar', nn = '$date1 milliardar år', pl = '$date1 miliardów lat', pt = '$date1 mil milhões de anos', ru = '$date1 миллиардов лет', uk = '$date1 мільярдів років', ur = '$date1 بلین سال', ['zh-hans'] = '$date1十亿年', ['zh-hant'] = '$date1十億年', default='<span style="color:red$date1 billion years</span>', nDates = 1, }, -- ========================================== -- === Complex phrases ====================== -- ========================================== -- Phrases which for some languages can be build out of simpler phrases -- Their "default" state, used when no translation in the requested language was found, returns a "state" like -- table which is used to call the function again and built the phrase out of simple phrases -- $date1 - original date - 1 -- $date2 - original date -- if era is BC than $date1 and $date2 are swapped ['turn of the century'] = { nDates = 2, ['be-tarask']=function(date1, date2, state) return 'канец ' .. Roman(date1) ..' — пачатак ' .. Roman(date2) ..' стагодзьдзя' end, bn=function(date1, date2, state) return '$date1/' .. Ordinal(date2, 'bn') .. ' শতাব্দীর পালাবদলে' end, ckb=function(date1, date2, state) return 'سەردەمی $date1/' .. Ordinal(date2, 'ckb') .. ' سەدە' end, cs='přelom $date1. a $date2. století', de=function(date1, date2, state) return 'Jahrhundertwende $date1/' .. Ordinal(date2, 'de') end, en=function(date1, date2, state) return 'turn of the $date1/' .. Ordinal(date2, 'en') .. ' century' end, ['en-gb']=function(date1, date2, state) return 'turn of the $date1/' .. Ordinal(date2, 'en-gb') .. ' century' end, ['en-ca']=function(date1, date2, state) return 'turn of the $date1/' .. Ordinal(date2, 'en-ca') .. ' century' end, eo='ŝanĝo de la $date1-a al la $date2-a jarcentoj', es=function(date1, date2, state) return 'hacia finales del siglo ' .. Roman(date1) .. ' y principios del siglo ' .. Roman(date2) .. '' end, fi='{{#expr: $date1 * 100-100}}-luvun loppu ja {{#expr: $date2 * 100-100}}-luvun alku', fr=function(date1, date2, state) return 'fin du ' .. Ordinal(date1, 'fr', 'roman', 'm') .. ' siècle / début du ' .. Ordinal(date2, 'fr', 'roman', 'm') end, hr='kraj $date1. i početak $date2. stoljeća', hsb=function(date1, date2, state) return 'přechod ' .. Roman(date1) ..' do ' .. Roman(date2) ..' lětstotka' end, it=function(date1, date2, state) return 'fine del ' .. Roman(date1) .. ' sec. e inizio del ' .. Roman(date2) .. ' sec.' end, ja='$date1世紀から$date2世紀への変わり目', ml='$date1 നൂറ്റാണ്ട് അവസാനവും $date2 നൂറ്റാണ്ട് ആദ്യവും', nb=function(date1, date2, state) return 'slutten av det ' .. Ordinal(date1, 'nb') .. ' århundre/begynnelsen av det ' .. Ordinal(date2, 'nb') .. ' århundre' end, nl=function(date1, date2, state) return 'eind $date1e/begin $date2e eeuw' end, nn=function(date1, date2, state) return 'slutten av det ' .. Ordinal(date1, 'nn') .. ' hundreåret/byrjinga av det ' .. Ordinal(date2, 'nn') .. ' hundreåret' end, pl=function(date1, date2, state) return 'przełom ' .. Roman(date1) ..' i ' .. Roman(date2) ..' wieku' end, qu="$date1 ñiqin waranqawatamanta $date2 ñiqin waranqawataman t'ikrasqanpi", ru=function(date1, date2, state) return 'конец ' .. Roman(date1) ..' — начало ' .. Roman(date2) ..' века' end, sk='prelom $date1. a $date2. storočia', sl=function(date1, date2, state) return 'pozno ' .. Ordinal(date1, 'sl') .. '. in zgodnje ' .. Ordinal(date2, 'sl') .. '. stoletje' end, sv=function(date1, date2, state) return '$date1/' .. Ordinal(date2, 'sv') .. ' årtusendets sekelskifte' end, uk=function(date1, date2, state) return 'кін. ' .. Roman(date1) ..' ст. — поч. ' .. Roman(date2) ..' ст.' end, vi='bước sang thế kỷ $date2', ['zh-hans']=function(date1, date2, state) return '$date1世纪末' .. Ordinal(date2, 'zh-hans') .. '世纪初' end, ['zh-hant']=function(date1, date2, state) return '$date1世紀末' .. Ordinal(date2, 'zh-hant') .. '世紀初' end, default=function(date1, date2, state) return {conj='and', adj1 = 'late', unit1='century', era1=state.era1, adj2 = 'early', unit2='century', era2=state.era2} end, }, -- $date1 - original date - 10 -- $date2 - original date -- if era is BC than $date1 and $date2 are swapped ['turn of the decade']={ nDates = 2, ['be-tarask']='канец $date1-х — пачатак $date2-х гг.', bn='$date1-এর দশকের শেষে এবং $date2-এর দশকের শুরুতে', cs=function(date1, date2, state) local decade1 = math.floor((date1 % 100) / 10) local decade2 = math.floor((date2 % 100) / 10) local century1 = math.floor( date1 / 100) + 1 local century2 = math.floor( date2 / 100) + 1 if decade1 == 0 and date1 < date2 then return "přelom 1. a 2. dekády " .. century1 .. ". století" elseif decade2 == 0 and date2 < date1 then return "přelom 9. a 10. dekády " .. century1 .. ". století" elseif (decade1 == 9 and date1 < date2) or (decade2 == 9 and date2 < date1) then return "přelom " .. century1 .. ". a " .. century2 .. ". století" else return "přelom " .. decade1 .. "0. a " .. decade2 .. "0. let " .. century1 .. ". století" end end, de='späte $date1er und frühe $date2er', ckb='کۆتایییەکانی $date1 و سەرەتاکانی $date2', en='late $date1s and early $date2s', ['en-gb']='late $date1s and early $date2s', ['en-ca']='late $date1s and early $date2s', eo='ŝanĝo de la $date1-a al la $date2-a jardekoj', es='finales de los años $date1 y principios de los años $date2', fa='اواخر دههٔ $date1 و اوایل دههٔ $date2', fi='$date1-luvun loppu ja $date2-luvun alku', fr='fin des années $date1 / début des années $date2', hr='kraj $date1-ih i početak $date2-ih', hsb='pózdnje $date1te a zažne $date2te lěta', it='fine degli anni $date1 / inizio degli anni $date2', ja='$date1年代末から$date2年代初頭', ml='$date1കൾ അവസാനവും $date2കൾ ആദ്യവും', nb = 'sent på $date1-tallet og tidlig på $date2-tallet', nl = 'eind $date1e/begin $date2e decennium', nn = 'seint på $date1-talet og tidleg på $date2-talet', pl=function(date1, date2, state) local decade1 = math.floor(date1 % 100) local decade2 = math.floor(date2 % 100) local century1 = Roman(math.floor( date1 / 100) + 1) local century2 = Roman(math.floor( date2 / 100) + 1) if decade1 == 0 and date1 < date2 then return "przełom pierwszej i drugiej dekady " .. century1 .. " wieku" elseif decade1 == 10 and date1 < date2 then return "przełom drugiej dekady i lat 20. " .. century1 .. " wieku" elseif decade1 == 90 and decade2 == 0 then return "przełom ostatniej dekady " .. century1 .. " i pierwszej dekady " .. century2 .. " wieku" else return "przełom lat " .. decade1 .. ". i " .. decade2 .. ". " .. century1 .. " wieku" end end, qu='qhipaq $date1 watakuna ñawpaq $date2 watakunapas', ru='конец $date1-х — начало $date2-х гг.', sv='sena $date1-talet och tidiga $date2-talet', sk=function(date1, date2, state) local decade1 = math.floor((date1 % 100) / 10) local decade2 = math.floor((date2 % 100) / 10) local century1 = math.floor( date1 / 100) + 1 local century2 = math.floor( date2 / 100) + 1 if decade1 == 0 and date1 < date2 then return "prelom 1. a 2. desaťročia " .. century1 .. ". storočia" elseif decade2 == 0 and date2 < date1 then return "prelom 9. a 10. desaťročia " .. century1 .. ". storočia" elseif (decade1 == 9 and date1 < date2) or (decade2 == 9 and date2 < date1) then return "prelom " .. century1 .. ". a " .. century2 .. ". storočia" else return "prelom " .. decade1 .. "0. a " .. decade2 .. "0. rokov " .. century1 .. ". storočia" end end, sl='pozna $date1-ta in zgodnja $date2-ta leta', uk='кінець $date1-х — початок $date2-х рр.', ur='اخیر دہائی $date1 و ابتدا دہائی $date2', vi='bước sang thập niên $date2', ['zh-hans']='$date1年代末$date2年代初', ['zh-hant']='$date1年代末$date2年代初', default=function(date1, date2, state) return {conj='and', adj1 = 'late', unit1='decade', era1=state.era1, adj2 = 'early', unit2='decade', era2=state.era2} end, }, -- $date1 - original date - 1 -- $date2 - original date -- if era is BC than $date1 and $date2 are swapped ['turn of the year']={ nDates = 2, ['be-tarask']='канец $date1 — пачатак $date2 г.', bn='$date1-এর শেষে এবং $date2-এর শুরুতে', ckb='کۆتاییی $date1 و سەرەتای $date2', cs='přelom roku $date1/$date2', de='Jahreswechsel $date1/$date2', en='late $date1 and early $date2', ['en-gb']='late $date1 and early $date2', ['en-ca']='late $date1 and early $date2', eo='jarŝanĝo $date1 / $date2', es='finales de $date1 y principios de $date2', fa='اواخر $date1 و اوایل $date2', fi='vuoden $date1 loppu ja vuoden $date2 alku', fr='fin $date1 / début $date2', hsb='kónc $date1/spočatk $date2', ja='$date1年末から$date2年初め', ml='$date1 അവസാനവും $date2 ആദ്യവും', nb='årsskiftet $date1/$date2', nl='eind $date1 en begin $date2', nn='årsskiftet $date1/$date2', pl='koniec $date1 i początek $date2 roku', qu="$date1 qhipaq p'unchawkuna $date2 ñawpaq p'unchawkunapas", ru='конец $date1 — начало $date2 г.', sk='prelom rokov $date1/$date2', sl='konec leta $date1 in začetek $date2', sv='sena $date1 och tidiga $date2', uk='кінець $date1 — початок $date2 р.', ur='اخیر $date1 و ابتدا $date2', vi='bước sang năm $date2', ['zh-hans']='$date1年末$date2年初', ['zh-hant']='$date1年末$date2年初', default=function(date1, date2, state) return {conj='and', adj1 = 'late', unit1='year', era1=state.era1, adj2 = 'early', unit2='year', era2=state.era2} end, }, ['circa2'] = { nDates = 2, ar='حوالي $date1 – $date2', ['be-tarask']={'прыкладна з $date1 да прыкладна $date2', case={'gen','gen'}}, bn='প্রায় $date1 এবং প্রায় $date2-এর মাঝামাঝি', ca='cap a $date1 o $date2', ckb='بە نزیکی لەنێوان $date1 و $date2', cs='cca $date1 až $date2', da='ca. mellem $date1 og $date2', de='etwa $date1 bis $date2', el='περίπου μεταξύ $date1 και $date2', en='between c. $date1 and c. $date2', ['en-gb']='between circa $date1 and circa $date2', ['en-ca']='between circa $date1 and circa $date2', eo='proksimume de $date1 ĝis $date2', es='hacia $date1 o $date2', et='ca. $date1 ja $date2 vahel', fa='حدوداً بین $date1 و $date2', fi={function(date1, date2, state) return 'suunnilleen ' .. decYear(state,'fi','xxx') .. '$date1 ja $date2 välisenä aikana' end, case={'gen','gen'}}, fr='vers $date1-$date2', gl='entre $date1 e $date2', he='בסביבות ה- $date1 עד $date2', hr='oko između $date1 i $date2', hsb={'wot něhdźe $date1 do něhdźe $date2', case={'gen','gen'}}, hu='$date1 és $date2 között', it='tra il $date1 e il $date2 circa', ja='$date1頃と$date2頃の間', mk='~ помеѓу $date1 и $date2', ml='ഉദ്ദേശം $date1-നും ഉദ്ദേശം $date2-നും ഇടയ്ക്ക്', nb='ca. mellom $date1 og $date2', nn='ca. mellom $date1 og $date2', nds='üm un bi $date1 bet $date2', nl='ca. $date1 tot $date2', no='ca. mellom $date1 og $date2', pl={'od około $date1 do około $date2', case={'gen','gen'}}, pt='cerca de $date1 a $date2', qu="$date1 p'unchawmantachá $date2 p'unchawkamachá", ro='circa $date1 – $date2', ru={'с около $date1 до, примерно, $date2', case={'gen','gen'}}, sk='cca $date1 až $date2', sl={function(date1, date2, state) return 'ok. ' .. decYear(state,'sl','gen') .. ' $date1 do $date2' end, case={'gen','gen'}}, sv='c:a $date1 till $date2', uk={'з близько $date1 до, приблизно, $date2', case={'gen','gen'}}, ur='قریباً بین $date1 و $date2', vi='giữa vào khoảng $date1 và vào khoảng $date2', ['zh-hans']='约$date1~$date2间', ['zh-hant']='約$date1~$date2間', default=function(date1, date2, state) return {conj='between', adj1 = 'circa', unit1=state.unit1, era1=state.era1, adj2 = 'circa', unit2=state.unit2, era2=state.era2} end, }, -- ========================================== -- === Eras and calendars =================== -- ========================================== ['julian'] = { nDates = 2, ar='$date1 ($date2 حسب [[w:ar:التقويم اليولياني|تقويم يولياني]])', ['be-tarask']='$date1 ($date2 паводле [[w:be-tarask:Юліянскі каляндар|ст. ст.]]', bn='$date1 (জুলিয়ান ক্যালেন্ডারে $date2)', ca='$date1 ($date2 segons el [[w:ca:Calendari julià|calendari julià]])', ckb='$date1 ($date2 بەپێی [[w:ڕۆژژمێری جولیانی|ڕۆژژمێری جولیانی]])', cs='$date1 ($date2 podle [[w:cs:Juliánský kalendář|juliánského kalendáře]])', da='$date1 ($date2 [[w:da:Julianske kalender|Julianske kalender]])', de='$date1 ($date2 [[w:de:Julianischer Kalender|Julianischer Kalender]])', el='$date1 ($date2 με το [[w:el:Ιουλιανό ημερολόγιο|Ιουλιανό ημερολόγιο]])', en='$date1 ($date2 in [[w:Old Style and New Style dates|Julian calendar]])', ['en-gb']='$date1 ($date2 in [[w:Old Style and New Style dates|Julian calendar]])', ['en-ca']='$date1 ($date2 in [[w:Old Style and New Style dates|Julian calendar]])', fa='$date1 ($date2 در [[w:fa:Old Style and New Style dates|تقویم جولیان]])', eo='$date1 ($date2 laŭ la [[w:eo:Julia kalendaro|Julia Kalendaro]])', es='$date1 ($date2 según el [[w:es:Calendario juliano|calendario juliano]])', et='$date1 ($date2 [[w:et:Juliuse kalender|Juliuse kalendris]])', fi='$date1 ($date2 [[w:fi:juliaaninen kalenteri|juliaanisen kalenterin]] mukaan)', fr='$date1 ($date2 dans le [[w:fr:calendrier julien|calendrier julien]])', gl='$date1 ($date2 segundo o [[w:gl:Calendario xuliano|calendario xuliano]])', hu='$date1 ($date2 a [[w:hu:Julianus-naptár|Julián naptárban]])', hr='$date1 ($date2 prema [[w:hr:Julijanski kalendar|julijanskom kalendaru]])', he='$date1 ($date2 ב[[w:he:לוח היוליאני|הלוח היוליאני]])', hsb='$date1 ($date2 po julianiskej protyce)', it='$date1 ($date2 secondo il [[w:it:Calendario giuliano|calendario giuliano]])', ja='$date1([[w:ja:ユリウス暦|ユリウス暦]] $date2)', mk='$date1 ($date2 по [[w:mk:Јулијански календар|Јулијанскиот календар]])', ml='$date1 ([[w:ml:ജൂലിയൻ കാലഗണനാരീതി|ജൂലിയൻ വർഷത്തിൽ]] $date2)', ml='$date1 ([[w:Old Style and New Style dates|ജൂലിയൻ കാലഗണനാരീതിയിൽ]] $date2)', nds='$date1 ($date2 na’n [[w:nds:Juliaansch Klenner|Juliaanschen Klenner]])', nb='$date1 ($date2 etter [[w:no:Juliansk kalender|den julianske kalenderen]])', nn='$date1 ($date2 etter [[w:no:Juliansk kalender|den julianske kalenderen]])', nl='$date1 ($date2 volgens de [[w:nl:Juliaanse kalender|Juliaanse kalender]])', no='$date1 ($date2 etter [[w:no:Juliansk kalender|den julianske kalender]])', pl='$date1 ($date2 wedle [[w:pl:Daty nowego i starego porządku|kalendarza juliańskiego]])', pt='$date1 ($date2 no [[w:pt:Mudança para o calendário gregoriano|calendário juliano]])', qu='$date1 ($date2 [[w:qu:Hulyanu kalindaryu|Hulyanu kalindaryupi]])', ro='$date1 ($date2 în [[w:ro:calendarul iulian|calendarul iulian]])', ru='$date1 ($date2 [[w:ru:Юлианский календарь|по ст. ст.]])', sk='$date1 ($date2 podľa [[w:sk:Juliánsky kalendár|juliánskeho kalendára]])', sl='$date1 ($date2 po [[w:sl:Julijanski koledar|julijanskem koledarju]])', sv='$date1 ($date2 [[w:sv:Gamla stilen|gamla stilen]])', uk='$date1 ($date2 [[w:uk:Юліанський календар|Юліанський календар]])', ur='$date1 ($date2 حسب [[w:ur:نئے اور پانے انداز کی تاریخ|جولین تقویم]])', vi='$date1 ($date2 trong [[w:vi:Lịch Julius|lịch Juliêng]])', ['zh-hans']='$date1([[w:Old Style and New Style dates|格里历]]$date2)', ['zh-hant']='$date1([[w:Old Style and New Style dates|格里曆]]$date2)', default='<span style="color:red">$date1 ($date2 in [[w:Old Style and New Style dates|Julian calendar]])</span>', }, ['ad'] = { nDates = 1, ['be-tarask']='$date1 [[w:be-tarask:ад Нараджэньня Хрыста|пасьля Н. Х.]]', bn ='$date1 খ্রিস্টাব্দ', ca ='$date1 dC', ckb ='$date1 [[w:ckb:ئانۆ دۆمینی|پاز]]', cs ='$date1 n. l.', de ='$date1 n. Chr.', el ='$date1 μ.Χ.', en ='$date1 [[w:en:Anno Domini|AD]]', ['en-gb'] ='$date1 [[w:en:Anno Domini|AD]]', ['en-ca'] ='$date1 [[w:en:Anno Domini|AD]]', eo ='$date1 pK', es ='$date1 [[w:es:Anno Dómini|d. C.]]', fa ='$date1 م.', fi ='$date1 jaa.', fr ='$date1 ap. J.-C.', gl ='$date1 d.C.', he ='$date1 לספירה', hu ='i. sz. $date1', hr ='$date1 p. Kr.', hsb='$date1 po Chr.', it ='$date1 d.C.', ja ='西暦$date1', mk ='$date1 н.е.', ml ='ക്രി.വ. $date1', nb ='$date1 e.Kr.', nl ='$date1 n.Chr.', nn ='$date1 e.Kr.', no ='$date1 e.Kr.', pl ='$date1 [[w:pl:naszej ery|n.e.]]', ro ='$date1 d.Hr.', ru ='$date1 н. э.', sk ='$date1 po Kr.', sl ='$date1 n. št.', sv ='$date1 [[w:sv:Efter Kristus|e.Kr.]]', uk ='$date1 н. е.', ur ='$date1 ء', vi ='$date1 [[w:vi:Công Nguyên|CN]]', ['zh-hans'] ='[[w:zh:基督纪年|公元]]$date1', ['zh-hant'] ='[[w:zh:基督纪年|公元]]$date1', default='<span style="color:red">$date1 [[w:en:Anno Domini|AD]]</span>', }, ['ah'] = { nDates = 1, ['be-tarask']='$date1 [[w:be-tarask:Ісламскі каляндар|хіджры]]', bn ='$date1 [[w:bn:ইসলামি বর্ষপঞ্জি|হিজরী]]', ckb ='$date1 [[w:ckb:ساڵی کۆچی|سک]]', cs ='$date1 [[w:cs:Anno Hegirae|AH]]', en ='$date1 [[w:en:Hijri year|AH]]', ['en-gb'] ='$date1 [[w:en:Hijri year|AH]]', ['en-ca'] ='$date1 [[w:en:Hijri year|AH]]', eo ='$date1 post la [[w:eo:Heĝiro|Heĝiro]]', fa ='$date1 ه.ق.', fr ='$date1 [[w:fr:Calendrier musulman|A.H.]]', he ="$date1 [[w:he:הלוח המוסלמי|להג'רה]]", hr ='$date1 god. hidžre', ja ='[[w:ja:ヒジュラ暦|ヒジュラ暦]]$date1', ml ='$date1 [[w:ml:ഇസ്‌ലാമിക കലണ്ടർ|ഹിജ്റ]]', nb ='$date1 [[w:no:Den muslimske kalenderen|A.H.]]', nn ='$date1 [[w:nn:Den muslimske kalenderen|A.H.]]', pl ='$date1 [[w:pl:Kalendarz muzułmański|A.H.]]', ru ='$date1 [[w:ru:Исламский календарь|хиджры]]', sk ='$date1 [[w:sk:A. H.|A. H.]]', sv ='$date1 [[w:sv:Muslimska kalendern|A.H.]]', uk ='$date1 [[w:uk:Мусульманський календар|хіджри]]', ur ='$date1 ھ', vi ='$date1 [[w:vi:Lịch Hồi giáo|AH]]', ['zh-hans'] ='[[w:en:Hijri year|Hijri历]]$date1', ['zh-hant'] ='[[w:en:Hijri year|Hijri曆]]$date1', default='<span style="color:red">$date1 [[w:en:Hijri year|AH]]</span>', }, ['bc'] = { nDates = 1, ar ='$date1 ق.م.', ['be-tarask']='$date1 [[w:be-tarask:да Нараджэньня Хрыста|да Н. Х.]]', bn ='খ্রিস্টপূর্ব $date1', ca ='$date1 [[w:ca:Abans de Crist|aC]]', ckb ='$date1 [[w:ckb:پێش زایین|پز]]', cs ='$date1 [[w:cs:Př. n. l.|př. n. l.]]', de ='$date1 [[w:de:v. Chr.|v. Chr.]]', el ='$date1 π.Χ.', en ='$date1 [[w:en:Ante Christum Natum|BC]]', ['en-gb'] ='$date1 [[w:en:Ante Christum Natum|BC]]', ['en-ca'] ='$date1 [[w:en:Ante Christum Natum|BC]]', eo ='$date1 aK', es ='$date1 [[w:es:Antes de Cristo|a. C.]]', fa ='$date1 پ.م.', fi ='$date1 eaa.', fr ='$date1 av. J.-C.', gl ='$date1 [[w:gl:Antes de Cristo|a.C.]]', he ='$date1 לפני הספירה', hr ='$date1 [[w:hr:Pr. Kr.|pr. Kr.]]', hsb='$date1 do Chr.', hu ='i. e. $date1', it ='$date1 [[w:it:Avanti Cristo|a.C.]]', ja ='[[w:ja:紀元前|紀元前]]$date1', mk ='$date1 п.н.е.', ml ='ക്രി.മു. $date1', nds='$date1 vör uns Tied', nb ='$date1 f.Kr.', nl ='$date1 v.Chr.', nn ='$date1 f.Kr.', no ='$date1 f.Kr.', pl ='$date1 [[w:pl:przed naszą erą|p.n.e.]]', ro ='$date1 î.Hr.', ru ='$date1 до н. э.', sk ='$date1 [[w:sk:Pred Kristom|pred Kr.]]', sl ='$date1 pr. n. št.', sv ='$date1 [[w:sv:Före Kristus|f.Kr.]]', uk ='$date1 до н. е.', ur ='$date1 ق م', vi ='$date1 [[w:vi:Trước Công Nguyên|TCN]]', ['zh-hans'] ='[[w:zh:基督纪年|公元前]]$date1', ['zh-hant'] ='[[w:zh:基督纪年|公元前]]$date1', default='<span style="color:red">$date1 [[w:en:Ante Christum Natum|BC]]</span>', }, ['bp'] = { nDates = 1, ar ='$date1 [[w:ar:قبل الحاضر|قبل الحاضر]]', be ='$date1 [[w:be-tarask:Да нашых дзён|Да нашых дзён]]', ['be-tarask']='$date1 [[w:be-tarask:Да нашых дзён|Да нашых дзён]]', bn ='বর্তমানের আগে $date1', ca ='$date1 [[w:ca:BP (unitat de temps)|BP]]', ckb ='$date1 [[w:ckb:پێش ئێستا|پێش ئێستا]]', cs ='$date1 [[w:cs:B. P.|B. P.]]', de ='$date1 [[w:de:Before Present|BP]]', el ='$date1 [[w:en:Before Present|BP]]', en ='$date1 [[w:en:Before Present|BP]]', ['en-gb'] ='$date1 [[w:en:Before Present|BP]]', ['en-ca'] ='$date1 [[w:en:Before Present|BP]]', eo='$date1 [[w:eo:Before Present|BP]]', es ='$date1 [[w:es:Before Present|BP]]', et ='$date1 [[w:et:Before Present|BP]]', fa ='$date1 پیش از اکنون', fi ='$date1 [[w:fi:BP (ajanlasku)|BP]]', fr ='$date1 [[w:fr:Avant le présent|avant le présent]]', hr ='$date1 [[w:hr:BP|prije današnjice]]', it ='$date1 [[w:it:Before Present|BP]]', ja ='$date1 [[w:ja:BP (年代測定)|BP]]', lv ='$date1 [[w:lv:Pirms mūsdienām|Pirms mūsdienām]]', mk ='$date1 [[w:mk:Пред сегашноста|п.с.]]', ml ='[[w:en:Before Present|ഇന്നത്തെ കാലത്തിനു മുമ്പ്]] $date1', nb ='$date1 [[w:no:Before Present|BP]]', nn ='$date1 [[w:nn:Before Present|BP]]', nl ='$date1 [[w:nl:Before Present|BP]]', no ='$date1 [[w:no:Before Present|BP]]', pl ='$date1 [[w:pl:Before Present|BP]]', pt ='$date1 [[w:pt:Antes do Presente|Antes do Presente]]', ru ='$date1 [[w:ru:До настоящего времени|до н. в.]]', sk ='$date1 [[w:sk:BP (čas)|BP]]', sl ='$date1 [[w:sl:pred sedanjostjo|p. s.]]', sr ='$date1 [[w:sr:Прије садашњости|Прије садашњости]]', sv ='$date1 [[w:sv:B.P.|B.P.]]', uk ='$date1 [[w:uk:Років тому|Років тому]]', ur ='$date1 قبل حاضر', vi ='$date1 [[w:en:Before Present|trước ngày nay]]', ['zh-hans'] ='[[w:zh:距今|距今]]$date1', ['zh-hant'] ='[[w:zh:距今|距今]]$date1', default='<span style="color:red">$date1 [[w:en:Before Present|BP]]</span>', }, } -- List of possible string inputs to "adj", "junction", "era", and "precision" fields -- Each term is matched to its synonym and the role: a - adjective, e - era -- p - precision, c - calendar and combos, r - certainty and j - conjunction p.Synonyms = { -- adjectives and prepositions ['quarter1']={'1quarter','a'}, ['1stquarter']={'1quarter','a'}, ['1st quarter']={'1quarter','a'}, ['first quarter']={'1quarter','a'}, ['1quarter']={'1quarter','a'}, ['quarter2']={'2quarter','a'}, ['2ndquarter']={'2quarter','a'}, ['2nd quarter']={'2quarter','a'}, ['second quarter']={'2quarter','a'}, ['2quarter']={'2quarter','a'}, ['quarter3']={'3quarter','a'}, ['3rdquarter']={'3quarter','a'}, ['3rd quarter']={'3quarter','a'}, ['third quarter']={'3quarter','a'}, ['3quarter']={'3quarter','a'}, ['quarter4']={'4quarter','a'}, ['4thquarter']={'4quarter','a'}, ['4th quarter']={'4quarter','a'}, ['fourth quarter']={'4quarter','a'}, ['4quarter']={'4quarter','a'}, ['spring']={'spring','a'}, ['summer']={'summer','a'}, ['fall']={'autumn','a'}, ['autumn']={'autumn','a'}, ['winter']={'winter','a'}, ['beginning']={'early','a'}, ['early']={'early','a'}, ['1half']={'firsthalf','a'}, ['1sthalf']={'firsthalf','a'}, ['1st half']={'firsthalf','a'}, ['firsthalf']={'firsthalf','a'}, ['first half']={'firsthalf','a'}, ['end']={'late','a'}, ['late']={'late','a'}, ['middle']={'mid','a'}, ['mid']={'mid','a'}, ['2half']={'secondhalf','a'}, ['2ndhalf']={'secondhalf','a'}, ['2nd half']={'secondhalf','a'}, ['secondhalf']={'secondhalf','a'}, ['second half']={'secondhalf','a'}, ['<']={'before','a'}, ['b']={'before','a'}, ['before']={'before','a'}, ['>']={'after','a'}, ['a']={'after','a'}, ['after']={'after','a'}, ['~']={'circa','a'}, ['c']={'circa','a'}, ['ca']={'circa','a'}, ['circa']={'circa','a'}, ['by']={'by','a'}, ['from']={'from','a'}, ['until']={'until','a'}, ['uncertain']={'uncertain','r'}, ['possibly']={'possibly','r'}, ['probably']={'probably','r'}, ['presumably']={'presumably','r'}, -- eras ['bc']={'bc','e'}, ['bce']={'bc','e'}, ['before present']={'bp','e'}, ['bp']={'bp','e'}, ['ce']={'ad','e'}, ['ad']={'ad','e'}, ['ah']={'ah','e'}, -- conjunctions ['&']={'and','j'}, ['and']={'and','j'}, ['or']={'or','j'}, ['-']={'from-until','j'}, ['–']={'from-until','j'}, ['from-until']={'from-until','j'}, ['between']={'between','j'}, ['circa2']={'circa2','a'}, -- precision ['day']={'day','p'}, ['month']={'month','p'}, ['year']={'year','p'}, ['s']={'decade','p'}, ['decade']={'decade','p'}, ['century']={'century','p'}, ['millennium']={'millennium','p'}, ['million']={'million','p'}, ['billion']={'billion','p'}, -- calendar ['julian']={'julian','c'}, ['islamic']={'islamic','c'}, ['hijri']={'islamic','c'}, -- "Turn of the ..." options are a combos which will be handled in similar way as calendars ['turn of the century']={'turn of the century','c'}, ['century turn']={'turn of the century','c'}, ['turn of the decade']={'turn of the decade','c'}, ['decade turn']={'turn of the decade','c'}, ['turn of the year']={'turn of the year','c'}, ['year turn']={'turn of the year','c'}, -- other dates which will be handled in similar way as calendars ['?']={'unknown','c'}, ['unknown']={'unknown','c'}, ['unknown year']={'year unknown','c'}, ['year unknown']={'year unknown','c'}, } return p dq6g8vtfaua8zgt63ytoeyms0jwcsm1 Модуль:Ordinal-cd 828 22370 102352 2026-11-05T08:21:50Z M. Omarius 10562 Новая страница: «--[[ This template will add the appropriate ordinal suffix to a given integer. Please do not modify this code without applying the changes first at Module:Ordinal/sandbox and testing at Module:Ordinal/sandbox/testcases and Module talk:Ordinal/sandbox/testcases. Authors and maintainers: * User:RP88 ]] -- ======================================= -- === Dependencies ====================== -- ======================================= local i18n =...» 102352 Scribunto text/plain --[[ This template will add the appropriate ordinal suffix to a given integer. Please do not modify this code without applying the changes first at Module:Ordinal/sandbox and testing at Module:Ordinal/sandbox/testcases and Module talk:Ordinal/sandbox/testcases. Authors and maintainers: * User:RP88 ]] -- ======================================= -- === Dependencies ====================== -- ======================================= local i18n = require('Module:I18n/ordinal') -- get localized translations of ordinals local LangSwitch = require('Module:LangSwitch') -- get LangSwitch function local yesno = require('Module:Yesno') -- boolean value interpretation local formatnum = require('Module:Formatnum') -- number formatting -- ======================================= -- === Private Functions ================= -- ======================================= --[[ Helper function to generate superscripted content ]] local function Superscript( str, superscript, nosup, period ) if superscript and (not nosup) and (str ~= '') then return period .. '<sup>' .. str .. '</sup>' else return str end end --[[ Helper function to call Formatnum. ]] local function FormatNum( value, lang ) if lang == 'roman' then return require("Module:Roman-cd")._Numeral(value) else return formatnum.formatNum(value, lang) end end --[[ Helper function to add append a category to a message. ]] local function output_cat( message, category ) return message .. '[[Category:' .. category .. ']]' end --[[ Helper function to handle error messages. ]] local function output_error( error_str, value ) error_str = '<strong class="error"><span title="Error: ' .. error_str .. '">' .. value .. '</span></strong>' return output_cat(error_str, 'Errors reported by Module Ordinal'); end --[[ This function is the core functionality for adding the appropriate ordinal suffix to a given integer. ]] local function OrdinalCore( value, lang, style, gender, nosup ) -- Just in case someone breaks the internationalization code, fix the english scheme if i18n.SchemeFromLang['en'] == nil then i18n.SchemeFromLang['en'] = 'en-scheme' end if i18n.Scheme['en-scheme'] == nil then i18n.Scheme['en-scheme'] = {rules = 'skip-tens', superscript = true, suffix = 'th', suffix_1 = 'st', suffix_2 = 'nd', suffix_3 = 'rd'} end -- Add the default scheme (i.e. "<value>.") if i18n.SchemeFromLang['default'] == nil then i18n.SchemeFromLang['default'] = 'period-scheme' end if i18n.Scheme['period-scheme'] == nil then i18n.Scheme['period-scheme'] = {rules = 'suffix', suffix = '.'} end -- which scheme should we use to format the ordinal value? -- Use Fallback module to handle languages groups that map to a supported language local schemeSpecifier = LangSwitch._langSwitch(i18n.SchemeFromLang, lang) -- Look up scheme based on scheme specifier (and possibly style) local scheme = i18n.Scheme[schemeSpecifier .. '/' .. style] or i18n.Scheme[schemeSpecifier] -- process scheme by applying rules identified by Scheme local output = '' local period = (scheme.period and '.') or '' local rules = scheme.rules if rules == 'skip-tens' then local suffix local mod100 = math.floor(math.abs(value)) % 100 if (mod100 >= 10) and (mod100 <= 19) then suffix = scheme.suffix or '' else local mod10 = math.floor(math.abs(value)) % 10 suffix = scheme['suffix_'..mod10] or scheme.suffix or '' end output = FormatNum(value, scheme.formatlang or lang) .. Superscript( suffix, scheme.superscript, nosup, period) elseif rules == 'suffix' then output = FormatNum(value, scheme.formatlang or lang) .. Superscript( scheme.suffix or '', scheme.superscript, nosup, period) elseif rules == 'prefix' then output = (scheme.prefix or '') .. FormatNum(value, scheme.formatlang or lang) elseif rules == 'mod10-suffix' then local index = math.floor(math.abs(value)) % 10 local suffix = scheme['suffix_'..index] or scheme.suffix or '' output = FormatNum(value, scheme.formatlang or lang) .. Superscript( suffix, scheme.superscript, nosup, period) elseif rules == 'gendered-suffix' then local suffix = scheme['suffix_'..gender] or scheme.suffix or '' output = FormatNum(value, scheme.formatlang or lang) .. Superscript( suffix, scheme.superscript, nosup, period) elseif rules == 'gendered-suffix-one' then local suffix if value == 1 then suffix = scheme['suffix_1_'..gender] or scheme['suffix_1'] or scheme.suffix or '' else suffix = scheme['suffix_'..gender] or scheme.suffix or '' end output = FormatNum(value, scheme.formatlang or lang) .. Superscript( suffix, scheme.superscript, nosup, period) elseif rules == 'gendered-suffix-n' then local suffix if value <= 9 then suffix = scheme['suffix_'..value..'_'..gender] or scheme['suffix_'..value] or scheme['suffix_'..gender] or scheme.suffix or '' else suffix = scheme['suffix_'..gender] or scheme.suffix or '' end output = FormatNum(value, scheme.formatlang or lang) .. Superscript( suffix, scheme.superscript, nosup, period) elseif rules == 'suffix-one' then local prefix, suffix if value == 1 then prefix = scheme['prefix_1'] or scheme.prefix or '' suffix = scheme['suffix_1'] or scheme.suffix or '' else prefix = scheme.prefix or '' suffix = scheme.suffix or '' end output = prefix .. FormatNum(value, scheme.formatlang or lang) .. Superscript( suffix, scheme.superscript, nosup, period) elseif rules == 'mod10-gendered-suffix-skip-tens' then local suffix local mod100 = math.floor(math.abs(value)) % 100 if (mod100 >= 10) and (mod100 <= 19) then suffix = scheme['suffix_'..gender] or scheme.suffix or '' else local mod10 = math.floor(math.abs(value)) % 10 suffix = scheme['suffix_'..mod10..'_'..gender] or scheme['suffix_'..mod10] or scheme['suffix_'..gender] or scheme.suffix or '' end output = FormatNum(value, scheme.formatlang or lang) .. Superscript( suffix, scheme.superscript, nosup, period) elseif rules == 'uk-rules' then local suffix local mod100 = math.floor(math.abs(value)) % 100 local mod1000 = math.floor(math.abs(value)) % 1000 if (mod1000 == 0) then suffix = scheme['suffix_1000_'..gender] or scheme.suffix or '' elseif (mod100 == 40) then suffix = scheme['suffix_40_'..gender] or scheme.suffix or '' elseif (mod100 >= 10) and (mod100 <= 19) then suffix = scheme['suffix_'..gender] or scheme.suffix or '' else local mod10 = math.floor(math.abs(value)) % 10 suffix = scheme['suffix_'..mod10..'_'..gender] or scheme['suffix_'..mod10] or scheme['suffix_'..gender] or scheme.suffix or '' end output = FormatNum(value, scheme.formatlang or lang) .. Superscript( suffix, scheme.superscript, nosup, period) else output = FormatNum(value, lang) end return output end -- ======================================= -- === Public Functions ================== -- ======================================= local p = {} --[[ Ordinal This function converts an integer value into a numeral followed by ordinal indicator. The output string might contain HTML tags unless you set nosup=y. Usage: {{#invoke:Ordinal|Ordinal|1=|lang=|style=|gender=|nosup=|debug=}} {{#invoke:Ordinal|Ordinal}} - uses the caller's parameters Parameters 1: Positive integer number. lang: language style: Presentation style. Different options for different languages. In English there is "style=d" adding -d suffixes to all numbers. gender: Gender is used in French and Polish language versions. Genders: m for male, f for female and n for neuter. nosup: Set nosup=y to display the ordinals without superscript. debug: Set debug=y to output error messages. Error Handling: Unless debug=y, any error results in parameter 1 being echoed to the output. This reproduces the behavior of the original Ordinal template. ]] function p.Ordinal( frame ) -- if no argument provided than check parent template/module args local args = frame.args if args[1]==nil then args = frame:getParent().args end -- if we don't have a specified language, attempt to use the user's language local lang = args.lang if not lang or lang == '' or not mw.language.isValidCode( lang ) then lang = frame:preprocess('{{int:lang}}') end local nosup = yesno(args["nosup"] or '', false) -- nosup can be true or false local debugging = yesno(args["debug"], false) -- debugging can be nil, true, or false -- also enable debugging if debug is unspecified, and "nosup" is false debugging = debugging or ((debugging == nil) and not nosup) local output = p._Ordinal( args[1], -- positive integer number lang, -- language args["style"], -- allows to set presentation style args["gender"], -- allows to specify gender (m, f, or n) nosup, -- set nosup to "y" to suppress superscripts debugging -- Set debug=y to output error messages ) -- Add maintenance category if (i18n.SchemeFromLang[lang] == nil) and debugging then output = output_cat(output, 'Pages with calls to Module Ordinal using an unsupported language') end return output end --[[ This function will add the appropriate ordinal suffix to a given integer. Parameters input: Numeral as a positive integer or string. lang: Language code as a string (e.g. 'en', 'de', etc.). style: Presentation style as a string (e.g. 'd', 'roman', etc.). gender: Gender as a string ('m', 'f', 'n'). Use empty string '' to leave gender unspecified. nosup: Boolean, set to true to force the ordinals to display without superscript. debug: Boolean, set to true to output error messages. Error Handling: Unless debug is true, any error results in value being echoed to the output. ]] function p._Ordinal( input, lang, style, gender, nosup, debugging ) local output = input if input then local value = tonumber(input) if value and (value > 0) then -- Normalize style, the style 'roman year' is an alias for 'roman' style = string.lower(style or '') if style == 'roman year' then style = 'roman' end -- Normalize gender parameter gender = string.lower(gender or '') if (gender ~= 'm') and (gender ~= 'f') and (gender ~= 'n') then gender = '' end -- if no language is specified, default to english (caller might want to get user's language) if not lang or lang == '' then lang = 'en'; end output = OrdinalCore( value, lang, style, gender, nosup ) else if debugging then output = output_error( "not a number", input ) end end else if debugging then output = output_error( "not a number", '' ) end end return output end return p q4twjajzqvscij2t5rgdx103o1l8hxl Модуль:Roman-cd 828 22371 102353 2026-11-05T08:23:59Z M. Omarius 10562 Новая страница: «--[[ This module converts Arabic numerals into Roman numerals. It currently works for any non-negative integer below 5 billions (up to 4 999 999 999). Zero is represented as "N" (from Classical Latin adverbs "nec" or "non"), like in standard CLDR data. For numbers starting at 4 thousands, this version no longer generates any HTML+CSS, but only plain-text: standard Unicode combining diacritics are used for overlines (U+0305 for the first level, then U+0304...» 102353 Scribunto text/plain --[[ This module converts Arabic numerals into Roman numerals. It currently works for any non-negative integer below 5 billions (up to 4 999 999 999). Zero is represented as "N" (from Classical Latin adverbs "nec" or "non"), like in standard CLDR data. For numbers starting at 4 thousands, this version no longer generates any HTML+CSS, but only plain-text: standard Unicode combining diacritics are used for overlines (U+0305 for the first level, then U+0304 for the second level, but both are treated equivalently when parsing Roman numbers). For numbers starting at 4 billions, it still uses 4 letters M with double overlines because triple overlines are not supported in plain-text (this is acceptable, just like "MMMM" is also acceptable for representing 4000 but this version chooses the shorter "IV" with a single overline). The Roman number parser will accept all valid notations (except apostrophic/Claudian/lunate notations using reversed C), more than what it generates, and will correctly convert them to Arabic numbers. Please do not modify this code without applying the changes first at Module:Roman/sandbox and testing at Module:Roman/sandbox/testcases and Module talk:Roman/sandbox/testcases. Authors and maintainers: * User:RP88, User:Verdy_p ]] local p = {} --[============[ Private data --]============] -- See CLDR data /common/rbnf/root.xml for "roman-upper" rules. However we still don't -- use the rarely supported Roman extension digits after 'M' (in U+2160..2188), but use -- the more common notation with diacritical overlines ('ↁ'='V̅', 'ↂ'='X̅', etc.). -- Please avoid using HTML with "text-decoration:overline" style, but use plain-text -- combining characters (U+0304 and/or U+0305). local decimalRomans = { d0 = { [0] = '', 'I', 'II', 'III', 'IV', 'V', 'VI', 'VII', 'VIII', 'IX' }, d1 = { [0] = '', 'X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC' }, d2 = { [0] = '', 'C', 'CC', 'CCC', 'CD', 'D', 'DC', 'DCC', 'DCCC', 'CM' }, d3 = { [0] = '', 'M', 'MM', 'MMM', 'I̅V̅', 'V̅', 'V̅I̅', 'V̅I̅I̅', 'V̅I̅I̅I̅', 'I̅X̅' }, d4 = { [0] = '', 'X̅', 'X̅X̅', 'X̅X̅X̅', 'X̅L̅', 'L̅', 'L̅X̅', 'L̅X̅X̅', 'L̅X̅X̅X̅', 'X̅C̅' }, d5 = { [0] = '', 'C̅', 'C̅C̅', 'C̅C̅C̅', 'C̅D̅', 'D̅', 'D̅C̅', 'D̅C̅C̅', 'D̅C̅C̅C̅', 'C̅M̅' }, d6 = { [0] = '', 'M̅', 'M̅M̅', 'M̅M̅M̅', 'I̿V̿', 'V̿', 'V̿I̿', 'V̿I̿I̿', 'V̿I̿I̿I̿', 'I̿X̿' }, d7 = { [0] = '', 'X̿', 'X̿X̿', 'X̿X̿X̿', 'X̿L̿', 'L̿', 'L̿X̿', 'L̿X̿X̿', 'L̿X̿X̿X̿', 'X̿C̿' }, d8 = { [0] = '', 'C̿', 'C̿C̿', 'C̿C̿C̿', 'C̿D̿', 'D̿', 'D̿C̿', 'D̿C̿C̿', 'D̿C̿C̿C̿', 'C̿M̿' }, d9 = { [0] = '', 'M̿', 'M̿M̿', 'M̿M̿M̿', 'M̿M̿M̿M̿' }, } local romanDecimals = { -- Basic Latin capital letters N = 0, -- abbreviated "nec" or "non" adverb in Classical Latin I = 1, V = 5, X = 10, L = 50, C = 100, D = 500,-- TODO: add Medieval "apostrophic/Claudian/lunate" notations like "IƆ" M = 1000, -- Basic Latin small letters (not used in Classical Latin, but added in Medieval Latin) n = 0, -- abbreviated "nec" or "non" adverb in Classical Latin i = 1, v = 5, x = 10, l = 50, c = 100, d = 500,-- TODO: add Medieval "apostrophic/Claudian/lunate" notations like "IƆ" m = 1000, -- U+0304 .. U+0305 : COMBINING (MACRON|OVERLINE) ['\204\132'] = -1000, -- (0xCC,0x84 in UTF-8) multiplier (thousand) ['\204\133'] = -1000, -- (0xCC,0x85 in UTF-8) multiplier (thousand), considered equivalent here -- U+033F : COMBINING DOUBLE OVERLINE ['\204\191'] = -1000000, -- (0xCC,0xBF in UTF-8) multiplier (million) -- U+012A ['Ī'] = 1000, ['ī'] = 1000, -- LATIN LETTER WITH COMBINING MACRON, canonically equivalent to 'I' and U+0304 -- U+2160 .. U+216F : Roman capital digit symbols (compatibility, monospaced in CJK fonts) ['Ⅰ'] = 1, ['Ⅱ'] = 2, ['Ⅲ'] = 3, ['Ⅳ'] = 4, ['Ⅴ'] = 5, ['Ⅵ'] = 6, ['Ⅶ'] = 7, ['Ⅷ'] = 8, ['Ⅸ'] = 9, ['Ⅹ'] = 10, ['Ⅺ'] = 11, ['Ⅻ'] = 12, ['Ⅼ'] = 50, ['Ⅽ'] = 100, ['Ⅾ'] = 500, ['Ⅿ'] = 1000, -- U+2170 .. U+217F : Roman lowercase digit symbols (compatibility, monospaced in CJK fonts) ['ⅰ'] = 1, ['ⅱ'] = 2, ['ⅲ'] = 3, ['ⅳ'] = 4, ['ⅴ'] = 5, ['ⅵ'] = 6, ['ⅶ'] = 7, ['ⅷ'] = 8, ['ⅸ'] = 9, ['ⅹ'] = 10, ['ⅺ'] = 11, ['ⅻ'] = 12, ['ⅼ'] = 50, ['ⅽ'] = 100, ['ⅾ'] = 500, ['ⅿ'] = 1000, -- U+2180 .. U+2182 : Old Roman symbols (these have no case pairs) ['ↀ'] = 1000, -- = 'I̅' = 'M'. TODO: add Medieval "apostrophic/Claudian/lunate" notations like "CIƆ"; do not confuse it with "CD" (400) ['ↁ'] = 5000, -- = 'V̅'. TODO: add Medieval "apostrophic/Claudian/lunate" notations like "DƆ" and "IƆƆ" ['ↂ'] = 10000, -- = 'X̅'. TODO: add Medieval "apostrophic/Claudian/lunate" notations like "CCIƆƆ" -- U+2183..U+2184 : ROMAN DIGIT (CAPITAL|LOWER) REVERSED C. TODO: add for "apostrophic/Claudian/lunate" notations (and support "Ɔ" OPEN O as aliases) -- The reversed "C" is a trailing multiplier by 10 but if it is not paired by a leading "C", the surrounded value will be divided by 2: -- * "I" = 1, but if followed by followed by "Ɔ", it takes the value 100: -- * when followed by a first "Ɔ" it multiplies it by 10 giving 1000 (assuming "CIƆ"), but if not prefixed by a pairing "C", gives 500 for "IƆ" = "D". -- * when followed by a second "Ɔ" it multiplies it by 10 giving 1000 (assuming "CCIƆƆ"), but if not prefixed by a pairing "C", gives 5000 for "IƆƆ" = "DƆ". -- * for higher multiples, using overlines is highly preferred for noting multipliers by 1000. -- U+2185: ROMAN NUMERAL SIX LATE FORM ['ↅ'] = 6, -- = 'VI' (overstriked letters) -- U+2186: ROMAN NUMERAL FIFTY EARLY FORM (Borrowed in Latin in capital form, from Greek Final sigma, similar to "C" with a leg meaning "half") ['ↆ'] = 50, -- = 'L' -- U+2187 .. U+2188: ROMAN NUMERAL (ONE HUNDRED|FIFTY) THOUSAND (Archaic, rarely supported in fonts) ['ↇ'] = 50000, -- = 'L̅'. TODO: add Medieval "apostrophic/Claudian/lunate" notations like "DƆƆ" and "IƆƆƆ" ['ↈ'] = 100000, -- = 'C̅'. TODO: add Medieval "apostrophic/Claudian/lunate" notations like "CCCDƆƆ" and "CCCIƆƆƆ" } --[=================[ Private functions --]=================] --[==[ This function returns a string containing the input value formatted as a Roman numeral. It works for non-negative integers lower than 5 billions (up to 4 999 999 999: this covers all unsigned 32-bit integers), otherwise it returns the number formatted using Latin digits. The result string will be an UTF-8-encoded plain-text alphabetic string. ]==]-- local function convertArabicToRoman(value) if value >= 1 and value <= 4999999999 and value == math.floor(value) then local d0, d1, d2, d3, d4, d5, d6, d7, d8 d0, value = value % 10, math.floor(value / 10) d1, value = value % 10, math.floor(value / 10) d2, value = value % 10, math.floor(value / 10) d3, value = value % 10, math.floor(value / 10) d4, value = value % 10, math.floor(value / 10) d5, value = value % 10, math.floor(value / 10) d6, value = value % 10, math.floor(value / 10) d7, value = value % 10, math.floor(value / 10) d8, value = value % 10, math.floor(value / 10) return table.concat({ decimalRomans.d9[value], decimalRomans.d8[d8], decimalRomans.d7[d7], decimalRomans.d6[d6], decimalRomans.d5[d5], decimalRomans.d4[d4], decimalRomans.d3[d3], decimalRomans.d2[d2], decimalRomans.d1[d1], decimalRomans.d0[d0], }) elseif value == 0 then return 'N' -- for adverbs "nec" or "non" in Classical Latin (which had no zero) end return tostring(value) end --[==[ This function converts a plain-text string containing a Roman numeral to an integer. It works for values between 0 (N) and 4 999 999 999 (M̿M̿M̿M̿C̿M̿X̿C̿I̿X̿C̅M̅X̅C̅I̅X̅CMXCIX). ]==]-- local function convertRomanToArabic(roman) if roman == '' then return nil end local result, prevRomanDecimal, multiplier = 0, 0, 1 for i = mw.ustring.len(roman), 1, -1 do local currentRomanDecimal = romanDecimals[mw.ustring.sub(roman, i, i)] if currentRomanDecimal == nil then return nil elseif currentRomanDecimal < 0 then multiplier = multiplier * -currentRomanDecimal else currentRomanDecimal, multiplier = currentRomanDecimal * multiplier, 1 if currentRomanDecimal < prevRomanDecimal then result = result - currentRomanDecimal else result = result + currentRomanDecimal prevRomanDecimal = currentRomanDecimal end end end return result end --[==[ This function converts a string containing a Roman numeral to an integer. It works for values between 0 and 4999999999. The input string may contain HTML tags using style="text-decoration:overline" (not recommended). ]==]-- local function convertRomanHTMLToArabic(roman) local result = convertRomanToArabic(roman) if result == nil then result = tonumber(roman) end return result [==[ DISABLED FOR NOW, NOT REALLY NEEDED AND NOT CORRECTLY TESTED local result = 0 local overline_start_len = mw.ustring.len(overline_start) if mw.ustring.sub(roman, 1, overline_start_len) == overline_start then local end_tag_start, end_tag_end = mw.ustring.find(roman, overline_end, overline_start_len, true) if end_tag_start ~= nil then local roman_high = mw.ustring.sub(roman, overline_start_len + 1, end_tag_start - 1) local roman_low = mw.ustring.sub(roman, end_tag_end + 1, mw.ustring.len(roman)) or '' if (mw.ustring.find(roman_high, "^[mdclxvi]+$") ~= nil) and (mw.ustring.find(roman_low, "^[mdclxvi]*$") ~= nil) then result = convertRomanToArabic(roman_high) * 1000 + convertRomanToArabic(roman_low) end end end return result ]==] end --[==[ Helper function to handle error messages. ]==]-- local function outputError(message) return table.concat({ '<strong class="error">Roman Module Error: ', message, '</strong>[[Category:Errors reported by Module Roman]]' }) end --[================[ Public functions --]================] --[==[ isRoman Tests if the trimmed input is a valid Roman numeral. Returns true if so, false if not. For the purposes of this function, the empty string (after trimming whitespaces) is not a Roman numeral. Parameters s: string to test if it is a valid Roman numeral Error Handling: If the input is not a valid Roman numeral this function returns false. ]==]-- function p.isRoman(s) return type(s) == 'string' and convertRomanToArabic(mw.text.trim(s)) ~= nil end --[==[ toArabic This function converts a Roman numeral into an Arabic numeral. It works for values between 0 and 4999999999. 'N' is converted to 0 and the empty string is converted to nil. Parameters roman: string containing value to convert into an Arabic numeral Error Handling: If the input is not a valid Roman numeral this function returns nil. ]==]-- function p.toArabic(roman) if type(roman) == 'string' then roman = mw.text.trim(roman) local result = convertRomanToArabic(roman) if result == nil then result = tonumber(roman) end return result elseif type(roman) == 'number' then return roman else return nil end end --[==[ _Numeral This function returns a string containing the input value formatted as a Roman numeral. It works for values between 0 and 4999999999. Parameters value: integer or string containing value to convert into a Roman numeral Error Handling: If the input does not look like it contains a number or the number is outside of the supported range an error message is returned. ]==]-- function p._Numeral(value) if value == nil then return outputError('missing value') end if type(value) == 'string' then value = tonumber(value) elseif type(value) ~= 'number' then return outputError('unsupported value') end return convertArabicToRoman(value) end --[==[ Numeral This function for MediaWiki converts an Arabic numeral into a Roman numeral. It works for values between 0 and 4999999999 (includes the whole range of unsigned 32-bit integers). Arabic numeral zero is output as 'N' (for Latin negation adverbs "nec" or "non"). Usage: {{#invoke:Roman|Numeral|<value>}} {{#invoke:Roman|Numeral}} - uses the caller's parameters Parameters 1: Value to convert into a Roman numeral. Must be at least 0 and less than 5,000,000. Error Handling: If the input does not look like it contains a number or the number is outside of the supported range an error message is returned. ]==]-- function p.Numeral(frame) -- if no argument provided than check parent template/module args local args = frame.args if args[1] == nil then args = frame:getParent().args end return p._Numeral(args[1]) end return p acpyuzp8gc0fjs3p0yrt4wa52wf2e2p Модуль:ISOdate 828 22372 102354 2026-11-05T08:25:34Z M. Omarius 10562 Новая страница: «--[[ This module is intended for processing of date strings. Please do not modify this code without applying the changes first at Module:ISOdate/sandbox and testing at Module:ISOdate/sandbox/testcases and Module talk:ISOdate/sandbox/testcases. Authors and maintainers: * User:Parent5446 - original version of the function mimicking template:ISOdate * User:Jarekt - original version of the functions mimicking template:Date and template:ISOyear ]] loca...» 102354 Scribunto text/plain --[[ This module is intended for processing of date strings. Please do not modify this code without applying the changes first at Module:ISOdate/sandbox and testing at Module:ISOdate/sandbox/testcases and Module talk:ISOdate/sandbox/testcases. Authors and maintainers: * User:Parent5446 - original version of the function mimicking template:ISOdate * User:Jarekt - original version of the functions mimicking template:Date and template:ISOyear ]] local p = {} -- ======================================= -- === Dependencies ====================== -- ======================================= local D = require('Module:DateI18n') -- the enwp version of c:Module:Date --[[ ISOyear This function returns year part of date string. Usage: {{#invoke:ISOdate|ISOyear|target_string}} Parameters 1: The date string Error Handling: If the string does not look like it contain the year than the function will not return anything. That is the preferred treatment for the template:Creator which is the main (only?) template calling it. ]] function p.ISOyear( frame ) return p._ISOyear( frame.args[1] ) end function p._ISOyear( input ) if not input then return '' end input = mw.text.trim( input ) -- if empty string then return it if input == "" then return input end -- if number then return it if tonumber( input ) then return mw.ustring.format( '%04i', input ) end -- otherwise use regular expression match input = mw.ustring.match( input, '^+?(-?%d%d?%d?%d?)-' ) if input and tonumber( input ) then return mw.ustring.format( '%04i', input ) else return '' end end --[[ ISOdate This function is the core part of the ISOdate template. Usage: {{#invoke:ISOdate|ISOdate|target_string|lang=}} Parameters: 1: The date string lang: The language to display it in form: Language format (genitive, etc.) for some languages class: CSS class for the <time> node Error Handling: If the string does not look like it contain the proper ISO date than the function will return the original string. That is the preferred treatment for the template:Information (and similar templates) which calling it. ]] function p.ISOdate(frame) local datestr, succeded local args = frame.args if not (args.lang and mw.language.isSupportedLanguage(args.lang)) then args.lang = frame:callParserFunction( "int", "lang" ) -- get user's chosen language end datestr, succeded = p._ISOdate( mw.text.trim(args[1]), args.lang, -- language args.case or '', -- allows to specify grammatical case for the month for languages that use them args.class or 'dtstart', -- allows to set the html class of the time node where the date is included. args.trim_year or '100-999' -- by default pad one and 2 digit years to be 4 digit long, while keeping 3 digit years as is ) return datestr end function p._ISOdate(datestr, lang, case, class, trim_year) -- pattern: regexp - regular expresion to test; dlen - number of date elements; tail = which element is a "tail" if any -- regexp hints: -- 1) Strings starting with "^" and ending with "$" indicate whole string match -- 2) optional tail part copied as-is and following the main parsed part of the date have to be separated from the date by a whitespace, so "(\s.+)?" local patterns = { -- strings starting with YYYY-MM-DD HH:MM:SS. Year 4 digits (if we know seconds than it was within the last 100 years), the rest 1-2 -- date and time can be separated by space or "T" and there could be a "Z" on the end indicating "Zulu" time zone {dlen=6, tail=7, regexp="^+?(%d%d%d%d)-(%d%d?)-(%d%d?)[ T](%d%d?):(%d%d?):(%d%d?)Z?(%s.*)"}, {dlen=6, tail=0, regexp="^+?(%d%d%d%d)-(%d%d?)-(%d%d?)[ T](%d%d?):(%d%d?):(%d%d?)Z?$"}, -- strings starting with YYYY-MM-DD HH:MM. Year 4 digits, the rest 1-2 -- (if one knows hour and minute than it was probably after a year 1000) {dlen=5, tail=6, regexp="^+?(%d%d%d%d)-(%d%d?)-(%d%d?)[ T](%d%d?):(%d%d?)(%s.+)"}, {dlen=5, tail=0, regexp="^+?(%d%d%d%d)-(%d%d?)-(%d%d?)[ T](%d%d?):(%d%d?)$"}, -- strings starting with YYYY-MM-DD. Year 1-4 digits, the rest 1-2 {dlen=3, tail=4, regexp="^+?(%d%d?%d?%d?)-(%d%d?)-(%d%d?)(%s.+)"}, {dlen=3, tail=0, regexp="^+?(%d%d?%d?%d?)-(%d%d?)-(%d%d?)$"}, -- strings starting with YYYY-MM. Year 3-4 digits, month 2 digits -- (want to avoit converting to dates strings like 10-5 = 5 {dlen=2, tail=3, regexp="^+?(%d%d%d%d?)-(%d%d)(%s.+)"}, -- if whole string is in YYYY-MM form: If Year 1-4 digits, month 1-2 digits {dlen=2, tail=0, regexp="^+?(%d%d?%d?%d?)-(%d%d?)$"}, -- string starts with a number -> it has to be 3 or 4 digit long to be a year {dlen=1, tail=2, regexp="^+?(%d%d%d%d?)(%s.+)"}, -- if whole string is a number (1-4 digit long) than it will be interpreted as a year {dlen=1, tail=0, regexp="^+?(%d%d?%d?%d?)$"}, } -- create datevec based on which variables are provided local datevec, tail, formatNum datevec, tail, formatNum = p.test_date_formats(datestr or '', patterns) if datevec[1]=='' or datevec[1]==nil then -- quickly return if datestr does not look like date (it could be a template) return datestr, false end -- call p._Date function to format date string local succeded, datestr2 succeded, datestr2 = pcall( D._Date, datevec, lang, case, class, trim_year) if succeded and datestr2~='' then return mw.text.trim( datestr2 .. tail), true else -- in case of errors return the original string return datestr, false end end function p.ISOdate_extended(frame) -- pattern: regexp - regular expresion to test; dlen - number of date elements; tail = which element is a "tail" if any -- regexp hints: -- 1) Strings starting with "^" and ending with "$" indicate whole string match -- 2) optional tail part copied as-is and following the main parsed part of the date have to be separated from the date by a whitespace, so "(\s.+)?" local datestr, succeded local args = frame.args if not (args.lang and mw.language.isSupportedLanguage(args.lang)) then args.lang = frame:callParserFunction( "int", "lang" ) -- get user's chosen language end datestr, succeded = p._ISOdate( mw.text.trim(args[1]), args.lang, -- language args.case or '', -- allows to specify grammatical case for the month for languages that use them args.class or 'dtstart', -- allows to set the html class of the time node where the date is included. args.trim_year or '100-999' -- by default pad one and 2 digit years to be 4 digit long, while keeping 3 digit years as is ) if succeded then return datestr end local patterns = { -- Exended set of recognized formats: like MM/DD/YYYY {dlen=3, tail=4, regexp="^(%d%d?)[-./](%d%d?)[-./](%d%d%d%d)(%s.+)"}, {dlen=3, tail=0, regexp="^(%d%d?)[-./](%d%d?)[-./](%d%d%d%d)$"}, {dlen=3, tail=0, regexp="^(%d%d?)%s(%w+)%s(%d%d%d%d)$"}, {dlen=3, tail=0, regexp="^(%w+)%s(%d%d?),%s(%d%d%d%d)$"}, } local datevec, tail, formatNum, category = '' datevec, tail, formatNum = p.test_date_formats(frame.args[1], patterns) if formatNum==1 or formatNum==2 then vec = datevec; if tonumber(datevec[1])>12 then frame.args[1] = string.format('%04i-%02i-%02i', datevec[3], datevec[2], datevec[1] ) category = '[[Category:Date in DD/MM/YYYY format]]' return mw.text.trim( p.ISOdate(frame) .. tail); elseif tonumber(datevec[2])>12 then frame.args[1] = string.format('%04i-%02i-%02i', datevec[3], datevec[1], datevec[2] ) category = '[[Category:Date in MM/DD/YYYY format]]' return mw.text.trim( p.ISOdate(frame) .. tail); end elseif (formatNum==3 or formatNum==4) and (datevec[3]=='' or datevec[3]~=nil) then local str = mw.getCurrentFrame():callParserFunction( "#time", { 'Y-m-d', datestr} ) local vec = {str:match( "^(%d%d?%d?%d?)-(%d%d?)-(%d%d?)$" )} if vec and vec[1]~=nil then frame.args[1] = string.format('%04i-%02i-%02i', vec[1], vec[2], vec[3] ) category = '[[Category:Date in word format]]' return p.ISOdate(frame); end end return datestr end function p.test_date_formats(datestr, patterns) -- pattern: regexp - regular expresion to test; dlen - number of date elements; tail = which element is a "tail" if any local datevec = {'','','','','',''} local tail = '' local vec, pat local formatNum = 0 for i, pat in ipairs( patterns ) do vec = {datestr:match( pat.regexp )} if vec and vec[1]~=nil then for j=1,pat.dlen do datevec[j] = vec[j] end if pat.tail>0 and vec[pat.tail]~=nil then tail = mw.ustring.gsub(' ' .. vec[pat.tail], ' +', ' ') end formatNum = i break end end return datevec, tail, formatNum end return p nab04kxj0ywahk6drgfjdo6jbixhup7 Модуль:DateI18n 828 22373 102355 2026-11-05T08:26:44Z M. Omarius 10562 Новая страница: «--[[ __ __ _ _ ____ _ ___ _ ___ | \/ | ___ __| |_ _| | ___ _| _ \ __ _| |_ ___|_ _/ |( _ ) _ __ | |\/| |/ _ \ / _` | | | | |/ _ (_) | | |/ _` | __/ _ \| || |/ _ \| '_ \ | | | | (_) | (_| | |_| | | __/_| |_| | (_| | || __/| || | (_) | | | | |_| |_|\___/ \__,_|\__,_|_|\___(_)____/ \__,_|\__\___|___|_|\___/|_| |_| This module is intended for processing of date strings. Please do not modify...» 102355 Scribunto text/plain --[[ __ __ _ _ ____ _ ___ _ ___ | \/ | ___ __| |_ _| | ___ _| _ \ __ _| |_ ___|_ _/ |( _ ) _ __ | |\/| |/ _ \ / _` | | | | |/ _ (_) | | |/ _` | __/ _ \| || |/ _ \| '_ \ | | | | (_) | (_| | |_| | | __/_| |_| | (_| | || __/| || | (_) | | | | |_| |_|\___/ \__,_|\__,_|_|\___(_)____/ \__,_|\__\___|___|_|\___/|_| |_| This module is intended for processing of date strings. Please do not modify this code without applying the changes first at Module:Date/sandbox and testing at Module:Date/sandbox/testcases and Module talk:Date/sandbox/testcases. Authors and maintainers: * User:Parent5446 - original version of the function mimicking template:ISOdate * User:Jarekt - original version of the functions mimicking template:Date ]] require('strict') -- ================================================== -- === Internal functions =========================== -- ================================================== -- Function allowing for consistent treatment of boolean-like wikitext input. -- It works similarly to Module:Yesno local function yesno(val, default) if type(val) == 'boolean' then return val elseif type(val) == 'number' then if val==1 then return true elseif val==0 then return false end elseif type(val) == 'string' then val = mw.ustring.lower(val) -- put in lower case if val == 'no' or val == 'n' or val == 'false' or tonumber(val) == 0 then return false elseif val == 'yes' or val == 'y' or val == 'true' or tonumber(val) == 1 then return true end end return default end --------------------------------------------------------------------------------------- -- String replacement that ignores part of the string in "..." local function strReplace(String, old, new) if String:find('"') then local T={} for i, str in ipairs(mw.text.split( String, '"', true )) do if i%2==1 then str = str:gsub(old, new) end table.insert(T, str) end return table.concat(T,'"') else return String:gsub(old, new) end end --------------------------------------------------------------------------------------- -- process datevec -- INPUT: -- * datevec - Array of {year,month,day,hour,minute,second, tzhour, tzmin} containing broken -- down date-time component strings or numbers -- OUTPUT: -- * datecode - a code specifying content of the array where Y' is year, 'M' is month, -- 'D' is day, 'H' is hour, 'M' minute, 'S' is second. output has to be one of YMDHMS, YMDHM, YMD, YM, MD, Y -- * datenum - same array but holding only numbers or nuls local function parserDatevec(datevec) -- if month is not a number than check if it is a month name in project's language local month = datevec[2] if month and month~='' and not tonumber(month) then datevec[2] = mw.getContentLanguage():formatDate( "n", month) end -- create datecode based on which variables are provided and check for out-of-bound values local maxval = {nil, 12, 31, 23, 59, 59, 23, 59} -- max values for year, month, ... local minval = {nil, 1, 1, 0, 0, 0, -23, 0} -- min values for year, month, ... local c = {'Y', 'M', 'D', 'H', 'M', 'S', '', ''} local datecode = '' -- a string signifying which combination of variables was provided local datenum = {} -- date-time encoded as a vector = [year, month, ... , second] for i = 1,8 do datenum[i] = tonumber(datevec[i]) if datenum[i] and (i==1 or (datenum[i]>=minval[i] and datenum[i]<=maxval[i])) then datecode = datecode .. c[i] end end return datecode, datenum end --------------------------------------------------------------------------------------- -- process datevec -- INPUT: -- * datecode - a code specifying content of the array where Y' is year, 'M' is month, -- 'D' is day, 'H' is hour, 'M' minute, 'S' is second. output has to be one of YMDHMS, YMDHM, YMD, YM, MD, Y -- * datenum - Array of {year,month,day,hour,minute,second, tzhour, tzmin} as numbers or nuls -- OUTPUT: -- * timeStamp - date string in the format taken by mw.language:formatDate lua function and {{#time}} perser function -- https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#mw.language:formatDate -- https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions#.23time -- * datecode - with possible corrections local function getTimestamp(datecode, datenum) -- create time stamp string (for example 2000-02-20 02:20:20) based on which variables were provided local timeStamp if datecode == 'YMDHMS' then timeStamp = string.format('%04i-%02i-%02i %02i:%02i:%02i', datenum[1], datenum[2], datenum[3], datenum[4], datenum[5], datenum[6] ) elseif datecode == 'YMDHM' then timeStamp = string.format('%04i-%02i-%02i %02i:%02i', datenum[1], datenum[2], datenum[3], datenum[4], datenum[5] ) elseif datecode:sub(1,3)=='YMD' then timeStamp = string.format('%04i-%02i-%02i', datenum[1], datenum[2], datenum[3] ) datecode = 'YMD' -- 'YMD', 'YMDHMS' and 'YMDHM' are the only supported format starting with 'YMD'. All others will be converted to 'YMD' elseif datecode == 'YM' then timeStamp = string.format('%04i-%02i', datenum[1], datenum[2] ) elseif datecode:sub(1,1)=='Y' then timeStamp = string.format('%04i', datenum[1] ) datecode = 'Y' elseif datecode == 'M' then timeStamp = string.format('%04i-%02i-%02i', 2000, datenum[2], 1 ) elseif datecode == 'MD' then timeStamp = string.format('%04i-%02i-%02i', 2000, datenum[2], datenum[3] ) else timeStamp = nil -- format not supported end return timeStamp, datecode end --------------------------------------------------------------------------------------- -- trim leading zeros in years prior to year 1000 -- INPUT: -- * datestr - translated date string -- * lang - language of translation -- OUTPUT: -- * datestr - updated date string local function trimYear(datestr, year, lang) local yearStr0, yearStr1, yearStr2, zeroStr yearStr0 = string.format('%04i', year ) -- 4 digit year in standard form "0123" yearStr1 = mw.language.new(lang):formatDate( 'Y', yearStr0) -- same as calling {{#time}} parser function --yearStr1 = mw.getCurrentFrame():callParserFunction( "#time", { 'Y', yearStr0, lang } ) -- translate to a language if yearStr0==yearStr1 then -- most of languages use standard form of year yearStr2 = tostring(year) else -- some languages use different characters for numbers yearStr2 = yearStr1 zeroStr = mw.ustring.sub(yearStr1,1,1) -- get "0" in whatever language for i=1,3 do -- trim leading zeros if mw.ustring.sub(yearStr2,1,1)==zeroStr then yearStr2 = mw.ustring.sub(yearStr2, 2, 5-i) else break end end end return string.gsub(datestr, yearStr1, yearStr2 ) -- in datestr replace long year with trimmed one end --------------------------------------------------------------------------------------- -- Look up proper format string to be passed to {{#time}} parser function -- INPUTS: -- * datecode: YMDHMS, YMDHM, YMD, YM, MD, Y, or M -- * day : Number between 1 and 31 (not needed for most languages) -- * lang : language -- OUTPUT: -- * dFormat : input to {{#time}} function local function getDateFormat(datecode, day, lang) local function parseFormat(dFormat, day) if dFormat:find('default') and #dFormat>10 then -- special (and messy) case of dFormat code depending on a day number -- then json contains a string with more json containing "default" field and 2 digit day keys -- if desired day is not in that json than use "default" case dFormat = dFormat:gsub('”','"') -- change fancy double quote to a straight one, used for json marking local D = mw.text.jsonDecode( dFormat ) --com = mw.dumpObject(D) day = string.format('d%02i',day) -- create day key dFormat = D[day] or D.default dFormat = dFormat:gsub("'", '"') -- change single quote to a double quote, used for {{#time}} marking end return dFormat end local T = {} local tab = mw.ext.data.get('DateI18n.tab', lang) for _, row in pairs(tab.data) do -- convert the output into a dictionary table local id, _, msg = unpack(row) T[id] = msg end local dFormat = T[datecode] if dFormat=='default' and (datecode=='YMDHMS' or datecode=='YMDHM') then -- for most languages adding hour:minute:second is done by adding ", HH:MM:SS to the -- day precission date, those languages are skipped in DateI18n.tab and default to -- English which stores word "default" dFormat = parseFormat(T['YMD'], day).. ', H:i' if datecode=='YMDHMS' then dFormat = dFormat .. ':s' end else dFormat = parseFormat(dFormat, day) end return dFormat end --------------------------------------------------------------------------------------- -- Look up proper format string to be passed to {{#time}} parser function -- INPUTS: -- * month : month number -- * case : gramatic case abbriviation, like "ins", "loc" -- * lang : language -- OUTPUT: -- * dFormat : input to {{#time}} function local function MonthCase(month, case, lang) local T = {{},{},{},{},{},{},{},{},{},{},{},{}} local tab = mw.ext.data.get('I18n/MonthCases.tab', lang) for _, row in pairs(tab.data) do local mth, cs, msg = unpack(row) T[mth][cs] = msg end return T[month][case] end -- ================================================== -- === External functions =========================== -- ================================================== local p = {} --[[ ======================================================================================== Date This function is the core part of the ISOdate template. Usage: local Date = require('Module:DateI18n')._Date local dateStr = Date({2020, 12, 30, 12, 20, 11}, lang) Parameters: * {year,month,day,hour,minute,second, tzhour, tzmin}: broken down date-time component strings or numbers tzhour, tzmin are timezone offsets from UTC, hours and minutes * lang: The language to display it in * case: Language format (genitive, etc.) for some languages * class: CSS class for the <time> node, use "" for no metadata at all ]] function p._Date(datevec, lang, case, class, trim_year) -- make sure inputs are in the right format if not lang or not mw.language.isValidCode( lang ) then lang = mw.getCurrentFrame():callParserFunction( "int", "lang" ) -- get user's chosen language end if lang == 'be-tarsk' then lang = 'be-x-old' end -- process datevec and extract timeStamp and datecode strings as well as numeric datenum array local datecode, datenum = parserDatevec(datevec) local year, month, day = datenum[1], datenum[2], datenum[3] local timeStamp, datecode = getTimestamp(datecode, datenum) if not timeStamp then -- something went wrong in parserDatevec return '' end -- Commons [[Data:DateI18n.tab]] page stores prefered formats for diferent -- languages and datecodes (specifying year-month-day or just year of month-day, etc) -- Look up country specific format input to {{#time}} function local dFormat = getDateFormat(datecode, day, lang) -- By default the gramatical case is not specified (case=='') allowing the format to be specified -- in [[Data:DateI18n.tab]]. You can overwrite the default grammatical case of the month by -- specifying "case" variable. This is needed mostly by Slavic languages to create more complex -- phrases as it is done in [[c:Module:Complex date]] case = case or '' if (lang=='qu' or lang=='qug') and (case=='nom') then -- Special case related to Quechua and Kichwa languages. The form in the I18n is -- Genitive case with suffix "pi" added to month names provided by {#time}} -- in Nominative case that "pi" should be removed -- see https://commons.wikimedia.org/wiki/Template_talk:Date#Quechua from 2014 dFormat = dFormat:gsub('F"pi"', 'F') elseif (case=='gen') then dFormat = strReplace(dFormat, "F", "xg") elseif (case=='nom') then dFormat = strReplace(dFormat, "xg", "F") elseif (case ~= '') then -- see is page [[Data:I18n/MonthCases.tab]] on Commons have name of the month -- in specific gramatic case in desired language. If we have it than replace -- "F" and xg" in dFormat local monthMsg = MonthCase(month, case, lang) if monthMsg and monthMsg ~= '' then -- make sure it exists dFormat = strReplace(dFormat, 'F', '"'..monthMsg..'"') -- replace default month with month name we already looked up dFormat = strReplace(dFormat, 'xg', '"'..monthMsg..'"') end end -- Translate the date using specified format -- See https://www.mediawiki.org/wiki/Extension:Scribunto/Lua_reference_manual#mw.language:formatDate and -- https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions##time for explanation of the format local datestr = mw.language.new(lang):formatDate( dFormat, timeStamp) -- same as using {{#time}} parser function -- Special case related to Thai solar calendar: prior to 1940 new-year was at different -- time of year, so just year (datecode=='Y') is ambiguous and is replaced by "YYYY or YYYY" phrase if lang=='th' and datecode=='Y' and year<=1940 then datestr = string.format('%04i หรือ %04i', year+542, year+543 ) end -- If year<1000 than either keep the date padded to the length of 4 digits or trim it -- decide if the year will stay padded with zeros (for years in 0-999 range) if year and year<1000 then if type(trim_year)=='nil' then trim_year = '100-999' end local trim = yesno(trim_year,nil) -- convert to boolean if trim==nil and type(trim_year)=='string' then -- if "trim_year" not a simple True/False than it is range of dates -- for example '100-999' means to pad one and 2 digit years to be 4 digit long, while keeping 3 digit years as is local YMin, YMax = trim_year:match( '(%d+)-(%d+)' ) trim = (YMin~=nil and year>=tonumber(YMin) and year<=tonumber(YMax)) end if trim==true then datestr = trimYear(datestr, year, lang) -- in datestr replace long year with trimmed one end end -- append timezone if present if datenum[7] and (datecode == 'YMDHMS' or datecode == 'YMDHM') then -- use {{#time}} parser function to create timezone string, so that we use correct character set local sign = (datenum[7]<0) and '−' or '+' timeStamp = string.format("2000-01-01 %02i:%02i:00", math.abs(datenum[7]), datenum[8] or 0) local timezone = mw.language.new(lang):formatDate( 'H:i', timeStamp) -- same as using {{#time}} parser function datestr = string.format("%s %s%s", datestr, sign, timezone ) end -- html formating and tagging of date string if class and class ~= '' and datecode~='M' and datecode~='MD'then local DateHtmlTags = '<span style="white-space:nowrap"><time class="%s" datetime="%s">%s</time></span>' datestr = DateHtmlTags:format(class, timeStamp, datestr) end return datestr end --[[ ======================================================================================== Date This function is the core part of the ISOdate template. Usage: {{#invoke:DateI18n|Date|year=|month=|day=|hour=|minute=|second=|tzhour=|tzmin=|lang=en}} Parameters: * year, month, day, hour, minute, second: broken down date-time component strings * tzhour, tzmin: timezone offset from UTC, hours and minutes * lang: The language to display it in * case: Language format (genitive, etc.) for some languages * class: CSS class for the <time> node, use "" for no metadata at all ]] function p.Date(frame) local args = {} for name, value in pairs( frame.args ) do name = string.gsub( string.lower(name), ' ', '_') args[name] = value end return p._Date( { args.year, args.month, args.day, args.hour, args.minute, args.second, args.tzhour, args.tzmin }, args.lang, -- language args.case, -- allows to specify grammatical case for the month for languages that use them args.class or 'dtstart', -- allows to set the html class of the time node where the date is included. This is useful for microformats. args.trim_year or '100-999' -- by default pad one and 2 digit years to be 4 digit long, while keeping 3 digit years as is ) end return p lcwmkh5p6iicle9dw7qzn6d8j6xkduv Халип:P-1 10 22374 102356 2026-11-05T08:29:58Z M. Omarius 10562 Новая страница: «<includeonly>{{#invoke:Pn |getVal | idx=-1}}</includeonly><noinclude> {{documentation}} </noinclude>» 102356 wikitext text/x-wiki <includeonly>{{#invoke:Pn |getVal | idx=-1}}</includeonly><noinclude> {{documentation}} </noinclude> a606acamg7s7qd56migcztl9q8ecfe8 Модуль:Pn 828 22375 102357 2026-11-05T08:32:33Z M. Omarius 10562 Новая страница: «--[[ Module that returns one value from a list of unnamed parameters Named parameter idx is the index of the parameter that is to be returned Negative indices count backward from the end of the list ==]] local p = {} p.getVal = function(frame) local args = {} -- copy arguments from frame object and its parent for k, v in pairs(frame.args) do args[k] = v end for k, v in pairs(frame:getParent().args) do args[k] = v end if not args[1] then return...» 102357 Scribunto text/plain --[[ Module that returns one value from a list of unnamed parameters Named parameter idx is the index of the parameter that is to be returned Negative indices count backward from the end of the list ==]] local p = {} p.getVal = function(frame) local args = {} -- copy arguments from frame object and its parent for k, v in pairs(frame.args) do args[k] = v end for k, v in pairs(frame:getParent().args) do args[k] = v end if not args[1] then return nil end local idx = tonumber(args.idx) or 1 if idx < 0 then idx = #args + idx + 1 end return args[idx] end return p fjl0mfz2avjzxqz43dzxma8fpg5z6ji