Vikipediya crhwiki https://crh.wikipedia.org/wiki/Ba%C5%9F_Saife MediaWiki 1.47.0-wmf.5 first-letter Media Mahsus Muzakere Qullanıcı Qullanıcı muzakeresi Vikipediya Vikipediya muzakeresi Fayl Fayl muzakeresi MediaViki MediaViki muzakeresi Şablon Şablon muzakeresi Yardım Yardım muzakeresi Kategoriya Kategoriya muzakeresi R R talk TimedText TimedText talk Modul Modul muzakeresi Event Event talk Vikipediya:Meydan 4 668 244206 243974 2026-06-09T09:56:22Z Хтосьці 13041 /* -{Module:Wikidata-ro}- yerinde -{Module:Wikidata}- qullanmaq isteyim */ Cevap 244206 wikitext text/x-wiki {| cellspacing="3" width="100%" |- |style="padding-right: 1em; margin-bottom: 0.5em; border: #99B3FF solid 1px"| {{/Baş yazı}} |{{Clickable button 2|Yañı bir mevzu aç-{</br>Начать новую тему</br>Yeni konu aç</br>Додати нове обговорення</br>Start a new topic}-|url=https://crh.wikipedia.org/w/index.php?title=Vikipediya:Meydan&action=edit&section=0&preview=no&editintro=template:Тема_сверху|class=mw-ui-constructive}} |} == Hata == Lua hatası: expandTemplate: template "infobox/title" does not exist.Şablon:İf-wikidataŞablon:İf-wikidataŞablon:İf-wikidataŞablon:İf-wikidataŞablon:İf-wikidataŞablon:İf-wikidataŞablon:İf-wikidataŞablon:İf-wikidataŞablon:İf-wikidataŞablon:İf-wikidataŞablon:İf-wikidataŞablon:İf-wikidataŞablon:İf-wikidata ''universal infocard'' öyle hatanı köstere. Misal: [[Cengiz Hannıñ Devleti]] maqalesi --[[Qullanıcı:Devlet Geray|Devlet Geray]] ([[Qullanıcı muzakeresi:Devlet Geray|muzakere]]) 22:56, 2025 s. aprelniñ 1 (UTC) * Tek bu şablon degil de, başqa şablonlar em de bozuldular. --[[Qullanıcı:Devlet Geray|Devlet Geray]] ([[Qullanıcı muzakeresi:Devlet Geray|muzakere]]) 23:01, 2025 s. aprelniñ 1 (UTC) : Tüzettim. : Mesele şu ki, evelleri vikipediyamızda standart latin elifbesinde kibi '''i''' arfiniñ büyük şekli '''I''' edi. Yani <nowiki>[[ingliz tili]]</nowiki> '''İngliz tili'''ne degil '''Ingliz tili'''ne keçirgen edi. Keçenlerde ise merametli bir adam (kim o, aceba?) bunı tüzetip türkçe, azerice vikipediyalarda kibi '''i''''niñ büyügi '''İ''', '''ı''''nıñ büyügi '''I''' etip tayin etti. Bundan sebep bir şablon adınıñ birinci arfi I olsa, o şablonnı mıtlaqa büyük arifnen añmaq kerek: <nowiki>{{infobox}}</nowiki> degil, <nowiki>{{Infobox}}</nowiki>. [[Qullanıcı:Don Alessandro|Don Alessandro]] ([[Qullanıcı muzakeresi:Don Alessandro|muzakere]]) 10:44, 2025 s. aprelniñ 2 (UTC) ::Sağ oluñız! [[Qullanıcı:Devlet Geray|Devlet Geray]] ([[Qullanıcı muzakeresi:Devlet Geray|muzakere]]) 13:23, 2025 s. aprelniñ 2 (UTC) ==Fallback tili içün teklif== Ürmetli cemaat, MediaWiki sistemasında qırımtatar tili içün fallback tili (tercimesi olmağan metinler içün qullanılğan til) şimdi rusça olaraq belgilegen. Bu, 2007 senesinden berli böyle qalğan vaziyet. Bugünki künde bu vaziyetni deñiştirmek kerek dep tüşünemiz ve böyle variantlarnı teklif etemiz: ===1. Turk tilini fallback tili olaraq qullanmaq=== * Turk tili qırımtatar tiline pek yaqın, çünki ekisi de türkiy tiller ailesinden * Qırımtatar elifbesi turk elifbesi esasında yaratılğan * Qırımtatar tilini bilgen adamlar turk tilini de yahşı añlay bileler * Türkiyede yüz biñlernen qırımtatar yaşay ve türkçeni qullana * Turk tilinde qırımtatar tilinden ziyade tercimeler bar * Turklar de qırımtatar tilini añlay bileler * Qırımtatar-türk til bağları tarihiy ve medeniy ceetten pek quvetli * Bu til siyasiy ceetten neytral * Vikipediyada çalışqan qırımtatar tilini bilgen adamlar içün eñ añlaşılır til ===2. Ukraina tilini fallback tili olaraq qullanmaq=== * Ukraina devlet tili * Bugün 18-40 yaşında olğan qırımtatarlar mektep ve universitetlerde ukrain tilinde oqudılar * 40 yaştan yuqarı olğan nesil 23 yıl devamında (1991-2014) ukrain tilini devlet müessiselerinde, universitetlerde, iş yerlerinde, mediada ve kündelik yaşayışta qullandılar * Qırımtatar cemiyetiniñ büyük qısmı ukrain tilinen tanış * Qırımtatarlar Ukrainada ukrain tilini faal qullana ===3. Ingliz tilini fallback tili olaraq qullanmaq=== * Qırımtatarca (Latin) içün şimdi inglizce qullanıla * Halqara til olaraq keñ qullanıla * Ingliz tilinde tercimeler yeterli derecede bar Bizim fikrimizge, eñ munasip variant - '''turk tilini fallback tili olaraq saylamaq'''. Bu deñişme em kirill, em latin yazuvı qırımtatar tili içün bir tilni saylap almaq kerek olur. Bu mesele boyunca Phabricator sistemasında tehnik talap açıldı: [https://phabricator.wikimedia.org/T380047] Lütfen, bu mesele aqqında fikirleriñizni bildiriñiz. :Qırımtatar tili MediaWikide bir qaç lokallernen kösterile: sırasınen crh-latn, crh-cyrl, ve crh-ro (latin elifbesi, kirill elifbesi, ve dobruj tatarlarnıñ tili), olarnıñ er biri içün farqlı ola bile fallbek tilleri. Bu lokallerniñ qaysı biri içün fallbek tilini deñiştirmek isteysiñiz?--[[Qullanıcı:Ahonc|Ahonc]] ([[Qullanıcı muzakeresi:Ahonc|muzakere]]) 17:42, 2024 s. noyabrniñ 17 (UTC) ::: <span lang="crh">Fallback maqsatnı bütün lokallerde deñiştirmek kerek (crh-latn, crh-cyrl, ve crh-ro). Tek de bundan evel bir mesele bar: şimdi Lingua Libre saytında üç variant kösterile - eki dane "qırımtatarca" (biri "Crimean Turkish", digeri "Crimean Tatar (latin)" dep kösterile) ve bir dane "къырымтатарджа". Bu qarışıqlıqnı da tüzetmek kerek. "Qırımtatarca" variantları içün açıq belgilev (meselâ "Qırımtatarca - latin" ve "Qırımtatarca - rumın") qoşmaq munasip olur bile.</span> ::: <span lang="crh">Fallback tili olaraq turk tilini qullanmaq eñ munasip ola bile çünki:</span> :::* <span lang="crh">Crh-latn ve crh-cyrl içün - şimdi qullanılğan rus ve ingliz tillerinden türk tili daa yaqın ve añlaşılır</span> :::* <span lang="crh">Crh-ro içün - Dobrucadaki qırımtatarlar Türkiye ile sıqı bağları saqlay, olarnıñ çoqu türk tilini bile. Maddiy medeniyet ve til bağları tarihiy olaraq quvetli</span> :::* <span lang="crh">Bir fallback tiliniñ qullanması interfeys birdemligini temin eter</span> ::: <span lang="crh">Bu şekilde, qırımtatar tiliniñ er bir variantı içün eñ munasip ve añlaşılır tercime teminlenecek.</span> ::[[Qullanıcı:Qırım|Qırım]] ([[Qullanıcı muzakeresi:Qırım|muzakere]]) 18:57, 2024 s. noyabrniñ 18 (UTC) Doğrusını aytsam, fallback tilini türkçe etip deñişitirip interfeys tercimanlığı işimni bayağı oñaytsızlaştırdıñız, efendiler. Evelleri men interfeyste inglizce bir ibareni körip, aman onı translatewiki.net'te tapıp tercime ete edim. Şimdi ise türkçeni körip başta inglizcesini tapmaq kerek, o da ayrı bir maceradır. Şu az buçuq inglizce söz o qadar büyük qıyınlıq etkenmi aceba? [[Qullanıcı:Don Alessandro|Don Alessandro]] ([[Qullanıcı muzakeresi:Don Alessandro|muzakere]]) 13:33, 2025 s. martnıñ 31 (UTC) == Universal Code of Conduct annual review: provide your comments on the UCoC and Enforcement Guidelines == <div lang="en" dir="ltr" class="mw-content-ltr"> My apologies for writing in English. {{Int:Please-translate}}. I am writing to you to let you know the annual review period for the Universal Code of Conduct and Enforcement Guidelines is open now. You can make suggestions for changes through 3 February 2025. This is the first step of several to be taken for the annual review. [[m:Special:MyLanguage/Universal_Code_of_Conduct/Annual_review|Read more information and find a conversation to join on the UCoC page on Meta]]. The [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee|Universal Code of Conduct Coordinating Committee]] (U4C) is a global group dedicated to providing an equitable and consistent implementation of the UCoC. This annual review was planned and implemented by the U4C. For more information and the responsibilities of the U4C, [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Charter|you may review the U4C Charter]]. Please share this information with other members in your community wherever else might be appropriate. -- In cooperation with the U4C, [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User talk:Keegan (WMF)|talk]]) 01:11, 2025 s. yanvarniñ 24 (UTC) </div> <!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=27746256 --> == Feminism and Folklore 2025 starts soon == <div style="border:8px maroon ridge;padding:6px;> [[File:Feminism and Folklore 2025 logo.svg|centre|550px|frameless]] ::<div lang="en" dir="ltr" class="mw-content-ltr"> <center>''{{int:please-translate}}''</center> Dear Wiki Community, You are humbly invited to organize the '''[[:m:Feminism and Folklore 2025|Feminism and Folklore 2025]]''' writing competition from February 1, 2025, to March 31, 2025 on your local Wikipedia. This year, Feminism and Folklore will focus on feminism, women's issues, and gender-focused topics for the project, with a [[:c:Commons:Wiki Loves Folklore 2025|Wiki Loves Folklore]] gender gap focus and a folk culture theme on Wikipedia. You can help Wikipedia's coverage of folklore from your area by writing or improving articles about things like folk festivals, folk dances, folk music, women and queer folklore figures, folk game athletes, women in mythology, women warriors in folklore, witches and witch hunting, fairy tales, and more. Users can help create new articles, expand or translate from a generated list of suggested articles. Organisers are requested to work on the following action items to sign up their communities for the project: # Create a page for the contest on the local wiki. # Set up a campaign on '''CampWiz''' tool. # Create the local list and mention the timeline and local and international prizes. # Request local admins for site notice. # Link the local page and the CampWiz link on the [[:m:Feminism and Folklore 2025/Project Page|meta project page]]. This year, the Wiki Loves Folklore Tech Team has introduced two new tools to enhance support for the campaign. These tools include the '''Article List Generator by Topic''' and '''CampWiz'''. The Article List Generator by Topic enables users to identify articles on the English Wikipedia that are not present in their native language Wikipedia. Users can customize their selection criteria, and the tool will present a table showcasing the missing articles along with suggested titles. Additionally, users have the option to download the list in both CSV and wikitable formats. Notably, the CampWiz tool will be employed for the project for the first time, empowering users to effectively host the project with a jury. Both tools are now available for use in the campaign. [https://tools.wikilovesfolklore.org/ '''Click here to access these tools'''] Learn more about the contest and prizes on our [[:m:Feminism and Folklore 2025|project page]]. Feel free to contact us on our [[:m:Talk:Feminism and Folklore 2025/Project Page|meta talk page]] or by email us if you need any assistance. We look forward to your immense coordination. Thank you and Best wishes, '''[[:m:Feminism and Folklore 2025|Feminism and Folklore 2025 International Team]]''' ::::Stay connected [[File:B&W Facebook icon.png|link=https://www.facebook.com/feminismandfolklore/|30x30px]]&nbsp; [[File:B&W Twitter icon.png|link=https://twitter.com/wikifolklore|30x30px]] </div></div> --[[Qullanıcı:MediaWiki message delivery|MediaWiki message delivery]] ([[Qullanıcı muzakeresi:MediaWiki message delivery|muzakere]]) 02:35, 2025 s. yanvarniñ 29 (UTC) == Wiki Loves Folklore is back! == <div lang="en" dir="ltr" class="mw-content-ltr"> {{int:please-translate}} [[File:Wiki Loves Folklore Logo.svg|right|150px|frameless]] Dear Wiki Community, You are humbly invited to participate in the '''[[:c:Commons:Wiki Loves Folklore 2025|Wiki Loves Folklore 2025]]''' an international media contest organized on Wikimedia Commons to document folklore and intangible cultural heritage from different regions, including, folk creative activities and many more. It is held every year from the '''1st till the 31st''' of March. You can help in enriching the folklore documentation on Commons from your region by taking photos, audios, videos, and [https://commons.wikimedia.org/w/index.php?title=Special:UploadWizard&campaign=wlf_2025 submitting] them in this commons contest. You can also [[:c:Commons:Wiki Loves Folklore 2025/Organize|organize a local contest]] in your country and support us in translating the [[:c:Commons:Wiki Loves Folklore 2025/Translations|project pages]] to help us spread the word in your native language. Feel free to contact us on our [[:c:Commons talk:Wiki Loves Folklore 2025|project Talk page]] if you need any assistance. '''Kind regards,''' '''Wiki loves Folklore International Team''' --[[Qullanıcı:MediaWiki message delivery|MediaWiki message delivery]] ([[Qullanıcı muzakeresi:MediaWiki message delivery|muzakere]]) 02:35, 2025 s. yanvarniñ 29 (UTC) </div> <!-- Message sent by User:Tiven2240@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery/Wikipedia&oldid=26503019 --> == Reminder: first part of the annual UCoC review closes soon == <div lang="en" dir="ltr" class="mw-content-ltr"> My apologies for writing in English. {{Int:Please-translate}}. This is a reminder that the first phase of the annual review period for the Universal Code of Conduct and Enforcement Guidelines will be closing soon. You can make suggestions for changes through [[d:Q614092|the end of day]], 3 February 2025. This is the first step of several to be taken for the annual review. [[m:Special:MyLanguage/Universal_Code_of_Conduct/Annual_review|Read more information and find a conversation to join on the UCoC page on Meta]]. After review of the feedback, proposals for updated text will be published on Meta in March for another round of community review. Please share this information with other members in your community wherever else might be appropriate. -- In cooperation with the U4C, [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User talk:Keegan (WMF)|talk]]) 00:48, 2025 s. fevralniñ 3 (UTC) </div> <!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28198931 --> == <span lang="en" dir="ltr"> Upcoming Language Community Meeting (Feb 28th, 14:00 UTC) and Newsletter</span> == <div lang="en" dir="ltr"> <section begin="message"/> Hello everyone! [[File:WP20Symbols WIKI INCUBATOR.svg|right|frameless|150x150px|alt=An image symbolising multiple languages]] We’re excited to announce that the next '''Language Community Meeting''' is happening soon, '''February 28th at 14:00 UTC'''! If you’d like to join, simply sign up on the '''[[mw:Wikimedia_Language_and_Product_Localization/Community_meetings#28_February_2025|wiki page]]'''. This is a participant-driven meeting where we share updates on language-related projects, discuss technical challenges in language wikis, and collaborate on solutions. In our last meeting, we covered topics like developing language keyboards, creating the Moore Wikipedia, and updates from the language support track at Wiki Indaba. '''Got a topic to share?''' Whether it’s a technical update from your project, a challenge you need help with, or a request for interpretation support, we’d love to hear from you! Feel free to '''reply to this message''' or add agenda items to the document '''[[etherpad:p/language-community-meeting-feb-2025|here]]'''. Also, we wanted to highlight that the sixth edition of the Language & Internationalization newsletter (January 2025) is available here: [[:mw:Special:MyLanguage/Wikimedia Language and Product Localization/Newsletter/2025/January|Wikimedia Language and Product Localization/Newsletter/2025/January]]. This newsletter provides updates from the October–December 2024 quarter on new feature development, improvements in various language-related technical projects and support efforts, details about community meetings, and ideas for contributing to projects. To stay updated, you can subscribe to the newsletter on its wiki page: [[:mw:Wikimedia Language and Product Localization/Newsletter|Wikimedia Language and Product Localization/Newsletter]]. We look forward to your ideas and participation at the language community meeting, see you there! <section end="message"/> </div> <bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> 08:29, 2025 s. fevralniñ 22 (UTC) <!-- Message sent by User:SSethi (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28217779 --> == Universal Code of Conduct annual review: proposed changes are available for comment == <div lang="en" dir="ltr" class="mw-content-ltr"> My apologies for writing in English. {{Int:Please-translate}}. I am writing to you to let you know that [[m:Special:MyLanguage/Universal_Code_of_Conduct/Annual_review/Proposed_Changes|proposed changes]] to the [[foundation:Special:MyLanguage/Policy:Universal_Code_of_Conduct/Enforcement_guidelines|Universal Code of Conduct (UCoC) Enforcement Guidelines]] and [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Charter|Universal Code of Conduct Coordinating Committee (U4C) Charter]] are open for review. '''[[m:Special:MyLanguage/Universal_Code_of_Conduct/Annual_review/Proposed_Changes|You can provide feedback on suggested changes]]''' through the [[d:Q614092|end of day]] on Tuesday, 18 March 2025. This is the second step in the annual review process, the final step will be community voting on the proposed changes. [[m:Special:MyLanguage/Universal_Code_of_Conduct/Annual_review|Read more information and find relevant links about the process on the UCoC annual review page on Meta]]. The [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee|Universal Code of Conduct Coordinating Committee]] (U4C) is a global group dedicated to providing an equitable and consistent implementation of the UCoC. This annual review was planned and implemented by the U4C. For more information and the responsibilities of the U4C, [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Charter|you may review the U4C Charter]]. Please share this information with other members in your community wherever else might be appropriate. -- In cooperation with the U4C, [[m:User:Keegan (WMF)|Keegan (WMF)]] 18:51, 2025 s. martnıñ 7 (UTC) </div> <!-- Message sent by User:Keegan (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28307738 --> == An improved dashboard for the Content Translation tool == <div lang="en" dir="ltr"> {{Int:hello}} Wikipedians, Apologies as this message is not in your language, {{Int:please-translate}}. The [[mediawikiwiki:Special:MyLanguage/Wikimedia_Language_and_Product_Localization|Language and Product Localization team]] has improved the [https://test.wikipedia.org/w/index.php?title=Special:ContentTranslation&filter-type=automatic&filter-id=previous-edits&active-list=suggestions&from=en&to=es Content Translation dashboard] to create a consistent experience for all contributors using mobile and desktop devices. The improved translation dashboard allows all logged-in users of the tool to enjoy a consistent experience regardless of their type of device. With a harmonized experience, logged-in desktop users now have access to the capabilities shown in the image below. [[file:Content_Translation_new-dashboard.png|alt=|center|thumb|576x576px|Notice that in this screenshot, the new dashboard allows: Users to adjust suggestions with the "For you" and "...More" buttons to select general topics or community-created collections (like the example of Climate topic).  Also, users can use translation to create new articles (as before) and expand existing articles section by section. You can see how suggestions are provided in the new dashboard  in two groups ("Create new pages" and "Expand with new sections")-one for each activity.]] [[File:Content_Translation_dashboard_on_desktop.png|alt=|center|thumb|577x577px|In the current dashboard, you will notice that you can't adjust suggestions to select topics or community-created collections. Also, you can't expand on existing articles by translating new sections.]] We will implement [[mw:Special:MyLanguage/Content translation#Improved translation experience|this improvement]] on your wiki '''on Monday, March 17th, 2025''' and remove the current dashboard '''by May 2025'''. Please reach out with any questions concerning the dashboard in this thread. Thank you! On behalf of the Language and Product Localization team. </div> <bdi lang="en" dir="ltr">[[User:UOzurumba (WMF)|UOzurumba (WMF)]]</bdi> 02:55, 2025 s. martnıñ 13 (UTC) <!-- Message sent by User:UOzurumba (WMF)@metawiki using the list at https://meta.wikimedia.org/w/index.php?title=User:UOzurumba_(WMF)/sandbox_CX_Unified_dashboard_announcement_list_1&oldid=28382282 --> == Final proposed modifications to the Universal Code of Conduct Enforcement Guidelines and U4C Charter now posted == <div lang="en" dir="ltr" class="mw-content-ltr"> The proposed modifications to the [[foundation:Special:MyLanguage/Policy:Universal_Code_of_Conduct/Enforcement_guidelines|Universal Code of Conduct Enforcement Guidelines]] and the U4C Charter [[m:Universal_Code_of_Conduct/Annual_review/2025/Proposed_Changes|are now on Meta-wiki for community notice]] in advance of the voting period. This final draft was developed from the previous two rounds of community review. Community members will be able to vote on these modifications starting on 17 April 2025. The vote will close on 1 May 2025, and results will be announced no later than 12 May 2025. The U4C election period, starting with a call for candidates, will open immediately following the announcement of the review results. More information will be posted on [[m:Special:MyLanguage//Universal_Code_of_Conduct/Coordinating_Committee/Election|the wiki page for the election]] soon. Please be advised that this process will require more messages to be sent here over the next two months. The [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee|Universal Code of Conduct Coordinating Committee (U4C)]] is a global group dedicated to providing an equitable and consistent implementation of the UCoC. This annual review was planned and implemented by the U4C. For more information and the responsibilities of the U4C, you may [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Charter|review the U4C Charter]]. Please share this message with members of your community so they can participate as well. -- In cooperation with the U4C, [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User_talk:Keegan (WMF)|talk]]) 02:04, 2025 s. aprelniñ 4 (UTC) </div> <!-- Mesajı gönderen kullanıcı: https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28469465 listesini kullanan Keegan (WMF)@metawiki --> == Ukraine's Cultural Diplomacy Month 2025: Invitation == <div lang="en" dir="ltr"> [[File:UCDM 2025 general.png|180px|right]] {{int:please-translate}} Hello, dear Wikipedians!<br/> [[:m:Special:MyLanguage/Wikimedia Ukraine|Wikimedia Ukraine]], in cooperation with the [[:en:Ministry of Foreign Affairs of Ukraine|MFA of Ukraine]] and [[:en:Ukrainian Institute|Ukrainian Institute]], has launched the fifth edition of writing challenge "'''[[:m:Special:MyLanguage/Ukraine's Cultural Diplomacy Month 2025|Ukraine's Cultural Diplomacy Month]]'''", which lasts from '''14th April''' until '''16th May 2025'''. The campaign is dedicated to famous Ukrainian artists of cinema, music, literature, architecture, design, and cultural phenomena of Ukraine that are now part of world heritage. We accept contributions in every language! The most active contesters will receive prizes. If you are interested in coordinating long-term community engagement for the campaign and becoming a local ambassador, we would love to hear from you! Please let us know your interest. <br/> We invite you to take part and help us improve the coverage of Ukrainian culture on Wikipedia in your language! Also, we plan to set up a [[:m:CentralNotice/Request/Ukraine's Cultural Diplomacy Month 2025|banner]] to notify users of the possibility to participate in such a challenge! [[:m:User:OlesiaLukaniuk (WMUA)|OlesiaLukaniuk (WMUA)]] ([[:m:User talk:OlesiaLukaniuk (WMUA)|talk]]) </div> 16:11, 2025 s. aprelniñ 16 (UTC) <!-- Mesajı gönderen kullanıcı: https://meta.wikimedia.org/w/index.php?title=User:OlesiaLukaniuk_(WMUA)/list_of_wikis&oldid=28552112 listesini kullanan Hide on Rosé@metawiki --> == Vote now on the revised UCoC Enforcement Guidelines and U4C Charter == <div lang="en" dir="ltr" class="mw-content-ltr"> The voting period for the revisions to the Universal Code of Conduct Enforcement Guidelines ("UCoC EG") and the UCoC's Coordinating Committee Charter is open now through the end of 1 May (UTC) ([https://zonestamp.toolforge.org/1746162000 find in your time zone]). [[m:Special:MyLanguage/Universal_Code_of_Conduct/Annual_review/2025/Voter_information|Read the information on how to participate and read over the proposal before voting]] on the UCoC page on Meta-wiki. The [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee|Universal Code of Conduct Coordinating Committee (U4C)]] is a global group dedicated to providing an equitable and consistent implementation of the UCoC. This annual review of the EG and Charter was planned and implemented by the U4C. Further information will be provided in the coming months about the review of the UCoC itself. For more information and the responsibilities of the U4C, you may [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Charter|review the U4C Charter]]. Please share this message with members of your community so they can participate as well. In cooperation with the U4C -- [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User_talk:Keegan (WMF)|talk]]) 00:34, 2025 s. aprelniñ 17 (UTC) </div> <!-- Mesajı gönderen kullanıcı: https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28469465 listesini kullanan Keegan (WMF)@metawiki --> == Sub-referencing: User testing == <div lang="en" dir="ltr"> [[File:Sub-referencing reuse visual.png|400px|right]] <small>''Apologies for writing in English, please help us by providing a translation below''</small> Hi I’m Johannes from [[:m:Wikimedia Deutschland|Wikimedia Deutschland]]'s [[:m:WMDE Technical Wishes|Technical Wishes team]]. We are making great strides with the new [[:m:WMDE Technical Wishes/Sub-referencing|sub-referencing feature]] and we’d love to invite you to take part in two activities to help us move this work further: #'''Try it out and share your feedback''' #:[[:m:WMDE Technical Wishes/Sub-referencing# Test the prototype|Please try]] the updated ''wikitext'' feature [https://en.wikipedia.beta.wmflabs.org/wiki/Sub-referencing on the beta wiki] and let us know what you think, either [[:m:Talk:WMDE Technical Wishes/Sub-referencing|on our talk page]] or by [https://greatquestion.co/wikimediadeutschland/talktotechwish booking a call] with our UX researcher. #'''Get a sneak peak and help shape the ''Visual Editor'' user designs''' #:Help us test the new design prototypes by participating in user sessions – [https://greatquestion.co/wikimediadeutschland/gxk0taud/apply sign up here to receive an invite]. We're especially hoping to speak with people from underrepresented and diverse groups. If that's you, please consider signing up! No prior or extensive editing experience is required. User sessions will start ''May 14th''. We plan to bring this feature to Wikimedia wikis later this year. We’ll reach out to wikis for piloting in time for deployments. Creators and maintainers of reference-related tools and templates will be contacted beforehand as well. Thank you very much for your support and encouragement so far in helping bring this feature to life! </div> <bdi lang="en" dir="ltr">[[User:Johannes Richter (WMDE)|Johannes Richter (WMDE)]] ([[User talk:Johannes Richter (WMDE)|talk]])</bdi> 15:04, 2025 s. aprelniñ 28 (UTC) <!-- Mesajı gönderen kullanıcı: https://meta.wikimedia.org/w/index.php?title=User:Johannes_Richter_(WMDE)/Sub-referencing/massmessage_list&oldid=28628657 listesini kullanan Johannes Richter (WMDE)@metawiki --> == <span lang="en" dir="ltr">Vote on proposed modifications to the UCoC Enforcement Guidelines and U4C Charter</span> == <div lang="en" dir="ltr"> <section begin="announcement-content" /> The voting period for the revisions to the Universal Code of Conduct Enforcement Guidelines and U4C Charter closes on 1 May 2025 at 23:59 UTC ([https://zonestamp.toolforge.org/1746162000 find in your time zone]). [[m:Special:MyLanguage/Universal Code of Conduct/Annual review/2025/Voter information|Read the information on how to participate and read over the proposal before voting]] on the UCoC page on Meta-wiki. The [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee|Universal Code of Conduct Coordinating Committee (U4C)]] is a global group dedicated to providing an equitable and consistent implementation of the UCoC. This annual review was planned and implemented by the U4C. For more information and the responsibilities of the U4C, you may [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter|review the U4C Charter]]. Please share this message with members of your community in your language, as appropriate, so they can participate as well. In cooperation with the U4C -- <section end="announcement-content" /> </div> <div lang="en" dir="ltr" class="mw-content-ltr"> [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User talk:Keegan (WMF)|talk]]) 03:40, 2025 s. aprelniñ 29 (UTC)</div> <!-- Mesajı gönderen kullanıcı: https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28618011 listesini kullanan Keegan (WMF)@metawiki --> == Enabling Dark mode for logged-out users == <div lang="en" dir="ltr"> {{int:Hello}} Wikimedians, Apologies, as this message is not written in your native language. {{Int:please-translate}}. The [[mediawikiwiki:Reading/Web|Wikimedia Foundation Web team]] will be enabling [[mediawikiwiki:Special:MyLanguage/Reading/Web/Accessibility_for_reading|dark mode]] in this Wiki by 15th May 2025 now that pages have passed our checks for accessibility and other quality checks. Congratulations! The plan to enable is made possible by the diligent work of editors and other technical contributors in your community who ensured that templates, gadgets, and other parts of pages can be accessible in dark mode. Thank you all for making dark mode available for everybody! For context, the Web team has concluded work on dark mode. If, on some wikis, the option is not yet available for logged-out users, this is likely because many pages do not yet display well in dark mode. As communities make progress on this work, we enable this feature on additional wikis once per month. If you notice any issues after enabling dark mode, please create a page: <code>Reading/Web/Accessibility for reading/Reporting/xx.wikipedia.org</code> in MediaWiki ([[mediawikiwiki:Reading/Web/Accessibility_for_reading/Reporting|like these pages]]), and report the issue in the created page. Thank you! On behalf of the [[mediawikiwiki:Reading/Web|Wikimedia Foundation Web team]]. </div> <bdi lang="en" dir="ltr">[[User:UOzurumba (WMF)|UOzurumba (WMF)]]</bdi> 00:08, 2025 s. mayısnıñ 7 (UTC) <!-- Mesajı gönderen kullanıcı: https://meta.wikimedia.org/w/index.php?title=User:UOzurumba_(WMF)/sandbox_Dark_mode_deployment_message_list_(May_2025)&oldid=28673792 listesini kullanan UOzurumba (WMF)@metawiki --> == <span lang="en" dir="ltr">Call for Candidates for the Universal Code of Conduct Coordinating Committee (U4C)</span> == <div lang="en" dir="ltr"> <section begin="announcement-content" /> The results of voting on the Universal Code of Conduct Enforcement Guidelines and Universal Code of Conduct Coordinating Committee (U4C) Charter is [[m:Special:MyLanguage/Universal Code of Conduct/Annual review/2025#Results|available on Meta-wiki]]. You may now [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2025/Candidates|submit your candidacy to serve on the U4C]] through 29 May 2025 at 12:00 UTC. Information about [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2025|eligibility, process, and the timeline are on Meta-wiki]]. Voting on candidates will open on 1 June 2025 and run for two weeks, closing on 15 June 2025 at 12:00 UTC. If you have any questions, you can ask on [[m:Talk:Universal Code of Conduct/Coordinating Committee/Election/2025|the discussion page for the election]]. -- in cooperation with the U4C, </div><section end="announcement-content" /> </div> <bdi lang="en" dir="ltr">[[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User_talk:Keegan (WMF)|muzakere]])</bdi> 22:07, 2025 s. mayısnıñ 15 (UTC) <!-- Mesajı gönderen kullanıcı: https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28618011 listesini kullanan Keegan (WMF)@metawiki --> == RfC ongoing regarding Abstract Wikipedia (and your project) == <div lang="en" dir="ltr" class="mw-content-ltr"> ''(Apologies for posting in English, if this is not your first language)'' Hello all! We opened a discussion on Meta about a very delicate issue for the development of [[:m:Special:MyLanguage/Abstract Wikipedia|Abstract Wikipedia]]: where to store the abstract content that will be developed through functions from Wikifunctions and data from Wikidata. Since some of the hypothesis involve your project, we wanted to hear your thoughts too. We want to make the decision process clear: we do not yet know which option we want to use, which is why we are consulting here. We will take the arguments from the Wikimedia communities into account, and we want to consult with the different communities and hear arguments that will help us with the decision. The decision will be made and communicated after the consultation period by the Foundation. You can read the various hypothesis and have your say at [[:m:Abstract Wikipedia/Location of Abstract Content|Abstract Wikipedia/Location of Abstract Content]]. Thank you in advance! -- [[User:Sannita (WMF)|Sannita (WMF)]] ([[User talk:Sannita (WMF)|<span class="signature-talk">{{int:Talkpagelinktext}}</span>]]) 15:26, 2025 s. mayısnıñ 22 (UTC) </div> <!-- Mesajı gönderen kullanıcı: https://meta.wikimedia.org/w/index.php?title=User:Sannita_(WMF)/Mass_sending_test&oldid=28768453 listesini kullanan Sannita (WMF)@metawiki --> == <span lang="tr" dir="ltr">Wikimedia Vakfı Mütevelli Heyeti 2025 Seçimi ve Soru Sormaya Davet</span> == <div lang="tr" dir="ltr"> <section begin="announcement-content" /> :''[[m:Special:MyLanguage/Wikimedia Foundation elections/2025/Announcement/Selection announcement|{{int:interlanguage-link-mul}}]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Wikimedia Foundation elections/2025/Announcement/Selection announcement}}&language=&action=page&filter= {{int:please-translate}}]'' Değerli İlgililier, Bu yıl, Topluluklarca ve İştiraklerce seçilmiş 2 (iki) mütevellinin Wikimedia Vakfı Mütevelli Heyeti'ndeki görev süresi sona ermektedir. Heyet, Hareket’teki herkesi bu yılki seçim sürecine katılmaya ve bu koltukları doldurmak için oy kullanmaya davet ediyor. Bu süreci, Vakıf personelinin desteğiyle Seçim Komitesi yürütecektir [2]. 2025 yılı topluluk ve iştiraklerce seçilen mütevellileri seçim sürecinde aday olmayan mütevellilerden (Raju Narisetti, Shani Evenstein Sigalov, Lorenzo Losa, Kathy Collins, Victoria Doronina ve Esra'a Al Shafei) oluşan Yönetişim Komitesi[3], 2025 mütevelli seçim süreci için Mütevelli Heyeti'nin gözetimini sağlamak ve Mütevelli Heyeti'ni bilgilendirmekle görevlidir. Seçim Komitesi, Mütevelli Heyeti ve personelin rolleri hakkında daha fazla ayrıntı burada bulunmaktadır [4]. Planlanan ana tarihleri aşağıda bulabilirsiniz: * 22 Mayıs – 5 Haziran: Duyuru (bu mesak) ve soru sorma dönemine davet [6] * 17 Haziran – 1 Temmuz, 2025: Adaylık çağrısı * Temmuz 2025: Eğer ihtiyaç olursa, iştirakler 10 veya daha fazla aday başvurusu olması halinde aday kısa listesi için oy kullanacak [5] * Ağustos 2025: Kampanya dönemi * Ağustos – Eylül 2025: 2 haftalık topluluk oy kullanma dönemi * Ekim – Kasım 2025: Seçilen adayların geçmiş kontrolü * Aralık 2025’teki Heyet Toplantısı: Yeni mütevellilerin yerlerini alması Detaylı zaman çizelgesi, adaylık süreci, kampanya kuralları ve seçmen kriterleri dahil olmak üzere 2025 seçim süreci hakkında bu Meta-wiki sayfasından daha fazlasını öğreniniz. [[m:Special:MyLanguage/Wikimedia_Foundation_elections/2025|[link]]]. '''Soru Çağrısı''' Her seçim sürecinde topluluk, Mütevelli Heyeti adaylarının yanıtlaması için soru gönderme imkânına sahiptir. Seçim Komitesi, adayların yanıtlaması için topluluk tarafından oluşturulan soru listesinden sorular seçer. Adayların seçilebilmeleri için başvuruda istenen tüm soruları yanıtlamaları gerekmektedir; aksi takdirde başvuruları diskalifiye edilecektir. Bu yıl, Seçim Komitesi adayların yanıtlaması için 5 soru seçecektir. Seçilen sorular, benzer veya ilişkili olmaları halinde, topluluktan gönderilen soruların bir kombinasyonu olabilir. [[m:Special:MyLanguage/Wikimedia_Foundation_elections/2025/Questions_for_candidates|[link]]] '''Gönüllü Seçimi''' 2025'in seçim sürecine dahil olmanın bir diğer yolu da Seçim Gönüllüsü olmaktır. Seçim Gönüllüleri, Seçim Komitesi ile kendi toplulukları arasında bir köprüdür. Topluluklarının temsil edilmesini sağlamaya ve oy kullanmaları için onları harekete geçirmeye yardımcı olurlar. Program ve nasıl katılacağınız hakkında daha fazla bilgiyi bu Meta-wiki sayfasında bulabilirsiniz [[m:Wikimedia_Foundation_elections/2025/Election_volunteers|[link]]]. Teşekkürler! [1] https://meta.wikimedia.org/wiki/Wikimedia_Foundation_elections/2022/Results [2] https://foundation.wikimedia.org/wiki/Committee:Elections_Committee_Charter [3] https://foundation.wikimedia.org/wiki/Resolution:Committee_Membership,_December_2024 [4] https://meta.wikimedia.org/wiki/Wikimedia_Foundation_elections_committee/Roles [5] https://meta.wikimedia.org/wiki/Wikimedia_Foundation_elections/2025/FAQ [6] https://meta.wikimedia.org/wiki/Wikimedia_Foundation_elections/2025/Questions_for_candidates Saygılar, Victoria Doronina Seçim Komitesi Kurul İrtibat Kişisi Yönetişim Komitesi<section end="announcement-content" /> </div> [[Qullanıcı:MediaWiki message delivery|MediaWiki message delivery]] ([[Qullanıcı muzakeresi:MediaWiki message delivery|muzakere]]) 03:07, 2025 s. mayısnıñ 28 (UTC) <!-- Mesajı gönderen kullanıcı: https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28618011 listesini kullanan RamzyM (WMF)@metawiki --> == <span lang="en" dir="ltr"> Upcoming Deployment of the CampaignEvents Extension</span> == <div lang="en" dir="ltr"> <section begin="message"/> Hello everyone, ''(Apologies for posting in English if English is not your first language. Please help translate to your language.)'' The Campaigns Product Team is planning a global deployment of the '''[[:mw:Help:Extension:CampaignEvents|CampaignEvents extension]]''' to all Wikipedias, including this wiki, during the '''week of June 23rd'''. This extension is designed to help organizers plan and manage events, WikiProjects, and other on-wiki collaborations - and to make these efforts more discoverable. The three main features of this extension are: * '''[[:m:Event_Center/Registration|Event Registration]]''': A simple way to sign up for events on the wiki. * '''[[:m:CampaignEvents/Collaboration_list|Collaboration List]]''': A global list of events and a local list of WikiProjects, accessible at '''[[:m:Special:AllEvents|Special:AllEvents]]'''. * '''[[:m:Campaigns/Foundation_Product_Team/Invitation_list|Invitation Lists]]''': A tool to help organizers find editors who might want to join, based on their past contributions. '''Note''': The extension comes with a new user right called '''"Event Organizer"''', which will be managed by administrators on this wiki. Organizer tools like Event Registration and Invitation Lists will only work if someone is granted this right. The Collaboration List is available to everyone immediately after deployment. The extension is already live on several wikis, including '''Meta, Wikidata, English Wikipedia''', and more ( [[m:CampaignEvents/Deployment_status#Current_Deployment_Status_for_CampaignEvents_extension| See the full deployment list]]) If you have any questions, concerns, or feedback, please feel free to share them on the [[m:Talk:CampaignEvents| extension talkpage]]. We’d love to hear from you before the rollout. Thank you! <section end="message"/> </div> <bdi lang="en" dir="ltr">[[User:Udehb-WMF|Udehb-WMF]] ([[User talk:Udehb-WMF|muzakere]]) 16:47, 2025 s. mayısnıñ 29 (UTC)</bdi> <!-- Mesajı gönderen kullanıcı: https://meta.wikimedia.org/w/index.php?title=User:Udehb-WMF/sandbox/deployment_audience&oldid=28803829 listesini kullanan Udehb-WMF@metawiki --> == Vote now in the 2025 U4C Election == <div lang="en" dir="ltr" class="mw-content-ltr"> Apologies for writing in English. {{Int:Please-translate}} Eligible voters are asked to participate in the 2025 [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee|Universal Code of Conduct Coordinating Committee]] election. More information–including an eligibility check, voting process information, candidate information, and a link to the vote–are available on Meta at the [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Election/2025|2025 Election information page]]. The vote closes on 17 June 2025 at [https://zonestamp.toolforge.org/1750161600 12:00 UTC]. Please vote if your account is eligible. Results will be available by 1 July 2025. -- In cooperation with the U4C, [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User talk:Keegan (WMF)|talk]]) 23:00, 2025 s. iyünniñ 13 (UTC) </div> <!-- Mesajı gönderen kullanıcı: https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28848819 listesini kullanan Keegan (WMF)@metawiki --> == <span lang="tr" dir="ltr">Wikimedia Vakfı Mütevelli Heyeti 2025 - Adaylık Çağrısı</span> == <div lang="tr" dir="ltr"> <section begin="announcement-content" /> :''<div class="plainlinks">[[m:Special:MyLanguage/Wikimedia Foundation elections/2025/Announcement/Call for candidates|{{int:interlanguage-link-mul}}]] • [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Wikimedia Foundation elections/2025/Announcement/Call for candidates}}&language=&action=page&filter= {{int:please-translate}}]</div> Herkese merhaba, [[m:Special:MyLanguage/Wikimedia Foundation elections/2025|Wikimedia Vakıf Mütevelli Heyeti seçimleri adaylık çağrısı]] 17 Haziran 2025 - 2 Temmuz 2025 saat 11:59 UTC boyunca devam edecektir. Mütevelli Heyeti, Wikimedia Vakfı'nın çalışmalarını denetler ve her Mütevelli üç yıllık süreyle için görev yapar [2]. Bu, gönüllü bir pozisyondur. Bu yıl, Wikimedia topluluğu Ağustos sonundan Eylül 2025'e kadar Vakıf Yönetim Kurulu'ndaki iki (2) koltuğu doldurmak için oy kullanacak. Siz - ya da tanıdığınız biri - Wikimedia Vakfı'nın Mütevelli Heyeti'ne katılmak için uygun olabilir misiniz? [3] Bu liderlik pozisyonlarına aday olmak için neler gerektiği ve [[m:Special:MyLanguage/Wikimedia Foundation elections/2025/Candidate application|şuradaki Meta-wiki sayfasında]] adaylığınızı nasıl sunacağınız hakkında daha fazla bilgi edinin veya bir başkasını bu yılki seçimlerde aday olmasıiçin teşvik edin. Saygılarımızla, Abhishek Suryawanshi<br /> Seçim Komitesi Başkanı Seçim Komitesi ve Yönetim Komitesi adına [1] https://meta.wikimedia.org/wiki/Special:MyLanguage/Wikimedia_Foundation_elections/2025/Call_for_candidates [2] https://foundation.wikimedia.org/wiki/Legal:Bylaws#(B)_Term. [3] https://meta.wikimedia.org/wiki/Special:MyLanguage/Wikimedia_Foundation_elections/2025/Resources_for_candidates<section end="announcement-content" /> </div> [[Qullanıcı:MediaWiki message delivery|MediaWiki message delivery]] ([[Qullanıcı muzakeresi:MediaWiki message delivery|muzakere]]) 17:43, 2025 s. iyünniñ 17 (UTC) <!-- Mesajı gönderen kullanıcı: https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=28866958 listesini kullanan RamzyM (WMF)@metawiki --> == <span lang="en" dir="ltr">Sister Projects Task Force reviews Wikispore and Wikinews</span> == <div lang="en" dir="ltr"> <section begin="message"/> Dear Wikimedia Community, The [[m:Wikimedia Foundation Community Affairs Committee|Community Affairs Committee (CAC)]] of the Wikimedia Foundation Board of Trustees assigned [[m:Wikimedia Foundation Community Affairs Committee/Sister Projects Task Force|the Sister Projects Task Force (SPTF)]] to update and implement a procedure for assessing the lifecycle of Sister Projects – wiki [[m:Wikimedia projects|projects supported by Wikimedia Foundation (WMF)]]. A vision of relevant, accessible, and impactful free knowledge has always guided the Wikimedia Movement. As the ecosystem of Wikimedia projects continues to evolve, it is crucial that we periodically review existing projects to ensure they still align with our goals and community capacity. Despite their noble intent, some projects may no longer effectively serve their original purpose. '''Reviewing such projects is not about giving up – it's about responsible stewardship of shared resources'''. Volunteer time, staff support, infrastructure, and community attention are finite, and the non-technical costs tend to grow significantly as our ecosystem has entered a different age of the internet than the one we were founded in. Supporting inactive projects or projects that didn't meet our ambitions can unintentionally divert these resources from areas with more potential impact. Moreover, maintaining projects that no longer reflect the quality and reliability of the Wikimedia name stands for, involves a reputational risk. An abandoned or less reliable project affects trust in the Wikimedia movement. Lastly, '''failing to sunset or reimagine projects that are no longer working can make it much harder to start new ones'''. When the community feels bound to every past decision – no matter how outdated – we risk stagnation. A healthy ecosystem must allow for evolution, adaptation, and, when necessary, letting go. If we create the expectation that every project must exist indefinitely, we limit our ability to experiment and innovate. Because of this, SPTF reviewed two requests concerning the lifecycle of the Sister Projects to work through and demonstrate the review process. We chose Wikispore as a case study for a possible new Sister Project opening and Wikinews as a case study for a review of an existing project. Preliminary findings were discussed with the CAC, and a community consultation on both proposals was recommended. === Wikispore === The [[m:Wikispore|application to consider Wikispore]] was submitted in 2019. SPTF decided to review this request in more depth because rather than being concentrated on a specific topic, as most of the proposals for the new Sister Projects are, Wikispore has the potential to nurture multiple start-up Sister Projects. After careful consideration, the SPTF has decided '''not to recommend''' Wikispore as a Wikimedia Sister Project. Considering the current activity level, the current arrangement allows '''better flexibility''' and experimentation while WMF provides core infrastructural support. We acknowledge the initiative's potential and seek community input on what would constitute a sufficient level of activity and engagement to reconsider its status in the future. As part of the process, we shared the decision with the Wikispore community and invited one of its leaders, Pharos, to an SPTF meeting. Currently, we especially invite feedback on measurable criteria indicating the project's readiness, such as contributor numbers, content volume, and sustained community support. This would clarify the criteria sufficient for opening a new Sister Project, including possible future Wikispore re-application. However, the numbers will always be a guide because any number can be gamed. === Wikinews === We chose to review Wikinews among existing Sister Projects because it is the one for which we have observed the highest level of concern in multiple ways. Since the SPTF was convened in 2023, its members have asked for the community's opinions during conferences and community calls about Sister Projects that did not fulfil their promise in the Wikimedia movement.[https://commons.wikimedia.org/wiki/File:WCNA_2024._Sister_Projects_-_opening%3F_closing%3F_merging%3F_splitting%3F.pdf <nowiki>[1]</nowiki>][https://meta.wikimedia.org/wiki/Wikimedia_Foundation_Community_Affairs_Committee/Sister_Projects_Task_Force#Wikimania_2023_session_%22Sister_Projects:_past,_present_and_the_glorious_future%22 <nowiki>[2]</nowiki>][https://meta.wikimedia.org/wiki/WikiConvention_francophone/2024/Programme/Quelle_proc%C3%A9dure_pour_ouvrir_ou_fermer_un_projet_%3F <nowiki>[3]</nowiki>] Wikinews was the leading candidate for an evaluation because people from multiple language communities proposed it. Additionally, by most measures, it is the least active Sister Project, with the greatest drop in activity over the years. While the Language Committee routinely opens and closes language versions of the Sister Projects in small languages, there has never been a valid proposal to close Wikipedia in major languages or any project in English. This is not true for Wikinews, where there was a proposal to close English Wikinews, which gained some traction but did not result in any action[https://meta.wikimedia.org/wiki/Proposals_for_closing_projects/Closure_of_English_Wikinews <nowiki>[4]</nowiki>][https://meta.wikimedia.org/wiki/WikiConvention_francophone/2024/Programme/Quelle_proc%C3%A9dure_pour_ouvrir_ou_fermer_un_projet_%3F <nowiki>[5]</nowiki>, see section 5] as well as a draft proposal to close all languages of Wikinews[https://meta.wikimedia.org/wiki/Talk:Proposals_for_closing_projects/Archive_2#Close_Wikinews_completely,_all_languages? <nowiki>[6]</nowiki>]. [[:c:File:Sister Projects Taskforce Wikinews review 2024.pdf|Initial metrics]] compiled by WMF staff also support the community's concerns about Wikinews. Based on this report, SPTF recommends a community reevaluation of Wikinews. We conclude that its current structure and activity levels are the lowest among the existing sister projects. SPTF also recommends pausing the opening of new language editions while the consultation runs. SPTF brings this analysis to a discussion and welcomes discussions of alternative outcomes, including potential restructuring efforts or integration with other Wikimedia initiatives. '''Options''' mentioned so far (which might be applied to just low-activity languages or all languages) include but are not limited to: *Restructure how Wikinews works and is linked to other current events efforts on the projects, *Merge the content of Wikinews into the relevant language Wikipedias, possibly in a new namespace, *Merge content into compatibly licensed external projects, *Archive Wikinews projects. Your insights and perspectives are invaluable in shaping the future of these projects. We encourage all interested community members to share their thoughts on the relevant discussion pages or through other designated feedback channels. === Feedback and next steps === We'd be grateful if you want to take part in a conversation on the future of these projects and the review process. We are setting up two different project pages: [[m:Public consultation about Wikispore|Public consultation about Wikispore]] and [[m:Public consultation about Wikinews|Public consultation about Wikinews]]. Please participate between 27 June 2025 and 27 July 2025, after which we will summarize the discussion to move forward. You can write in your own language. I will also host a community conversation 16th July Wednesday 11.00 UTC and 17th July Thursday 17.00 UTC (call links to follow shortly) and will be around at Wikimania for more discussions. <section end="message"/> </div> -- [[User:Victoria|Victoria]] on behalf of the Sister Project Task Force, 20:56, 2025 s. iyünniñ 27 (UTC) <!-- Mesajı gönderen kullanıcı: https://meta.wikimedia.org/w/index.php?title=User:Johan_(WMF)/Sister_project_MassMassage_on_behalf_of_Victoria/Target_list&oldid=28911188 listesini kullanan Johan (WMF)@metawiki --> == Wikidata Item and Property labels soon displayed in Wiki Watchlist/Recent Changes == ''(Apologies for posting in English, you can help by translating into your language)'' Hello everyone, the [[m:Wikidata_For_Wikimedia_Projects/Clearer_Wikidata_Edit_Summaries/Resolve_Labels|Wikidata For Wikimedia Projects]] team is excited to announce an upcoming change in how Wikidata edit changelogs are displayed in your [[Special:Watchlist|Watchlists]] and [[Special:RecentChanges|Recent Changes]] lists. If an edit is made on Wikidata that affects a page in another Wikimedia Project, the changelog will contain some information about the nature of the edit. This can include a QID (or Q-number), a PID (or P-number) and a value (which can be text, numbers, dates, or also QID or PID’s). Confused by these terms? See the [[d:Special:MyLanguage/Wikidata:Glossary|Wikidata:Glossary]] for further explanations. The upcoming change is scheduled for '''17.07.2025''', between '''1300 - 1500 UTC'''. The change will display the label (item name) alongside any QID or PIDs, as seen in the image below: [[File:Apr10 edit summary on Wikidata.png|An edit sum entry on Wikidata, labels display alongside their P- and Q-no.'s]] These changes will only be visible if you have Wikidata edits enabled in your User Preferences for Watchlists and Recent Changes, or have the active filter ‘Wikidata edits’ checkbox toggled on, directly on the Watchlist and Recent Changes pages. Your bot and gadget may be affected! There are thousands of bots, gadgets and user-scripts and whilst we have researched potential effects to many of them, we cannot guarantee there won’t be some that are broken or affected by this change. Further information and context about this change, including how your bot may be affected can be found on this [[m:Wikidata_For_Wikimedia_Projects/Clearer_Wikidata_Edit_Summaries/Resolve_Labels|project task page]]. We welcome your questions and feedback, please write to us on this dedicated [[m:Talk:Wikidata_For_Wikimedia_Projects/Clearer_Wikidata_Edit_Summaries/Resolve_Labels|Talk page]]. Thank you, - [[m:User:Danny_Benjafield_(WMDE)|Danny Benjafield (WMDE)]] on behalf of the Wikidata For Wikimedia Projects Team. [[Qullanıcı:MediaWiki message delivery|MediaWiki message delivery]] ([[Qullanıcı muzakeresi:MediaWiki message delivery|muzakere]]) 12:45, 2025 s. iyülniñ 14 (UTC) <!-- Mesajı gönderen kullanıcı: https://meta.wikimedia.org/w/index.php?title=User:Danny_Benjafield_(WMDE)/MassMessage_Test_List&oldid=28981877 listesini kullanan Danny Benjafield (WMDE)@metawiki --> == <span lang="en" dir="ltr">Temporary accounts will be rolled out soon</span> == <div lang="en" dir="ltr"> <section begin="body"/> Hello, we are the Wikimedia Foundation [[mw:Special:MyLanguage/Product Safety and Integrity|Product Safety and Integrity]] team. We would like to announce that '''we plan to enable [[mw:Special:MyLanguage/Trust and Safety Product/Temporary Accounts|temporary accounts]] for this wiki in the week of September 1'''. Temporary accounts are successfully live on 30 wikis, including many large ones like German, Japanese, and French. The change they bring is especially relevant to logged-out editors, who this feature is designed to protect. But it is also relevant to community members like mentors, patrollers, and admins – anyone who reverts edits, blocks users, or otherwise interacts with logged-out editors as part of keeping the wikis safe and accurate. '''Why we are building temporary accounts''' Our wikis should be safer to edit by default for logged-out editors. Temporary accounts allow people to continue editing the wikis without creating an account, while avoiding publicly tying their edits to their IP address. We believe this is in the best interest of our logged-out editors, who make valuable contributions to the wikis and who may later create accounts and grow our community of editors, admins, and other roles. Even though the wikis do warn logged-out editors that their IP address will be associated with their edit, many people may not understand what an IP address is, or that it could be used to connect them to other information about them in ways they might not expect. Additionally, our moderation software and tools rely too heavily on network origin (IP addresses) to identify users and patterns of activity, especially as IP addresses themselves are becoming less stable as identifiers. Temporary accounts allow for more precise interactions with logged-out editors, including more precise blocks, and can help limit how often we unintentionally end up blocking good-faith users who use the same IP addresses as bad-faith users. '''How temporary accounts work''' [[File:Temporary account banner and empty talk page.png|thumb]] Any time a logged-out user publishes an edit on this wiki, a cookie will be set in this user's browser, and a temporary account tied with this cookie will be automatically created. This account's name will follow the pattern: <code dir=ltr>~2025-12345-67</code> (a tilde, current year, a number). On pages like Recent Changes or page history, this name will be displayed. The cookie will expire 90 days after its creation. As long as it exists, all edits made from this device will be attributed to this temporary account. It will be the same account even if the IP address changes, unless the user clears their cookies or uses a different device or web browser. A record of the IP address used at the time of each edit will be stored for 90 days after the edit. However, only some logged-in users will be able to see it. '''What does this mean for different groups of users?''' '''For logged-out editors''' * This increases privacy: currently, if you do not use a registered account to edit, then everybody can see the IP address for the edits you made, even after 90 days. That will no longer be possible on this wiki. * If you use a temporary account to edit from different locations in the last 90 days (for example at home and at a coffee shop), the edit history and the IP addresses for all those locations will now be recorded together, for the same temporary account. Users who [[foundation:Special:MyLanguage/Policy:Access_to_temporary_account_IP_addresses|meet the relevant requirements]] will be able to view this data. If this creates any personal security concerns for you, please contact talktohumanrights at wikimedia.org for advice. '''For community members interacting with logged-out editors''' * A temporary account is uniquely linked to a device. In comparison, an IP address can be shared with different devices and people (for example, different people at school or at work might have the same IP address). * Compared to the current situation, it will be safer to assume that a temporary user's talk page belongs to only one person, and messages left there will be read by them. As you can see in the screenshot, temporary account users will receive notifications. It will also be possible to thank them for their edits, ping them in discussions, and invite them to get more involved in the community. '''For users who use IP address data to moderate and maintain the wiki''' * '''For patrollers''' who track persistent abusers, investigate violations of policies, etc.: Users who [[foundation:Special:MyLanguage/Policy:Access_to_temporary_account_IP_addresses|meet the requirements]] will be able to reveal temporary users' IP addresses and all contributions made by temporary accounts from a specific IP address or range ([[Special:IPContributions]]). They will also have access to useful information about the IP addresses thanks to the [[mw:Special:MyLanguage/Trust and Safety Product/IP Info|IP Info]] feature. Many other pieces of software have been built or adjusted to work with temporary accounts, including AbuseFilter, global blocks, Global User Contributions, and more. (For information for volunteer developers on how to update the code of your tools – see the last part of the message.) * '''For admins blocking logged-out editors''': ** It will be possible to block many abusers by just blocking their temporary accounts. A blocked person won't be able to create new temporary accounts quickly if the admin selects the [[mw:Special:MyLanguage/Autoblock|autoblock]] option. ** It will still be possible to block an IP address or IP range. * Temporary accounts will not be retroactively applied to contributions made before the deployment. On Special:Contributions, you will be able to see existing IP user contributions, but not new contributions made by temporary accounts on that IP address. Instead, you should use Special:IPContributions for this. '''Our requests for you, and next steps''' * If you know of any tools, bots, gadgets etc. using data about IP addresses or being available for logged-out users, you may want to test if they work on [[testwiki:Main_Page|testwiki]] or [[test2wiki:Main_Page|test2wiki]]. If you are a volunteer developer, [[mw:Special:MyLanguage/Trust and Safety Product/Temporary Accounts/For developers|read our documentation for developers]], and in particular, the section on [[mw:Special:MyLanguage/Trust and Safety Product/Temporary Accounts/For developers#How should I update my code?|how your code might need to be updated]]. * If you want to test the temporary account experience, for example just to check what it feels like, go to testwiki or test2wiki and edit without logging in. * Tell us if you know of any difficulties that need to be addressed. We will try to help, and if we are not able, we will consider the available options. * Look at our [[m:Meta:Babel#Temporary_Accounts:_access_to_IP_addresses_and_next_steps|previous message]] about requirements for users without extended rights who may need access to IP addresses. To learn more about the project, check out [[mw:Special:MyLanguage/Trust and Safety Product/Temporary Accounts/FAQ|our FAQ]] – you will find many useful answers there. You may also [[mw:Special:MyLanguage/Trust and Safety Product/Temporary Accounts/Updates|look at the updates]] (we have just posted one) and [[mw:Newsletter:Product Safety and Integrity|subscribe to our new newsletter]]. If you'd like to talk to me (Szymon) off-wiki, you will find me on Discord and Telegram. Thank you!<section end="body" /> </div> <bdi lang="en" dir="ltr">[[m:user:NKohli (WMF)|NKohli (WMF)]], [[m:user:SGrabarczuk (WMF)|SGrabarczuk (WMF)]]</bdi> 21:35, 2025 s. avgustnıñ 26 (UTC) <!-- Mesajı gönderen kullanıcı: https://meta.wikimedia.org/w/index.php?title=User:Quiddity_(WMF)/sandbox6&oldid=29181713 listesini kullanan Quiddity (WMF)@metawiki --> == <span lang="tr" dir="ltr">Sözünüzü söyleyin: 2025 Mütevelli Heyeti seçiminde oy kullanın</span> == <div lang="tr" dir="ltr"> <section begin="announcement-content" /> Herkese merhaba, [[m:Special:MyLanguage/Wikimedia Foundation elections/2025|2025 yılı Mütevelli Heyeti seçimleri]] için seçim dönemi başladı. Adaylar Heyetteki 2 (iki) boş koltuk için yarışmakta. Oy kullanma kriterlerine uygunluğunuzu kontrol etmek için lütfen [[m:Special:MyLanguage/Wikimedia Foundation elections/2025/Voter eligibility guidelines|seçmen kriterleri sayfasını]] ziyaret edin. [[m:Special:MyLanguage/Wikimedia Foundation elections/2025/Candidates|Başvuru beyanlarını okuyarak ve adaylık videolarını izleyerek]] kendilerini tanıyın. <div class="mw-translate-fuzzy"> Hazır olduğunuzda, oy kullanmak için [[m:Special:SecurePoll/vote/405|SecurePoll]] oylama sayfasına gidin. Oylama 8 Ekim 00:00 UTC'den 22 Ekim 23:59 UTC'ye kadar açıktır. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> '''The vote is open from October 8 at 00:00 UTC to October 22 at 23:59 UTC.''' </div> Saygılarımızla, Abhishek Suryawanshi<br />Seçim Komitesi Başkanı<section end="announcement-content" /> </div> [[Qullanıcı:MediaWiki message delivery|MediaWiki message delivery]] ([[Qullanıcı muzakeresi:MediaWiki message delivery|muzakere]]) 04:48, 2025 s. oktâbrniñ 9 (UTC) <!-- Mesajı gönderen kullanıcı: https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=29360896 listesini kullanan RamzyM (WMF)@metawiki --> == Support the language standard in Romania == Dear Crimean Tatar community, The Tatars in Romania use different orthography and it's a must to put a converter to the Crimean Tatar Wikipedia for this language variant. Please share your opinions with us. ([https://phabricator.wikimedia.org/T396286 See T396286]) [[Qullanıcı:Zolgoyo|Zolgoyo]] ([[Qullanıcı muzakeresi:Zolgoyo|muzakere]]) 10:15, 2025 s. oktâbrniñ 12 (UTC) ::The project to create a converter is now in stop, due to unclear progress. The possible project will be: # Allow crh-RO as a interface language # Create a namespace "R:", to create articles in Romania standard : Some kind of example: [[R:Rumaniye]] [[Qullanıcı:Zolgoyo|Zolgoyo]] ([[Qullanıcı muzakeresi:Zolgoyo|muzakere]]) 07:32, 2025 s. oktâbrniñ 25 (UTC) === Comment === * Ayrı vikipediya bölügini açmaq daa oñaytlı olmazmı? Şimaliy/cenübiy azerbaycanca, klassik/resmiy belarusça, kurmanci/sorani kürtçe kibi. [[Qullanıcı:Don Alessandro|Don Alessandro]] ([[Qullanıcı muzakeresi:Don Alessandro|muzakere]]) 14:22, 2025 s. oktâbrniñ 28 (UTC) *:Desteklenmey. Ayrı bir til kodu yoq. İdareciler bu til variantınıñ ayrı kodu içün (tek Vikipemediya içinde) pek feniy areketler kerek ekenni tüşüne. Yañı kerek körmeyler. Ne qadar zamanıñda belarusça (be-tarask) içün şunu etken olsalarda. İsteseñiz siz söyleşiñiz olarnen? Pek sıcaq baqmaylar menim fikrimce bu işke (ya da maña). [[Qullanıcı:Zolgoyo|Zolgoyo]] ([[Qullanıcı muzakeresi:Zolgoyo|muzakere]]) 14:44, 2025 s. oktâbrniñ 28 (UTC) * Neçün RMTTDBniñ qullanğan elifbesini degil, Qırım variantından daa uzaq olğan Bukreş universiteti elifbesini qullanmağa teklif etesiñiz? Bugün Taner Murattan başqa onı kim ve qayerde qullana? Añlağanıma köre mekteplerde qullanılmaz şu elifbe https://www.facebook.com/photo/?fbid=1254590746708580&set=a.1055772706590386 [[Qullanıcı:Don Alessandro|Don Alessandro]] ([[Qullanıcı muzakeresi:Don Alessandro|muzakere]]) 14:22, 2025 s. oktâbrniñ 28 (UTC) *:@[[Qullanıcı:Don Alessandro|Don Alessandro]] Bu elifbe edebiyat qurğandır. Taner Murat bu elifbeni qullanıp Romaniya variantını tanıttı. Tatar fırqasınıñ elifbesi pek uyğun degildir, arifler eksik ya da fazla. Ve de eñ önemlisi, til qaidesi yoq. Taner Murat grammatika qurğan (meselâ sözlerin B, D [istisna ''ald'' ve ''dad''], G, Ğ, I, Ó, U, Ú, V ariflerinen bitmemesi kibi), isimler türetkendir (''uzakses, uzakkaberleşme, şagîlgan, ómírbílímí'' v.b.), alıntılar cedvelegen (''liçensa, ençiklopediya, biçikleta, kyúveta, pyúre'' v.b.), onday şey iç kimse etmedi, ne Tatar fırqası ne de başqası! Açıq aytayım, bu fırqa tilimiz içün esas bir adım atmadı. Onıñ içün bu variantta edebiyat tek bu ortografiyanen ola bilir. [[Qullanıcı:Zolgoyo|Zolgoyo]] ([[Qullanıcı muzakeresi:Zolgoyo|muzakere]]) 14:57, 2025 s. oktâbrniñ 28 (UTC) === Support === # {{Support}} [[Qullanıcı:Zolgoyo|Zolgoyo]] ([[Qullanıcı muzakeresi:Zolgoyo|muzakere]]) 10:15, 2025 s. oktâbrniñ 12 (UTC) # {{Support}} --[[Qullanıcı:Devlet Geray|Devlet Geray]] ([[Qullanıcı muzakeresi:Devlet Geray|muzakere]]) 11:48, 2025 s. oktâbrniñ 12 (UTC) === Against === == <span lang="en" dir="ltr">Help us decide the name of the new Abstract Wikipedia project</span> == <div lang="en" dir="ltr"> <section begin="function1"/> {{int:Hello}}. Please help pick a name for the new Abstract Wikipedia wiki project. This project will be a wiki that will enable users to combine functions from [[:f:|Wikifunctions]] and data from Wikidata in order to generate natural language sentences in any supported languages. These sentences can then be used by any Wikipedia (or elsewhere). There will be two rounds of voting, each followed by legal review of candidates, with votes beginning on 20 October and 17 November 2025. Our goal is to have a final project name selected on mid-December 2025. If you would like to participate, then '''[[m:Special:MyLanguage/Abstract Wikipedia/Abstract Wikipedia naming contest|please learn more and vote now]]''' at meta-wiki. {{Int:Feedback-thanks-title}} <section end="function1"/> </div> -- [[User:Sannita (WMF)|User:Sannita (WMF)]] ([[User talk:Sannita (WMF)|talk]]) 11:42, 2025 s. oktâbrniñ 20 (UTC) <!-- Mesajı gönderen kullanıcı: https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=29432175 listesini kullanan Sannita (WMF)@metawiki --> == <span lang="tr" dir="ltr">Hareket’in çeşitli komitelerine katılacak gönüllüler aranıyor.</span> == <div lang="tr" dir="ltr"> <section begin="announcement-content" /> Her yıl, genellikle Ekim ayından Aralık ayına kadar, Hareket’in çeşitli komiteleri yeni gönüllüler arar. Komiteler hakkında daha fazla bilgiyi herbirinin Meta-wiki sayfalarında bulabilirsiniz: *[[m:Special:MyLanguage/Affiliations Committee|İştirak Komitesi (AffCom)]] *[[m:Special:MyLanguage/Ombuds commission|Ombudsman Komitesi (OC)]] *[[m:Special:MyLanguage/Wikimedia Foundation/Legal/Community Resilience and Sustainability/Trust and Safety/Case Review Committee|Dava İnceleme Komitesi (CRC)]] Komiteler için başvurular 30 Ekim 2025 tarihinde başlar. İştirak Komitesi için başvurular 11 Aralık 2025, Ombudsman Komitesi ve Vaka İnceleme Komitesi için başvurular ise 11 Aralık 2025 tarihinde sona erer. [[m:Special:MyLanguage/Wikimedia Foundation/Legal/Committee appointments|Meta-wiki'deki görevlendirme sayfasını ziyaret ederek]] başvurunun nasıl yapıldığını öğrenin. Sorularınız varsa tartışma sayfasına yazın veya cst[[File:At sign.svg|16x16px|link=|(_AT_)]]wikimedia.org adresine e-posta gönderiniz. Komite Destek Ekibi adına, <section end="announcement-content" /> </div> -[[m:User:MKaur (WMF)| MKaur (WMF)]] 14:12, 2025 s. oktâbrniñ 30 (UTC) <!-- Mesajı gönderen kullanıcı: https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=29517125 listesini kullanan MKaur (WMF)@metawiki --> == <span lang="en" dir="ltr">Reminder: Help us decide the name of the new Abstract Wikipedia project</span> == <div lang="en" dir="ltr"> <section begin="function2"/> {{int:Hello}}. Reminder: Please help to choose name for the new Abstract Wikipedia wiki project. The finalist vote starts today. The finalists for the name are: <span lang="en" dir="ltr" class="mw-content-ltr">Abstract Wikipedia, Multilingual Wikipedia, Wikiabstracts, Wikigenerator, Proto-Wiki</span>. If you would like to participate, then '''[[m:Special:MyLanguage/Abstract Wikipedia/Abstract Wikipedia naming contest|please learn more and vote now]]''' at meta-wiki. {{Int:Feedback-thanks-title}} <section end="function2"/> </div> -- [[User:Sannita (WMF)|User:Sannita (WMF)]] ([[User talk:Sannita (WMF)|talk]]) 14:22, 2025 s. noyabrniñ 20 (UTC) <!-- Mesajı gönderen kullanıcı: https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=29583860 listesini kullanan Sannita (WMF)@metawiki --> == Feminism and Folklore 2026 starts soon == <div style="border:8px maroon ridge;padding:6px;"> [[File:Feminism and Folklore 2026 logo.svg|centre|550px|frameless]] ::<div lang="en" dir="ltr" class="mw-content-ltr"> <div style="text-align: center; width: 100%;">''{{int:please-translate}}''</div> ;Invitation to Organize Feminism and Folklore 2026 Dear Wiki Community, We are pleased to invite Wikimedia communities, affiliates, and independent contributors to organize the '''[[:m:Feminism and Folklore 2026|Feminism and Folklore 2026]]''' writing competition on your local Wikipedia. The international campaign will run from '''1 February to 31 March 2026''' and aims to improve coverage of feminism, women’s histories, gender-related topics, and folk culture across Wikipedia projects. ;About the Campaign '''Feminism and Folklore''' is a global writing initiative that complements the '''[[:c:Commons:Wiki Loves Folklore 2026|Wiki Loves Folklore]]''' photography competition. While Wiki Loves Folklore focuses on visual documentation, this writing campaign addresses the '''gender gap on Wikipedia''' by improving encyclopedic content related to folk culture and marginalized voices. ;What Can Participants Write About? Communities can contribute by creating, expanding, or translating articles related to: * Folk festivals, rituals, and celebrations * Folk dances, music, and traditional performances * Women and queer figures in folklore * Women in mythology and oral traditions * Women warriors, witches, and witch-hunting narratives * Fairy tales, folk stories, and legends * Folk games, sports, and cultural practices Participants may work from curated article lists or generate new article suggestions using campaign tools. ;How to Sign Up as an Organizer Organizers are requested to complete the following steps to register their community: # Create a local project page on your wiki [[:m:Feminism and Folklore/Sample|(see sample)]] # Set up the campaign using the '''CampWiz''' tool # Prepare a local article list and clearly mention: #* Campaign timeline #* Local and international prizes # Request a site notice from local administrators [[:mr:Template:SN-FNF|(see sample)]] # Add your local project page and CampWiz link to the '''[[:m:Feminism and Folklore 2026/Project Page|Meta project page]]''' ;Campaign Tools The Wiki Loves Folklore Tech Team has introduced tools to support organizers and participants: * '''Article List Generator by Topic''' – Helps identify articles available on English Wikipedia but missing in your local language Wikipedia. The tool allows customized filters and provides downloadable article lists in CSV and wikitable formats. * '''CampWiz''' – Enables communities to manage writing campaigns effectively, including jury-based evaluation. This will be the third year CampWiz is officially used for Feminism and Folklore. Both tools are now available for use in the campaign. '''[https://tools.wikilovesfolklore.org/ Click here to access the tools]''' ;Learn More & Get Support For detailed information about rules, timelines, and prizes, please visit the '''[[:m:Feminism and Folklore 2026|Feminism and Folklore 2026 project page]]'''. If you have any questions or need assistance, feel free to reach out via: * '''[[:m:Talk:Feminism and Folklore 2026/Project Page|Meta talk page]]''' * Email us using details on the contact page. ;Join Us We look forward to your collaboration and coordination in making Feminism and Folklore 2026 a meaningful and impactful campaign for closing gender gaps and enriching folk culture content on Wikipedia. Thank you and best wishes, '''[[:m:Feminism and Folklore 2026|Feminism and Folklore 2026 International Team]]''' ---- ''Stay connected:'' [[File:B&W Facebook icon.png|link=https://www.facebook.com/feminismandfolklore/|30x30px]]&nbsp; [[File:B&W Twitter icon.png|link=https://twitter.com/wikifolklore|30x30px]] </div></div> == Invitation to Host Wiki Loves Folklore 2026 in Your Country == <div lang="en" dir="ltr" class="mw-content-ltr"> <div style="text-align: center; width: 100%;">''{{int:please-translate}}''</div> [[File:Wiki Loves Folklore Logo.svg|right|150px|frameless]] Hello everyone, We are delighted to invite Wikimedia affiliates, user groups, and community organizations worldwide to participate in '''Wiki Loves Folklore 2026''', an international initiative dedicated to documenting and celebrating folk culture across the globe. ;About Wiki Loves Folklore '''Wiki Loves Folklore''' is an annual international photography competition hosted on Wikimedia Commons. The campaign runs from '''1 February to 31 March 2026''' and encourages photographers, cultural enthusiasts, and community members to contribute photographs that highlight: * Folk traditions and rituals * Cultural festivals and celebrations * Traditional attire and crafts * Performing arts, music, and dance * Everyday practices rooted in folk heritage Through this campaign, we aim to preserve and promote diverse folk cultures and make them freely accessible to the world. [[:c:Commons:Wiki_Loves_Folklore_2026|Project page on Wikimedia Commons]] ; Host a Local Edition As we celebrate the '''eight edition''' of Wiki Loves Folklore, we warmly invite communities to organize a local edition in their country or region. Hosting a local campaign is a great opportunity to: * Increase visibility of your region’s folk culture * Engage new contributors in your community * Enrich Wikimedia Commons with high-quality cultural content '''[[:c:Commons:Wiki_Loves_Folklore_2026/Organize|Sign up to organize]]:''' If your team prefers to organize the competition in ''either February or March only'', please feel free to let us know. If you are unable to organize, we encourage you to share this opportunity with other interested groups or organizations in your region. ;Get in Touch If you have any questions, need support, or would like to explore collaboration opportunities, please feel free to contact us via: * The project Talk pages * Email: '''support@wikilovesfolklore.org''' We are also happy to connect via an online meeting if your team would like to discuss planning or coordination in more detail. Warm regards, '''The Wiki Loves Folklore International Team''' </div> [[Qullanıcı:MediaWiki message delivery|MediaWiki message delivery]] ([[Qullanıcı muzakeresi:MediaWiki message delivery|muzakere]]) 13:20, 2026 s. yanvarniñ 18 (UTC) <!-- Mesajı gönderen kullanıcı: https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery/Wikipedia&oldid=29228188 listesini kullanan Tiven2240@metawiki --> == <span lang="tr" dir="ltr">Evrensel Davranış Kuralları ve Uygulama Yönergelerinin Yıllık Değerlendirmesi</span> == <div lang="tr" dir="ltr"> <section begin="announcement-content" /> Evrensel Davranış Kuralları (UCoC) ve Uygulama Yönergeleri için yıllık değerlendirme dönemi başlamıştır. Değişiklik önerilerinizi 9 Şubat 2026 tarihine kadar iletebilirsiniz. Bu, yıllık değerlendirme kapsamında atılacak adımlardan ilkidir. [[m:Special:MyLanguage/Universal Code of Conduct/Annual review/2026|Daha fazla bilgi almak ve Meta’daki UCoC sayfasında devam eden tartışmalara katılmak için basınız]]. [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee|Evrensel Davranış Kuralları Koordinasyon Komitesi]] (U4C), UCoC’nin adil ve tutarlı bir şekilde uygulanmasını sağlamaya adanmış küresel bir gruptur. Bu yıllık değerlendirme, U4C tarafından planlanmış ve yürütülmüştür. U4C hakkında daha fazla bilgi almak ve U4C'nin sorumlulukları için [[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Charter|U4C Tüzüğü’nü inceleyebilirsiniz]]. Lütfen bu bilgiyi, topluluğunuzdaki diğer üyelerle ve uygun gördüğünüz diğer kişilerle paylaşın. — U4C ile iş birliği dahilinde, [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User talk:Keegan (WMF)|mesaj]])<section end="announcement-content" /> </div> 21:01, 2026 s. yanvarniñ 19 (UTC) <!-- Mesajı gönderen kullanıcı: https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=29905753 listesini kullanan Keegan (WMF)@metawiki --> == Join the sixth Ukraine’s Cultural Diplomacy Month on Wikipedia! == <div lang="en" dir="ltr"> [[File:Ukraine’s Cultural Diplomacy Month on Wikipedia 2026.png|right|250px|thumb|link=https://meta.wikimedia.org/wiki/Ukraine%27s_Cultural_Diplomacy_Month_2026|Join our campaign!]] {{int:please-translate}} Dear Wikipedians! [[:m:Special:MyLanguage/Wikimedia Ukraine|Wikimedia Ukraine]], in cooperation with the [[:en:Ministry of Foreign Affairs of Ukraine|MFA of Ukraine]] and [[:en:Ukrainian Institute|Ukrainian Institute]], has launched the sixth edition of writing challenge "'''[[:m:Special:MyLanguage/Ukraine's Cultural Diplomacy Month 2026|Ukraine's Cultural Diplomacy Month]]'''", which lasts from '''1st April''' until '''30th April 2026'''. The initiative aims to promote knowledge about Ukrainian culture abroad by creating and improving Wikipedia articles in multiple languages. This year marks the sixth edition of the campaign, which will focus on contemporary culture, making today’s artistic voices and practices more visible to international audiences. 🧩'''How to participate?''' Choose an article from the suggested list → Write an article in your language, or improve an existing one according to the rules → Add your contribution to the contest page and calculate your points → Win prizes and receive a certificate of participation → Become a promoter of truthful knowledge about Ukraine. 🧩'''[[m:Special:MyLanguage/Ukraine's Cultural Diplomacy Month 2026|Check our main page for more information]]'''. '''If you are interested in coordinating long-term community engagement for the campaign and becoming a local ambassador, we would love to hear from you! Please let us know your interest.''' If not, then we encourage you to translate the [[m:Special:MyLanguage/Ukraine's Cultural Diplomacy Month 2026|landing page of the contest]] and [https://meta.wikimedia.org/wiki/Special:MessageGroupStats?group=Centralnotice-tgroup-UCDM2026banner&messages=&language=en&x=D banner] into your own language. Also, we set up a [[:m:CentralNotice/Request/Ukraine's Cultural Diplomacy Month 2026|banner]] to notify users of the possibility to participate in this challenge! [[:m:User:OlesiaLukaniuk (WMUA)|OlesiaLukaniuk (WMUA)]] ([[:m:User talk:OlesiaLukaniuk (WMUA)|talk]]) 04:35, 1 April 2026 (UTC) </div> <!-- Mesajı gönderen kullanıcı: https://meta.wikimedia.org/w/index.php?title=User:OlesiaLukaniuk_(WMUA)/list_of_wikis&oldid=28552112 listesini kullanan OlesiaLukaniuk (WMUA)@metawiki --> == <span lang="en" dir="ltr">Migration to Parsoid</span> == <div lang="en" dir="ltr"> <section begin="announcement-content" /> <em>[[m:Special:MyLanguage/Wikimedia Foundation/Product and Technology/Parsoid Read Views/Read View Announcement|Read this in another language]]</em> Hello everyone! I am glad to inform you that as the next step in the [[mw:Special:MyLanguage/Parsoid/Parser Unification|Parser Unification]] project, Parsoid will soon be turned on as the default article renderer on your wiki. We are gradually increasing the number of wikis using Parsoid, with the intention of making it the default wikitext parser for MediaWiki's next long-term support release. This will make our wikis more reliable and consistent for editors, readers, and tools to use, as well as making the development of future wikitext features easier. If this disrupts your workflow, don’t worry! You can still opt out through a user preference or turn Parsoid off on the current page using the Tools submenu, as described in the [[mw:Special:MyLanguage/Help:Extension:ParserMigration|Extension:ParserMigration]] documentation. There is [[mw:Special:MyLanguage/Parsoid/Parser Unification/Confidence Framework|more information about our roll-out strategy]] available, including the testing done before we turn on Parsoid for a new wiki. To report bugs and issues, please look at our [[mw:Special:MyLanguage/Parsoid/Parser Unification/Known Issues|known issues]] documentation and if you found a new bug please create a phab ticket and tag the [[phab:project/view/5846|Content Transform Team in Phabricator]]. <section end="announcement-content" /> </div> <bdi lang="en" dir="ltr">[[mw:User:CAnanian (WMF)|C. Scott Ananian]] (Parsoid technical lead)</bdi> 16:48, 2026 s. aprelniñ 18 (UTC) <!-- Mesajı gönderen kullanıcı: https://meta.wikimedia.org/w/index.php?title=Wikimedia_Foundation/Product_and_Technology/Parsoid_Read_Views/2026-04-20_Wikipedias&oldid=30424286 listesini kullanan CAnanian (WMF)@metawiki --> == Yañı 2025 senesi imlâsı aqqında == 2025 senesinde Ukraina Nazirler Kabineti [https://dess.gov.ua/krymskotatarska-mova-otrymala-ofitsiynyy-pravopys/ yañı qırımtatar imlâsını] tasdıqladı. Men bu imlâ begenmeyim. (Ne içün 2025 senesinde qırımatatar imlâ qırımtatar tilinde derc etilmegen? Dekolonial noqta-i nazarından pek yaramay olıp körüne dep tüşünem.) Lâkin o aqqında laf etmek kerek, çünki bazılar bu imlânı qullanalar (hususan -{[[Qullanıcı:MarianaSenkiv|MarianaSenkiv]]}- [https://crh.wikipedia.org/w/index.php?title=%C5%9Eablon:Tercime_etilgen_maqale/uk&diff=prev&oldid=242498 bu deñiştermede]; lâkin o, taqvim maqalelerinde eski imlânı qullana). Bu imlânı toptan almağımız mümkün degil, çünki vesiqada pek çoq hata bar. * Er bir qaide içün uyğunsızsız misaller bar, bazıda aynı abzatsında. Qaidelerniñ tarifi nizamlı degil. ** Meselâ, 33-ünci saifede -{«Якщо в іноземних назвах [...] вулиць [...] є родова назва, вона [...] відділяється дефісом: [...] Unter-den-Linden ştrasse»}- 'Eger çet tillerindeki [...] soqaq [...] adlarında çeşit adı olsa, o [...] defisnen yaqmalı: [...] -{Unter-den-Linden ştrasse}-' («-{Unter-den-Linden-ştrasse}-» yerinde). ** 28-ince saifede -{«Усі складові частини власних імен [...] корейського [...] походження пишуться окремо та з великої букви: Pak Çivon»}- 'Koreya [...] peyda olğan şahsiy adlar[...]nıñ er bir terkibiy parçası ayrı ve büyük arifnen yazılmalı: -{Pak Çivon}-' (-{[[:tr:Park Ji-won]], [[:uz:Pak Chi Von]]}--nı muqayese etıñiz) ** § 40.17: «У словах -{“gazeta”, “sistema”, “problema”}- та інших подібних, запозичених з європейських та російської мови, кінцева буква a на позначення роду не передається у кримськотатарському написанні. Правильним вважається написання слів -{“gazet”, “sistem”, “poblem”.}-» '-«-{Gazeta}-», «-{sistema}-», «-{problema}-» ve ilâhre kibi, Avropa ve rus tillerinden alıngal süzlerde, cınsı köstergen soñki -{A}- harifi qırımtatar imlâda yazılmamalı. «-{Gazet}-», «-{sistem}-», «-{problem}-» yazılışları doğrudır dep sayıla.’ — lâkin vesiqanıñ daa çok A arfili süzü bar, meselâ «-{türkologiya}-», «-{leksiya}-», «-{gvardiya}-», «-{biografiya}-», «-{diagramma}-», «-{dogma}-», «-{magma}-», «-{monografiya}-», «-{hipoteza}-», «-{astma}-», «-{anafema}-», «-{kafedra}-», «-{atmosfera}-», «-{amfora}-», «-{atmosfera}-» ve atta «-{Ukrayina}-». * Bu vesiqada pek çok hucur şey bar. ** Meselâ 34-ünci saifesinde “-{Hresşatık}-” (“-{Hreşçatık}-” yerinde). ** 27-nde saifede “-{Djek}-” ve “-{Lesia}-” (“-{Cek}-” ve “-{Lesâ}-” yerinde), * Bu vesiqada yalan bar. ** Mesela, «-{У деяких словах за традицією звук [w] передається буквою w: Wales, Winston, white spirit}-» ‘-{Bazı sözlerde, ananege köre [w] sesi w arfinen yazılmalı: Wales, Winston, white spirit}-’, lâkin (menim bilmeme köre) imlânıñ müellifleri bu «anane»ni uydurğanlar. [https://app.sketchengine.eu/#concordance?corpname=preloaded%2Fcrh_national_corpus&tab=basic&keyword=Wales*&structs=s%2Cg&refs=doc&showresults=1&operations=%5B%7B%22name%22%3A%22iquery%22%2C%22arg%22%3A%22Wales*%22%2C%22active%22%3Atrue%2C%22query%22%3A%7B%22queryselector%22%3A%22iqueryrow%22%2C%22iquery%22%3A%22Wales*%22%7D%2C%22id%22%3A8935%7D%5D Korpusta], [https://lugat.diyar.im/#page=pageLugat&word=Wales luğatlarda] ve [https://ktat.krymr.com/s?k=Wales* balaban saytlarda] bu anane yoq. Ananege köre -{U}- arfinen “-{Uels}-” yazılmalı ([https://app.sketchengine.eu/#concordance?corpname=preloaded%2Fcrh_national_corpus&tab=basic&keyword=Uels*&structs=s%2Cg&refs=doc&showresults=1&operations=%5B%7B%22name%22%3A%22iquery%22%2C%22arg%22%3A%22Uels*%22%2C%22active%22%3Atrue%2C%22query%22%3A%7B%22queryselector%22%3A%22iqueryrow%22%2C%22iquery%22%3A%22Uels*%22%7D%2C%22id%22%3A8935%7D%5D], [https://ktat.krymr.com/s?k=Uels*], [https://lugat.diyar.im/#page=pageLugat&word=uelsli]), lâkin tüşünem ki, imlânıñ müellifleri bu anane begenmeyler ve yalan aytmağa qarar etkenler. Bundan sebep bu vesiqa faydasız dep tüşünem ve onı qullanılmamaq teklif etem. Lâkin bu imlâdan bazı fikirler almağımız ve [[Vikipediya:İmlâ]]ğa qoşmağımız mümkün. Men umumiy deñiştirmeler böyle añlayım. * dudak aenkili suffiksler (-{künniñ → künnüñ, onı → onu}-; eger kiril elifbesinde de qullanılsa, -{куннинъ → *куннюнъ, оны → *ону}-), * -{ts → s}- (-{entsiklopediya → ensiklopediya}-; eger kiril elifbesinde de qullanılsa, -{энциклопедия → *энсиклопедия}-), * ukrain tilinden alıngan sözlerde -{ğ/g → h}- (-{[[Ğorişni Plavni]] → Horişni Plavni}-; eger kiril elifbesinde de qullanılsa, -{Гъоришни Плавни → *Хоришни Плавни}-), * latin (ve ilâhre) tilinden alından sözlerde -{g → h}- (gumanizm → hümanizm; eger kiril elifbesinde de qullanılsa, -{гуманизм → *хюманизм}-), * til ve halıq adlarınıñ büyük arifleri (-{rus tili → Rus tili}-; eger kiril elifbesinde de qullanılsa, -{рус тили → *Рус тили}-), * oqulmağan h (-{er}- → -{her/er}-; eger kiril elifbesinde de qullanılsa, -{эр}- → -{*хер/эр}-), lâkin «keçici vaqtında» bu -{h}- mecburiy degildir. Er bir qaide içün bizim 5 variantımız bar: * latin ve kiril elifbesinde eski qaidege riayet etmek -{(L:e K:e)}-, * latin elifbesinde yañı qaidege, kiril elifbesinde eski qaidege riayet etmek -{(L:y K:e)}-, * latin elifbesinde eki qaide de musaade bermek, kiril elifbesinde eski qaidege riayet etmek -{(L:2 K:e)}-, * latin ve kiril elifbesinde eki qaide de musaade bermek -{(L:2 K:2)}-, * latin ve kiril elifbesinde yañı qaidege riayet etmek -{(L:y K:y)}-. Menim teklifim — bu yañı imlâ qullanılmamalı. Eger bu imlâda kitaplar derc etilsalar, aqiqiy metinler taqlit etip başlap olamız. Lâkin şimdiki vaqıtta bu imlânı qullanılmamaq teklif etem. Siz ise ne tüşünesiñiz? [[Qullanıcı:Хтосьці|-{crh-cyrl: Хтосьці; crh-latn: Chtości}-]] ([[Qullanıcı muzakeresi:Хтосьці|muzakere]]) 10:42, 2026 s. aprelniñ 22 (UTC) == Request for comment (global AI policy) == <bdi lang="en" dir="ltr" class="mw-content-ltr"> Apologies for writing in English. {{int:Please-translate}} A [[:m:Requests for comment/Artificial intelligence policy|request for comment]] is currently being held to decide on a global AI policy. {{int:Feedback-thanks-title}} [[Qullanıcı:MediaWiki message delivery|MediaWiki message delivery]] ([[Qullanıcı muzakeresi:MediaWiki message delivery|muzakere]]) 00:57, 2026 s. aprelniñ 26 (UTC) </bdi> <!-- Mesajı gönderen kullanıcı: https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=30424282 listesini kullanan Codename Noreste@metawiki --> == -{[[Module:Wikidata-ro]]}- yerinde -{[[Module:Wikidata]]}- qullanmaq isteyim == Bu eki -{crh-latn: modul; crh-cyrl: модуль}- bezeneler, lâkin ufaq farq bar. Meselâ, -{Wikidata-ro}- qarandaş bağlantısı qoşa, ve -{Wikidata}- qoşma. Atıf format ayrı degildir. Kiril elifbesine çevirme kodu içün -{[[Module:Wikidata-ro]]}- yerine -{[[Module:Wikidata]]}- qullanmaq isteyim. Şimdi -{Wikidata-ro}- -{crh-latn: modulde; crh-cyrl: модульде}- kiril elifbesi içün kodu yoq, -{[[Module:Wikidata]]}- qısmiy kodu bar. Men kiril elifbesi içün kodu tüzetmek isteyim, lâkin 2 -{crh-latn: modulde; crh-cyrl: модульде}- tüzetmek daa qıyındır. Qırım standartındaki maqalelerinde tek -{[[Module:Wikidata]]}- qullanılmaq teklif etem. (Tek latin elifbesinde yazılğan Romaniya standartında bu mesele yoq. Eger Romaniyadaki Vikipediyacılarğa -{Wikidata-ro}- daa añlayışlı olsa, -{R:}- ad boşluğında -{Module:Wikidata-ro}- qullanılmaq mümkün.) İtiraz barmı? Eger olmasa, men -{Wikidata-ro}- yerinde -{Wikidata}- qullanmağa başlarman. [[Qullanıcı:Хтосьці|-{crh-cyrl: Хтосьці; crh-latn: Chtości}-]] ([[Qullanıcı muzakeresi:Хтосьці|muzakere]]) 09:19, 2026 s. mayısnıñ 8 (UTC) :-{[[Modul:Wikidata-ro]]}- yoq ettim, onıñ yerinde -{[[Modul:Wikidata]]}- qullandım. Eger meseleler olsa, maña yazıñız. [[Qullanıcı:Хтосьці|-{crh-cyrl: Хтосьці; crh-latn: Chtości}-]] ([[Qullanıcı muzakeresi:Хтосьці|muzakere]]) 09:56, 2026 s. iyünniñ 9 (UTC) == <span lang="tr" dir="ltr">2026 U4C seçiminde şimdi oy verin</span> == <div lang="tr" dir="ltr"> <section begin="announcement-content" /> Oy kullanma hakkına sahip seçmenler, 2026 [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee|Evrensel Davranış Kuralları Koordinasyon Komitesi]] seçimlerine katılmaya davet ediyoruz. Uygunluk kontrolü, oy verme sürecine ilişkin bilgiler, aday bilgileri ve oy verme bağlantısı dâhil olmak üzere daha fazla bilgiye Meta’daki [[m:Special:MyLanguage/Universal_Code_of_Conduct/Coordinating_Committee/Election/2026|2026 Seçim Bilgilendirme Sayfası]] üzerinden ulaşabilirsiniz. Oylama [https://zonestamp.toolforge.org/1780358400 00:00 UTC] tarihinde sona erecektir. Hesabınız uygunsa lütfen oy kullanın. Sonuçlar 14 Haziran 2026 tarihine kadar açıklanacaktır. -- U4C ile iş birliği içinde,<section end="announcement-content" /> </div> [[m:User:Keegan (WMF)|Keegan (WMF)]] ([[m:User talk:Keegan (WMF)|talk]]) 17:14, 2026 s. mayısnıñ 27 (UTC) <!-- Mesajı gönderen kullanıcı: https://meta.wikimedia.org/w/index.php?title=Distribution_list/Global_message_delivery&oldid=30513860 listesini kullanan Keegan (WMF)@metawiki --> kirdk63spv7grd7rzf9xwp1ov4m55qe Qullanıcı:Ciaurlec 2 9211 244186 244090 2026-06-08T13:17:18Z Ciaurlec 4999 updated 244186 wikitext text/x-wiki {{#babel:vec|it|fr-3|en-2|de-1|es-1|pt-1|crh-0}} [[Fayl:Redirectltr.png|40px]] [[:it:Utente:Ciaurlec]] r7q1h2pz28vi2jm3ap3o5y04eni5fqn Starıy Saltiv 0 16990 244188 244161 2026-06-08T22:07:18Z Naikii2015 49732 244188 wikitext text/x-wiki {{MY |tip = qasaba |qırımtatar adı = Starıy Saltiv |original adı = ''ukr.'' Старий Салтів |memleket = Ukraina |tuğra = CoA of Staryi Saltiv.svg |bayraq = Flag of Staryi Saltiv.svg |tuğra eni = |bayraq eni = |lat_deg =50 |lat_min =04 |lat_sec =52 |lon_deg =36 |lon_min =47 |lon_sec =35 |CoordAddon = |CoordScale = |memleket haritasınıñ büyükligi = 300 |region1 haritasınıñ büyükligi = |region2 haritasınıñ büyükligi = |region1 türü = Vilâyet |region1 = Harkiv vilâyeti |cedvelde region1 adı = |içki bölünüv = |baş türü = |baş = |temeli qoyulğan tarihı = |ilki añıluv = 1705 |evelki adları = |bu seneden berli statuslı = 2024 |meydanlıq = |yükseklik = |iklim = |resmiy til = |resmiy til-ref = |eali = 4 073 |cedvelge aluv senesi = 2001 |eali sıqlığı = |aglomeratsiya = |milliy terkip = |diniy terkip = |saat quşağı = +2 |DST = bar |telefon kodu = +380 5741 |poçta indeksi = |poçta indeksleri = 62560 |avtomobil kodu = |identifikator türü = |raqamlı identifikator = |Commons = Staryi Saltiv |sayt = |sayt tili = }} '''Starıy Saltiv''' ({{Lang-uk|Старий Салтів}}) - [[Ukraina]]nıñ [[Harkiv vilâyeti]]nde bir [[qasaba]]. Ealisiniñ sayısı 1 100 kişi ([[2023]]). [[Kategoriya:Harkiv vilâyetindeki qasabalar]] 3eau7ugpw7mibq1uhpatdsz86na2s71 Modul:Wikidata 828 19259 244200 243938 2026-06-09T09:47:09Z Хтосьці 13041 formatEntityIdFromFrame qostım ([[Modul:WikidataClassHierarchy]] modulde [[Modul:Ill-wd]] yerinde qullanmaq içün) 244200 Scribunto text/plain -- settings, may differ from project to project local fileDefaultSize = '267x400px'; local outputReferences = true; -- Ссылки на используемые модули, которые потребуются в 99% случаев загрузки страниц (чтобы иметь на виду при переименовании) local moduleSources = require( 'Module:Sources' ); local WDS = require( 'Module:WikidataSelectors' ); local altScript = require( 'Modul:Alternativ elifbe' ); local commonCategoryNames = mw.loadData('Modul:Umumiy kategoriya adları') -- Константы local contentLanguageCode = mw.getContentLanguage():getCode(); local p = {}; local config = nil; local formatDatavalue, formatEntityId, formatRefs, formatSnak, formatStatement, formatStatementDefault, formatProperty, getSourcingCircumstances, getPropertyDatatype, getPropertyParams, throwError, toBoolean; local function copyTo( obj, target, skipEmpty ) for k, v in pairs( obj ) do if skipEmpty ~= true or ( v ~= nil and v ~= '' ) then target[k] = v; end end return target; end local function min( prev, next ) if ( prev == nil ) then return next; elseif ( prev > next ) then return next; else return prev; end end local function max( prev, next ) if ( prev == nil ) then return next; elseif ( prev < next ) then return next; else return prev; end end local function getConfig( section, code ) if config == nil then config = require( 'Module:Wikidata/config' ); end; if not config then config = {}; end if not section then return config; end if not code then return config[ section ] or {}; end if not config[ section ] then return nil; end return config[ section ][ code ]; end local function getCategoryByCode( code, sortkey ) local value = getConfig( 'categories', code ); if not value or value == '' then return ''; end if sortkey ~= nil then return '[[Category:' .. value .. '|' .. sortkey .. ']]'; -- экранировать? else return '[[Category:' .. value .. ']]'; end end local function splitISO8601(str) if 'table' == type(str) then if str.args and str.args[1] then str = '' .. str.args[1] else return 'unknown argument type: ' .. type( str ) .. ': ' .. table.tostring( str ) end end local Y, M, D = (function(str) local pattern = "(%-?%d+)%-(%d+)%-(%d+)T" local Y, M, D = mw.ustring.match( str, pattern ) return tonumber(Y), tonumber(M), tonumber(D) end) (str); local h, m, s = (function(str) local pattern = "T(%d+):(%d+):(%d+)%Z"; local H, M, S = mw.ustring.match( str, pattern); return tonumber(H), tonumber(M), tonumber(S); end) (str); local oh,om = ( function(str) if str:sub(-1)=="Z" then return 0,0 end; -- ends with Z, Zulu time -- matches ±hh:mm, ±hhmm or ±hh; else returns nils local pattern = "([-+])(%d%d):?(%d?%d?)$"; local sign, oh, om = mw.ustring.match( str, pattern); sign, oh, om = sign or "+", oh or "00", om or "00"; return tonumber(sign .. oh), tonumber(sign .. om); end )(str) return {year=Y, month=M, day=D, hour=(h+oh), min=(m+om), sec=s}; end local function parseTimeBoundaries( time, precision ) local s = splitISO8601( time ); if (not s) then return nil; end if ( precision >= 0 and precision <= 8 ) then local powers = { 1000000000 , 100000000, 10000000, 1000000, 100000, 10000, 1000, 100, 10 } local power = powers[ precision + 1 ]; local left = s.year - ( s.year % power ); return { tonumber(os.time( {year=left, month=1, day=1, hour=0, min=0, sec=0} )) * 1000, tonumber(os.time( {year=left + power - 1, month=12, day=31, hour=29, min=59, sec=58} )) * 1000 + 1999 }; end if ( precision == 9 ) then return { tonumber(os.time( {year=s.year, month=1, day=1, hour=0, min=0, sec=0} )) * 1000, tonumber(os.time( {year=s.year, month=12, day=31, hour=23, min=59, sec=58} )) * 1000 + 1999 }; end if ( precision == 10 ) then local lastDays = {31, 28.25, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; local lastDay = lastDays[s.month]; return { tonumber(os.time( {year=s.year, month=s.month, day=1, hour=0, min=0, sec=0} )) * 1000, tonumber(os.time( {year=s.year, month=s.month, day=lastDay, hour=23, min=59, sec=58} )) * 1000 + 1999 }; end if ( precision == 11 ) then return { tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=0, min=0, sec=0} )) * 1000, tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=23, min=59, sec=58} )) * 1000 + 1999 }; end if ( precision == 12 ) then return { tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=s.hour, min=0, sec=0} )) * 1000, tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=s.hour, min=59, sec=58} )) * 1000 + 1999 }; end if ( precision == 13 ) then return { tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=s.hour, min=s.min, sec=0} )) * 1000, tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=s.hour, min=s.min, sec=58} )) * 1000 + 1999 }; end if ( precision == 14 ) then local t = tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=s.hour, min=s.min, sec=0} ) ); return { t * 1000, t * 1000 + 999 }; end error('Unsupported precision: ' .. precision ); end --[[ Til içün şablon qıdıra. Meselâ: findLanguageTemplate("ref-", "en-au") → "ref-en-au" yaki "ref-en" yaki nil findLanguageTemplate("lang-", "tt-latn") → "lang-tt-latn" yaki "lang-tt" yaki nil Argumentler: - prefix - satır, şablon adınıñ başlanğıcı (meselâ "lang-", "ref-") - languageCode - satır, til kodu (meselâ "en", "en-au", "crh-cyrl") Qaytara: - 1: satır (olğan şablon adı) yaki nil - 2: "" (hassas şablon olsa) yaki hassas şablon yapmaq içün bir bağlantı ]] local function findLanguageTemplate(prefix, languageCode) local templateName = prefix .. languageCode if mw.title.new(templateName, 10).exists then return templateName, "" end local templateEditLink = "<sup title='Til şablonını yaratmaq'>[[:Şablon:" .. templateName .. "|&#91;ş&#93;]]</sup>" local shortLanguageCode = languageCode:gsub("-.*$", "") local shortTemplateName = prefix .. shortLanguageCode if mw.title.new(shortTemplateName, 10).exists then return shortTemplateName, templateEditLink end return nil, templateEditLink end --[[ Функция для формирования категории на основе wikidata/config ]] local function extractCategory( options, value ) if ( not options.category or options.nocat ) then return ''; end local propertyId = string.gsub( options.category, '([^Pp0-9].*)$', ''); local wbStatus, claims = pcall( mw.wikibase.getAllStatements, value.id, propertyId ); if ( wbStatus ~= true or not claims ) then return ''; end allClaims = {} allClaims[ propertyId ] = claims claims = WDS.filter( allClaims, options.category ) if not claims then return ''; end for _, claim in pairs( claims ) do if ( claim and claim.mainsnak and claim.mainsnak.datavalue and claim.mainsnak.datavalue.type == 'wikibase-entityid' ) then local catEntityId = claim.mainsnak.datavalue.value.id; local wbStatus, catSiteLink = pcall( mw.wikibase.getSitelink, catEntityId ); if ( wbStatus == true and catSiteLink ) then return '[[' .. catSiteLink .. ']]'; end end end return ''; end --[[ Преобразует строку в булевое значение Принимает: строковое значение (может отсутствовать) Возвращает: булевое значение true или false, если получается распознать значение, или defaultValue во всех остальных случаях ]] local function toBoolean( valueToParse, defaultValue ) if ( valueToParse ~= nil ) then if valueToParse == false or valueToParse == '' or valueToParse == 'false' or valueToParse == '0' then return false end return true end return defaultValue; end -- Обрачивает отформатированное значение в инлайновый или блочный тег. -- @param value String value -- @param attributes Table of attributes -- @return string HTML tag with value local function wrapValue( value, attributes ) local tagName = 'span'; local spacer = ''; if ( string.match( value, '\n' ) or string.match( value, '<t[dhr][ >]' ) or string.match( value, '<div[ >]' ) or string.find( value, 'UNIQ%-%-imagemap' ) ) then tagName = 'div'; spacer = '\n' end local attrString = '' for key, value in pairs( attributes or {} ) do local _key = mw.text.trim( key ) local _value = mw.text.encode( mw.text.trim( value ) ) attrString = attrString .. _key .. '="' .. _value .. '" ' end return '<' .. tagName .. ' ' .. attrString .. '>' .. spacer .. value .. '</' .. tagName .. '>'; end -- Wraps formatted snak value into HTML tag with attributes. -- @param value String value of snak -- @param hash Snak hash -- @param attributes Table of extra attributes -- @return string HTML tag with value local function wrapSnak( value, hash, attributes ) local newAttributes = mw.clone( attributes or {} ) newAttributes['class'] = ( newAttributes['class'] or '' ) .. ' wikidata-snak' if hash then newAttributes['data-wikidata-hash'] = hash else newAttributes['class'] = newAttributes['class'] .. ' wikidata-main-snak' end return wrapValue( value, newAttributes ) end -- Wraps formatted statement value into HTML tag with attributes. -- @param value String value of statement -- @param propertyId String PID of property -- @param claimId String ID of claim or nil for local value -- @param attributes Table of extra attributes -- @return string HTML tag with value local function wrapStatement( value, propertyId, claimId, attributes ) local newAttributes = mw.clone( attributes or {} ) newAttributes['class'] = newAttributes['class'] or '' newAttributes['data-wikidata-property-id'] = string.upper( propertyId ) if claimId then newAttributes['class'] = newAttributes['class'] .. ' wikidata-claim' newAttributes['data-wikidata-claim-id'] = claimId else newAttributes['class'] = newAttributes['class'] .. ' no-wikidata' end return wrapValue( value, newAttributes ) end -- Wraps formatted qualifier's statement value into HTML tag with attributes. -- @param value String value of qualifier's statement -- @param propertyId String PID of qualifier -- @param attributes Table of extra attributes -- @return string HTML tag with value local function wrapQualifier( value, qualifierId, attributes ) local newAttributes = mw.clone( attributes or {} ) newAttributes['data-wikidata-qualifier-id'] = string.upper( qualifierId ) return wrapValue( value, newAttributes ) end --[[ Функция для получения сущности (еntity) для текущей страницы Подробнее о сущностях см. d:Wikidata:Glossary/ru Принимает: строковый индентификатор (типа P18, Q42) Возвращает: объект таблицу, элементы которой индексируются с нуля ]] local function getEntityFromId( id ) local entity; local wbStatus; if id then wbStatus, entity = pcall( mw.wikibase.getEntityObject, id ) else wbStatus, entity = pcall( mw.wikibase.getEntityObject ); end return entity; end --[[ Внутрення функция для формирования сообщения об ошибке Принимает: ключ элемента в таблице config.errors (например entity-not-found) Возвращает: строку сообщения ]] local function throwError( key ) error( getConfig( 'errors', key ) ); end --[[ Функция для получения идентификатора сущностей Принимает: объект таблицу сущности Возвращает: строковый индентификатор (типа P18, Q42) ]] local function getEntityIdFromValue( value ) local prefix = '' if value['entity-type'] == 'item' then prefix = 'Q' elseif value['entity-type'] == 'property' then prefix = 'P' else throwError( 'unknown-entity-type' ) end return prefix .. value['numeric-id'] end -- проверка на наличие специилизированной функции в опциях local function getUserFunction( options, prefix, defaultFunction ) -- проверка на указание специализированных обработчиков в параметрах, -- переданных при вызове if options[ prefix .. '-module' ] or options[ prefix .. '-function' ] then -- проверка на пустые строки в параметрах или их отсутствие if not options[ prefix .. '-module' ] or not options[ prefix .. '-function' ] then throwError( 'unknown-' .. prefix .. '-module' ); end -- динамическая загруза модуля с обработчиком указанным в параметре local formatter = require( 'Module:' .. options[ prefix .. '-module' ] ); if formatter == nil then throwError( prefix .. '-module-not-found' ) end local fun = formatter[ options[ prefix .. '-function' ] ] if fun == nil then throwError( prefix .. '-function-not-found' ) end return fun; end return defaultFunction; end -- Выбирает свойства по property id, дополнительно фильтруя их по рангу local function selectClaims( context, options, propertySelector ) if ( not context ) then error( 'context not specified' ); end; if ( not options ) then error( 'options not specified' ); end; if ( not options.entity ) then error( 'options.entity is missing' ); end; if ( not propertySelector ) then error( 'propertySelector not specified' ); end; result = WDS.filter( options.entity.claims, propertySelector ); if ( not result or #result == 0 ) then return nil; end if options.limit and options.limit ~= '' and options.limit ~= '-' then local limit = tonumber( options.limit, 10 ); while #result > limit do table.remove( result ); end end return result; end --[[ Функция для получения значения свойства элемента в заданный момент времени. Принимает: контекст, элемент, временные границы, таблица ID свойства Возвращает: таблицу соответствующих значений свойства ]] local function getPropertyInBoundaries( context, entityId, boundaries, propertyIds, selectors ) if (type(entityId) ~= 'string') then error('type of entityId argument expected string, but was ' .. type(entityId)); end local results = {}; if not propertyIds or #propertyIds == 0 then return results; end for _, propertyId in ipairs( propertyIds ) do local selector = selectors[_]; local propertyClaims = mw.wikibase.getAllStatements( entityId, propertyId ); local fakeAllClaims = {}; fakeAllClaims[propertyId] = propertyClaims; local filteredClaims = WDS.filter( fakeAllClaims, selector .. '[rank:preferred, rank:normal]' ); if filteredClaims then for _, claim in pairs( filteredClaims ) do if not boundaries then table.insert( results, claim.mainsnak ); else local startBoundaries = p.getTimeBoundariesFromQualifier( context.frame, context, claim, 'P580' ); local endBoundaries = p.getTimeBoundariesFromQualifier( context.frame, context, claim, 'P582' ); if ( (startBoundaries == nil or ( startBoundaries[2] <= boundaries[1])) and (endBoundaries == nil or ( endBoundaries[1] >= boundaries[2]))) then table.insert( results, claim.mainsnak ); end end end end if #results > 0 then break; end end return results; end --[[ TODO ]] function p.getTimeBoundariesFromQualifier( frame, context, statement, qualifierId ) -- only support exact date so far, but need improvment local left = nil; local right = nil; if ( statement.qualifiers and statement.qualifiers[qualifierId] ) then for _, qualifier in pairs( statement.qualifiers[qualifierId] ) do local boundaries = context.parseTimeBoundariesFromSnak( qualifier ); if ( not boundaries ) then return nil; end left = min( left, boundaries[1] ); right = max( right, boundaries[2] ); end end if ( not left or not right ) then return nil; end return { left, right }; end --[[ TODO ]] function p.getTimeBoundariesFromQualifiers( frame, context, statement, qualifierIds ) if not qualifierIds then qualifierIds = { 'P582', 'P580', 'P585' }; end for _, qualifierId in ipairs( qualifierIds ) do local result = p.getTimeBoundariesFromQualifier( frame, context, statement, qualifierId ); if result then return result; end end return nil; end local CONTENT_LANGUAGE_CODE = mw.language.getContentLanguage():getCode(); local getLabelWithLang_DEFAULT_PROPERTIES = { "P1813", "P1448", "P1705" }; local getLabelWithLang_DEFAULT_SELECTORS = { 'P1813[language:' .. CONTENT_LANGUAGE_CODE .. '][!P3831,P3831:Q105690470]', 'P1448[language:' .. CONTENT_LANGUAGE_CODE .. '][!P3831,P3831:Q105690470]', 'P1705[language:' .. CONTENT_LANGUAGE_CODE .. '][!P3831,P3831:Q105690470]' }; --[[ Функция для получения метки элемента в заданный момент времени. Принимает: контекст, элемент, временные границы Возвращает: текстовую метку элемента, язык метки ]] local function getLabelWithLang( context, options, entityId, boundaries, propertyIds, selectors ) if (type(entityId) ~= 'string') then error('type of entityId argument expected string, but was ' .. type(entityId)); end if not entityId then return nil; end local langCode = CONTENT_LANGUAGE_CODE; -- name from label local label = nil; if ( options.text and options.text ~= '' ) then label = options.text; else if not propertyIds then propertyIds = getLabelWithLang_DEFAULT_PROPERTIES; selectors = getLabelWithLang_DEFAULT_SELECTORS; end -- name from properties local results = getPropertyInBoundaries( context, entityId, boundaries, propertyIds, selectors ); for _, result in pairs( results ) do if result.datavalue and result.datavalue.value then if result.datavalue.type == 'monolingualtext' and result.datavalue.value.text then label = result.datavalue.value.text; langCode = result.datavalue.value.language; break; elseif result.datavalue.type == 'string' then label = result.datavalue.value; break; end end end if (not label) then label, langCode = mw.wikibase.getLabelWithLang( entityId ); if not langCode then return nil; end end end return label, langCode; end local function formatPropertyDefault( context, options ) if ( not context ) then error( 'context not specified' ); end; if ( not options ) then error( 'options not specified' ); end; if ( not options.entity ) then error( 'options.entity missing' ); end; local claims; if options.property then -- TODO: Почему тут может не быть property? if options.rank then -- передать настройки ранга из конфига claims = context.selectClaims( options, options.property .. options.rank ); else claims = context.selectClaims( options, options.property ); end end if claims == nil then return '' --TODO error? end -- Обход всех заявлений утверждения и с накоплением оформленных предпочтительных -- заявлений в таблице local formattedClaims = {} for i, claim in ipairs(claims) do local formattedStatement = context.formatStatement( options, claim ) -- здесь может вернуться либо оформленный текст заявления, либо строка ошибки, либо nil if ( formattedStatement and formattedStatement ~= '' ) then formattedStatement = context.wrapStatement( formattedStatement, options.property, claim.id ) table.insert( formattedClaims, formattedStatement ) end end -- создание текстовой строки со списком оформленых заявлений из таблицы local out = mw.text.listToText( formattedClaims, options.separator, options.conjunction ) if out ~= '' then if options.before then out = options.before .. out end if options.after then out = out .. options.after end end return out end -- create context local function initContext( options ) local context = { entity = options.entity, extractCategory = extractCategory, formatSnak = formatSnak, formatPropertyDefault = formatPropertyDefault, formatStatementDefault = formatStatementDefault, wrapSnak = wrapSnak, wrapStatement = wrapStatement, wrapQualifier = wrapQualifier, } context.cloneOptions = function( options ) local entity = options.entity; options.entity = nil; newOptions = mw.clone( options ); options.entity = entity; newOptions.entity = entity; newOptions.frame = options.frame; -- На склонированном фрейме frame:expandTemplate() return newOptions; end; context.formatProperty = function( options ) local func = getUserFunction( options, 'property', context.formatPropertyDefault ); return func( context, options ) end; context.formatStatement = function( options, statement ) return formatStatement( context, options, statement ) end; context.formatSnak = function( options, snak, circumstances ) return formatSnak( context, options, snak, circumstances ) end; context.formatRefs = function( options, statement ) return formatRefs( context, options, statement ) end; context.parseTimeFromSnak = function( snak ) if ( snak and snak.datavalue and snak.datavalue.value and snak.datavalue.value.time ) then return tonumber(os.time( splitISO8601( tostring( snak.datavalue.value.time ) ) ) ) * 1000; end return nil; end context.parseTimeBoundariesFromSnak = function( snak ) if ( snak and snak.datavalue and snak.datavalue.value and snak.datavalue.value.time and snak.datavalue.value.precision ) then return parseTimeBoundaries( snak.datavalue.value.time, snak.datavalue.value.precision ); end return nil; end context.getSourcingCircumstances = function( statement ) return getSourcingCircumstances( statement ) end; context.selectClaims = function( options, propertyId ) return selectClaims( context, options, propertyId ) end; return context end --[[ Функция для оформления утверждений (statement) Подробнее о утверждениях см. d:Wikidata:Glossary/ru Принимает: таблицу параметров Возвращает: строку оформленного текста, предназначенного для отображения в статье ]] local function formatProperty( options ) -- Получение сущности по идентификатору local entity = getEntityFromId( options.entityId ) if not entity then return -- throwError( 'entity-not-found' ) end -- проверка на присутсвие у сущности заявлений (claim) -- подробнее о заявлениях см. d:Викиданные:Глоссарий if (entity.claims == nil) then return '' --TODO error? end -- improve options options.frame = g_frame; options.entity = entity; options.extends = function( self, newOptions ) return copyTo( newOptions, copyTo( self, {} ) ) end if ( options.i18n ) then options.i18n = copyTo( options.i18n, copyTo( getConfig( 'i18n' ), {} ) ); else options.i18n = getConfig( 'i18n' ); end local context = initContext( options ); return context.formatProperty( options ); end --[[ Функция для оформления одного утверждения (statement) Принимает: объект-таблицу утверждение и таблицу параметров Возвращает: строку оформленного текста с заявлением (claim) ]] function formatStatement( context, options, statement ) if ( not statement ) then error( 'statement is not specified or nil' ); end if not statement.type or statement.type ~= 'statement' then throwError( 'unknown-claim-type' ) end local functionToCall = getUserFunction( options, 'claim', context.formatStatementDefault ); return functionToCall( context, options, statement ); end function getSourcingCircumstances( statement ) if (not statement) then error('statement is not specified') end; local circumstances = {}; if ( statement.qualifiers and statement.qualifiers.P1480 ) then for i, qualifier in pairs( statement.qualifiers.P1480 ) do if ( qualifier and qualifier.datavalue and qualifier.datavalue.type == 'wikibase-entityid' and qualifier.datavalue.value and qualifier.datavalue.value['entity-type'] == 'item' ) then table.insert(circumstances, qualifier.datavalue.value.id) end end end return circumstances; end --[[ Функция для оформления одного утверждения (statement) Принимает: объект-таблицу утверждение, таблицу параметров, объект-функцию оформления внутренних структур утверждения (snak) и объект-функцию оформления ссылки на источники (reference) Возвращает: строку оформленного текста с заявлением (claim) ]] function formatStatementDefault( context, options, statement ) if (not context) then error('context is not specified') end; if (not options) then error('options is not specified') end; if (not statement) then error('statement is not specified') end; local circumstances = context.getSourcingCircumstances( statement ); options.qualifiers = statement.qualifiers; local result = context.formatSnak( options, statement.mainsnak, circumstances ); if ( options.qualifier and statement.qualifiers and statement.qualifiers[ options.qualifier ] ) then qualConfig = getPropertyParams( options.qualifier, nil, {}) if options.i18n then qualConfig.i18n = options.i18n end local qualifierValues = {}; for _, qualifierSnak in pairs( statement.qualifiers[ options.qualifier ] ) do local snakValue = context.formatSnak( qualConfig, qualifierSnak ); if snakValue and snakValue ~= '' then table.insert( qualifierValues, snakValue ); end end if ( result and result ~= '' and #qualifierValues ) then if qualConfig.invisible then result = result .. table.concat( qualifierValues, ', ' ); else result = result .. ' (' .. table.concat( qualifierValues, ', ' ) .. ')'; end end end if ( result and result ~= '' and options.references ) then result = result .. context.formatRefs( options, statement ); end return result; end --[[ Функция для оформления части утверждения (snak) Подробнее о snak см. d:Викиданные:Глоссарий Принимает: таблицу snak объекта (main snak или же snak от квалификатора) и таблицу опций Возвращает: строку оформленного викитекста ]] function formatSnak( context, options, snak, circumstances ) circumstances = circumstances or {}; if snak.snaktype == 'somevalue' then if ( options['somevalue'] and options['somevalue'] ~= '' ) then result = options['somevalue']; else result = options.i18n['somevalue']; end elseif snak.snaktype == 'novalue' then if ( options['novalue'] and options['novalue'] ~= '' ) then result = options['novalue']; else result = options.i18n['novalue']; end elseif snak.snaktype == 'value' then result = formatDatavalue( context, options, snak.datavalue, snak.datatype ); for _, item in pairs(circumstances) do if options.i18n[item] then local circumstanceText = options.i18n[item] local placeholderPattern = "%.%.%." local placeholderPos = string.find(circumstanceText, placeholderPattern) if placeholderPos then -- eger satırda çoq noqta olsa (meselâ, "... yaqın"), esas metin çoq noqtanıñ yerine qoymalı result = string.gsub(options.i18n[item], placeholderPattern, result); else -- eger satırda çoq noqta olmasa (meselâ, "belki, "), bu satır başlanğıçta qoşılmalı result = options.i18n[item] .. result; end end end else throwError( 'unknown-snak-type' ); end if ( not result or result == '' ) then return nil; end return context.wrapSnak( result, snak.hash ) end --[[ Функция для оформления объектов-значений с географическими координатами Принимает: объект-значение и таблицу параметров, Возвращает: строку оформленного текста ]] local function formatGlobeCoordinate( value, options ) -- проверка на требование в параметрах вызова на возврат сырого значения if options['subvalue'] == 'latitude' then -- широты return value['latitude'] elseif options['subvalue'] == 'longitude' then -- долготы return value['longitude'] elseif options['nocoord'] and options['nocoord'] ~= '' then -- если передан параметр nocoord, то не выводить координаты -- обычно это делается при использовании нескольких карточек на странице return '' else -- в противном случае формируются параметры для вызова шаблона {{coord}} -- нужно дописать в документации шаблона, что он отсюда вызывается, и что -- любое изменние его парамеров должно быть согласовано с кодом тут coord_mod = require( "Module:Coordinates" ); local globe = options.globe or '' if globe == '' and value['globe'] then globes = require( 'Module:Wikidata/Globes' ) globe = globes[value['globe']] or '' end local display = 'inline' if options.display and options.display ~= '' then display = options.display elseif ( options.property:upper() == 'P625' ) then display = 'title' end local format = options.format or '' if format == '' then format = 'dms' if value['precision'] then local precision = value['precision'] * 60 if precision >= 60 then format = 'd' elseif precision >= 1 then format = 'dm' end end end g_frame.args = { tostring(value['latitude']), tostring(value['longitude']), globe = globe, type = options.type and options.type or '', scale = options.scale and options.scale or '', display = display, format = format, } return coord_mod.coord(g_frame) end end --[[ Функция для оформления объектов-значений с файлами с Викисклада Принимает: объект-значение и таблицу параметров, Возвращает: строку оформленного текста ]] local function formatCommonsMedia( value, options ) local image = value; local caption = ''; if options[ 'caption' ] and options[ 'caption' ] ~= '' then caption = options[ 'caption' ]; end if caption ~= '' then caption = wrapQualifier( caption, 'P2096', { class = 'media-caption', style = 'display:block' } ); end if not string.find( value, '[%[%]%{%}]' ) and not string.find( value, 'UNIQ%-%-imagemap' ) then -- если в value не содержится викикод или imagemap, то викифицируем имя файла -- ищем слово imagemap в строке, потому что вставляется плейсхолдер: [[PHAB:T28213]] image = '[[File:' .. value .. '|frameless'; if options[ 'border' ] and options[ 'border' ] ~= '' then image = image .. '|border'; end local size = options[ 'size' ]; if size and size ~= '' then -- TODO: check localized pixel names too if not string.match( size, 'px$' ) then size = size .. 'px' end else size = fileDefaultSize; end image = image .. '|' .. size; if options[ 'alt' ] and options[ 'alt' ] ~= '' then image = image .. '|alt=' .. options[ 'alt' ]; end if caption ~= '' then image = image .. '|' .. caption end image = image .. ']]'; if caption ~= '' then image = image .. '<br>' .. caption; end else image = image .. caption .. getCategoryByCode( 'media-contains-markup' ); end return image end --[[ Fonction for render math formulas @param string Value. @param table Parameters. @return string Formatted string. ]] local function formatMath( value, options ) return options.frame:extensionTag{ name = 'math', content = value }; end --[[ Функция для оформления внешних идентификаторов Принимает: объект-значение и таблицу параметров, Возвращает: строку оформленного текста ]] local function formatExternalId( value, options ) local formatter = options.formatter; if not formatter or formatter == '' then local wbStatus, propertyEntity = pcall( mw.wikibase.getEntity, options.property:upper() ) if wbStatus == true and propertyEntity then local isGoodFormat = false; local statements = propertyEntity:getBestStatements( 'P1793' ); for _, statement in pairs( statements ) do if statement.mainsnak.snaktype == 'value' then local pattern = mw.ustring.gsub( statement.mainsnak.datavalue.value, '\\', '%' ); pattern = mw.ustring.gsub( pattern, '{%d+,?%d*}', '+' ); if ( string.find( pattern, '|' ) or string.find( pattern, '%)%?' ) or mw.ustring.match( value, '^' .. pattern .. '$' ) ~= nil ) then isGoodFormat = true; break; end end end if ( isGoodFormat == true ) then statements = propertyEntity:getBestStatements( 'P1630' ); for _, statement in pairs( statements ) do if statement.mainsnak.snaktype == 'value' then formatter = statement.mainsnak.datavalue.value; break end end end end end if formatter and formatter ~= '' then local encodedValue = mw.ustring.gsub( value, '%%', '%%%%' ) -- ломается, если подставить внутрь другого mw.ustring.gsub local link = mw.ustring.gsub( mw.ustring.gsub( formatter, '$1', encodedValue ), '.', { [' '] = '%20', ['+'] = '%2b', ['['] = '%5B', [']'] = '%5D' } ) local title = options.title if not title or title == '' then title = '$1' end title = mw.ustring.gsub( mw.ustring.gsub( title, '$1', encodedValue ), '.', { ['['] = '(', [']'] = ')' } ) return '[' .. link .. ' ' .. title .. ']' end return value end --[[ Функция для оформления числовых значений Принимает: объект-значение и таблицу параметров, Возвращает: строку оформленного текста ]] local function formatQuantity( value, options ) -- диапазон значений local amount = string.gsub( value['amount'], '^%+', '' ); local lang = mw.language.getContentLanguage(); local numberLang = mw.language.new( 'uk' ); local langCode = lang:getCode(); local function formatNum( number, sigfig ) local multiplier = '' if options.countByThousands then local powers = options.i18n['thousandPowers'] local pos = 1 while math.abs(number) >= 1000 and pos < #powers do number = number / 1000 pos = pos + 1 end multiplier = powers[pos] if math.abs(number) >= 100 then sigfig = sigfig or 0 elseif math.abs(number) >= 10 then sigfig = sigfig or 1 else sigfig = sigfig or 2 end else sigfig = sigfig or 12 -- округление до 12 знаков после запятой, на 13-м возникает ошибка в точности end local mult = 10^sigfig; number = math.floor( number * mult + 0.5 ) / mult; return string.gsub( numberLang:formatNum( number ), '^-', '−' ) .. multiplier; end local out = formatNum( tonumber( amount ) ); if value.upperBound then local diff = tonumber( value.upperBound ) - tonumber( amount ) if diff > 0 then -- временная провека, пока у большинства значений не будет убрано ±0 -- Пробуем понять до какого знака округлять local integer, dot, decimals, expstr = value.upperBound:match( '^+?-?(%d*)(%.?)(%d*)(.*)' ) local prec if dot == '' then prec = -integer:match('0*$'):len() else prec = #decimals end bound = formatNum( diff, prec ) if string.match( bound, 'E%-(%d+)' ) then -- если в экспоненциальном формате digits = tonumber( string.match( bound, 'E%-(%d+)' ) ) - 2 bound = formatNum( diff * 10 ^ digits, prec ) bound = string.sub( bound, 0, 2 ) .. string.rep( '0', digits ) .. string.sub( bound, -string.len( bound ) + 2 ) end out = out .. ' ± ' .. bound end end if options.unit and options.unit ~= '' then if options.unit ~= '-' then out = out .. ' ' .. options.unit end elseif value.unit and string.match( value.unit, 'http://www.wikidata.org/entity/' ) then local unitEntityId = string.gsub( value.unit, 'http://www.wikidata.org/entity/', '' ); if unitEntityId ~= 'undefined' then local wbStatus, unitEntity = pcall( mw.wikibase.getEntity, unitEntityId ); if wbStatus == true and unitEntity then if unitEntity.claims.P2370 and unitEntity.claims.P2370[1].mainsnak.snaktype == 'value' and not value.upperBound and options.siConversion == true then conversionToSIunit = string.gsub( unitEntity.claims.P2370[1].mainsnak.datavalue.value.amount, '^%+', '' ); if math.floor( math.log10( conversionToSIunit )) ~= math.log10( conversionToSIunit ) then -- Если не степени десятки (переводить сантиметры в метры не надо!) outValue = tonumber( amount ) * conversionToSIunit if ( outValue > 0 ) then -- Пробуем понять до какого знака округлять local integer, dot, decimals, expstr = amount:match( '^(%d*)(%.?)(%d*)(.*)' ) local prec if dot == '' then prec = -integer:match('0*$'):len() else prec = #decimals end local adjust = math.log10( math.abs( conversionToSIunit )) + math.log10( 2 ) local minprec = 1 - math.floor( math.log10( outValue ) + 2e-14 ); out = formatNum( outValue, math.max( math.floor( prec + adjust ), minprec )); else out = formatNum( outValue, 0 ) end unitEntityId = string.gsub( unitEntity.claims.P2370[1].mainsnak.datavalue.value.unit, 'http://www.wikidata.org/entity/', '' ); wbStatus, unitEntity = pcall( mw.wikibase.getEntity, unitEntityId ); end end local writingSystemElementId = 'Q8209'; local langElementId = 'Q7737'; local label = getLabelWithLang( context, options, unitEntity.id, nil, { "P5061", "P558", "P558" }, { 'P5061[language:' .. langCode .. ']', 'P558[P282:' .. writingSystemElementId .. ', P407:' .. langElementId .. ']', 'P558[!P282][!P407]' } ); out = out .. ' ' .. label; end end end return out; end -- Функция для оформления URL local function formatUrlValue( context, options, value ) if not options.length or options.length == '' then options.length = 25 end local moduleUrl = require( 'Module:URL' ) return moduleUrl.formatUrlSingle( context, options, value ) end local DATATYPE_CACHE = {} --[[ Get property datatype by ID. @param string Property ID, e.g. 'P123'. @return string Property datatype, e.g. 'commonsMedia', 'time' or 'url'. ]] local function getPropertyDatatype( propertyId ) if not propertyId or not string.match( propertyId, '^P%d+$' ) then return nil; end local cached = DATATYPE_CACHE[propertyId]; if (cached ~= nil) then return cached; end local wbStatus, propertyEntity = pcall( mw.wikibase.getEntity, propertyId ); if wbStatus ~= true or not propertyEntity then return nil; end mw.log("Loaded datatype " .. propertyEntity.datatype .. " of " .. propertyId .. ' from wikidata, consider passing datatype argument to formatProperty call or to Wikidata/config' ) DATATYPE_CACHE[propertyId] = propertyEntity.datatype; return propertyEntity.datatype; end local function getDefaultValueFunction( datavalue, datatype ) -- вызов обработчиков по умолчанию для известных типов значений if datavalue.type == 'wikibase-entityid' then -- Entity ID return function( context, options, value ) return formatEntityId( context, options, getEntityIdFromValue( value ) ) end; elseif datavalue.type == 'string' then -- String if datatype and datatype == 'commonsMedia' then -- Media return function( context, options, value ) return formatCommonsMedia( value, options ) end; elseif datatype and datatype == 'external-id' then -- External ID return function( context, options, value ) return formatExternalId( value, options ) end elseif datatype and datatype == 'math' then -- Math formula return function( context, options, value ) return formatMath( value, options ) end elseif datatype and datatype == 'url' then -- URL return formatUrlValue end return function( context, options, value ) return value end; elseif datavalue.type == 'monolingualtext' then -- моноязычный текст (строка с указанием языка) return function( context, options, value ) if ( options.monolingualLangTemplate == 'lang' ) then if ( value.language == contentLanguageCode ) then return value.text; end local langTemplate, templateEditLink = findLanguageTemplate("lang-", value.language) if langTemplate then return options.frame:expandTemplate{ title = langTemplate, args = { value.text } } .. templateEditLink; else return '<span class="lang" lang="' .. value.language .. '">-{' .. value.text .. '}-</span>' .. templateEditLink .. '[[Kategoriya:' .. commonCategoryNames.unknownLanguageReference .. ']]' end elseif ( options.monolingualLangTemplate == 'ref' ) then local languageIndication = "" local refTemplate, templateEditLink = findLanguageTemplate("ref-", value.language) if refTemplate then languageIndication = options.frame:expandTemplate{ title = refTemplate } .. templateEditLink else languageIndication = templateEditLink .. '[[Kategoriya:' .. commonCategoryNames.unknownLanguageReference .. ']]' end return '<span class="lang" lang="' .. value.language .. '">-{' .. value.text .. '}-</span>' .. languageIndication; else local wrappedValue = value.text; if contentLanguageCode ~= value.language then wrappedValue = "-{" .. value.text .. "}-"; end return '<span class="lang" lang="' .. value.language .. '">' .. wrappedValue .. '</span>'; end end; elseif datavalue.type == 'globecoordinate' then -- географические координаты return function( context, options, value ) return formatGlobeCoordinate( value, options ) end; elseif datavalue.type == 'quantity' then return function( context, options, value ) return formatQuantity( value, options ) end; elseif datavalue.type == 'time' then return function( context, options, value ) local moduleDate = require( 'Module:Wikidata/date' ) return moduleDate.formatDate( context, options, value ); end; else -- во всех стальных случаях возвращаем ошибку throwError( 'unknown-datavalue-type' ) end end --[[ Функция для оформления значений (value) Подробнее о значениях см. d:Wikidata:Glossary/ru Принимает: объект-значение и таблицу параметров, Возвращает: строку оформленного текста ]] function formatDatavalue( context, options, datavalue, datatype ) if ( not context ) then error( 'context not specified' ); end; if ( not options ) then error( 'options not specified' ); end; if ( not datavalue ) then error( 'datavalue not specified' ); end; if ( not datavalue.value ) then error( 'datavalue.value is missng' ); end; -- проверка на указание специализированных обработчиков в параметрах, -- переданных при вызове context.formatValueDefault = getDefaultValueFunction( datavalue, datatype ); local functionToCall = getUserFunction( options, 'value', context.formatValueDefault ); return functionToCall( context, options, datavalue.value ); end local DEFAULT_BOUNDARIES = { os.time() * 1000, os.time() * 1000}; --[[ Функция для оформления идентификатора сущности Принимает: строку индентификатора (типа Q42) и таблицу параметров, Возвращает: строку оформленного текста ]] function formatEntityId( context, options, entityId ) -- получение локализованного названия local boundaries = nil if options.qualifiers then boundaries = p.getTimeBoundariesFromQualifiers( frame, context, { qualifiers = options.qualifiers } ) end if not boundaries then boundaries = DEFAULT_BOUNDARIES; end local label, labelLanguageCode = getLabelWithLang( context, options, entityId, boundaries ) local altScriptLabel = mw.wikibase.getLabelByLang( entityId, altScript.ALT_LANG ) -- определение соответствующей показываемому элементу категории local category = context.extractCategory( options, { id = entityId } ) -- получение ссылки по идентификатору local link = mw.wikibase.sitelink( entityId ) if link then -- ссылка на категорию, а не добавление страницы в неё if mw.ustring.match( link, '^' .. mw.site.namespaces[ 14 ].name .. ':' ) then link = ':' .. link end if label and not options.rawArticle then local needsPipeSyntax = (link == label) and (altScriptLabel ~= nil) local a = needsPipeSyntax and ('[[' .. link .. ']]') or '[[' .. link .. '|' .. altScript.format(label, altScriptLabel, labelLanguageCode) .. ']]'; if ( contentLanguageCode ~= labelLanguageCode and 'mul' ~= labelLanguageCode ) then a = a .. getCategoryByCode( 'links-to-entities-with-missing-local-language-label' ); end return a .. category; else return '[[' .. link .. ']]' .. category; end end if label then -- TODO: возможно, лучше просто mw.wikibase.label(entityId) -- красная ссылка -- TODO: разобраться, почему не всегда есть options.frame local title = mw.title.new( label ); if title and not title.exists and options.frame then local moduleRedLink = require( 'Module:Wikidata/redLink' ) local rawLabel = mw.wikibase.label(entityId) or label -- без |text= и boundaries; or label - костыль local redLink = moduleRedLink.formatRedLinkWithInfobox(rawLabel, label, entityId, nil, altScriptLabel, labelLanguageCode) if ( contentLanguageCode ~= labelLanguageCode and 'mul' ~= labelLanguageCode ) then redLink = redLink .. getCategoryByCode( 'links-to-entities-with-missing-local-language-label' ); end return redLink .. '<sup>[[:d:' .. entityId .. '|[d]]]</sup>' .. category end -- TODO: перенести до проверки на существование статьи local sup = ''; if ( not options.format or options.format ~= 'text' ) and entityId ~= 'Q6581072' and entityId ~= 'Q6581097' -- TODO: переписать на format=text then sup = '<sup class="plainlinks noprint">[//www.wikidata.org/wiki/' .. entityId .. '?uselang=' .. contentLanguageCode .. ' [d&#x5d;]</sup>' end -- одноимённая статья уже существует - выводится текст и ссылка на ВД return '<span class="iw" data-title="' .. label .. '">' .. label .. sup .. '</span>' .. category end -- сообщение об отсутвии локализованного названия -- not good, but better than nothing return '[[:d:' .. entityId .. '|' .. entityId .. ']]<span style="border-bottom: 1px dotted; cursor: help; white-space: nowrap" title="В Викиданных нет русской подписи к элементу. Вы можете помочь, указав русский вариант подписи.">?</span>' .. getCategoryByCode( 'links-to-entities-with-missing-label' ) .. category; end --[[ Entity-niñ adnı köstere Argument: parametrlar cedveli Qayta: maqalede kösterilmek içün formatlaştırğan metin ]] function p.formatEntityIdFromFrame( frame, entityId, options ) local args = frame.args; -- TODO bu aqiqaten yahşı? local context = initContext( args ); return p.formatEntityId( frame, options or {}, entityId ); end --[[ Функция для оформления утверждений (statement) Подробнее о утверждениях см. d:Wikidata:Glossary/ru Принимает: таблицу параметров Возвращает: строку оформленного текста, предназначенного для отображения в статье ]] -- устаревшее имя, не использовать function p.formatStatements( frame ) return p.formatProperty( frame ); end --[[ Получение параметров, которые обычно используются для вывода свойства. ]] function getPropertyParams( propertyId, datatype, params ) local config = getConfig(); -- Различные уровни настройки параметров, по убыванию приоритета local propertyParams = {}; -- 1. Параметры, указанные явно при вызове if params then for key, value in pairs( params ) do if value ~= '' then propertyParams[ key ] = value; end end end -- 2. Настройки конкретного параметра if config[ 'properties' ] and config[ 'properties' ][ propertyId ] then for key, value in pairs( config[ 'properties' ][ propertyId ] ) do if propertyParams[ key ] == nil then propertyParams[ key ] = value; end end end -- 3. Указанный пресет настроек if propertyParams[ 'preset' ] and config[ 'presets' ] and config[ 'presets' ][ propertyParams[ 'preset' ] ] then for key, value in pairs( config[ 'presets' ][ propertyParams[ 'preset' ] ] ) do if propertyParams[ key ] == nil then propertyParams[ key ] = value; end end end local datatype = datatype or params.datatype or propertyParams.datatype or getPropertyDatatype( propertyId ); if propertyParams.datatype == nil then propertyParams.datatype = datatype; end -- 4. Настройки для типа данных if datatype and config[ 'datatypes' ] and config[ 'datatypes' ][ datatype ] then for key, value in pairs( config[ 'datatypes' ][ datatype ] ) do if propertyParams[ key ] == nil then propertyParams[ key ] = value; end end end -- 5. Общие настройки для всех свойств if config[ 'global' ] then for key, value in pairs( config[ 'global' ] ) do if propertyParams[ key ] == nil then propertyParams[ key ] = value; end end end return propertyParams; end function p.formatProperty( frame ) local args = frame.args -- проверка на отсутствие обязательного параметра property if not args.property then throwError( 'property-param-not-provided' ) end local override; local propertyId = mw.language.getContentLanguage():ucfirst( string.gsub( args.property, '([^Pp0-9].*)$', function(w) if string.sub( w, 1, 1 ) == '~' then override = w; end return ''; end ) ) args = getPropertyParams( propertyId, nil, args ); if (override) then args[override:match('[,~]([^=]*)=')] = override:match('=(.*)') args['property'] = propertyId end local datatype = args.datatype; -- проброс всех параметров из шаблона {wikidata} и параметра from откуда угодно p_frame = frame while p_frame do if p_frame:getTitle() == mw.site.namespaces[10].name .. ':Wikidata' then copyTo( p_frame.args, args, true ); end if p_frame.args and p_frame.args.from and p_frame.args.from ~= '' then args.entityId = p_frame.args.from; end p_frame = p_frame:getParent(); end args.plain = toBoolean( args.plain, false ); args.nocat = toBoolean( args.nocat, false ); args.references = toBoolean( args.references, true ); -- если значение передано в параметрах вызова то выводим только его if args.value and args.value ~= '' then -- специальное значение для скрытия Викиданных if args.value == '-' then return '' end local value = args.value -- опция, запрещающая оформление значения, поэтому никак не трогаем if args.plain then return value end local context = initContext( args ); -- обработчики по типу значения local wrapperExtraArgs = {} if args['value-module'] and args['value-function'] and not string.find( value, '[%[%]%{%}]' ) then local func = getUserFunction( args, 'value' ); value = func( context, args, value ); elseif datatype == 'commonsMedia' then value = formatCommonsMedia( value, args ); elseif datatype == 'external-id' and not string.find( value, '[%[%]%{%}]' ) then wrapperExtraArgs['data-wikidata-external-id'] = mw.text.killMarkers( value ); value = formatExternalId( value, args ); --elseif datatype == 'math' then -- args.frame = frame -- костыль: в formatMath нужно frame:extensionTag -- value = formatMath( value, args ); elseif datatype == 'url' then value = formatUrlValue( context, args, value ); end -- оборачиваем в тег для JS-функций if string.match( propertyId, '^P%d+$' ) then value = mw.text.trim( value ) -- временная штрафная категория для исправления табличных вставок local allowTables = getPropertyParams(propertyId, nil, {})['allowTables'] if ( not allowTables and string.match( value, '<t[dhr][ >]' ) -- and not string.match( value, '<table[ >]' ) -- and not string.match( value, '^%{%|' ) ) then value = value .. getCategoryByCode( 'value-contains-table', propertyId ) else value = wrapStatement( value, propertyId, nil, wrapperExtraArgs ); end end return value end if ( args.plain ) then -- вызова стандартного обработчика без оформления, если передана опция plain local callArgs = { propertyId }; if args.entityId then callArgs.from = args.entityId; end return frame:callParserFunction( '#property', callArgs ); end g_frame = frame -- после проверки всех аргументов -- вызов функции оформления для свойства (набора утверждений) return formatProperty( args ) end --[[ Функция проверки на присутствие источника в списке нерекомендованных. Принимает: таблицу snak'ов Возвращает: true/false ]] function isReferenceDeprecated( snaks ) if not snaks then return false end if snaks.P248 and snaks.P248[1] and snaks.P248[1].datavalue and snaks.P248[1].datavalue.value.id then local entityId = snaks.P248[1].datavalue.value.id if getConfig( 'deprecatedSources', entityId ) then return true end elseif snaks.P1433 and snaks.P1433[1] and snaks.P1433[1].datavalue and snaks.P1433[1].datavalue.value.id then local entityId = snaks.P1433[1].datavalue.value.id if getConfig( 'deprecatedSources', entityId ) then return true end end return false end --[[ Функция оформления ссылок на источники (reference) Подробнее о ссылках на источники см. d:Wikidata:Glossary/ru Экспортируется в качестве зарезервированной точки для вызова из функций-расширения вида claim-module/claim-function через context Вызов из других модулей напрямую осуществляться не должен (используйте frame:expandTemplate вместе с одним из специлизированных шаблонов вывода значения свойства). Принимает: объект-таблицу утверждение Возвращает: строку оформленных ссылок для отображения в статье ]] function formatRefs( context, options, statement ) if ( not context ) then error( 'context not specified' ); end; if ( not options ) then error( 'options not specified' ); end; if ( not options.entity ) then error( 'options.entity missing' ); end; if ( not statement ) then error( 'statement not specified' ); end; if ( not outputReferences ) then return ''; end local references = {}; if ( statement.references ) then local allReferences = statement.references; local hasNotDeprecated = false; local displayCount = 0; for _, reference in pairs( statement.references ) do local entityId = nil; if not isReferenceDeprecated( reference.snaks ) then hasNotDeprecated = true; end end for _, reference in pairs( statement.references ) do local display = true; if ( hasNotDeprecated ) then if isReferenceDeprecated( reference.snaks ) then display = false; end end if ( displayCount > 2 ) then if ( options.entity and options.property ) then local propertyID = mw.ustring.match( options.property, '^[Pp][0-9]+' ) -- TODO: обрабатывать не тут, а раньше local moreReferences = '<sup>[[d:' .. options.entity.id .. '#' .. string.upper( propertyID ) .. '|[…]]]</sup>'; table.insert( references, moreReferences ); end break; end if ( display == true ) then local refText = moduleSources.renderReference( g_frame, options.entity, reference ); if ( refText ~= '' ) then table.insert( references, refText ); displayCount = displayCount + 1; end end end end return table.concat( references ); end return p k7gp49sehb4vyh6bmsiz9d09fit88hp 244201 244200 2026-06-09T09:50:15Z Хтосьці 13041 formatEntityIdFromFrame funktsiyasını tüzettim dep ümüt etim 244201 Scribunto text/plain -- settings, may differ from project to project local fileDefaultSize = '267x400px'; local outputReferences = true; -- Ссылки на используемые модули, которые потребуются в 99% случаев загрузки страниц (чтобы иметь на виду при переименовании) local moduleSources = require( 'Module:Sources' ); local WDS = require( 'Module:WikidataSelectors' ); local altScript = require( 'Modul:Alternativ elifbe' ); local commonCategoryNames = mw.loadData('Modul:Umumiy kategoriya adları') -- Константы local contentLanguageCode = mw.getContentLanguage():getCode(); local p = {}; local config = nil; local formatDatavalue, formatEntityId, formatRefs, formatSnak, formatStatement, formatStatementDefault, formatProperty, getSourcingCircumstances, getPropertyDatatype, getPropertyParams, throwError, toBoolean; local function copyTo( obj, target, skipEmpty ) for k, v in pairs( obj ) do if skipEmpty ~= true or ( v ~= nil and v ~= '' ) then target[k] = v; end end return target; end local function min( prev, next ) if ( prev == nil ) then return next; elseif ( prev > next ) then return next; else return prev; end end local function max( prev, next ) if ( prev == nil ) then return next; elseif ( prev < next ) then return next; else return prev; end end local function getConfig( section, code ) if config == nil then config = require( 'Module:Wikidata/config' ); end; if not config then config = {}; end if not section then return config; end if not code then return config[ section ] or {}; end if not config[ section ] then return nil; end return config[ section ][ code ]; end local function getCategoryByCode( code, sortkey ) local value = getConfig( 'categories', code ); if not value or value == '' then return ''; end if sortkey ~= nil then return '[[Category:' .. value .. '|' .. sortkey .. ']]'; -- экранировать? else return '[[Category:' .. value .. ']]'; end end local function splitISO8601(str) if 'table' == type(str) then if str.args and str.args[1] then str = '' .. str.args[1] else return 'unknown argument type: ' .. type( str ) .. ': ' .. table.tostring( str ) end end local Y, M, D = (function(str) local pattern = "(%-?%d+)%-(%d+)%-(%d+)T" local Y, M, D = mw.ustring.match( str, pattern ) return tonumber(Y), tonumber(M), tonumber(D) end) (str); local h, m, s = (function(str) local pattern = "T(%d+):(%d+):(%d+)%Z"; local H, M, S = mw.ustring.match( str, pattern); return tonumber(H), tonumber(M), tonumber(S); end) (str); local oh,om = ( function(str) if str:sub(-1)=="Z" then return 0,0 end; -- ends with Z, Zulu time -- matches ±hh:mm, ±hhmm or ±hh; else returns nils local pattern = "([-+])(%d%d):?(%d?%d?)$"; local sign, oh, om = mw.ustring.match( str, pattern); sign, oh, om = sign or "+", oh or "00", om or "00"; return tonumber(sign .. oh), tonumber(sign .. om); end )(str) return {year=Y, month=M, day=D, hour=(h+oh), min=(m+om), sec=s}; end local function parseTimeBoundaries( time, precision ) local s = splitISO8601( time ); if (not s) then return nil; end if ( precision >= 0 and precision <= 8 ) then local powers = { 1000000000 , 100000000, 10000000, 1000000, 100000, 10000, 1000, 100, 10 } local power = powers[ precision + 1 ]; local left = s.year - ( s.year % power ); return { tonumber(os.time( {year=left, month=1, day=1, hour=0, min=0, sec=0} )) * 1000, tonumber(os.time( {year=left + power - 1, month=12, day=31, hour=29, min=59, sec=58} )) * 1000 + 1999 }; end if ( precision == 9 ) then return { tonumber(os.time( {year=s.year, month=1, day=1, hour=0, min=0, sec=0} )) * 1000, tonumber(os.time( {year=s.year, month=12, day=31, hour=23, min=59, sec=58} )) * 1000 + 1999 }; end if ( precision == 10 ) then local lastDays = {31, 28.25, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; local lastDay = lastDays[s.month]; return { tonumber(os.time( {year=s.year, month=s.month, day=1, hour=0, min=0, sec=0} )) * 1000, tonumber(os.time( {year=s.year, month=s.month, day=lastDay, hour=23, min=59, sec=58} )) * 1000 + 1999 }; end if ( precision == 11 ) then return { tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=0, min=0, sec=0} )) * 1000, tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=23, min=59, sec=58} )) * 1000 + 1999 }; end if ( precision == 12 ) then return { tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=s.hour, min=0, sec=0} )) * 1000, tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=s.hour, min=59, sec=58} )) * 1000 + 1999 }; end if ( precision == 13 ) then return { tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=s.hour, min=s.min, sec=0} )) * 1000, tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=s.hour, min=s.min, sec=58} )) * 1000 + 1999 }; end if ( precision == 14 ) then local t = tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=s.hour, min=s.min, sec=0} ) ); return { t * 1000, t * 1000 + 999 }; end error('Unsupported precision: ' .. precision ); end --[[ Til içün şablon qıdıra. Meselâ: findLanguageTemplate("ref-", "en-au") → "ref-en-au" yaki "ref-en" yaki nil findLanguageTemplate("lang-", "tt-latn") → "lang-tt-latn" yaki "lang-tt" yaki nil Argumentler: - prefix - satır, şablon adınıñ başlanğıcı (meselâ "lang-", "ref-") - languageCode - satır, til kodu (meselâ "en", "en-au", "crh-cyrl") Qaytara: - 1: satır (olğan şablon adı) yaki nil - 2: "" (hassas şablon olsa) yaki hassas şablon yapmaq içün bir bağlantı ]] local function findLanguageTemplate(prefix, languageCode) local templateName = prefix .. languageCode if mw.title.new(templateName, 10).exists then return templateName, "" end local templateEditLink = "<sup title='Til şablonını yaratmaq'>[[:Şablon:" .. templateName .. "|&#91;ş&#93;]]</sup>" local shortLanguageCode = languageCode:gsub("-.*$", "") local shortTemplateName = prefix .. shortLanguageCode if mw.title.new(shortTemplateName, 10).exists then return shortTemplateName, templateEditLink end return nil, templateEditLink end --[[ Функция для формирования категории на основе wikidata/config ]] local function extractCategory( options, value ) if ( not options.category or options.nocat ) then return ''; end local propertyId = string.gsub( options.category, '([^Pp0-9].*)$', ''); local wbStatus, claims = pcall( mw.wikibase.getAllStatements, value.id, propertyId ); if ( wbStatus ~= true or not claims ) then return ''; end allClaims = {} allClaims[ propertyId ] = claims claims = WDS.filter( allClaims, options.category ) if not claims then return ''; end for _, claim in pairs( claims ) do if ( claim and claim.mainsnak and claim.mainsnak.datavalue and claim.mainsnak.datavalue.type == 'wikibase-entityid' ) then local catEntityId = claim.mainsnak.datavalue.value.id; local wbStatus, catSiteLink = pcall( mw.wikibase.getSitelink, catEntityId ); if ( wbStatus == true and catSiteLink ) then return '[[' .. catSiteLink .. ']]'; end end end return ''; end --[[ Преобразует строку в булевое значение Принимает: строковое значение (может отсутствовать) Возвращает: булевое значение true или false, если получается распознать значение, или defaultValue во всех остальных случаях ]] local function toBoolean( valueToParse, defaultValue ) if ( valueToParse ~= nil ) then if valueToParse == false or valueToParse == '' or valueToParse == 'false' or valueToParse == '0' then return false end return true end return defaultValue; end -- Обрачивает отформатированное значение в инлайновый или блочный тег. -- @param value String value -- @param attributes Table of attributes -- @return string HTML tag with value local function wrapValue( value, attributes ) local tagName = 'span'; local spacer = ''; if ( string.match( value, '\n' ) or string.match( value, '<t[dhr][ >]' ) or string.match( value, '<div[ >]' ) or string.find( value, 'UNIQ%-%-imagemap' ) ) then tagName = 'div'; spacer = '\n' end local attrString = '' for key, value in pairs( attributes or {} ) do local _key = mw.text.trim( key ) local _value = mw.text.encode( mw.text.trim( value ) ) attrString = attrString .. _key .. '="' .. _value .. '" ' end return '<' .. tagName .. ' ' .. attrString .. '>' .. spacer .. value .. '</' .. tagName .. '>'; end -- Wraps formatted snak value into HTML tag with attributes. -- @param value String value of snak -- @param hash Snak hash -- @param attributes Table of extra attributes -- @return string HTML tag with value local function wrapSnak( value, hash, attributes ) local newAttributes = mw.clone( attributes or {} ) newAttributes['class'] = ( newAttributes['class'] or '' ) .. ' wikidata-snak' if hash then newAttributes['data-wikidata-hash'] = hash else newAttributes['class'] = newAttributes['class'] .. ' wikidata-main-snak' end return wrapValue( value, newAttributes ) end -- Wraps formatted statement value into HTML tag with attributes. -- @param value String value of statement -- @param propertyId String PID of property -- @param claimId String ID of claim or nil for local value -- @param attributes Table of extra attributes -- @return string HTML tag with value local function wrapStatement( value, propertyId, claimId, attributes ) local newAttributes = mw.clone( attributes or {} ) newAttributes['class'] = newAttributes['class'] or '' newAttributes['data-wikidata-property-id'] = string.upper( propertyId ) if claimId then newAttributes['class'] = newAttributes['class'] .. ' wikidata-claim' newAttributes['data-wikidata-claim-id'] = claimId else newAttributes['class'] = newAttributes['class'] .. ' no-wikidata' end return wrapValue( value, newAttributes ) end -- Wraps formatted qualifier's statement value into HTML tag with attributes. -- @param value String value of qualifier's statement -- @param propertyId String PID of qualifier -- @param attributes Table of extra attributes -- @return string HTML tag with value local function wrapQualifier( value, qualifierId, attributes ) local newAttributes = mw.clone( attributes or {} ) newAttributes['data-wikidata-qualifier-id'] = string.upper( qualifierId ) return wrapValue( value, newAttributes ) end --[[ Функция для получения сущности (еntity) для текущей страницы Подробнее о сущностях см. d:Wikidata:Glossary/ru Принимает: строковый индентификатор (типа P18, Q42) Возвращает: объект таблицу, элементы которой индексируются с нуля ]] local function getEntityFromId( id ) local entity; local wbStatus; if id then wbStatus, entity = pcall( mw.wikibase.getEntityObject, id ) else wbStatus, entity = pcall( mw.wikibase.getEntityObject ); end return entity; end --[[ Внутрення функция для формирования сообщения об ошибке Принимает: ключ элемента в таблице config.errors (например entity-not-found) Возвращает: строку сообщения ]] local function throwError( key ) error( getConfig( 'errors', key ) ); end --[[ Функция для получения идентификатора сущностей Принимает: объект таблицу сущности Возвращает: строковый индентификатор (типа P18, Q42) ]] local function getEntityIdFromValue( value ) local prefix = '' if value['entity-type'] == 'item' then prefix = 'Q' elseif value['entity-type'] == 'property' then prefix = 'P' else throwError( 'unknown-entity-type' ) end return prefix .. value['numeric-id'] end -- проверка на наличие специилизированной функции в опциях local function getUserFunction( options, prefix, defaultFunction ) -- проверка на указание специализированных обработчиков в параметрах, -- переданных при вызове if options[ prefix .. '-module' ] or options[ prefix .. '-function' ] then -- проверка на пустые строки в параметрах или их отсутствие if not options[ prefix .. '-module' ] or not options[ prefix .. '-function' ] then throwError( 'unknown-' .. prefix .. '-module' ); end -- динамическая загруза модуля с обработчиком указанным в параметре local formatter = require( 'Module:' .. options[ prefix .. '-module' ] ); if formatter == nil then throwError( prefix .. '-module-not-found' ) end local fun = formatter[ options[ prefix .. '-function' ] ] if fun == nil then throwError( prefix .. '-function-not-found' ) end return fun; end return defaultFunction; end -- Выбирает свойства по property id, дополнительно фильтруя их по рангу local function selectClaims( context, options, propertySelector ) if ( not context ) then error( 'context not specified' ); end; if ( not options ) then error( 'options not specified' ); end; if ( not options.entity ) then error( 'options.entity is missing' ); end; if ( not propertySelector ) then error( 'propertySelector not specified' ); end; result = WDS.filter( options.entity.claims, propertySelector ); if ( not result or #result == 0 ) then return nil; end if options.limit and options.limit ~= '' and options.limit ~= '-' then local limit = tonumber( options.limit, 10 ); while #result > limit do table.remove( result ); end end return result; end --[[ Функция для получения значения свойства элемента в заданный момент времени. Принимает: контекст, элемент, временные границы, таблица ID свойства Возвращает: таблицу соответствующих значений свойства ]] local function getPropertyInBoundaries( context, entityId, boundaries, propertyIds, selectors ) if (type(entityId) ~= 'string') then error('type of entityId argument expected string, but was ' .. type(entityId)); end local results = {}; if not propertyIds or #propertyIds == 0 then return results; end for _, propertyId in ipairs( propertyIds ) do local selector = selectors[_]; local propertyClaims = mw.wikibase.getAllStatements( entityId, propertyId ); local fakeAllClaims = {}; fakeAllClaims[propertyId] = propertyClaims; local filteredClaims = WDS.filter( fakeAllClaims, selector .. '[rank:preferred, rank:normal]' ); if filteredClaims then for _, claim in pairs( filteredClaims ) do if not boundaries then table.insert( results, claim.mainsnak ); else local startBoundaries = p.getTimeBoundariesFromQualifier( context.frame, context, claim, 'P580' ); local endBoundaries = p.getTimeBoundariesFromQualifier( context.frame, context, claim, 'P582' ); if ( (startBoundaries == nil or ( startBoundaries[2] <= boundaries[1])) and (endBoundaries == nil or ( endBoundaries[1] >= boundaries[2]))) then table.insert( results, claim.mainsnak ); end end end end if #results > 0 then break; end end return results; end --[[ TODO ]] function p.getTimeBoundariesFromQualifier( frame, context, statement, qualifierId ) -- only support exact date so far, but need improvment local left = nil; local right = nil; if ( statement.qualifiers and statement.qualifiers[qualifierId] ) then for _, qualifier in pairs( statement.qualifiers[qualifierId] ) do local boundaries = context.parseTimeBoundariesFromSnak( qualifier ); if ( not boundaries ) then return nil; end left = min( left, boundaries[1] ); right = max( right, boundaries[2] ); end end if ( not left or not right ) then return nil; end return { left, right }; end --[[ TODO ]] function p.getTimeBoundariesFromQualifiers( frame, context, statement, qualifierIds ) if not qualifierIds then qualifierIds = { 'P582', 'P580', 'P585' }; end for _, qualifierId in ipairs( qualifierIds ) do local result = p.getTimeBoundariesFromQualifier( frame, context, statement, qualifierId ); if result then return result; end end return nil; end local CONTENT_LANGUAGE_CODE = mw.language.getContentLanguage():getCode(); local getLabelWithLang_DEFAULT_PROPERTIES = { "P1813", "P1448", "P1705" }; local getLabelWithLang_DEFAULT_SELECTORS = { 'P1813[language:' .. CONTENT_LANGUAGE_CODE .. '][!P3831,P3831:Q105690470]', 'P1448[language:' .. CONTENT_LANGUAGE_CODE .. '][!P3831,P3831:Q105690470]', 'P1705[language:' .. CONTENT_LANGUAGE_CODE .. '][!P3831,P3831:Q105690470]' }; --[[ Функция для получения метки элемента в заданный момент времени. Принимает: контекст, элемент, временные границы Возвращает: текстовую метку элемента, язык метки ]] local function getLabelWithLang( context, options, entityId, boundaries, propertyIds, selectors ) if (type(entityId) ~= 'string') then error('type of entityId argument expected string, but was ' .. type(entityId)); end if not entityId then return nil; end local langCode = CONTENT_LANGUAGE_CODE; -- name from label local label = nil; if ( options.text and options.text ~= '' ) then label = options.text; else if not propertyIds then propertyIds = getLabelWithLang_DEFAULT_PROPERTIES; selectors = getLabelWithLang_DEFAULT_SELECTORS; end -- name from properties local results = getPropertyInBoundaries( context, entityId, boundaries, propertyIds, selectors ); for _, result in pairs( results ) do if result.datavalue and result.datavalue.value then if result.datavalue.type == 'monolingualtext' and result.datavalue.value.text then label = result.datavalue.value.text; langCode = result.datavalue.value.language; break; elseif result.datavalue.type == 'string' then label = result.datavalue.value; break; end end end if (not label) then label, langCode = mw.wikibase.getLabelWithLang( entityId ); if not langCode then return nil; end end end return label, langCode; end local function formatPropertyDefault( context, options ) if ( not context ) then error( 'context not specified' ); end; if ( not options ) then error( 'options not specified' ); end; if ( not options.entity ) then error( 'options.entity missing' ); end; local claims; if options.property then -- TODO: Почему тут может не быть property? if options.rank then -- передать настройки ранга из конфига claims = context.selectClaims( options, options.property .. options.rank ); else claims = context.selectClaims( options, options.property ); end end if claims == nil then return '' --TODO error? end -- Обход всех заявлений утверждения и с накоплением оформленных предпочтительных -- заявлений в таблице local formattedClaims = {} for i, claim in ipairs(claims) do local formattedStatement = context.formatStatement( options, claim ) -- здесь может вернуться либо оформленный текст заявления, либо строка ошибки, либо nil if ( formattedStatement and formattedStatement ~= '' ) then formattedStatement = context.wrapStatement( formattedStatement, options.property, claim.id ) table.insert( formattedClaims, formattedStatement ) end end -- создание текстовой строки со списком оформленых заявлений из таблицы local out = mw.text.listToText( formattedClaims, options.separator, options.conjunction ) if out ~= '' then if options.before then out = options.before .. out end if options.after then out = out .. options.after end end return out end -- create context local function initContext( options ) local context = { entity = options.entity, extractCategory = extractCategory, formatSnak = formatSnak, formatPropertyDefault = formatPropertyDefault, formatStatementDefault = formatStatementDefault, wrapSnak = wrapSnak, wrapStatement = wrapStatement, wrapQualifier = wrapQualifier, } context.cloneOptions = function( options ) local entity = options.entity; options.entity = nil; newOptions = mw.clone( options ); options.entity = entity; newOptions.entity = entity; newOptions.frame = options.frame; -- На склонированном фрейме frame:expandTemplate() return newOptions; end; context.formatProperty = function( options ) local func = getUserFunction( options, 'property', context.formatPropertyDefault ); return func( context, options ) end; context.formatStatement = function( options, statement ) return formatStatement( context, options, statement ) end; context.formatSnak = function( options, snak, circumstances ) return formatSnak( context, options, snak, circumstances ) end; context.formatRefs = function( options, statement ) return formatRefs( context, options, statement ) end; context.parseTimeFromSnak = function( snak ) if ( snak and snak.datavalue and snak.datavalue.value and snak.datavalue.value.time ) then return tonumber(os.time( splitISO8601( tostring( snak.datavalue.value.time ) ) ) ) * 1000; end return nil; end context.parseTimeBoundariesFromSnak = function( snak ) if ( snak and snak.datavalue and snak.datavalue.value and snak.datavalue.value.time and snak.datavalue.value.precision ) then return parseTimeBoundaries( snak.datavalue.value.time, snak.datavalue.value.precision ); end return nil; end context.getSourcingCircumstances = function( statement ) return getSourcingCircumstances( statement ) end; context.selectClaims = function( options, propertyId ) return selectClaims( context, options, propertyId ) end; return context end --[[ Функция для оформления утверждений (statement) Подробнее о утверждениях см. d:Wikidata:Glossary/ru Принимает: таблицу параметров Возвращает: строку оформленного текста, предназначенного для отображения в статье ]] local function formatProperty( options ) -- Получение сущности по идентификатору local entity = getEntityFromId( options.entityId ) if not entity then return -- throwError( 'entity-not-found' ) end -- проверка на присутсвие у сущности заявлений (claim) -- подробнее о заявлениях см. d:Викиданные:Глоссарий if (entity.claims == nil) then return '' --TODO error? end -- improve options options.frame = g_frame; options.entity = entity; options.extends = function( self, newOptions ) return copyTo( newOptions, copyTo( self, {} ) ) end if ( options.i18n ) then options.i18n = copyTo( options.i18n, copyTo( getConfig( 'i18n' ), {} ) ); else options.i18n = getConfig( 'i18n' ); end local context = initContext( options ); return context.formatProperty( options ); end --[[ Функция для оформления одного утверждения (statement) Принимает: объект-таблицу утверждение и таблицу параметров Возвращает: строку оформленного текста с заявлением (claim) ]] function formatStatement( context, options, statement ) if ( not statement ) then error( 'statement is not specified or nil' ); end if not statement.type or statement.type ~= 'statement' then throwError( 'unknown-claim-type' ) end local functionToCall = getUserFunction( options, 'claim', context.formatStatementDefault ); return functionToCall( context, options, statement ); end function getSourcingCircumstances( statement ) if (not statement) then error('statement is not specified') end; local circumstances = {}; if ( statement.qualifiers and statement.qualifiers.P1480 ) then for i, qualifier in pairs( statement.qualifiers.P1480 ) do if ( qualifier and qualifier.datavalue and qualifier.datavalue.type == 'wikibase-entityid' and qualifier.datavalue.value and qualifier.datavalue.value['entity-type'] == 'item' ) then table.insert(circumstances, qualifier.datavalue.value.id) end end end return circumstances; end --[[ Функция для оформления одного утверждения (statement) Принимает: объект-таблицу утверждение, таблицу параметров, объект-функцию оформления внутренних структур утверждения (snak) и объект-функцию оформления ссылки на источники (reference) Возвращает: строку оформленного текста с заявлением (claim) ]] function formatStatementDefault( context, options, statement ) if (not context) then error('context is not specified') end; if (not options) then error('options is not specified') end; if (not statement) then error('statement is not specified') end; local circumstances = context.getSourcingCircumstances( statement ); options.qualifiers = statement.qualifiers; local result = context.formatSnak( options, statement.mainsnak, circumstances ); if ( options.qualifier and statement.qualifiers and statement.qualifiers[ options.qualifier ] ) then qualConfig = getPropertyParams( options.qualifier, nil, {}) if options.i18n then qualConfig.i18n = options.i18n end local qualifierValues = {}; for _, qualifierSnak in pairs( statement.qualifiers[ options.qualifier ] ) do local snakValue = context.formatSnak( qualConfig, qualifierSnak ); if snakValue and snakValue ~= '' then table.insert( qualifierValues, snakValue ); end end if ( result and result ~= '' and #qualifierValues ) then if qualConfig.invisible then result = result .. table.concat( qualifierValues, ', ' ); else result = result .. ' (' .. table.concat( qualifierValues, ', ' ) .. ')'; end end end if ( result and result ~= '' and options.references ) then result = result .. context.formatRefs( options, statement ); end return result; end --[[ Функция для оформления части утверждения (snak) Подробнее о snak см. d:Викиданные:Глоссарий Принимает: таблицу snak объекта (main snak или же snak от квалификатора) и таблицу опций Возвращает: строку оформленного викитекста ]] function formatSnak( context, options, snak, circumstances ) circumstances = circumstances or {}; if snak.snaktype == 'somevalue' then if ( options['somevalue'] and options['somevalue'] ~= '' ) then result = options['somevalue']; else result = options.i18n['somevalue']; end elseif snak.snaktype == 'novalue' then if ( options['novalue'] and options['novalue'] ~= '' ) then result = options['novalue']; else result = options.i18n['novalue']; end elseif snak.snaktype == 'value' then result = formatDatavalue( context, options, snak.datavalue, snak.datatype ); for _, item in pairs(circumstances) do if options.i18n[item] then local circumstanceText = options.i18n[item] local placeholderPattern = "%.%.%." local placeholderPos = string.find(circumstanceText, placeholderPattern) if placeholderPos then -- eger satırda çoq noqta olsa (meselâ, "... yaqın"), esas metin çoq noqtanıñ yerine qoymalı result = string.gsub(options.i18n[item], placeholderPattern, result); else -- eger satırda çoq noqta olmasa (meselâ, "belki, "), bu satır başlanğıçta qoşılmalı result = options.i18n[item] .. result; end end end else throwError( 'unknown-snak-type' ); end if ( not result or result == '' ) then return nil; end return context.wrapSnak( result, snak.hash ) end --[[ Функция для оформления объектов-значений с географическими координатами Принимает: объект-значение и таблицу параметров, Возвращает: строку оформленного текста ]] local function formatGlobeCoordinate( value, options ) -- проверка на требование в параметрах вызова на возврат сырого значения if options['subvalue'] == 'latitude' then -- широты return value['latitude'] elseif options['subvalue'] == 'longitude' then -- долготы return value['longitude'] elseif options['nocoord'] and options['nocoord'] ~= '' then -- если передан параметр nocoord, то не выводить координаты -- обычно это делается при использовании нескольких карточек на странице return '' else -- в противном случае формируются параметры для вызова шаблона {{coord}} -- нужно дописать в документации шаблона, что он отсюда вызывается, и что -- любое изменние его парамеров должно быть согласовано с кодом тут coord_mod = require( "Module:Coordinates" ); local globe = options.globe or '' if globe == '' and value['globe'] then globes = require( 'Module:Wikidata/Globes' ) globe = globes[value['globe']] or '' end local display = 'inline' if options.display and options.display ~= '' then display = options.display elseif ( options.property:upper() == 'P625' ) then display = 'title' end local format = options.format or '' if format == '' then format = 'dms' if value['precision'] then local precision = value['precision'] * 60 if precision >= 60 then format = 'd' elseif precision >= 1 then format = 'dm' end end end g_frame.args = { tostring(value['latitude']), tostring(value['longitude']), globe = globe, type = options.type and options.type or '', scale = options.scale and options.scale or '', display = display, format = format, } return coord_mod.coord(g_frame) end end --[[ Функция для оформления объектов-значений с файлами с Викисклада Принимает: объект-значение и таблицу параметров, Возвращает: строку оформленного текста ]] local function formatCommonsMedia( value, options ) local image = value; local caption = ''; if options[ 'caption' ] and options[ 'caption' ] ~= '' then caption = options[ 'caption' ]; end if caption ~= '' then caption = wrapQualifier( caption, 'P2096', { class = 'media-caption', style = 'display:block' } ); end if not string.find( value, '[%[%]%{%}]' ) and not string.find( value, 'UNIQ%-%-imagemap' ) then -- если в value не содержится викикод или imagemap, то викифицируем имя файла -- ищем слово imagemap в строке, потому что вставляется плейсхолдер: [[PHAB:T28213]] image = '[[File:' .. value .. '|frameless'; if options[ 'border' ] and options[ 'border' ] ~= '' then image = image .. '|border'; end local size = options[ 'size' ]; if size and size ~= '' then -- TODO: check localized pixel names too if not string.match( size, 'px$' ) then size = size .. 'px' end else size = fileDefaultSize; end image = image .. '|' .. size; if options[ 'alt' ] and options[ 'alt' ] ~= '' then image = image .. '|alt=' .. options[ 'alt' ]; end if caption ~= '' then image = image .. '|' .. caption end image = image .. ']]'; if caption ~= '' then image = image .. '<br>' .. caption; end else image = image .. caption .. getCategoryByCode( 'media-contains-markup' ); end return image end --[[ Fonction for render math formulas @param string Value. @param table Parameters. @return string Formatted string. ]] local function formatMath( value, options ) return options.frame:extensionTag{ name = 'math', content = value }; end --[[ Функция для оформления внешних идентификаторов Принимает: объект-значение и таблицу параметров, Возвращает: строку оформленного текста ]] local function formatExternalId( value, options ) local formatter = options.formatter; if not formatter or formatter == '' then local wbStatus, propertyEntity = pcall( mw.wikibase.getEntity, options.property:upper() ) if wbStatus == true and propertyEntity then local isGoodFormat = false; local statements = propertyEntity:getBestStatements( 'P1793' ); for _, statement in pairs( statements ) do if statement.mainsnak.snaktype == 'value' then local pattern = mw.ustring.gsub( statement.mainsnak.datavalue.value, '\\', '%' ); pattern = mw.ustring.gsub( pattern, '{%d+,?%d*}', '+' ); if ( string.find( pattern, '|' ) or string.find( pattern, '%)%?' ) or mw.ustring.match( value, '^' .. pattern .. '$' ) ~= nil ) then isGoodFormat = true; break; end end end if ( isGoodFormat == true ) then statements = propertyEntity:getBestStatements( 'P1630' ); for _, statement in pairs( statements ) do if statement.mainsnak.snaktype == 'value' then formatter = statement.mainsnak.datavalue.value; break end end end end end if formatter and formatter ~= '' then local encodedValue = mw.ustring.gsub( value, '%%', '%%%%' ) -- ломается, если подставить внутрь другого mw.ustring.gsub local link = mw.ustring.gsub( mw.ustring.gsub( formatter, '$1', encodedValue ), '.', { [' '] = '%20', ['+'] = '%2b', ['['] = '%5B', [']'] = '%5D' } ) local title = options.title if not title or title == '' then title = '$1' end title = mw.ustring.gsub( mw.ustring.gsub( title, '$1', encodedValue ), '.', { ['['] = '(', [']'] = ')' } ) return '[' .. link .. ' ' .. title .. ']' end return value end --[[ Функция для оформления числовых значений Принимает: объект-значение и таблицу параметров, Возвращает: строку оформленного текста ]] local function formatQuantity( value, options ) -- диапазон значений local amount = string.gsub( value['amount'], '^%+', '' ); local lang = mw.language.getContentLanguage(); local numberLang = mw.language.new( 'uk' ); local langCode = lang:getCode(); local function formatNum( number, sigfig ) local multiplier = '' if options.countByThousands then local powers = options.i18n['thousandPowers'] local pos = 1 while math.abs(number) >= 1000 and pos < #powers do number = number / 1000 pos = pos + 1 end multiplier = powers[pos] if math.abs(number) >= 100 then sigfig = sigfig or 0 elseif math.abs(number) >= 10 then sigfig = sigfig or 1 else sigfig = sigfig or 2 end else sigfig = sigfig or 12 -- округление до 12 знаков после запятой, на 13-м возникает ошибка в точности end local mult = 10^sigfig; number = math.floor( number * mult + 0.5 ) / mult; return string.gsub( numberLang:formatNum( number ), '^-', '−' ) .. multiplier; end local out = formatNum( tonumber( amount ) ); if value.upperBound then local diff = tonumber( value.upperBound ) - tonumber( amount ) if diff > 0 then -- временная провека, пока у большинства значений не будет убрано ±0 -- Пробуем понять до какого знака округлять local integer, dot, decimals, expstr = value.upperBound:match( '^+?-?(%d*)(%.?)(%d*)(.*)' ) local prec if dot == '' then prec = -integer:match('0*$'):len() else prec = #decimals end bound = formatNum( diff, prec ) if string.match( bound, 'E%-(%d+)' ) then -- если в экспоненциальном формате digits = tonumber( string.match( bound, 'E%-(%d+)' ) ) - 2 bound = formatNum( diff * 10 ^ digits, prec ) bound = string.sub( bound, 0, 2 ) .. string.rep( '0', digits ) .. string.sub( bound, -string.len( bound ) + 2 ) end out = out .. ' ± ' .. bound end end if options.unit and options.unit ~= '' then if options.unit ~= '-' then out = out .. ' ' .. options.unit end elseif value.unit and string.match( value.unit, 'http://www.wikidata.org/entity/' ) then local unitEntityId = string.gsub( value.unit, 'http://www.wikidata.org/entity/', '' ); if unitEntityId ~= 'undefined' then local wbStatus, unitEntity = pcall( mw.wikibase.getEntity, unitEntityId ); if wbStatus == true and unitEntity then if unitEntity.claims.P2370 and unitEntity.claims.P2370[1].mainsnak.snaktype == 'value' and not value.upperBound and options.siConversion == true then conversionToSIunit = string.gsub( unitEntity.claims.P2370[1].mainsnak.datavalue.value.amount, '^%+', '' ); if math.floor( math.log10( conversionToSIunit )) ~= math.log10( conversionToSIunit ) then -- Если не степени десятки (переводить сантиметры в метры не надо!) outValue = tonumber( amount ) * conversionToSIunit if ( outValue > 0 ) then -- Пробуем понять до какого знака округлять local integer, dot, decimals, expstr = amount:match( '^(%d*)(%.?)(%d*)(.*)' ) local prec if dot == '' then prec = -integer:match('0*$'):len() else prec = #decimals end local adjust = math.log10( math.abs( conversionToSIunit )) + math.log10( 2 ) local minprec = 1 - math.floor( math.log10( outValue ) + 2e-14 ); out = formatNum( outValue, math.max( math.floor( prec + adjust ), minprec )); else out = formatNum( outValue, 0 ) end unitEntityId = string.gsub( unitEntity.claims.P2370[1].mainsnak.datavalue.value.unit, 'http://www.wikidata.org/entity/', '' ); wbStatus, unitEntity = pcall( mw.wikibase.getEntity, unitEntityId ); end end local writingSystemElementId = 'Q8209'; local langElementId = 'Q7737'; local label = getLabelWithLang( context, options, unitEntity.id, nil, { "P5061", "P558", "P558" }, { 'P5061[language:' .. langCode .. ']', 'P558[P282:' .. writingSystemElementId .. ', P407:' .. langElementId .. ']', 'P558[!P282][!P407]' } ); out = out .. ' ' .. label; end end end return out; end -- Функция для оформления URL local function formatUrlValue( context, options, value ) if not options.length or options.length == '' then options.length = 25 end local moduleUrl = require( 'Module:URL' ) return moduleUrl.formatUrlSingle( context, options, value ) end local DATATYPE_CACHE = {} --[[ Get property datatype by ID. @param string Property ID, e.g. 'P123'. @return string Property datatype, e.g. 'commonsMedia', 'time' or 'url'. ]] local function getPropertyDatatype( propertyId ) if not propertyId or not string.match( propertyId, '^P%d+$' ) then return nil; end local cached = DATATYPE_CACHE[propertyId]; if (cached ~= nil) then return cached; end local wbStatus, propertyEntity = pcall( mw.wikibase.getEntity, propertyId ); if wbStatus ~= true or not propertyEntity then return nil; end mw.log("Loaded datatype " .. propertyEntity.datatype .. " of " .. propertyId .. ' from wikidata, consider passing datatype argument to formatProperty call or to Wikidata/config' ) DATATYPE_CACHE[propertyId] = propertyEntity.datatype; return propertyEntity.datatype; end local function getDefaultValueFunction( datavalue, datatype ) -- вызов обработчиков по умолчанию для известных типов значений if datavalue.type == 'wikibase-entityid' then -- Entity ID return function( context, options, value ) return formatEntityId( context, options, getEntityIdFromValue( value ) ) end; elseif datavalue.type == 'string' then -- String if datatype and datatype == 'commonsMedia' then -- Media return function( context, options, value ) return formatCommonsMedia( value, options ) end; elseif datatype and datatype == 'external-id' then -- External ID return function( context, options, value ) return formatExternalId( value, options ) end elseif datatype and datatype == 'math' then -- Math formula return function( context, options, value ) return formatMath( value, options ) end elseif datatype and datatype == 'url' then -- URL return formatUrlValue end return function( context, options, value ) return value end; elseif datavalue.type == 'monolingualtext' then -- моноязычный текст (строка с указанием языка) return function( context, options, value ) if ( options.monolingualLangTemplate == 'lang' ) then if ( value.language == contentLanguageCode ) then return value.text; end local langTemplate, templateEditLink = findLanguageTemplate("lang-", value.language) if langTemplate then return options.frame:expandTemplate{ title = langTemplate, args = { value.text } } .. templateEditLink; else return '<span class="lang" lang="' .. value.language .. '">-{' .. value.text .. '}-</span>' .. templateEditLink .. '[[Kategoriya:' .. commonCategoryNames.unknownLanguageReference .. ']]' end elseif ( options.monolingualLangTemplate == 'ref' ) then local languageIndication = "" local refTemplate, templateEditLink = findLanguageTemplate("ref-", value.language) if refTemplate then languageIndication = options.frame:expandTemplate{ title = refTemplate } .. templateEditLink else languageIndication = templateEditLink .. '[[Kategoriya:' .. commonCategoryNames.unknownLanguageReference .. ']]' end return '<span class="lang" lang="' .. value.language .. '">-{' .. value.text .. '}-</span>' .. languageIndication; else local wrappedValue = value.text; if contentLanguageCode ~= value.language then wrappedValue = "-{" .. value.text .. "}-"; end return '<span class="lang" lang="' .. value.language .. '">' .. wrappedValue .. '</span>'; end end; elseif datavalue.type == 'globecoordinate' then -- географические координаты return function( context, options, value ) return formatGlobeCoordinate( value, options ) end; elseif datavalue.type == 'quantity' then return function( context, options, value ) return formatQuantity( value, options ) end; elseif datavalue.type == 'time' then return function( context, options, value ) local moduleDate = require( 'Module:Wikidata/date' ) return moduleDate.formatDate( context, options, value ); end; else -- во всех стальных случаях возвращаем ошибку throwError( 'unknown-datavalue-type' ) end end --[[ Функция для оформления значений (value) Подробнее о значениях см. d:Wikidata:Glossary/ru Принимает: объект-значение и таблицу параметров, Возвращает: строку оформленного текста ]] function formatDatavalue( context, options, datavalue, datatype ) if ( not context ) then error( 'context not specified' ); end; if ( not options ) then error( 'options not specified' ); end; if ( not datavalue ) then error( 'datavalue not specified' ); end; if ( not datavalue.value ) then error( 'datavalue.value is missng' ); end; -- проверка на указание специализированных обработчиков в параметрах, -- переданных при вызове context.formatValueDefault = getDefaultValueFunction( datavalue, datatype ); local functionToCall = getUserFunction( options, 'value', context.formatValueDefault ); return functionToCall( context, options, datavalue.value ); end local DEFAULT_BOUNDARIES = { os.time() * 1000, os.time() * 1000}; --[[ Функция для оформления идентификатора сущности Принимает: строку индентификатора (типа Q42) и таблицу параметров, Возвращает: строку оформленного текста ]] function formatEntityId( context, options, entityId ) -- получение локализованного названия local boundaries = nil if options.qualifiers then boundaries = p.getTimeBoundariesFromQualifiers( frame, context, { qualifiers = options.qualifiers } ) end if not boundaries then boundaries = DEFAULT_BOUNDARIES; end local label, labelLanguageCode = getLabelWithLang( context, options, entityId, boundaries ) local altScriptLabel = mw.wikibase.getLabelByLang( entityId, altScript.ALT_LANG ) -- определение соответствующей показываемому элементу категории local category = context.extractCategory( options, { id = entityId } ) -- получение ссылки по идентификатору local link = mw.wikibase.sitelink( entityId ) if link then -- ссылка на категорию, а не добавление страницы в неё if mw.ustring.match( link, '^' .. mw.site.namespaces[ 14 ].name .. ':' ) then link = ':' .. link end if label and not options.rawArticle then local needsPipeSyntax = (link == label) and (altScriptLabel ~= nil) local a = needsPipeSyntax and ('[[' .. link .. ']]') or '[[' .. link .. '|' .. altScript.format(label, altScriptLabel, labelLanguageCode) .. ']]'; if ( contentLanguageCode ~= labelLanguageCode and 'mul' ~= labelLanguageCode ) then a = a .. getCategoryByCode( 'links-to-entities-with-missing-local-language-label' ); end return a .. category; else return '[[' .. link .. ']]' .. category; end end if label then -- TODO: возможно, лучше просто mw.wikibase.label(entityId) -- красная ссылка -- TODO: разобраться, почему не всегда есть options.frame local title = mw.title.new( label ); if title and not title.exists and options.frame then local moduleRedLink = require( 'Module:Wikidata/redLink' ) local rawLabel = mw.wikibase.label(entityId) or label -- без |text= и boundaries; or label - костыль local redLink = moduleRedLink.formatRedLinkWithInfobox(rawLabel, label, entityId, nil, altScriptLabel, labelLanguageCode) if ( contentLanguageCode ~= labelLanguageCode and 'mul' ~= labelLanguageCode ) then redLink = redLink .. getCategoryByCode( 'links-to-entities-with-missing-local-language-label' ); end return redLink .. '<sup>[[:d:' .. entityId .. '|[d]]]</sup>' .. category end -- TODO: перенести до проверки на существование статьи local sup = ''; if ( not options.format or options.format ~= 'text' ) and entityId ~= 'Q6581072' and entityId ~= 'Q6581097' -- TODO: переписать на format=text then sup = '<sup class="plainlinks noprint">[//www.wikidata.org/wiki/' .. entityId .. '?uselang=' .. contentLanguageCode .. ' [d&#x5d;]</sup>' end -- одноимённая статья уже существует - выводится текст и ссылка на ВД return '<span class="iw" data-title="' .. label .. '">' .. label .. sup .. '</span>' .. category end -- сообщение об отсутвии локализованного названия -- not good, but better than nothing return '[[:d:' .. entityId .. '|' .. entityId .. ']]<span style="border-bottom: 1px dotted; cursor: help; white-space: nowrap" title="В Викиданных нет русской подписи к элементу. Вы можете помочь, указав русский вариант подписи.">?</span>' .. getCategoryByCode( 'links-to-entities-with-missing-label' ) .. category; end --[[ Entity-niñ adnı köstere Argumentler: - frame: parametrlar cedveli ya da nil - entityId: satır - options: cedvel ya da nil Qayta: maqalede kösterilmek içün formatlaştırğan metin ]] function p.formatEntityIdFromFrame( frame, entityId, options ) local args = frame.args or {}; -- TODO bu aqiqaten yahşı? local context = initContext( args ); return p.formatEntityId( context, options or {}, entityId ); end --[[ Функция для оформления утверждений (statement) Подробнее о утверждениях см. d:Wikidata:Glossary/ru Принимает: таблицу параметров Возвращает: строку оформленного текста, предназначенного для отображения в статье ]] -- устаревшее имя, не использовать function p.formatStatements( frame ) return p.formatProperty( frame ); end --[[ Получение параметров, которые обычно используются для вывода свойства. ]] function getPropertyParams( propertyId, datatype, params ) local config = getConfig(); -- Различные уровни настройки параметров, по убыванию приоритета local propertyParams = {}; -- 1. Параметры, указанные явно при вызове if params then for key, value in pairs( params ) do if value ~= '' then propertyParams[ key ] = value; end end end -- 2. Настройки конкретного параметра if config[ 'properties' ] and config[ 'properties' ][ propertyId ] then for key, value in pairs( config[ 'properties' ][ propertyId ] ) do if propertyParams[ key ] == nil then propertyParams[ key ] = value; end end end -- 3. Указанный пресет настроек if propertyParams[ 'preset' ] and config[ 'presets' ] and config[ 'presets' ][ propertyParams[ 'preset' ] ] then for key, value in pairs( config[ 'presets' ][ propertyParams[ 'preset' ] ] ) do if propertyParams[ key ] == nil then propertyParams[ key ] = value; end end end local datatype = datatype or params.datatype or propertyParams.datatype or getPropertyDatatype( propertyId ); if propertyParams.datatype == nil then propertyParams.datatype = datatype; end -- 4. Настройки для типа данных if datatype and config[ 'datatypes' ] and config[ 'datatypes' ][ datatype ] then for key, value in pairs( config[ 'datatypes' ][ datatype ] ) do if propertyParams[ key ] == nil then propertyParams[ key ] = value; end end end -- 5. Общие настройки для всех свойств if config[ 'global' ] then for key, value in pairs( config[ 'global' ] ) do if propertyParams[ key ] == nil then propertyParams[ key ] = value; end end end return propertyParams; end function p.formatProperty( frame ) local args = frame.args -- проверка на отсутствие обязательного параметра property if not args.property then throwError( 'property-param-not-provided' ) end local override; local propertyId = mw.language.getContentLanguage():ucfirst( string.gsub( args.property, '([^Pp0-9].*)$', function(w) if string.sub( w, 1, 1 ) == '~' then override = w; end return ''; end ) ) args = getPropertyParams( propertyId, nil, args ); if (override) then args[override:match('[,~]([^=]*)=')] = override:match('=(.*)') args['property'] = propertyId end local datatype = args.datatype; -- проброс всех параметров из шаблона {wikidata} и параметра from откуда угодно p_frame = frame while p_frame do if p_frame:getTitle() == mw.site.namespaces[10].name .. ':Wikidata' then copyTo( p_frame.args, args, true ); end if p_frame.args and p_frame.args.from and p_frame.args.from ~= '' then args.entityId = p_frame.args.from; end p_frame = p_frame:getParent(); end args.plain = toBoolean( args.plain, false ); args.nocat = toBoolean( args.nocat, false ); args.references = toBoolean( args.references, true ); -- если значение передано в параметрах вызова то выводим только его if args.value and args.value ~= '' then -- специальное значение для скрытия Викиданных if args.value == '-' then return '' end local value = args.value -- опция, запрещающая оформление значения, поэтому никак не трогаем if args.plain then return value end local context = initContext( args ); -- обработчики по типу значения local wrapperExtraArgs = {} if args['value-module'] and args['value-function'] and not string.find( value, '[%[%]%{%}]' ) then local func = getUserFunction( args, 'value' ); value = func( context, args, value ); elseif datatype == 'commonsMedia' then value = formatCommonsMedia( value, args ); elseif datatype == 'external-id' and not string.find( value, '[%[%]%{%}]' ) then wrapperExtraArgs['data-wikidata-external-id'] = mw.text.killMarkers( value ); value = formatExternalId( value, args ); --elseif datatype == 'math' then -- args.frame = frame -- костыль: в formatMath нужно frame:extensionTag -- value = formatMath( value, args ); elseif datatype == 'url' then value = formatUrlValue( context, args, value ); end -- оборачиваем в тег для JS-функций if string.match( propertyId, '^P%d+$' ) then value = mw.text.trim( value ) -- временная штрафная категория для исправления табличных вставок local allowTables = getPropertyParams(propertyId, nil, {})['allowTables'] if ( not allowTables and string.match( value, '<t[dhr][ >]' ) -- and not string.match( value, '<table[ >]' ) -- and not string.match( value, '^%{%|' ) ) then value = value .. getCategoryByCode( 'value-contains-table', propertyId ) else value = wrapStatement( value, propertyId, nil, wrapperExtraArgs ); end end return value end if ( args.plain ) then -- вызова стандартного обработчика без оформления, если передана опция plain local callArgs = { propertyId }; if args.entityId then callArgs.from = args.entityId; end return frame:callParserFunction( '#property', callArgs ); end g_frame = frame -- после проверки всех аргументов -- вызов функции оформления для свойства (набора утверждений) return formatProperty( args ) end --[[ Функция проверки на присутствие источника в списке нерекомендованных. Принимает: таблицу snak'ов Возвращает: true/false ]] function isReferenceDeprecated( snaks ) if not snaks then return false end if snaks.P248 and snaks.P248[1] and snaks.P248[1].datavalue and snaks.P248[1].datavalue.value.id then local entityId = snaks.P248[1].datavalue.value.id if getConfig( 'deprecatedSources', entityId ) then return true end elseif snaks.P1433 and snaks.P1433[1] and snaks.P1433[1].datavalue and snaks.P1433[1].datavalue.value.id then local entityId = snaks.P1433[1].datavalue.value.id if getConfig( 'deprecatedSources', entityId ) then return true end end return false end --[[ Функция оформления ссылок на источники (reference) Подробнее о ссылках на источники см. d:Wikidata:Glossary/ru Экспортируется в качестве зарезервированной точки для вызова из функций-расширения вида claim-module/claim-function через context Вызов из других модулей напрямую осуществляться не должен (используйте frame:expandTemplate вместе с одним из специлизированных шаблонов вывода значения свойства). Принимает: объект-таблицу утверждение Возвращает: строку оформленных ссылок для отображения в статье ]] function formatRefs( context, options, statement ) if ( not context ) then error( 'context not specified' ); end; if ( not options ) then error( 'options not specified' ); end; if ( not options.entity ) then error( 'options.entity missing' ); end; if ( not statement ) then error( 'statement not specified' ); end; if ( not outputReferences ) then return ''; end local references = {}; if ( statement.references ) then local allReferences = statement.references; local hasNotDeprecated = false; local displayCount = 0; for _, reference in pairs( statement.references ) do local entityId = nil; if not isReferenceDeprecated( reference.snaks ) then hasNotDeprecated = true; end end for _, reference in pairs( statement.references ) do local display = true; if ( hasNotDeprecated ) then if isReferenceDeprecated( reference.snaks ) then display = false; end end if ( displayCount > 2 ) then if ( options.entity and options.property ) then local propertyID = mw.ustring.match( options.property, '^[Pp][0-9]+' ) -- TODO: обрабатывать не тут, а раньше local moreReferences = '<sup>[[d:' .. options.entity.id .. '#' .. string.upper( propertyID ) .. '|[…]]]</sup>'; table.insert( references, moreReferences ); end break; end if ( display == true ) then local refText = moduleSources.renderReference( g_frame, options.entity, reference ); if ( refText ~= '' ) then table.insert( references, refText ); displayCount = displayCount + 1; end end end end return table.concat( references ); end return p bffa3rxtj37cfxrpfgldgb59g9xvm3g 244202 244201 2026-06-09T09:50:47Z Хтосьці 13041 formatEntityIdFromFrame funktsiyasını tüzettim dep ümüt etim #2 244202 Scribunto text/plain -- settings, may differ from project to project local fileDefaultSize = '267x400px'; local outputReferences = true; -- Ссылки на используемые модули, которые потребуются в 99% случаев загрузки страниц (чтобы иметь на виду при переименовании) local moduleSources = require( 'Module:Sources' ); local WDS = require( 'Module:WikidataSelectors' ); local altScript = require( 'Modul:Alternativ elifbe' ); local commonCategoryNames = mw.loadData('Modul:Umumiy kategoriya adları') -- Константы local contentLanguageCode = mw.getContentLanguage():getCode(); local p = {}; local config = nil; local formatDatavalue, formatEntityId, formatRefs, formatSnak, formatStatement, formatStatementDefault, formatProperty, getSourcingCircumstances, getPropertyDatatype, getPropertyParams, throwError, toBoolean; local function copyTo( obj, target, skipEmpty ) for k, v in pairs( obj ) do if skipEmpty ~= true or ( v ~= nil and v ~= '' ) then target[k] = v; end end return target; end local function min( prev, next ) if ( prev == nil ) then return next; elseif ( prev > next ) then return next; else return prev; end end local function max( prev, next ) if ( prev == nil ) then return next; elseif ( prev < next ) then return next; else return prev; end end local function getConfig( section, code ) if config == nil then config = require( 'Module:Wikidata/config' ); end; if not config then config = {}; end if not section then return config; end if not code then return config[ section ] or {}; end if not config[ section ] then return nil; end return config[ section ][ code ]; end local function getCategoryByCode( code, sortkey ) local value = getConfig( 'categories', code ); if not value or value == '' then return ''; end if sortkey ~= nil then return '[[Category:' .. value .. '|' .. sortkey .. ']]'; -- экранировать? else return '[[Category:' .. value .. ']]'; end end local function splitISO8601(str) if 'table' == type(str) then if str.args and str.args[1] then str = '' .. str.args[1] else return 'unknown argument type: ' .. type( str ) .. ': ' .. table.tostring( str ) end end local Y, M, D = (function(str) local pattern = "(%-?%d+)%-(%d+)%-(%d+)T" local Y, M, D = mw.ustring.match( str, pattern ) return tonumber(Y), tonumber(M), tonumber(D) end) (str); local h, m, s = (function(str) local pattern = "T(%d+):(%d+):(%d+)%Z"; local H, M, S = mw.ustring.match( str, pattern); return tonumber(H), tonumber(M), tonumber(S); end) (str); local oh,om = ( function(str) if str:sub(-1)=="Z" then return 0,0 end; -- ends with Z, Zulu time -- matches ±hh:mm, ±hhmm or ±hh; else returns nils local pattern = "([-+])(%d%d):?(%d?%d?)$"; local sign, oh, om = mw.ustring.match( str, pattern); sign, oh, om = sign or "+", oh or "00", om or "00"; return tonumber(sign .. oh), tonumber(sign .. om); end )(str) return {year=Y, month=M, day=D, hour=(h+oh), min=(m+om), sec=s}; end local function parseTimeBoundaries( time, precision ) local s = splitISO8601( time ); if (not s) then return nil; end if ( precision >= 0 and precision <= 8 ) then local powers = { 1000000000 , 100000000, 10000000, 1000000, 100000, 10000, 1000, 100, 10 } local power = powers[ precision + 1 ]; local left = s.year - ( s.year % power ); return { tonumber(os.time( {year=left, month=1, day=1, hour=0, min=0, sec=0} )) * 1000, tonumber(os.time( {year=left + power - 1, month=12, day=31, hour=29, min=59, sec=58} )) * 1000 + 1999 }; end if ( precision == 9 ) then return { tonumber(os.time( {year=s.year, month=1, day=1, hour=0, min=0, sec=0} )) * 1000, tonumber(os.time( {year=s.year, month=12, day=31, hour=23, min=59, sec=58} )) * 1000 + 1999 }; end if ( precision == 10 ) then local lastDays = {31, 28.25, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31}; local lastDay = lastDays[s.month]; return { tonumber(os.time( {year=s.year, month=s.month, day=1, hour=0, min=0, sec=0} )) * 1000, tonumber(os.time( {year=s.year, month=s.month, day=lastDay, hour=23, min=59, sec=58} )) * 1000 + 1999 }; end if ( precision == 11 ) then return { tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=0, min=0, sec=0} )) * 1000, tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=23, min=59, sec=58} )) * 1000 + 1999 }; end if ( precision == 12 ) then return { tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=s.hour, min=0, sec=0} )) * 1000, tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=s.hour, min=59, sec=58} )) * 1000 + 1999 }; end if ( precision == 13 ) then return { tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=s.hour, min=s.min, sec=0} )) * 1000, tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=s.hour, min=s.min, sec=58} )) * 1000 + 1999 }; end if ( precision == 14 ) then local t = tonumber(os.time( {year=s.year, month=s.month, day=s.day, hour=s.hour, min=s.min, sec=0} ) ); return { t * 1000, t * 1000 + 999 }; end error('Unsupported precision: ' .. precision ); end --[[ Til içün şablon qıdıra. Meselâ: findLanguageTemplate("ref-", "en-au") → "ref-en-au" yaki "ref-en" yaki nil findLanguageTemplate("lang-", "tt-latn") → "lang-tt-latn" yaki "lang-tt" yaki nil Argumentler: - prefix - satır, şablon adınıñ başlanğıcı (meselâ "lang-", "ref-") - languageCode - satır, til kodu (meselâ "en", "en-au", "crh-cyrl") Qaytara: - 1: satır (olğan şablon adı) yaki nil - 2: "" (hassas şablon olsa) yaki hassas şablon yapmaq içün bir bağlantı ]] local function findLanguageTemplate(prefix, languageCode) local templateName = prefix .. languageCode if mw.title.new(templateName, 10).exists then return templateName, "" end local templateEditLink = "<sup title='Til şablonını yaratmaq'>[[:Şablon:" .. templateName .. "|&#91;ş&#93;]]</sup>" local shortLanguageCode = languageCode:gsub("-.*$", "") local shortTemplateName = prefix .. shortLanguageCode if mw.title.new(shortTemplateName, 10).exists then return shortTemplateName, templateEditLink end return nil, templateEditLink end --[[ Функция для формирования категории на основе wikidata/config ]] local function extractCategory( options, value ) if ( not options.category or options.nocat ) then return ''; end local propertyId = string.gsub( options.category, '([^Pp0-9].*)$', ''); local wbStatus, claims = pcall( mw.wikibase.getAllStatements, value.id, propertyId ); if ( wbStatus ~= true or not claims ) then return ''; end allClaims = {} allClaims[ propertyId ] = claims claims = WDS.filter( allClaims, options.category ) if not claims then return ''; end for _, claim in pairs( claims ) do if ( claim and claim.mainsnak and claim.mainsnak.datavalue and claim.mainsnak.datavalue.type == 'wikibase-entityid' ) then local catEntityId = claim.mainsnak.datavalue.value.id; local wbStatus, catSiteLink = pcall( mw.wikibase.getSitelink, catEntityId ); if ( wbStatus == true and catSiteLink ) then return '[[' .. catSiteLink .. ']]'; end end end return ''; end --[[ Преобразует строку в булевое значение Принимает: строковое значение (может отсутствовать) Возвращает: булевое значение true или false, если получается распознать значение, или defaultValue во всех остальных случаях ]] local function toBoolean( valueToParse, defaultValue ) if ( valueToParse ~= nil ) then if valueToParse == false or valueToParse == '' or valueToParse == 'false' or valueToParse == '0' then return false end return true end return defaultValue; end -- Обрачивает отформатированное значение в инлайновый или блочный тег. -- @param value String value -- @param attributes Table of attributes -- @return string HTML tag with value local function wrapValue( value, attributes ) local tagName = 'span'; local spacer = ''; if ( string.match( value, '\n' ) or string.match( value, '<t[dhr][ >]' ) or string.match( value, '<div[ >]' ) or string.find( value, 'UNIQ%-%-imagemap' ) ) then tagName = 'div'; spacer = '\n' end local attrString = '' for key, value in pairs( attributes or {} ) do local _key = mw.text.trim( key ) local _value = mw.text.encode( mw.text.trim( value ) ) attrString = attrString .. _key .. '="' .. _value .. '" ' end return '<' .. tagName .. ' ' .. attrString .. '>' .. spacer .. value .. '</' .. tagName .. '>'; end -- Wraps formatted snak value into HTML tag with attributes. -- @param value String value of snak -- @param hash Snak hash -- @param attributes Table of extra attributes -- @return string HTML tag with value local function wrapSnak( value, hash, attributes ) local newAttributes = mw.clone( attributes or {} ) newAttributes['class'] = ( newAttributes['class'] or '' ) .. ' wikidata-snak' if hash then newAttributes['data-wikidata-hash'] = hash else newAttributes['class'] = newAttributes['class'] .. ' wikidata-main-snak' end return wrapValue( value, newAttributes ) end -- Wraps formatted statement value into HTML tag with attributes. -- @param value String value of statement -- @param propertyId String PID of property -- @param claimId String ID of claim or nil for local value -- @param attributes Table of extra attributes -- @return string HTML tag with value local function wrapStatement( value, propertyId, claimId, attributes ) local newAttributes = mw.clone( attributes or {} ) newAttributes['class'] = newAttributes['class'] or '' newAttributes['data-wikidata-property-id'] = string.upper( propertyId ) if claimId then newAttributes['class'] = newAttributes['class'] .. ' wikidata-claim' newAttributes['data-wikidata-claim-id'] = claimId else newAttributes['class'] = newAttributes['class'] .. ' no-wikidata' end return wrapValue( value, newAttributes ) end -- Wraps formatted qualifier's statement value into HTML tag with attributes. -- @param value String value of qualifier's statement -- @param propertyId String PID of qualifier -- @param attributes Table of extra attributes -- @return string HTML tag with value local function wrapQualifier( value, qualifierId, attributes ) local newAttributes = mw.clone( attributes or {} ) newAttributes['data-wikidata-qualifier-id'] = string.upper( qualifierId ) return wrapValue( value, newAttributes ) end --[[ Функция для получения сущности (еntity) для текущей страницы Подробнее о сущностях см. d:Wikidata:Glossary/ru Принимает: строковый индентификатор (типа P18, Q42) Возвращает: объект таблицу, элементы которой индексируются с нуля ]] local function getEntityFromId( id ) local entity; local wbStatus; if id then wbStatus, entity = pcall( mw.wikibase.getEntityObject, id ) else wbStatus, entity = pcall( mw.wikibase.getEntityObject ); end return entity; end --[[ Внутрення функция для формирования сообщения об ошибке Принимает: ключ элемента в таблице config.errors (например entity-not-found) Возвращает: строку сообщения ]] local function throwError( key ) error( getConfig( 'errors', key ) ); end --[[ Функция для получения идентификатора сущностей Принимает: объект таблицу сущности Возвращает: строковый индентификатор (типа P18, Q42) ]] local function getEntityIdFromValue( value ) local prefix = '' if value['entity-type'] == 'item' then prefix = 'Q' elseif value['entity-type'] == 'property' then prefix = 'P' else throwError( 'unknown-entity-type' ) end return prefix .. value['numeric-id'] end -- проверка на наличие специилизированной функции в опциях local function getUserFunction( options, prefix, defaultFunction ) -- проверка на указание специализированных обработчиков в параметрах, -- переданных при вызове if options[ prefix .. '-module' ] or options[ prefix .. '-function' ] then -- проверка на пустые строки в параметрах или их отсутствие if not options[ prefix .. '-module' ] or not options[ prefix .. '-function' ] then throwError( 'unknown-' .. prefix .. '-module' ); end -- динамическая загруза модуля с обработчиком указанным в параметре local formatter = require( 'Module:' .. options[ prefix .. '-module' ] ); if formatter == nil then throwError( prefix .. '-module-not-found' ) end local fun = formatter[ options[ prefix .. '-function' ] ] if fun == nil then throwError( prefix .. '-function-not-found' ) end return fun; end return defaultFunction; end -- Выбирает свойства по property id, дополнительно фильтруя их по рангу local function selectClaims( context, options, propertySelector ) if ( not context ) then error( 'context not specified' ); end; if ( not options ) then error( 'options not specified' ); end; if ( not options.entity ) then error( 'options.entity is missing' ); end; if ( not propertySelector ) then error( 'propertySelector not specified' ); end; result = WDS.filter( options.entity.claims, propertySelector ); if ( not result or #result == 0 ) then return nil; end if options.limit and options.limit ~= '' and options.limit ~= '-' then local limit = tonumber( options.limit, 10 ); while #result > limit do table.remove( result ); end end return result; end --[[ Функция для получения значения свойства элемента в заданный момент времени. Принимает: контекст, элемент, временные границы, таблица ID свойства Возвращает: таблицу соответствующих значений свойства ]] local function getPropertyInBoundaries( context, entityId, boundaries, propertyIds, selectors ) if (type(entityId) ~= 'string') then error('type of entityId argument expected string, but was ' .. type(entityId)); end local results = {}; if not propertyIds or #propertyIds == 0 then return results; end for _, propertyId in ipairs( propertyIds ) do local selector = selectors[_]; local propertyClaims = mw.wikibase.getAllStatements( entityId, propertyId ); local fakeAllClaims = {}; fakeAllClaims[propertyId] = propertyClaims; local filteredClaims = WDS.filter( fakeAllClaims, selector .. '[rank:preferred, rank:normal]' ); if filteredClaims then for _, claim in pairs( filteredClaims ) do if not boundaries then table.insert( results, claim.mainsnak ); else local startBoundaries = p.getTimeBoundariesFromQualifier( context.frame, context, claim, 'P580' ); local endBoundaries = p.getTimeBoundariesFromQualifier( context.frame, context, claim, 'P582' ); if ( (startBoundaries == nil or ( startBoundaries[2] <= boundaries[1])) and (endBoundaries == nil or ( endBoundaries[1] >= boundaries[2]))) then table.insert( results, claim.mainsnak ); end end end end if #results > 0 then break; end end return results; end --[[ TODO ]] function p.getTimeBoundariesFromQualifier( frame, context, statement, qualifierId ) -- only support exact date so far, but need improvment local left = nil; local right = nil; if ( statement.qualifiers and statement.qualifiers[qualifierId] ) then for _, qualifier in pairs( statement.qualifiers[qualifierId] ) do local boundaries = context.parseTimeBoundariesFromSnak( qualifier ); if ( not boundaries ) then return nil; end left = min( left, boundaries[1] ); right = max( right, boundaries[2] ); end end if ( not left or not right ) then return nil; end return { left, right }; end --[[ TODO ]] function p.getTimeBoundariesFromQualifiers( frame, context, statement, qualifierIds ) if not qualifierIds then qualifierIds = { 'P582', 'P580', 'P585' }; end for _, qualifierId in ipairs( qualifierIds ) do local result = p.getTimeBoundariesFromQualifier( frame, context, statement, qualifierId ); if result then return result; end end return nil; end local CONTENT_LANGUAGE_CODE = mw.language.getContentLanguage():getCode(); local getLabelWithLang_DEFAULT_PROPERTIES = { "P1813", "P1448", "P1705" }; local getLabelWithLang_DEFAULT_SELECTORS = { 'P1813[language:' .. CONTENT_LANGUAGE_CODE .. '][!P3831,P3831:Q105690470]', 'P1448[language:' .. CONTENT_LANGUAGE_CODE .. '][!P3831,P3831:Q105690470]', 'P1705[language:' .. CONTENT_LANGUAGE_CODE .. '][!P3831,P3831:Q105690470]' }; --[[ Функция для получения метки элемента в заданный момент времени. Принимает: контекст, элемент, временные границы Возвращает: текстовую метку элемента, язык метки ]] local function getLabelWithLang( context, options, entityId, boundaries, propertyIds, selectors ) if (type(entityId) ~= 'string') then error('type of entityId argument expected string, but was ' .. type(entityId)); end if not entityId then return nil; end local langCode = CONTENT_LANGUAGE_CODE; -- name from label local label = nil; if ( options.text and options.text ~= '' ) then label = options.text; else if not propertyIds then propertyIds = getLabelWithLang_DEFAULT_PROPERTIES; selectors = getLabelWithLang_DEFAULT_SELECTORS; end -- name from properties local results = getPropertyInBoundaries( context, entityId, boundaries, propertyIds, selectors ); for _, result in pairs( results ) do if result.datavalue and result.datavalue.value then if result.datavalue.type == 'monolingualtext' and result.datavalue.value.text then label = result.datavalue.value.text; langCode = result.datavalue.value.language; break; elseif result.datavalue.type == 'string' then label = result.datavalue.value; break; end end end if (not label) then label, langCode = mw.wikibase.getLabelWithLang( entityId ); if not langCode then return nil; end end end return label, langCode; end local function formatPropertyDefault( context, options ) if ( not context ) then error( 'context not specified' ); end; if ( not options ) then error( 'options not specified' ); end; if ( not options.entity ) then error( 'options.entity missing' ); end; local claims; if options.property then -- TODO: Почему тут может не быть property? if options.rank then -- передать настройки ранга из конфига claims = context.selectClaims( options, options.property .. options.rank ); else claims = context.selectClaims( options, options.property ); end end if claims == nil then return '' --TODO error? end -- Обход всех заявлений утверждения и с накоплением оформленных предпочтительных -- заявлений в таблице local formattedClaims = {} for i, claim in ipairs(claims) do local formattedStatement = context.formatStatement( options, claim ) -- здесь может вернуться либо оформленный текст заявления, либо строка ошибки, либо nil if ( formattedStatement and formattedStatement ~= '' ) then formattedStatement = context.wrapStatement( formattedStatement, options.property, claim.id ) table.insert( formattedClaims, formattedStatement ) end end -- создание текстовой строки со списком оформленых заявлений из таблицы local out = mw.text.listToText( formattedClaims, options.separator, options.conjunction ) if out ~= '' then if options.before then out = options.before .. out end if options.after then out = out .. options.after end end return out end -- create context local function initContext( options ) local context = { entity = options.entity, extractCategory = extractCategory, formatSnak = formatSnak, formatPropertyDefault = formatPropertyDefault, formatStatementDefault = formatStatementDefault, wrapSnak = wrapSnak, wrapStatement = wrapStatement, wrapQualifier = wrapQualifier, } context.cloneOptions = function( options ) local entity = options.entity; options.entity = nil; newOptions = mw.clone( options ); options.entity = entity; newOptions.entity = entity; newOptions.frame = options.frame; -- На склонированном фрейме frame:expandTemplate() return newOptions; end; context.formatProperty = function( options ) local func = getUserFunction( options, 'property', context.formatPropertyDefault ); return func( context, options ) end; context.formatStatement = function( options, statement ) return formatStatement( context, options, statement ) end; context.formatSnak = function( options, snak, circumstances ) return formatSnak( context, options, snak, circumstances ) end; context.formatRefs = function( options, statement ) return formatRefs( context, options, statement ) end; context.parseTimeFromSnak = function( snak ) if ( snak and snak.datavalue and snak.datavalue.value and snak.datavalue.value.time ) then return tonumber(os.time( splitISO8601( tostring( snak.datavalue.value.time ) ) ) ) * 1000; end return nil; end context.parseTimeBoundariesFromSnak = function( snak ) if ( snak and snak.datavalue and snak.datavalue.value and snak.datavalue.value.time and snak.datavalue.value.precision ) then return parseTimeBoundaries( snak.datavalue.value.time, snak.datavalue.value.precision ); end return nil; end context.getSourcingCircumstances = function( statement ) return getSourcingCircumstances( statement ) end; context.selectClaims = function( options, propertyId ) return selectClaims( context, options, propertyId ) end; return context end --[[ Функция для оформления утверждений (statement) Подробнее о утверждениях см. d:Wikidata:Glossary/ru Принимает: таблицу параметров Возвращает: строку оформленного текста, предназначенного для отображения в статье ]] local function formatProperty( options ) -- Получение сущности по идентификатору local entity = getEntityFromId( options.entityId ) if not entity then return -- throwError( 'entity-not-found' ) end -- проверка на присутсвие у сущности заявлений (claim) -- подробнее о заявлениях см. d:Викиданные:Глоссарий if (entity.claims == nil) then return '' --TODO error? end -- improve options options.frame = g_frame; options.entity = entity; options.extends = function( self, newOptions ) return copyTo( newOptions, copyTo( self, {} ) ) end if ( options.i18n ) then options.i18n = copyTo( options.i18n, copyTo( getConfig( 'i18n' ), {} ) ); else options.i18n = getConfig( 'i18n' ); end local context = initContext( options ); return context.formatProperty( options ); end --[[ Функция для оформления одного утверждения (statement) Принимает: объект-таблицу утверждение и таблицу параметров Возвращает: строку оформленного текста с заявлением (claim) ]] function formatStatement( context, options, statement ) if ( not statement ) then error( 'statement is not specified or nil' ); end if not statement.type or statement.type ~= 'statement' then throwError( 'unknown-claim-type' ) end local functionToCall = getUserFunction( options, 'claim', context.formatStatementDefault ); return functionToCall( context, options, statement ); end function getSourcingCircumstances( statement ) if (not statement) then error('statement is not specified') end; local circumstances = {}; if ( statement.qualifiers and statement.qualifiers.P1480 ) then for i, qualifier in pairs( statement.qualifiers.P1480 ) do if ( qualifier and qualifier.datavalue and qualifier.datavalue.type == 'wikibase-entityid' and qualifier.datavalue.value and qualifier.datavalue.value['entity-type'] == 'item' ) then table.insert(circumstances, qualifier.datavalue.value.id) end end end return circumstances; end --[[ Функция для оформления одного утверждения (statement) Принимает: объект-таблицу утверждение, таблицу параметров, объект-функцию оформления внутренних структур утверждения (snak) и объект-функцию оформления ссылки на источники (reference) Возвращает: строку оформленного текста с заявлением (claim) ]] function formatStatementDefault( context, options, statement ) if (not context) then error('context is not specified') end; if (not options) then error('options is not specified') end; if (not statement) then error('statement is not specified') end; local circumstances = context.getSourcingCircumstances( statement ); options.qualifiers = statement.qualifiers; local result = context.formatSnak( options, statement.mainsnak, circumstances ); if ( options.qualifier and statement.qualifiers and statement.qualifiers[ options.qualifier ] ) then qualConfig = getPropertyParams( options.qualifier, nil, {}) if options.i18n then qualConfig.i18n = options.i18n end local qualifierValues = {}; for _, qualifierSnak in pairs( statement.qualifiers[ options.qualifier ] ) do local snakValue = context.formatSnak( qualConfig, qualifierSnak ); if snakValue and snakValue ~= '' then table.insert( qualifierValues, snakValue ); end end if ( result and result ~= '' and #qualifierValues ) then if qualConfig.invisible then result = result .. table.concat( qualifierValues, ', ' ); else result = result .. ' (' .. table.concat( qualifierValues, ', ' ) .. ')'; end end end if ( result and result ~= '' and options.references ) then result = result .. context.formatRefs( options, statement ); end return result; end --[[ Функция для оформления части утверждения (snak) Подробнее о snak см. d:Викиданные:Глоссарий Принимает: таблицу snak объекта (main snak или же snak от квалификатора) и таблицу опций Возвращает: строку оформленного викитекста ]] function formatSnak( context, options, snak, circumstances ) circumstances = circumstances or {}; if snak.snaktype == 'somevalue' then if ( options['somevalue'] and options['somevalue'] ~= '' ) then result = options['somevalue']; else result = options.i18n['somevalue']; end elseif snak.snaktype == 'novalue' then if ( options['novalue'] and options['novalue'] ~= '' ) then result = options['novalue']; else result = options.i18n['novalue']; end elseif snak.snaktype == 'value' then result = formatDatavalue( context, options, snak.datavalue, snak.datatype ); for _, item in pairs(circumstances) do if options.i18n[item] then local circumstanceText = options.i18n[item] local placeholderPattern = "%.%.%." local placeholderPos = string.find(circumstanceText, placeholderPattern) if placeholderPos then -- eger satırda çoq noqta olsa (meselâ, "... yaqın"), esas metin çoq noqtanıñ yerine qoymalı result = string.gsub(options.i18n[item], placeholderPattern, result); else -- eger satırda çoq noqta olmasa (meselâ, "belki, "), bu satır başlanğıçta qoşılmalı result = options.i18n[item] .. result; end end end else throwError( 'unknown-snak-type' ); end if ( not result or result == '' ) then return nil; end return context.wrapSnak( result, snak.hash ) end --[[ Функция для оформления объектов-значений с географическими координатами Принимает: объект-значение и таблицу параметров, Возвращает: строку оформленного текста ]] local function formatGlobeCoordinate( value, options ) -- проверка на требование в параметрах вызова на возврат сырого значения if options['subvalue'] == 'latitude' then -- широты return value['latitude'] elseif options['subvalue'] == 'longitude' then -- долготы return value['longitude'] elseif options['nocoord'] and options['nocoord'] ~= '' then -- если передан параметр nocoord, то не выводить координаты -- обычно это делается при использовании нескольких карточек на странице return '' else -- в противном случае формируются параметры для вызова шаблона {{coord}} -- нужно дописать в документации шаблона, что он отсюда вызывается, и что -- любое изменние его парамеров должно быть согласовано с кодом тут coord_mod = require( "Module:Coordinates" ); local globe = options.globe or '' if globe == '' and value['globe'] then globes = require( 'Module:Wikidata/Globes' ) globe = globes[value['globe']] or '' end local display = 'inline' if options.display and options.display ~= '' then display = options.display elseif ( options.property:upper() == 'P625' ) then display = 'title' end local format = options.format or '' if format == '' then format = 'dms' if value['precision'] then local precision = value['precision'] * 60 if precision >= 60 then format = 'd' elseif precision >= 1 then format = 'dm' end end end g_frame.args = { tostring(value['latitude']), tostring(value['longitude']), globe = globe, type = options.type and options.type or '', scale = options.scale and options.scale or '', display = display, format = format, } return coord_mod.coord(g_frame) end end --[[ Функция для оформления объектов-значений с файлами с Викисклада Принимает: объект-значение и таблицу параметров, Возвращает: строку оформленного текста ]] local function formatCommonsMedia( value, options ) local image = value; local caption = ''; if options[ 'caption' ] and options[ 'caption' ] ~= '' then caption = options[ 'caption' ]; end if caption ~= '' then caption = wrapQualifier( caption, 'P2096', { class = 'media-caption', style = 'display:block' } ); end if not string.find( value, '[%[%]%{%}]' ) and not string.find( value, 'UNIQ%-%-imagemap' ) then -- если в value не содержится викикод или imagemap, то викифицируем имя файла -- ищем слово imagemap в строке, потому что вставляется плейсхолдер: [[PHAB:T28213]] image = '[[File:' .. value .. '|frameless'; if options[ 'border' ] and options[ 'border' ] ~= '' then image = image .. '|border'; end local size = options[ 'size' ]; if size and size ~= '' then -- TODO: check localized pixel names too if not string.match( size, 'px$' ) then size = size .. 'px' end else size = fileDefaultSize; end image = image .. '|' .. size; if options[ 'alt' ] and options[ 'alt' ] ~= '' then image = image .. '|alt=' .. options[ 'alt' ]; end if caption ~= '' then image = image .. '|' .. caption end image = image .. ']]'; if caption ~= '' then image = image .. '<br>' .. caption; end else image = image .. caption .. getCategoryByCode( 'media-contains-markup' ); end return image end --[[ Fonction for render math formulas @param string Value. @param table Parameters. @return string Formatted string. ]] local function formatMath( value, options ) return options.frame:extensionTag{ name = 'math', content = value }; end --[[ Функция для оформления внешних идентификаторов Принимает: объект-значение и таблицу параметров, Возвращает: строку оформленного текста ]] local function formatExternalId( value, options ) local formatter = options.formatter; if not formatter or formatter == '' then local wbStatus, propertyEntity = pcall( mw.wikibase.getEntity, options.property:upper() ) if wbStatus == true and propertyEntity then local isGoodFormat = false; local statements = propertyEntity:getBestStatements( 'P1793' ); for _, statement in pairs( statements ) do if statement.mainsnak.snaktype == 'value' then local pattern = mw.ustring.gsub( statement.mainsnak.datavalue.value, '\\', '%' ); pattern = mw.ustring.gsub( pattern, '{%d+,?%d*}', '+' ); if ( string.find( pattern, '|' ) or string.find( pattern, '%)%?' ) or mw.ustring.match( value, '^' .. pattern .. '$' ) ~= nil ) then isGoodFormat = true; break; end end end if ( isGoodFormat == true ) then statements = propertyEntity:getBestStatements( 'P1630' ); for _, statement in pairs( statements ) do if statement.mainsnak.snaktype == 'value' then formatter = statement.mainsnak.datavalue.value; break end end end end end if formatter and formatter ~= '' then local encodedValue = mw.ustring.gsub( value, '%%', '%%%%' ) -- ломается, если подставить внутрь другого mw.ustring.gsub local link = mw.ustring.gsub( mw.ustring.gsub( formatter, '$1', encodedValue ), '.', { [' '] = '%20', ['+'] = '%2b', ['['] = '%5B', [']'] = '%5D' } ) local title = options.title if not title or title == '' then title = '$1' end title = mw.ustring.gsub( mw.ustring.gsub( title, '$1', encodedValue ), '.', { ['['] = '(', [']'] = ')' } ) return '[' .. link .. ' ' .. title .. ']' end return value end --[[ Функция для оформления числовых значений Принимает: объект-значение и таблицу параметров, Возвращает: строку оформленного текста ]] local function formatQuantity( value, options ) -- диапазон значений local amount = string.gsub( value['amount'], '^%+', '' ); local lang = mw.language.getContentLanguage(); local numberLang = mw.language.new( 'uk' ); local langCode = lang:getCode(); local function formatNum( number, sigfig ) local multiplier = '' if options.countByThousands then local powers = options.i18n['thousandPowers'] local pos = 1 while math.abs(number) >= 1000 and pos < #powers do number = number / 1000 pos = pos + 1 end multiplier = powers[pos] if math.abs(number) >= 100 then sigfig = sigfig or 0 elseif math.abs(number) >= 10 then sigfig = sigfig or 1 else sigfig = sigfig or 2 end else sigfig = sigfig or 12 -- округление до 12 знаков после запятой, на 13-м возникает ошибка в точности end local mult = 10^sigfig; number = math.floor( number * mult + 0.5 ) / mult; return string.gsub( numberLang:formatNum( number ), '^-', '−' ) .. multiplier; end local out = formatNum( tonumber( amount ) ); if value.upperBound then local diff = tonumber( value.upperBound ) - tonumber( amount ) if diff > 0 then -- временная провека, пока у большинства значений не будет убрано ±0 -- Пробуем понять до какого знака округлять local integer, dot, decimals, expstr = value.upperBound:match( '^+?-?(%d*)(%.?)(%d*)(.*)' ) local prec if dot == '' then prec = -integer:match('0*$'):len() else prec = #decimals end bound = formatNum( diff, prec ) if string.match( bound, 'E%-(%d+)' ) then -- если в экспоненциальном формате digits = tonumber( string.match( bound, 'E%-(%d+)' ) ) - 2 bound = formatNum( diff * 10 ^ digits, prec ) bound = string.sub( bound, 0, 2 ) .. string.rep( '0', digits ) .. string.sub( bound, -string.len( bound ) + 2 ) end out = out .. ' ± ' .. bound end end if options.unit and options.unit ~= '' then if options.unit ~= '-' then out = out .. ' ' .. options.unit end elseif value.unit and string.match( value.unit, 'http://www.wikidata.org/entity/' ) then local unitEntityId = string.gsub( value.unit, 'http://www.wikidata.org/entity/', '' ); if unitEntityId ~= 'undefined' then local wbStatus, unitEntity = pcall( mw.wikibase.getEntity, unitEntityId ); if wbStatus == true and unitEntity then if unitEntity.claims.P2370 and unitEntity.claims.P2370[1].mainsnak.snaktype == 'value' and not value.upperBound and options.siConversion == true then conversionToSIunit = string.gsub( unitEntity.claims.P2370[1].mainsnak.datavalue.value.amount, '^%+', '' ); if math.floor( math.log10( conversionToSIunit )) ~= math.log10( conversionToSIunit ) then -- Если не степени десятки (переводить сантиметры в метры не надо!) outValue = tonumber( amount ) * conversionToSIunit if ( outValue > 0 ) then -- Пробуем понять до какого знака округлять local integer, dot, decimals, expstr = amount:match( '^(%d*)(%.?)(%d*)(.*)' ) local prec if dot == '' then prec = -integer:match('0*$'):len() else prec = #decimals end local adjust = math.log10( math.abs( conversionToSIunit )) + math.log10( 2 ) local minprec = 1 - math.floor( math.log10( outValue ) + 2e-14 ); out = formatNum( outValue, math.max( math.floor( prec + adjust ), minprec )); else out = formatNum( outValue, 0 ) end unitEntityId = string.gsub( unitEntity.claims.P2370[1].mainsnak.datavalue.value.unit, 'http://www.wikidata.org/entity/', '' ); wbStatus, unitEntity = pcall( mw.wikibase.getEntity, unitEntityId ); end end local writingSystemElementId = 'Q8209'; local langElementId = 'Q7737'; local label = getLabelWithLang( context, options, unitEntity.id, nil, { "P5061", "P558", "P558" }, { 'P5061[language:' .. langCode .. ']', 'P558[P282:' .. writingSystemElementId .. ', P407:' .. langElementId .. ']', 'P558[!P282][!P407]' } ); out = out .. ' ' .. label; end end end return out; end -- Функция для оформления URL local function formatUrlValue( context, options, value ) if not options.length or options.length == '' then options.length = 25 end local moduleUrl = require( 'Module:URL' ) return moduleUrl.formatUrlSingle( context, options, value ) end local DATATYPE_CACHE = {} --[[ Get property datatype by ID. @param string Property ID, e.g. 'P123'. @return string Property datatype, e.g. 'commonsMedia', 'time' or 'url'. ]] local function getPropertyDatatype( propertyId ) if not propertyId or not string.match( propertyId, '^P%d+$' ) then return nil; end local cached = DATATYPE_CACHE[propertyId]; if (cached ~= nil) then return cached; end local wbStatus, propertyEntity = pcall( mw.wikibase.getEntity, propertyId ); if wbStatus ~= true or not propertyEntity then return nil; end mw.log("Loaded datatype " .. propertyEntity.datatype .. " of " .. propertyId .. ' from wikidata, consider passing datatype argument to formatProperty call or to Wikidata/config' ) DATATYPE_CACHE[propertyId] = propertyEntity.datatype; return propertyEntity.datatype; end local function getDefaultValueFunction( datavalue, datatype ) -- вызов обработчиков по умолчанию для известных типов значений if datavalue.type == 'wikibase-entityid' then -- Entity ID return function( context, options, value ) return formatEntityId( context, options, getEntityIdFromValue( value ) ) end; elseif datavalue.type == 'string' then -- String if datatype and datatype == 'commonsMedia' then -- Media return function( context, options, value ) return formatCommonsMedia( value, options ) end; elseif datatype and datatype == 'external-id' then -- External ID return function( context, options, value ) return formatExternalId( value, options ) end elseif datatype and datatype == 'math' then -- Math formula return function( context, options, value ) return formatMath( value, options ) end elseif datatype and datatype == 'url' then -- URL return formatUrlValue end return function( context, options, value ) return value end; elseif datavalue.type == 'monolingualtext' then -- моноязычный текст (строка с указанием языка) return function( context, options, value ) if ( options.monolingualLangTemplate == 'lang' ) then if ( value.language == contentLanguageCode ) then return value.text; end local langTemplate, templateEditLink = findLanguageTemplate("lang-", value.language) if langTemplate then return options.frame:expandTemplate{ title = langTemplate, args = { value.text } } .. templateEditLink; else return '<span class="lang" lang="' .. value.language .. '">-{' .. value.text .. '}-</span>' .. templateEditLink .. '[[Kategoriya:' .. commonCategoryNames.unknownLanguageReference .. ']]' end elseif ( options.monolingualLangTemplate == 'ref' ) then local languageIndication = "" local refTemplate, templateEditLink = findLanguageTemplate("ref-", value.language) if refTemplate then languageIndication = options.frame:expandTemplate{ title = refTemplate } .. templateEditLink else languageIndication = templateEditLink .. '[[Kategoriya:' .. commonCategoryNames.unknownLanguageReference .. ']]' end return '<span class="lang" lang="' .. value.language .. '">-{' .. value.text .. '}-</span>' .. languageIndication; else local wrappedValue = value.text; if contentLanguageCode ~= value.language then wrappedValue = "-{" .. value.text .. "}-"; end return '<span class="lang" lang="' .. value.language .. '">' .. wrappedValue .. '</span>'; end end; elseif datavalue.type == 'globecoordinate' then -- географические координаты return function( context, options, value ) return formatGlobeCoordinate( value, options ) end; elseif datavalue.type == 'quantity' then return function( context, options, value ) return formatQuantity( value, options ) end; elseif datavalue.type == 'time' then return function( context, options, value ) local moduleDate = require( 'Module:Wikidata/date' ) return moduleDate.formatDate( context, options, value ); end; else -- во всех стальных случаях возвращаем ошибку throwError( 'unknown-datavalue-type' ) end end --[[ Функция для оформления значений (value) Подробнее о значениях см. d:Wikidata:Glossary/ru Принимает: объект-значение и таблицу параметров, Возвращает: строку оформленного текста ]] function formatDatavalue( context, options, datavalue, datatype ) if ( not context ) then error( 'context not specified' ); end; if ( not options ) then error( 'options not specified' ); end; if ( not datavalue ) then error( 'datavalue not specified' ); end; if ( not datavalue.value ) then error( 'datavalue.value is missng' ); end; -- проверка на указание специализированных обработчиков в параметрах, -- переданных при вызове context.formatValueDefault = getDefaultValueFunction( datavalue, datatype ); local functionToCall = getUserFunction( options, 'value', context.formatValueDefault ); return functionToCall( context, options, datavalue.value ); end local DEFAULT_BOUNDARIES = { os.time() * 1000, os.time() * 1000}; --[[ Функция для оформления идентификатора сущности Принимает: строку индентификатора (типа Q42) и таблицу параметров, Возвращает: строку оформленного текста ]] function formatEntityId( context, options, entityId ) -- получение локализованного названия local boundaries = nil if options.qualifiers then boundaries = p.getTimeBoundariesFromQualifiers( frame, context, { qualifiers = options.qualifiers } ) end if not boundaries then boundaries = DEFAULT_BOUNDARIES; end local label, labelLanguageCode = getLabelWithLang( context, options, entityId, boundaries ) local altScriptLabel = mw.wikibase.getLabelByLang( entityId, altScript.ALT_LANG ) -- определение соответствующей показываемому элементу категории local category = context.extractCategory( options, { id = entityId } ) -- получение ссылки по идентификатору local link = mw.wikibase.sitelink( entityId ) if link then -- ссылка на категорию, а не добавление страницы в неё if mw.ustring.match( link, '^' .. mw.site.namespaces[ 14 ].name .. ':' ) then link = ':' .. link end if label and not options.rawArticle then local needsPipeSyntax = (link == label) and (altScriptLabel ~= nil) local a = needsPipeSyntax and ('[[' .. link .. ']]') or '[[' .. link .. '|' .. altScript.format(label, altScriptLabel, labelLanguageCode) .. ']]'; if ( contentLanguageCode ~= labelLanguageCode and 'mul' ~= labelLanguageCode ) then a = a .. getCategoryByCode( 'links-to-entities-with-missing-local-language-label' ); end return a .. category; else return '[[' .. link .. ']]' .. category; end end if label then -- TODO: возможно, лучше просто mw.wikibase.label(entityId) -- красная ссылка -- TODO: разобраться, почему не всегда есть options.frame local title = mw.title.new( label ); if title and not title.exists and options.frame then local moduleRedLink = require( 'Module:Wikidata/redLink' ) local rawLabel = mw.wikibase.label(entityId) or label -- без |text= и boundaries; or label - костыль local redLink = moduleRedLink.formatRedLinkWithInfobox(rawLabel, label, entityId, nil, altScriptLabel, labelLanguageCode) if ( contentLanguageCode ~= labelLanguageCode and 'mul' ~= labelLanguageCode ) then redLink = redLink .. getCategoryByCode( 'links-to-entities-with-missing-local-language-label' ); end return redLink .. '<sup>[[:d:' .. entityId .. '|[d]]]</sup>' .. category end -- TODO: перенести до проверки на существование статьи local sup = ''; if ( not options.format or options.format ~= 'text' ) and entityId ~= 'Q6581072' and entityId ~= 'Q6581097' -- TODO: переписать на format=text then sup = '<sup class="plainlinks noprint">[//www.wikidata.org/wiki/' .. entityId .. '?uselang=' .. contentLanguageCode .. ' [d&#x5d;]</sup>' end -- одноимённая статья уже существует - выводится текст и ссылка на ВД return '<span class="iw" data-title="' .. label .. '">' .. label .. sup .. '</span>' .. category end -- сообщение об отсутвии локализованного названия -- not good, but better than nothing return '[[:d:' .. entityId .. '|' .. entityId .. ']]<span style="border-bottom: 1px dotted; cursor: help; white-space: nowrap" title="В Викиданных нет русской подписи к элементу. Вы можете помочь, указав русский вариант подписи.">?</span>' .. getCategoryByCode( 'links-to-entities-with-missing-label' ) .. category; end --[[ Entity-niñ adnı köstere Argumentler: - frame: parametrlar cedveli ya da nil - entityId: satır - options: cedvel ya da nil Qayta: maqalede kösterilmek içün formatlaştırğan metin ]] function p.formatEntityIdFromFrame( frame, entityId, options ) local args = frame.args or {}; -- TODO bu aqiqaten yahşı? local context = initContext( args ); return formatEntityId( context, options or {}, entityId ); end --[[ Функция для оформления утверждений (statement) Подробнее о утверждениях см. d:Wikidata:Glossary/ru Принимает: таблицу параметров Возвращает: строку оформленного текста, предназначенного для отображения в статье ]] -- устаревшее имя, не использовать function p.formatStatements( frame ) return p.formatProperty( frame ); end --[[ Получение параметров, которые обычно используются для вывода свойства. ]] function getPropertyParams( propertyId, datatype, params ) local config = getConfig(); -- Различные уровни настройки параметров, по убыванию приоритета local propertyParams = {}; -- 1. Параметры, указанные явно при вызове if params then for key, value in pairs( params ) do if value ~= '' then propertyParams[ key ] = value; end end end -- 2. Настройки конкретного параметра if config[ 'properties' ] and config[ 'properties' ][ propertyId ] then for key, value in pairs( config[ 'properties' ][ propertyId ] ) do if propertyParams[ key ] == nil then propertyParams[ key ] = value; end end end -- 3. Указанный пресет настроек if propertyParams[ 'preset' ] and config[ 'presets' ] and config[ 'presets' ][ propertyParams[ 'preset' ] ] then for key, value in pairs( config[ 'presets' ][ propertyParams[ 'preset' ] ] ) do if propertyParams[ key ] == nil then propertyParams[ key ] = value; end end end local datatype = datatype or params.datatype or propertyParams.datatype or getPropertyDatatype( propertyId ); if propertyParams.datatype == nil then propertyParams.datatype = datatype; end -- 4. Настройки для типа данных if datatype and config[ 'datatypes' ] and config[ 'datatypes' ][ datatype ] then for key, value in pairs( config[ 'datatypes' ][ datatype ] ) do if propertyParams[ key ] == nil then propertyParams[ key ] = value; end end end -- 5. Общие настройки для всех свойств if config[ 'global' ] then for key, value in pairs( config[ 'global' ] ) do if propertyParams[ key ] == nil then propertyParams[ key ] = value; end end end return propertyParams; end function p.formatProperty( frame ) local args = frame.args -- проверка на отсутствие обязательного параметра property if not args.property then throwError( 'property-param-not-provided' ) end local override; local propertyId = mw.language.getContentLanguage():ucfirst( string.gsub( args.property, '([^Pp0-9].*)$', function(w) if string.sub( w, 1, 1 ) == '~' then override = w; end return ''; end ) ) args = getPropertyParams( propertyId, nil, args ); if (override) then args[override:match('[,~]([^=]*)=')] = override:match('=(.*)') args['property'] = propertyId end local datatype = args.datatype; -- проброс всех параметров из шаблона {wikidata} и параметра from откуда угодно p_frame = frame while p_frame do if p_frame:getTitle() == mw.site.namespaces[10].name .. ':Wikidata' then copyTo( p_frame.args, args, true ); end if p_frame.args and p_frame.args.from and p_frame.args.from ~= '' then args.entityId = p_frame.args.from; end p_frame = p_frame:getParent(); end args.plain = toBoolean( args.plain, false ); args.nocat = toBoolean( args.nocat, false ); args.references = toBoolean( args.references, true ); -- если значение передано в параметрах вызова то выводим только его if args.value and args.value ~= '' then -- специальное значение для скрытия Викиданных if args.value == '-' then return '' end local value = args.value -- опция, запрещающая оформление значения, поэтому никак не трогаем if args.plain then return value end local context = initContext( args ); -- обработчики по типу значения local wrapperExtraArgs = {} if args['value-module'] and args['value-function'] and not string.find( value, '[%[%]%{%}]' ) then local func = getUserFunction( args, 'value' ); value = func( context, args, value ); elseif datatype == 'commonsMedia' then value = formatCommonsMedia( value, args ); elseif datatype == 'external-id' and not string.find( value, '[%[%]%{%}]' ) then wrapperExtraArgs['data-wikidata-external-id'] = mw.text.killMarkers( value ); value = formatExternalId( value, args ); --elseif datatype == 'math' then -- args.frame = frame -- костыль: в formatMath нужно frame:extensionTag -- value = formatMath( value, args ); elseif datatype == 'url' then value = formatUrlValue( context, args, value ); end -- оборачиваем в тег для JS-функций if string.match( propertyId, '^P%d+$' ) then value = mw.text.trim( value ) -- временная штрафная категория для исправления табличных вставок local allowTables = getPropertyParams(propertyId, nil, {})['allowTables'] if ( not allowTables and string.match( value, '<t[dhr][ >]' ) -- and not string.match( value, '<table[ >]' ) -- and not string.match( value, '^%{%|' ) ) then value = value .. getCategoryByCode( 'value-contains-table', propertyId ) else value = wrapStatement( value, propertyId, nil, wrapperExtraArgs ); end end return value end if ( args.plain ) then -- вызова стандартного обработчика без оформления, если передана опция plain local callArgs = { propertyId }; if args.entityId then callArgs.from = args.entityId; end return frame:callParserFunction( '#property', callArgs ); end g_frame = frame -- после проверки всех аргументов -- вызов функции оформления для свойства (набора утверждений) return formatProperty( args ) end --[[ Функция проверки на присутствие источника в списке нерекомендованных. Принимает: таблицу snak'ов Возвращает: true/false ]] function isReferenceDeprecated( snaks ) if not snaks then return false end if snaks.P248 and snaks.P248[1] and snaks.P248[1].datavalue and snaks.P248[1].datavalue.value.id then local entityId = snaks.P248[1].datavalue.value.id if getConfig( 'deprecatedSources', entityId ) then return true end elseif snaks.P1433 and snaks.P1433[1] and snaks.P1433[1].datavalue and snaks.P1433[1].datavalue.value.id then local entityId = snaks.P1433[1].datavalue.value.id if getConfig( 'deprecatedSources', entityId ) then return true end end return false end --[[ Функция оформления ссылок на источники (reference) Подробнее о ссылках на источники см. d:Wikidata:Glossary/ru Экспортируется в качестве зарезервированной точки для вызова из функций-расширения вида claim-module/claim-function через context Вызов из других модулей напрямую осуществляться не должен (используйте frame:expandTemplate вместе с одним из специлизированных шаблонов вывода значения свойства). Принимает: объект-таблицу утверждение Возвращает: строку оформленных ссылок для отображения в статье ]] function formatRefs( context, options, statement ) if ( not context ) then error( 'context not specified' ); end; if ( not options ) then error( 'options not specified' ); end; if ( not options.entity ) then error( 'options.entity missing' ); end; if ( not statement ) then error( 'statement not specified' ); end; if ( not outputReferences ) then return ''; end local references = {}; if ( statement.references ) then local allReferences = statement.references; local hasNotDeprecated = false; local displayCount = 0; for _, reference in pairs( statement.references ) do local entityId = nil; if not isReferenceDeprecated( reference.snaks ) then hasNotDeprecated = true; end end for _, reference in pairs( statement.references ) do local display = true; if ( hasNotDeprecated ) then if isReferenceDeprecated( reference.snaks ) then display = false; end end if ( displayCount > 2 ) then if ( options.entity and options.property ) then local propertyID = mw.ustring.match( options.property, '^[Pp][0-9]+' ) -- TODO: обрабатывать не тут, а раньше local moreReferences = '<sup>[[d:' .. options.entity.id .. '#' .. string.upper( propertyID ) .. '|[…]]]</sup>'; table.insert( references, moreReferences ); end break; end if ( display == true ) then local refText = moduleSources.renderReference( g_frame, options.entity, reference ); if ( refText ~= '' ) then table.insert( references, refText ); displayCount = displayCount + 1; end end end end return table.concat( references ); end return p alstti43g7gi11fx3erk4zab06e077w Qullanıcı:Хтосьці 2 22901 244197 244171 2026-06-09T09:19:33Z Хтосьці 13041 /* Tüzetmeli */ 244197 wikitext text/x-wiki {{babel|crh-1|be|uk}} Selâm! Men yarı belorusım, yarı ukrainim. Şimdi Portugaliyada yaşayım. Bu Vikipediyada meni birinci sırada -{Lua}- kodu -{crh-latn: modulleri; crh-cyrl: модульлери}- ve kiril elifbesine çevirilüv içün kodu meraqlandıra. '''Eger siziñ kodu meseleleriñiz olsa, maña yazıñız, men kodu tüzetmekni begenem''' (atta eger men Vikipediyada iç bir şey yapmay bile, maña yazıñız). Men künniñ resmi içün yazıları da tercime etip baqam (lâkin men yahşı degilim). == Suallerim == Suallerim (cevap olmasa, menim añlamama köre deñiştirim): * [[Modul muzakeresi:Wikidata-ro|Modul muzakeresi:-{Wikidata-ro}-]]: Bu modul aqiqaten kirekmi? (2025-03-25) * [[Şablon muzakeresi:Doc|Şablon muzakeresi:-{Doc}-]]: “-{/doc}-” ya da “-{/belge}-”? (2025-03-26) * [[Modul muzakeresi:Citation/CS1]]: Men bu modulniñ yañı versiyanı ingliz Vikipediyada kopiyalamaq teklif etem (2025-04-23) * [[Modul muzakeresi:Databox]] == Tüzetmeli == * Memleketler (meselâ [[Belarus]]): ** tek bir UİM körsetmeli (meselâ [[Ukrainada]], [[AQŞ]]da), ** UİM (SAQP) tüzetmeli, ** UİM (nominal) / Can başına tüzetmeli * -{[[Modul:Wikidata|Wikidata]]}- modulinde: ** 72.793.457.588 $ → 72 793 457 588 $ ([[Şablon muzakeresi:Memleket]] baqıñız) ** <code>bölüci</code> işlemey (meselâ [[Şablon:Memleket]]te) ** <code>virgülden soñ raqam sayısı</code> işlemey (meselâ [[Şablon:Memleket]]te) * [[Çolpan]]: -{[[wikidata:Property:P973|described at URL]]}- ливесджиэндже.джом/с… * [[Hurma]]: «2.277 джубидж метре пер тон» konvertatsiya etilmeli, atıfalar * [https://crh.wikipedia.org/w/index.php?search=Lua+hatası&title=Mahsus%3AAra&profile=advanced&fulltext=1&ns0=1 Bütün -{Lua}- hataları] * [https://crh.wikipedia.org/w/index.php?search=%C4%B0fade+hatas%C4%B1&title=Mahsus%3AAra&profile=advanced&fulltext=1&ns0=1 Bütün ifade hataları] * [[Şablon:Ref-info]] [[Şablon:ref-lang]] — farq barmı? * [[Con Kits]]: «Лондон, Буюк Британия я да Лондон, Буюк Британия къыраллыгъы» ⇒ «Лондон, Буюк Британия» * -{[[Roblox Corporation]]}-: -{«Devid Bazuki<sup>[d][3]</sup>, Altos Ventures<sup>[d][3]</sup> ve Devid Bazuki<sup>[d]</sup>»}- * [[PlayStation]] ve [[Şablon:Kaynakça]], [[Şablon:Bilgi kutusu]], [[Şablon:Marka bilgi kutusu]] (ğaliba yoq etmeli?) * [[Horasan Türkiy tili]]: «Bu tilde Vikipediya bar» * Tercime etilmegen kategoriya adları ([[:Kategoriya:Gizli kategoriyalar]]): ** [[:Kategoriya:Википедия:Статьи со ссылками на элементы Викиданных без русской подписи]] ** [[:Kategoriya:Статьи с универсальной карточкой]] ** [[:Kategoriya:Статьи с универсальной карточкой, которая предположительно неуместна]] ** [[:Kategoriya:Статьи с универсальной карточкой, отображающей мало свойств]] ** -{[[:Kategoriya:Articole cu surse în limba Endonezce (id)]]}- ** -{[[:Kategoriya:Erori CS1: date]]}- * [[:Kategoriya:İçinde bozuq fayl bağlantıları olğan saifeler]] * [[:Kategoriya:Vikipediya:Pek büyük eali sıqlığı olğan memleketler]] i64t3ejkp3nuwkie6tvnizhq90xofii 244208 244197 2026-06-09T09:57:52Z Хтосьці 13041 244208 wikitext text/x-wiki {{babel|crh-1|be|uk}} Selâm! Men yarı belorusım, yarı ukrainim. Şimdi Portugaliyada yaşayım. Bu Vikipediyada meni birinci sırada -{Lua}- kodu -{crh-latn: modulleri; crh-cyrl: модульлери}- ve kiril elifbesine çevirilüv içün kodu meraqlandıra. '''Eger siziñ kodu meseleleriñiz olsa, maña yazıñız, men kodu tüzetmekni begenem''' (atta eger men Vikipediyada iç bir şey yapmay bile, maña yazıñız). Men künniñ resmi içün yazıları da tercime etip baqam (lâkin men yahşı degilim). == Suallerim == Suallerim (cevap olmasa, menim añlamama köre deñiştirim): * [[Şablon muzakeresi:Doc|Şablon muzakeresi:-{Doc}-]]: “-{/doc}-” ya da “-{/belge}-”? (2025-03-26) * [[Modul muzakeresi:Citation/CS1]]: Men bu modulniñ yañı versiyanı ingliz Vikipediyada kopiyalamaq teklif etem (2025-04-23) * [[Modul muzakeresi:Databox]] == Tüzetmeli == * Memleketler (meselâ [[Belarus]]): ** tek bir UİM körsetmeli (meselâ [[Ukrainada]], [[AQŞ]]da), ** UİM (SAQP) tüzetmeli, ** UİM (nominal) / Can başına tüzetmeli * -{[[Modul:Wikidata|Wikidata]]}- modulinde: ** 72.793.457.588 $ → 72 793 457 588 $ ([[Şablon muzakeresi:Memleket]] baqıñız) ** <code>bölüci</code> işlemey (meselâ [[Şablon:Memleket]]te) ** <code>virgülden soñ raqam sayısı</code> işlemey (meselâ [[Şablon:Memleket]]te) * [[Çolpan]]: -{[[wikidata:Property:P973|described at URL]]}- ливесджиэндже.джом/с… * [[Hurma]]: «2.277 джубидж метре пер тон» konvertatsiya etilmeli, atıfalar * [https://crh.wikipedia.org/w/index.php?search=Lua+hatası&title=Mahsus%3AAra&profile=advanced&fulltext=1&ns0=1 Bütün -{Lua}- hataları] * [https://crh.wikipedia.org/w/index.php?search=%C4%B0fade+hatas%C4%B1&title=Mahsus%3AAra&profile=advanced&fulltext=1&ns0=1 Bütün ifade hataları] * [[Şablon:Ref-info]] [[Şablon:ref-lang]] — farq barmı? * [[Con Kits]]: «Лондон, Буюк Британия я да Лондон, Буюк Британия къыраллыгъы» ⇒ «Лондон, Буюк Британия» * -{[[Roblox Corporation]]}-: -{«Devid Bazuki<sup>[d][3]</sup>, Altos Ventures<sup>[d][3]</sup> ve Devid Bazuki<sup>[d]</sup>»}- * [[PlayStation]] ve [[Şablon:Kaynakça]], [[Şablon:Bilgi kutusu]], [[Şablon:Marka bilgi kutusu]] (ğaliba yoq etmeli?) * [[Horasan Türkiy tili]]: «Bu tilde Vikipediya bar» * Tercime etilmegen kategoriya adları ([[:Kategoriya:Gizli kategoriyalar]]): ** [[:Kategoriya:Википедия:Статьи со ссылками на элементы Викиданных без русской подписи]] ** [[:Kategoriya:Статьи с универсальной карточкой]] ** [[:Kategoriya:Статьи с универсальной карточкой, которая предположительно неуместна]] ** [[:Kategoriya:Статьи с универсальной карточкой, отображающей мало свойств]] ** -{[[:Kategoriya:Articole cu surse în limba Endonezce (id)]]}- ** -{[[:Kategoriya:Erori CS1: date]]}- * [[:Kategoriya:İçinde bozuq fayl bağlantıları olğan saifeler]] * [[:Kategoriya:Vikipediya:Pek büyük eali sıqlığı olğan memleketler]] 4shi7dcd62qmktw29cj8ttup9v93ww3 Şablon:Avtomatik Şablon Til 10 44641 244189 244159 2026-06-09T08:25:34Z Хтосьці 13041 daa [[Modul:Wikidata-ro]] yearinde [[Modul:Wikidata]] qullanam (çünki Wikidata-ro kiril elifbesinen yahşı işlemey; [[Vikipediya:Meydan#-{Module:Wikidata-ro}- yerinde -{Module:Wikidata}- qullanmaq isteyim]] baqıñız) 244189 wikitext text/x-wiki <includeonly>{{Infocasetă |antet=limba |culoare cadru={{Infocaseta Limbă/culoare familie|{{{culoare_familie|basic}}}}} |datastyle=text-align: left; |title={{br separated entries|{{#if:{{{nume|}}} | {{{nume|}}} | {{PAGENAME}} }} | {{#if: {{{numenativ|{{{nume_nativ|}}}}}} | ''{{{numenativ|{{{nume_nativ| }}} }}}'' | {{#if:{{#property:P1705}} }} }} }} |image={{#if: {{{imagine|}}}| {{#invoke:InfoboxImage|InfoboxImage|image={{{imagine|}}}|imagesize={{{mărime_imagine|}}}|alt={{{descriere_imagine|}}}|sizedefault=frameless}} }} |caption={{{descriere_imagine|}}} |label10=Pronunție |data10={{#if:{{{pronunție_nume_nativ|}}}|{{AFI|{{{pronunție_nume_nativ|}}}}}}} |label12=Yaratıcı |data12={{wikidata|P61|{{{Yaratıcı|}}}}} |label14={{#if:{{{creator|{{#property:P61}} }}} | Yaratılğan tarihi | Peyda oluv tarihi }} |data14={{wikidata|P571|{{{peyda oluv tarihi|{{{yaratılğan tarihi|}}}}}}}} |label16=Scopul creării |data16={{{scop|}}} |label18=Vorbită în |data18={{{țări|<!---->{{{vorbită_în|{{{vorbit_în|}}} }}} }}} |label20=Regiuni |data20={{{regiune|<!---->{{{regiuni|}}}}}} |label22= Laf etkenlerniñ sayısı |data22={{wikidata|P1098|{{{laf etkenlerniñ sayısı|}}}}} |label24=Limbă-mamă |data24={{{limbă-mamă|}}} |label26=Perioadă de existență |data26={{{perioadă|}}} |label28=Dispariție |data28={{{dispariție|}}} |label30=Sistem de scriere |data30={{{sistem de scriere|}}} |label32=Tipologie lingvistică |data32={{{tipologie|}}} |header40=Sınıflaştırma |data41= {{#if: <!--învechit-->{{{fam1|<!---->{{{familie_1|}}}}}} | <!--învechit-->{{{fam1|<!---->{{{familie_1|}}}}}} <ul style="line-height:100%; margin-left:15px;"><li> {{#if:<!--învechit-->{{{fam2|<!---->{{{familie_2|}}}}}} | <!--învechit-->{{{fam2|<!---->{{{familie_2|}}}}}}<ul style="line-height:100%; margin-left:5px;"><li>{{#if:<!--învechit-->{{{fam3|<!---->{{{familie_3|}}}}}} | <!--învechit-->{{{fam3|<!---->{{{familie_3|}}}}}}<ul style="line-height:100%; margin-left:5px;"><li>{{#if:<!--învechit-->{{{fam4|<!---->{{{familie_4|}}}}}} | <!--învechit-->{{{fam4|<!---->{{{familie_4|}}}}}}<ul style="line-height:100%; margin-left:5px;"><li>{{#if:<!--învechit-->{{{fam5|<!---->{{{familie_5|}}}}}} | <!--învechit-->{{{fam5|<!---->{{{familie_5|}}}}}}<ul style="line-height:100%; margin-left:5px;"><li>{{#if:<!--învechit-->{{{fam6|<!---->{{{familie_6|}}}}}} | <!--învechit-->{{{fam6|<!---->{{{familie_6|}}}}}}<ul style="line-height:100%; margin-left:5px;"><li>{{#if:<!--învechit-->{{{fam7|<!---->{{{familie_7|}}}}}} | <!--învechit-->{{{fam7|<!---->{{{familie_7|}}}}}}<ul style="line-height:100%; margin-left:5px;"><li>{{#if:<!--învechit-->{{{fam8|<!---->{{{familie_8|}}}}}} | <!--învechit-->{{{fam8|<!---->{{{familie_8|}}}}}}<ul style="line-height:100%; margin-left:5px;"><li>{{#if:<!--învechit-->{{{fam9|<!---->{{{familie_9|}}}}}} | <!--învechit-->{{{fam9|<!---->{{{familie_9|}}}}}}<ul style="line-height:100%; margin-left:5px;"><li>{{#if:<!--învechit-->{{{fam10|<!---->{{{familie_10|}}}}}} | <!--învechit-->{{{fam10|<!---->{{{familie_10|}}}}}}<ul style="line-height:100%; margin-left:5px;"><li>{{#if:<!--învechit-->{{{fam11|<!---->{{{familie_11|}}}}}} | <!--învechit-->{{{fam11|<!---->{{{familie_11|}}}}}}<ul style="line-height:100%; margin-left:5px;"><li>{{#if:<!--învechit-->{{{fam12|<!---->{{{familie_12|}}}}}} | <!--învechit-->{{{fam12|<!---->{{{familie_12|}}}}}}<ul style="line-height:100%; margin-left:5px;"><li>{{#if:<!--învechit-->{{{fam13|<!---->{{{familie_13|}}}}}} | <!--învechit-->{{{fam13|<!---->{{{familie_13|}}}}}}<ul style="line-height:100%; margin-left:5px;"><li>{{#if:<!--învechit-->{{{fam14|<!---->{{{familie_14|}}}}}} | <!--învechit-->{{{fam14|<!---->{{{familie_14|}}}}}}<ul style="line-height:100%; margin-left:5px;"><li>{{#if:<!--învechit-->{{{fam15|<!---->{{{familie_15|}}}}}} | <!--învechit-->{{{fam15|<!---->{{{familie_15|}}}}}}<ul style="line-height:100%; margin-left:5px;"><li>{{{nume}}}</li></ul> | {{{nume}}} }}</li></ul>| {{{nume}}} }}</li></ul>| {{{nume}}} }}</li></ul>| {{{nume}}} }}</li></ul>| {{{nume}}} }}</li></ul>| {{{nume}}} }}</li></ul>| {{{nume}}} }}</li></ul>| {{{nume}}} }}</li></ul>| {{{nume}}} }}</li></ul>| {{{nume}}} }}</li></ul>| {{{nume}}} }}</li></ul>| {{{nume}}} }}</li></ul>| {{{nume}}} }}</li></ul>| {{{nume}}} }}</li></ul> | {{Ierarhie de clase de la Wikidata |limitqid=Q20162172 |styling=listă-ierarhică }} }} |header50=Resmiy status ve kodlar |label52= Resmiy til |data52={{{națiune|<!---->{{{limbă_oficială|}}}}}} |label54 = Resmiy til |data54 = {{{limbă_recunoscută_oficial|}}} |label56 = Tanınğan azınlıq tili |data56 = {{{limbă_de_minoritate|}}} |label58 = Tüzetici qurum |data58={{wikidata|P1018|{{{tüzetici qurum|}}}}} |label60 = -{[[ISO 639]]}--1 |data60 = {{wikidata|P218|{{{iso1|}}}}} |label62 = -{[[ISO 639]]}--2 |data62 = {{wikidata|P219|{{{iso2|}}}}} |label64 = -{[[ISO 639]]}--3<br>(eñ çoq<br> laf etilgen şive) |data64 = {{wikidata|P220|{{{iso3|}}}}} |label66 = [[SIL International|-{SIL}-]] |data66 = {{{sil|}}} |header70 = {{#if:{{{text|}}} | Extras }} |data71 = {{#if:{{{text|}}} | {{#if: {{{titlu_text|}}}|'''{{{titlu_text}}}'''<br />}} {{{text|}}} }} |header80 = {{#if:{{{hartă_răspândire|}}}{{#property:P242}}{{#property:P1846}} | Harita }} |style81 = text-align: center; |data81 = {{#if:{{{hartă_răspândire|}}}{{#property:P242}}{{#property:P1846}} | {{#invoke:InfoboxImage|InfoboxImage|image={{{hartă_răspândire|{{#if:{{#property:P1846}}| {{#property:P1846}} | {{#property:P242}} }} }}}|imagesize=300px|sizedefault=frameless}} }} {{#if:{{{descriere|}}}|<br/> <small>{{{descriere|}}}</small>}} |data84 = {{#if:<!--învechit-->{{{code|<!---->{{{wikipedia|{{#property:P424}} }}} }}} | Bu tilde [[Vikipediya]] bar, </br> '''[[:{{{code|<!---->{{{wikipedia|{{#property:P424}}}}}}}}:| {{{nume|Baş Saifesine qaytuv}}}]]''' }} |data86 = Bu saifede '''-{Unicode}-''' tapıla bile. |data98 = {{{embedded1|}}} |data99 = {{{embedded2|}}} |wikidata=y |doc=Infocaseta Limbă }}</includeonly><noinclude>{{Doc}}</noinclude> 8lp7fa2ejqdgrzdznciu84lo5ksi226 Şablon:Listă de la Wikidata 10 44643 244192 183659 2026-06-09T09:10:40Z Хтосьці 13041 yoq ettim (çünki Wikidata-ro kiril elifbesinen yahşı işlemey; [[Vikipediya:Meydan#-{Module:Wikidata-ro}- yerinde -{Module:Wikidata}- qullanmaq isteyim]] baqıñız) 244192 wikitext text/x-wiki {{delete|Modul:Wikidata-ro qullanmaq kerek degil, çünki o kiril elifbesinen yahşı işlemey. Lütfen, -{[[Modul:Wikidata]]}- ve -{[[Şablon:Wikidata]]}- qullana. Eger meseleler olsa, maña ([[Qullanıcı:Хтосьці|-{crh-cyrl: Хтосьці; crh-latn: Chtości}-]] ([[Qullanıcı muzakeresi:Хтосьці|muzakere]])) yazıñız.}} 6ly5g5vatkaopalj6h4ex7p6wmh0jht Şablon:Valoare unică de la Wikidata 10 44644 244193 183621 2026-06-09T09:11:49Z Хтосьці 13041 yoq ettim (çünki Wikidata-ro kiril elifbesinen yahşı işlemey; [[Vikipediya:Meydan#-{Module:Wikidata-ro}- yerinde -{Module:Wikidata}- qullanmaq isteyim]] baqıñız) 244193 wikitext text/x-wiki {{delete|Modul:Wikidata-ro qullanmaq kerek degil, çünki o kiril elifbesinen yahşı işlemey. Lütfen, -{[[Modul:Wikidata]]}- ve -{[[Şablon:Wikidata]]}- qullana. Eger meseleler olsa, maña ([[Qullanıcı:Хтосьці|-{crh-cyrl: Хтосьці; crh-latn: Chtości}-]] ([[Qullanıcı muzakeresi:Хтосьці|muzakere]])) yazıñız.}} 6ly5g5vatkaopalj6h4ex7p6wmh0jht Şablon:Editează la Wikidata 10 44646 244194 183609 2026-06-09T09:13:00Z Хтосьці 13041 yoq ettim (çünki Wikidata-ro kiril elifbesinen yahşı işlemey; [[Vikipediya:Meydan#-{Module:Wikidata-ro}- yerinde -{Module:Wikidata}- qullanmaq isteyim]] baqıñız) 244194 wikitext text/x-wiki {{delete|Modul:Wikidata-ro qullanmaq kerek degil, çünki o kiril elifbesinen yahşı işlemey. Lütfen, -{[[Modul:Wikidata]]}- ve -{[[Şablon:Wikidata]]}- qullana. Eger meseleler olsa, maña ([[Qullanıcı:Хтосьці|-{crh-cyrl: Хтосьці; crh-latn: Chtości}-]] ([[Qullanıcı muzakeresi:Хтосьці|muzakere]])) yazıñız.}} 6ly5g5vatkaopalj6h4ex7p6wmh0jht Modul:EditAtWikidata 828 44647 244195 183610 2026-06-09T09:14:16Z Хтосьці 13041 yoq ettim (çünki Wikidata-ro kiril elifbesinen yahşı işlemey; [[Vikipediya:Meydan#-{Module:Wikidata-ro}- yerinde -{Module:Wikidata}- qullanmaq isteyim]] baqıñız) 244195 Scribunto text/plain -- Mında romen Vikipediyasındaki [[sv:Modul:EditAtWikidata]]-nıñ kopiyası edi -- Lâkin romen Vikipediyadan Wikidata modulleri kiril elifbesinen işlemey -- Lütfen, onıñ yerinde [[Modul:Wikidata]] ve [[Şablon:Wikidata]] qullanıñız 2wkydip6y9990yqcru3nnvexai1tvx8 244196 244195 2026-06-09T09:14:30Z Хтосьці 13041 244196 Scribunto text/plain -- Mında romen Vikipediyasındaki [[ro:Module:EditAtWikidata]]-nıñ kopiyası edi -- Lâkin romen Vikipediyadan Wikidata modulleri kiril elifbesinen işlemey -- Lütfen, onıñ yerinde [[Modul:Wikidata]] ve [[Şablon:Wikidata]] qullanıñız 72zlvo1yxx3pjjttb08wfpmj5dzxj97 Modul:WikidataClassHierarchy 828 44649 244190 183657 2026-06-09T08:40:37Z Хтосьці 13041 [[Modul:Wikidata-ro]] yoq ettim (çünki Wikidata-ro kiril elifbesinen yahşı işlemey; [[Vikipediya:Meydan#-{Module:Wikidata-ro}- yerinde -{Module:Wikidata}- qullanmaq isteyim]] baqıñız); qırımtatar tilindeki argumentlarnı qoştım 244190 Scribunto text/plain local p = {} local getArgs = require('Modul:Arguments').getArgs local illWd = require('Modul:Ill-wd').fromArgs local StringUtils = require('Modul:StringUtils') function p.getClassIdsList(qid, limitQid) local crtQid = qid or mw.wikibase.getEntityIdForCurrentPage() local entities = {} while (crtQid and crtQid ~= limitQid) do table.insert(entities, crtQid) local subclassOfClaims = p.findBestClaimsForProperty(crtQid, 'P279') if not subclassOfClaims or #subclassOfClaims == 0 then crtQid = nil else for _,eachClaim in ipairs(subclassOfClaims) do if eachClaim.type == 'statement' and eachClaim.mainsnak and eachClaim.mainsnak.snaktype == 'value' then crtQid = eachClaim.mainsnak.datavalue.value.id break end end end end return entities end function p.fromArgs(qid, limitqid, styling) local classes = p.getClassIdsList(qid, limitqid) local classesLinks = {} local classIdx = #classes while classIdx > 0 do table.insert(classesLinks, illWd(classes[classIdx])) classIdx = classIdx - 1 end if #classesLinks == 0 then return '' end if styling == 'br' then return table.concat(classesLinks, tostring(mw.html.create('br'))) elseif (styling == 'iyerarhik cedveli') or (styling == 'listă-ierarhică') then local topElement = mw.html.create('div'):css('margin-left', '15px') topElement:wikitext(classesLinks[1]) local crtElement = topElement for classLinkIdx=2,#classesLinks do crtElement = crtElement:tag('ul'):css('line-height', '100%'):css('margin-left', '5px') :tag('li') crtElement:wikitext(classesLinks[classLinkIdx]) end return tostring(topElement) elseif (styling == 'yalpaq cedvel') or (styling == 'listă') then local listElement = mw.html.create('ul') for _,eachClass in ipairs(classesLinks) do listElement:tag('li'):wikitext(eachClass) end return tostring(listElement) end end function p.findBestClaimsForProperty(entity, propertyId) -- [[ro:Modul:Wikidata]]-dan kopiyalandı (bu modulni yoq etmek içün) if propertyId == nil then return nil end if entity == nil then entity = mw.wikibase.getEntityIdForCurrentPage() end if type(entity) == 'table' then return entity:getBestStatements(propertyId) end if type(entity) == 'number' then entity = StringUtils._prependIfMissing({tostring(entity), 'Q'}) end if entity == nil then return nil end return mw.wikibase.getBestStatements(entity, propertyId) end function p.fromArray(args) return p.fromArgs(args.qid, args['sıñırlağan id'] or args['id_limită'] or args.limitqid, args['üslüp'] or args.styling or args.stil) end function p.fromFrame(frame) local args = getArgs(frame) return p.fromArray(args) end return p; g0tjrrdxw3580g4j5iwxfpke4sn1xwh 244203 244190 2026-06-09T09:53:33Z Хтосьці 13041 Wikidata-ro qullanğan Modul:Ill-wd modulini yoq ettim (çünki Wikidata-ro kiril elifbesinen yahşı işlemey; [[Vikipediya:Meydan#-{Module:Wikidata-ro}- yerinde -{Module:Wikidata}- qullanmaq isteyim]] baqıñız) 244203 Scribunto text/plain local p = {} local getArgs = require('Modul:Arguments').getArgs -- local illWd = require('Modul:Ill-wd').fromArgs local Wikidata = require('Modul:Wikidata') local StringUtils = require('Modul:StringUtils') function p.getClassIdsList(qid, limitQid) local crtQid = qid or mw.wikibase.getEntityIdForCurrentPage() local entities = {} while (crtQid and crtQid ~= limitQid) do table.insert(entities, crtQid) local subclassOfClaims = p.findBestClaimsForProperty(crtQid, 'P279') if not subclassOfClaims or #subclassOfClaims == 0 then crtQid = nil else for _,eachClaim in ipairs(subclassOfClaims) do if eachClaim.type == 'statement' and eachClaim.mainsnak and eachClaim.mainsnak.snaktype == 'value' then crtQid = eachClaim.mainsnak.datavalue.value.id break end end end end return entities end function p.fromArgs(qid, limitqid, styling) local classes = p.getClassIdsList(qid, limitqid) local classesLinks = {} local classIdx = #classes while classIdx > 0 do table.insert(classesLinks, Wikidata.formatEntityIdFromFrame({}, classes[classIdx], {}))--illWd(classes[classIdx])) classIdx = classIdx - 1 end if #classesLinks == 0 then return '' end if styling == 'br' then return table.concat(classesLinks, tostring(mw.html.create('br'))) elseif (styling == 'iyerarhik cedveli') or (styling == 'listă-ierarhică') then local topElement = mw.html.create('div'):css('margin-left', '15px') topElement:wikitext(classesLinks[1]) local crtElement = topElement for classLinkIdx=2,#classesLinks do crtElement = crtElement:tag('ul'):css('line-height', '100%'):css('margin-left', '5px') :tag('li') crtElement:wikitext(classesLinks[classLinkIdx]) end return tostring(topElement) elseif (styling == 'yalpaq cedvel') or (styling == 'listă') then local listElement = mw.html.create('ul') for _,eachClass in ipairs(classesLinks) do listElement:tag('li'):wikitext(eachClass) end return tostring(listElement) end end function p.findBestClaimsForProperty(entity, propertyId) -- [[ro:Modul:Wikidata]]-dan kopiyalandı (bu modulni yoq etmek içün) if propertyId == nil then return nil end if entity == nil then entity = mw.wikibase.getEntityIdForCurrentPage() end if type(entity) == 'table' then return entity:getBestStatements(propertyId) end if type(entity) == 'number' then entity = StringUtils._prependIfMissing({tostring(entity), 'Q'}) end if entity == nil then return nil end return mw.wikibase.getBestStatements(entity, propertyId) end function p.fromArray(args) return p.fromArgs(args.qid, args['sıñırlağan id'] or args['id_limită'] or args.limitqid, args['üslüp'] or args.styling or args.stil) end function p.fromFrame(frame) local args = getArgs(frame) return p.fromArray(args) end return p; 84cpa1gj07s0ylzxot82uuxxftenwhr Modul:Ill-wd 828 44650 244205 183658 2026-06-09T09:55:06Z Хтосьці 13041 yoq ettim (çünki Wikidata-ro kiril elifbesinen yahşı işlemey; [[Vikipediya:Meydan#-{Module:Wikidata-ro}- yerinde -{Module:Wikidata}- qullanmaq isteyim]] baqıñız) 244205 Scribunto text/plain -- Mında romen Vikipediyasındaki [[ro:Module:Ill-wd]]-nıñ kopiyası edi -- Lâkin romen Vikipediyadan Wikidata modulleri kiril elifbesinen işlemey -- Lütfen, onıñ yerinde [[Modul:Wikidata]] ve [[Şablon:Wikidata]] qullanıñız nbzk7130ujueoxujbxlz836ub9rod0j Modul:Wikidata-ro 828 44651 244198 243118 2026-06-09T09:23:03Z Хтосьці 13041 yoq ettim (çünki Wikidata-ro kiril elifbesinen yahşı işlemey; [[Vikipediya:Meydan#-{Module:Wikidata-ro}- yerinde -{Module:Wikidata}- qullanmaq isteyim]] baqıñız) 244198 Scribunto text/plain -- Mında romen Vikipediyasındaki [[ro:Module:Wikidata]]-nıñ kopiyası edi -- Lâkin romen Vikipediyadan Wikidata modulleri kiril elifbesinen işlemey -- Lütfen, onıñ yerinde [[Modul:Wikidata]] ve [[Şablon:Wikidata]] qullanıñız os0aicq983d6ocjspkdz6e06r96x8bw 244199 244198 2026-06-09T09:27:10Z Хтосьці 13041 [[Modul:Ill-wd]] Wikidata-ro modulini endi qullana. Soñ tüzetirmen. [[Special:Contributions/Хтосьці|Хтосьці]] ([[User talk:Хтосьці|muzakere]]) qullanıcısınıñ yapqan [[Special:Diff/244198|244198]] nomeralı versiyası lâğu etildi 244199 Scribunto text/plain local getArgs = require('Module:Arguments').getArgs local SepEntries = require('Module:Separated entries') local StringUtils = require('Modul:StringUtils') local DateUtils = require('Modul:DateUtils') local GregorianDate = require('Modul:GregorianDate') local Citation = require('Modul:Citation/CS1') local TableTools = require('Modul:TableTools-ro') local LangUtils = require('Modul:LangUtils') local plural = require('Modul:Plural').build_plural local Transliteration = require('Modul:Transliteration') local Set = require('Modul:Set') local p = {} local lang = mw.language.getContentLanguage() local libraryUtil = require('libraryUtil') local wdReferences = {} -- internationalisation local i18n = { ["errors"] = { ["property-not-found"] = "Proprietatea nu a fost găsită.", ["entity-not-found"] = "Itfemul Wikidata nu a fost găsit.", ["unknown-claim-type"] = "Tip de afirmație negăsit.", ["unknown-snak-type"] = "Tip de Snak negăsit.", ["unknown-datavalue-type"] = "Tip de date negăsit.", ["unknown-entity-type"] = "Tip de item negăsit.", ["qualifier-not-found"] = "Calificator negăsit.", ["site-not-found"] = "Proiect Wikimedia negăsit.", }, ["somevalue"] = "O valoare", ["novalue"] = "Nicio valoare", ["datetime"] = { -- $1 is a placeholder for the actual number [0] = "$1 miliarde de ani", -- precision: billion years [1] = "$100 milioane de ani", -- precision: hundred million years [2] = "$10 milioane de ani", -- precision: ten million years [3] = "$1 milioane de ani", -- precision: million years [4] = "$100.000 de ani", -- precision: hundred thousand years [5] = "$10.000 de ani", -- precision: ten thousand years [6] = "mileniul $1", -- precision: millennium [7] = "secolul $1", -- precision: century [8] = "deceniul anilor $1", -- precision: decade -- the following use the format of #time parser function [9] = "Y", -- precision: year, [10] = "F Y", -- precision: month [11] = "j F Y", -- precision: day [12] = 'j F Y, "orele" G', -- precision: hour [13] = "j F Y G:i", -- precision: minute [14] = "j F Y G:i:s", -- precision: second ["beforenow"] = "acum $1", -- how to format negative numbers for precisions 0 to 5 ["afternow"] = "peste $1", -- how to format positive numbers for precisions 0 to 5 ["bc"] = '$1 "î.e.n."', -- how print negative years ["ad"] = "$1" -- how print positive years }, ["monolingualtext"] = '<span lang="%language">%text</span>', ["warnDump"] = "[[Categorie:Apel de funcție 'Dump' din modulul Wikidata]]" } local function propAndEntity(arg1, arg2) local propId, entId for _,eachArg in ipairs({arg1, arg2}) do if mw.ustring.match(eachArg, 'Q%d+') == eachArg then entId = eachArg elseif mw.ustring.match(eachArg, 'P%d+') == eachArg then propId = eachArg end end return propId, entId end local function wrapInLangSpan(text, lang) if not text then return nil end if not lang or lang == 'crh' then return text end local langSpan = mw.html.create('span'):attr('lang', lang):wikitext(text) return tostring(langSpan) end local function isClaimTrue(claim) return mw.wikibase.entity.claimRanks['RANK_' .. mw.ustring.upper(claim.rank)] >= mw.wikibase.entity.claimRanks.RANK_NORMAL end p.isClaimTrue = isClaimTrue --- returns true if the claim has a better (or equal) rank than the threshhold specified --- threshholdRank can be "normal", "preferred" etc. local function hasBetterRank(claim, threshholdRank) return (not threshholdRank or mw.wikibase.entity.claimRanks['RANK_' .. mw.ustring.upper(claim.rank)] >= mw.wikibase.entity.claimRanks['RANK_' .. mw.ustring.upper(threshholdRank)]) and isClaimTrue(claim) end p.hasBetterRank = hasBetterRank function p.descriptionIn(frame) local langcode = frame.args[1] local id = frame.args[2] -- return description of a Wikidata entity in the given language or the default language of this Wikipedia site local entity = mw.wikibase.getEntityObject(id) if entity then return entity.descriptions[langcode or lang.code].value end return "" end function p.getEntityId(frame) return mw.wikibase.getEntityIdForCurrentPage() end function p.labelIn(frame) local langcode = frame.args[1] local id = frame.args[2] or mw.wikibase.getEntityIdForCurrentPage() -- return label of a Wikidata entity in the given language or the default language of this Wikipedia site local entity if id then return mw.wikibase.getLabelByLang(id, langcode or lang.code) end return "" end local function isValueSnak(snak) return snak and snak.snaktype == 'value' end p.isValueSnak = isValueSnak local function hasValueSnak(claim) return claim and claim.type == 'statement' and isValueSnak(claim.mainsnak) end p.hasValueSnak = hasValueSnak local function hasRankAtLeastNormal(claim) return claim and claim.rank and mw.wikibase.entity.claimRanks['RANK_' .. mw.ustring.upper(claim.rank)] > mw.wikibase.entity.claimRanks.RANK_DEPRECATED end p.claimHasRankAtLeastNormal = hasRankAtLeastNormal local function isWritingSystemLatn(lId) local writingSystems = { lId } local loopIdx = 1 repeat local crtWritingSystemId = table.remove(writingSystems, 1) local writingSystemInstanceOfClaims = p.findBestClaimsForProperty(crtWritingSystemId, 'P31') if writingSystemInstanceOfClaims then for _,eachScriptInstanceOfClaim in ipairs(writingSystemInstanceOfClaims) do if p.hasValueSnak(eachScriptInstanceOfClaim) and eachScriptInstanceOfClaim.mainsnak.datavalue.value.id == 'Q29575627' then return true end end end local writingSystemClaims = p.findBestClaimsForProperty(crtWritingSystemId, 'P282') if writingSystemClaims then for _,eachWritingSystemClaim in ipairs(writingSystemClaims) do if p.hasValueSnak(eachWritingSystemClaim) then if eachWritingSystemClaim.mainsnak.datavalue.value.id == 'Q8229' then return true end table.insert(writingSystems, eachWritingSystemClaim.mainsnak.datavalue.value.id) end end end loopIdx = loopIdx + 1 until #writingSystems == 0 or loopIdx >= 20 return false end local function findNativeOrEnglishLabel(entityId, capitalize) local label local labelLang if not entityId then entityId = mw.wikibase.getEntityIdForCurrentPage() end if not entityId then return nil end local langIds = {} for _,eachLangProp in ipairs({'P103', 'P407', 'P37', 'P364'}) do for __,eachLangClaim in ipairs(mw.wikibase.getBestStatements(entityId, eachLangProp)) do if hasValueSnak(eachLangClaim) then table.insert(langIds, eachLangClaim.mainsnak.datavalue.value.id) end end end for _,eachCountryProp in ipairs({'P17', 'P27'}) do for __,eachCountry in ipairs(mw.wikibase.getBestStatements(entityId, eachCountryProp)) do if hasValueSnak(eachCountry) then for ___,eachOffLang in ipairs(mw.wikibase.getBestStatements(eachCountry.mainsnak.datavalue.value.id, 'P37')) do if hasValueSnak(eachOffLang) then table.insert(langIds, eachOffLang.mainsnak.datavalue.value.id) end end end end end table.insert(langIds, 'Q1860') langIds = TableTools.mergeSort(langIds, function(l1, l2) if l2 and not l1 then return 1 end if l1 and not l2 then return -1 end if l1 == l2 then return 0 end local l1IsLatn = isWritingSystemLatn(l1) or Transliteration.isTransliterationSupported(p.loadOneValueInChain({l1, 'P218'})) local l2IsLatn = isWritingSystemLatn(l2) or Transliteration.isTransliterationSupported(p.loadOneValueInChain({l2, 'P218'})) if l1IsLatn and not l2IsLatn then return -1 elseif not l1IsLatn and l2IsLatn then return 1 else return 0 end end) local langsToTry = {} for _,eachLangId in ipairs(langIds) do for __,eachLangCodeClaim in ipairs(mw.wikibase.getBestStatements(eachLangId, 'P424')) do if not labelLang and hasValueSnak(eachLangCodeClaim) then table.insert(langsToTry, eachLangCodeClaim.mainsnak.datavalue.value) end end end local simplifiedLangsToTry = {} for _,eachLangToTry in ipairs(langsToTry) do local simplifiedLang = StringUtils._substringBefore({StringUtils._substringBefore({eachLangToTry, '_'}), '-'}) table.insert(simplifiedLangsToTry, simplifiedLang) end langsToTry = simplifiedLangsToTry for _,eachLang in ipairs(langsToTry) do if label == nil then label = mw.wikibase.getLabelByLang(entityId, eachLang) description = mw.wikibase.getDescription(entityId) labelLang = eachLang end if label then break end end if label then if labelLang and labelLang ~= 'crh' and not Transliteration.isTransliterationSupported(labelLang) then label = wrapInLangSpan(label, labelLang) end if Transliteration.isTransliterationSupported(labelLang) then label = wrapInLangSpan(Transliteration.transliterate(label, labelLang), labelLang .. '-Latn') end if capitalize then label = lang:ucfirst(label) end end return label, labelLang end p.findNativeOrEnglishLabel = findNativeOrEnglishLabel p.getNativeOrEnglishLabel = function(frame) local args = getArgs(frame) local label, lang = findNativeOrEnglishLabel(args[1], args[2]) if label then return label else return nil end end local function computeLinkToItem(entityId, capitalize, callFunction, plainCallFunction) local qIfiedEntityId = StringUtils._prependIfMissing({tostring(entityId), 'Q'}) local sitelink = mw.wikibase.sitelink(qIfiedEntityId) local label = nil local labelLang = nil local object = nil local out = "" local description = nil if plainCallFunction and type(plainCallFunction) == 'function' then label, labelLang = plainCallFunction(qIfiedEntityId) elseif callFunction and type(callFunction) == 'function' then object = mw.wikibase.getEntityObject(qIfiedEntityId) label, labelLang = callFunction(object) end if label == nil or (labelLang and labelLang ~= lang.code) then label = mw.wikibase.getLabelByLang(qIfiedEntityId, 'crh') if label then labelLang = 'crh' end description = mw.wikibase.getDescription(qIfiedEntityId) end if not label then label, labelLang = findNativeOrEnglishLabel(qIfiedEntityId, capitalize) elseif capitalize then label = lang:ucfirst(label) end if not label then label = qIfiedEntityId labelLang = nil end if description then description = "(" .. description .. ")" end if label == qIfiedEntityId then out = "[[Category:Articole cu legături către elemente fără etichetă]] " elseif labelLang ~= 'crh' then out = "[[Category:Articole cu legături către elemente fără etichetă în limba română]] " end description = description or "" if sitelink then return out .. "[[:" .. sitelink .. "|" .. label .. "]]" else local coextensiveWithPageId = p.loadOneValueInChain({qIfiedEntityId, 'P3403', 'raw'}) local listPageId = p.loadOneValueInChain({qIfiedEntityId, 'P2354', 'raw'}) local listPageSitelink = listPageId and mw.wikibase.sitelink(listPageId) or coextensiveWithPageId and mw.wikibase.sitelink(coextensiveWithPageId) if listPageSitelink then return "[[:" .. listPageSitelink .. "|" .. label .. "]]" end return out .. "[[:d:" .. qIfiedEntityId .. "|" .. label .. "]]<abbr title='Articolul încă nu există în acest wiki'>[*]</abbr>" .. mw.getCurrentFrame():preprocess("{{invizibil|1=[[" .. label .." " .. description .. "|&#8203;]]}}") end end p.findLinkToItemWithLabel = function(entityId, label) local sitelink = mw.wikibase.sitelink(StringUtils._prependIfMissing({tostring(entityId), 'Q'})) if sitelink then return "[[:" .. sitelink .. "|" .. label .. "]]" else return computeLinkToItem(entityId, false, nil, function() return label end) end end p.findLinkToItemWithCallback = function(entityId, capitalize, callBack, plainCallBack) return computeLinkToItem(entityId, capitalize, callBack, plainCallBack) end p.findLinkToItemWithLabelFromAnyClaim = function(entityId, capitalize, propertyIdsTable) local callFunction = nil if propertyIdsTable then callFunction = function(object) local returnValue = nil for propIdIdx,propertyId in pairs(propertyIdsTable) do if object and object.claims and object.claims[propertyId] and returnValue == nil then for eachClaimIdx, eachClaim in pairs(object.claims[propertyId]) do if hasValueSnak(eachClaim) and eachClaim.mainsnak.datavalue then if eachClaim.mainsnak.datavalue.type == 'monolingualtext' then if eachClaim.mainsnak.datavalue.value.language == 'crh' then returnValue = eachClaim.mainsnak.datavalue.value.text end elseif eachClaim.mainsnak.datavalue.type == 'wikibase-entityid' then returnValue = mw.wikibase.label(StringUtils._prependIfMissing({tostring(eachClaim.mainsnak.datavalue.value['numeric-id']), 'Q'})) elseif eachClaim.mainsnak.datavalue.type == 'string' then returnValue = eachClaim.mainsnak.datavalue.value end end end end end return returnValue end end return computeLinkToItem(entityId, capitalize, callFunction) end p.findLinkToItemWithLabelFromClaim = function(entityId, capitalize, propertyId) return p.findLinkToItemWithLabelFromAnyClaim(entityId, capitalize, { propertyId }) end p.findLinkToItem = function(entityId, capitalize, feminine, shortestAlias) if type(entityId) == 'number' then entityId = StringUtils._prependIfMissing({tostring(entityId), 'Q'}) end if capitalize == nil then capitalize = false end local label local returnedLang = nil local bestRanks = { ["crh"] = nil, ["en"] = nil } if shortestAlias then local returnedAlias = nil local bestShortNameClaims = mw.wikibase.getAllStatements(entityId, 'P1813') if bestShortNameClaims then local shortNameEn = nil for shortNameIdx,shortNameClaim in pairs(bestShortNameClaims) do if shortNameClaim.mainsnak.datavalue.value.language == 'en' and hasBetterRank(shortNameClaim, bestRanks["en"]) then shortNameEn = shortNameClaim.mainsnak.datavalue.value.text bestRanks["en"] = shortNameClaim.rank end if shortNameClaim.mainsnak.datavalue.value.language == 'crh' and hasBetterRank(shortNameClaim, bestRanks["crh"]) then returnedAlias = shortNameClaim.mainsnak.datavalue.value.text bestRanks["crh"] = shortNameClaim.rank end end if returnedAlias then returnedLang = 'crh' elseif shortNameEn then returnedAlias = shortNameEn returnedLang = 'en' end returnedAlias = capitalize and StringUtils._capitalize({returnedAlias}) or returnedAlias end label = wrapInLangSpan(returnedAlias, returnedLang) end if feminine then local feminineForms = mw.wikibase.getBestStatements(entityId, 'P2521') if feminineForms then for _idx, eachFForm in pairs(feminineForms) do if hasValueSnak(eachFForm) and eachFForm.mainsnak.datatype == 'monolingualtext' and eachFForm.mainsnak.datavalue.type == 'monolingualtext' and eachFForm.mainsnak.datavalue.value and eachFForm.mainsnak.datavalue.value.language == 'crh' then label = eachFForm.mainsnak.datavalue.value.text returnedLang = eachFForm.mainsnak.datavalue.value.language end end end end return computeLinkToItem(entityId, capitalize, nil, function() return label, returnedLang end) end p.getLinkToItem = function(frame) local args = getArgs(frame, {frameOnly=true}) local entityId = args[1] return p.findLinkToItem(entityId, false, false, false) end local function printRawValue(snak) if (isValueSnak(snak)) then if snak.datavalue.type == "wikibase-entityid" then return snak.datavalue.value.id elseif snak.datavalue.type == "time" then return snak.datavalue.value.time elseif snak.datavalue.type == "monolingualtext" then return snak.datavalue.value.text elseif snak.datavalue.type == "quantity" then return snak.datavalue.value.amount .. ' ' .. snak.datavalue.value.unit else return snak.datavalue.value end end return '' end local function snakToString(snak, feminine) if (isValueSnak(snak)) then if (snak.datavalue.type == "wikibase-entityid") then return p.findLinkToItem(snak.datavalue.value["numeric-id"], nil, feminine) end if (snak.datavalue.type == "time") then return formatDate(snak.datavalue.value.time, snak.datavalue.value.precision, snak.datavalue.value.timezone) end if (snak.datavalue.type == "monolingualtext") then return snak.datavalue.value.text end if (snak.datavalue.type == "quantity") then local unit = '1' local amount = snak.datavalue.value.amount local ret = nil local unitQ = mw.ustring.match(snak.datavalue.value.unit, 'Q%d+') if unitQ ~= nil then unit = p.findLanguageText('P5061', 'crh', unitQ) or p.findLanguageText('P5061', 'crh', unitQ) if not unit or mw.ustring.len(unit) == 0 then unit = p.findLabel(unitQ, nil) if tonumber(amount) > 1 and unit then mw.incrementExpensiveFunctionCount() ret = plural(tonumber(amount), unit) end end unit = unit or '1' end if tonumber(amount) ~= nil then amount = mw.language.new(lang.code):formatNum(tonumber(amount)) end if ret == nil then ret = amount .. (unit ~= '1' and (mw.text.decode('&nbsp;') .. unit) or '') end return ret end return snak.datavalue.value end return "" end p.printSnak = function(snak) return snakToString(snak) end p.outputReferences = function (claim) local refMapping = {} local authorityPropertiesMap = {} local frame = mw.getCurrentFrame() refMapping["P1433"] = "publisher" refMapping["P123"] = "publisher" refMapping["P143"] = "publisher" refMapping["P1476"] = "contribution" refMapping["P854"] = "url" refMapping["P813"] = "accessdate" refMapping["P50"] = "author" refMapping["P2093"] = "author" refMapping["P577"] = "date" refMapping["P248"] = "title" refMapping["P304"] = "page" refMapping["P958"] = "contribution" refMapping["P1810"] = "contribution" refMapping["P212"] = "isbn" authorityPropertiesMap['Q20666306'] = 'P268' -- BnF identifier authorityPropertiesMap['Q15241312'] = 'P646' -- Freebase identifier authorityPropertiesMap['Q36578'] = 'P227' -- GND identifier authorityPropertiesMap['Q37312'] = 'P345' -- IMDb identifier authorityPropertiesMap['Q278487'] = 'P662' -- PubChem identifier authorityPropertiesMap['Q1139587'] = 'P2334' -- Swedish film database identifier local primaryProperties = {} primaryProperties["P1433"] = "publisher" primaryProperties["P123"] = "publisher" primaryProperties["P1476"] = "contribution" primaryProperties["P248"] = "title" primaryProperties["P854"] = "url" primaryProperties["P50"] = "author" local out = "" local referencesCount = 0 if claim then for ref in pairs(claim.references or {}) do local citationArguments = {} local citationArgumentsFound = false local refname = "" for snakkey, snakval in pairs(claim.references[ref].snaks) do if refMapping[snakkey] ~= nil then local snakData = {} for snakIndex,snakValElement in ipairs(snakval) do local formattedSnakValElement = snakToString(snakValElement) if isValueSnak(snakValElement) and snakValElement.datatype == 'time' then formattedSnakValElement = DateUtils.formatDate(DateUtils.parseWikidataDate(snakValElement.datavalue.value.time, snakValElement.datavalue.value.precision), false , true) elseif isValueSnak(snakValElement) and snakkey == 'P1476' and snakValElement.datatype == 'monolingualtext' and snakValElement.datavalue.value.language ~= 'crh' then citationArguments['language'] = snakValElement.datavalue.value.language end table.insert(snakData, formattedSnakValElement) end citationArguments[refMapping[snakkey]] = table.concat(snakData, ", ", 1, #snakData) refname = refname .. '_' .. refMapping[snakkey] .. '_' .. mw.ustring.gsub(mw.ustring.gsub(mw.text.nowiki(citationArguments[refMapping[snakkey]]), '&#%d+;', ''), ' ', '') if primaryProperties[snakkey] then citationArgumentsFound = true end if snakkey == 'P248' or snakkey == 'P143' then -- "stated in" or "imported from", can be an authority file if snakval[1].datavalue and snakval[1].datavalue.type == 'wikibase-entityid' then local statedInWbId = snakval[1].datavalue.value.id -- if Wikimedia project, ignore for _idx, eachStatedInInstanceOfClaim in pairs(mw.wikibase.getAllStatements(statedInWbId, 'P31')) do if eachStatedInInstanceOfClaim.mainsnak and eachStatedInInstanceOfClaim.mainsnak.datavalue and eachStatedInInstanceOfClaim.mainsnak.datavalue.type == 'wikibase-entityid' and (eachStatedInInstanceOfClaim.mainsnak.datavalue.value['numeric-id'] == 10876391 or eachStatedInInstanceOfClaim.mainsnak.datavalue.value['numeric-id'] == 14827288) then citationArgumentsFound = false break end end for _idx, eachStatedInInstanceOfClaim in pairs(mw.wikibase.getAllStatements(statedInWbId, 'P1269')) do if eachStatedInInstanceOfClaim.mainsnak and eachStatedInInstanceOfClaim.mainsnak.datavalue and eachStatedInInstanceOfClaim.mainsnak.datavalue.type == 'wikibase-entityid' and eachStatedInInstanceOfClaim.mainsnak.datavalue.value['numeric-id'] == 16222597 then citationArgumentsFound = false break end end -- extract data about authority file local authorityWbEntityId = authorityPropertiesMap[StringUtils._prependIfMissing({statedInWbId, 'Q'})] if authorityWbEntityId then local authorityUrlFormatClaims = mw.wikibase.getBestStatements(authorityWbEntityId, 'P1630') if authorityUrlFormatClaims and 0 < #authorityUrlFormatClaims then local formatterUrl = snakToString(authorityUrlFormatClaims[1].mainsnak) local crtEntityId = mw.wikibase.getEntityIdForCurrentPage() if crtEntityId then local entityAuthIdClaims = mw.wikibase.getBestStatements(crtEntityId, authorityWbEntityId) if entityAuthIdClaims and 0 < #entityAuthIdClaims and hasValueSnak(entityAuthIdClaims[1]) then citationArguments['chapterurl'] = mw.ustring.gsub(formatterUrl, '%$1', entityAuthIdClaims[1].mainsnak.datavalue.value) citationArguments['chapter'] = p.labelIn({args = {'crh'}}) or p.labelIn({args = {'en'}}) end end end elseif citationArgumentsFound == true then --extract URL from target entity local statedInUrl = nil -- the order of the array is important, as we only search the first occurence local onlinelinksprops = {'P953', 'P854', 'P856', 'P1581', 'P2397','P1065'} for _,eachOnlineLinkProp in ipairs(onlinelinksprops) do local linkId = p.findOneValueNoRef(eachOnlineLinkProp, statedInWbId) if linkId then local linkFormatter = p.findOneValueNoRef('P1630', eachOnlineLinkProp) or '$1' if linkFormatter then linkId = mw.ustring.gsub(linkId, '%%', '%%%%') statedInUrl = mw.ustring.gsub(linkFormatter, '$1', linkId) break else statedInUrl = linkId break end end end if statedInUrl then citationArguments[refMapping[snakkey]] = StringUtils._capitalize({p.findTitleOfWork(statedInWbId)}) citationArguments['url'] = statedInUrl else local props = p.getEntityIdsList(statedInWbId, 'P1687') if props then for _,eachOnlineLinkProp in ipairs(onlinelinksprops) do for _,prop in ipairs(props) do if eachOnlineLinkProp == 'P' .. prop then citationArguments[refMapping[snakkey]] = StringUtils._capitalize({p.findTitleOfWork(statedInWbId)}) citationArguments['url'] = p.findOneValueNoRef(eachOnlineLinkProp) end break end end end end end end end end end if citationArgumentsFound then --post-process citation arguments: --1. if publisher is missing and contribution and title are present, change title to publisher and contribution to title if citationArguments['publisher'] == nil and citationArguments['contribution'] and citationArguments['title'] then citationArguments['publisher'] = citationArguments['title'] citationArguments['title'] = citationArguments['contribution'] citationArguments['contribution'] = nil end --2. if contribution is present but title is not, change contribution to title if citationArguments['contribution'] and citationArguments['title'] == nil then citationArguments['title'] = citationArguments['contribution'] citationArguments['contribution'] = nil end --3. if title is a wikilink, break it down and assign article link separately if citationArguments['title'] then local titlink, titplain = mw.ustring.match(citationArguments['title'], '%[%[(.*)|(.*)%]%]') if titlink and titplain then if not citationArguments['url'] then citationArguments['titlelink'] = titlink end citationArguments['title'] = titplain end end local citationHash = mw.hash.hashValue('md5', refname) if referencesCount < 4 then if wdReferences[citationHash] then out = out .. frame:extensionTag{name="ref", args={name = citationHash}} else local refText = Citation.citationFromArgs(citationArguments, {CitationClass = 'citation'}, false) out = out .. frame:extensionTag("ref", refText, { name = citationHash }) wdReferences[citationHash] = true end referencesCount = referencesCount + 1 end end end end return out end p.getValueListLimited = function(entityId, propertyId, limitVal) if limitVal == nil or limitVal <= 0 then limitVal = math.huge end entityId = entityId or mw.wikibase.getEntityIdForCurrentPage() if propertyId == nil or entityId == nil then return nil,0 end local claims = mw.wikibase.getAllStatements(entityId, propertyId) if not claims then return nil,0 end if #claims == 0 then return {},0 end local rez = {} local feminine = false local genders = mw.wikibase.getBestStatements(entityId, 'P21') if genders and #genders > 0 and genders[1] and hasValueSnak(genders[1]) and genders[1].mainsnak.datatype == 'wikibase-item' and genders[1].mainsnak.datavalue.type == 'wikibase-entityid' and genders[1].mainsnak.datavalue.value['numeric-id'] == 6581072 then feminine = true end local count = 0 for k, v in pairs(claims) do if hasValueSnak(v) then count = count+1 if k <= limitVal then table.insert(rez, snakToString(v.mainsnak, feminine) .. p.outputReferences(v)) end end end return rez, count end p.getValueList = function(entityId, propertyId) local rez, _ = p.getValueListLimited(entityId, propertyId, nil) return rez end local function findTimestampInTable(tbl) local crtEntry = '' if tbl then if tbl['P585'] then crtEntry = crtEntry .. snakToString(tbl['P585'][1].mainsnak or tbl['P585'][1]) elseif tbl['P580'] then if tbl['P582'] then local starttime = snakToString(tbl['P580'][1].mainsnak or tbl['P580'][1]) local endtime = snakToString(tbl['P582'][1].mainsnak or tbl['P582'][1]) if starttime == endtime then crtEntry = crtEntry .. starttime else crtEntry = crtEntry .. starttime .. mw.text.decode('&ndash;', true) .. endtime end else crtEntry = crtEntry .. 'din ' .. snakToString(tbl['P580'][1].mainsnak or tbl['P580'][1]) end elseif tbl['P582'] then local endtime = DateUtils.extractDateFromWikidataSnak(tbl['P582'][1].mainsnak or tbl['P582'][1]) if endtime then crtEntry = crtEntry .. 'până ' .. ((endtime.precision == 9 or endtime.precision == 10) and 'în' or 'la') .. ' ' .. DateUtils.formatDate(endtime) end end end return crtEntry end p.printTimestampForClaim = function(claim) if claim and claim.qualifiers then return tostring(mw.html.create('small'):wikitext(' (' .. findTimestampInTable(claim.qualifiers) .. ')')) end return '' end p.findTimestamp = function(entityId) if type(entityId) == 'number' then entityId = StringUtils._prependIfMissing({tostring(entityId), 'Q'}) end if type(entityId) == 'table' then entityId = entityId.id end entityId = entityId or mw.wikibase.getEntityIdForCurrentPage() if entityId then local tbl = {} for _,propId in ipairs({'P580', 'P582', 'P585'}) do local propClaims = mw.wikibase.getAllStatements(entityId, propId) if propClaims and #propClaims > 0 then tbl[propId] = propClaims end end return findTimestampInTable(tbl) end return '' end p.getTimestamp = function(frame) return p.findTimestamp(frame and frame.args and frame.args[1] or nil) end p.getValueListWithDecoratedQualifiers = function(frame) local args = getArgs(frame) local entityId = args['q'] local propertyId = args['p'] local best = (args['best'] ~= nil) local bracketTemplates = nil local bracketTemplatesIdces = TableTools.affixNums(args, 'bracketTemplate') if bracketTemplatesIdces and #bracketTemplatesIdces > 0 then bracketTemplates = {} for _, bracketTemplatesIdx in ipairs(bracketTemplatesIdces) do table.insert(bracketTemplates, args['bracketTemplate' .. tostring(bracketTemplatesIdx)]) end end local pictureSize = args['pictureSize'] or '40px' local pictureProp = args['picturePid'] or nil local seps = nil local sepsIdces = TableTools.affixNums(args, 'sep') if sepsIdces and #sepsIdces > 0 then seps = {} for _, sepsIdx in ipairs(sepsIdces) do table.insert(seps, args['sep' .. tostring(sepsIdx)]) end end local rezList = p.findValueListWithQualifiersInBrackets(entityId, propertyId, best, bracketTemplates, seps, pictureProp, pictureSize) return table.concat(rezList, tostring(mw.html.create('br'))) end p.getValueListWithQualifiersInBrackets = p.getValueListWithDecoratedQualifiers p.findValueListWithDecoratedQualifiers = function(entityId, propertyId, best, bracketTemplates, seps, pictureProp, pictureSize) entityId = entityId or mw.wikibase.getEntityIdForCurrentPage() if (type(bracketTemplates) == 'string') then bracketTemplates = { bracketTemplates } end seps = seps or {} table.insert(seps, 1, '') if #seps < #bracketTemplates then for idx=#seps + 1,#bracketTemplates do table.insert(seps, ', ') end end if propertyId == nil or entityId == nil then return nil end local claims local qualProps = {} for _,bracketTemplate in ipairs(bracketTemplates) do mw.ustring.gsub(bracketTemplate, '%$(P%d+)', function(qualProp) table.insert(qualProps, qualProp) return nil end) end if best then claims = mw.wikibase.getBestStatements(entityId, propertyId) else claims = mw.wikibase.getAllStatements(entityId, propertyId) end local rez = {} if claims and claims[1] then local rawclaims = {} for k, v in pairs(claims) do if hasValueSnak(v) and hasRankAtLeastNormal(v) then table.insert(rawclaims, v) end end for k, v in pairs(rawclaims) do local crtEntry = snakToString(v.mainsnak) if pictureProp then local ts local picture if v.qualifiers and v.qualifiers['P582'] then for _,endTimeQual in ipairs(v.qualifiers['P582']) do ts = DateUtils.extractDateFromWikidataSnak(endTimeQual) end end if ts then local pictureClaim = p.findClaimForTimestamp(v.mainsnak.datavalue.value.id, pictureProp, ts) if (p.hasValueSnak(pictureClaim)) then picture = pictureClaim.mainsnak.datavalue.value end else picture = p.loadOneValueInChain({v.mainsnak.datavalue.value.id, pictureProp, 'raw'}) end if picture and picture ~= '' then crtEntry = StringUtils._prependToString({crtEntry, '[[Fișier:' .. picture .. '|' .. pictureSize .. ']]' .. mw.text.decode('&nbsp;')}) end end if v.qualifiers and #qualProps > 0 then local qualPropValues = {} for _,eachQualProp in pairs(qualProps) do if v.qualifiers[eachQualProp] then local qualPropValuesList = {} for __,eachQualSnak in ipairs(v.qualifiers[eachQualProp]) do if isValueSnak(eachQualSnak) then table.insert(qualPropValuesList, snakToString(eachQualSnak)) end end qualPropValues[eachQualProp] = mw.text.listToText(qualPropValuesList, ', ', ' și ') else qualPropValues[eachQualProp] = '' end end local bracketData = {} local usedSeps = {} for bracketTemplateIdx,bracketTemplate in ipairs(bracketTemplates) do local substedBracketTemplate = mw.ustring.gsub(bracketTemplate, '%$(P%d+)', function(qualProp) return qualPropValues[qualProp] end) if substedBracketTemplate ~= bracketTemplate and substedBracketTemplate ~= "" then bracketData[bracketTemplateIdx] = substedBracketTemplate usedSeps[bracketTemplateIdx] = seps[bracketTemplateIdx] end end bracketData = TableTools.compressSparseArray(bracketData) usedSeps = TableTools.compressSparseArray(usedSeps) local bracketText = '' for bracketDatumIdx=1,#bracketData do bracketText = bracketText .. (bracketDatumIdx == 1 and '' or usedSeps[bracketDatumIdx]) bracketText = bracketText .. bracketData[bracketDatumIdx] end crtEntry = StringUtils._appendToString({crtEntry, tostring(mw.html.create('small'):wikitext(StringUtils._encloseString({bracketText, '&#32;(', ')'})))}) end crtEntry = crtEntry .. p.outputReferences(v) table.insert(rez, crtEntry) end end return rez end p.findValueListWithQualifiersInBrackets = p.findValueListWithDecoratedQualifiers p.getTimestampedValueList = function(entityId, propertyId, best) entityId = entityId or mw.wikibase.getEntityIdForCurrentPage() if propertyId == nil or entityId == nil then return nil end local claims if best then claims = mw.wikibase.getBestStatements(entityId, propertyId) else claims = mw.wikibase.getAllStatements(entityId, propertyId) end local rez = {} if claims and claims[1] then local rawclaims = {} for k, v in pairs(claims) do if hasValueSnak(v) then table.insert(rawclaims, v) end end for k, v in pairs(rawclaims) do local crtEntry = snakToString(v.mainsnak) crtEntry = crtEntry .. p.printTimestampForClaim(v) crtEntry = crtEntry .. p.outputReferences(v) table.insert(rez, crtEntry) end end return rez end p._getValueListWithSeparator = function(funcArgs) local separator = mw.text.trim(funcArgs[1] or ", ") local propertyId local entityId propertyId, entityId = propAndEntity(funcArgs[2], funcArgs[3]) entityId = entityId or mw.wikibase.getEntityIdForCurrentPage() local limit = funcArgs[4] or funcArgs['limit'] local limitVal = 0 if limit and limit == mw.ustring.match(limit, '%d+') then limitVal = tonumber(limit) end local values, vcount = p.getValueListLimited(entityId, propertyId, limitVal) if not values then return nil end local extraSpec = nil if 0 < limitVal and vcount > limitVal + 1 then local hiddenVals = vcount - limitVal extraSpec = '[[:d:' .. entityId .. '#' .. propertyId .. "|...''încă " .. tostring(hiddenVals) .. "'']]" table.insert(values, extraSpec) end return values and table.concat(values, separator) end p.getValueListWithSeparator = function(frame) local funcArgs = getArgs(frame, {frameOnly = true}) return p._getValueListWithSeparator(funcArgs) end p.getValue = function(frame) local args = getArgs(frame) return p._getValueListWithSeparator({', ', args[1], mw.wikibase.getEntityIdForCurrentPage()}) end p._getTimestampedValueListWithSeparator = function(funcArgs) local separator = funcArgs[1] or ", " local propertyId = funcArgs[2] local entityId = funcArgs[3] local best = funcArgs['best'] == 'y' or funcArgs['best'] == 'yes' local values = p.getTimestampedValueList(entityId, propertyId, best) return values and table.concat(values, separator) end p.getTimestampedValueListWithSeparator = function(frame) local funcArgs = getArgs(frame, {frameOnly = true}) return p._getTimestampedValueListWithSeparator(funcArgs) end local function extractWikidataIdsFromClaimList(claims) local rez = {} if claims and #claims > 0 then for k, v in pairs(claims) do if hasValueSnak(v) and v.mainsnak.datavalue.type == 'wikibase-entityid' then table.insert(rez, v.mainsnak.datavalue.value['numeric-id']) end end end return rez end p.getEntityIdsList = function(entityId, propertyId) entityId = entityId or mw.wikibase.getEntityIdForCurrentPage() if propertyId == nil or entityId == nil then return nil end local claims = nil if entityId then claims = mw.wikibase.getAllStatements(entityId, propertyId) end return extractWikidataIdsFromClaimList(claims) end p.getBestEntityIdsList = function(entityId, propertyId) local claims = nil if propertyId == nil then return nil end if type(entityId) == 'table' then claims = entityId:getBestStatements(propertyId) else if type(entityId) == 'number' then entityId = StringUtils._prependIfMissing({tostring(entityId), 'Q'}) end if type(propertyId) == 'number' then propertyId = StringUtils._prependIfMissing({tostring(propertyId), 'P'}) end entityId = entityId or mw.wikibase.getEntityIdForCurrentPage() if propertyId == nil or entityId == nil then return nil end claims = mw.wikibase.getBestStatements(entityId, propertyId) end if not claims then return nil end return extractWikidataIdsFromClaimList(claims) end local timestampComparator = function(p1, p2) if p1 and p2 then local q1 = p1.qualifiers local q2 = p2.qualifiers local d1 = nil local d2 = nil if q1 and q2 then if q1['P580'] and q1['P580'][1] and q1['P580'][1].datavalue then d1 = p.extractDateFromClaim(q1['P580'][1]) end if q2['P580'] and q2['P580'][1] and q2['P580'][1].datavalue then d2 = p.extractDateFromClaim(q2['P580'][1]) end if d1 and d2 then return DateUtils.compare(d1, d2) > 0 elseif d1 then return true elseif d2 then return false end elseif q1 then return true elseif q2 then return false end else if p1 then return true end if p2 then return false end end return false end p.findBestClaimsForProperty = function(entity, propertyId) if propertyId == nil then return nil end if entity == nil then entity = mw.wikibase.getEntityIdForCurrentPage() end if type(entity) == 'table' then return entity:getBestStatements(propertyId) end if type(entity) == 'number' then entity = StringUtils._prependIfMissing({tostring(entity), 'Q'}) end if entity == nil then return nil end return mw.wikibase.getBestStatements(entity, propertyId) end p.findClaimsForProperty = function(entity, propertyId) if propertyId == nil then return nil end if entity == nil then entity = mw.wikibase.getEntityIdForCurrentPage() end if type(entity) == 'table' and entity.claims then return entity.claims[propertyId] end if type(entity) == 'number' then entity = StringUtils._prependIfMissing({tostring(entity), 'Q'}) end if entity == nil then return nil end return mw.wikibase.getAllStatements(entity, propertyId) end p.findClaimsForPropertyByType = function(entity, propertyId, typeIds) local ret = {} if propertyId == nil then return nil end if entity == nil then entity = mw.wikibase.getEntityIdForCurrentPage() end local claims = {} if type(entity) == 'table' and entity.claims then claims = entity.claims[propertyId] else if type(entity) == 'number' then entity = StringUtils._prependIfMissing({tostring(entity), 'Q'}) end if entity == nil then return nil end claims = mw.wikibase.getBestStatements(entity, propertyId) end for k, v in pairs(claims) do local snak = v.mainsnak local end_date = p.findQualifierValueListForClaim(v, "P582") if #end_date == 0 and isValueSnak(snak) and snak.datavalue.type == "wikibase-entityid" then value = snak.datavalue.value.id if p.isA(value, typeIds) then table.insert(ret, v) end end end return ret end p.getClaimsForPropertyByType = function(frame) local args = getArgs(frame) local propertyID, entityID, typeId local raw = false local ret = {} propertyID, entityID = propAndEntity(args[1] or '', args[2] or '') typeId = {args[3]} if args['raw'] then raw = true end local entity = nil if entityID ~= "" then entity = mw.wikibase.getEntityObject(entityID) end if entity == nil then entity = mw.wikibase.getEntityObject() end if entity == nil then return "" end local claims = p.findClaimsForPropertyByType(entity, propertyID, typeId) if not claims then return "" end for _,eachClaim in ipairs(claims) do if hasValueSnak(eachClaim) then if raw then table.insert(ret, printRawValue(eachClaim.mainsnak)) else table.insert(ret, snakToString(eachClaim.mainsnak)) end end end return table.concat(ret, ", ") end p.findSortedClaimsForProperty = function(entity, propertyId) local rawClaims = p.findClaimsForProperty(entity, propertyId) if rawClaims == nil then return {} end table.sort(rawClaims, timestampComparator) return rawClaims end p.findQualifierValueListForClaim = function(claim, qualifierId) if claim == nil or claim.qualifiers == nil or qualifierId == nil then return {} end local quals = {} local wikidataQualifiers = claim.qualifiers[qualifierId] if wikidataQualifiers then for qualK, qualV in pairs(wikidataQualifiers) do if isValueSnak(qualV) then table.insert(quals, snakToString(qualV)) end end end return quals end p.getQualifierValue = function(frame) local propertyID = mw.text.trim(frame.args[1] or "") local qualifierID = mw.text.trim(frame.args[2] or "") local entity = mw.wikibase.getEntity() if entity and entity.claims ~= nil and entity.claims[propertyID] ~= nil then local out = {} for k, v in pairs(entity.claims[propertyID]) do if v.qualifiers and v.qualifiers[qualifierID] then for k2, v2 in pairs(v.qualifiers[qualifierID]) do if isValueSnak(v2) == 'value' then table.insert(out, snakToString(v2)) end end end end return table.concat(out, ", ") else return "" end end -- This is used to get a value like 'male' (for property p21) which won't be linked and numbers without the thousand separators p.getRawValue = function(frame) local propertyID = mw.text.trim(frame.args[1] or "") local input_parm = mw.text.trim(frame.args[2] or "") local entity = mw.wikibase.getEntityObject() local claims = nil if entity and entity.claims then claims = entity.claims[propertyID] end if claims then local result = entity:formatPropertyValues(propertyID, mw.wikibase.entity.claimRanks).value -- if number type: remove thousand separators if (hasValueSnak(claims[1]) and claims[1].mainsnak.datavalue.type == "quantity") then result = mw.ustring.gsub(result, "(%d),(%d)", "%1%2") end return result else return "" end end p.getRawQualifierValue = function(frame) local propertyID = mw.text.trim(frame.args[1] or "") local qualifierID = mw.text.trim(frame.args[2] or "") local input_parm = mw.text.trim(frame.args[3] or "") if input_parm == "FETCH_WIKIDATA" then local entity = mw.wikibase.getEntity() if entity.claims[propertyID] ~= nil then local out = {} for k, v in pairs(entity.claims[propertyID]) do for k2, v2 in pairs(v.qualifiers[qualifierID]) do if isValueSnak(v2) then if v2.datavalue.value["numeric-id"] then out[#out + 1] = mw.wikibase.label("Q" .. v2.datavalue.value["numeric-id"]) else out[#out + 1] = v2.datavalue.value end end end end local ret = table.concat(out, ", ") return string.upper(string.sub(ret, 1, 1)) .. string.sub(ret, 2) else return "" end else return input_parm end end p.extractDateFromClaim = function(claimOrSnak) local claim if claimOrSnak.mainsnak then claim = claimOrSnak.mainsnak else claim = claimOrSnak end if claim.datatype == 'time' and isValueSnak(claim) then local d = {} local iSOTimeSign = mw.ustring.sub(claim.datavalue.value.time, 1, 1) d.precision = tonumber(claim.datavalue.value.precision) d.calendarmodel = claim.datavalue.value.calendarmodel wdDate = DateUtils.parseWikidataDate(claim.datavalue.value.time, d.precision) if wdDate ~= nil then d.month = wdDate.month d.day = wdDate.day else d.month = 1 d.day = 1 end if d.precision <= 9 then d.year = tonumber(mw.ustring.match(claim.datavalue.value.time, "%d+")) if iSOTimeSign == '-' then d.year = -d.year end elseif wdDate ~= nil then d.year = wdDate.year else d.year = 1 end d.claim = claimOrSnak return d end return nil end p.findDateValues = function(propertyId, entityId) entityId = entityId or mw.wikibase.getEntityIdForCurrentPage() if entityId then local bestclaims = mw.wikibase.getBestStatements(entityId, propertyId) local bestdates = {} if bestclaims then for k, v in pairs(bestclaims) do if hasValueSnak(v) and v.mainsnak.datatype == 'time' then local d = p.extractDateFromClaim(v) table.insert(bestdates, d) elseif hasValueSnak(v) then local d = {} d.claim = v table.insert(bestdates, d) end end end return bestdates end end -- This is used to get a date value for date_of_birth (p569), etc. which won't be linked -- consolidate by testing if entity.claims[propertyID].mainsnak.datavalue.type is "time" -- Dates are stored as 28 characters if the year >99 -- e.g. +00000002014-01-01T00:00:00Z for 2014 -- Dates are stored as 26 characters if the year =<99 -- e.g. +000000050-01-01T00:00:00Z for 50 CE p.getDateValue = function(frame) local args = getArgs(frame, { frameOnly = true }) local propertyId = args[1] local entityId = args[2] or mw.wikibase.getEntityIdForCurrentPage() if entityId then local claims = mw.wikibase.getAllStatements(entityId, propertyId) local out = {} if claims then for _,eachClaim in pairs(claims) do if hasValueSnak(eachClaim) then local extractedDate = p.extractDateFromClaim(eachClaim) table.insert(out, GregorianDate.displayDualDateIfInInterval(extractedDate, true)) end end end return table.concat(out, ", ") else return "" end end p.getQualifierDateValue = function(frame) local propertyID = mw.text.trim(frame.args[1] or "") local qualifierID = mw.text.trim(frame.args[2] or "") local input_parm = mw.text.trim(frame.args[3] or "") local date_format = mw.text.trim(frame.args[4] or "dmy") if input_parm == "FETCH_WIKIDATA" then local entity = mw.wikibase.getEntity() if entity.claims[propertyID] ~= nil then local out = {} local dt = {} for k, v in pairs(entity.claims[propertyID]) do for k2, v2 in pairs(v.qualifiers[qualifierID]) do if isValueSnak(v2) then local d = v2.datavalue.value.time if #d > 26 then dt.year = string.sub(d, 9, 12) dt.month = string.sub(d, 14, 15) dt.day = string.sub(d, 17, 18) else dt.year = string.sub(d, 9, 10) dt.month = string.sub(d, 12, 13) dt.day = string.sub(d, 15, 16) end if date_format == "mdy" then out[#out + 1] = os.date("%B %e, %Y", os.time(dt)) elseif date_format == "my" then out[#out + 1] = os.date("%B %Y", os.time(dt)) elseif date_format == "y" then out[#out + 1] = os.date("%Y", os.time(dt)) else out[#out + 1] = os.date("%e %B %Y", os.time(dt)) end end end end return table.concat(out, ", ") else return "" end else return input_parm end end -- returns the value of the specified qualifier for the specified preferred value of the property of the specified entity (or the current entity) p.findQualifierForPreferredPropertyValue = function(entityId, propertyId, qualifierId, separator) entityId = entityId or mw.wikibase.getEntityIdForCurrentPage() if entityId == nil then return nil end local claims = mw.wikibase.getAllStatements(entityId, propertyId) local out = {} if claims and claims[1] then for claimK, claimV in pairs(claims) do if claimV.rank == 'preferred' then local qual = claimV.qualifiers[qualifierId] if qual and qual.mainsnak then table.insert(out, snakToString(qual)) end end end end return table.concat(out, separator) end p.getQualifierForPreferredPropertyValue = function(frame) local args = getArgs(frame) local entityId = args['entityId'] or args[1] local propertyId = args['propertyId'] or args[2] local qualifierId = args['qualifierId'] or args[3] local separator = args['separator'] or args[4] or ', ' return p.findQualifierForPreferredPropertyValue(entityId, propertyId, qualifierId, separator) end -- This is used to get the TA98 (Terminologia Anatomica first edition 1998) values like 'A01.1.00.005' (property P1323) -- which are then linked to http://www.unifr.ch/ifaa/Public/EntryPage/TA98%20Tree/Entity%20TA98%20EN/01.1.00.005%20Entity%20TA98%20EN.htm -- uses the newer mw.wikibase calls instead of directly using the snaks -- formatPropertyValues returns a table with the P1323 values concatenated with ", " so we have to split them out into a table in order to construct the return string p.getTAValue = function(frame) local ent = mw.wikibase.getEntityObject() local props = ent:formatPropertyValues('P1323') local out = {} local t = {} for k, v in pairs(props) do if k == 'value' then t = mw.text.split( v, ", ") for k2, v2 in pairs(t) do out[#out + 1] = "[http://www.unifr.ch/ifaa/Public/EntryPage/TA98%20Tree/Entity%20TA98%20EN/" .. string.sub(v2, 2) .. "%20Entity%20TA98%20EN.htm " .. v2 .. "]" end end end ret = table.concat(out, "<br> ") if #ret == 0 then ret = "Invalid TA" end return ret end -- returns the page id (Q...) of the current page or nothing of the page is not connected to Wikidata p.pageId = p.getEntityId -- the "qualifiers" and "snaks" field have a respective "qualifiers-order" and "snaks-order" field -- use these as the second parameter and this function instead of the built-in "pairs" function -- to iterate over all qualifiers and snaks in the intended order. local function orderedpairs(array, order) if not order then return pairs(array) end -- return iterator function local i = 0 return function() i = i + 1 if order[i] then return order[i], array[order[i]] end end end -- precision: 0 - billion years, 1 - hundred million years, ..., 6 - millennia, 7 - century, 8 - decade, 9 - year, 10 - month, 11 - day, 12 - hour, 13 - minute, 14 - second local function normalizeDate(date) date = mw.text.trim(date, "+") -- extract year local yearstr = mw.ustring.match(date, "^\-?%d+") local year = tonumber(yearstr) -- remove leading zeros of year return year .. mw.ustring.sub(date, #yearstr + 1), year end function formatDate(indate, precision, timezone) precision = precision or 11 date, year = normalizeDate(indate) if year == 0 and precision <= 9 then return "" end -- precision is 10000 years or more if precision <= 5 then local factor = 10 ^ ((5 - precision) + 4) local y2 = math.ceil(math.abs(year) / factor) local relative = mw.ustring.gsub(i18n.datetime[precision], "$1", tostring(y2)) if year < 0 then relative = mw.ustring.gsub(i18n.datetime.beforenow, "$1", relative) else relative = mw.ustring.gsub(i18n.datetime.afternow, "$1", relative) end return relative end -- precision is decades, centuries and millennia local era if precision == 6 then era = mw.ustring.gsub(i18n.datetime[6], "$1", tostring(math.floor((math.abs(year) - 1) / 1000) + 1)) end if era then if year < 0 then era = mw.ustring.gsub(mw.ustring.gsub(i18n.datetime.bc, '"', ""), "$1", era) elseif year > 0 then era = mw.ustring.gsub(mw.ustring.gsub(i18n.datetime.ad, '"', ""), "$1", era) end return era end if precision >= 7 then return DateUtils.formatDate(DateUtils.parseWikidataDate(indate, precision)) end end local function printDatavalueEntity(data, parameter) -- data fields: entity-type [string], numeric-id [int, Wikidata id] local id = "Q" .. data["numeric-id"] if parameter then if parameter == "link" then return "[[" .. (mw.wikibase.sitelink(id) or (":d:" .. id)) .. "|" .. (mw.wikibase.label(id) or id) .. "]]" else return data[parameter] end else if data["entity-type"] == "item" then return mw.wikibase.label("Q" .. data["numeric-id"]) or id else printError("unknown-entity-type") end end end local function printDatavalueTime(data, parameter) -- data fields: time [ISO 8601 time], timezone [int in minutes], before [int], after [int], precision [int], calendarmodel [wikidata URI] -- precision: 0 - billion years, 1 - hundred million years, ..., 6 - millennia, 7 - century, 8 - decade, 9 - year, 10 - month, 11 - day, 12 - hour, 13 - minute, 14 - second -- calendarmodel: e.g. http://www.wikidata.org/entity/Q1985727 for the proleptic Gregorian calendar or http://www.wikidata.org/wiki/Q11184 for the Julian calendar] if parameter then if parameter == "calendarmodel" then data.calendarmodel = mw.ustring.match(data.calendarmodel, "Q%d+") -- extract entity id from the calendar model URI elseif parameter == "time" then data.time = normalizeDate(data.time) end return data[parameter] else return formatDate(data.time, data.precision, data.timezone) end end function findClaims(entity, property) if not property or not entity or not entity.claims then return end if mw.ustring.match(property, "^P%d+$") then -- if the property is given by an id (P..) access the claim list by this id return entity.claims[property] else property = mw.wikibase.resolvePropertyId(property) if not property then return end return entity.claims[property] end end function getSnakValue(snak, parameter) -- snaks have three types: "novalue" for null/nil, "somevalue" for not null/not nil, or "value" for actual data if snak.snaktype == "novalue" then return i18n["novalue"] elseif snak.snaktype == "somevalue" then return i18n["somevalue"] elseif snak.snaktype ~= "value" then return nil, printError("unknown-snak-type") end -- call the respective snak parser if snak.datavalue.type == "string" then return snak.datavalue.value elseif snak.datavalue.type == "globecoordinate" then return printDatavalueCoordinate(snak.datavalue.value, parameter) elseif snak.datavalue.type == "quantity" then return printDatavalueQuantity(snak.datavalue.value, parameter) elseif snak.datavalue.type == "time" then return printDatavalueTime(snak.datavalue.value, parameter) elseif snak.datavalue.type == "wikibase-entityid" then return printDatavalueEntity(snak.datavalue.value, parameter) elseif snak.datavalue.type == "monolingualtext" then return printDatavalueMonolingualText(snak.datavalue.value, parameter) else return nil, printError("unknown-datavalue-type") end end function getQualifierSnak(claim, qualifierId) -- a "snak" is Wikidata terminology for a typed key/value pair -- a claim consists of a main snak holding the main information of this claim, -- as well as a list of attribute snaks and a list of references snaks if qualifierId then -- search the attribute snak with the given qualifier as key if claim.qualifiers then local qualifier = claim.qualifiers[qualifierId] if qualifier then return qualifier[1] end end return nil, printError("qualifier-not-found") else -- otherwise return the main snak return claim.mainsnak end end function getValueOfClaim(claim, qualifierId, parameter) local error local snak snak, error = getQualifierSnak(claim, qualifierId) if snak then return getSnakValue(snak, parameter) else return nil, error end end function p.claim(frame) local property = frame.args[1] or "" local id = frame.args["id"] -- "id" must be nil, as access to other Wikidata objects is disabled in Mediawiki configuration local qualifierId = frame.args["qualifier"] local parameter = frame.args["parameter"] local list = frame.args["list"] local references = frame.args["references"] local showerrors = frame.args["showerrors"] local default = frame.args["default"] if default then showerrors = nil end -- get wikidata entity local entity = mw.wikibase.getEntityObject(id) if not entity then if showerrors then return printError("entity-not-found") else return default end end -- fetch the first claim of satisfying the given property local claims = findClaims(entity, property) if not claims or not claims[1] then if showerrors then return printError("property-not-found") else return default end end -- get initial sort indices local sortindices = {} for idx in pairs(claims) do sortindices[#sortindices + 1] = idx end -- sort by claim rank local comparator = function(a, b) local rankmap = { deprecated = 2, normal = 1, preferred = 0 } local ranka = rankmap[claims[a].rank or "normal"] .. string.format("%08d", a) local rankb = rankmap[claims[b].rank or "normal"] .. string.format("%08d", b) return ranka < rankb end table.sort(sortindices, comparator) local result local error if list then local value -- iterate over all elements and return their value (if existing) result = {} for idx in pairs(claims) do local claim = claims[sortindices[idx]] value, error = getValueOfClaim(claim, qualifierId, parameter) if not value and showerrors then value = error end if value and references then value = value .. p.outputReferences(claim) end result[#result + 1] = value end result = table.concat(result, list) else -- return first element local claim = claims[sortindices[1]] result, error = getValueOfClaim(claim, qualifierId, parameter) if result and references then result = result .. p.outputReferences(claim) end end if result then return result else if showerrors then return error else return default end end end p.getPreferredValue = function(frame) local args = getArgs(frame) local propertyID = args[1] or args['propertyId'] or args['pid'] local entityID = args[2] or args['entityId'] or args['qid'] or mw.wikibase.getEntityIdForCurrentPage() if entityID == nil or propertyID == nil then return nil end local claims = mw.wikibase.getAllStatements(entityID, propertyID) if claims then -- if wiki-linked value output as link if possible if hasValueSnak(claims[1]) then local out = {} for k, v in pairs(claims) do if (v.rank == 'preferred') then local snakText = snakToString(v.mainsnak) .. p.outputReferences(v) if snakText ~= "" then out[#out + 1] = snakText end end end return table.concat(out, ", ") end else return "" end return "" end -- look into entity object function p.ViewSomething(frame) local data = mw.wikibase.getEntityObject() if not data then return nil end local f = frame.args[1] and frame or frame:getParent() local i = 1 while true do local index = f.args[i] if not index then return tostring(data) end data = data[index] or data[tonumber(index)] if not data then return end i = i + 1 end end function p.Dump(frame) local data = mw.wikibase.getEntityObject() if not data then return i18n.warnDump end local f = frame.args[1] and frame or frame:getParent() local i = 1 while true do local index = f.args[i] if not index then return "<pre>"..mw.dumpObject(data).."</pre>".. i18n.warnDump end data = data[index] or data[tonumber(index)] if not data then return i18n.warnDump end i = i + 1 end end -- Returnează o singură valoare din cele cu rangul cel mai înalt cu referințele corespunzătoare pentru o proprietate specificată -- De apelat din alte module function p.findOneValue(propertyID, entity) local entityId = nil if type(entity) == 'table' then entityId = entity.id elseif type(entity) == 'number' then entityId = StringUtils._prependIfMissing({tostring(entity), 'Q'}) elseif type(entity) == 'string' then entityId = entity end entityId = entityId or mw.wikibase.getEntityIdForCurrentPage() if not entityId then return nil end local claims = mw.wikibase.getBestStatements(entityId, propertyID) if claims and 0 < #claims then for _,eachClaim in ipairs(claims) do if hasValueSnak(eachClaim) then return snakToString(eachClaim.mainsnak) .. p.outputReferences(eachClaim) end end end return nil end -- Returnează o singură valoare din cele cu rangul cel mai înalt pentru o proprietate specificată -- De apelat din alte module function p.findOneValueNoRef(propertyID, entity) local claims = nil if type(entity) == 'table' then claims = entity:getBestStatements(propertyID) else if type(entity) == 'number' then entity = 'Q' .. tostring(entity) end entity = entity or mw.wikibase.getEntityIdForCurrentPage() if not entity then return nil end claims = mw.wikibase.getBestStatements(entity, propertyID) end if claims and 0 < #claims then for _,eachClaim in ipairs(claims) do if hasValueSnak(eachClaim) then return snakToString(eachClaim.mainsnak) end end end return nil end -- Returnează o singură valoare din cele cu rangul cel mai înalt pentru o proprietate specificată -- De apelat din formate p.getOneValueNoRef = function(frame) local propertyID, entityID propertyID, entityID = propAndEntity(frame.args[1], frame.args[2]) local entity = nil if entityID ~= "" then entity = mw.wikibase.getEntityObject(entityID) end if entity == nil then entity = mw.wikibase.getEntityObject() end if entity == nil then return nil end return p.findOneValueNoRef(propertyID, entity) end -- Returnează o singură valoare din cele cu rangul cel mai înalt și cu referințele corespunzătoare pentru o proprietate specificată -- De apelat din formate p.getOneValue = function(frame) local args = getArgs(frame) local propertyID, entityID propertyID, entityID = propAndEntity(args[1], args[2]) local entity = nil if entityID ~= "" then entity = mw.wikibase.getEntityObject(entityID) end if entity == nil then entity = mw.wikibase.getEntityObject() end if entity == nil then return nil end return p.findOneValue(propertyID, entity) end local function findLatestQualifierValueForOnePropertyOfAnEntity(entity, propertyId, qualifierId) if entity == nil then entity = mw.wikibase.getEntityObject() end if entity == nil then return '' end local claims = entity:getBestStatements(propertyId) if claims then if claims[1] then if claims[1].qualifiers then if claims[1].qualifiers[qualifierId] then local allQualifiers = {} for qk, qv in pairs(claims[1].qualifiers[qualifierId]) do table.insert(allQualifiers, qv) end local qIndex = 1 local maxQTime = nil while maxQTime == nil and qIndex <= #allQualifiers do if allQualifiers[qIndex].datatype == 'time' then maxQTime = allQualifiers[qIndex] end qIndex = qIndex + 1 end if maxQTime ~= nil then for i=qIndex,#allQualifiers do local msCrtQTime = tonumber(mw.language.new(lang.code):formatDate('U', allQualifiers[i].datavalue.value.time, nil)) local msMaxQTime = tonumber(mw.language.new(lang.code):formatDate('U', maxQTime.datavalue.value.time, nil)) if msCrtQTime > msMaxQTime then maxQTime = allQualifiers[i] end end if isValueSnak(maxQTime) then return formatDate(maxQTime.datavalue.value.time, maxQTime.datavalue.value.precision, maxQTime.datavalue.value.timezone) end end return "" else return "" end else return "" end else return "" end else return "" end end -- Returnează valoarea cea mai recentă a qualifierului specificat pentru proprietea specificată a entității curente -- De apelat din alte module p.getLatestQualifierDateValueForOneProperty = function(frame) local propertyId = mw.text.trim(frame.args[1] or "") local qualifierId = mw.text.trim(frame.args[2] or "") local entity = mw.wikibase.getEntityObject() return findLatestQualifierValueForOnePropertyOfAnEntity(entity, propertyId, qualifierId) end -- Returnează valoarea cea mai recentă a qualifierului specificat pentru proprietea specificată a entității curente -- De apelat din formate p.findLatestQualifierDateValueForOneProperty = function(propertyId, qualifierId) local entity = mw.wikibase.getEntityObject() return entity ~= nil and findLatestQualifierValueForOnePropertyOfAnEntity(entity, propertyId, qualifierId) or '' end -- Returnează un text ce conține referința pentru o proprietate; de apelat din formate p.getReferenceForOneProperty = function(frame) local entity = mw.wikibase.getEntityObject() local propertyId = mw.text.trim(frame.args[1]) local claims = entity:getBestStatements(propertyId) return p.outputReferences(claims[1]) end -- Returnează o listă cu obiecte value asociate unei proprietăți a unei entități -- Creată pentru a obține lista de coordonate a unui oraș în formă pură (listă cu obiectele value asociate) -- Funcționează pentru: coordonate -- TODO - de extins la mai multe tipuri de date, de exemplu texte multilingve, date calendaristice, itemuri wikibase p.findDataValueObjects = function(entityId, propertyId) if propertyId == nil then return {} end entityId = entityId or mw.wikibase.getEntityIdForCurrentPage() if entityId == nil then return {} end local ret = {} local claims = mw.wikibase.getAllStatements(entityId, propertyId) if claims == nil then return ret end for claimIdx = 1, #claims do local snak = claims[claimIdx].mainsnak if isValueSnak(snak) then if snak.datatype == 'globe-coordinate' then table.insert(ret, snak.datavalue.value) end end end return ret end p.findRoLabel = function(entityId) entityId = entityId or mw.wikibase.getEntityIdForCurrentPage() if entityId then return mw.wikibase.getLabelByLang(entityId, lang.code) end return nil end p.getRoLabel = function(frame) local args = getArgs(frame) return p.findRoLabel(args[1]) end -- Returnează labelul unei entități în limba specificată; dacă nu se găsește, atunci se încearcă în limba wikiului și apoi în limba engleză p.findLabel = function(entityId, languageCode, default) local entity, ret if entityId == nil then entityId = mw.wikibase.getEntityIdForCurrentPage() if not entityId then return default or '' end end if type(entityId) == 'number' then entityId = 'Q' .. tostring(entityId) end if type(entityId) == 'string' then if languageCode then ret = mw.wikibase.getLabelByLang(entityId, languageCode) end if not ret then ret = mw.wikibase.getLabel(entityId) end return ret or default or mw.wikibase.getLabelByLang(entityId, 'en') or entityId end if type(entityId) == 'table' then local entity = entityId if not languageCode or languageCode == '' then languageCode = lang.code end ret = entity:getLabel(languageCode) or entity:getLabel(lang.code) or default or entity:getLabel('en') return ret end return default or '' end p.getLabel = function(frame) local args = getArgs(frame, {frameOnly=true}) local entityId = args[1] local languageCode = args[2] or lang.code local default = args['default'] return p.findLabel(entityId, languageCode, default) end function formatCoordinates(entityId) entityId = entityId or mw.wikibase.getEntityIdForCurrentPage() if entityId == nil then return '' end local coordClaims = mw.wikibase.getAllStatements(entityId, 'P625') local formattedCoordsList = {} if coordClaims and coordClaims[1] then for coordIdx=1,#coordClaims do if coordClaims[coordIdx].mainsnak.datatype == 'globe-coordinate' then local latDir = coordClaims[coordIdx].mainsnak.datavalue.value.latitude < 0 and 'S' or 'N' local lonDir = coordClaims[coordIdx].mainsnak.datavalue.value.longitude < 0 and 'V' or 'E' local coordsText = mw.getCurrentFrame():expandTemplate{title='Coord', args={tostring(math.abs(coordClaims[coordIdx].mainsnak.datavalue.value.latitude)), latDir, tostring(math.abs(coordClaims[coordIdx].mainsnak.datavalue.value.longitude)), lonDir}} table.insert(formattedCoordsList, coordsText) end end end return table.concat(formattedCoordsList, ', ') end p.getFormattedCoordinates = function(frame) local origArgs = getArgs(frame) return formatCoordinates(origArgs[1] or origArgs['entityId']) end -- Returnează o numărul de valori cu cel mai mare rang pentru o proprietate specificată -- De apelat din alte module function p.countBestValues(propertyID, entity) if type(entity) == 'table' then entity = entity.id elseif type(entity) == 'number' then entity = 'Q' .. tostring(entity) elseif entity == nil then entity = mw.wikibase.getEntityIdForCurrentPage() if entity == nil then return 0 end end local claims = mw.wikibase.getBestStatements(entity, propertyID) local outList = {} if not claims then return 0 end return #claims end -- Returnează o singură valoare din cele cu rangul cel mai înalt cu referințele corespunzătoare pentru o proprietate specificată -- De apelat din alte module function p.findBestValues(propertyID, entity) if type(entity) == 'table' then entity = entity.id elseif type(entity) == 'number' then entity = 'Q' .. tostring(entity) end if entity == nil then entity = mw.wikibase.getEntityIdForCurrentPage() if entity == nil then return {} end end if not StringUtils._emptyToNil({propertyID}) then return nil end local claims = mw.wikibase.getBestStatements(entity, propertyID) local outList = {} if claims then for claimIdx, actualClaim in pairs(claims) do if hasValueSnak(actualClaim) then table.insert(outList, snakToString(actualClaim.mainsnak) .. p.outputReferences(actualClaim)) end end end return outList end p._getBestValuesWithSeparator = function(entity, propertyID, sep) if propertyID == nil then return '' end local valueList = p.findBestValues(propertyID, entity) return valueList and table.concat(valueList, sep) end -- Returnează o listă a valorilor cu rangul cel mai înalt și cu referințele corespunzătoare pentru o proprietate specificată -- De apelat din formate p.getBestValuesWithSeparator = function(frame) local sep = frame.args[1] if sep == nil or sep == '' then sep = ', ' end local propertyID = mw.text.trim(frame.args[2] or "") local entityID = mw.text.trim(frame.args[3] or "") local entity = nil if entityID ~= "" then entity = mw.wikibase.getEntityObject(entityID) end if entity == nil then entity = mw.wikibase.getEntityObject() end return p._getBestValuesWithSeparator(entity, propertyID, sep) end function p.findLanguageText(propertyId, langcode, entityId) -- return label of a Wikidata entity in the given language or the default language of this Wikipedia site entityId = entityId or mw.wikibase.getEntityIdForCurrentPage() if not entityId then return nil end local returnValue = nil langcode = langcode or 'crh' for eachClaimIdx, eachClaim in pairs(mw.wikibase.getAllStatements(entityId, propertyId)) do if hasValueSnak(eachClaim) and eachClaim.mainsnak.datavalue then if eachClaim.mainsnak.datavalue.type == 'monolingualtext' then if eachClaim.mainsnak.datavalue.value.language == langcode then returnValue = eachClaim.mainsnak.datavalue.value.text end elseif eachClaim.mainsnak.datavalue.type == 'string' then returnValue = eachClaim.mainsnak.datavalue.value elseif eachClaim.mainsnak.datavalue.type == 'wikibase-entityid' then returnValue = p.findLabel(eachClaim.mainsnak.datavalue.value.id, langcode) end end end return returnValue end function p.getLanguageText(frame) return p.findLanguageText(frame.args[1], frame.args[2] or 'crh', frame.args[3]) or '' end function p.findBestValuesForLocalLanguage(propertyId, entityId) entityId = entityId or mw.wikibase.getEntityIdForCurrentPage() if not entityId then return nil end local bestValues = {} local bestRank = nil for eachClaimIdx, eachClaim in pairs(mw.wikibase.getAllStatements(entityId, propertyId)) do if (hasValueSnak(eachClaim) and eachClaim.qualifiers and eachClaim.qualifiers['P407'] and 0 < #(eachClaim.qualifiers['P407'])) then if hasBetterRank(eachClaim, bestRank) then for _,eachLangQual in ipairs(eachClaim.qualifiers['P655']) do if isValueSnak(eachLangQual) and eachLangQual.datavalue.value.id == 'Q7913' then bestRank = eachLangQual.rank if not bestRank or mw.wikibase.entity.claimRanks['RANK_' .. mw.ustring.upper(eachClaim.rank)] > mw.wikibase.entity.claimRanks['RANK_' .. mw.ustring.upper(bestRank)] then bestValues = {} end table.insert(bestValues, snakToString(eachClaim.mainsnak)) end end end end end return bestValues end function p.getBestValuesForLocalLanguageWithSeparator(frame) return table.concat(p.findBestValuesForLocalLanguage(frame.args[2], frame.args[3]) or {}, frame.args[1]) end p.findShortestAlias = function(entityId) return p.findLinkToItem(entityId, false, false, true) end p.findImageAndCaption = function(entityId) local wikidataImages = p.findBestClaimsForProperty(entityId, 'P2716') if not wikidataImages or #wikidataImages == 0 then wikidataImages = p.findBestClaimsForProperty(entityId, 'P18') end local imageName, imageCaption if wikidataImages and #wikidataImages > 0 then local wikidataImage = wikidataImages[1] if hasValueSnak(wikidataImage) and wikidataImage.mainsnak.datavalue then imageName = wikidataImage.mainsnak.datavalue.value local roDescr = '' if wikidataImage.qualifiers and wikidataImage.qualifiers['P2096'] then for _,eachImageDescrLangString in pairs(wikidataImage.qualifiers['P2096']) do if isValueSnak(eachImageDescrLangString) and eachImageDescrLangString.datavalue and eachImageDescrLangString.datavalue.value.language == 'crh' then roDescr = eachImageDescrLangString.datavalue.value.text or roDescr end end end imageCaption = roDescr end end return imageName, imageCaption end p.findLinkToWikidataItem = function(itemId, prefix) libraryUtil.checkType('findLinkToWikidataItem', 2, prefix, 'string', false) local qId = StringUtils._prependIfMissing({itemId, prefix}) local itemLabel = p.findLabel(qId) return '[[:d:' .. (prefix == 'P' and 'Property:' or '') .. qId .. '|' .. (itemLabel or '') .. ' ' .. tostring(mw.html.create('small'):wikitext('(' .. qId .. ')')) .. ']]' end p.getLinkToWikidataItem = function(frame) local args = getArgs(frame) local prefix = args['prefix'] or 'Q' if not args[1] then return "''id de " .. (prefix == 'P' and 'proprietate' or 'item') .. " Wikidata nespecificat''" end return p.findLinkToWikidataItem(args[1], prefix) end p.formatExternalLink = function(pId, qId, text) local formatterUrl = p.findOneValueNoRef('P1630', pId) or '$1' local urlComponent = text or p.findOneValueNoRef(pId, qId) if not urlComponent then return nil end local formattedLink = mw.ustring.gsub(formatterUrl, '%$1', text or urlComponent) return formattedLink end p.getFormattedExternalLink = function(frame) local args = getArgs(frame) local pId = args['pid'] or args[1] local qId = args['qid'] or args[2] local text = args['text'] return p.formatExternalLink(pId, qId, text) end p.isFemale = function(qId) local entityId = qId or mw.wikibase.getEntityIdForCurrentPage() if not entityId then return false end local genders = mw.wikibase.getBestStatements(entityId, 'P21') local feminineIds = { 6581072, 1052281, 43445 } if genders then for genderIdx,eachGender in ipairs(genders) do if hasValueSnak(eachGender) then for _,eachFemId in ipairs(feminineIds) do if eachFemId == eachGender.mainsnak.datavalue.value['numeric-id'] then return true end end end end end return false end p.findClaimForTimestamp = function(entityId, propertyId, timestamp, lang) local propClaims = p.findSortedClaimsForProperty(entityId, propertyId) local bestClaim = nil if propClaims then for _,eachPropClaim in ipairs(propClaims) do if hasValueSnak(eachPropClaim) and isClaimTrue(eachPropClaim) then if eachPropClaim.mainsnak.datavalue.type ~= 'monolingualtext' or StringUtils._substringBefore({eachPropClaim.mainsnak.datavalue.value.language, '-'}) == StringUtils._substringBefore({lang or 'crh', '-'}) then local before = nil local after = nil if eachPropClaim.qualifiers then if eachPropClaim.qualifiers['P580'] and eachPropClaim.qualifiers['P580'][1] and isValueSnak(eachPropClaim.qualifiers['P580'][1]) then after = GregorianDate.convertToGregorianIfInInterval(DateUtils.extractDateFromWikidataSnak(eachPropClaim.qualifiers['P580'][1])) end if eachPropClaim.qualifiers['P582'] and eachPropClaim.qualifiers['P582'][1] and isValueSnak(eachPropClaim.qualifiers['P582'][1]) then before = GregorianDate.convertToGregorianIfInInterval(DateUtils.extractDateFromWikidataSnak(eachPropClaim.qualifiers['P582'][1])) end end if timestamp then --if before and DateUtils.compare(timestamp, before) > 0 then --the claim list is sorted by before -- break --else if after == nil and before and DateUtils.compare(timestamp, before) < 0 then return eachPropClaim elseif after and before and DateUtils.compare(timestamp, before) < 0 and DateUtils.compare(timestamp, after) > 0 then return eachPropClaim elseif after and before == nil and DateUtils.compare(timestamp, after) > 0 then return eachPropClaim end --end end if not before then if not bestClaim and hasBetterRank(eachPropClaim, 'normal') or (bestClaim and hasBetterRank(eachPropClaim, bestClaim.rank)) then bestClaim = eachPropClaim end end end end end end if bestClaim then return bestClaim else return nil end end p.formatOnlineLink = function(linkProp, entityId) local linkId = p.findOneValueNoRef(linkProp, entityId) if linkId then local linkFormatter = p.findOneValueNoRef('P1630', linkProp) or '$1' if linkFormatter then linkId = mw.ustring.gsub(linkId, '%%', '%%%%') local link = mw.ustring.gsub(linkFormatter, '$1', linkId) return link end end return nil end p.getFormattedOnlineLink = function(frame) local args = getArgs(frame) return p.formatOnlineLink(args[1], args[2] or mw.wikibase.getEntityIdForCurrentPage()) end p.findOnlineLinks = function(onlinelinksprops, entityId, extraProps) local onlinelinks = {} local onlinelinksprops = onlinelinksprops and #onlinelinksprops > 0 and onlinelinksprops or {'P856', 'P1581', 'P2013', 'P2002', 'P2847', 'P345', 'P3265', 'P3579', 'P3435', 'P2003', 'P2471', 'P2397', 'P953', 'P1065', 'P4173', 'P4431', 'P1968', 'P6634', 'P4264', 'P2572', 'P7085', 'P3789'} if extraProps and type(extraProps) == 'table' then onlinelinksprops = Set.valueUnion(onlinelinksprops, extraProps) end for _,eachOnlineLinkProp in ipairs(onlinelinksprops) do local link = p.formatOnlineLink(eachOnlineLinkProp) if link then local linkentities = p.getBestEntityIdsList(eachOnlineLinkProp, 'P1629') if linkentities and #linkentities > 0 then local linklabel = p.findLabel(StringUtils._prependIfMissing({linkentities[1], 'Q'})) table.insert(onlinelinks, '[' .. link .. ' ' .. linklabel .. ']') end end end return onlinelinks end p.getOnlineLinks = function(frame) local args = getArgs(frame) local _,entityId = propAndEntity(StringUtils._prependIfMissing({args['qid'], 'Q'})) local extraPropsStr = args['extras'] local extraProps = nil if extraPropsStr then extraProps = mw.text.split(extraPropsStr, ',', true) end local onlinelinksprops = {} local passedProps = TableTools.compressSparseArray(args) for __,eachProp in ipairs(passedProps) do if mw.ustring.match(eachProp, 'P%d+') == eachProp then table.insert(onlinelinksprops, eachProp) end end return table.concat(p.findOnlineLinks(onlinelinksprops, entityId, extraProps), tostring(mw.html.create('br'))) end p.findLanguageIndexedLabelsFromProperty = function(entityId, propertyId) local entity = nil if entityId then entityId = StringUtils._prependIfMissing({tostring(entityId), 'Q'}) else entityId = mw.wikibase.getEntityIdForCurrentPage() end local titles = {} for _,eachTitleClaim in ipairs(mw.wikibase.getAllStatements(entityId, propertyId)) do if hasValueSnak(eachTitleClaim) then titles[eachTitleClaim.mainsnak.datavalue.value.language] = eachTitleClaim.mainsnak.datavalue.value.text end end return titles end p.findTitleOfWork = function(entityId) local entity = nil if entityId then entityId = StringUtils._prependIfMissing({tostring(entityId), 'Q'}) else entityId = mw.wikibase.getEntityIdForCurrentPage() end --- this comes first just for performance reasons if entityId then local localLabel, localLang = mw.wikibase.getLabelWithLang(entityId) if localLabel and localLang == 'crh' then return localLabel end else return nil end local langs = {} for _,eachProperty in ipairs({'P364', 'P407'}) do for __,eachLangClaim in ipairs(mw.wikibase.getAllStatements(entityId, eachProperty)) do if hasValueSnak(eachLangClaim) then local langEntityId = eachLangClaim.mainsnak.datavalue.value.id if LangUtils[langEntityId] then table.insert(langs, { qid = langEntityId, code = LangUtils[langEntityId] }) elseif langEntityId then for ___,eachLangCodeClaim in ipairs(mw.wikibase.getAllStatements(langEntityId, 'P424')) do if hasValueSnak(eachLangCodeClaim) and isClaimTrue(eachLangCodeClaim) then local sanitizedLangCode = StringUtils._substringBefore({eachLangCodeClaim.mainsnak.datavalue.value, '-'}) sanitizedLangCode = StringUtils._substringBefore({sanitizedLangCode, '_'}) table.insert(langs, { qid = langEntityId, code = sanitizedLangCode} ) end end end end end end table.insert(langs, {qid = 'Q1860', code = 'en'}) local titles = p.findLanguageIndexedLabelsFromProperty(entityId, 'P1476') if titles['crh'] then return titles['crh'] end local nonLatinLangs = {} for _,eachlanguage in ipairs(langs) do local langText = nil if isWritingSystemLatn(eachlanguage.qid) then langText = wrapInLangSpan(titles[eachlanguage.code] or mw.wikibase.getLabelByLang(entityId, eachlanguage.code), eachlanguage.code) elseif Transliteration.isTransliterationSupported(eachlanguage.code) then langText = wrapInLangSpan(Transliteration.transliterate(titles[eachlanguage.code] or mw.wikibase.getLabelByLang(entityId, eachlanguage.code), eachlanguage.code), eachlanguage.code) else table.insert(nonLatinLangs, eachlanguage.code) end if langText then return langText end end for _,langCode in ipairs(nonLatinLangs) do langText = wrapInLangSpan(titles[langCode] or mw.wikibase.getLabelByLang(entityId, langCode), langCode) if langText then return langText end end return entityId end p.findTitlesOfWorksFromProperty = function(propertyId, entityId, limit) if limit == nil then limit = 10 end if entityId then entityId = StringUtils._prependIfMissing({tostring(entityId), 'Q'}) else entityId = mw.wikibase.getEntityIdForCurrentPage() end if not entityId then return nil end local ret = {} local bestWorksClaims = mw.wikibase.getBestStatements(entityId, propertyId) for workIdx = 1,math.min(limit, #bestWorksClaims) do local eachWorkClaim = bestWorksClaims[workIdx] if hasValueSnak(eachWorkClaim) then local workId = eachWorkClaim.mainsnak.datavalue.value.id table.insert(ret, computeLinkToItem(workId, true, nil, function() return p.findTitleOfWork(workId) end)) end end return ret end p.getTitleOfWorkFromPropertyWithSeparator = function(frame) local args = getArgs(frame) local sep = args[1] local propertyId, entityId = propAndEntity(args[2], args[3]) local limitStr = args['limit'] local limit = tonumber(limitStr or '10') local retListRaw = p.findTitlesOfWorksFromProperty(propertyId, entityId, limit) or {} local retList = {} for _,eachRetVal in ipairs(retListRaw) do table.insert(retList, "''" .. eachRetVal .. "''") end return table.concat(retList, sep) end p.loadOneValueInChain = function(chain) local crtChainElementId = mw.wikibase.getEntityIdForCurrentPage() local crtChainClaim = nil local crtChainSnak = nil local coordComponent = nil local raw = false local label = false local ref = false for _,eachChainRing in ipairs(chain) do if mw.ustring.match(eachChainRing, 'Q%d+') == eachChainRing then crtChainElementId = eachChainRing elseif mw.ustring.match(eachChainRing, '_P%d+') and crtChainSnak then local qualPropertyId = mw.ustring.sub(eachChainRing, 2, mw.ustring.len(eachChainRing)) if crtChainClaim.qualifiers and crtChainClaim.qualifiers[qualPropertyId] and #(crtChainClaim.qualifiers[qualPropertyId]) > 0 then local qualIdx = 1 local propertyQuals = crtChainClaim.qualifiers[qualPropertyId] while qualIdx <= #propertyQuals and not isValueSnak(propertyQuals[qualIdx]) do qualIdx = qualIdx + 1 end if qualIdx <= #propertyQuals and isValueSnak(propertyQuals[qualIdx]) then local firstValueSnakIdx = qualIdx if propertyQuals[qualIdx].datavalue.type == 'monolingualtext' then while qualIdx <= #propertyQuals and (not isValueSnak(propertyQuals[qualIdx]) or propertyQuals[qualIdx].datavalue.value.language ~= 'crh') do qualIdx = qualIdx + 1 end end crtChainSnak = qualIdx <= #propertyQuals and isValueSnak(propertyQuals[qualIdx]) and propertyQuals[qualIdx] or propertyQuals[firstValueSnakIdx] else return nil end else return nil end elseif mw.ustring.match(eachChainRing, 'P%d+') == eachChainRing then if isValueSnak(crtChainSnak) and crtChainSnak.datavalue.type == 'wikibase-entityid' then crtChainElementId = crtChainSnak.datavalue.value.id crtChainClaim = nil crtChainSnak = nil end if crtChainElementId and not crtChainSnak then local propertyClaims = mw.wikibase.getBestStatements(crtChainElementId, eachChainRing) if #propertyClaims < 1 then return nil end local claimIdx = 1 if propertyClaims[claimIdx].mainsnak.datavalue and propertyClaims[claimIdx].mainsnak.datavalue.type == 'monolingualtext' then while claimIdx <= #propertyClaims and (not hasValueSnak(propertyClaims[claimIdx]) or propertyClaims[claimIdx].mainsnak.datavalue.value.language ~= 'crh') do claimIdx = claimIdx + 1 end else while claimIdx <= #propertyClaims and not hasValueSnak(propertyClaims[claimIdx]) do claimIdx = claimIdx + 1 end end if claimIdx <= #propertyClaims and hasValueSnak(propertyClaims[claimIdx]) then crtChainClaim = propertyClaims[claimIdx] crtChainSnak = crtChainClaim.mainsnak else return nil end end elseif eachChainRing == 'lat' or eachChainRing == 'long' then coordComponent = eachChainRing .. 'itude' elseif eachChainRing == 'raw' then raw = true elseif eachChainRing == 'label' then if crtChainSnak then crtChainElementId = crtChainSnak.datavalue.value.id end crtChainClaim = nil crtChainSnak = nil label = true elseif eachChainRing == 'ref' then ref = true end end if ref and crtChainClaim then return p.outputReferences(crtChainClaim) end if crtChainSnak then if coordComponent and crtChainSnak.datavalue.value[coordComponent] then return crtChainSnak.datavalue.value[coordComponent] end return raw and printRawValue(crtChainSnak) or snakToString(crtChainSnak) end if crtChainElementId then if raw then return crtChainElementId elseif label then return p.findLabel(crtChainElementId) else return p.findLinkToItem(crtChainElementId) end end return nil end p.getOneValueInChain = function(frame) local args = getArgs(frame) return p.loadOneValueInChain(args) end local function isA(entityId, typeIds) local entityTypes = p.findClaimsForProperty(entityId, 'P31') entityId = type(entityId) == 'number' and ('Q' .. tostring(entityId)) or entityId if entityTypes then for _,eachEntityType in ipairs(entityTypes) do if isClaimTrue(eachEntityType) and hasValueSnak(eachEntityType) then if TableTools.contains(typeIds, eachEntityType.mainsnak.datavalue.value.id) then return true end local recurseSuccess, recursivelyFoundType = pcall(mw.wikibase.getReferencedEntityId, eachEntityType.mainsnak.datavalue.value.id, 'P279', typeIds) if recurseSuccess and recursivelyFoundType then return true end if not recurseSuccess then --manually recurse one level local superTypeClaims = mw.wikibase.getBestStatements(eachEntityType.mainsnak.datavalue.value.id, 'P279') if superTypeClaims then for __,eachSuperTypeClaim in ipairs(superTypeClaims) do if hasValueSnak(eachSuperTypeClaim) and TableTools.contains(typeIds, eachSuperTypeClaim.mainsnak.datavalue.value.id) then mw.logObject(eachSuperTypeClaim) return true end end end end end end end return false end p.isA = isA p.findAnniversary = function(propertyId, entityId, step) local _date = p.findDateValues(propertyId, entityId) if _date and _date[1] then -- no year 0 if _date[1].year < 0 then _date[1].year = _date[1].year + 1 end if (os.date("*t").year - _date[1].year) % step == 0 then return (os.date("*t").year - _date[1].year) end else return 0 end end p.getAnniversary = function(frame) local args = getArgs(frame) return p.findAnniversary(args[1], args[2], args[3]) end p.findLocationChain = function(entity) local q = entity or mw.wikibase.getEntityIdForCurrentPage() if not q then return nil end local countryQId = p.loadOneValueInChain({q, 'P17', 'raw'}) local adminUnitQId = p.loadOneValueInChain({q, 'P131', 'raw'}) if not adminUnitQId or adminUnitQId == countryQId then return p.findLinkToItem(countryQId, true, false, false) end return p.findLinkToItem(adminUnitQId, true, false, false) .. ', ' .. p.findLocationChain(adminUnitQId) end p.getLocationChain = function(frame) local args = getArgs(frame) return p.findLocationChain(args.q) end p.findAddress = function(qId) local q = qId or mw.wikibase.getEntityIdForCurrentPage() if not q then return nil,nil end p159claims = p.findBestClaimsForProperty(q, 'P159') addrs = {} if p159claims then for _,eachP159claim in ipairs(p159claims) do if hasValueSnak(eachP159claim) then local addrParts = { p.printSnak(eachP159claim.mainsnak) } if eachP159claim.qualifiers then for __,qual in ipairs({'P6375', 'P669', 'P670', 'P281', 'P17'}) do if eachP159claim.qualifiers[qual] then for ___,eachP159ClaimQual in ipairs(eachP159claim.qualifiers[qual]) do if isValueSnak(eachP159ClaimQual) then table.insert(addrParts, p.printSnak(eachP159ClaimQual)) end end end end end table.insert(addrs, table.concat(addrParts, ', ')) end end end if #addrs > 0 then return table.concat(addrs, tostring(mw.html.create('br'))), 'P159' end p6375 = p.findOneValue('P6375', q) if p6375 then return p6375, 'P6375' end p669claims = p.findBestClaimsForProperty(q, 'P669') local addrs = {} if p669claims then for _,eachP669Claim in ipairs(p669claims) do if hasValueSnak(eachP669Claim) then local thisAddr = p.printSnak(eachP669Claim.mainsnak) if eachP669Claim.qualifiers and eachP669Claim.qualifiers['P670'] then local streetNumbers = {} for __,eachP669ClaimP670Qual in ipairs(eachP669Claim.qualifiers['P670']) do if isValueSnak(eachP669ClaimP670Qual) then table.insert(streetNumbers, eachP669ClaimP670Qual.datavalue.value) end end if #streetNumbers > 0 then thisAddr = thisAddr .. ' nr. ' .. table.concat(streetNumbers, ', ') end end table.insert(addrs, thisAddr) end end end if #addrs > 0 then table.insert(addrs, 1, p.findLocationChain(q)) return table.concat(addrs, '; ') end local p2795text = p.loadOneValueInChain({'P2795'}) if p2795text then return p2795text end return nil end p.getAddress = function(frame) local args = getArgs(frame) local addr, srcProp = p.findAddress(args[1]) return addr end p.hasValueSnak = hasValueSnak return p qba0te0jdm0em085oq8ejccz37q7lcd 244204 244199 2026-06-09T09:55:04Z Хтосьці 13041 yoq ettim (çünki Wikidata-ro kiril elifbesinen yahşı işlemey; [[Vikipediya:Meydan#-{Module:Wikidata-ro}- yerinde -{Module:Wikidata}- qullanmaq isteyim]] baqıñız) 244204 Scribunto text/plain -- Mında romen Vikipediyasındaki [[ro:Module:Wikidata]]-nıñ kopiyası edi -- Lâkin romen Vikipediyadan Wikidata modulleri kiril elifbesinen işlemey -- Lütfen, onıñ yerinde [[Modul:Wikidata]] ve [[Şablon:Wikidata]] qullanıñız os0aicq983d6ocjspkdz6e06r96x8bw Şablon:Date înlănțuite de la Wikidata 10 44669 244191 183643 2026-06-09T09:08:29Z Хтосьці 13041 yoq ettim (çünki Wikidata-ro kiril elifbesinen yahşı işlemey; [[Vikipediya:Meydan#-{Module:Wikidata-ro}- yerinde -{Module:Wikidata}- qullanmaq isteyim]] baqıñız) 244191 wikitext text/x-wiki {{delete|Modul:Wikidata-ro qullanmaq kerek degil, çünki o kiril elifbesinen yahşı işlemey. Lütfen, -{[[Modul:Wikidata]]}- ve -{[[Şablon:Wikidata]]}- qullana. Eger meseleler olsa, maña ([[Qullanıcı:Хтосьці|-{crh-cyrl: Хтосьці; crh-latn: Chtości}-]] ([[Qullanıcı muzakeresi:Хтосьці|muzakere]])) yazıñız.}} 6ly5g5vatkaopalj6h4ex7p6wmh0jht Modul muzakeresi:Wikidata-ro 829 59966 244207 243113 2026-06-09T09:57:00Z Хтосьці 13041 /* Bu modul aqiqaten kirekmi? */ Cevap 244207 wikitext text/x-wiki == Bu modul aqiqaten kirekmi? == Ne içün bizim 2 modulimiz bar, -{[[Modul:Wikidata]]}- ve -{[[Modul:Wikidata-ro]]}-? Birleştirmege mümkünmi? -{[[Modul:Wikidata]]}- modulinde qarsı funktsiya yoq? [[Qullanıcı:Хтосьці|-{crh-cyrl: Хтосьці; crh-latn: Chtości}-]] ([[Qullanıcı muzakeresi:Хтосьці|muzakere]]) 17:37, 2026 s. martnıñ 25 (UTC) :-{[[Modul:Wikidata-ro]]}- yoq ettim, onıñ yerinde -{[[Modul:Wikidata]]}- qullandım. Eger meseleler olsa, maña yazıñız. [[Qullanıcı:Хтосьці|-{crh-cyrl: Хтосьці; crh-latn: Chtości}-]] ([[Qullanıcı muzakeresi:Хтосьці|muzakere]]) 09:57, 2026 s. iyünniñ 9 (UTC) ne77bs6z0pj5n2v38jlr726pu6vgpmy Антуан де Сен-Экзюпери 0 60300 244174 2026-06-08T12:36:28Z HıyarAşa 75992 “[[:en:Special:Redirect/revision/1357797151|Antoine de Saint-Exupéry]]” saifesi tercime etilip yaratıldı. 244174 wikitext text/x-wiki  Antuan Mari Jan-Batist Roje de Sent-Ekzüperi (фр. Antoine Marie Jean-Baptiste Roger vicomte de Saint-Exupéry; 1900 iyün 29, Lion, Frenkistan — 1944 iyül 31, Aq deñiz) — fransız yazıcısı, şairi, jurnalisti ve uçucısıdır. O, hususan «Kiçik Prins» adlı eserinen bellidir. [[Kategoriya:1944 senesinde ölgenler]] [[Kategoriya:1900 senesinde doğğanlar]] h1dmkdc3jhyix63fnlmu3bz7bohiku8 244178 244174 2026-06-08T13:03:50Z Хтосьці 13041 bizim elifbeni çevilenüvimiz bar ( https://crh.wikipedia.org/w/index.php?title=Antuan_de_Sent-Ekz%C3%BCperi&variant=crh-cyrl ), eki versiyanı yapmağa kerek degil 244178 wikitext text/x-wiki #REDIRECT [[Antuan de Sent-Ekzüperi]] {{Delete|bizim elifbeni çevilenüvimiz bar, eki versiyanı yapmağa kerek degil}} muaxy7hxc4josn7jmii9v231hcybdlr Antuan de Sent-Ekzüperi 0 60301 244175 2026-06-08T12:39:29Z HıyarAşa 75992 “[[:en:Special:Redirect/revision/1357797151|Antoine de Saint-Exupéry]]” saifesi tercime etilip yaratıldı. 244175 wikitext text/x-wiki  Antuan Mari Jan-Batist Roje de Sent-Ekzüperi (фр. Antoine Marie Jean-Baptiste Roger vicomte de Saint-Exupéry; 1900 iyün 29, Lion, Frenkistan — 1944 iyül 31, Aq deñiz) — fransız yazıcısı, şairi, jurnalisti ve uçucısıdır. O, hususan «Kiçik Prins» adlı eserinen bellidir. * Works by Antoine de Saint-Exupéry at Faded Page (Canada) * [https://web.archive.org/web/20020424095318/http://antoinedesaintexupery.com/ Antoine de Saint-Exupéry (society)] (official website) (in French) * [https://web.archive.org/web/20090629060527/http://www.fondation-antoine-de-saint-exupery.org/ Antoine de Saint-Exupéry Youth Foundation (F-ASEJ)] (official website) (in French) * [https://web.archive.org/web/20130404043121/http://www.saintexupery2011.fr/en/ 2011 Année Antoine de Saint-Exupéry] Toulouse celebration of Saint-Exupéry in 2011 (in French) * [http://www.trussel.com/saint-ex/stexbib.htm#47 Major bibliography of French and English biographical works on Saint-Exupéry] * [https://web.archive.org/web/20151104131339/http://rubenzecenamejia.comxa.com/laguerraAB1.htm A website dedicated to the Centennial Anniversary of Antoine and Consuelo de Saint-Exupéry] * [https://web.archive.org/web/20111005053721/http://www.ghostbombers.com/various/Rippert/saint-ex_01.html The Luftwaffe and Saint-Exupéry: the evidence (in the website "Ghost Bombers")] * [https://www.antoinedesaintexupery.com/personne/jean-de-saint-exupery-1863-1904/ Jean de Saint-Exupéry] (in French) [[Kategoriya:1944 senesinde ölgenler]] [[Kategoriya:1900 senesinde doğğanlar]] 58geoxywu1kab4itn86w11s3xgfm9ji 244176 244175 2026-06-08T12:53:22Z HıyarAşa 75992 244176 wikitext text/x-wiki {{Kişi | adı = Antuan Mari Jan-Batist Roje de Sent-Ekzüperi | memleket = [[Frenkistan]] | resim = 11exupery-inline1-500 (cropped).jpg | doğum_tarihı = 1900 iyün 29 | doğum_yeri = [[Lion]] | ölüm_tarihı = 1944 iyül 31 | ölüm_yeri = [[Aq deñiz]] | ömür_arqadaşı = | balalar = | imza = | fırqa = | ömür_arqadaşı = | din = | order = | term_start = | term_end = | successor = | vicepresident = | order2 = | term_start2 = | term_end2 = | successor2 = |awards = |footnotes = }}  Antuan Mari Jan-Batist Roje de Sent-Ekzüperi (фр. Antoine Marie Jean-Baptiste Roger vicomte de Saint-Exupéry; 1900 iyün 29, Lion, Frenkistan — 1944 iyül 31, Aq deñiz) — fransız yazıcısı, şairi, jurnalisti ve uçucısıdır. O, hususan «Kiçik Prins» adlı eserinen bellidir. ==Tercimeial== Antuan de Sent-Ekzüperi 1900 senesi iyün 29-da Frenkistannıñ Lion şeerinde fuqareleşken asılzade bir qorantasında doğıp östi. O, balalığından berli edebiyat ve tehnikanen aveslene edi. 1921 senesi Arbiy hızmetni başlap, uçucı ihtisasını aldı. 1926 senesinden berli, Ekzüperi, Afrika ve Cenübiy Amerikadan keçken eñ qıyın yollarını menimseyerek, poçta aviatsiyasınıñ yolağında çalışa edi. Bu, maceralar ve telüke ile tolu olğan uçuşlar onıñ ilk kitaplarına temel qoydı. 1930 senelerinde o “Air France”te jurnalist, vekil ve deñeme uçucısı olaraq çalışa edi. O bir qaç ciddiy ava qazalarından ayatta qaldı, olarnıñ arasında Libiya sahrasındaki mecburiy minüv de bar edi. 1939 senesi, sağlıq meselelerine rağmen, frenk arbiy ava quvetlerine, istihbarat uçucısı olaraq qoşuldı. Frenkistan yeñilgeninden soñ AQŞına köçip, anda öz eñ meşur eserlerini yazdı. 1943 senesi o cariy orduna keri qaytıp, Korsikadan cenkâver uçuvlarını devam etti. 1944 senesi iyül 31-de, onıñ Lockheed P-38 Lightning adlı uçağı Frenkistannıñ işğal etilgen territoriyası üstünde istihbarat vazifesini eda etkende ğayıp oldı. Uçquçnıñ parçaları, yalıñız 2000 senelerniñ başlanuvında Marsel yalısında tapılğan edi. Ölüminiñ eñ ihtimallı sebebi alman qırıcı uçuğınıñ ücümidir. Olğeninde Ekzüperi 44 yaşında edi. [[Kategoriya:1944 senesinde ölgenler]] [[Kategoriya:1900 senesinde doğğanlar]] ok63dg9fwalgqmh2qrueh06kuxrpdz0 244177 244176 2026-06-08T12:56:38Z HıyarAşa 75992 244177 wikitext text/x-wiki {{Kişi | adı = Antuan Mari Jan-Batist Roje de Sent-Ekzüperi | memleket = [[Frenkistan]] | resim = 11exupery-inline1-500 (cropped).jpg | doğum_tarihı = 1900 iyün 29 | doğum_yeri = [[Lion]] | ölüm_tarihı = 1944 iyül 31 | ölüm_yeri = [[Aq deñiz]] | ömür_arqadaşı = | balalar = | imza = | fırqa = | ömür_arqadaşı = | din = | order = | term_start = | term_end = | successor = | vicepresident = | order2 = | term_start2 = | term_end2 = | successor2 = |awards = |footnotes = }}  Antuan Mari Jan-Batist Roje de Sent-Ekzüperi (фр. Antoine Marie Jean-Baptiste Roger vicomte de Saint-Exupéry; 1900 iyün 29, Lion, Frenkistan — 1944 iyül 31, Aq deñiz) — fransız yazıcısı, şairi, jurnalisti ve uçucısıdır. O, hususan «Kiçik Prins» adlı eserinen bellidir. ==Tercimeial== Antuan de Sent-Ekzüperi 1900 senesi iyün 29-da Frenkistannıñ Lion şeerinde fuqareleşken asılzade bir qorantasında doğıp östi. O, balalığından berli edebiyat ve tehnikanen aveslene edi. 1921 senesi Arbiy hızmetni başlap, uçucı ihtisasını aldı. 1926 senesinden berli, Ekzüperi, Afrika ve Cenübiy Amerikadan keçken eñ qıyın yollarını menimseyerek, poçta aviatsiyasınıñ yolağında çalışa edi. Bu, maceralar ve telüke ile tolu olğan uçuşlar onıñ ilk kitaplarına temel qoydı. 1930 senelerinde o “Air France”te jurnalist, vekil ve deñeme uçucısı olaraq çalışa edi. O bir qaç ciddiy ava qazalarından ayatta qaldı, olarnıñ arasında Libiya sahrasındaki mecburiy minüv de bar edi. 1939 senesi, sağlıq meselelerine rağmen, frenk arbiy ava quvetlerine, istihbarat uçucısı olaraq qoşuldı. Frenkistan yeñilgeninden soñ AQŞına köçip, anda öz eñ meşur eserlerini yazdı. 1943 senesi o cariy orduna keri qaytıp, Korsikadan cenkâver uçuvlarını devam etti. 1944 senesi iyül 31-de, onıñ Lockheed P-38 Lightning adlı uçağı Frenkistannıñ işğal etilgen territoriyası üstünde istihbarat vazifesini eda etkende ğayıp oldı. Uçquçnıñ parçaları, yalıñız 2000 senelerniñ başlanuvında Marsel yalısında tapılğan edi. Ölüminiñ eñ ihtimallı sebebi alman qırıcı uçuğınıñ ücümidir. Olğeninde Ekzüperi 44 yaşında edi. ==Kitabiyat== * L’Aviateur (Uçucı), 1926 * Courrier Sud (Cenüp Poçtası), 1929 * Vol de nuit (Gece Uçuşı), 1931 * Terre des hommes (İnsanlarnıñ Dünyası), 1939 * Pilote de guerre (Arbiy Uçucı), 1942 * Le Petit Prince (Kiçik Prins), 1943 * Lettre à un otage (Reinege Mektüp), 1943 * Citadelle (İçki Qale ya da Tsitadel), 1948 [[Kategoriya:1944 senesinde ölgenler]] [[Kategoriya:1900 senesinde doğğanlar]] skgo7ip6dutj6k6itf628ovok4ivhtr 244179 244177 2026-06-08T13:05:54Z HıyarAşa 75992 244179 wikitext text/x-wiki {{Kişi | adı = Antuan Mari Jan-Batist Roje de Sent-Ekzüperi | memleket = [[Frenkistan]] | resim = 11exupery-inline1-500 (cropped).jpg | doğum_tarihı = 1900 iyün 29 | doğum_yeri = [[Lion]] | ölüm_tarihı = 1944 iyül 31 | ölüm_yeri = [[Aq deñiz]] | ömür_arqadaşı = | balalar = | imza = | fırqa = | ömür_arqadaşı = | din = | order = | term_start = | term_end = | successor = | vicepresident = | order2 = | term_start2 = | term_end2 = | successor2 = |awards = |footnotes = }}  '''Antuan Mari Jan-Batist Roje de Sent-Ekzüperi''' (фр. Antoine Marie Jean-Baptiste Roger vicomte de Saint-Exupéry; 1900 iyün 29, Lion, [[Frenkistan]] — 1944 iyül 31, [[Aq deñiz]]) — fransız yazıcısı, şairi, jurnalisti ve uçucısıdır. O, hususan «[[Kiçik Prins]]<nowiki/>» adlı eserinen bellidir. ==Tercimeial== Antuan de Sent-Ekzüperi 1900 senesi iyün 29-da [[Frenkistan|Frenkistannıñ]] [[Lion]] şeerinde fuqareleşken asılzade bir qorantasında doğıp östi. O, balalığından berli edebiyat ve tehnikanen aveslene edi. 1921 senesi Arbiy hızmetni başlap, uçucı ihtisasını aldı. 1926 senesinden berli, Ekzüperi, [[Afrika]] ve [[Cenübiy Amerika|Cenübiy Amerikadan]] keçken eñ qıyın yollarını menimseyerek, poçta aviatsiyasınıñ yolağında çalışa edi. Bu, maceralar ve telüke ile tolu olğan uçuşlar onıñ ilk kitaplarına temel qoydı. 1930 senelerinde o “[[Air France]]”te jurnalist, vekil ve deñeme uçucısı olaraq çalışa edi. O bir qaç ciddiy ava qazalarından ayatta qaldı, olarnıñ arasında Libiya sahrasındaki mecburiy minüv de bar edi. 1939 senesi, sağlıq meselelerine rağmen, [[Frenk arbiy ava quvetleri|frenk arbiy ava quvetlerine]], istihbarat uçucısı olaraq qoşuldı. Frenkistan yeñilgeninden soñ [[Amerika Qoşma Ştatları|AQŞına]] köçip, anda öz eñ meşur eserlerini yazdı. 1943 senesi o cariy orduna keri qaytıp, [[Korsika|Korsikadan]] cenkâver uçuvlarını devam etti. 1944 senesi iyül 31-de, onıñ Lockheed P-38 Lightning adlı uçağı Frenkistannıñ işğal etilgen territoriyası üstünde istihbarat vazifesini eda etkende ğayıp oldı. Uçquçnıñ parçaları, yalıñız 2000 senelerniñ başlanuvında [[Marsel]] yalısında tapılğan edi. Ölüminiñ eñ ihtimallı sebebi alman qırıcı uçuğınıñ ücümidir. Olğeninde Ekzüperi 44 yaşında edi. ==Kitabiyat== * L’Aviateur (Uçucı), 1926 * Courrier Sud (Cenüp Poçtası), 1929 * Vol de nuit (Gece Uçuşı), 1931 * Terre des hommes (İnsanlarnıñ Dünyası), 1939 * Pilote de guerre (Arbiy Uçucı), 1942 * Le Petit Prince (Kiçik Prins), 1943 * Lettre à un otage (Reinege Mektüp), 1943 * Citadelle (İçki Qale ya da Tsitadel), 1948 [[Kategoriya:1944 senesinde ölgenler]] [[Kategoriya:1900 senesinde doğğanlar]] 1o0adq0kb4z0ypziltfopftozbrtfif 244180 244179 2026-06-08T13:09:21Z Хтосьці 13041 [[Şablon:Kişi]] Vikimalümattan berini ala ([[wikidata:Q2908]]), maqale metinda argumentar kerek degildir; kiril elifbesi içün -{ ... }- teglerini qoştım 244180 wikitext text/x-wiki {{Kişi}}  '''Antuan Mari Jan-Batist Roje de Sent-Ekzüperi''' ({{lang-fr|Antoine Marie Jean-Baptiste Roger vicomte de Saint-Exupéry}}; 1900 iyün 29, Lion, [[Frenkistan]] — 1944 iyül 31, [[Aq deñiz]]) — fransız yazıcısı, şairi, jurnalisti ve uçucısıdır. O, hususan «[[Kiçik Prins]]<nowiki/>» adlı eserinen bellidir. ==Tercimeial== Antuan de Sent-Ekzüperi 1900 senesi iyün 29-da [[Frenkistan|Frenkistannıñ]] [[Lion]] şeerinde fuqareleşken asılzade bir qorantasında doğıp östi. O, balalığından berli edebiyat ve tehnikanen aveslene edi. 1921 senesi Arbiy hızmetni başlap, uçucı ihtisasını aldı. 1926 senesinden berli, Ekzüperi, [[Afrika]] ve [[Cenübiy Amerika|Cenübiy Amerikadan]] keçken eñ qıyın yollarını menimseyerek, poçta aviatsiyasınıñ yolağında çalışa edi. Bu, maceralar ve telüke ile tolu olğan uçuşlar onıñ ilk kitaplarına temel qoydı. 1930 senelerinde o “[[Air France]]”te jurnalist, vekil ve deñeme uçucısı olaraq çalışa edi. O bir qaç ciddiy ava qazalarından ayatta qaldı, olarnıñ arasında Libiya sahrasındaki mecburiy minüv de bar edi. 1939 senesi, sağlıq meselelerine rağmen, [[Frenk arbiy ava quvetleri|frenk arbiy ava quvetlerine]], istihbarat uçucısı olaraq qoşuldı. Frenkistan yeñilgeninden soñ [[Amerika Qoşma Ştatları|AQŞına]] köçip, anda öz eñ meşur eserlerini yazdı. 1943 senesi o cariy orduna keri qaytıp, [[Korsika|Korsikadan]] cenkâver uçuvlarını devam etti. 1944 senesi iyül 31-de, onıñ Lockheed P-38 Lightning adlı uçağı Frenkistannıñ işğal etilgen territoriyası üstünde istihbarat vazifesini eda etkende ğayıp oldı. Uçquçnıñ parçaları, yalıñız 2000 senelerniñ başlanuvında [[Marsel]] yalısında tapılğan edi. Ölüminiñ eñ ihtimallı sebebi alman qırıcı uçuğınıñ ücümidir. Olğeninde Ekzüperi 44 yaşında edi. ==Kitabiyat== * -{L’Aviateur}- (Uçucı), 1926 * -{Courrier Sud}- (Cenüp Poçtası), 1929 * -{Vol de nuit}- (Gece Uçuşı), 1931 * -{Terre des hommes}- (İnsanlarnıñ Dünyası), 1939 * -{Pilote de guerre}- (Arbiy Uçucı), 1942 * -{Le Petit Prince}- (Kiçik Prins), 1943 * -{Lettre à un otage}- (Reinege Mektüp), 1943 * -{Citadelle}- (İçki Qale ya da Tsitadel), 1948 [[Kategoriya:1944 senesinde ölgenler]] [[Kategoriya:1900 senesinde doğğanlar]] eugicpenf1w8fjb43i32qljljvgs6zu 244181 244180 2026-06-08T13:09:47Z HıyarAşa 75992 244181 wikitext text/x-wiki {{Kişi}}  '''Antuan Mari Jan-Batist Roje de Sent-Ekzüperi''' ({{lang-fr|Antoine Marie Jean-Baptiste Roger vicomte de Saint-Exupéry}}; 1900 iyün 29, Lion, [[Frenkistan]] — 1944 iyül 31, [[Aq deñiz]]) — fransız yazıcısı, şairi, jurnalisti ve uçucısıdır. O, hususan «[[Kiçik Prins]]<nowiki/>» adlı eserinen bellidir. ==Tercimeial== Antuan de Sent-Ekzüperi 1900 senesi iyün 29-da [[Frenkistan|Frenkistannıñ]] [[Lion]] şeerinde fuqareleşken asılzade bir qorantasında doğıp östi. O, balalığından berli edebiyat ve tehnikanen aveslene edi. 1921 senesi Arbiy hızmetni başlap, uçucı ihtisasını aldı. 1926 senesinden berli, Ekzüperi, [[Afrika]] ve [[Cenübiy Amerika|Cenübiy Amerikadan]] keçken eñ qıyın yollarını menimseyerek, poçta aviatsiyasınıñ yolağında çalışa edi. Bu, maceralar ve telüke ile tolu olğan uçuşlar onıñ ilk kitaplarına temel qoydı. 1930 senelerinde o “[[Air France]]”te jurnalist, vekil ve deñeme uçucısı olaraq çalışa edi. O bir qaç ciddiy ava qazalarından ayatta qaldı, olarnıñ arasında Libiya sahrasındaki mecburiy minüv de bar edi. 1939 senesi, sağlıq meselelerine rağmen, [[Frenk arbiy ava quvetleri|frenk arbiy ava quvetlerine]], istihbarat uçucısı olaraq qoşuldı. Frenkistan yeñilgeninden soñ [[Amerika Qoşma Ştatları|AQŞına]] köçip, anda öz eñ meşur eserlerini yazdı. 1943 senesi o cariy orduna keri qaytıp, [[Korsika|Korsikadan]] cenkâver uçuvlarını devam etti. 1944 senesi iyül 31-de, onıñ Lockheed P-38 Lightning adlı uçağı Frenkistannıñ işğal etilgen territoriyası üstünde istihbarat vazifesini eda etkende ğayıp oldı. Uçquçnıñ parçaları, yalıñız 2000 senelerniñ başlanuvında [[Marsel]] yalısında tapılğan edi. Ölüminiñ eñ ihtimallı sebebi alman qırıcı uçuğınıñ ücümidir. Olğeninde Ekzüperi 44 yaşında edi. ==Kitabiyat== * -{L’Aviateur}- (Uçucı), 1926 * -{Courrier Sud}- (Cenüp Poçtası), 1929 * -{Vol de nuit}- (Gece Uçuşı), 1931 * -{Terre des hommes}- (İnsanlarnıñ Dünyası), 1939 * -{Pilote de guerre}- (Arbiy Uçucı), 1942 * -{Le Petit Prince}- (Kiçik Prins), 1943 * -{Lettre à un otage}- (Reinege Mektüp), 1943 * -{Citadelle}- (İçki Qale ya da Tsitadel), 1948 [[Kategoriya:1944 senesinde ölgenler]] [[Kategoriya:1900 senesinde doğğanlar]] 5nqycjyi3i8ty97ns174prno5olwl8z 244182 244181 2026-06-08T13:12:33Z Хтосьці 13041 /* Tercimeial */ daa kiril elifbesi içün -{ ... }- tegleri (Лоджкхеэд П-38 Лигхтнинг → Lockheed P-38 Lightning) 244182 wikitext text/x-wiki {{Kişi}}  '''Antuan Mari Jan-Batist Roje de Sent-Ekzüperi''' ({{lang-fr|Antoine Marie Jean-Baptiste Roger vicomte de Saint-Exupéry}}; 1900 iyün 29, Lion, [[Frenkistan]] — 1944 iyül 31, [[Aq deñiz]]) — fransız yazıcısı, şairi, jurnalisti ve uçucısıdır. O, hususan «[[Kiçik Prins]]<nowiki/>» adlı eserinen bellidir. ==Tercimeial== Antuan de Sent-Ekzüperi 1900 senesi iyün 29-da [[Frenkistan|Frenkistannıñ]] [[Lion]] şeerinde fuqareleşken asılzade bir qorantasında doğıp östi. O, balalığından berli edebiyat ve tehnikanen aveslene edi. 1921 senesi Arbiy hızmetni başlap, uçucı ihtisasını aldı. 1926 senesinden berli, Ekzüperi, [[Afrika]] ve [[Cenübiy Amerika|Cenübiy Amerikadan]] keçken eñ qıyın yollarını menimseyerek, poçta aviatsiyasınıñ yolağında çalışa edi. Bu, maceralar ve telüke ile tolu olğan uçuşlar onıñ ilk kitaplarına temel qoydı. 1930 senelerinde o “[[Air France]]”te jurnalist, vekil ve deñeme uçucısı olaraq çalışa edi. O bir qaç ciddiy ava qazalarından ayatta qaldı, olarnıñ arasında Libiya sahrasındaki mecburiy minüv de bar edi. 1939 senesi, sağlıq meselelerine rağmen, [[Frenk arbiy ava quvetleri|frenk arbiy ava quvetlerine]], istihbarat uçucısı olaraq qoşuldı. Frenkistan yeñilgeninden soñ [[Amerika Qoşma Ştatları|AQŞına]] köçip, anda öz eñ meşur eserlerini yazdı. 1943 senesi o cariy orduna keri qaytıp, [[Korsika|Korsikadan]] cenkâver uçuvlarını devam etti. 1944 senesi iyül 31-de, onıñ -{Lockheed P-38 Lightning}- adlı uçağı Frenkistannıñ işğal etilgen territoriyası üstünde istihbarat vazifesini eda etkende ğayıp oldı. Uçquçnıñ parçaları, yalıñız 2000 senelerniñ başlanuvında [[Marsel]] yalısında tapılğan edi. Ölüminiñ eñ ihtimallı sebebi alman qırıcı uçuğınıñ ücümidir. Olğeninde Ekzüperi 44 yaşında edi. ==Kitabiyat== * -{L’Aviateur}- (Uçucı), 1926 * -{Courrier Sud}- (Cenüp Poçtası), 1929 * -{Vol de nuit}- (Gece Uçuşı), 1931 * -{Terre des hommes}- (İnsanlarnıñ Dünyası), 1939 * -{Pilote de guerre}- (Arbiy Uçucı), 1942 * -{Le Petit Prince}- (Kiçik Prins), 1943 * -{Lettre à un otage}- (Reinege Mektüp), 1943 * -{Citadelle}- (İçki Qale ya da Tsitadel), 1948 [[Kategoriya:1944 senesinde ölgenler]] [[Kategoriya:1900 senesinde doğğanlar]] 8zcoe4tbjsav93s673hjx4jo8ff5p9p 244183 244182 2026-06-08T13:12:55Z HıyarAşa 75992 244183 wikitext text/x-wiki {{Kişi}}  '''Antuan Mari Jan-Batist Roje de Sent-Ekzüperi''' ({{lang-fr|Antoine Marie Jean-Baptiste Roger vicomte de Saint-Exupéry}}; 1900 iyün 29, Lion, [[Frenkistan]] — 1944 iyül 31, [[Aq deñiz]]) — fransız yazıcısı, şairi, jurnalisti ve uçucısıdır. O, hususan «[[Kiçik Prins]]<nowiki/>» adlı eserinen bellidir. ==Tercimeial== Antuan de Sent-Ekzüperi 1900 senesi iyün 29-da [[Frenkistan|Frenkistannıñ]] [[Lion]] şeerinde fuqareleşken asılzade bir qorantasında doğıp östi. O, balalığından berli edebiyat ve tehnikanen aveslene edi. 1921 senesi Arbiy hızmetni başlap, uçucı ihtisasını aldı. 1926 senesinden berli, Ekzüperi, [[Afrika]] ve [[Cenübiy Amerika|Cenübiy Amerikadan]] keçken eñ qıyın yollarını menimseyerek, poçta aviatsiyasınıñ yolağında çalışa edi. Bu, maceralar ve telüke ile tolu olğan uçuşlar onıñ ilk kitaplarına temel qoydı. 1930 senelerinde o “[[Air France]]”te jurnalist, vekil ve deñeme uçucısı olaraq çalışa edi. O bir qaç ciddiy ava qazalarından ayatta qaldı, olarnıñ arasında Libiya sahrasındaki mecburiy minüv de bar edi. 1939 senesi, sağlıq meselelerine rağmen, [[Frenk arbiy ava quvetleri|frenk arbiy ava quvetlerine]], istihbarat uçucısı olaraq qoşuldı. Frenkistan yeñilgeninden soñ [[Amerika Qoşma Ştatları|AQŞına]] köçip, anda öz eñ meşur eserlerini yazdı. 1943 senesi o cariy orduna keri qaytıp, [[Korsika|Korsikadan]] cenkâver uçuvlarını devam etti. 1944 senesi iyül 31-de, onıñ -{Lockheed P-38 Lightning}- adlı uçağı Frenkistannıñ işğal etilgen territoriyası üstünde istihbarat vazifesini eda etkende ğayıp oldı. Uçquçnıñ parçaları, yalıñız 2000 senelerniñ başlanuvında [[Marsel]] yalısında tapılğan edi. Ölüminiñ eñ ihtimallı sebebi alman qırıcı uçuğınıñ ücümidir. Olğeninde Ekzüperi 44 yaşında edi. ==Kitabiyat== * -{L’Aviateur}- (Uçucı), 1926 * -{Courrier Sud}- (Cenüp Poçtası), 1929 * -{Vol de nuit}- (Gece Uçuşı), 1931 * -{Terre des hommes}- (İnsanlarnıñ Dünyası), 1939 * -{Pilote de guerre}- (Arbiy Uçucı), 1942 * -{Le Petit Prince}- (Kiçik Prins), 1943 * -{Lettre à un otage}- (Reinege Mektüp), 1943 * -{Citadelle}- (İçki Qale ya da Tsitadel), 1948 [[Kategoriya:1944 senesinde ölgenler]] [[Kategoriya:1900 senesinde doğğanlar]] 4tjbgdi9moav5ushdx2d7l9j01buge0 244184 244183 2026-06-08T13:15:45Z Хтосьці 13041 +==Atıflar== <refernces /> 244184 wikitext text/x-wiki {{Kişi}}  '''Antuan Mari Jan-Batist Roje de Sent-Ekzüperi''' ({{lang-fr|Antoine Marie Jean-Baptiste Roger vicomte de Saint-Exupéry}}; 1900 iyün 29, Lion, [[Frenkistan]] — 1944 iyül 31, [[Aq deñiz]]) — fransız yazıcısı, şairi, jurnalisti ve uçucısıdır. O, hususan «[[Kiçik Prins]]<nowiki/>» adlı eserinen bellidir. ==Tercimeial== Antuan de Sent-Ekzüperi 1900 senesi iyün 29-da [[Frenkistan|Frenkistannıñ]] [[Lion]] şeerinde fuqareleşken asılzade bir qorantasında doğıp östi. O, balalığından berli edebiyat ve tehnikanen aveslene edi. 1921 senesi Arbiy hızmetni başlap, uçucı ihtisasını aldı. 1926 senesinden berli, Ekzüperi, [[Afrika]] ve [[Cenübiy Amerika|Cenübiy Amerikadan]] keçken eñ qıyın yollarını menimseyerek, poçta aviatsiyasınıñ yolağında çalışa edi. Bu, maceralar ve telüke ile tolu olğan uçuşlar onıñ ilk kitaplarına temel qoydı. 1930 senelerinde o “[[Air France]]”te jurnalist, vekil ve deñeme uçucısı olaraq çalışa edi. O bir qaç ciddiy ava qazalarından ayatta qaldı, olarnıñ arasında Libiya sahrasındaki mecburiy minüv de bar edi. 1939 senesi, sağlıq meselelerine rağmen, [[Frenk arbiy ava quvetleri|frenk arbiy ava quvetlerine]], istihbarat uçucısı olaraq qoşuldı. Frenkistan yeñilgeninden soñ [[Amerika Qoşma Ştatları|AQŞına]] köçip, anda öz eñ meşur eserlerini yazdı. 1943 senesi o cariy orduna keri qaytıp, [[Korsika|Korsikadan]] cenkâver uçuvlarını devam etti. 1944 senesi iyül 31-de, onıñ -{Lockheed P-38 Lightning}- adlı uçağı Frenkistannıñ işğal etilgen territoriyası üstünde istihbarat vazifesini eda etkende ğayıp oldı. Uçquçnıñ parçaları, yalıñız 2000 senelerniñ başlanuvında [[Marsel]] yalısında tapılğan edi. Ölüminiñ eñ ihtimallı sebebi alman qırıcı uçuğınıñ ücümidir. Olğeninde Ekzüperi 44 yaşında edi. ==Kitabiyat== * -{L’Aviateur}- (Uçucı), 1926 * -{Courrier Sud}- (Cenüp Poçtası), 1929 * -{Vol de nuit}- (Gece Uçuşı), 1931 * -{Terre des hommes}- (İnsanlarnıñ Dünyası), 1939 * -{Pilote de guerre}- (Arbiy Uçucı), 1942 * -{Le Petit Prince}- (Kiçik Prins), 1943 * -{Lettre à un otage}- (Reinege Mektüp), 1943 * -{Citadelle}- (İçki Qale ya da Tsitadel), 1948 ==Atıflar== <refernces /> [[Kategoriya:1944 senesinde ölgenler]] [[Kategoriya:1900 senesinde doğğanlar]] ic72k0jgdru5wmu8ig4tbhv28kgfsib 244185 244184 2026-06-08T13:15:59Z Хтосьці 13041 /* Atıflar */ hatamnı tüzettim 244185 wikitext text/x-wiki {{Kişi}}  '''Antuan Mari Jan-Batist Roje de Sent-Ekzüperi''' ({{lang-fr|Antoine Marie Jean-Baptiste Roger vicomte de Saint-Exupéry}}; 1900 iyün 29, Lion, [[Frenkistan]] — 1944 iyül 31, [[Aq deñiz]]) — fransız yazıcısı, şairi, jurnalisti ve uçucısıdır. O, hususan «[[Kiçik Prins]]<nowiki/>» adlı eserinen bellidir. ==Tercimeial== Antuan de Sent-Ekzüperi 1900 senesi iyün 29-da [[Frenkistan|Frenkistannıñ]] [[Lion]] şeerinde fuqareleşken asılzade bir qorantasında doğıp östi. O, balalığından berli edebiyat ve tehnikanen aveslene edi. 1921 senesi Arbiy hızmetni başlap, uçucı ihtisasını aldı. 1926 senesinden berli, Ekzüperi, [[Afrika]] ve [[Cenübiy Amerika|Cenübiy Amerikadan]] keçken eñ qıyın yollarını menimseyerek, poçta aviatsiyasınıñ yolağında çalışa edi. Bu, maceralar ve telüke ile tolu olğan uçuşlar onıñ ilk kitaplarına temel qoydı. 1930 senelerinde o “[[Air France]]”te jurnalist, vekil ve deñeme uçucısı olaraq çalışa edi. O bir qaç ciddiy ava qazalarından ayatta qaldı, olarnıñ arasında Libiya sahrasındaki mecburiy minüv de bar edi. 1939 senesi, sağlıq meselelerine rağmen, [[Frenk arbiy ava quvetleri|frenk arbiy ava quvetlerine]], istihbarat uçucısı olaraq qoşuldı. Frenkistan yeñilgeninden soñ [[Amerika Qoşma Ştatları|AQŞına]] köçip, anda öz eñ meşur eserlerini yazdı. 1943 senesi o cariy orduna keri qaytıp, [[Korsika|Korsikadan]] cenkâver uçuvlarını devam etti. 1944 senesi iyül 31-de, onıñ -{Lockheed P-38 Lightning}- adlı uçağı Frenkistannıñ işğal etilgen territoriyası üstünde istihbarat vazifesini eda etkende ğayıp oldı. Uçquçnıñ parçaları, yalıñız 2000 senelerniñ başlanuvında [[Marsel]] yalısında tapılğan edi. Ölüminiñ eñ ihtimallı sebebi alman qırıcı uçuğınıñ ücümidir. Olğeninde Ekzüperi 44 yaşında edi. ==Kitabiyat== * -{L’Aviateur}- (Uçucı), 1926 * -{Courrier Sud}- (Cenüp Poçtası), 1929 * -{Vol de nuit}- (Gece Uçuşı), 1931 * -{Terre des hommes}- (İnsanlarnıñ Dünyası), 1939 * -{Pilote de guerre}- (Arbiy Uçucı), 1942 * -{Le Petit Prince}- (Kiçik Prins), 1943 * -{Lettre à un otage}- (Reinege Mektüp), 1943 * -{Citadelle}- (İçki Qale ya da Tsitadel), 1948 ==Atıflar== <references /> [[Kategoriya:1944 senesinde ölgenler]] [[Kategoriya:1900 senesinde doğğanlar]] tswb5srjr0j3tfi5a3ut7aub2vgq5ja Kategoriya:User vec 14 60302 244187 2026-06-08T13:17:19Z Babil OtomatikOluştur 76578 Otomatik olarak [[Project:Babil|Babil]] kategori sayfası oluşturuluyor 244187 wikitext text/x-wiki Bu kategorideki kullanıcılar, Venedikçe dilini bildiğini belirtir. [[Category:Vikipediya:Tilge_köre_qullanıcılar|vec]] 9dpiagnf4vqnylvv1t032mjy0chmkxn Mardan Kazimov 0 60303 244209 2026-06-09T10:32:04Z Farrux Dadasbayli 76981 Yañı saife yaratıldı. Mündericesi: ''''Mərdan Kazımov''' (3 iyul 1994, Naxçıvan) — Azərbaycanlı müğənni. Əsasən pop və estrada janrlarında fəaliyyət göstərir.<ref>[https://artist.az/katalog/mardan-kazimov/ Mardan Kazimov]</ref><ref>[https://musavat.com/news/o-ses-turkiye-nin-istirakcisi-corek-almaq-ucun-butulka-satirdim_413848.html “O səs Türkiyə”nin iştirakçısı: “Çörək almaq üçün butulka satırdım”]</ref> == Bioqrafiya == Musiqiçi ailəsind...' 244209 wikitext text/x-wiki '''Mərdan Kazımov''' (3 iyul 1994, Naxçıvan) — Azərbaycanlı müğənni. Əsasən pop və estrada janrlarında fəaliyyət göstərir.<ref>[https://artist.az/katalog/mardan-kazimov/ Mardan Kazimov]</ref><ref>[https://musavat.com/news/o-ses-turkiye-nin-istirakcisi-corek-almaq-ucun-butulka-satirdim_413848.html “O səs Türkiyə”nin iştirakçısı: “Çörək almaq üçün butulka satırdım”]</ref> == Bioqrafiya == Musiqiçi ailəsində dünyaya gələn Mərdan Kazımov gənc yaşlarından musiqi ilə məşğul olmuşdur. Müxtəlif musiqi layihələri və solo ifaları ilə tanınmışdır. 2025-ci ildə Azərbaycan Dövlət Mədəniyyət və İncəsənət Universitetinin Populyar musiqi və caz ifaçılığı (vokal) ixtisasına qəbul olmuşdur. Mərdan Kazımov Azərbaycan şou-biznesində fəaliyyət göstərən ifaçılardan biridir. == Mənbələr == b95lskkmczvgef314nqd7swlx1ns1oy 244210 244209 2026-06-09T10:47:04Z Хтосьці 13041 yoq etmek teklif etem: bu qırımtatar tili degil 244210 wikitext text/x-wiki {{delete|Qırımtatrca degil (ve Azerbaycan Vikipediyasında onıñ aqqında maqale yoq — o aqiqaten bellimi?)}} '''Mərdan Kazımov''' (3 iyul 1994, Naxçıvan) — Azərbaycanlı müğənni. Əsasən pop və estrada janrlarında fəaliyyət göstərir.<ref>[https://artist.az/katalog/mardan-kazimov/ Mardan Kazimov]</ref><ref>[https://musavat.com/news/o-ses-turkiye-nin-istirakcisi-corek-almaq-ucun-butulka-satirdim_413848.html “O səs Türkiyə”nin iştirakçısı: “Çörək almaq üçün butulka satırdım”]</ref> == Bioqrafiya == Musiqiçi ailəsində dünyaya gələn Mərdan Kazımov gənc yaşlarından musiqi ilə məşğul olmuşdur. Müxtəlif musiqi layihələri və solo ifaları ilə tanınmışdır. 2025-ci ildə Azərbaycan Dövlət Mədəniyyət və İncəsənət Universitetinin Populyar musiqi və caz ifaçılığı (vokal) ixtisasına qəbul olmuşdur. Mərdan Kazımov Azərbaycan şou-biznesində fəaliyyət göstərən ifaçılardan biridir. == Mənbələr == 2x2z2lo4vy342cye1cjf3qytetbm62o