ويكاموس arwiktionary https://ar.wiktionary.org/wiki/%D9%88%D9%8A%D9%83%D8%A7%D9%85%D9%88%D8%B3:%D8%A7%D9%84%D8%B5%D9%81%D8%AD%D8%A9_%D8%A7%D9%84%D8%B1%D8%A6%D9%8A%D8%B3%D9%8A%D8%A9 MediaWiki 1.47.0-wmf.11 case-sensitive ميديا خاص نقاش مستخدم نقاش المستخدم ويكاموس نقاش ويكاموس ملف نقاش الملف ميدياويكي نقاش ميدياويكي قالب نقاش القالب مساعدة نقاش المساعدة تصنيف نقاش التصنيف ملحق نقاش الملحق مكنز نقاش المكنز نص زمني نقاش النص الزمني وحدة نقاش الوحدة فعالية نقاش فعالية ظَلَّ 0 14430 1096548 1091361 2026-07-17T14:03:39Z ~2026-40044-45 38956 إفراغ الصفحة 1096548 wikitext text/x-wiki phoiac9h4m842xq45sp7s6u21eteeq1 1096549 1096548 2026-07-17T14:03:47Z A09 34422 Reverted edits by [[Special:Contribs/~2026-40044-45|~2026-40044-45]] ([[User talk:~2026-40044-45|talk]]) to last version by ForzaGreenBot: unexplained content removal 1091361 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1377926}} '''ظَلَّ''' بَظَلُّ ظَلًّا {{قطع}}. # الإستمرار في العمل. أصله للنهار ثم أصبح يشمل النهار والليل. {{-}} === التصريفات === {{تصريف|جذر=ظلل|وزن=فعَل يفعِل}} {{تصريف|جذر=ظلل|وزن=فعِل يفعَل}} === كلمات ذات علاقة === {{ظ ل ل}} [[تصنيف:ظ ل ل]] [[تصنيف:فَعَلَ]] [[تصنيف:باب قطع]] [[تصنيف:كلمات عربية]] 202o1sfyj3vlkg7xu62i1mcn6wxyhot نقاش المستخدم:المحفوف 3 207761 1096550 945029 2026-07-17T15:03:32Z Dr-Taher 12861 نقل Dr-Taher صفحة [[نقاش المستخدم:الجوهرة العربية]] إلى [[نقاش المستخدم:المحفوف]]: نُقِلت الصفحة آليا عند إعادة تسمية المستخدم «[[Special:CentralAuth/الجوهرة العربية|الجوهرة العربية]]» إلى «[[Special:CentralAuth/المحفوف|المحفوف]]». 945029 wikitext text/x-wiki <div style="width:auto" style="margin-bottom:1.25em;border:1px solid #{{#switch:bleu|bleu=8898BF|vert=97BF87|jaune=AAAA66|or=777777|orange=AA8833|violet=7755AA|saumon=AA8866|sable=AA9955|vertmoyen=88BB55|bleufoncé=1144AA|rouge=AA8866|écarlate=AAAAAA|#default=AAAAAA}}; background:white;padding:0"> <div style="height:8px;margin:0;border:0;border-bottom:1px solid #{{#switch:bleu|bleu=8898BF|vert=97BF87|jaune=AAAA66|or=777777|orange=AA8833|violet=7755AA|saumon=AA8866|sable=AA9955|vertmoyen=88BB55|bleufoncé=1144AA|rouge=AA8866|écarlate=AAAAAA|#default=AAAAAA}};background: #{{#switch:bleu|bleu=C8D8FF|vert=D7FFC7|jaune=FFFFB9|or=FFE040|orange=FFDD88|violet=C9AEF1|saumon=FBDFBE|sable=F1E2AE|vertmoyen=99CC66|bleufoncé=003399|rouge=FFDAB9|écarlate=FF3333|#default=E0E0E0}};font-size:1px"></div> <div style="padding:5px;font-size:small"><center style="word-spacing:1ex"><small>[[ويكاموس:سفارة|Welcome!]] [[ويكاموس:سفارة|Bienvenue!]] [[ويكاموس:سفارة|Willkommen!]] [[ويكاموس:سفارة|Benvenuti]] [[ويكاموس:سفارة|¡Bienvenido!]] [[ويكاموس:سفارة|ようこそ]] [[ويكاموس:سفارة|Dobrodosli]] [[ويكاموس:سفارة|환영합니다]] [[ويكاموس:سفارة|Добро пожаловать]] [[ويكاموس:سفارة|Bem-vindo!]] [[ويكاموس:سفارة|欢迎]] [[ويكاموس:سفارة|Bonvenon]] [[ويكاموس:سفارة|Welkom]]</small></center></div> <center><big>'''[[ويكاموس:ترحيب بالقادمين الجدد|مرحبا بك]] في [[ويكاموس]]، الجوهرة العربية !'''</big></center> {| |[[ملف:WiktionaryAr.svg|يمين|40بك]] | [[ويكاموس]] هو <u>مشروع تحرير جماعي لـ'''قاموس علمي وثقافي''' '''بمختلف اللغات'''</u>. لطلب المساعدة في أي وقت تجد وصلة ([[مساعدة:محتويات|'''مساعدة''']]) في هامش كل صفحة على اليمين. لا تتردد في قراءة '''الوصايا الأولى''' [[ويكاموس:دروس (التحرير)|للتحرير]] و[[ويكاموس:دليل سريع|التعديل]] و[[مساعدة:إنشاء صفحة جديدة|إنشاء المفردات الجديدة]] و[[ويكاموس:دليل سريع|تنسيقها]] وفقا [[ويكاموس:الركائز الخمس|لمعايير ويكاموس]]. تم تخصيص '''[[ويكاموس:ساحة التجربة|ساحة التجربة]]''' لاحتواء تجاربك وخطواتك الأولى في التحرير والتعديل. |-- |[[ملف:Presa de decissions.png|يمين|40بك]] | يمكنك الاستفسار و[[ويكاموس:أسئلة|طرح الأسئلة]] المتعلقة بطبيعة العمل في ويكاموس. يمكنك أيضا [{{fullurl:مستخدم:الجوهرة العربية|action=edit}} التعريف] بنفسك في [[مستخدم:الجوهرة العربية|'''صفحتك الشخصية''']]، بكتابة معلومات عنك: [[ويكاموس:بابل|اللغات التي تتكلمها]]، [[ويكاموس:صناديق المستخدم|من أي بلد أنت، ما هي محاور اهتمامك]]... |--- |[[ملف:Crystal Clear app ktip.png|يمين|40بك]] | لا تنس [[ويكاموس:توقيع|'''التوقيع''']] في [[مساعدة:صفحة النقاش|'''صفحات النقاش''']] بكتابة أربع مدّات، هكذا (<nowiki>~~~~</nowiki>). ولكن يجب <u>'''عدم التوقيع في صفحات المقالات القاموسية'''</u>، لأنها تصبح ملكًا للجميع لحظة إنشائها. نرجو منك ألاّ تنسى [[ويكاموس:حقوق التأليف والنشر|<u>'''عدم النسخ من الإنترنت'''</u>]] لأسباب [[ويكاموس:حقوق التأليف والنشر|<u>'''حقوق التأليف والنشر'''</u>]]. |-- |[[ملف:Crystal Clear app amor.png|يمين|40بك]] | أخيرا، وهو أهم شيء، نتمى لك أن [[ويكاموس:كن جريئا|'''تتمتع''']] بالمساهمة [[ويكاموس:بوابة المجتمع|'''معنا''']] في هذا المشروع! إذا كانت لديك أي استفسارات أو أسئلة أخرى، يمكنك طرحها في [[ويكاموس:أسئلة|هذه الصفحة]] أو في صفحة نقاشي. |} </div></div> --[[مستخدم:Meno25|Meno25]] ([[نقاش المستخدم:Meno25|نقاش]] • [[خاص:مساهمات/Meno25|مساهمات]]) 16:08، 27 نوفمبر 2019 (ت ع م) ep20ehn0lmaqwkmq6a6y35rwl9fj0bi قالب:استشهاد بويكي بيانات/مختبر 10 231222 1096560 1096484 2026-07-17T20:27:56Z حبيشان 31560 1096560 wikitext text/x-wiki * {{استشهاد بويكي بيانات/ملعب|Q115727209|مرجع=أبو السعود}} * {{استشهاد بويكي بيانات|Q115727209|مرجع=أبو السعود}} * {{استشهاد بويكي بيانات/ملعب|Q115641715|مرجع=الشربيني1868}} * {{استشهاد بويكي بيانات|Q115641715|مرجع=الشربيني1868}} * {{استشهاد بويكي بيانات/ملعب|Q115683910|مرجع=القرطبي1935}} * {{استشهاد بويكي بيانات|Q115683910|مرجع=القرطبي1935}} * {{استشهاد بويكي بيانات/ملعب|Q115728353|مرجع=السيوطي1974}} * {{استشهاد بويكي بيانات|Q115728353|مرجع=السيوطي1974}} * {{استشهاد بويكي بيانات/ملعب|Q115732199|مرجع=السيوطي1978}} * {{استشهاد بويكي بيانات|Q115732199|مرجع=السيوطي1978}} * {{استشهاد بويكي بيانات/ملعب|Q115641917|مرجع=القاضي1981}} * {{استشهاد بويكي بيانات|Q115641917|مرجع=القاضي1981}} * {{استشهاد بويكي بيانات/ملعب|Q115641984|مرجع=ابن عاشور1984}} * {{استشهاد بويكي بيانات|Q115641984|مرجع=ابن عاشور1984}} * {{استشهاد بويكي بيانات/ملعب|Q115683837}} * {{استشهاد بويكي بيانات|Q115683837}} * {{استشهاد بويكي بيانات/ملعب|Q115782668|مرجع=النحاس1985}} * {{استشهاد بويكي بيانات|Q115782668|مرجع=النحاس1985}} * {{استشهاد بويكي بيانات/ملعب|Q115746114|مرجع=القحطاني1989}} * {{استشهاد بويكي بيانات|Q115746114|مرجع=القحطاني1989}} * {{استشهاد بويكي بيانات/ملعب|Q19443162}} * {{استشهاد بويكي بيانات|Q19443162}} * {{استشهاد بويكي بيانات/ملعب|Q115640897|مرجع=درويش1992}} * {{استشهاد بويكي بيانات|Q115640897|مرجع=درويش1992}} * {{استشهاد بويكي بيانات/ملعب|Q115754123|مرجع=الواحدي1992}} * {{استشهاد بويكي بيانات|Q115754123|مرجع=الواحدي1992}} * {{استشهاد بويكي بيانات/ملعب|Q115651867|مرجع=الداني1994}} * {{استشهاد بويكي بيانات|Q115651867|مرجع=الداني1994}} * {{استشهاد بويكي بيانات/ملعب|Q115756452|مرجع=عطية1995}} * {{استشهاد بويكي بيانات|Q115756452|مرجع=عطية1995}} * {{استشهاد بويكي بيانات/ملعب|Q115701544|مرجع=ابن كثير1998}} * {{استشهاد بويكي بيانات|Q115701544|مرجع=ابن كثير1998}} * {{استشهاد بويكي بيانات/ملعب|Q115730072|مرجع=ابن عادل1998}} * {{استشهاد بويكي بيانات|Q115730072|مرجع=ابن عادل1998}} * {{استشهاد بويكي بيانات/ملعب|Q115730115|مرجع=الرازي2000}} * {{استشهاد بويكي بيانات|Q115730115|مرجع=الرازي2000}} * {{استشهاد بويكي بيانات/ملعب|Q97221368|مرجع=الطبري2001}} * {{استشهاد بويكي بيانات|Q97221368|مرجع=الطبري2001}} * {{استشهاد بويكي بيانات/ملعب|Q115484580|مرجع=أحمد2001}} * {{استشهاد بويكي بيانات|Q115484580|مرجع=أحمد2001}} * {{استشهاد بويكي بيانات/ملعب|Q115683684}} * {{استشهاد بويكي بيانات|Q115683684}} * {{استشهاد بويكي بيانات/ملعب|Q115640158|مرجع=الدعاس2004}} * {{استشهاد بويكي بيانات|Q115640158|مرجع=الدعاس2004}} * {{استشهاد بويكي بيانات/ملعب|Q115683765|مرجع=سلامة2006}} * {{استشهاد بويكي بيانات|Q115683765|مرجع=سلامة2006}} * {{استشهاد بويكي بيانات/ملعب|Q115701920|مرجع=ابن القيم2007}} * {{استشهاد بويكي بيانات|Q115701920|مرجع=ابن القيم2007}} * {{استشهاد بويكي بيانات/ملعب|Q115743500}} * {{استشهاد بويكي بيانات|Q115743500}} * {{استشهاد بويكي بيانات/ملعب|Q115615370|مرجع=الشايع2011}} * {{استشهاد بويكي بيانات|Q115615370|مرجع=الشايع2011}} * {{استشهاد بويكي بيانات/ملعب|Q140501357}} * {{استشهاد بويكي بيانات|Q140501357}} <div dir="ltr"> * {{استشهاد بويكي بيانات/ملعب|Q115917529|مرجع=Dyson1999}} * {{استشهاد بويكي بيانات|Q115917529|مرجع=Dyson1999}} * {{استشهاد بويكي بيانات/ملعب|Q118316084|مرجع=Javvin2005}} * {{استشهاد بويكي بيانات|Q118316084|مرجع=Javvin2005}} * {{استشهاد بويكي بيانات/ملعب|Q115917346|مرجع=Kozierok2005}} * {{استشهاد بويكي بيانات|Q115917346|مرجع=Kozierok2005}} * {{استشهاد بويكي بيانات/ملعب|Q115922106|مرجع=Fall2012}} * {{استشهاد بويكي بيانات|Q115922106|مرجع=Fall2012}} * {{استشهاد بويكي بيانات/ملعب|Q115919723|مرجع=Odom2013}} * {{استشهاد بويكي بيانات|Q115919723|مرجع=Odom2013}} * {{استشهاد بويكي بيانات/ملعب|Q9065143}} </div> a3k3w1zc40mmtzlrgd2v98rptuundio 1096618 1096560 2026-07-18T11:30:57Z حبيشان 31560 1096618 wikitext text/x-wiki * {{استشهاد بويكي بيانات/ملعب|Q115727209|مرجع=أبو السعود}} * {{استشهاد بويكي بيانات|Q115727209|مرجع=أبو السعود}} * {{استشهاد بويكي بيانات/ملعب|Q115641715|مرجع=الشربيني1868}} * {{استشهاد بويكي بيانات|Q115641715|مرجع=الشربيني1868}} * {{استشهاد بويكي بيانات/ملعب|Q115683910|مرجع=القرطبي1935}} * {{استشهاد بويكي بيانات|Q115683910|مرجع=القرطبي1935}} * {{استشهاد بويكي بيانات/ملعب|Q115728353|مرجع=السيوطي1974}} * {{استشهاد بويكي بيانات|Q115728353|مرجع=السيوطي1974}} * {{استشهاد بويكي بيانات/ملعب|Q115732199|مرجع=السيوطي1978}} * {{استشهاد بويكي بيانات|Q115732199|مرجع=السيوطي1978}} * {{استشهاد بويكي بيانات/ملعب|Q115641917|مرجع=القاضي1981}} * {{استشهاد بويكي بيانات|Q115641917|مرجع=القاضي1981}} * {{استشهاد بويكي بيانات/ملعب|Q115641984|مرجع=ابن عاشور1984}} * {{استشهاد بويكي بيانات|Q115641984|مرجع=ابن عاشور1984}} * {{استشهاد بويكي بيانات/ملعب|Q115683837}} * {{استشهاد بويكي بيانات|Q115683837}} * {{استشهاد بويكي بيانات/ملعب|Q115782668|مرجع=النحاس1985}} * {{استشهاد بويكي بيانات|Q115782668|مرجع=النحاس1985}} * {{استشهاد بويكي بيانات/ملعب|Q115746114|مرجع=القحطاني1989}} * {{استشهاد بويكي بيانات|Q115746114|مرجع=القحطاني1989}} * {{استشهاد بويكي بيانات/ملعب|Q19443162}} * {{استشهاد بويكي بيانات|Q19443162}} * {{استشهاد بويكي بيانات/ملعب|Q115640897|مرجع=درويش1992}} * {{استشهاد بويكي بيانات|Q115640897|مرجع=درويش1992}} * {{استشهاد بويكي بيانات/ملعب|Q115754123|مرجع=الواحدي1992}} * {{استشهاد بويكي بيانات|Q115754123|مرجع=الواحدي1992}} * {{استشهاد بويكي بيانات/ملعب|Q115651867|مرجع=الداني1994}} * {{استشهاد بويكي بيانات|Q115651867|مرجع=الداني1994}} * {{استشهاد بويكي بيانات/ملعب|Q115756452|مرجع=عطية1995}} * {{استشهاد بويكي بيانات|Q115756452|مرجع=عطية1995}} * {{استشهاد بويكي بيانات/ملعب|Q115701544|مرجع=ابن كثير1998}} * {{استشهاد بويكي بيانات|Q115701544|مرجع=ابن كثير1998}} * {{استشهاد بويكي بيانات/ملعب|Q115730072|مرجع=ابن عادل1998}} * {{استشهاد بويكي بيانات|Q115730072|مرجع=ابن عادل1998}} * {{استشهاد بويكي بيانات/ملعب|Q115730115|مرجع=الرازي2000}} * {{استشهاد بويكي بيانات|Q115730115|مرجع=الرازي2000}} * {{استشهاد بويكي بيانات/ملعب|Q97221368|مرجع=الطبري2001}} * {{استشهاد بويكي بيانات|Q97221368|مرجع=الطبري2001}} * {{استشهاد بويكي بيانات/ملعب|Q115484580|مرجع=أحمد2001}} * {{استشهاد بويكي بيانات|Q115484580|مرجع=أحمد2001}} * {{استشهاد بويكي بيانات/ملعب|Q115683684}} * {{استشهاد بويكي بيانات|Q115683684}} * {{استشهاد بويكي بيانات/ملعب|Q115640158|مرجع=الدعاس2004}} * {{استشهاد بويكي بيانات|Q115640158|مرجع=الدعاس2004}} * {{استشهاد بويكي بيانات/ملعب|Q115683765|مرجع=سلامة2006}} * {{استشهاد بويكي بيانات|Q115683765|مرجع=سلامة2006}} * {{استشهاد بويكي بيانات/ملعب|Q115701920|مرجع=ابن القيم2007}} * {{استشهاد بويكي بيانات|Q115701920|مرجع=ابن القيم2007}} * {{استشهاد بويكي بيانات/ملعب|Q115743500}} * {{استشهاد بويكي بيانات|Q115743500}} * {{استشهاد بويكي بيانات/ملعب|Q115615370|مرجع=الشايع2011}} * {{استشهاد بويكي بيانات|Q115615370|مرجع=الشايع2011}} * {{استشهاد بويكي بيانات/ملعب|Q140501357}} * {{استشهاد بويكي بيانات|Q140501357}} * {{استشهاد بويكي بيانات|Q136804563|ج=2|ص=442}} * {{استشهاد بويكي بيانات/ملعب|Q136804563|ج=2|ص=442}} <div dir="ltr"> * {{استشهاد بويكي بيانات/ملعب|Q115917529|مرجع=Dyson1999}} * {{استشهاد بويكي بيانات|Q115917529|مرجع=Dyson1999}} * {{استشهاد بويكي بيانات/ملعب|Q118316084|مرجع=Javvin2005}} * {{استشهاد بويكي بيانات|Q118316084|مرجع=Javvin2005}} * {{استشهاد بويكي بيانات/ملعب|Q115917346|مرجع=Kozierok2005}} * {{استشهاد بويكي بيانات|Q115917346|مرجع=Kozierok2005}} * {{استشهاد بويكي بيانات/ملعب|Q115922106|مرجع=Fall2012}} * {{استشهاد بويكي بيانات|Q115922106|مرجع=Fall2012}} * {{استشهاد بويكي بيانات/ملعب|Q115919723|مرجع=Odom2013}} * {{استشهاد بويكي بيانات|Q115919723|مرجع=Odom2013}} * {{استشهاد بويكي بيانات/ملعب|Q9065143}} </div> kn7crfnfwutkr3l68tmqk2vq8qkzazc وحدة:Cite Q/ملعب 828 231230 1096562 1096472 2026-07-17T20:30:38Z حبيشان 31560 1096562 Scribunto text/plain --[[ Cite Q النسخة العربية مشتق من النسخة الإنجليزية ]] local p = {} require('strict') local sandbox = '' local WdItem = require('Module:WdItem' .. sandbox) local cfg = mw.loadData('Module:Cite Q/config' .. sandbox) local getStatementsByVol = WdItem.getStatementsByVol local rtl_lang = {ar = true, fa = true, ur = true, ku = true, he = true, arc = true, dv = true, ha = true, khw = true, ks = true, ps = true, yi = true, ota = true } local ref_cash = {} --[[-------------------< A R G U M E N T _ W R A P P E R >---------------------- Argument wrapper. This function provides support for argument mapping defined in the configuration file so that multiple names can be transparently aliased to single internal variable. ]] local function argument_wrapper ( arglist ) local origin = {}; local nilargs = {}; return setmetatable({ ORIGIN = function ( self, k ) local dummy = self[k]; -- force the variable to be loaded. return origin[k]; end }, { __index = function ( tbl, k ) local v = rawget(tbl,k) if v then return v elseif nilargs[k] then return nil end local list = (type(k)=="number") and k or cfg.aliases[k]; if type( list ) == 'table' then for _, alias_key in pairs( list ) do if arglist[alias_key] then v = arglist[alias_key] origin[k] = alias_key break; end end elseif list ~= nil then v = arglist[list] if v then origin[k] = list end end if v == nil then nilargs[k] = true else rawset( tbl, k, v ) end return v end, }); end ------------------------------------------------------------------------------- -- makeOrdinal needs to be internationalised along with the above i18n -- takes cardinal number as a numeric and returns the ordinal as a string -- we need three exceptions in English for 1st, 2nd, 3rd, 21st, .. 31st, etc. ------------------------------------------------------------------------------- p.makeOrdinal = function(cardinal) local card = tonumber(cardinal) if not card then return cardinal end local ordsuffix = cfg.i18n.ordinal.default if card % 10 == 1 then ordsuffix = cfg.i18n.ordinal[1] elseif card % 10 == 2 then ordsuffix = cfg.i18n.ordinal[2] elseif card % 10 == 3 then ordsuffix = cfg.i18n.ordinal[3] end -- In English, 1, 21, 31, etc. use 'st', but 11, 111, etc. use 'th' -- similarly for 12 and 13, etc. if (card % 100 == 11) or (card % 100 == 12) or (card % 100 == 13) then ordsuffix = cfg.i18n.ordinal.default end return card .. ordsuffix end --[[--------------------------< I S _ S E T >-------------------------------------------------------------- Returns true if argument is set; false otherwise. Argument is 'set' when it exists (not nil) or when it is not an empty string. ]] local function is_set( var ) return not (var == nil or var == '') end --[[--------------------------< I N _ A R R A Y >-------------------------------------------------------------- Whether needle is in haystack (taken from Module:Citation/CS1/Utilities) ]] local function in_array( needle, haystack ) if needle == nil then return false end for n, v in ipairs( haystack ) do if v == needle then return n end end return false end --[[--------------------------< A C C E P T _ V A L U E >------------------------------------------------------- Accept WD value by framing in ((...)) if param_val is equal to keyword; else pass-through WD value as is. ]] local function accept_value( param_val, wd_val ) local val = param_val if val then if in_array (val, {'accept', '))((', ':d:'}) then val = '((' .. wd_val .. '))' elseif '((accept))' == val then val = 'accept' elseif '(())(())' == val then val = '))((' elseif '((:d:))' == val then val = ':d:' else val = wd_val end end return val end -- function to fetch a value to display local function makelink(v, out, link, maxpos, wdl, lang) local label if v.mainsnak.snaktype == "value" then if v.mainsnak.datatype == "wikibase-item" then local qnumber = v.mainsnak.datavalue.value.id local sitelink = mw.wikibase.getSitelink(qnumber) if qnumber == "Q2818964" then sitelink = nil end -- suppress link to "Various authors" -- من المهم التحقق من وجود datavalue if v.qualifiers and v.qualifiers.P1932 and v.qualifiers.P1932[1].datavalue then label = v.qualifiers.P1932[1].datavalue.value else label = mw.wikibase.getLabelByLang(qnumber, lang) or mw.wikibase.getLabel(qnumber) if label then label = mw.text.nowiki(label) else label = qnumber -- should add tracking category end end local position = maxpos + 1 -- Default to 'next' author. -- use P1545 (series ordinal) instead of default position. if v["qualifiers"] and v.qualifiers["P1545"] and v.qualifiers["P1545"][1] then position = tonumber(v.qualifiers["P1545"][1].datavalue.value) end maxpos = math.max(maxpos, position) if sitelink then -- just the plain name, -- but keep a record of the links, using the same index out[position] = label link[position] = sitelink else if wdl then -- show that there's a Wikidata entry available out[position] = "[[:d:Q" .. v.mainsnak.datavalue.value["numeric-id"] .. "|" .. label .. "]]&nbsp;<span title='" .. cfg.i18n["errors"]["local-article-not-found"] .. "'>[[ملف:Wikidata-logo.svg|16px|alt=|link=]]</span>" else -- no Wikidata links wanted, so just give the plain label out[position] = label end end elseif v.mainsnak.datatype == "string" then local position = maxpos + 1 -- Default to 'next' author. -- use P1545 (series ordinal) instead of default position. if v["qualifiers"] and v.qualifiers["P1545"] and v.qualifiers["P1545"][1] then position = tonumber(v.qualifiers["P1545"][1].datavalue.value) end maxpos = math.max(maxpos, position) out[position] = v.mainsnak.datavalue.value else -- not a wikibase-item or a string! end else -- code here if we want to return something when author is "unknown" -- من المهم التحقق من وجود datavalue if v.qualifiers and v.qualifiers.P1932 and v.qualifiers.P1932[1].datavalue then label = v.qualifiers.P1932[1].datavalue.value else label = mw.wikibase.getLabelByLang("Q4233718", lang):gsub("^%l", mw.ustring.upper) end maxpos = maxpos + 1 out[maxpos] = label end return maxpos end --[=[-------------------------< G E T _ N A M E _ L I S T >---------------------------------------------------- get_name_list -- adapted from getAuthors code taken from Module:RexxS arguments: nl_type - type of name list to fetch: nl_type = 'author' for authors; 'editor' for editors; 'translator' for translators args - pointer to the parameter arguments table from the template call qid - value from |qid= parameter; the Q-id of the source (book, etc.) in qid wdl - value from the |wdl= parameter; a Boolean passed to enable links to Wikidata when no article exists returns nothing; modifies the args table ]=] local function get_name_list (nl_type, args, qid, wdl, lang, vol, chapter, refsnak) local propertyID = "P50" local fallbackID = "P2093" -- author name string if nl_type =="author" then propertyID = 'P50' -- for authors fallbackID = 'P2093' -- author-string elseif nl_type =="editor" then propertyID = 'P5769' -- "editor-in-chief" fallbackID = 'P98' -- for editors - So-called "fallbacks" are actually a second set of properties processed -- TBD. Take book series editors into account as well (if they have a separate P code as well)? elseif nl_type == "translator" then propertyID = 'P655' -- for translators fallbackID = nil -- elseif 'contributor' == nl_type then -- f.e. author of forewords (P2679) and afterwords (P2680); requires |contribution=, |title= and |author= -- propertyID = 'P' -- for contributors -- fallbackID = nil else return -- not specified so return end -- wdl is a Boolean passed to enable links to Wikidata when no article exists -- if "false" or "no" or "0" is passed set it false -- if nothing or an empty string is passed set it false if wdl and (#wdl > 0) then wdl = wdl:lower() wdl = in_array (wdl, {"false", "no", "0"}) else -- wdl is empty, so wdl = false end local props = nil local fallback = nil if qid then if mw.wikibase.entityExists(qid) then props = getStatementsByVol(qid, propertyID, vol, chapter) if #props == 0 and fallbackID then fallback = getStatementsByVol(qid, fallbackID, vol, chapter) end end elseif refsnak then props = refsnak[propertyID] if not props and fallbackID then fallback = refsnak[fallbackID] end end -- Make sure it actually has at least one of the properties requested if not (props and props[1]) and not (fallback and fallback[1]) then return nil end -- So now we have something to return: -- table 'out' is going to store the names(s): -- and table 'link' will store any links to the name's article local out = {} local link = {} local maxpos = 0 if props and props[1] then for k, v in pairs(props) do maxpos = makelink(v, out, link, maxpos, wdl, lang) end end if fallback and fallback[1] then -- second properties for k, v in pairs(fallback) do maxpos = makelink(v, out, link, maxpos, wdl, lang) end end -- if there's anything to return, then insert the additions in the template arguments table -- in the form |author1=firstname secondname |author2= ... -- Renumber, in case we have inconsistent numbering local keys = {} for k, v in pairs(out) do keys[#keys + 1] = k end table.sort(keys) -- as they might be out of order for i, k in ipairs(keys) do out[k] = out[k]:gsub ('&#39;', '\''); -- prevent cs1|2 multiple names categorization; replace html entity with the actual character if args[nl_type .. i] then -- name gets overwritten -- pull corresponding -link only if overwritten name is same as WD name if link[k] and (args[nl_type .. i] == out[k]) then args[nl_type .. '-link' .. i] = args[nl_type .. '-link' .. i] or link[k] -- author-linkn or editor-linkn end else -- name does not get overwritten, so pull name from WD args[nl_type .. i] = out[k] if link[k] then args[nl_type .. '-link' .. i] = args[nl_type .. '-link' .. i] or link[k] -- author-linkn or editor-linkn end end end end function p._getLangOfSnakProp(snak, pid) if not pid or not snak then return {} end local out = {} local props = snak[pid] for i, v in ipairs(props) do if v.datatype == "monolingualtext" and v.datavalue then out[#out + 1] = v.datavalue.value.language end end return out end function p.getLangOfProp(frame) local pid = frame.args.pid or mw.text.trim(frame.args[1] or "") if pid == "" then return end local qid = frame.args.qid if qid == "" then qid = nil end local Q = WdItem.new(qid, { fwd = "ALL", osd = false, noicon = true }) return table.concat(Q:getLangOfProp(pid), ", ") end -- gets the language codes of a Wikidata entry as a table local function _lang_code(Qitem) local lc = Qitem:getPropOfProp( "P407", "P424") if lc then return mw.text.split( lc, "[,، ]+" ) end --modified lc = Qitem:getPropOfProp( "P407", "P218" ) if lc then return mw.text.split( lc, "[,، ]+" ) end --modified return Qitem:getLangOfProp("P1476") end function p.lang_code(frame) local Q = WdItem.newItem(frame.args.qid or mw.text.trim(frame.args[1] or ""), { fwd = "ALL", osd = false, noicon = true }) return table.concat(_lang_code(Q), ", ") end -- wraps a string in nowiki unless disable flag is set local function wrap_nowiki(str, disable) if disable then return str or '' end return mw.text.nowiki(str or '') end -- sort sequence table whose values are key-value pairs by key local function comp_key(a, b) local param_a, enum_a = a[1]:match ('(%D+)(%d+)$'); -- get param name and enumerator from <a> local param_b, enum_b = b[1]:match ('(%D+)(%d+)$'); -- get param name and enumerator from <b> if enum_a and enum_b then -- if both parameters have neumerators if param_a == param_b then -- are parameter names the same? return tonumber (enum_a) < tonumber (enum_b); -- yes: compare enumerators end end return a[1] < b[1]; -- alpha sort if here end -- sort sequence table whose values are key-value pairs by value local function comp_val(a, b) return a[2] < b[2] end -- ref filtering for citing from wikidata local function is_rejected(item) -- rejected Q if cfg.rejected.sources[item]==true then return true; end -- rejected Properties local item_entity = mw.wikibase.getEntity(item); for _, v in pairs(cfg.rejected.properties) do if (#item_entity:getAllStatements( v )>0 ) then return true; end end -- Rejected InatanceOf local instance = item_entity:getAllStatements( "P31" ) for _,v in pairs(instance) do if cfg.rejected.instances[v.mainsnak.datavalue.value.id] then return true; end end --No used Properties local has_properties = false for k, _ in pairs(cfg.used_properties) do if (#item_entity:getAllStatements( k )>0 ) then has_properties = true; break; end end return not has_properties; end function p._cite_web(citeq_args) local refsnak= citeq_args.snak local Q citeq_args.snak = nil -- retrieve all the parameters local pqid = citeq_args.pqid citeq_args.pqid = nil local wdl = false local qid = nil local multi_args = { P50 = "author", P2093 = "author", P5769 = "editor", P98 = "editor", P655 = "translator", } Q = WdItem.newSnakItem(refsnak, {fwd = "ALL", osd = false, noicon = true}) -- find language local langcodes = {} if refsnak["P1476"] then langcodes = p._getLangOfSnakProp(refsnak, "P1476") citeq_args.language = citeq_args.language or langcodes[1] end langcodes[#langcodes+1] = 'ar' langcodes[#langcodes+1] = 'en' Q:setOptions({ langs = langcodes }) local labellang = langcodes[1] local rtl = rtl_lang[langcodes[1]] or false local oth = {} for i in pairs(refsnak) do local label = "" -- multiple authors may be given if refsnak[i][1].snaktype ~= 'novalue' then if multi_args[i] then get_name_list (multi_args[i], citeq_args, qid, wdl, labellang) elseif cfg.used_properties[i] and type(cfg.used_properties[i]) == "table" then local data = cfg.used_properties[i] local langidx = 1 while citeq_args[data.arg] == nil and langidx<=#langcodes do citeq_args[data.arg] = Q:getValue( i, { maxvals = data.maxvals, linked = data.linked, rank = data.rank or "best", lang=langcodes[langidx] } ) if citeq_args[data.arg] == nil then break elseif citeq_args[data.arg]:find('[[تصنيف:Articles with missing Wikidata information]]', 1, true) then citeq_args[data.arg] = nil langidx = langidx + 1 else break end end if not citeq_args[data.arg] then citeq_args[data.arg] = Q:getValue( i, { maxvals = data.maxvals, linked = data.linked} ) if citeq_args[data.arg]:find('^Q%d+$') then -- qid was returned -- try fallback to qid's native language local qid_languages = _lang_code(WdItem.newItem( citeq_args[data.arg], { fwd = "ALL", osd = false, noicon = true } )) citeq_args[data.arg] = Q:getValue( i, { maxvals = data.maxvals, linked = data.linked, lang = qid_languages[1]} ) if citeq_args[data.arg]:find('^Q%d+$') then -- qid was returned again citeq_args[data.arg] = nil else -- record the language found if no lang specified citeq_args.language = citeq_args.language or qid_languages[1] end end end --- translate unknown value if citeq_args[data.arg] == "Unknown" then if rtl then citeq_args[data.arg] = cfg.i18n.ar["unknown-" .. data.arg] or cfg.i18n.ar["unknown"] else citeq_args[data.arg] = mw.wikibase.getLabelByLang("Q4233718", lang):gsub("^%l", mw.ustring.upper) end end ----------------- if data.others then oth[#oth + 1] = citeq_args[data.arg] and ((cfg.i18n.ar[data.arg] or data.arg:gsub("^%l", string.upper)) .. ": " .. citeq_args[data.arg]) citeq_args[data.arg] = nil end elseif cfg.used_properties[i] then if i == "P648" then citeq_args.ol = (Q:getValue( "P648", { maxvals = 1 } ) or ''):gsub("^OL(.+)$", "%1") if citeq_args.ol == "" then citeq_args.ol = nil end elseif i == "P957" then citeq_args.isbn = Q:getValue("P957", { maxvals = 1 } ) elseif in_array(i,{"P854", "P953", "P856", "P2699"}) then local url; for _, pr in ipairs( {"P854", "P953", "P856", "P2699"} ) do url = Q:getValue( pr, { maxvals = 1 } ) if url then citeq_args.url = mw.text.split( url, " (", true )[1] local arcurl = mw.ustring.match( url, " %((.*)%)" ) -- when there is an archive url, <url> holds: url<space>(archive url); here extract the archive url if present if arcurl then local arcy, arcm, arcd = arcurl:match("(20%d%d)%p?(%d%d)%p?(%d%d)") if arcy and arcm and arcd then citeq_args["archive-url"] = arcurl citeq_args["archive-date"] = tonumber(arcd) .. " " .. cfg.i18n.months[tonumber(arcm)] .. " " .. arcy end end break end end end end end end if citeq_args.url then if refsnak["P813"] then citeq_args.accessdate = Q:getValue("P813", { maxvals = 1 } ) end if refsnak["P1065"] and refsnak["P2960"] then citeq_args["archive-url"] = Q:getValue("P1065", { maxvals = 1 } ) citeq_args["archive-date"]= Q:getValue("P2960", { maxvals = 1 } ) end end citeq_args.others = citeq_args.others or table.concat(oth, ". ") if citeq_args.others == "" then citeq_args.others = nil end citeq_args.biorxiv = citeq_args.biorxiv and ("10.1101/" .. citeq_args.biorxiv) -- if url then see if there's an archive: citeq_args.url local url local title_display = citeq_args.title if citeq_args.url then citeq_args.title = wrap_nowiki(title_display) end -- TBD: incorporate |at, |sheets= and |sheet= here as well -- Sort out what should happen if several of them are given at the same time if citeq_args.page or citeq_args.p then -- let single take precedence over multiple citeq_args.pages = nil citeq_args.pp = nil end if citeq_args.pages then local _, count = string.gsub(citeq_args.pages, "[,;%s]%d+", "") if count == 1 then citeq_args.page = citeq_args.pages citeq_args.pages = nil end end for k, v in pairs(citeq_args) do if in_array (v, {'(())', 'unset', 'ignore'}) or 'string' ~= type(k) then -- empty accept-as-is-written (()) markup to indicate an empty/unused parameter value, other ((...)) markups are deliberately passed down to {{citation}} citeq_args[k] = nil elseif in_array (v, {'((unset))', '((ignore))'}) then -- strip off markup for free-text values clashing with local keywords citeq_args[k] = 'unset' end end local author_count = 0 for k, v in pairs(citeq_args) do if k:find("^author%d+$") then author_count = author_count + 1 end end if author_count > 8 then -- convention in astronomy journals, optional mode for this? if 'all' == citeq_args['display-authors'] then citeq_args['display-authors'] = nil; -- unset because no longer needed else citeq_args['display-authors'] = citeq_args['display-authors'] or 3 -- limit to three displayed names end end -- replace no-break space by space, User:Mr. Ibrahem if citeq_args.title then citeq_args.title = mw.ustring.gsub( citeq_args.title, "\194\160", " " ) end local editor_count = 0 for k, v in pairs(citeq_args) do if k:find("^editor%d+$") then editor_count = editor_count + 1 end end if editor_count > 8 then -- convention in astronomy journals, optional mode for this? if 'all' == citeq_args['display-editors'] then citeq_args['display-editors'] = nil; -- unset because no longer needed else citeq_args['display-editors'] = citeq_args['display-editors'] or 3 -- limit to three displayed names end end -- code to make a guess what template to use from the supplied parameters -- (first draft for proof-of-concept) local template = "ويب" -- |id= could hold more than one identifier pulled from Wikidata not supported by {{citation}}, right now only add our qid to the list local list_sep = '. ' if citeq_args.mode ~= 'cs1' then list_sep = ', ' end -- clean up any blank parameters for k, v in pairs(citeq_args) do if v == "" then citeq_args[k] = nil end end if template then -- citeq_args.mode = citeq_args.mode or "cs1" -- a cs1 template already knows that it is cs1 so this line is superfluous template = "استشهاد " .. template else -- citeq_args.mode = citeq_args.mode or "cs2" -- a cs2 template already knows that it is cs2 so this line is superfluous template = "استشهاد" end citeq_args['no-tracking'] = 'true' -- لإيقاف ظهور تصانيف التتبع return mw.getCurrentFrame():expandTemplate{title = template, args = citeq_args} -- render the template end --[[-------------------------< C I T E _ Q >------------------------------------------------------------------ Takes standard CS1|2 template parameters and passes all to {{citation}}. If neither of |author= and |author1= are set, calls get_authors() to try to get an author name-list from Wikidata. The result is passed to {{citation}} for rendering. --]] function p._cite_q (in_citeq_args) local frame = mw.getCurrentFrame() local citeq_args = {} local origin_args = {} local Q -- parameters that don't get passed to Citation local expand = in_citeq_args.expand -- when set to anything, causes {{cite q}} to render <code><nowiki>{{citation|...}}</nowiki></code> local qid = in_citeq_args.qid or in_citeq_args[1] local wdl = in_citeq_args.wdl local template = in_citeq_args.template local cite_class = 'citation' local rtl = true local snak = in_citeq_args.snak or {} local pqid = in_citeq_args.pqid in_citeq_args.expand = nil in_citeq_args[1] = nil in_citeq_args.qid = nil in_citeq_args.wdl = nil in_citeq_args.template = nil in_citeq_args.snak = nil in_citeq_args.pqid = nil if in_citeq_args.wikidatacite then citeq_args = in_citeq_args else local A = argument_wrapper(in_citeq_args) local loaded_args ={} for _,args_table in pairs({cfg.simple_properties,cfg.used_args}) do for k,_ in pairs(args_table) do if A[k] then citeq_args[k] = A[k] if k ~= A:ORIGIN(k) then origin_args[k] = A:ORIGIN(k) table.insert(loaded_args, A:ORIGIN(k)) else table.insert(loaded_args, k) end end end end for k,v in pairs(in_citeq_args) do if not in_array(k,loaded_args) then citeq_args[k] = v end end end -- if title supplied, flag to not read html title local vol = citeq_args.volume local chapter = citeq_args.chapter local titleforced = (citeq_args.title ~= nil) local default_opt = {rank = "best", fetchwikidata = "ALL", onlysourced = false, noicon = true, vol=vol, chapter=chapter} if #snak > 0 then Q = WdItem.newSnakItem(snak,default_opt) else Q = WdItem.newItem(qid, default_opt) end local oth = {} -- put the language codes into a sequential table langcodes[] local langcodes = {} if citeq_args.language then -- check these are a supported language codes for lc in mw.text.gsplit( citeq_args.language, "[,، ]+", false ) do --modified langcodes[#langcodes+1] = mw.language.isSupportedLanguage(lc) and lc end end if not langcodes[1] then -- try to find language of work langcodes = _lang_code(Q) end if not langcodes[1] then -- try fallback to journal's language local journal_qid = Q:followQid("P1433") langcodes = journal_qid and _lang_code(journal_qid) end citeq_args.language = citeq_args.language or table.concat(langcodes, ", ") Q:setOptions( { langs = langcodes } ); local labellang = langcodes[1] or 'ar' rtl = rtl_lang[langcodes[1]] or false -- loop through list of simple properties and get their values in citeq_args for name, data in pairs(cfg.simple_properties) do citeq_args[name] = citeq_args[name] or Q:getValue(data.id, { maxvals = data.maxvals, linked = data.linked, qual = data.qual, no_vol_qual = data.no_vol_qual } ) if not citeq_args[name] and data.populate_from_journal then local publishedin = Q:getValue("P1433", {maxvals = 0, lang = labellang, qual = data.id, qualsonly = true} ) citeq_args[name] = publishedin or Q:getPropOfProp("P1433", data.id, {lang = labellang, maxvals = data.maxvals}) end if citeq_args[name] and citeq_args[name]:find('[[تصنيف:Articles with missing Wikidata information]]', 1, true) then -- try fallback to work's native language citeq_args[name] = Q:getValue( data.id, { maxvals = data.maxvals, linked = data.linked, no_vol_qual = data.no_vol_qual} ) if citeq_args[name]:find('^Q%d+$') then -- qid was returned -- try fallback to qid's native language local qid_languages = _lang_code(citeq_args[name]) citeq_args[name] = Q:getValue( data.id, {maxvals = data.maxvals, linked = data.linked, lang = qid_languages[1], no_vol_qual = data.no_vol_qual} ) if citeq_args[name]:find('^Q%d+$') then -- qid was returned again citeq_args[name] = nil else -- record the language found if no lang specified citeq_args.language = citeq_args.language or qid_languages[1] end end end if citeq_args[name] and snak[data.id] then snak[data.id] = nil end --- translate unknown value if citeq_args[name] == "Unknown" and rtl then citeq_args[name] = cfg.i18n.ar["unknown-" .. name] or cfg.i18n.ar["unknown"] end ----------------- if data.others then oth[#oth + 1] = citeq_args[name] and ((rtl and cfg.i18n.ar[name] or name:gsub("^%l", string.upper)) .. ": " .. citeq_args[name]) citeq_args[name] = nil end end citeq_args.others = citeq_args.others or table.concat(oth, ". ") if citeq_args.others == "" then citeq_args.others = nil end citeq_args.journal = citeq_args.journal and citeq_args.journal:gsub("^''", ""):gsub("''$", ""):gsub("|''", "|"):gsub("'']]", "]]") citeq_args.ol = citeq_args.ol or (Q:getValue("P648", { maxvals = 1 } ) or ''):gsub("^OL(.+)$", "%1") if citeq_args.ol == "" then citeq_args.ol = nil end -- TBD. Take care of |ol-access=? citeq_args.biorxiv = citeq_args.biorxiv and ("10.1101/" .. citeq_args.biorxiv) citeq_args.isbn = citeq_args.isbn or Q:getValue("P957", { maxvals = 1, rank="best" } ) -- try ISBN 10 (only one value accepted) -- if url then see if there's an archive: citeq_args.url local url --find formatted url if snak ~= {} then for k, v in pairs(snak) do if (v[1].datatype == "external-id") then local furl = mw.wikibase.getBestStatements( k, "P1630" ) if 0 ~= #furl then furl = furl[1]["mainsnak"]["datavalue"]["value"] citeq_args.url = mw.message.newRawMessage(furl, {v[1]["datavalue"]["value"]}):plain() snak[k] = nil break; end end end if citeq_args.url == nil and pqid and qid then local refproperty = mw.wikibase.getBestStatements(qid , "P1687" ) if 0 ~= #refproperty then -- خطأ لوا في وحدة:Cite_Q على السطر 1124: attempt to index field 'datavalue' (a nil value). if refproperty[1]["mainsnak"] and refproperty[1]["mainsnak"]["datavalue"] and refproperty[1]["mainsnak"]["datavalue"]["value"] then refproperty=refproperty[1]["mainsnak"]["datavalue"]["value"]["id"] local furl = mw.wikibase.getBestStatements( refproperty, "P1630" ) if 0 ~= #furl then furl = furl[1]["mainsnak"]["datavalue"]["value"] local refval = mw.wikibase.getBestStatements( pqid, refproperty ) refval = (0 ~= #refval) and refval[1]["mainsnak"]["datavalue"]["value"] if refval then citeq_args.url = mw.message.newRawMessage(furl, {refval}):plain() end end end end end end if not citeq_args.url then for i, pr in ipairs( {"P953", "P856", "P2699"} ) do url = Q:getValue(pr, { maxvals = 1, qual="P1065" } ) if url then citeq_args.url = mw.text.split( url, " (", true )[1] local arcurl = mw.ustring.match( url, " %((.*)%)" ) -- when there is an archive url, <url> holds: url<space>(archive url); here extract the archive url if present if arcurl then local arcy, arcm, arcd = arcurl:match("(20%d%d)%p?(%d%d)%p?(%d%d)") if arcy and arcm and arcd then citeq_args["archive-url"] = arcurl citeq_args["archive-date"] = tonumber(arcd) .. " " .. cfg.i18n.months[tonumber(arcm)] .. " " .. arcy end end break end end end -- if citeq_args.publisher == "Unknown" then -- look for "stated as" (P1932) -- local stated_as = Q:getValue( "P123", { maxvals = 1, qual="P1932", qualsonly=true} ) -- if stated_as then citeq_args.publisher = stated_as end -- end if not titleforced then -- Handle subtitle. mw.log('in subtitle') if citeq_args.title then local subtitle = Q:getValue('P1680'); mw.log('subtitle: ' .. tostring(subtitle)) if subtitle then citeq_args.title = citeq_args.title .. ": " .. subtitle end end local htmltitle = Q:getValue("P1476", {qual = "P6833", maxvals = 1, qualsonly = true} ) mw.log('htmltitle: ' .. tostring(htmltitle)) if htmltitle then citeq_args.title = htmltitle:gsub("</?i>", "''") else local title_display = citeq_args.title or (langcodes[1] and mw.wikibase.getLabelByLang(qid, langcodes[1])) or mw.wikibase.getLabel(qid) if title_display and snak and snak.P1810 then title_display=title_display .. " | " .. snak.P1810[1].datavalue.value snak.P1810 = nil end title_display = title_display or ("No label or title -- debug: " .. qid) if citeq_args.url then citeq_args.title = wrap_nowiki(title_display) else local slink = mw.wikibase.getSitelink(qid) local slink_flag = false local wrap_title = '' local wslink = false if not slink then -- See if we have wikisource if not citeq_args.url then local wikisource_sitelink = mw.wikibase.getSitelink(qid, "arwikisource") or nil if wikisource_sitelink then slink = ':s:'..wikisource_sitelink wslink = true end end end if citeq_args.title then if slink then wrap_title = wrap_nowiki(citeq_args.title) slink_flag = true else citeq_args.title = wrap_nowiki(citeq_args.title) end else if slink and not wslink then if slink:lower() == title_display:lower() then citeq_args.title = '[[' .. slink .. ']]' else wrap_title = wrap_nowiki(slink:gsub("%s%(.+%)$", ""):gsub(",.+$", "")) slink_flag = true end elseif wslink then wrap_title = wrap_nowiki(title_display) slink_flag = true else citeq_args.title = wrap_nowiki(title_display) end end if slink_flag then if slink == wrap_title and not wslink then -- direct link citeq_args.title = '[[' .. slink .. ']]' else -- piped link citeq_args.title = '[[' .. slink .. '|' .. wrap_title .. ']]' end end end end end -- replace no-break space by space, User:Mr. Ibrahem if citeq_args.title then citeq_args.title = mw.ustring.gsub( citeq_args.title, "\194\160", " " ) end -- fetch other snak properties for debugging -- if snak and snak ~= {} then -- for k,v in pairs(snak) do -- if not used_properties[k] then -- end -- end -- end -- TBD: incorporate |at, |sheets= and |sheet= here as well -- Sort out what should happen if several of them are given at the same time if citeq_args.page then -- let single take precedence over multiple citeq_args.pages = nil citeq_args.pp = nil end if citeq_args.pages then local _, count = string.gsub(citeq_args.pages, "[,;%s]%d+", "") if count == 1 then citeq_args.page = citeq_args.pages citeq_args.pages = nil end end if is_set (qid) then if not is_set (citeq_args.author) and not is_set (citeq_args.author1) and not is_set (citeq_args.subject) and not is_set (citeq_args.subject1) and not is_set (citeq_args.host) and not is_set (citeq_args.host1) and not is_set (citeq_args.last) and not is_set (citeq_args.last1) and not is_set (citeq_args.surname) and not is_set (citeq_args.surname1) and not is_set (citeq_args['author-last']) and not is_set (citeq_args['author-last1']) and not is_set (citeq_args['author1-last']) and not is_set (citeq_args['author-surname']) and not is_set (citeq_args['author-surname1']) and not is_set (citeq_args['author1-surname1']) then -- if neither are set, try to get authors from Wikidata get_name_list ('author', citeq_args, qid, wdl, labellang, vol, chapter) -- modify citeq_args table with authors from Wikidata end if not is_set (citeq_args.editor) and not is_set (citeq_args.editor1) and not is_set (citeq_args['editor-last']) and not is_set (citeq_args['editor-last1']) and not is_set (citeq_args['editor1-last']) and not is_set (citeq_args['editor-surname']) and not is_set (citeq_args['editor-surname1']) and not is_set (citeq_args['editor1-surname']) then -- if neither are set, try to get editors from Wikidata get_name_list ('editor', citeq_args, qid, wdl, labellang, vol, chapter) -- modify citeq_args table with editors from Wikidata end if not is_set (citeq_args.translator) and not is_set (citeq_args.translator1) and not is_set (citeq_args['translator-last']) and not is_set (citeq_args['translator-last1']) and not is_set (citeq_args['translator1-last']) and not is_set (citeq_args['translator-surname']) and not is_set (citeq_args['translator-surname1']) and not is_set (citeq_args['translator1-surname']) then -- if neither are set, try to get translators from Wikidata get_name_list ('translator', citeq_args, qid, wdl, labellang, vol, chapter) -- modify citeq_args table with translators from Wikidata end end for k, v in pairs(citeq_args) do if in_array (v, {'(())', 'unset', 'ignore'}) or 'string' ~= type(k) then -- empty accept-as-is-written (()) markup to indicate an empty/unused parameter value, other ((...)) markups are deliberately passed down to {{citation}} citeq_args[k] = nil elseif in_array (v, {'((unset))', '((ignore))'}) then -- strip off markup for free-text values clashing with local keywords citeq_args[k] = 'unset' end end local author_count = 0 for k, v in pairs(citeq_args) do if k:find("^author%d+$") then author_count = author_count + 1 end end if author_count > 8 then -- convention in astronomy journals, optional mode for this? if 'all' == citeq_args['display-authors'] then citeq_args['display-authors'] = nil; -- unset because no longer needed else citeq_args['display-authors'] = citeq_args['display-authors'] or 3 -- limit to three displayed names end end local editor_count = 0 for k, v in pairs(citeq_args) do if k:find("^editor%d+$") then editor_count = editor_count + 1 end end if editor_count > 8 then -- convention in astronomy journals, optional mode for this? if 'all' == citeq_args['display-editors'] then citeq_args['display-editors'] = nil; -- unset because no longer needed else citeq_args['display-editors'] = citeq_args['display-editors'] or 3 -- limit to three displayed names end end -- change edition to ordinal if it's set and numeric if (rtl == false) then citeq_args.edition = citeq_args.edition and p.makeOrdinal(citeq_args.edition) end -- code to make a guess what template to use from the supplied parameters -- (first draft for proof-of-concept) if citeq_args.journal then template = template or "بدورية محكمة" elseif citeq_args.isbn then template = template or "بكتاب" citeq_args.asin = nil -- suppress ASIN if ISBN exists elseif citeq_args.website then template = template or "ويب" end -- template is CS1 designator: journal, web, news, etc. if template then -- citeq_args.mode = citeq_args.mode or "cs1" -- a cs1 template already knows that it is cs1 so this line is superfluous local citeclasses = {["بدورية محكمة"] = 'journal', ["بكتاب"] = "book", ["ويب"] = "web" } cite_class = citeclasses[template] template = "استشهاد " .. template else -- citeq_args.mode = citeq_args.mode or "cs2" -- a cs2 template already knows that it is cs2 so this line is superfluous template = "استشهاد" end -- |id= could hold more than one identifier pulled from Wikidata not supported by {{citation}}, right now only add our qid to the list local list_sep = '. ' if citeq_args.mode ~= 'cs1' then list_sep = ', ' end local id = 'QID:[[:d:' .. qid .. '|' .. qid .. ']]' -- go through "WDQ (identifier)" redirect to reduce clutter in "What links here" and improve reverse lookup. Keep in sync with {{QID}}. local old_id = citeq_args.id if wdl then -- show WD logo id = id .. '[[ملف:Wikidata-logo.svg|16px|alt=|link=]]' -- possibly replace by WD edit icon? end if is_set (old_id) then citeq_args.id = old_id .. list_sep .. id -- append to user-specified contents else citeq_args.id = id end -- clean up any blank parameters for k, v in pairs(citeq_args) do if v == "" then citeq_args[k] = nil end end -- use real param names for CS1 messages for k,v in pairs(origin_args) do if citeq_args[k] and citeq_args[k] == in_citeq_args[v] then citeq_args[v] = citeq_args[k] citeq_args[k] = nil end end -- if |expand=<anything>, write a nowiki'd version to see what the {{citation}} template call looks like if expand then local expand_args = { "{{" .. template .. "\n" } -- init with citation template if expand == "self" then citeq_args.id = old_id -- restore original |id= parameter expand_args = { "{{cite Q|" .. qid } -- expand to itself end -- make a sortable table and sort it by param name local sorttable = {} for param, val in pairs (citeq_args) do table.insert(sorttable, {param, val}) end table.sort(sorttable, comp_key) -- add contents to expand_args for idx, val in ipairs(sorttable) do table.insert(expand_args, val[1] .. '=' .. val[2] .. "\n") end -- make the nowiki'd string and done return table.concat (expand_args, '| ') .. "\n}}" end local erratumid = Q:getPropertyIDs( "P2507", { maxvals = 1 } ) if erratumid then erratumid = " [[d:" .. erratumid .. "|(erratum)]]" .. "[[تصنيف:Cite Q - cites a work with an erratum]]" else erratumid = "" end local opt_cat = '' if Q:getValue( "P5824" ) then opt_cat = '[[تصنيف:Cite Q - cites a retracted work]]<!-- retracted -->' end if Q:getValue( "P1366" ) then opt_cat = opt_cat .. '[[تصنيف:Cite Q - cites a replaced work]]<!-- replaced -->' end if citeq_args.wikidatacite then return frame:expandTemplate{title = template, args = citeq_args} .. erratumid .. opt_cat -- render the template else local CS = require("Module:Citation/CS1" .. sandbox) return CS._citation(frame , citeq_args, {['CitationClass'] = cite_class}) .. erratumid .. opt_cat end end --[[-------------------------< C I T E _ Q >------------------------------------------------------------------ Takes standard CS1|2 template parameters and passes all to {{citation}}. If neither of |author= and |author1= are set, calls get_authors() to try to get an author name-list from Wikidata. The result is passed to {{citation}} for rendering. --]] function p._cite_wikidata (ref, pqid) -- early exit if not ref then return nil end local snak = ref.snaks -- مراجع غير مقبولة if snak.P143 or snak.P3452 then return nil end local hash = ref.hash if hash and hash ~= "" and ref_cash[hash] then return ref_cash[hash] end local citeq_args = {} local frame = mw.getCurrentFrame() if snak.P248 then for _, prop in pairs(snak.P248) do if prop.snaktype == "value" then citeq_args.qid = "Q" .. prop.datavalue.value["numeric-id"] end end snak.P248 = nil; end if citeq_args.qid and is_rejected(citeq_args.qid) == true then return nil end local reference citeq_args.snak = snak citeq_args.pqid = pqid citeq_args.wikidatacite = 1 if citeq_args.qid then reference = p._cite_q(citeq_args) else local has_properties = false for k, _ in pairs(cfg.used_properties) do if snak[k] then has_properties = true; break; end end reference = (has_properties and p._cite_web(citeq_args) or nil) end if reference and reference ~= "" then reference = frame:extensionTag("ref", reference, {name = 'wikidata-' .. hash}) end if hash and hash ~= "" then ref_cash[hash] = reference end return reference end function p.cite_q (frame) local args = {} for k, v in pairs(frame:getParent().args) do if v ~= "" then args[k] = v end end for k, v in pairs(frame.args) do if v ~= "" then args[k] = v end end args.qid = args.qid or args[1] or "" if args.qid == "" then return nil end args[1] = nil local citesep = (args.citesep or "") if citesep == "" then citesep = ", " end citesep = citesep:gsub('"', '') -- strip double quotes after setting default to allow |citesep="" as a blank separator args.citesep = nil local tag = args.tag or "" if tag == "" then tag = nil end args.tag = nil local list = args.list or "" if list == "" then list = nil end args.list = nil args.language = args.language or args.lang args.lang = nil local cites = {} for q in args.qid:gmatch("Q%d+") do -- make a new copy of the arguments local newargs = {} for k, v in pairs(args) do if k ~= "qid" then newargs[k] = v end end newargs.qid = q if tag == "ref" then cites[#cites + 1] = frame:callParserFunction{ name = "#tag:ref", args = { p._cite_q(newargs), name = q } } -- expand like this: args = { p._cite_q(newargs), name = 'foo', group = 'bar' } else cites[#cites + 1] = p._cite_q(newargs) end end if list then return frame:expandTemplate{ title = list, args = cites } else return table.concat(cites, citesep) end end return p qhhz3o7s3m832kefpuayxaohhrq8ms6 1096613 1096562 2026-07-18T10:31:16Z حبيشان 31560 1096613 Scribunto text/plain --[[ Cite Q النسخة العربية مشتق من النسخة الإنجليزية ]] require('strict') local sandbox = '' local WdItem = require('Module:WdItem' .. sandbox) local cfg = mw.loadData('Module:Cite Q/config' .. sandbox) local getStatementsByVol = WdItem.getStatementsByVol local rtl_lang = {ar = true, fa = true, ur = true, ku = true, he = true, arc = true, dv = true, ha = true, khw = true, ks = true, ps = true, yi = true, ota = true } local ref_cash = {} --[[-------------------< A R G U M E N T _ W R A P P E R >---------------------- Argument wrapper. This function provides support for argument mapping defined in the configuration file so that multiple names can be transparently aliased to single internal variable. ]] local function argument_wrapper ( arglist ) local origin = {}; local nilargs = {}; return setmetatable({ ORIGIN = function ( self, k ) local dummy = self[k]; -- force the variable to be loaded. return origin[k]; end }, { __index = function ( tbl, k ) local v = rawget(tbl,k) if v then return v elseif nilargs[k] then return nil end local list = (type(k)=="number") and k or cfg.aliases_t[k]; if type( list ) == 'table' then for _, alias_key in pairs( list ) do if arglist[alias_key] then v = arglist[alias_key] origin[k] = alias_key break; end end elseif list ~= nil then v = arglist[list] if v then origin[k] = list end end if v == nil then nilargs[k] = true else rawset( tbl, k, v ) end return v end, }); end ------------------------------------------------------------------------------- -- makeOrdinal needs to be internationalised along with cfg.i18n_t -- takes cardinal number as a numeric and returns the ordinal as a string -- we need three exceptions in English for 1st, 2nd, 3rd, 21st, .. 31st, etc. ------------------------------------------------------------------------------- local makeOrdinal = function(cardinal) local card = tonumber(cardinal) if not card then return cardinal end local ordsuffix = cfg.i18n_t.ordinal.default if card % 10 == 1 then ordsuffix = cfg.i18n_t.ordinal[1] elseif card % 10 == 2 then ordsuffix = cfg.i18n_t.ordinal[2] elseif card % 10 == 3 then ordsuffix = cfg.i18n_t.ordinal[3] end -- In English, 1, 21, 31, etc. use 'st', but 11, 111, etc. use 'th' -- similarly for 12 and 13, etc. if (card % 100 == 11) or (card % 100 == 12) or (card % 100 == 13) then ordsuffix = cfg.i18n_t.ordinal.default end return card .. ordsuffix end --[[--------------------------< I S _ S E T >-------------------------------------------------------------- Returns true if argument is set; false otherwise. Argument is 'set' when it exists (not nil) or when it is not an empty string. ]] local function is_set( var ) return not (var == nil or var == '') end --[[--------------------------< I N _ A R R A Y >-------------------------------------------------------------- Whether needle is in haystack (taken from Module:Citation/CS1/Utilities) ]] local function in_array( needle, haystack ) if needle == nil then return false end for n, v in ipairs( haystack ) do if v == needle then return n end end return false end --[[--------------------------< A C C E P T _ V A L U E >------------------------------------------------------- Accept WD value by framing in ((...)) if param_val is equal to keyword; else pass-through WD value as is. ]] local function accept_value( param_val, wd_val ) local val = param_val if val then if in_array (val, {'accept', '))((', ':d:'}) then val = '((' .. wd_val .. '))' elseif '((accept))' == val then val = 'accept' elseif '(())(())' == val then val = '))((' elseif '((:d:))' == val then val = ':d:' else val = wd_val end end return val end -- function to fetch a value to display local function makelink(v, out, link, maxpos, wdl, lang) local label if v.mainsnak.snaktype == "value" then if v.mainsnak.datatype == "wikibase-item" then local qnumber = v.mainsnak.datavalue.value.id local sitelink = mw.wikibase.getSitelink(qnumber) if qnumber == "Q2818964" then sitelink = nil end -- suppress link to "Various authors" -- من المهم التحقق من وجود datavalue if v.qualifiers and v.qualifiers.P1932 and v.qualifiers.P1932[1].datavalue then label = v.qualifiers.P1932[1].datavalue.value else label = mw.wikibase.getLabelByLang(qnumber, lang) or mw.wikibase.getLabel(qnumber) if label then label = mw.text.nowiki(label) else label = qnumber -- should add tracking category end end local position = maxpos + 1 -- Default to 'next' author. -- use P1545 (series ordinal) instead of default position. if v["qualifiers"] and v.qualifiers["P1545"] and v.qualifiers["P1545"][1] then position = tonumber(v.qualifiers["P1545"][1].datavalue.value) end maxpos = math.max(maxpos, position) if sitelink then -- just the plain name, -- but keep a record of the links, using the same index out[position] = label link[position] = sitelink else if wdl then -- show that there's a Wikidata entry available out[position] = string.format( "[[:d:Q%s|%s]]&nbsp;<span title='%s'>[[File:Wikidata-logo.svg|16px|alt=|link=]]</span>", v.mainsnak.datavalue.value["numeric-id"], label, cfg.i18n_t["errors"]["local-article-not-found"] ) else -- no Wikidata links wanted, so just give the plain label out[position] = label end end elseif v.mainsnak.datatype == "string" then local position = maxpos + 1 -- Default to 'next' author. -- use P1545 (series ordinal) instead of default position. if v["qualifiers"] and v.qualifiers["P1545"] and v.qualifiers["P1545"][1] then position = tonumber(v.qualifiers["P1545"][1].datavalue.value) end maxpos = math.max(maxpos, position) out[position] = v.mainsnak.datavalue.value else -- not a wikibase-item or a string! end else -- code here if we want to return something when author is "unknown" -- من المهم التحقق من وجود datavalue if v.qualifiers and v.qualifiers.P1932 and v.qualifiers.P1932[1].datavalue then label = v.qualifiers.P1932[1].datavalue.value else label = cfg.i18n_t["unknown-author"][lang] or cfg.i18n_t["unknown-author"]["ar"] end maxpos = maxpos + 1 out[maxpos] = label end return maxpos end --[=[-------------------------< G E T _ N A M E _ L I S T >---------------------------------------------------- get_name_list -- adapted from getAuthors code taken from Module:RexxS arguments: nl_type - type of name list to fetch: nl_type = 'author' for authors; 'editor' for editors; 'translator' for translators args - pointer to the parameter arguments table from the template call qid - value from |qid= parameter; the Q-id of the source (book, etc.) in qid wdl - value from the |wdl= parameter; a Boolean passed to enable links to Wikidata when no article exists returns nothing; modifies the args table ]=] local function get_name_list (nl_type, args, qid, wdl, lang, vol, chapter, refsnak) local propertyID = "P50" local fallbackID = "P2093" -- author name string if nl_type =="author" then propertyID = 'P50' -- for authors fallbackID = 'P2093' -- author-string elseif nl_type =="editor" then propertyID = 'P5769' -- "editor-in-chief" fallbackID = 'P98' -- for editors - So-called "fallbacks" are actually a second set of properties processed -- TBD. Take book series editors into account as well (if they have a separate P code as well)? elseif nl_type == "translator" then propertyID = 'P655' -- for translators fallbackID = nil -- elseif 'contributor' == nl_type then -- f.e. author of forewords (P2679) and afterwords (P2680); requires |contribution=, |title= and |author= -- propertyID = 'P' -- for contributors -- fallbackID = nil else return -- not specified so return end -- wdl is a Boolean passed to enable links to Wikidata when no article exists -- if "false" or "no" or "0" is passed set it false -- if nothing or an empty string is passed set it false if wdl and (#wdl > 0) then wdl = wdl:lower() wdl = in_array (wdl, {"false", "no", "0"}) else -- wdl is empty, so wdl = false end local props = nil local fallback = nil if qid then if mw.wikibase.entityExists(qid) then props = getStatementsByVol(qid, propertyID, vol, chapter) if #props == 0 and fallbackID then fallback = getStatementsByVol(qid, fallbackID, vol, chapter) end end elseif refsnak then props = refsnak[propertyID] if not props and fallbackID then fallback = refsnak[fallbackID] end end -- Make sure it actually has at least one of the properties requested if not (props and props[1]) and not (fallback and fallback[1]) then return nil end -- So now we have something to return: -- table 'out' is going to store the names(s): -- and table 'link' will store any links to the name's article local out = {} local link = {} local maxpos = 0 if props and props[1] then for k, v in pairs(props) do if 'deprecated' ~= v.rank then -- ignore deprecated names maxpos = makelink(v, out, link, maxpos, wdl, lang) end end end if fallback and fallback[1] then -- second properties for k, v in pairs(fallback) do if 'deprecated' ~= v.rank then -- ignore deprecated names maxpos = makelink(v, out, link, maxpos, wdl, lang) end end end -- if there's anything to return, then insert the additions in the template arguments table -- in the form |author1=firstname secondname |author2= ... -- Renumber, in case we have inconsistent numbering local keys = {} for k, v in pairs(out) do keys[#keys + 1] = k end table.sort(keys) -- as they might be out of order for i, k in ipairs(keys) do out[k] = out[k]:gsub ('&#39;', '\''); -- prevent cs1|2 multiple names categorization; replace html entity with the actual character if args[nl_type .. i] then -- name gets overwritten -- pull corresponding -link only if overwritten name is same as WD name if link[k] and (args[nl_type .. i] == out[k]) then args[nl_type .. '-link' .. i] = args[nl_type .. '-link' .. i] or link[k] -- author-linkn or editor-linkn end else -- name does not get overwritten, so pull name from WD args[nl_type .. i] = out[k] if link[k] then args[nl_type .. '-link' .. i] = args[nl_type .. '-link' .. i] or link[k] -- author-linkn or editor-linkn end end end end local function _getLangOfSnakProp(snak, pid) if not pid or not snak then return {} end local out = {} local props = snak[pid] for i, v in ipairs(props) do if v.datatype == "monolingualtext" and v.datavalue then out[#out + 1] = v.datavalue.value.language end end return out end local function getLangOfProp(frame) local pid = frame.args.pid or mw.text.trim(frame.args[1] or "") if pid == "" then return end local qid = frame.args.qid if qid == "" then qid = nil end local Q = WdItem.new(qid, { fwd = "ALL", osd = false, noicon = true }) return table.concat(Q:getLangOfProp(pid), ", ") end -- gets the language codes of a Wikidata entry as a table local function _lang_code(Qitem) local lc = Qitem:getPropOfProp( "P407", "P424") if lc then return mw.text.split( lc, "[,، ]+" ) end --modified lc = Qitem:getPropOfProp( "P407", "P218" ) if lc then return mw.text.split( lc, "[,، ]+" ) end --modified return Qitem:getLangOfProp("P1476") end local function lang_code(frame) local Q = WdItem.newItem(frame.args.qid or mw.text.trim(frame.args[1] or ""), { fwd = "ALL", osd = false, noicon = true }) return table.concat(_lang_code(Q), ", ") end -- wraps a string in nowiki unless disable flag is set local function wrap_nowiki(str, disable) if disable then return str or '' end return mw.text.nowiki(str or '') end -- sort sequence table whose values are key-value pairs by key local function comp_key(a, b) local param_a, enum_a = a[1]:match ('(%D+)(%d+)$'); -- get param name and enumerator from <a> local param_b, enum_b = b[1]:match ('(%D+)(%d+)$'); -- get param name and enumerator from <b> if enum_a and enum_b then -- if both parameters have neumerators if param_a == param_b then -- are parameter names the same? return tonumber (enum_a) < tonumber (enum_b); -- yes: compare enumerators end end return a[1] < b[1]; -- alpha sort if here end -- sort sequence table whose values are key-value pairs by value local function comp_val(a, b) return a[2] < b[2] end -- ref filtering for citing from wikidata local function is_rejected(item) -- rejected Q if cfg.rejected_t.sources[item]==true then return true; end -- rejected Properties local item_entity = mw.wikibase.getEntity(item); for _, v in pairs(cfg.rejected_t.properties) do if (#item_entity:getAllStatements( v )>0 ) then return true; end end -- Rejected InatanceOf local instance = item_entity:getAllStatements( "P31" ) for _,v in pairs(instance) do if cfg.rejected_t.instances[v.mainsnak.datavalue.value.id] then return true; end end --No used Properties local has_properties = false for k, _ in pairs(cfg.used_properties_t) do if (#item_entity:getAllStatements( k )>0 ) then has_properties = true; break; end end return not has_properties; end local function _cite_web(citeq_args) local refsnak= citeq_args.snak local Q citeq_args.snak = nil -- retrieve all the parameters local pqid = citeq_args.pqid citeq_args.pqid = nil local wdl = false local qid = nil local multi_args = { P50 = "author", P2093 = "author", P5769 = "editor", P98 = "editor", P655 = "translator", } Q = WdItem.newSnakItem(refsnak, {fwd = "ALL", osd = false, noicon = true}) -- find language local langcodes = {} if refsnak["P1476"] then langcodes = _getLangOfSnakProp(refsnak, "P1476") citeq_args.language = citeq_args.language or langcodes[1] end langcodes[#langcodes+1] = 'ar' langcodes[#langcodes+1] = 'en' Q:setOptions({ langs = langcodes }) local labellang = langcodes[1] local rtl = rtl_lang[langcodes[1]] or false local oth = {} for i in pairs(refsnak) do local label = "" -- multiple authors may be given if refsnak[i][1].snaktype ~= 'novalue' then if multi_args[i] then get_name_list (multi_args[i], citeq_args, qid, wdl, labellang) elseif cfg.used_properties_t[i] and type(cfg.used_properties_t[i]) == "table" then local data = cfg.used_properties_t[i] local langidx = 1 while citeq_args[data.arg] == nil and langidx<=#langcodes do citeq_args[data.arg] = Q:getValue( i, { maxvals = data.maxvals, linked = data.linked, rank = data.rank or "best", lang=langcodes[langidx] } ) if citeq_args[data.arg] == nil then break elseif citeq_args[data.arg]:find('[[تصنيف:Articles with missing Wikidata information]]', 1, true) then citeq_args[data.arg] = nil langidx = langidx + 1 else break end end if not citeq_args[data.arg] then citeq_args[data.arg] = Q:getValue( i, { maxvals = data.maxvals, linked = data.linked} ) if citeq_args[data.arg]:find('^Q%d+$') then -- qid was returned -- try fallback to qid's native language local qid_languages = _lang_code(WdItem.newItem( citeq_args[data.arg], { fwd = "ALL", osd = false, noicon = true } )) citeq_args[data.arg] = Q:getValue( i, { maxvals = data.maxvals, linked = data.linked, lang = qid_languages[1]} ) if citeq_args[data.arg]:find('^Q%d+$') then -- qid was returned again citeq_args[data.arg] = nil else -- record the language found if no lang specified citeq_args.language = citeq_args.language or qid_languages[1] end end end --- translate unknown value if citeq_args[data.arg] == "Unknown" then if rtl then citeq_args[data.arg] = cfg.i18n_t.ar["unknown-" .. data.arg] or cfg.i18n_t.ar["unknown"] else citeq_args[data.arg] = mw.wikibase.getLabelByLang("Q4233718", lang):gsub("^%l", mw.ustring.upper) end end ----------------- if data.others then oth[#oth + 1] = citeq_args[data.arg] and ((cfg.i18n_t.ar[data.arg] or data.arg:gsub("^%l", string.upper)) .. ": " .. citeq_args[data.arg]) citeq_args[data.arg] = nil end elseif cfg.used_properties_t[i] then if i == "P648" then citeq_args.ol = (Q:getValue( "P648", { maxvals = 1 } ) or ''):gsub("^OL(.+)$", "%1") if citeq_args.ol == "" then citeq_args.ol = nil end elseif i == "P957" then citeq_args.isbn = Q:getValue("P957", { maxvals = 1 } ) elseif in_array(i,{"P854", "P953", "P856", "P2699"}) then local url; for _, pr in ipairs( {"P854", "P953", "P856", "P2699"} ) do url = Q:getValue( pr, { maxvals = 1 } ) if url then citeq_args.url = mw.text.split( url, " (", true )[1] local arcurl = mw.ustring.match( url, " %((.*)%)" ) -- when there is an archive url, <url> holds: url<space>(archive url); here extract the archive url if present if arcurl then local arcy, arcm, arcd = arcurl:match("(20%d%d)%p?(%d%d)%p?(%d%d)") if arcy and arcm and arcd then citeq_args["archive-url"] = arcurl citeq_args["archive-date"] = tonumber(arcd) .. " " .. cfg.i18n_t.months[tonumber(arcm)] .. " " .. arcy end end break end end end end end end if citeq_args.url then if refsnak["P813"] then citeq_args.accessdate = Q:getValue("P813", { maxvals = 1 } ) end if refsnak["P1065"] and refsnak["P2960"] then citeq_args["archive-url"] = Q:getValue("P1065", { maxvals = 1 } ) citeq_args["archive-date"]= Q:getValue("P2960", { maxvals = 1 } ) end end citeq_args.others = citeq_args.others or table.concat(oth, ". ") if citeq_args.others == "" then citeq_args.others = nil end citeq_args.biorxiv = citeq_args.biorxiv and ("10.1101/" .. citeq_args.biorxiv) -- if url then see if there's an archive: citeq_args.url local url local title_display = citeq_args.title if citeq_args.url then citeq_args.title = wrap_nowiki(title_display) end -- TBD: incorporate |at, |sheets= and |sheet= here as well -- Sort out what should happen if several of them are given at the same time if citeq_args.page or citeq_args.p then -- let single take precedence over multiple citeq_args.pages = nil citeq_args.pp = nil end if citeq_args.pages then local _, count = string.gsub(citeq_args.pages, "[,;%s]%d+", "") if count == 1 then citeq_args.page = citeq_args.pages citeq_args.pages = nil end end for k, v in pairs(citeq_args) do if in_array (v, {'(())', 'unset', 'ignore'}) or 'string' ~= type(k) then -- empty accept-as-is-written (()) markup to indicate an empty/unused parameter value, other ((...)) markups are deliberately passed down to {{citation}} citeq_args[k] = nil elseif in_array (v, {'((unset))', '((ignore))'}) then -- strip off markup for free-text values clashing with local keywords citeq_args[k] = 'unset' end end local author_count = 0 for k, v in pairs(citeq_args) do if k:find("^author%d+$") then author_count = author_count + 1 end end if author_count > 8 then -- convention in astronomy journals, optional mode for this? if 'all' == citeq_args['display-authors'] then citeq_args['display-authors'] = nil; -- unset because no longer needed else citeq_args['display-authors'] = citeq_args['display-authors'] or 3 -- limit to three displayed names end end -- replace no-break space by space, User:Mr. Ibrahem if citeq_args.title then citeq_args.title = mw.ustring.gsub( citeq_args.title, "\194\160", " " ) end local editor_count = 0 for k, v in pairs(citeq_args) do if k:find("^editor%d+$") then editor_count = editor_count + 1 end end if editor_count > 8 then -- convention in astronomy journals, optional mode for this? if 'all' == citeq_args['display-editors'] then citeq_args['display-editors'] = nil; -- unset because no longer needed else citeq_args['display-editors'] = citeq_args['display-editors'] or 3 -- limit to three displayed names end end -- code to make a guess what template to use from the supplied parameters -- (first draft for proof-of-concept) local template = "بويب" -- |id= could hold more than one identifier pulled from Wikidata not supported by {{citation}}, right now only add our qid to the list local list_sep = '. ' if citeq_args.mode ~= 'cs1' then list_sep = ', ' end -- clean up any blank parameters for k, v in pairs(citeq_args) do if v == "" then citeq_args[k] = nil end end if template then -- citeq_args.mode = citeq_args.mode or "cs1" -- a cs1 template already knows that it is cs1 so this line is superfluous template = "استشهاد " .. template else -- citeq_args.mode = citeq_args.mode or "cs2" -- a cs2 template already knows that it is cs2 so this line is superfluous template = "استشهاد" end citeq_args['no-tracking'] = 'true' -- لإيقاف ظهور تصانيف التتبع return mw.getCurrentFrame():expandTemplate{title = template, args = citeq_args} -- render the template end --[[-------------------------< C I T E _ Q >------------------------------------------------------------------ Takes standard CS1|2 template parameters and passes all to {{citation}}. If neither of |author= and |author1= are set, calls get_authors() to try to get an author name-list from Wikidata. The result is passed to {{citation}} for rendering. --]] local function _cite_q (in_citeq_args) local frame = mw.getCurrentFrame() local citeq_args = {} local origin_args = {} local Q -- parameters that don't get passed to Citation local expand = in_citeq_args.expand -- when set to anything, causes {{cite q}} to render <code><nowiki>{{citation|...}}</nowiki></code> local qid = in_citeq_args.qid or in_citeq_args[1] local wdl = in_citeq_args.wdl local template = in_citeq_args.template local cite_class = 'citation' local rtl = true local snak = in_citeq_args.snak or {} local pqid = in_citeq_args.pqid in_citeq_args.expand = nil in_citeq_args[1] = nil in_citeq_args.qid = nil in_citeq_args.wdl = nil in_citeq_args.template = nil in_citeq_args.snak = nil in_citeq_args.pqid = nil if in_citeq_args.wikidatacite then citeq_args = in_citeq_args else local A = argument_wrapper(in_citeq_args) local loaded_args ={} for _,args_table in pairs({cfg.simple_properties_t,cfg.used_args_t}) do for k,_ in pairs(args_table) do if A[k] then citeq_args[k] = A[k] if k ~= A:ORIGIN(k) then origin_args[k] = A:ORIGIN(k) table.insert(loaded_args, A:ORIGIN(k)) else table.insert(loaded_args, k) end end end end for k,v in pairs(in_citeq_args) do if not in_array(k,loaded_args) then citeq_args[k] = v end end end -- if title supplied, flag to not read html title local vol = citeq_args.volume local chapter = citeq_args.chapter local titleforced = (citeq_args.title ~= nil) local default_opt = {rank = "best", fetchwikidata = "ALL", onlysourced = false, noicon = true, vol=vol, chapter=chapter} if #snak > 0 then Q = WdItem.newSnakItem(snak,default_opt) else Q = WdItem.newItem(qid, default_opt) end local oth = {} -- put the language codes into a sequential table langcodes[] local langcodes = {} if citeq_args.language then -- check these are a supported language codes for lc in mw.text.gsplit( citeq_args.language, "[,، ]+", false ) do --modified langcodes[#langcodes+1] = mw.language.isSupportedLanguage(lc) and lc end end if not langcodes[1] then -- try to find language of work langcodes = _lang_code(Q) end if not langcodes[1] then -- try fallback to journal's language local journal_qid = Q:followQid("P1433") langcodes = journal_qid and _lang_code(journal_qid) end citeq_args.language = citeq_args.language or table.concat(langcodes, ", ") Q:setOptions( { langs = langcodes } ); local labellang = langcodes[1] or 'ar' rtl = rtl_lang[langcodes[1]] or false -- loop through list of simple properties and get their values in citeq_args for name, data in pairs(cfg.simple_properties_t) do citeq_args[name] = citeq_args[name] or Q:getValue(data.id, { maxvals = data.maxvals, linked = data.linked, qual = data.qual, no_vol_qual = data.no_vol_qual } ) if not citeq_args[name] and data.populate_from_journal then local publishedin = Q:getValue("P1433", {maxvals = 0, lang = labellang, qual = data.id, qualsonly = true} ) citeq_args[name] = publishedin or Q:getPropOfProp("P1433", data.id, {lang = labellang, maxvals = data.maxvals}) end -- if citeq_args[name] and citeq_args[name]:find('[[تصنيف:Articles with missing Wikidata information]]', 1, true) then -- -- try fallback to work's native language -- citeq_args[name] = Q:getValue( data.id, { maxvals = data.maxvals, linked = data.linked, no_vol_qual = data.no_vol_qual} ) -- if citeq_args[name]:find('^Q%d+$') then -- qid was returned -- -- try fallback to qid's native language -- local qid_languages = _lang_code(citeq_args[name]) -- citeq_args[name] = Q:getValue( data.id, {maxvals = data.maxvals, linked = data.linked, lang = qid_languages[1], no_vol_qual = data.no_vol_qual} ) -- if citeq_args[name]:find('^Q%d+$') then -- qid was returned again -- citeq_args[name] = nil -- else -- -- record the language found if no lang specified -- citeq_args.language = citeq_args.language or qid_languages[1] -- end -- end -- end if citeq_args[name] and snak[data.id] then snak[data.id] = nil end --- translate unknown value if citeq_args[name] == "Unknown" and rtl then citeq_args[name] = cfg.i18n_t.ar["unknown-" .. name] or cfg.i18n_t.ar["unknown"] end ----------------- if data.others then oth[#oth + 1] = citeq_args[name] and ((rtl and cfg.i18n_t.ar[name] or name:gsub("^%l", string.upper)) .. ": " .. citeq_args[name]) citeq_args[name] = nil end end citeq_args.others = citeq_args.others or table.concat(oth, ". ") if citeq_args.others == "" then citeq_args.others = nil end citeq_args.journal = citeq_args.journal and citeq_args.journal:gsub("^''", ""):gsub("''$", ""):gsub("|''", "|"):gsub("'']]", "]]") citeq_args.ol = citeq_args.ol or (Q:getValue("P648", { maxvals = 1 } ) or ''):gsub("^OL(.+)$", "%1") if citeq_args.ol == "" then citeq_args.ol = nil end -- TBD. Take care of |ol-access=? citeq_args.biorxiv = citeq_args.biorxiv and ("10.1101/" .. citeq_args.biorxiv) citeq_args.isbn = citeq_args.isbn or Q:getValue("P957", { maxvals = 1, rank="best" } ) -- try ISBN 10 (only one value accepted) -- if url then see if there's an archive: citeq_args.url local url --find formatted url if snak ~= {} then for k, v in pairs(snak) do if (v[1].datatype == "external-id") then local furl = mw.wikibase.getBestStatements( k, "P1630" ) if 0 ~= #furl then furl = furl[1]["mainsnak"]["datavalue"]["value"] citeq_args.url = mw.message.newRawMessage(furl, {v[1]["datavalue"]["value"]}):plain() snak[k] = nil break; end end end if citeq_args.url == nil and pqid and qid then local refproperty = mw.wikibase.getBestStatements(qid , "P1687" ) if 0 ~= #refproperty then -- خطأ لوا في وحدة:Cite_Q على السطر 1124: attempt to index field 'datavalue' (a nil value). if refproperty[1]["mainsnak"] and refproperty[1]["mainsnak"]["datavalue"] and refproperty[1]["mainsnak"]["datavalue"]["value"] then refproperty=refproperty[1]["mainsnak"]["datavalue"]["value"]["id"] local furl = mw.wikibase.getBestStatements( refproperty, "P1630" ) if 0 ~= #furl then furl = furl[1]["mainsnak"]["datavalue"]["value"] local refval = mw.wikibase.getBestStatements( pqid, refproperty ) refval = (0 ~= #refval) and refval[1]["mainsnak"]["datavalue"]["value"] if refval then citeq_args.url = mw.message.newRawMessage(furl, {refval}):plain() end end end end end end if not citeq_args.url then for i, pr in ipairs( {"P953", "P856", "P2699"} ) do url = Q:getValue(pr, { maxvals = 1, qual="P1065" } ) if url then citeq_args.url = mw.text.split( url, " (", true )[1] local arcurl = mw.ustring.match( url, " %((.*)%)" ) -- when there is an archive url, <url> holds: url<space>(archive url); here extract the archive url if present if arcurl then local arcy, arcm, arcd = arcurl:match("(20%d%d)%p?(%d%d)%p?(%d%d)") if arcy and arcm and arcd then citeq_args["archive-url"] = arcurl citeq_args["archive-date"] = arcy .. '-' .. arcm .. '-' .. arcd end end break end end end -- if citeq_args.publisher == "Unknown" then -- look for "stated as" (P1932) -- local stated_as = Q:getValue( "P123", { maxvals = 1, qual="P1932", qualsonly=true} ) -- if stated_as then citeq_args.publisher = stated_as end -- end if not titleforced then -- Handle subtitle. if citeq_args.title then local subtitle = Q:getValue('P1680'); if subtitle then citeq_args.title = citeq_args.title .. ": " .. subtitle end end local htmltitle = Q:getValue("P1476", {qual = "P6833", maxvals = 1, qualsonly = true} ) if htmltitle then citeq_args.title = htmltitle:gsub("</?i>", "''") else local title_display = citeq_args.title or (langcodes[1] and mw.wikibase.getLabelByLang(qid, langcodes[1])) or mw.wikibase.getLabel(qid) if title_display and snak and snak.P1810 then title_display=title_display .. " | " .. snak.P1810[1].datavalue.value snak.P1810 = nil end title_display = title_display or ("No label or title -- debug: " .. qid) if citeq_args.url then citeq_args.title = wrap_nowiki(title_display) else local slink = mw.wikibase.getSitelink(qid) local slink_flag = false local wrap_title = '' local wslink = false if not slink then -- See if we have wikisource if not citeq_args.url then local wikisource_sitelink = mw.wikibase.getSitelink(qid, cfg.i18n_t.wikisource) or nil if wikisource_sitelink then slink = ':s:'..wikisource_sitelink wslink = true end end end if citeq_args.title then if slink then wrap_title = wrap_nowiki(citeq_args.title) slink_flag = true else citeq_args.title = wrap_nowiki(citeq_args.title) end else if slink and not wslink then if slink:lower() == title_display:lower() then citeq_args.title = '[[' .. slink .. ']]' else wrap_title = wrap_nowiki(slink:gsub("%s%(.+%)$", ""):gsub(",.+$", "")) slink_flag = true end elseif wslink then wrap_title = wrap_nowiki(title_display) slink_flag = true else citeq_args.title = wrap_nowiki(title_display) end end if slink_flag then if slink == wrap_title and not wslink then -- direct link citeq_args.title = '[[' .. slink .. ']]' else -- piped link citeq_args.title = '[[' .. slink .. '|' .. wrap_title .. ']]' end end end end end -- replace no-break space by space, User:Mr. Ibrahem if citeq_args.title then citeq_args.title = mw.ustring.gsub( citeq_args.title, "\194\160", " " ) end -- fetch other snak properties for debugging -- if snak and snak ~= {} then -- for k,v in pairs(snak) do -- if not used_properties[k] then -- end -- end -- end -- TBD: incorporate |at, |sheets= and |sheet= here as well -- Sort out what should happen if several of them are given at the same time if citeq_args.page then -- let single take precedence over multiple citeq_args.pages = nil citeq_args.pp = nil end if citeq_args.pages then local _, count = string.gsub(citeq_args.pages, "[,;%s]%d+", "") if count == 1 then citeq_args.page = citeq_args.pages citeq_args.pages = nil end end if is_set (qid) then if not is_set (citeq_args.author) and not is_set (citeq_args.author1) and not is_set (citeq_args.subject) and not is_set (citeq_args.subject1) and not is_set (citeq_args.host) and not is_set (citeq_args.host1) and not is_set (citeq_args.last) and not is_set (citeq_args.last1) and not is_set (citeq_args.surname) and not is_set (citeq_args.surname1) and not is_set (citeq_args['author-last']) and not is_set (citeq_args['author-last1']) and not is_set (citeq_args['author1-last']) and not is_set (citeq_args['author-surname']) and not is_set (citeq_args['author-surname1']) and not is_set (citeq_args['author1-surname1']) then -- if neither are set, try to get authors from Wikidata get_name_list ('author', citeq_args, qid, wdl, labellang, vol, chapter) -- modify citeq_args table with authors from Wikidata end if not is_set (citeq_args.editor) and not is_set (citeq_args.editor1) and not is_set (citeq_args['editor-last']) and not is_set (citeq_args['editor-last1']) and not is_set (citeq_args['editor1-last']) and not is_set (citeq_args['editor-surname']) and not is_set (citeq_args['editor-surname1']) and not is_set (citeq_args['editor1-surname']) then -- if neither are set, try to get editors from Wikidata get_name_list ('editor', citeq_args, qid, wdl, labellang, vol, chapter) -- modify citeq_args table with editors from Wikidata end if not is_set (citeq_args.translator) and not is_set (citeq_args.translator1) and not is_set (citeq_args['translator-last']) and not is_set (citeq_args['translator-last1']) and not is_set (citeq_args['translator1-last']) and not is_set (citeq_args['translator-surname']) and not is_set (citeq_args['translator-surname1']) and not is_set (citeq_args['translator1-surname']) then -- if neither are set, try to get translators from Wikidata get_name_list ('translator', citeq_args, qid, wdl, labellang, vol, chapter) -- modify citeq_args table with translators from Wikidata end end for k, v in pairs(citeq_args) do if in_array (v, {'(())', 'unset', 'ignore'}) or 'string' ~= type(k) then -- empty accept-as-is-written (()) markup to indicate an empty/unused parameter value, other ((...)) markups are deliberately passed down to {{citation}} citeq_args[k] = nil elseif in_array (v, {'((unset))', '((ignore))'}) then -- strip off markup for free-text values clashing with local keywords citeq_args[k] = 'unset' end end local author_count = 0 for k, v in pairs(citeq_args) do if k:find("^author%d+$") then author_count = author_count + 1 end end if author_count > 8 then -- convention in astronomy journals, optional mode for this? if 'all' == citeq_args['display-authors'] then citeq_args['display-authors'] = nil; -- unset because no longer needed else citeq_args['display-authors'] = citeq_args['display-authors'] or 3 -- limit to three displayed names end end local editor_count = 0 for k, v in pairs(citeq_args) do if k:find("^editor%d+$") then editor_count = editor_count + 1 end end if editor_count > 8 then -- convention in astronomy journals, optional mode for this? if 'all' == citeq_args['display-editors'] then citeq_args['display-editors'] = nil; -- unset because no longer needed else citeq_args['display-editors'] = citeq_args['display-editors'] or 3 -- limit to three displayed names end end -- change edition to ordinal if it's set and numeric if (rtl == false) then citeq_args.edition = citeq_args.edition and makeOrdinal(citeq_args.edition) end -- code to make a guess what template to use from the supplied parameters -- (first draft for proof-of-concept) if citeq_args.journal then template = template or "بدورية محكمة" elseif citeq_args.isbn then template = template or "بكتاب" citeq_args.asin = nil -- suppress ASIN if ISBN exists elseif citeq_args.website then template = template or "بويب" end -- template is CS1 designator: journal, web, news, etc. if template then -- citeq_args.mode = citeq_args.mode or "cs1" -- a cs1 template already knows that it is cs1 so this line is superfluous local citeclasses = {["بدورية محكمة"] = 'journal', ["بكتاب"] = "book", ["بويب"] = "web" } cite_class = citeclasses[template] template = "استشهاد " .. template else -- citeq_args.mode = citeq_args.mode or "cs2" -- a cs2 template already knows that it is cs2 so this line is superfluous template = "استشهاد" end -- |id= could hold more than one identifier pulled from Wikidata not supported by {{citation}}, right now only add our qid to the list local list_sep = '. ' if citeq_args.mode ~= 'cs1' then list_sep = ', ' end local id = cfg.i18n_t.wdq .. ':[[:d:' .. qid .. '|' .. qid .. ']]' local old_id = citeq_args.id if wdl then -- show WD logo id = id .. '[[ملف:Wikidata-logo.svg|16px|alt=|link=]]' -- possibly replace by WD edit icon? end if is_set (old_id) then citeq_args.id = old_id .. list_sep .. id -- append to user-specified contents else citeq_args.id = id end -- clean up any blank parameters for k, v in pairs(citeq_args) do if v == "" then citeq_args[k] = nil end end -- use real param names for CS1 messages for k,v in pairs(origin_args) do if citeq_args[k] and citeq_args[k] == in_citeq_args[v] then citeq_args[v] = citeq_args[k] citeq_args[k] = nil end end -- if |expand=<anything>, write a nowiki'd version to see what the {{citation}} template call looks like if expand then local expand_args = { "{{" .. template .. "\n" } -- init with citation template if expand == "self" then citeq_args.id = old_id -- restore original |id= parameter expand_args = { cfg.i18n_t.cite_q .. qid } -- expand to itself end -- make a sortable table and sort it by param name local sorttable = {} for param, val in pairs (citeq_args) do table.insert(sorttable, {param, val}) end table.sort(sorttable, comp_key) -- add contents to expand_args for idx, val in ipairs(sorttable) do table.insert(expand_args, val[1] .. '=' .. val[2] .. "\n") end -- make the nowiki'd string and done return frame:preprocess (table.concat ({'<syntaxhighlight lang="wikitext" inline="1">', table.concat (expand_args, ' |') .. '}}', '</syntaxhighlight>'})); end local erratumid = Q:getPropertyIDs( "P2507", { maxvals = 1 } ) if erratumid then erratumid = " [[d:" .. erratumid .. "|" .. cfg.i18n_t.erratum .. "]]" .. cfg.i18n_t.trackingcats.erratum else erratumid = "" end local opt_cat = '' if Q:getValue( "P5824" ) then opt_cat = cfg.i18n_t.trackingcats.retracted end if Q:getValue( "P1366" ) then opt_cat = opt_cat .. cfg.i18n_t.trackingcats.replaced end if not citeq_args.title then -- emit category link if missing title opt_cat = opt_cat .. cfg.i18n_t.trackingcats['no-label-or-title']; end if citeq_args.wikidatacite then return frame:expandTemplate{title = template, args = citeq_args} .. erratumid .. opt_cat -- render the template else local CS = require("Module:Citation/CS1" .. sandbox) return CS._citation(frame , citeq_args, {['CitationClass'] = cite_class}) .. erratumid .. opt_cat end end --[[-------------------------< C I T E _ Q >------------------------------------------------------------------ Takes standard CS1|2 template parameters and passes all to {{citation}}. If neither of |author= and |author1= are set, calls get_authors() to try to get an author name-list from Wikidata. The result is passed to {{citation}} for rendering. --]] local function _cite_wikidata (ref, pqid) -- early exit if not ref then return nil end local snak = ref.snaks -- مراجع غير مقبولة if snak.P143 or snak.P3452 then return nil end local hash = ref.hash if hash and hash ~= "" and ref_cash[hash] then return ref_cash[hash] end local citeq_args = {} local frame = mw.getCurrentFrame() if snak.P248 then for _, prop in pairs(snak.P248) do if prop.snaktype == "value" then citeq_args.qid = "Q" .. prop.datavalue.value["numeric-id"] end end snak.P248 = nil; end if citeq_args.qid and is_rejected(citeq_args.qid) == true then return nil end local reference citeq_args.snak = snak citeq_args.pqid = pqid citeq_args.wikidatacite = 1 if citeq_args.qid then reference = _cite_q(citeq_args) else local has_properties = false for k, _ in pairs(cfg.used_properties_t) do if snak[k] then has_properties = true; break; end end reference = (has_properties and _cite_web(citeq_args) or nil) end if reference and reference ~= "" then reference = frame:extensionTag("ref", reference, {name = 'wikidata-' .. hash}) end if hash and hash ~= "" then ref_cash[hash] = reference end return reference end local function cite_q (frame) local args = {} for k, v in pairs(frame:getParent().args) do if v ~= "" then args[k] = v end end for k, v in pairs(frame.args) do if v ~= "" then args[k] = v end end args.qid = args.qid or args[1] or "" if args.qid == "" then return nil end args[1] = nil local citesep = (args.citesep or "") if citesep == "" then citesep = ", " end citesep = citesep:gsub('"', '') -- strip double quotes after setting default to allow |citesep="" as a blank separator args.citesep = nil local tag = args.tag or "" if tag == "" then tag = nil end args.tag = nil local list = args.list or "" if list == "" then list = nil end args.list = nil args.language = args.language or args.lang args.lang = nil local cites = {} for q in args.qid:gmatch("Q%d+") do -- make a new copy of the arguments local newargs = {} for k, v in pairs(args) do if k ~= "qid" then newargs[k] = v end end newargs.qid = q if tag == "ref" then cites[#cites + 1] = frame:callParserFunction{ name = "#tag:ref", args = { _cite_q(newargs), name = q } } -- expand like this: args = { _cite_q(newargs), name = 'foo', group = 'bar' } else cites[#cites + 1] = _cite_q(newargs) end end if list then return frame:expandTemplate{ title = list, args = cites } else return table.concat(cites, citesep) end end --[[--------------------------< E X P O R T E D F U N C T I O N S >------------------------------------------ ]] return { makeOrdinal = makeOrdinal, getLangOfProp = getLangOfProp, lang_code = lang_code, _cite_wikidata = _cite_wikidata, _cite_q = _cite_q, cite_q = cite_q } dzre82gd9ncjvkwu9u83dvwn6a8s84g قالب:تصريف/شرح 10 231948 1096552 1014136 2026-07-17T15:08:58Z ForzaGreen 28665 /* تفاصيل */ تصحيح وزن فعِل يفعَل 1096552 wikitext text/x-wiki {{صفحة توثيق فرعية}} {{Lua|وحدة:ar-verb}} == استعمال == هذا القالب يعرض جدول تصريف الأفعال العربية انطلاقا من الجذور والأوزان الصرفية. == أمثلة == '''مثال 1: جدول تصريفات الفعل كَتَبَ''' <pre> {{تصريف|جذر=كتب|وزن=فعَل يفعُل}} </pre> {{تصريف|جذر=كتب|وزن=فعَل يفعُل}} '''مثال 2: جدول تصريفات الفعل قَدَّمَ''' <pre> {{تصريف|جذر=قدم|وزن=فعّل}} </pre> {{تصريف|جذر=قدم|وزن=فعّل}} == توصيف == <templatedata> { "params": { "جذر": { "description": "الجذر اللغوي للفعل، على شكل \"جذر\" أو \"ج ذ ر\".", "example": "كتب، ك ت ب، وعي، أمن، ءمن، ء م ن، ...", "type": "content", "required": true }, "وزن": { "description": "الوزن الصرفي للفعل. لا بد من التزام ضبط الحركات كما هو في القيم المُقترحة للوسيط.", "example": "فعَل يفعُل، افتعل، ...", "type": "content", "suggestedvalues": [ "فعَل يفعُل", "فعَل يفعِل", "فعَل يفعَل", "فعُل يفعُل", "فعِل يفعَل", "فعِل يفعِل", "فعّل", "فاعل", "أفعل", "تفعّل", "تفاعل", "انفعل", "افتعل", "افعلّ", "استفعل", "افعالّ", "افعوعل", "افعوّل", "فعلل", "تفعلل", "افعنلل", "افعللّ" ], "required": true }, "كامل": { "description": "توليد جدول التصريفات مبسطا (موصى به) أو كاملا (المضارع المنصوب، المضارع المجزوم، المبني للمجهول، اسم الفاعل، اسم المفعول، المصدر). يُفضل استعمال صيغة الجدول المُبسطة، لأن الصيغة الكاملة تخلط بين النحو والصرف.", "example": "0", "type": "boolean", "autovalue": "0" } }, "description": "جدول تصريف الأفعال العربية", "format": "inline" } </templatedata> == تفاصيل == يُوَلَّد الفعل العربي من جذر ومن وزن صرفي. في الجدول التالي، أنواع الأفعال وأوزانها وعددها: {| class="wikitable" style="text-align:center;" |- style="font-weight:bold;" ! مجرد \ مزيد ! ثلاثي \ رباعي ! الوزن الصرفي ! مثال ! العدد ! الوزن بالإنجليزية |- | مجرد | ثلاثي | فعَل يفعُل | نَصَرَ يَنْصُرُ | 2115 | Form I/a~u |- | مجرد | ثلاثي | فعَل يفعِل | ضرَب يضرِب | 1838 | Form I/a~i |- | مجرد | ثلاثي | فعَل يفعَل | قَطَعَ يَقْطَعُ | 1152 | Form I/a~a |- | مجرد | ثلاثي | فعِل يفعَل | فَرِحَ يَفْرَحُ | 1894 | Form I/i~a |- | مجرد | ثلاثي | فعُل يفعُل | قَصُرَ يَقْصُرُ | 484 | Form I/u~u |- | مجرد | ثلاثي | فعِل يفعِل | حَسِبَ يَحْسِبُ | 25 | Form I/i~i |- | مزيد (بحرف) | ثلاثي | أفعل | أَقْبَلَ | 2917 | Form IV |- | مزيد (بحرف) | ثلاثي | فعّل | قَدَّمَ | 2719 | Form II |- | مزيد (بحرف) | ثلاثي | فاعل | قَارَنَ | 1266 | Form III |- | مزيد (بحرفين) | ثلاثي | انفعل | اِنْقَطَعَ | 652 | Form VII |- | مزيد (بحرفين) | ثلاثي | افتعل | اِقْتَرَبَ | 1710 | Form VIII |- | مزيد (بحرفين) | ثلاثي | افعلّ | اِبْيَضَّ | 96 | Form IX |- | مزيد (بحرفين) | ثلاثي | تفاعل | تَبَايَنَ | 1023 | Form VI |- | مزيد (بحرفين) | ثلاثي | تفعّل | تَدَرَّبَ | 1329 | Form V |- | مزيد (بثلاثة أحرف) | ثلاثي | استفعل | اِسْتَدْرَكَ | 953 | Form X |- | مزيد (بثلاثة أحرف) | ثلاثي | افعوعل | اِخْشَوْشَنَ | 62 | Form XII |- | مزيد (بثلاثة أحرف) | ثلاثي | افعوّل | اِخْرَوَّطَ | 13 | Form XIII |- | مزيد (بثلاثة أحرف) | ثلاثي | افعالّ | اِخْضَارَّ | 97 | Form XI |- | مجرد | رباعي | فعلل | دحرج | 1460 | Form Iq |- | مزيد (بحرف) | رباعي | تفعلل | تدحرج | 542 | Form IIq |- | مزيد (بحرفين) | رباعي | افعنلل | اِقْعَنْسَسَ | 106 | Form IIIq, XIV |- | مزيد (بحرفين) | رباعي | افعللّ | اطمأنّ | 102 | Form IVq |} فمثلا يُوَلَّد الفعل قَالَ من الجذر "ق و ل" ومن الوزن الصرفي "فعَل يفعُل": <code><nowiki> {{تصريف|جذر=قول|وزن=فعَل يفعُل}} </nowiki></code> أو <code><nowiki> {{تصريف|جذر=ق و ل|وزن=فعَل يفعُل}} </nowiki></code> {{تصريف|جذر=قول|وزن=فعَل يفعُل}} == ملاحظات == * يستدعي القالب [[وحدة:ar-verb]] لتوليد التصريفات. * يُفضل استعمال صيغة الجدول المُبسطة، لأن الصيغة الكاملة تخلط بين النحو والصرف. <noinclude> [[تصنيف:قوالب تصريفات الأفعال]] </noinclude> jihqm3vznn26kgrde0s456wyzlyq9ds وحدة:WdItem 828 235573 1096559 1096485 2026-07-17T20:08:19Z حبيشان 31560 تنسيق تاريخ هجري 1096559 Scribunto text/plain -- Module: WdItem -- Object-oriented Wikidata access module for Lua -- Refactored from WikidataIB for direct Lua usage require("strict") local p = {} -- i18n configuration local i18n = { ["errors"] = { ["property-not-found"] = "الخاصية غير موجودة.", ["entity-not-found"] = "الكيان على ويكي بيانات غير موجود.", ["unknown-claim-type"] = "نوع الادعاء غير معروف.", ["local-article-not-found"] = "المعرف متاح على ويكي بيانات، ولكن المقال غير متاح على ويكيبيديا", }, ["months"] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }, ["Unknown"] = "Unknown", ["NaN"] = "Not a number", ["missinginfocat"] = "[[تصنيف:Articles with missing Wikidata information]]", ["list separator"] = ", ", ["list separator-ar"] = "، ", } -- Date precision constants local dp = { [6] = "millennium", [7] = "century", [8] = "decade", [9] = "year", [10] = "month", [11] = "day", } local options_aliases = { ["osd"] = "onlysourced", ["wdlinks"] = "wdl", ["uabbr"] = "unitabbr", ["qo"] = "qualsonly", ["lp"] = "linkprefix", ["lprefix"] = "linkprefix", ["qlp"] = "qlinkprefix", ["sn"] = "shortname", ["uselabel"] = "uselbl", ["plaindate"] = "pd", ["qualifierdateformat"] = "qdf", ["df"] = "qdf", ["qshortname"] = "qsn" } setmetatable(options_aliases, { __index = function(t, k) return k end }) ------------------------------------------------------------------------------- -- Internal helper functions ------------------------------------------------------------------------------- local function findLang(langcode) local langobj langcode = mw.text.trim(langcode or "") if mw.language.isKnownLanguageTag(langcode) then langobj = mw.language.new(langcode) else langcode = mw.getCurrentFrame():callParserFunction('int', {'lang'}) if mw.language.isKnownLanguageTag(langcode) then langobj = mw.language.new(langcode) else langobj = mw.language.getContentLanguage() end end return langobj end local function parseParam(param, default) if param == nil then return default end return param end local function setRanks(rank) rank = (rank or ""):lower() local ranks = {} for w in string.gmatch(rank, "%a+") do w = w:sub(1,1) if w == "b" or w == "p" or w == "n" or w == "d" then ranks[w] = true end end if ranks.b or not next(ranks) then ranks.p = true ranks.n = true end return ranks end local function labelOrId(id, lang) if lang == "default" then lang = findLang().code end local label if lang then label = mw.wikibase.getLabelByLang(id, lang) end if not label then local trylang = {"ar","en","fr"} local triedlang = lang for _,lang in pairs(trylang) do if triedlang ~= lang then label = mw.wikibase.getLabelByLang(id, lang) if label ~= "" then break end end end end if label then return mw.text.nowiki(label), true else return id, false end end local function roundto(x, sf) if x == 0 then return 0 end local s = 1 if x < 0 then x = -x s = -1 end if sf < 1 then sf = 1 end local p = 10 ^ (math.floor(math.log10(x)) - sf + 1) x = math.floor(x / p + 0.5) * p * s if x == math.floor(x) then x = math.floor(x) end return x end local function decimalPrecision(x, p) local s = 1 if x < 0 then x = -x s = -1 end if not tonumber(p) then p = 1e-4 elseif p > 1 then p = 1 elseif p < 1e-6 then p = 1e-6 else p = 10 ^ math.floor(math.log10(p)) end x = math.floor(x / p + 0.5) * p * s if x == math.floor(x) then x = math.floor(x) end if math.abs(x) < 1e-4 then x = string.format("%f", x) end return x end local function decimalToDMS(x, p) if not tonumber(p) then p = 1e-4 end local d = math.floor(x) local ms = (x - d) * 60 if p > 0.5 then if ms > 30 then d = d + 1 end ms = 0 end local m = math.floor(ms) local s = (ms - m) * 60 if p > 0.008 then if s > 30 then m = m +1 end s = 0 elseif p > 0.00014 then s = math.floor(s + 0.5) elseif p > 0.000014 then s = math.floor(10 * s + 0.5) / 10 elseif p > 0.0000014 then s = math.floor(100 * s + 0.5) / 100 else s = math.floor(1000 * s + 0.5) / 1000 end return d, m, s end local function dateFormat(timestamp, dprec, df, bcf, pd, qualifiers, lang, adj, model) df = (df or ""):lower() if df == "ymd" then if timestamp:sub(1,1) == "+" then return timestamp:sub(2,11) else local yr = tonumber(timestamp:sub(2,5)) - 1 yr = ("000" .. yr):sub(-4) if yr ~= "0000" then yr = "-" .. yr end return yr .. timestamp:sub(6,11) end end timestamp = timestamp:gsub("%-00%-00T", "-01-01T") dprec = dprec or 11 if df == "y" and dprec > 9 then dprec = 9 end dprec = dprec>11 and 11 or dprec dprec = dprec<6 and 6 or dprec bcf = (bcf or ""):upper() pd = (pd or ""):sub(1,1):lower() if pd == "" or pd == "n" or pd == "f" or pd == "0" then pd = false end lang = lang or findLang().code adj = adj or "" local bc = timestamp:sub(1, 1)=="-" and "BC" or "" local year, month, day = timestamp:match("[+-](%d*)-(%d*)-(%d*)T") local iso = tonumber(year) if dprec == 6 then iso = math.floor( (iso - 1) / 1000 ) + 1 end if dprec == 7 then iso = math.floor( (iso - 1) / 100 ) + 1 end if dprec == 8 then iso = math.floor( iso / 10 ) .. "0" end if dprec == 10 then iso = year .. "-" .. month end if dprec == 11 then iso = year .. "-" .. month .. "-" .. day end local sc = not pd and qualifiers and qualifiers.P1480 if sc then for k1, v1 in pairs(sc) do if v1.datavalue and v1.datavalue.value.id == "Q5727902" then adj = "circa" break end end end local calendarmodel = "" if tonumber(year) > 1582 and dprec > 8 and not pd and model == "http://www.wikidata.org/entity/Q1985786" then calendarmodel = "julian" end -- Simplified date formatting (complex date module not available) local fdate = tostring(iso) if bc ~= "" then fdate = fdate .. " " .. (bcf == "BC" and "BC" or "BCE") end if adj == "circa" then fdate = "c. " .. fdate end return fdate end local function hijriFormat(qualifiers, dateformat, lang) if not qualifiers.P4241 then return; end local year, month, day local val local qhmonths = {["Q1952053"]=1,["Q489557"]=2, ["Q474167"] = 3, ["Q273815"] = 4, ["Q852002"] = 5, ["Q822218"] = 6, ["Q194210"] = 7, ["Q220914"] = 8, ["Q8867089"]=9, ["Q685440"]=10,["Q150853"]=11,["Q186022"]=12 } local hmonths = {"محرم","صفر","ربيع الأول","ربيع الآخر","جمادى الأولى","جمادى الآخرة","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة"} local hmonths_inv = {["محرم"] = 1, ["صفر"]=2, ["ربيع الأول"]=3, ["ربيع الآخر"]=4, ["جمادى الأولى"]=5, ["جمادى الآخرة"]=6, ["رجب"]=7, ["شعبان"]=8, ["رمضان"]=9, ["شوال"]=10, ["ذو القعدة"]=11, ["ذو الحجة"]=12} for _, item in ipairs(qualifiers.P4241) do local timeQ = item.datavalue and item.datavalue.value and item.datavalue.value.id local hastime = false if timeQ then local timeQt = mw.wikibase.getBestStatements(timeQ, "P361") for _,timeQsnak in pairs(timeQt) do local timeType = timeQsnak.mainsnak and timeQsnak.mainsnak.datavalue and timeQsnak.mainsnak.datavalue.value and timeQsnak.mainsnak.datavalue.value.id if timeType == "Q28892" then local timeLableAr = mw.wikibase.getLabelByLang(timeQ, "ar") if timeLableAr then year = mw.ustring.match(timeLableAr, "^(%d+) *هـ$") end if not year then local timeLableEn = mw.wikibase.getLabelByLang(timeQ, "en") if timeLableEn then year = mw.ustring.match(timeLableAr, "^(%d+) *AH$") end end hastime=true elseif qhmonths[timeType] then month = qhmonths[timeType] if month>0 and month<13 then month = hmonths[month] end local timeLableAr = mw.wikibase.getLabelByLang(timeQ, "ar") if timeLableAr then day = mw.ustring.match(timeLableAr, "^(%d+) *%a+$") end if not day then local timeLableEn = mw.wikibase.getLabelByLang(timeQ, "en") if timeLableEn then day = mw.ustring.match(timeLableAr, "^(%d+) *%a+$") end end hastime=true end end if not hastime then timeQt = mw.wikibase.getBestStatements(timeQ, "P31") if "Q125390868" == (timeQt[1].mainsnak and timeQt[1].mainsnak.datavalue and timeQt[1].mainsnak.datavalue.value and timeQt[1].mainsnak.datavalue.value.id ) then val = mw.wikibase.getLabelByLang(timeQ, "ar") month, year = mw.ustring.match(val, "^(%a[%a ]+%a) *(%d+) *هـ?$") end end end end if year then if dateformat == "y" then return year; elseif day and month then return day .. ' ' .. month .. ' ' .. year; elseif month then return month .. ' ' .. year; end end return nil; end local function sourced(claim) if claim.references then for kr, vr in pairs(claim.references) do local ref = mw.wikibase.renderSnaks(vr.snaks) if not ref:find("Wiki") then return true end end end end local function linkedItem(id, args) local lprefix = (args.linkprefix or ""):gsub('"', '') local lpostfix = (args.lpostfix or ""):gsub('"', '') local prefix = (args.prefix or ""):gsub('"', '') local postfix = (args.postfix or ""):gsub('"', '') local dtxt = args.dtxt local lang = args.lang or "ar" local uselbl = parseParam( args.uselbl, true) local disp local sitelink = mw.wikibase.getSitelink(id) local label, islabel if dtxt then label, islabel = dtxt, true else label, islabel = labelOrId(id, args.lang) end if sitelink then if not uselbl then local pos = sitelink:find(":") or 0 local slink = sitelink if pos > 0 then local pfx = sitelink:sub(1,pos-1) if mw.site.namespaces[pfx] then slink = sitelink:sub(pos+1) end end slink = slink:gsub("%s%(.+%)$", ""):gsub(",.+$", "") if label:find("^%u") then label = slink:gsub("^(%l)", string.upper) else label = slink:gsub("^(%u)", string.lower) end end disp = "[[" .. lprefix .. sitelink .. lpostfix .. "|" .. prefix .. label .. postfix .. "]]" elseif islabel then disp = prefix .. label .. postfix else disp = prefix .. label .. postfix .. i18n.missinginfocat end return disp end local function rendersnak(propval, args, linked, lpre, lpost, pre, post, uabbr, filter) lpre = lpre or "" lpost = lpost or "" pre = pre or "" post = post or "" args.lang = args.lang or findLang().code local snak = propval.mainsnak or propval local dtype = snak.datatype local dv = snak.datavalue dv = dv and dv.value local val, mlt local namedas; namedas = propval.qualifiers and propval.qualifiers.P1932 and propval.qualifiers.P1932[1].datavalue and propval.qualifiers.P1932[1].datavalue.value or nil args.dtxt = namedas if propval.rank and not args.reqranks[propval.rank:sub(1, 1)] then return nil elseif snak.snaktype == "somevalue" then val = namedas or i18n["Unknown"] elseif snak.snaktype == "novalue" then -- return nothing elseif dtype == "wikibase-item" then local qnumber = dv.id if linked then val = linkedItem(qnumber, args) else if namedas then val = pre .. namedas .. post else local label, islabel = labelOrId(qnumber, args.lang) val = pre .. label .. post end end elseif dtype == "time" then if args.hijri then val = hijriFormat(propval.qualifiers, args.df, args.lang) else val = dateFormat(dv.time, dv.precision, args.df, args.bc, args.pd, propval.qualifiers, args.lang, "", dv.calendarmodel) end elseif dtype == "commonsMedia" or dtype == "external-id" or dtype == "string" or dtype == "url" then if (lpre == "" or lpre == ":") and lpost == "" then val = pre .. dv .. post elseif dtype == "external-id" then val = "[" .. lpre .. dv .. lpost .. " " .. pre .. dv .. post .. "]" else val = "[[" .. lpre .. dv .. lpost .. "|" .. pre .. dv .. post .. "]]" end elseif dtype == "quantity" then local amount = tonumber(dv.amount) or i18n["NaN"] local unit = "" local unitqid = string.match(dv.unit, "(Q%d+)") if filter and unitqid ~= filter then return nil end if unitqid then local uname = mw.wikibase.getLabelByLang(unitqid, args.lang) or "" if uname ~= "" then unit = " " .. uname end end val = tostring(amount) .. unit elseif dtype == "globe-coordinate" then local lat, long, prec = dv.latitude, dv.longitude, dv.precision local show = (args.show or ""):lower() if show == "lat" then val = decimalPrecision(lat, prec) elseif show == "lon" then val = decimalPrecision(long, prec) elseif show == "longlat" then val = decimalPrecision(long, prec) .. ", " .. decimalPrecision(lat, prec) else local ns = lat < 0 and "S" or "N" local ew = long < 0 and "W" or "E" if lat < 0 then lat = -lat end if long < 0 then long = -long end val = decimalPrecision(lat, prec) .. "°" .. ns .. " " .. decimalPrecision(long, prec) .. "°" .. ew end elseif dtype == "monolingualtext" then val = pre .. dv.text .. post mlt = dv.language else val = "unknown data type: " .. dtype end return val, mlt end local function assembleoutput(out, args, entityID, propertyID) local sorted = parseParam(args.sorted, false) local noic = parseParam(args.noicon, false) local list = args.list or "" local separator = args.sep or "" separator = string.gsub(separator, '"', '') if separator == "" then local rtl_lang = {ar = true, fa = true, ur = true, ku = true, he = true} separator = rtl_lang[args.lang] and i18n["list separator-ar"] or i18n["list separator"] end local strout if #out > 0 then if sorted then table.sort(out) end if list == "" then strout = table.concat(out, separator) elseif list:lower() == "prose" then strout = mw.text.listToText(out) else strout = mw.getCurrentFrame():expandTemplate{title = list, args = out} end else strout = nil end return strout end local function propertyvalueandquals(objproperty, args, qualID) -- needs this style of declaration because it's re-entrant -- onlysourced is a boolean passed to return only values sourced to other than Wikipedia -- if nothing or an empty string is passed set it true local onlysrc = parseParam(args.onlysourced, false) -- linked is a a boolean that enables the link to a local page via sitelink -- if nothing or an empty string is passed set it true local linked = parseParam(args.linked, true) -- prefix is a string that may be nil, empty (""), or a string of characters -- this is prefixed to each value -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local prefix = (args.prefix or ""):gsub('"', '') -- postfix is a string that may be nil, empty (""), or a string of characters -- this is postfixed to each value -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local postfix = (args.postfix or ""):gsub('"', '') -- linkprefix is a string that may be nil, empty (""), or a string of characters -- this creates a link and is then prefixed to each value -- useful when when multiple values are returned and indirect links are needed -- any double-quotes " are stripped out, so that spaces may be passed local lprefix = (args.linkprefix or ""):gsub('"', '') -- linkpostfix is a string that may be nil, empty (""), or a string of characters -- this is postfixed to each value when linking is enabled with lprefix -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local lpostfix = (args.linkpostfix or ""):gsub('"', '') -- wdlinks is a boolean passed to enable links to Wikidata when no article exists -- if nothing or an empty string is passed set it false local wdl = parseParam(args.wdl, false) -- unitabbr is a boolean passed to enable unit abbreviations for common units -- if nothing or an empty string is passed set it false local uabbr = parseParam(args.unitabbr, false) -- qualsonly is a boolean passed to return just the qualifiers -- if nothing or an empty string is passed set it false local qualsonly = parseParam(args.qualsonly, false) -- maxvals is a string that may be nil, empty (""), or a number -- this determines how many items may be returned when multiple values are available -- setting it = 1 is useful where the returned string is used within another call, e.g. image local maxvals = tonumber(args.maxvals) or 0 -- pd (plain date) is a string: yes/true/1 | no/false/0 | adj -- to disable/enable "sourcing cirumstances" or use adjectival form for the plain date local pd = args.pd or "no" args.pd = pd -- allow qualifiers to have a different date format; default to year unless qualsonly is set args.qdf = args.qdf or (not qualsonly and "y") local lang = args.lang or (args.langs and args.langs[1]) or findLang().code -- qualID is a string list of wanted qualifiers or "ALL" qualID = qualID or "" -- capitalise list of wanted qualifiers and substitute "DATES" qualID = qualID:upper():gsub("DATES", "P580, P582") local allflag = (qualID == "ALL") -- create table of wanted qualifiers as key local qwanted = {} -- create sequence of wanted qualifiers local qorder = {} for q in mw.text.gsplit(qualID, "%p") do -- split at punctuation and iterate local qtrim = mw.text.trim(q) if qtrim ~= "" then qwanted[mw.text.trim(q)] = true qorder[#qorder+1] = qtrim end end -- qsep is the output separator for rendering qualifier list local qsep = (args.qsep or ""):gsub('"', '') -- qargs are the arguments to supply to assembleoutput() local qargs = { ["osd"] = "false", ["linked"] = tostring(linked), ["prefix"] = args.qprefix, ["postfix"] = args.qpostfix, ["linkprefix"] = args.qlinkprefix, ["linkpostfix"] = args.qlinkpostfix, ["wdl"] = "false", ["unitabbr"] = tostring(uabbr), ["maxvals"] = 0, ["sorted"] = tostring(args.qsorted), ["noicon"] = "true", ["list"] = args.qlist, ["sep"] = qsep, -- ["langobj"] = args.langobj, ["lang"] = args.lang or (args.langs and args.lang[1]), ["df"] = args.qdf, ["sn"] = parseParam(args.qsn, false), } -- all proper values of a Wikidata property will be the same type as the first -- qualifiers don't have a mainsnak, properties do --#Modified line local datatype = objproperty[1].datatype or (objproperty[1].mainsnak and objproperty[1].mainsnak.datatype) -- out[] holds the a list of returned values for this property -- mlt[] holds the language code if the datatype is monolingual text local out = {} local mlt = {} for k, v in ipairs(objproperty) do local hasvalue = true if (onlysrc and not sourced(v)) then -- no value: it isn't sourced when onlysourced=true hasvalue = false else local val, lcode = rendersnak(v, args, linked, lprefix, lpostfix, prefix, postfix, uabbr) if not val then hasvalue = false -- rank doesn't match elseif qualsonly and qualID then -- suppress value returned: only qualifiers are requested else out[#out+1], mlt[#out+1] = val, lcode end end -- See if qualifiers are to be returned: local snak = v.mainsnak or v if hasvalue and v.qualifiers and qualID ~= "" and snak.snaktype~="novalue" then -- collect all wanted qualifier values returned in qlist, indexed by propertyID local qlist = {} local timestart, timeend = "", "" -- loop through qualifiers for k1, v1 in pairs(v.qualifiers) do if allflag or qwanted[k1] then if k1 == "P1326" then local ts = v1[1].datavalue.value.time local dp = v1[1].datavalue.value.precision qlist[k1] = dateFormat(ts, dp, args.qdf, args.bc, pd, "", lang, "before") elseif k1 == "P1319" then local ts = v1[1].datavalue.value.time local dp = v1[1].datavalue.value.precision qlist[k1] = dateFormat(ts, dp, args.qdf, args.bc, pd, "", lang, "after") elseif k1 == "P580" then timestart = propertyvalueandquals(v1, qargs)[1] or "" -- treat only one start time as valid elseif k1 == "P582" then timeend = propertyvalueandquals(v1, qargs)[1] or "" -- treat only one end time as valid else local q = assembleoutput(propertyvalueandquals(v1, qargs), qargs) -- we already deal with circa via 'sourcing circumstances' if the datatype was time -- circa may be either linked or unlinked *** internationalise later *** if datatype ~= "time" or q ~= "circa" and not (type(q) == "string" and q:find("circa]]")) then qlist[k1] = q end end end -- of test for wanted end -- of loop through qualifiers -- set date separator local t = timestart .. timeend -- *** internationalise date separators later *** local dsep = "&ndash;" if t:find("%s") or t:find("&nbsp;") then dsep = " &ndash; " end -- set the order for the list of qualifiers returned; start time and end time go last if next(qlist) then local qlistout = {} if allflag then for k2, v2 in pairs(qlist) do qlistout[#qlistout+1] = v2 end else for i2, v2 in ipairs(qorder) do qlistout[#qlistout+1] = qlist[v2] end end if t ~= "" then qlistout[#qlistout+1] = timestart .. dsep .. timeend end local qstr = assembleoutput(qlistout, qargs) if qualsonly then out[#out+1] = qstr else out[#out] = out[#out] .. " (" .. qstr .. ")" end elseif t ~= "" then if qualsonly then if timestart == "" then out[#out+1] = timeend elseif timeend == "" then out[#out+1] = timestart else out[#out+1] = timestart .. dsep .. timeend end else out[#out] = out[#out] .. " (" .. timestart .. dsep .. timeend .. ")" end end end -- of test for qualifiers wanted if maxvals > 0 and #out >= maxvals then break end end -- of for each value loop -- we need to pick one value to return if the datatype was "monolingualtext" -- if there's only one value, use that -- otherwise look through the fallback languages for a match if datatype == "monolingualtext" and #out >1 then lang = mw.text.split( lang, '-', true )[1] local fbtbl = mw.language.getFallbacksFor( lang ) table.insert( fbtbl, 1, lang ) local bestval = "" local found = false for idx1, lang1 in ipairs(fbtbl) do for idx2, lang2 in ipairs(mlt) do if (lang1 == lang2) and not found then bestval = out[idx2] found = true break end end -- loop through values of property end -- loop through fallback languages if found then -- replace output table with a table containing the best value out = { bestval } else -- more than one value and none of them on the list of fallback languages -- sod it, just give them the first one out = { out[1] } end end return out end local function mergeOptions(defaults, overrides) overrides = overrides or {} local result = {} for k, v in pairs(defaults) do result[k] = v end for k, v in pairs(overrides) do result[k] = v end return result end ------------------------------------------------------------------------------- -- WdItem Class Definition ------------------------------------------------------------------------------- local WdItem = {} WdItem.__index = WdItem function WdItem:__tostring() return "WdItem: " .. (self.qid or "no QID") end function WdItem:UpdateOptions(newOpts) for k, v in pairs(newOpts or {}) do local key = options_aliases[k] self.options[key] = v -- Set default options if key == 'langs' and #v > 0 then self.options.langobj = findLang(self.options.langs[1]) self.options.lang = self.options.langobj.code if not self.options.langobj then self.options.langobj = findLang(self.options.lang) self.options.lang = self.options.langobj.code end end if key == 'rank' then self.options.reqranks = setRanks(self.options.rank) end end if not self.options.reqranks then self.options.reqranks = setRanks('best') end end function WdItem.new(qid, options) local self = setmetatable({}, WdItem) if qid == "" then qid = nil end if (not qid) and mw.wikibase then qid = mw.wikibase.getEntityIdForCurrentPage() end self.qid = qid self.snak = nil self.options = options or {} self:UpdateOptions(options) return self end function WdItem.newFromSnaks(snakTable, options) local self = setmetatable({}, WdItem) self.qid = nil self.snak = snakTable or {} self.options = options or {} self:UpdateOptions(options) return self end function WdItem:setOptions(newOpts) self:UpdateOptions(newOpts) end function WdItem:getStatements(pid, opts) opts = opts or {} local vol = opts.vol local chapter = opts.chapter if self.snak and self.snak[pid] then return self.snak[pid] end if not self.qid or not mw.wikibase then return {} end if vol or chapter then return p.getStatementsByVol(self.qid, pid, vol, chapter) or {} end if self.options.reqranks and self.options.reqranks.b then return mw.wikibase.getBestStatements(self.qid, pid) or {} else return mw.wikibase.getAllStatements(self.qid, pid) or {} end end function WdItem:getValue(pid, opts) local mergedOpts = mergeOptions(self.options, opts) -- Handle local value override if mergedOpts[2] and mergedOpts[2] ~= "" then return mergedOpts[2] end local statements if mergedOpts.no_vol_qual then statements = mw.wikibase.getBestStatements(self.qid, pid) else statements = self:getStatements(pid, {vol = mergedOpts.vol, chapter = mergedOpts.chapter}) end if not statements or #statements == 0 then return nil end local qualID = mw.text.trim(mergedOpts.qual or ""):upper() if qualID == "" then qualID = nil end local out = propertyvalueandquals(statements, mergedOpts, qualID) return assembleoutput(out, mergedOpts, self.qid, pid) end function WdItem:getValueFromSnaks(pid, opts) if not self.snak or not self.snak[pid] then return nil end local mergedOpts = mergeOptions(self.options, opts) local props = self.snak[pid] local out = propertyvalueandquals(props, mergedOpts) return assembleoutput(out, mergedOpts, nil, pid) end function WdItem:getPropertyIDsTable(pid, opts) local mergedOpts = mergeOptions(self.options, opts) mergedOpts.noicon = tostring(parseParam(mergedOpts.noicon or "", true)) local statements = self:getStatements(pid, opts) if not statements or #statements == 0 then return nil end local onlysrc = parseParam(mergedOpts.onlysourced or mergedOpts.osd, true) local maxvals = tonumber(mergedOpts.maxvals) or 0 local out = {} for i, v in ipairs(statements) do local snak = v.mainsnak if (snak.datatype == "wikibase-item") and (v.rank and mergedOpts.reqranks[v.rank:sub(1, 1)]) and (snak.snaktype == "value") and (sourced(v) or not onlysrc) then out[#out+1] = snak.datavalue.value.id end if maxvals > 0 and #out >= maxvals then break end end return out end function WdItem:getPropertyIDs(pid, opts) return assembleoutput(WdItem:getPropertyIDsTable(pid, opts), mergeOptions(self.options, opts), self.qid, pid) end function WdItem:getPropOfProp(prop1, prop2, opts) local mergedOpts = mergeOptions(self.options, opts) if not self.qid then return nil end local statements1 = self:getStatements(prop1, opts) if not statements1 or #statements1 == 0 then return nil end local onlysrc = parseParam(mergedOpts.onlysourced or mergedOpts.osd, true) local maxvals = tonumber(mergedOpts.maxvals) or 0 local qualID = mw.text.trim(mergedOpts.qual or ""):upper() if qualID == "" then qualID = nil end local out = {} for k, v in ipairs(statements1) do if not onlysrc or sourced(v) then local snak = v.mainsnak if snak.datatype == "wikibase-item" and snak.snaktype == "value" then local qid2 = snak.datavalue.value.id local item2 = WdItem.new(qid2, mergedOpts) local statements2 = item2:getStatements(prop2, opts) if statements2 and statements2[1] then local out2 = propertyvalueandquals(statements2, mergedOpts, qualID) out[#out+1] = assembleoutput(out2, mergedOpts, qid2, prop2) end end end if maxvals > 0 and #out >= maxvals then break end end return assembleoutput(out, mergedOpts, self.qid, prop1) end function WdItem:getLangOfProp(pid) if not pid or not self.qid then return {} end local out = {} local props = mw.wikibase.getAllStatements(self.qid, pid) for _, v in ipairs(props) do if v.mainsnak.datatype == "monolingualtext" and v.mainsnak.datavalue then out[#out + 1] = v.mainsnak.datavalue.value.language end end return out end function WdItem:followQid(props, all) all = parseParam(all, false) props = (props or ""):upper() if not self.qid then return nil end if props == "" then return self.qid end local out = {} for p in mw.text.gsplit(props, "%p") do p = mw.text.trim(p) for i, v in ipairs(mw.wikibase.getBestStatements(self.qid, p)) do local linkedid = v.mainsnak.datavalue and v.mainsnak.datavalue.value.id if linkedid then if all then out[#out+1] = linkedid else return linkedid end end end end if #out > 0 then return table.concat(out, " ") else return self.qid end end ------------------------------------------------------------------------------- -- Public API - Utility Functions ------------------------------------------------------------------------------- p.getStatementsByVol = function(qid, pid, vol, chapter) local statements = mw.wikibase.getBestStatements(qid, pid) if not statements then return nil end local filtered_statements = {} if chapter then for _, statement in ipairs(statements) do if statement.qualifiers and statement.qualifiers["P792"] then for _, qual in ipairs(statement.qualifiers["P792"]) do if qual.datavalue and tostring(qual.datavalue.value) == tostring(chapter) then table.insert(filtered_statements, statement) break end end end end end if #filtered_statements == 0 and vol then for _, statement in ipairs(statements) do local vol_match = true if vol and statement.qualifiers and statement.qualifiers["P478"] then vol_match = false for _, qual in ipairs(statement.qualifiers["P478"]) do if qual.datavalue and tostring(qual.datavalue.value) == tostring(vol) then vol_match = true break end end end if vol_match then table.insert(filtered_statements, statement) end end else filtered_statements = statements end return filtered_statements end ------------------------------------------------------------------------------- -- Public API - WdItem Constructors ------------------------------------------------------------------------------- p.WdItem = WdItem function p.newItem(qid, opts) return WdItem.new(qid, opts) end function p.currentItem(opts) return WdItem.new(nil, opts) end function p.newSnakItem(snakTable, opts) return WdItem.newFromSnaks(snakTable, opts) end return p b92rywih0ni2dwkzh4ckrega9cqzrtk 1096561 1096559 2026-07-17T20:29:47Z حبيشان 31560 1096561 Scribunto text/plain -- Module: WdItem -- Object-oriented Wikidata access module for Lua -- Refactored from WikidataIB for direct Lua usage require("strict") local p = {} -- i18n configuration local i18n = { ["errors"] = { ["property-not-found"] = "الخاصية غير موجودة.", ["entity-not-found"] = "الكيان على ويكي بيانات غير موجود.", ["unknown-claim-type"] = "نوع الادعاء غير معروف.", ["local-article-not-found"] = "المعرف متاح على ويكي بيانات، ولكن المقال غير متاح على ويكيبيديا", }, ["months"] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }, ["Unknown"] = "Unknown", ["NaN"] = "Not a number", ["missinginfocat"] = "[[تصنيف:Articles with missing Wikidata information]]", ["list separator"] = ", ", ["list separator-ar"] = "، ", } -- Date precision constants local dp = { [6] = "millennium", [7] = "century", [8] = "decade", [9] = "year", [10] = "month", [11] = "day", } local options_aliases = { ["osd"] = "onlysourced", ["wdlinks"] = "wdl", ["uabbr"] = "unitabbr", ["qo"] = "qualsonly", ["lp"] = "linkprefix", ["lprefix"] = "linkprefix", ["qlp"] = "qlinkprefix", ["sn"] = "shortname", ["uselabel"] = "uselbl", ["plaindate"] = "pd", ["qualifierdateformat"] = "qdf", ["df"] = "qdf", ["qshortname"] = "qsn" } setmetatable(options_aliases, { __index = function(t, k) return k end }) ------------------------------------------------------------------------------- -- Internal helper functions ------------------------------------------------------------------------------- local function findLang(langcode) local langobj langcode = mw.text.trim(langcode or "") if mw.language.isKnownLanguageTag(langcode) then langobj = mw.language.new(langcode) else langcode = mw.getCurrentFrame():callParserFunction('int', {'lang'}) if mw.language.isKnownLanguageTag(langcode) then langobj = mw.language.new(langcode) else langobj = mw.language.getContentLanguage() end end return langobj end local function parseParam(param, default) if param == nil then return default end return param end local function setRanks(rank) rank = (rank or ""):lower() local ranks = {} for w in string.gmatch(rank, "%a+") do w = w:sub(1,1) if w == "b" or w == "p" or w == "n" or w == "d" then ranks[w] = true end end if ranks.b or not next(ranks) then ranks.p = true ranks.n = true end return ranks end local function labelOrId(id, lang) if lang == "default" then lang = findLang().code end local label if lang then label = mw.wikibase.getLabelByLang(id, lang) end if not label then local trylang = {"ar","en","fr"} local triedlang = lang for _,lang in pairs(trylang) do if triedlang ~= lang then label = mw.wikibase.getLabelByLang(id, lang) if label ~= "" then break end end end end if label then return mw.text.nowiki(label), true else return id, false end end local function roundto(x, sf) if x == 0 then return 0 end local s = 1 if x < 0 then x = -x s = -1 end if sf < 1 then sf = 1 end local p = 10 ^ (math.floor(math.log10(x)) - sf + 1) x = math.floor(x / p + 0.5) * p * s if x == math.floor(x) then x = math.floor(x) end return x end local function decimalPrecision(x, p) local s = 1 if x < 0 then x = -x s = -1 end if not tonumber(p) then p = 1e-4 elseif p > 1 then p = 1 elseif p < 1e-6 then p = 1e-6 else p = 10 ^ math.floor(math.log10(p)) end x = math.floor(x / p + 0.5) * p * s if x == math.floor(x) then x = math.floor(x) end if math.abs(x) < 1e-4 then x = string.format("%f", x) end return x end local function decimalToDMS(x, p) if not tonumber(p) then p = 1e-4 end local d = math.floor(x) local ms = (x - d) * 60 if p > 0.5 then if ms > 30 then d = d + 1 end ms = 0 end local m = math.floor(ms) local s = (ms - m) * 60 if p > 0.008 then if s > 30 then m = m +1 end s = 0 elseif p > 0.00014 then s = math.floor(s + 0.5) elseif p > 0.000014 then s = math.floor(10 * s + 0.5) / 10 elseif p > 0.0000014 then s = math.floor(100 * s + 0.5) / 100 else s = math.floor(1000 * s + 0.5) / 1000 end return d, m, s end local function dateFormat(timestamp, dprec, df, bcf, pd, qualifiers, lang, adj, model) df = (df or ""):lower() if df == "ymd" then if timestamp:sub(1,1) == "+" then return timestamp:sub(2,11) else local yr = tonumber(timestamp:sub(2,5)) - 1 yr = ("000" .. yr):sub(-4) if yr ~= "0000" then yr = "-" .. yr end return yr .. timestamp:sub(6,11) end end timestamp = timestamp:gsub("%-00%-00T", "-01-01T") dprec = dprec or 11 if df == "y" and dprec > 9 then dprec = 9 end dprec = dprec>11 and 11 or dprec dprec = dprec<6 and 6 or dprec bcf = (bcf or ""):upper() pd = (pd or ""):sub(1,1):lower() if pd == "" or pd == "n" or pd == "f" or pd == "0" then pd = false end lang = lang or findLang().code adj = adj or "" local bc = timestamp:sub(1, 1)=="-" and "BC" or "" local year, month, day = timestamp:match("[+-](%d*)-(%d*)-(%d*)T") local iso = tonumber(year) if dprec == 6 then iso = math.floor( (iso - 1) / 1000 ) + 1 end if dprec == 7 then iso = math.floor( (iso - 1) / 100 ) + 1 end if dprec == 8 then iso = math.floor( iso / 10 ) .. "0" end if dprec == 10 then iso = year .. "-" .. month end if dprec == 11 then iso = year .. "-" .. month .. "-" .. day end local sc = not pd and qualifiers and qualifiers.P1480 if sc then for k1, v1 in pairs(sc) do if v1.datavalue and v1.datavalue.value.id == "Q5727902" then adj = "circa" break end end end local calendarmodel = "" if tonumber(year) > 1582 and dprec > 8 and not pd and model == "http://www.wikidata.org/entity/Q1985786" then calendarmodel = "julian" end -- Simplified date formatting (complex date module not available) local fdate = tostring(iso) if bc ~= "" then fdate = fdate .. " " .. (bcf == "BC" and "BC" or "BCE") end if adj == "circa" then fdate = "c. " .. fdate end return fdate end local function hijriFormat(qualifiers, dateformat, lang) if not qualifiers.P4241 then return; end local year, month, day local val local qhmonths = {["Q1952053"]=1,["Q489557"]=2, ["Q474167"] = 3, ["Q273815"] = 4, ["Q852002"] = 5, ["Q822218"] = 6, ["Q194210"] = 7, ["Q220914"] = 8, ["Q8867089"]=9, ["Q685440"]=10,["Q150853"]=11,["Q186022"]=12 } local hmonths = {"محرم","صفر","ربيع الأول","ربيع الآخر","جمادى الأولى","جمادى الآخرة","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة"} local hmonths_inv = {["محرم"] = 1, ["صفر"]=2, ["ربيع الأول"]=3, ["ربيع الآخر"]=4, ["جمادى الأولى"]=5, ["جمادى الآخرة"]=6, ["رجب"]=7, ["شعبان"]=8, ["رمضان"]=9, ["شوال"]=10, ["ذو القعدة"]=11, ["ذو الحجة"]=12} for _, item in ipairs(qualifiers.P4241) do local timeQ = item.datavalue and item.datavalue.value and item.datavalue.value.id local hastime = false if timeQ then local timeQt = mw.wikibase.getBestStatements(timeQ, "P361") for _,timeQsnak in pairs(timeQt) do local timeType = timeQsnak.mainsnak and timeQsnak.mainsnak.datavalue and timeQsnak.mainsnak.datavalue.value and timeQsnak.mainsnak.datavalue.value.id if timeType == "Q28892" then local timeLableAr = mw.wikibase.getLabelByLang(timeQ, "ar") if timeLableAr then year = mw.ustring.match(timeLableAr, "^(%d+) *هـ$") end if not year then local timeLableEn = mw.wikibase.getLabelByLang(timeQ, "en") if timeLableEn then year = mw.ustring.match(timeLableAr, "^(%d+) *AH$") end end hastime=true elseif qhmonths[timeType] then month = qhmonths[timeType] if month>0 and month<13 then month = hmonths[month] end local timeLableAr = mw.wikibase.getLabelByLang(timeQ, "ar") if timeLableAr then day = mw.ustring.match(timeLableAr, "^(%d+) *%a+$") end if not day then local timeLableEn = mw.wikibase.getLabelByLang(timeQ, "en") if timeLableEn then day = mw.ustring.match(timeLableAr, "^(%d+) *%a+$") end end hastime=true end end if not hastime then timeQt = mw.wikibase.getBestStatements(timeQ, "P31") if "Q125390868" == (timeQt[1].mainsnak and timeQt[1].mainsnak.datavalue and timeQt[1].mainsnak.datavalue.value and timeQt[1].mainsnak.datavalue.value.id ) then val = mw.wikibase.getLabelByLang(timeQ, "ar") month, year = mw.ustring.match(val, "^(%a[%a ]+%a) *(%d+) *هـ?$") end end end end if year then if dateformat == "y" then return year; elseif day and month then return day .. ' ' .. month .. ' ' .. year; elseif month then return month .. ' ' .. year; end end return nil; end local function sourced(claim) if claim.references then for kr, vr in pairs(claim.references) do local ref = mw.wikibase.renderSnaks(vr.snaks) if not ref:find("Wiki") then return true end end end end local function linkedItem(id, args) local lprefix = (args.linkprefix or ""):gsub('"', '') local lpostfix = (args.lpostfix or ""):gsub('"', '') local prefix = (args.prefix or ""):gsub('"', '') local postfix = (args.postfix or ""):gsub('"', '') local dtxt = args.dtxt local lang = args.lang or "ar" local uselbl = parseParam( args.uselbl, true) local disp local sitelink = mw.wikibase.getSitelink(id) local label, islabel if dtxt then label, islabel = dtxt, true else label, islabel = labelOrId(id, args.lang) end if sitelink then if not uselbl then local pos = sitelink:find(":") or 0 local slink = sitelink if pos > 0 then local pfx = sitelink:sub(1,pos-1) if mw.site.namespaces[pfx] then slink = sitelink:sub(pos+1) end end slink = slink:gsub("%s%(.+%)$", ""):gsub(",.+$", "") if label:find("^%u") then label = slink:gsub("^(%l)", string.upper) else label = slink:gsub("^(%u)", string.lower) end end disp = "[[" .. lprefix .. sitelink .. lpostfix .. "|" .. prefix .. label .. postfix .. "]]" elseif islabel then disp = prefix .. label .. postfix else disp = prefix .. label .. postfix .. i18n.missinginfocat end return disp end local function rendersnak(propval, args, linked, lpre, lpost, pre, post, uabbr, filter) lpre = lpre or "" lpost = lpost or "" pre = pre or "" post = post or "" args.lang = args.lang or findLang().code local snak = propval.mainsnak or propval local dtype = snak.datatype local dv = snak.datavalue dv = dv and dv.value local val, mlt local namedas; namedas = propval.qualifiers and propval.qualifiers.P1932 and propval.qualifiers.P1932[1].datavalue and propval.qualifiers.P1932[1].datavalue.value or nil args.dtxt = namedas if propval.rank and not args.reqranks[propval.rank:sub(1, 1)] then return nil elseif snak.snaktype == "somevalue" then val = namedas or i18n["Unknown"] elseif snak.snaktype == "novalue" then -- return nothing elseif dtype == "wikibase-item" then local qnumber = dv.id if linked then val = linkedItem(qnumber, args) else if namedas then val = pre .. namedas .. post else local label, islabel = labelOrId(qnumber, args.lang) val = pre .. label .. post end end elseif dtype == "time" then if args.hijri then val = hijriFormat(propval.qualifiers, args.df, args.lang) else val = dateFormat(dv.time, dv.precision, args.df, args.bc, args.pd, propval.qualifiers, args.lang, "", dv.calendarmodel) end elseif dtype == "commonsMedia" or dtype == "external-id" or dtype == "string" or dtype == "url" then if (lpre == "" or lpre == ":") and lpost == "" then val = pre .. dv .. post elseif dtype == "external-id" then val = "[" .. lpre .. dv .. lpost .. " " .. pre .. dv .. post .. "]" else val = "[[" .. lpre .. dv .. lpost .. "|" .. pre .. dv .. post .. "]]" end elseif dtype == "quantity" then local amount = tonumber(dv.amount) or i18n["NaN"] local unit = "" local unitqid = string.match(dv.unit, "(Q%d+)") if filter and unitqid ~= filter then return nil end if unitqid then local uname = mw.wikibase.getLabelByLang(unitqid, args.lang) or "" if uname ~= "" then unit = " " .. uname end end val = tostring(amount) .. unit elseif dtype == "globe-coordinate" then local lat, long, prec = dv.latitude, dv.longitude, dv.precision local show = (args.show or ""):lower() if show == "lat" then val = decimalPrecision(lat, prec) elseif show == "lon" then val = decimalPrecision(long, prec) elseif show == "longlat" then val = decimalPrecision(long, prec) .. ", " .. decimalPrecision(lat, prec) else local ns = lat < 0 and "S" or "N" local ew = long < 0 and "W" or "E" if lat < 0 then lat = -lat end if long < 0 then long = -long end val = decimalPrecision(lat, prec) .. "°" .. ns .. " " .. decimalPrecision(long, prec) .. "°" .. ew end elseif dtype == "monolingualtext" then val = pre .. dv.text .. post mlt = dv.language else val = "unknown data type: " .. dtype end return val, mlt end local function assembleoutput(out, args, entityID, propertyID) local sorted = parseParam(args.sorted, false) local noic = parseParam(args.noicon, false) local list = args.list or "" local separator = args.sep or "" separator = string.gsub(separator, '"', '') if separator == "" then local rtl_lang = {ar = true, fa = true, ur = true, ku = true, he = true} separator = rtl_lang[args.lang] and i18n["list separator-ar"] or i18n["list separator"] end local strout if #out > 0 then if sorted then table.sort(out) end if list == "" then strout = table.concat(out, separator) elseif list:lower() == "prose" then strout = mw.text.listToText(out) else strout = mw.getCurrentFrame():expandTemplate{title = list, args = out} end else strout = nil end return strout end local function propertyvalueandquals(objproperty, args, qualID) -- needs this style of declaration because it's re-entrant -- onlysourced is a boolean passed to return only values sourced to other than Wikipedia -- if nothing or an empty string is passed set it true local onlysrc = parseParam(args.onlysourced, false) -- linked is a a boolean that enables the link to a local page via sitelink -- if nothing or an empty string is passed set it true local linked = parseParam(args.linked, true) -- prefix is a string that may be nil, empty (""), or a string of characters -- this is prefixed to each value -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local prefix = (args.prefix or ""):gsub('"', '') -- postfix is a string that may be nil, empty (""), or a string of characters -- this is postfixed to each value -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local postfix = (args.postfix or ""):gsub('"', '') -- linkprefix is a string that may be nil, empty (""), or a string of characters -- this creates a link and is then prefixed to each value -- useful when when multiple values are returned and indirect links are needed -- any double-quotes " are stripped out, so that spaces may be passed local lprefix = (args.linkprefix or ""):gsub('"', '') -- linkpostfix is a string that may be nil, empty (""), or a string of characters -- this is postfixed to each value when linking is enabled with lprefix -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local lpostfix = (args.linkpostfix or ""):gsub('"', '') -- wdlinks is a boolean passed to enable links to Wikidata when no article exists -- if nothing or an empty string is passed set it false local wdl = parseParam(args.wdl, false) -- unitabbr is a boolean passed to enable unit abbreviations for common units -- if nothing or an empty string is passed set it false local uabbr = parseParam(args.unitabbr, false) -- qualsonly is a boolean passed to return just the qualifiers -- if nothing or an empty string is passed set it false local qualsonly = parseParam(args.qualsonly, false) -- maxvals is a string that may be nil, empty (""), or a number -- this determines how many items may be returned when multiple values are available -- setting it = 1 is useful where the returned string is used within another call, e.g. image local maxvals = tonumber(args.maxvals) or 0 -- pd (plain date) is a string: yes/true/1 | no/false/0 | adj -- to disable/enable "sourcing cirumstances" or use adjectival form for the plain date local pd = args.pd or "no" args.pd = pd -- allow qualifiers to have a different date format; default to year unless qualsonly is set args.qdf = args.qdf or (not qualsonly and "y") local lang = args.lang or (args.langs and args.langs[1]) or findLang().code -- qualID is a string list of wanted qualifiers or "ALL" qualID = qualID or "" -- capitalise list of wanted qualifiers and substitute "DATES" qualID = qualID:upper():gsub("DATES", "P580, P582") local allflag = (qualID == "ALL") -- create table of wanted qualifiers as key local qwanted = {} -- create sequence of wanted qualifiers local qorder = {} for q in mw.text.gsplit(qualID, "%p") do -- split at punctuation and iterate local qtrim = mw.text.trim(q) if qtrim ~= "" then qwanted[mw.text.trim(q)] = true qorder[#qorder+1] = qtrim end end -- qsep is the output separator for rendering qualifier list local qsep = (args.qsep or ""):gsub('"', '') -- qargs are the arguments to supply to assembleoutput() local qargs = { ["osd"] = "false", ["linked"] = tostring(linked), ["prefix"] = args.qprefix, ["postfix"] = args.qpostfix, ["linkprefix"] = args.qlinkprefix, ["linkpostfix"] = args.qlinkpostfix, ["wdl"] = "false", ["unitabbr"] = tostring(uabbr), ["maxvals"] = 0, ["sorted"] = tostring(args.qsorted), ["noicon"] = "true", ["list"] = args.qlist, ["sep"] = qsep, -- ["langobj"] = args.langobj, ["lang"] = args.lang or (args.langs and args.lang[1]), ["df"] = args.qdf, ["sn"] = parseParam(args.qsn, false), } -- all proper values of a Wikidata property will be the same type as the first -- qualifiers don't have a mainsnak, properties do --#Modified line local datatype = objproperty[1].datatype or (objproperty[1].mainsnak and objproperty[1].mainsnak.datatype) -- out[] holds the a list of returned values for this property -- mlt[] holds the language code if the datatype is monolingual text local out = {} local mlt = {} for k, v in ipairs(objproperty) do local hasvalue = true if (onlysrc and not sourced(v)) then -- no value: it isn't sourced when onlysourced=true hasvalue = false else local val, lcode = rendersnak(v, args, linked, lprefix, lpostfix, prefix, postfix, uabbr) if not val then hasvalue = false -- rank doesn't match elseif qualsonly and qualID then -- suppress value returned: only qualifiers are requested else out[#out+1], mlt[#out+1] = val, lcode end end -- See if qualifiers are to be returned: local snak = v.mainsnak or v if hasvalue and v.qualifiers and qualID ~= "" and snak.snaktype~="novalue" then -- collect all wanted qualifier values returned in qlist, indexed by propertyID local qlist = {} local timestart, timeend = "", "" -- loop through qualifiers for k1, v1 in pairs(v.qualifiers) do if allflag or qwanted[k1] then if k1 == "P1326" then local ts = v1[1].datavalue.value.time local dp = v1[1].datavalue.value.precision qlist[k1] = dateFormat(ts, dp, args.qdf, args.bc, pd, "", lang, "before") elseif k1 == "P1319" then local ts = v1[1].datavalue.value.time local dp = v1[1].datavalue.value.precision qlist[k1] = dateFormat(ts, dp, args.qdf, args.bc, pd, "", lang, "after") elseif k1 == "P580" then timestart = propertyvalueandquals(v1, qargs)[1] or "" -- treat only one start time as valid elseif k1 == "P582" then timeend = propertyvalueandquals(v1, qargs)[1] or "" -- treat only one end time as valid else local q = assembleoutput(propertyvalueandquals(v1, qargs), qargs) -- we already deal with circa via 'sourcing circumstances' if the datatype was time -- circa may be either linked or unlinked *** internationalise later *** if datatype ~= "time" or q ~= "circa" and not (type(q) == "string" and q:find("circa]]")) then qlist[k1] = q end end end -- of test for wanted end -- of loop through qualifiers -- set date separator local t = timestart .. timeend -- *** internationalise date separators later *** local dsep = "&ndash;" if t:find("%s") or t:find("&nbsp;") then dsep = " &ndash; " end -- set the order for the list of qualifiers returned; start time and end time go last if next(qlist) then local qlistout = {} if allflag then for k2, v2 in pairs(qlist) do qlistout[#qlistout+1] = v2 end else for i2, v2 in ipairs(qorder) do qlistout[#qlistout+1] = qlist[v2] end end if t ~= "" then qlistout[#qlistout+1] = timestart .. dsep .. timeend end local qstr = assembleoutput(qlistout, qargs) if qualsonly then out[#out+1] = qstr else out[#out] = out[#out] .. " (" .. qstr .. ")" end elseif t ~= "" then if qualsonly then if timestart == "" then out[#out+1] = timeend elseif timeend == "" then out[#out+1] = timestart else out[#out+1] = timestart .. dsep .. timeend end else out[#out] = out[#out] .. " (" .. timestart .. dsep .. timeend .. ")" end end end -- of test for qualifiers wanted if maxvals > 0 and #out >= maxvals then break end end -- of for each value loop -- we need to pick one value to return if the datatype was "monolingualtext" -- if there's only one value, use that -- otherwise look through the fallback languages for a match if datatype == "monolingualtext" and #out >1 then lang = mw.text.split( lang, '-', true )[1] local fbtbl = mw.language.getFallbacksFor( lang ) table.insert( fbtbl, 1, lang ) local bestval = "" local found = false for idx1, lang1 in ipairs(fbtbl) do for idx2, lang2 in ipairs(mlt) do if (lang1 == lang2) and not found then bestval = out[idx2] found = true break end end -- loop through values of property end -- loop through fallback languages if found then -- replace output table with a table containing the best value out = { bestval } else -- more than one value and none of them on the list of fallback languages -- sod it, just give them the first one out = { out[1] } end end return out end local function mergeOptions(defaults, overrides) overrides = overrides or {} defaults = defaults or {} local result = {} for k, v in pairs(defaults) do result[k] = v end for k, v in pairs(overrides) do result[k] = v end return result end ------------------------------------------------------------------------------- -- WdItem Class Definition ------------------------------------------------------------------------------- local WdItem = {} WdItem.__index = WdItem function WdItem:__tostring() return "WdItem: " .. (self.qid or "no QID") end function WdItem:UpdateOptions(newOpts) for k, v in pairs(newOpts or {}) do local key = options_aliases[k] self.options[key] = v -- Set default options if key == 'langs' and #v > 0 then self.options.langobj = findLang(self.options.langs[1]) self.options.lang = self.options.langobj.code if not self.options.langobj then self.options.langobj = findLang(self.options.lang) self.options.lang = self.options.langobj.code end end if key == 'rank' then self.options.reqranks = setRanks(self.options.rank) end end if not self.options.reqranks then self.options.reqranks = setRanks('best') end end function WdItem.new(qid, options) local self = setmetatable({}, WdItem) if qid == "" then qid = nil end if (not qid) and mw.wikibase then qid = mw.wikibase.getEntityIdForCurrentPage() end self.qid = qid self.snak = nil self.options = options or {} self:UpdateOptions(options) return self end function WdItem.newFromSnaks(snakTable, options) local self = setmetatable({}, WdItem) self.qid = nil self.snak = snakTable or {} self.options = options or {} self:UpdateOptions(options) return self end function WdItem:setOptions(newOpts) self:UpdateOptions(newOpts) end function WdItem:getStatements(pid, opts) opts = opts or {} local vol = opts.vol local chapter = opts.chapter if self.snak and self.snak[pid] then return self.snak[pid] end if not self.qid or not mw.wikibase then return {} end if vol or chapter then return p.getStatementsByVol(self.qid, pid, vol, chapter) or {} end if self.options.reqranks and self.options.reqranks.b then return mw.wikibase.getBestStatements(self.qid, pid) or {} else return mw.wikibase.getAllStatements(self.qid, pid) or {} end end function WdItem:getValue(pid, opts) local mergedOpts = mergeOptions(self.options, opts) -- Handle local value override if mergedOpts[2] and mergedOpts[2] ~= "" then return mergedOpts[2] end local statements if mergedOpts.no_vol_qual then statements = mw.wikibase.getBestStatements(self.qid, pid) else statements = self:getStatements(pid, {vol = mergedOpts.vol, chapter = mergedOpts.chapter}) end if not statements or #statements == 0 then return nil end local qualID = mw.text.trim(mergedOpts.qual or ""):upper() if qualID == "" then qualID = nil end local out = propertyvalueandquals(statements, mergedOpts, qualID) return assembleoutput(out, mergedOpts, self.qid, pid) end function WdItem:getValueFromSnaks(pid, opts) if not self.snak or not self.snak[pid] then return nil end local mergedOpts = mergeOptions(self.options, opts) local props = self.snak[pid] local out = propertyvalueandquals(props, mergedOpts) return assembleoutput(out, mergedOpts, nil, pid) end function WdItem:getPropertyIDsTable(pid, opts) local mergedOpts = mergeOptions(self.options, opts) mergedOpts.noicon = tostring(parseParam(mergedOpts.noicon or "", true)) local statements = self:getStatements(pid, opts) if not statements or #statements == 0 then return nil end local onlysrc = parseParam(mergedOpts.onlysourced or mergedOpts.osd, true) local maxvals = tonumber(mergedOpts.maxvals) or 0 local out = {} for i, v in ipairs(statements) do local snak = v.mainsnak if (snak.datatype == "wikibase-item") and (v.rank and mergedOpts.reqranks[v.rank:sub(1, 1)]) and (snak.snaktype == "value") and (sourced(v) or not onlysrc) then out[#out+1] = snak.datavalue.value.id end if maxvals > 0 and #out >= maxvals then break end end return out end function WdItem:getPropertyIDs(pid, opts) return assembleoutput(WdItem:getPropertyIDsTable(pid, opts), mergeOptions(self.options, opts), self.qid, pid) end function WdItem:getPropOfProp(prop1, prop2, opts) local mergedOpts = mergeOptions(self.options, opts) if not self.qid then return nil end local statements1 = self:getStatements(prop1, opts) if not statements1 or #statements1 == 0 then return nil end local onlysrc = parseParam(mergedOpts.onlysourced or mergedOpts.osd, true) local maxvals = tonumber(mergedOpts.maxvals) or 0 local qualID = mw.text.trim(mergedOpts.qual or ""):upper() if qualID == "" then qualID = nil end local out = {} for k, v in ipairs(statements1) do if not onlysrc or sourced(v) then local snak = v.mainsnak if snak.datatype == "wikibase-item" and snak.snaktype == "value" then local qid2 = snak.datavalue.value.id local item2 = WdItem.new(qid2, mergedOpts) local statements2 = item2:getStatements(prop2, opts) if statements2 and statements2[1] then local out2 = propertyvalueandquals(statements2, mergedOpts, qualID) out[#out+1] = assembleoutput(out2, mergedOpts, qid2, prop2) end end end if maxvals > 0 and #out >= maxvals then break end end return assembleoutput(out, mergedOpts, self.qid, prop1) end function WdItem:getLangOfProp(pid) if not pid or not self.qid then return {} end local out = {} local props = mw.wikibase.getAllStatements(self.qid, pid) for _, v in ipairs(props) do if v.mainsnak.datatype == "monolingualtext" and v.mainsnak.datavalue then out[#out + 1] = v.mainsnak.datavalue.value.language end end return out end function WdItem:followQid(props, all) all = parseParam(all, false) props = (props or ""):upper() if not self.qid then return nil end if props == "" then return self.qid end local out = {} for p in mw.text.gsplit(props, "%p") do p = mw.text.trim(p) for i, v in ipairs(mw.wikibase.getBestStatements(self.qid, p)) do local linkedid = v.mainsnak.datavalue and v.mainsnak.datavalue.value.id if linkedid then if all then out[#out+1] = linkedid else return linkedid end end end end if #out > 0 then return table.concat(out, " ") else return self.qid end end ------------------------------------------------------------------------------- -- Public API - Utility Functions ------------------------------------------------------------------------------- p.getStatementsByVol = function(qid, pid, vol, chapter) local statements = mw.wikibase.getBestStatements(qid, pid) if not statements then return nil end local filtered_statements = {} if chapter then for _, statement in ipairs(statements) do if statement.qualifiers and statement.qualifiers["P792"] then for _, qual in ipairs(statement.qualifiers["P792"]) do if qual.datavalue and tostring(qual.datavalue.value) == tostring(chapter) then table.insert(filtered_statements, statement) break end end end end end if #filtered_statements == 0 and vol then for _, statement in ipairs(statements) do local vol_match = true if vol and statement.qualifiers and statement.qualifiers["P478"] then vol_match = false for _, qual in ipairs(statement.qualifiers["P478"]) do if qual.datavalue and tostring(qual.datavalue.value) == tostring(vol) then vol_match = true break end end end if vol_match then table.insert(filtered_statements, statement) end end else filtered_statements = statements end return filtered_statements end ------------------------------------------------------------------------------- -- Public API - WdItem Constructors ------------------------------------------------------------------------------- p.WdItem = WdItem function p.newItem(qid, opts) return WdItem.new(qid, opts) end function p.currentItem(opts) return WdItem.new(nil, opts) end function p.newSnakItem(snakTable, opts) return WdItem.newFromSnaks(snakTable, opts) end return p 0cgind7rqf25103gupgu6xzq3ivdr95 1096563 1096561 2026-07-17T21:16:37Z حبيشان 31560 1096563 Scribunto text/plain -- Module: WdItem -- Object-oriented Wikidata access module for Lua -- Refactored from WikidataIB for direct Lua usage require("strict") local p = {} -- i18n configuration local i18n = { ["errors"] = { ["property-not-found"] = "الخاصية غير موجودة.", ["entity-not-found"] = "الكيان على ويكي بيانات غير موجود.", ["unknown-claim-type"] = "نوع الادعاء غير معروف.", ["local-article-not-found"] = "المعرف متاح على ويكي بيانات، ولكن المقال غير متاح على ويكيبيديا", }, ["months"] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }, ["Unknown"] = "Unknown", ["NaN"] = "Not a number", ["missinginfocat"] = "[[تصنيف:Articles with missing Wikidata information]]", ["list separator"] = ", ", ["list separator-ar"] = "، ", } -- Date precision constants local dp = { [6] = "millennium", [7] = "century", [8] = "decade", [9] = "year", [10] = "month", [11] = "day", } local options_aliases = { ["osd"] = "onlysourced", ["wdlinks"] = "wdl", ["uabbr"] = "unitabbr", ["qo"] = "qualsonly", ["lp"] = "linkprefix", ["lprefix"] = "linkprefix", ["qlp"] = "qlinkprefix", ["sn"] = "shortname", ["uselabel"] = "uselbl", ["plaindate"] = "pd", ["qualifierdateformat"] = "qdf", ["df"] = "qdf", ["qshortname"] = "qsn" } setmetatable(options_aliases, { __index = function(t, k) return k end }) ------------------------------------------------------------------------------- -- Internal helper functions ------------------------------------------------------------------------------- local function findLang(langcode) local langobj langcode = mw.text.trim(langcode or "") if mw.language.isKnownLanguageTag(langcode) then langobj = mw.language.new(langcode) else langcode = mw.getCurrentFrame():callParserFunction('int', {'lang'}) if mw.language.isKnownLanguageTag(langcode) then langobj = mw.language.new(langcode) else langobj = mw.language.getContentLanguage() end end return langobj end local function parseParam(param, default) if param == nil then return default end return param end local function setRanks(rank) rank = (rank or ""):lower() local ranks = {} for w in string.gmatch(rank, "%a+") do w = w:sub(1,1) if w == "b" or w == "p" or w == "n" or w == "d" then ranks[w] = true end end if ranks.b or not next(ranks) then ranks.p = true ranks.n = true end return ranks end local function labelOrId(id, lang) if lang == "default" then lang = findLang().code end local label if lang then label = mw.wikibase.getLabelByLang(id, lang) end if not label then local trylang = {"ar","en","fr"} local triedlang = lang for _,lang in pairs(trylang) do if triedlang ~= lang then label = mw.wikibase.getLabelByLang(id, lang) if label ~= "" then break end end end end if label then return mw.text.nowiki(label), true else return id, false end end local function roundto(x, sf) if x == 0 then return 0 end local s = 1 if x < 0 then x = -x s = -1 end if sf < 1 then sf = 1 end local p = 10 ^ (math.floor(math.log10(x)) - sf + 1) x = math.floor(x / p + 0.5) * p * s if x == math.floor(x) then x = math.floor(x) end return x end local function decimalPrecision(x, p) local s = 1 if x < 0 then x = -x s = -1 end if not tonumber(p) then p = 1e-4 elseif p > 1 then p = 1 elseif p < 1e-6 then p = 1e-6 else p = 10 ^ math.floor(math.log10(p)) end x = math.floor(x / p + 0.5) * p * s if x == math.floor(x) then x = math.floor(x) end if math.abs(x) < 1e-4 then x = string.format("%f", x) end return x end local function decimalToDMS(x, p) if not tonumber(p) then p = 1e-4 end local d = math.floor(x) local ms = (x - d) * 60 if p > 0.5 then if ms > 30 then d = d + 1 end ms = 0 end local m = math.floor(ms) local s = (ms - m) * 60 if p > 0.008 then if s > 30 then m = m +1 end s = 0 elseif p > 0.00014 then s = math.floor(s + 0.5) elseif p > 0.000014 then s = math.floor(10 * s + 0.5) / 10 elseif p > 0.0000014 then s = math.floor(100 * s + 0.5) / 100 else s = math.floor(1000 * s + 0.5) / 1000 end return d, m, s end local function dateFormat(timestamp, dprec, df, bcf, pd, qualifiers, lang, adj, model) df = (df or ""):lower() if df == "ymd" then if timestamp:sub(1,1) == "+" then return timestamp:sub(2,11) else local yr = tonumber(timestamp:sub(2,5)) - 1 yr = ("000" .. yr):sub(-4) if yr ~= "0000" then yr = "-" .. yr end return yr .. timestamp:sub(6,11) end end timestamp = timestamp:gsub("%-00%-00T", "-01-01T") dprec = dprec or 11 if df == "y" and dprec > 9 then dprec = 9 end dprec = dprec>11 and 11 or dprec dprec = dprec<6 and 6 or dprec bcf = (bcf or ""):upper() pd = (pd or ""):sub(1,1):lower() if pd == "" or pd == "n" or pd == "f" or pd == "0" then pd = false end lang = lang or findLang().code adj = adj or "" local bc = timestamp:sub(1, 1)=="-" and "BC" or "" local year, month, day = timestamp:match("[+-](%d*)-(%d*)-(%d*)T") local iso = tonumber(year) if dprec == 6 then iso = math.floor( (iso - 1) / 1000 ) + 1 end if dprec == 7 then iso = math.floor( (iso - 1) / 100 ) + 1 end if dprec == 8 then iso = math.floor( iso / 10 ) .. "0" end if dprec == 10 then iso = year .. "-" .. month end if dprec == 11 then iso = year .. "-" .. month .. "-" .. day end local sc = not pd and qualifiers and qualifiers.P1480 if sc then for k1, v1 in pairs(sc) do if v1.datavalue and v1.datavalue.value.id == "Q5727902" then adj = "circa" break end end end local calendarmodel = "" if tonumber(year) > 1582 and dprec > 8 and not pd and model == "http://www.wikidata.org/entity/Q1985786" then calendarmodel = "julian" end -- Simplified date formatting (complex date module not available) local fdate = tostring(iso) if bc ~= "" then fdate = fdate .. " " .. (bcf == "BC" and "BC" or "BCE") end if adj == "circa" then fdate = "c. " .. fdate end return fdate end local function hijriFormat(qualifiers, dateformat, lang) if not qualifiers.P4241 then return; end local year, month, day local val local qhmonths = {["Q1952053"]=1,["Q489557"]=2, ["Q474167"] = 3, ["Q273815"] = 4, ["Q852002"] = 5, ["Q822218"] = 6, ["Q194210"] = 7, ["Q220914"] = 8, ["Q8867089"]=9, ["Q685440"]=10,["Q150853"]=11,["Q186022"]=12 } local hmonths = {"محرم","صفر","ربيع الأول","ربيع الآخر","جمادى الأولى","جمادى الآخرة","رجب","شعبان","رمضان","شوال","ذو القعدة","ذو الحجة"} local hmonths_inv = {["محرم"] = 1, ["صفر"]=2, ["ربيع الأول"]=3, ["ربيع الآخر"]=4, ["جمادى الأولى"]=5, ["جمادى الآخرة"]=6, ["رجب"]=7, ["شعبان"]=8, ["رمضان"]=9, ["شوال"]=10, ["ذو القعدة"]=11, ["ذو الحجة"]=12} for _, item in ipairs(qualifiers.P4241) do local timeQ = item.datavalue and item.datavalue.value and item.datavalue.value.id local hastime = false if timeQ then local timeQt = mw.wikibase.getBestStatements(timeQ, "P361") for _,timeQsnak in pairs(timeQt) do local timeType = timeQsnak.mainsnak and timeQsnak.mainsnak.datavalue and timeQsnak.mainsnak.datavalue.value and timeQsnak.mainsnak.datavalue.value.id if timeType == "Q28892" then local timeLableAr = mw.wikibase.getLabelByLang(timeQ, "ar") if timeLableAr then year = mw.ustring.match(timeLableAr, "^(%d+) *هـ$") end if not year then local timeLableEn = mw.wikibase.getLabelByLang(timeQ, "en") if timeLableEn then year = mw.ustring.match(timeLableAr, "^(%d+) *AH$") end end hastime=true elseif qhmonths[timeType] then month = qhmonths[timeType] if month>0 and month<13 then month = hmonths[month] end local timeLableAr = mw.wikibase.getLabelByLang(timeQ, "ar") if timeLableAr then day = mw.ustring.match(timeLableAr, "^(%d+) *%a+$") end if not day then local timeLableEn = mw.wikibase.getLabelByLang(timeQ, "en") if timeLableEn then day = mw.ustring.match(timeLableAr, "^(%d+) *%a+$") end end hastime=true end end if not hastime then timeQt = mw.wikibase.getBestStatements(timeQ, "P31") if "Q125390868" == (timeQt[1].mainsnak and timeQt[1].mainsnak.datavalue and timeQt[1].mainsnak.datavalue.value and timeQt[1].mainsnak.datavalue.value.id ) then val = mw.wikibase.getLabelByLang(timeQ, "ar") month, year = mw.ustring.match(val, "^(%a[%a ]+%a) *(%d+) *هـ?$") end end end end if year then if dateformat == "y" then return year; elseif day and month then return day .. ' ' .. month .. ' ' .. year; elseif month then return month .. ' ' .. year; end end return nil; end local function sourced(claim) if claim.references then for kr, vr in pairs(claim.references) do local ref = mw.wikibase.renderSnaks(vr.snaks) if not ref:find("Wiki") then return true end end end end local function linkedItem(id, args) local lprefix = (args.linkprefix or ""):gsub('"', '') local lpostfix = (args.lpostfix or ""):gsub('"', '') local prefix = (args.prefix or ""):gsub('"', '') local postfix = (args.postfix or ""):gsub('"', '') local dtxt = args.dtxt local lang = args.lang or "ar" local uselbl = parseParam( args.uselbl, true) local disp local sitelink = mw.wikibase.getSitelink(id) local label, islabel if dtxt then label, islabel = dtxt, true else label, islabel = labelOrId(id, args.lang) end if sitelink then if not uselbl then local pos = sitelink:find(":") or 0 local slink = sitelink if pos > 0 then local pfx = sitelink:sub(1,pos-1) if mw.site.namespaces[pfx] then slink = sitelink:sub(pos+1) end end slink = slink:gsub("%s%(.+%)$", ""):gsub(",.+$", "") if label:find("^%u") then label = slink:gsub("^(%l)", string.upper) else label = slink:gsub("^(%u)", string.lower) end end disp = "[[" .. lprefix .. sitelink .. lpostfix .. "|" .. prefix .. label .. postfix .. "]]" elseif islabel then disp = prefix .. label .. postfix else disp = prefix .. label .. postfix .. i18n.missinginfocat end return disp end local function rendersnak(propval, args, linked, lpre, lpost, pre, post, uabbr, filter) lpre = lpre or "" lpost = lpost or "" pre = pre or "" post = post or "" args.lang = args.lang or findLang().code local snak = propval.mainsnak or propval local dtype = snak.datatype local dv = snak.datavalue dv = dv and dv.value local val, mlt local namedas; namedas = propval.qualifiers and propval.qualifiers.P1932 and propval.qualifiers.P1932[1].datavalue and propval.qualifiers.P1932[1].datavalue.value or nil args.dtxt = namedas if propval.rank and not args.reqranks[propval.rank:sub(1, 1)] then return nil elseif snak.snaktype == "somevalue" then val = namedas or i18n["Unknown"] elseif snak.snaktype == "novalue" then -- return nothing elseif dtype == "wikibase-item" then local qnumber = dv.id if linked then val = linkedItem(qnumber, args) else if namedas then val = pre .. namedas .. post else local label, islabel = labelOrId(qnumber, args.lang) val = pre .. label .. post end end elseif dtype == "time" then if args.hijri then val = hijriFormat(propval.qualifiers, args.df, args.lang) else val = dateFormat(dv.time, dv.precision, args.df, args.bc, args.pd, propval.qualifiers, args.lang, "", dv.calendarmodel) end elseif dtype == "commonsMedia" or dtype == "external-id" or dtype == "string" or dtype == "url" then if (lpre == "" or lpre == ":") and lpost == "" then val = pre .. dv .. post elseif dtype == "external-id" then val = "[" .. lpre .. dv .. lpost .. " " .. pre .. dv .. post .. "]" else val = "[[" .. lpre .. dv .. lpost .. "|" .. pre .. dv .. post .. "]]" end elseif dtype == "quantity" then local amount = tonumber(dv.amount) or i18n["NaN"] local unit = "" local unitqid = string.match(dv.unit, "(Q%d+)") if filter and unitqid ~= filter then return nil end if unitqid then local uname = mw.wikibase.getLabelByLang(unitqid, args.lang) or "" if uname ~= "" then unit = " " .. uname end end val = tostring(amount) .. unit elseif dtype == "globe-coordinate" then local lat, long, prec = dv.latitude, dv.longitude, dv.precision local show = (args.show or ""):lower() if show == "lat" then val = decimalPrecision(lat, prec) elseif show == "lon" then val = decimalPrecision(long, prec) elseif show == "longlat" then val = decimalPrecision(long, prec) .. ", " .. decimalPrecision(lat, prec) else local ns = lat < 0 and "S" or "N" local ew = long < 0 and "W" or "E" if lat < 0 then lat = -lat end if long < 0 then long = -long end val = decimalPrecision(lat, prec) .. "°" .. ns .. " " .. decimalPrecision(long, prec) .. "°" .. ew end elseif dtype == "monolingualtext" then val = pre .. dv.text .. post mlt = dv.language else val = "unknown data type: " .. dtype end return val, mlt end local function assembleoutput(out, args, entityID, propertyID) local sorted = parseParam(args.sorted, false) local noic = parseParam(args.noicon, false) local list = args.list or "" local separator = args.sep or "" separator = string.gsub(separator, '"', '') if separator == "" then local rtl_lang = {ar = true, fa = true, ur = true, ku = true, he = true} separator = rtl_lang[args.lang] and i18n["list separator-ar"] or i18n["list separator"] end local strout if #out > 0 then if sorted then table.sort(out) end if list == "" then strout = table.concat(out, separator) elseif list:lower() == "prose" then strout = mw.text.listToText(out) else strout = mw.getCurrentFrame():expandTemplate{title = list, args = out} end else strout = nil end return strout end local function propertyvalueandquals(objproperty, args, qualID) -- needs this style of declaration because it's re-entrant -- onlysourced is a boolean passed to return only values sourced to other than Wikipedia -- if nothing or an empty string is passed set it true local onlysrc = parseParam(args.onlysourced, false) -- linked is a a boolean that enables the link to a local page via sitelink -- if nothing or an empty string is passed set it true local linked = parseParam(args.linked, true) -- prefix is a string that may be nil, empty (""), or a string of characters -- this is prefixed to each value -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local prefix = (args.prefix or ""):gsub('"', '') -- postfix is a string that may be nil, empty (""), or a string of characters -- this is postfixed to each value -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local postfix = (args.postfix or ""):gsub('"', '') -- linkprefix is a string that may be nil, empty (""), or a string of characters -- this creates a link and is then prefixed to each value -- useful when when multiple values are returned and indirect links are needed -- any double-quotes " are stripped out, so that spaces may be passed local lprefix = (args.linkprefix or ""):gsub('"', '') -- linkpostfix is a string that may be nil, empty (""), or a string of characters -- this is postfixed to each value when linking is enabled with lprefix -- useful when when multiple values are returned -- any double-quotes " are stripped out, so that spaces may be passed local lpostfix = (args.linkpostfix or ""):gsub('"', '') -- wdlinks is a boolean passed to enable links to Wikidata when no article exists -- if nothing or an empty string is passed set it false local wdl = parseParam(args.wdl, false) -- unitabbr is a boolean passed to enable unit abbreviations for common units -- if nothing or an empty string is passed set it false local uabbr = parseParam(args.unitabbr, false) -- qualsonly is a boolean passed to return just the qualifiers -- if nothing or an empty string is passed set it false local qualsonly = parseParam(args.qualsonly, false) -- maxvals is a string that may be nil, empty (""), or a number -- this determines how many items may be returned when multiple values are available -- setting it = 1 is useful where the returned string is used within another call, e.g. image local maxvals = tonumber(args.maxvals) or 0 -- pd (plain date) is a string: yes/true/1 | no/false/0 | adj -- to disable/enable "sourcing cirumstances" or use adjectival form for the plain date local pd = args.pd or "no" args.pd = pd -- allow qualifiers to have a different date format; default to year unless qualsonly is set args.qdf = args.qdf or (not qualsonly and "y") local lang = args.lang or (args.langs and args.langs[1]) or findLang().code -- qualID is a string list of wanted qualifiers or "ALL" qualID = qualID or "" -- capitalise list of wanted qualifiers and substitute "DATES" qualID = qualID:upper():gsub("DATES", "P580, P582") local allflag = (qualID == "ALL") -- create table of wanted qualifiers as key local qwanted = {} -- create sequence of wanted qualifiers local qorder = {} for q in mw.text.gsplit(qualID, "%p") do -- split at punctuation and iterate local qtrim = mw.text.trim(q) if qtrim ~= "" then qwanted[mw.text.trim(q)] = true qorder[#qorder+1] = qtrim end end -- qsep is the output separator for rendering qualifier list local qsep = (args.qsep or ""):gsub('"', '') -- qargs are the arguments to supply to assembleoutput() local qargs = { ["osd"] = "false", ["linked"] = tostring(linked), ["prefix"] = args.qprefix, ["postfix"] = args.qpostfix, ["linkprefix"] = args.qlinkprefix, ["linkpostfix"] = args.qlinkpostfix, ["wdl"] = "false", ["unitabbr"] = tostring(uabbr), ["maxvals"] = 0, ["sorted"] = tostring(args.qsorted), ["noicon"] = "true", ["list"] = args.qlist, ["sep"] = qsep, -- ["langobj"] = args.langobj, ["lang"] = args.lang or (args.langs and args.lang[1]), ["df"] = args.qdf, ["sn"] = parseParam(args.qsn, false), } -- all proper values of a Wikidata property will be the same type as the first -- qualifiers don't have a mainsnak, properties do --#Modified line local datatype = objproperty[1].datatype or (objproperty[1].mainsnak and objproperty[1].mainsnak.datatype) -- out[] holds the a list of returned values for this property -- mlt[] holds the language code if the datatype is monolingual text local out = {} local mlt = {} for k, v in ipairs(objproperty) do local hasvalue = true if (onlysrc and not sourced(v)) then -- no value: it isn't sourced when onlysourced=true hasvalue = false else local val, lcode = rendersnak(v, args, linked, lprefix, lpostfix, prefix, postfix, uabbr) if not val then hasvalue = false -- rank doesn't match elseif qualsonly and qualID then -- suppress value returned: only qualifiers are requested else out[#out+1], mlt[#out+1] = val, lcode end end -- See if qualifiers are to be returned: local snak = v.mainsnak or v if hasvalue and v.qualifiers and qualID ~= "" and snak.snaktype~="novalue" then -- collect all wanted qualifier values returned in qlist, indexed by propertyID local qlist = {} local timestart, timeend = "", "" -- loop through qualifiers for k1, v1 in pairs(v.qualifiers) do if allflag or qwanted[k1] then if k1 == "P1326" then local ts = v1[1].datavalue.value.time local dp = v1[1].datavalue.value.precision qlist[k1] = dateFormat(ts, dp, args.qdf, args.bc, pd, "", lang, "before") elseif k1 == "P1319" then local ts = v1[1].datavalue.value.time local dp = v1[1].datavalue.value.precision qlist[k1] = dateFormat(ts, dp, args.qdf, args.bc, pd, "", lang, "after") elseif k1 == "P580" then timestart = propertyvalueandquals(v1, qargs)[1] or "" -- treat only one start time as valid elseif k1 == "P582" then timeend = propertyvalueandquals(v1, qargs)[1] or "" -- treat only one end time as valid else local q = assembleoutput(propertyvalueandquals(v1, qargs), qargs) -- we already deal with circa via 'sourcing circumstances' if the datatype was time -- circa may be either linked or unlinked *** internationalise later *** if datatype ~= "time" or q ~= "circa" and not (type(q) == "string" and q:find("circa]]")) then qlist[k1] = q end end end -- of test for wanted end -- of loop through qualifiers -- set date separator local t = timestart .. timeend -- *** internationalise date separators later *** local dsep = "&ndash;" if t:find("%s") or t:find("&nbsp;") then dsep = " &ndash; " end -- set the order for the list of qualifiers returned; start time and end time go last if next(qlist) then local qlistout = {} if allflag then for k2, v2 in pairs(qlist) do qlistout[#qlistout+1] = v2 end else for i2, v2 in ipairs(qorder) do qlistout[#qlistout+1] = qlist[v2] end end if t ~= "" then qlistout[#qlistout+1] = timestart .. dsep .. timeend end local qstr = assembleoutput(qlistout, qargs) if qualsonly then out[#out+1] = qstr else out[#out] = out[#out] .. " (" .. qstr .. ")" end elseif t ~= "" then if qualsonly then if timestart == "" then out[#out+1] = timeend elseif timeend == "" then out[#out+1] = timestart else out[#out+1] = timestart .. dsep .. timeend end else out[#out] = out[#out] .. " (" .. timestart .. dsep .. timeend .. ")" end end end -- of test for qualifiers wanted if maxvals > 0 and #out >= maxvals then break end end -- of for each value loop -- we need to pick one value to return if the datatype was "monolingualtext" -- if there's only one value, use that -- otherwise look through the fallback languages for a match if datatype == "monolingualtext" and #out >1 then lang = mw.text.split( lang, '-', true )[1] local fbtbl = mw.language.getFallbacksFor( lang ) table.insert( fbtbl, 1, lang ) local bestval = "" local found = false for idx1, lang1 in ipairs(fbtbl) do for idx2, lang2 in ipairs(mlt) do if (lang1 == lang2) and not found then bestval = out[idx2] found = true break end end -- loop through values of property end -- loop through fallback languages if found then -- replace output table with a table containing the best value out = { bestval } else -- more than one value and none of them on the list of fallback languages -- sod it, just give them the first one out = { out[1] } end end return out end local function mergeOptions(defaults, overrides) overrides = overrides or {} defaults = defaults or {} local result = {} for k, v in pairs(defaults) do result[k] = v end for k, v in pairs(overrides) do result[k] = v end return result end ------------------------------------------------------------------------------- -- WdItem Class Definition ------------------------------------------------------------------------------- local WdItem = {} WdItem.__index = WdItem function WdItem:__tostring() return "WdItem: " .. (self.qid or "no QID") end function WdItem:UpdateOptions(newOpts) for k, v in pairs(newOpts or {}) do local key = options_aliases[k] self.options[key] = v -- Set default options if key == 'langs' and #v > 0 then self.options.langobj = findLang(self.options.langs[1]) self.options.lang = self.options.langobj.code if not self.options.langobj then self.options.langobj = findLang(self.options.lang) self.options.lang = self.options.langobj.code end end if key == 'rank' then self.options.reqranks = setRanks(self.options.rank) end end if not self.options.reqranks then self.options.reqranks = setRanks('best') end end function WdItem.new(qid, options) local self = setmetatable({}, WdItem) if qid == "" then qid = nil end if (not qid) and mw.wikibase then qid = mw.wikibase.getEntityIdForCurrentPage() end self.qid = qid self.snak = nil self.options = options or {} self:UpdateOptions(options) return self end function WdItem.newFromSnaks(snakTable, options) local self = setmetatable({}, WdItem) self.qid = nil self.snak = snakTable or {} self.options = options or {} self:UpdateOptions(options) return self end function WdItem:setOptions(newOpts) self:UpdateOptions(newOpts) end function WdItem:getStatements(pid, opts) opts = opts or {} local vol = opts.vol local chapter = opts.chapter if self.snak and self.snak[pid] then return self.snak[pid] end if not self.qid or not mw.wikibase then return {} end if vol or chapter then return p.getStatementsByVol(self.qid, pid, vol, chapter) or {} end if self.options.reqranks and self.options.reqranks.b then return mw.wikibase.getBestStatements(self.qid, pid) or {} else return mw.wikibase.getAllStatements(self.qid, pid) or {} end end function WdItem:getValue(pid, opts) local mergedOpts = mergeOptions(self.options, opts) -- Handle local value override if mergedOpts[2] and mergedOpts[2] ~= "" then return mergedOpts[2] end local statements if mergedOpts.no_vol_qual then statements = mw.wikibase.getBestStatements(self.qid, pid) else statements = self:getStatements(pid, {vol = mergedOpts.vol, chapter = mergedOpts.chapter}) end if not statements or #statements == 0 then return nil end local qualID = mw.text.trim(mergedOpts.qual or ""):upper() if qualID == "" then qualID = nil end local out = propertyvalueandquals(statements, mergedOpts, qualID) return assembleoutput(out, mergedOpts, self.qid, pid) end function WdItem:getValueFromSnaks(pid, opts) if not self.snak or not self.snak[pid] then return nil end local mergedOpts = mergeOptions(self.options, opts) local props = self.snak[pid] local out = propertyvalueandquals(props, mergedOpts) return assembleoutput(out, mergedOpts, nil, pid) end function WdItem:getPropertyIDsTable(pid, opts) local mergedOpts = mergeOptions(self.options, opts) mergedOpts.noicon = tostring(parseParam(mergedOpts.noicon or "", true)) local statements = self:getStatements(pid, opts) if not statements or #statements == 0 then return {} end local onlysrc = parseParam(mergedOpts.onlysourced or mergedOpts.osd, true) local maxvals = tonumber(mergedOpts.maxvals) or 0 local out = {} for i, v in ipairs(statements) do local snak = v.mainsnak if (snak.datatype == "wikibase-item") and (v.rank and mergedOpts.reqranks[v.rank:sub(1, 1)]) and (snak.snaktype == "value") and (sourced(v) or not onlysrc) then out[#out+1] = snak.datavalue.value.id end if maxvals > 0 and #out >= maxvals then break end end return out end function WdItem:getPropertyIDs(pid, opts) local out = WdItem:getPropertyIDsTable(pid, opts) if #out == 0 then return nil end return assembleoutput(out, mergeOptions(self.options, opts), self.qid, pid) end function WdItem:getPropOfProp(prop1, prop2, opts) local mergedOpts = mergeOptions(self.options, opts) if not self.qid then return nil end local statements1 = self:getStatements(prop1, opts) if not statements1 or #statements1 == 0 then return nil end local onlysrc = parseParam(mergedOpts.onlysourced or mergedOpts.osd, true) local maxvals = tonumber(mergedOpts.maxvals) or 0 local qualID = mw.text.trim(mergedOpts.qual or ""):upper() if qualID == "" then qualID = nil end local out = {} for k, v in ipairs(statements1) do if not onlysrc or sourced(v) then local snak = v.mainsnak if snak.datatype == "wikibase-item" and snak.snaktype == "value" then local qid2 = snak.datavalue.value.id local item2 = WdItem.new(qid2, mergedOpts) local statements2 = item2:getStatements(prop2, opts) if statements2 and statements2[1] then local out2 = propertyvalueandquals(statements2, mergedOpts, qualID) out[#out+1] = assembleoutput(out2, mergedOpts, qid2, prop2) end end end if maxvals > 0 and #out >= maxvals then break end end return assembleoutput(out, mergedOpts, self.qid, prop1) end function WdItem:getLangOfProp(pid) if not pid or not self.qid then return {} end local out = {} local props = mw.wikibase.getAllStatements(self.qid, pid) for _, v in ipairs(props) do if v.mainsnak.datatype == "monolingualtext" and v.mainsnak.datavalue then out[#out + 1] = v.mainsnak.datavalue.value.language end end return out end function WdItem:followQid(props, all) all = parseParam(all, false) props = (props or ""):upper() if not self.qid then return nil end if props == "" then return self.qid end local out = {} for p in mw.text.gsplit(props, "%p") do p = mw.text.trim(p) for i, v in ipairs(mw.wikibase.getBestStatements(self.qid, p)) do local linkedid = v.mainsnak.datavalue and v.mainsnak.datavalue.value.id if linkedid then if all then out[#out+1] = linkedid else return linkedid end end end end if #out > 0 then return table.concat(out, " ") else return self.qid end end ------------------------------------------------------------------------------- -- Public API - Utility Functions ------------------------------------------------------------------------------- p.getStatementsByVol = function(qid, pid, vol, chapter) local statements = mw.wikibase.getBestStatements(qid, pid) if not statements then return nil end local filtered_statements = {} if chapter then for _, statement in ipairs(statements) do if statement.qualifiers and statement.qualifiers["P792"] then for _, qual in ipairs(statement.qualifiers["P792"]) do if qual.datavalue and tostring(qual.datavalue.value) == tostring(chapter) then table.insert(filtered_statements, statement) break end end end end end if #filtered_statements == 0 and vol then for _, statement in ipairs(statements) do local vol_match = true if vol and statement.qualifiers and statement.qualifiers["P478"] then vol_match = false for _, qual in ipairs(statement.qualifiers["P478"]) do if qual.datavalue and tostring(qual.datavalue.value) == tostring(vol) then vol_match = true break end end end if vol_match then table.insert(filtered_statements, statement) end end else filtered_statements = statements end return filtered_statements end ------------------------------------------------------------------------------- -- Public API - WdItem Constructors ------------------------------------------------------------------------------- p.WdItem = WdItem function p.newItem(qid, opts) return WdItem.new(qid, opts) end function p.currentItem(opts) return WdItem.new(nil, opts) end function p.newSnakItem(snakTable, opts) return WdItem.newFromSnaks(snakTable, opts) end return p 72gn55z5wsx0j82t0x5c30efq3u7xyn وحدة:Cite Q/config 828 235800 1096567 1070061 2026-07-18T07:03:26Z حبيشان 31560 1096567 Scribunto text/plain local aliases_t = { ['accessdate'] = {'تاريخ-الوصول','تاريخ الوصول', 'تاريخ وصول', 'access-date', 'accessdate'}, ['agency'] = {'وكالة', 'agency'}, ['archivedate'] = {'تاريخ-الأرشيف', 'تاريخ أرشيف', 'تاريخ الأرشيف', 'archive-date', 'archivedate'}, ['archive-format'] = {'صيغة-الأرشيف', 'صيغة الأرشيف', 'archive-format'}, ['archive-url'] = {'مسار-الأرشيف', 'مسار أرشيف', 'مسار الأرشيف', 'archive-url', 'archiveurl'}, ['article-number'] = {'رقم-المقالة', 'article-number'}, ['asin-tld'] = 'asin-tld', ['at'] = {'في', 'at'}, --##TOREVISE ['authors'] = {'المؤلفون', 'المؤلفين', 'authors', 'people', 'host', 'credits', 'أشخاص'}, ['book-title'] = {'عنوان الكتاب', 'book-title', 'booktitle', 'عنوان المؤتمر'}, ['cartography'] = 'cartography', ['chapter'] = {'الفصل', 'chapter', 'contribution', 'entry', 'article', 'section'}, ['chapter-format'] = {'صيغة-الفصل', 'صيغة الفصل', 'تنسيق الفصل', 'chapter-format', 'contribution-format', 'entry-format', 'article-format', 'section-format'}, ['chapter-url'] = {'مسار-الفصل', 'مسار الفصل', 'chapter-url', 'contribution-url', 'entry-url', 'article-url', 'section-url'}, -- Used by InternetArchiveBot ['chapter-url-access'] = {'chapter-url-access', 'contribution-url-access', 'entry-url-access', 'article-url-access', 'section-url-access'}, -- Used by InternetArchiveBot ['class'] = {'صنف', 'class'}, -- cite arxiv and arxiv identifier ['collaboration'] = 'collaboration', ['conference'] = {'اسم-المؤتمر', 'اسم المؤتمر', 'conference'}, ['conference-format'] = 'conference-format', ['conference-url'] = {'مسار-المؤتمر', 'مسار المؤتمر', 'conference-url'}, -- Used by InternetArchiveBot ['date'] = {'تاريخ', 'التاريخ', 'date', 'air-date', 'airdate'}, ['degree'] = {'الدرجة', 'degree'}, ['df'] = 'df', ['display-authors'] = {'إظهار-المؤلفين', 'إظهار المؤلفين', 'display-authors', 'display-subjects'}, ['display-contributors'] = 'display-contributors', ['display-editors'] = {'إظهار-المحررين', 'إظهار المحررين', 'display-editors'}, ['display-interviewers'] = 'display-interviewers', ['display-translators'] = 'display-translators', ['docket'] = 'docket', ['doi-broken-date'] = 'doi-broken-date', ['edition'] = {'طبعة', 'الإصدار', 'الاصدار', 'إصدار', 'اصدار', 'الطبعة', 'رقم الطبعة', 'edition'}, ['pmc-embargo-date'] = 'pmc-embargo-date', ['encyclopedia'] = {'موسوعة', 'encyclopedia', 'encyclopaedia', 'اسم المعجم', 'dictionary', 'اسم الموسوعة'}, -- cite encyclopedia only ['episode'] = {'الحلقة', 'episode'}, -- cite serial only TODO: make available to cite episode? ['format'] = {'صيغة', 'التنسيق', 'format', 'تنسيق', 'الصيغة'}, ['id'] = {'id', 'ID', 'المعرف'}, ['inset'] = {'inset', 'مجموعة'}, ['issue'] = {'العدد', 'issue', 'number'}, ['language'] = {'لغة', 'اللغة', 'language', 'lang'}, ['mailing-list'] = {'القائمة البريدية', 'mailing-list'}, -- cite mailing list only ['map'] = {'الخريطة', 'map'}, -- cite map only ['map-format'] = {'صيغة الخريطة', 'map-format'}, -- cite map only ['map-url'] = {'مسار الخريطة', 'map-url'}, -- cite map only -- Used by InternetArchiveBot ['map-url-access'] = 'map-url-access', -- cite map only -- Used by InternetArchiveBot ['minutes'] = {'دقيقة', 'minutes'}, ['mode'] = 'mode', ['name-list-style'] = 'name-list-style', ['network'] = {'الشبكة', 'network'}, ['newsgroup'] = {'اسم المجموعة', 'newsgroup'}, -- cite newsgroup only ['nopp'] = {'no-pp', 'nopp'}, ['no-tracking'] = {'no-tracking', 'template-doc-demo'}, ['number'] = 'number', -- this case only for cite techreport ['orig-date'] = {'orig-date', 'orig-year', 'origyear', 'سنة النشر الأصلية'}, ['others'] = {'آخرون','others', 'المحاور', 'المحاورون', 'المحقق'}, ['page'] = {'صفحة', 'p', 'الصفحة', 'page', 'الصفحة', 'رقم الصفحة', 'رقم صفحة','ص'}, -- Used by InternetArchiveBot ['pages'] = {'صفحات', 'الصفحات', 'pp', 'أرقام الصفحات', 'أرقم صفحات', 'pages'}, -- Used by InternetArchiveBot ['journal'] = { 'صحيفة', 'journal', 'دورية محكمة', 'مجلة', 'magazine', 'اسم المجلة', 'newspaper', 'جريدة', 'اسم الصحيفة', 'دورية', 'periodical', 'موقع', 'website', 'الموقع', 'عمل', 'work', 'العمل', 'من عمل', }, ['place'] = { 'مكان', 'place', 'المكان', 'مقر', 'المقر', 'location'}, ['postscript'] = 'postscript', ['publication-date'] = {'تاريخ-النشر', 'تاريخ النشر', 'publication-date'}, ['publication-place'] = {'مكان-النشر', 'مكان النشر', 'publication-place'}, ['publisher'] = {'ناشر', 'publisher', 'الناشر', 'institution', 'مصدر', 'الموزع', 'المصدر', 'المؤسسة'}, ['quote'] = {'اقتباس', 'quote', 'quotation'}, ['quote-page'] = 'quote-page', ['quote-pages'] = 'quote-pages', ['ref'] = {'مرجع', 'ref'}, ['scale'] = {'المقياس', 'scale'}, ['script-chapter'] = {'script-chapter', 'script-contribution', 'script-entry', 'script-article', 'script-section'}, ['script-encyclopedia'] = {'script-encyclopedia', 'script-encyclopaedia'}, -- cite encyclopedia only ['script-map'] = 'script-map', ['script-journal'] = {'script-journal', 'script-magazine', 'script-newspaper', 'script-periodical', 'script-website', 'script-work'}, ['script-quote'] = 'script-quote', ['script-title'] = 'script-title', -- Used by InternetArchiveBot ['season'] = {'الموسم', 'season'}, ['sections'] = {'الأقسام', 'sections'}, -- cite map only ['series'] = {'سلسلة', 'series', 'version'}, ['series-link'] = {'وصلة-سلسلة', 'وصلة سلسلة', 'series-link', 'مسار المسلسل'}, ['series-number'] = {'رقم-سلسلة', 'رقم سلسلة', 'series-number', 'series-no'}, ['sheet'] = {'ورقة', 'sheet'}, -- cite map only ['sheets'] = {'أوراق', 'sheets'}, -- cite map only ['station'] = {'محطة', 'station'}, ['time'] = {'الوقت', 'time'}, ['time-caption'] = 'time-caption', ['title'] = {'عنوان', 'title', 'العنوان'}, ['title-link'] = {'وصلة-العنوان', 'وصلة العنوان', 'title-link', 'episode-link', 'وصلة الحلقة'}, ['title-note'] = {'title-note', 'department'}, ['type'] = {'النوع', 'type', 'medium'}, ['trans-chapter'] = {'trans-article', 'trans-chapter', 'trans-contribution', 'trans-entry', 'trans-section'}, ['transcript'] = 'transcript', ['transcript-format'] = 'transcript-format', ['transcript-url'] = 'transcript-url', -- Used by InternetArchiveBot ['trans-encyclopedia'] = {'trans-encyclopedia', 'trans-encyclopaedia'}, -- cite encyclopedia only ['trans-map'] = 'trans-map', -- cite map only ['trans-journal'] = {'trans-journal', 'trans-magazine', 'trans-newspaper', 'trans-periodical', 'trans-website', 'trans-work'}, ['trans-quote'] = 'trans-quote', ['trans-title'] = {'عنوان مترجم', 'العنوان بالعربي', 'العنوان الأجنبي', 'عنوان أجنبي', 'trans-title', 'العنوان المترجم'}, -- Used by InternetArchiveBot ['url'] = {'مسار', 'المسار','وصلة', 'url', 'URL'}, -- Used by InternetArchiveBot ['url-access'] = {'url-access', 'التسجيل'}, -- Used by InternetArchiveBot ['url-status'] = {'url-status','حالة المسار'}, -- Used by InternetArchiveBot ['vauthors'] = {'vauthors', 'عدة مؤلفين'}, ['veditors'] = {'veditors', 'عدة محررين' }, ['via'] = {'عبر', 'via'}, ['volume'] = {'المجلد', 'volume', 'الجزء', 'ج'}, ['wikidatacite'] = 'wikidatacite', ['year'] = {'سنة', 'year', 'السنة'}, } local i18n_t = { ["ar"] = { illustrator = "رسم", composer = "تلحين", animator = "رسم الرسوم المتحركة", director = "إخراج", screenwriter = "سيناريو", signatory = "توقيع", presenter = "تقديم", performer = "أداء", annotator = "تحقيق", reviewer = "مراجعة", unknown = "مجهول", supervisor = "إشراف", ["unknown-publication-date"] = '<abbr class="abbr" title="دون تاريخ">د.ت.</abbr>', ["unknown-publisher"] = '<abbr class="abbr" title="دون ناشر">د.ن.</abbr>', wikidata = "ويكي بيانات" }, ["cite_q"] = "{{استشهاد بويكي بيانات|", ["erratum"] = "(erratum)", ["unknown-author"] = { ar = "غير معروف", en = "Anonymous", fr = "Aanonyme", de = "Anonymus", es = "Anónimo" }, ["wdq"] = "[[ويكي بيانات|QID]]", -- go through "WDQ (identifier)" redirect to reduce clutter in "What links here" and improve reverse lookup. Keep in sync with {{QID}}. ["wikisource"] = "arwikisource", ["errors"] = { ["local-article-not-found"] = "المقال المحلي غير موجود.", ["no-label-or-title"] = "لا عنون أو تسمية: ", }, -- Next Line Edited ["unknown-author-trackingcat"] = "", -- [[تصنيف:Cite Q - author unknown]] ["months"] = { "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December" }, ["ordinal"] = { [1] = "st", [2] = "nd", [3] = "rd", ["default"] = "th" }, ["trackingcats"] = { ["erratum"] = "[[تصنيف:استشهاد بويكي بيانات:الاستشهاد يعمل مع خطأ]]", ["missing-wikidata"] = "[[تصنيف:مقالات مع بيانات ويكي بيانات نقاصة]]", -- TODO: point to a {{cite q}}-specific category; this one is specific to Module:WikidataIB ['no-label-or-title'] = '[[تصنيف:استشهاد بويكي بيانات:يفتقر إلى عنوان أو تسمية]]', ["retracted"] = "[[تصنيف:الاستشهاد بويكي بيانات: الاستشهاد بعمل مسحوب]]<!-- retracted -->", ["replaced"] = "[[تصنيف:الاستشهاد بويكي بيانات: الاستشهاد بعمل مستبدل]]<!-- replaced -->", ["unknown-author"] = "", -- [[Category:Cite Q - author unknown]] removed as misplaced; someone is welcome to restore it if it is placed outside of the template parameter value ["unknown-template"] = "[[تصنيف:الاستشهاد بويكي بيانات:قالب مجهول]]", }, } local rejected_t = { sources = { Q465 = true, Q15241312 = true, Q52 = true }, properties = { "P1800", "P1566", "P21"}, instances = { Q5 = true, -- Human is not a direct reference Q184188 = true, Q1250464 = true, -- inatance of refference DBs Q8513 = true, Q17152639 = true, Q7094076 = true, Q5535082 = true, Q856638= true, Q1982918 = true, Q36524 = true, Q36218176 = true, Q526334 = true, Q5227411 = true } } -- Table of simple properties that can be fetched in roughly the same way: -- id = PXXX -- maxvals = maximum number of multiple values (0 for all) -- linked = "no" suppresses linking -- populate_from_journal = true/false determines whether to look in a journal where the source is published -- rank = "best", "preferred", normal, etc. determines how Wikidata ranks are treated -- others = true - the value for the property goes to "others" section local simple_properties_t = { -- Next Line Edited publisher = {id = "P123", maxvals = 3}, oclc = {id = "P243", maxvals = 1}, ['publication-place'] = {id = "P291", maxvals = 0, linked = false}, -- publication place (don't put into |place=; is treated specially in {{citation}} if both are given) doi = {id = "P356", maxvals = 1}, -- take care of |doi-broken-date= (WD "reason for deprecation"/"stated as") and |doi-access= (WD "access status")? issue = {id = "P433", maxvals = 0, populate_from_journal = true}, -- distinguish from |number= ("P1545"?) if both are given (still blocked by {{citation}}, but will be supported in the future) pmid = {id = "P698", maxvals = 1}, -- gbooks = {id = "P675", maxvals = 1}, -- to be added to {{citation}} -- ia = {id = "P724", maxvals = 1}, -- to be added to {{citation}} arxiv = {id = "P818", maxvals = 1}, bibcode = {id = "P819", maxvals = 1}, -- take care of |bibcode-access=? jstor = {id = "P888", maxvals = 1}, -- take care of |jstor-access=? mr = {id = "P889", maxvals = 1}, rfc = {id = "P892", maxvals = 1}, zbl = {id = "P894", maxvals = 1}, ssrn = {id = "P893", maxvals = 1}, place = {id = "P1071", maxvals = 0, linked = false}, -- written-at place -- ['total-pages'] = {id = "P1104", maxvals = 0, linked = 'no'}, -- to be added to {{citation}} / COinS &rft.tpages= -- coden = {id = "P1159", maxvals = 1}, -- to be added to {{citation}} / COinS &rft.coden= s2cid = {id = "P8299", maxvals = 1}, -- take care of |s2cid-access=? pmc = {id = "P932", maxvals = 1}, -- take care of |pmc-embargo-date= (WD "reason for deprecation")? lccn = {id = "P1144", maxvals = 1}, hdl = {id = "P1184", maxvals = 1}, -- take care of |hdl-access=? ismn = {id = "P1208", maxvals = 1}, journal = {id = "P1433", maxvals = 1}, citeseerx = {id = "P3784", maxvals = 1}, osti = {id = "P3894", maxvals = 1}, -- take care of |osti-access=? biorxiv = {id = "P3951", maxvals = 1}, asin = {id = "P5749", maxvals = 1}, -- What about |asin-tld=? (WD examples resolve to .com at present, but may change) -- ['catalog-number'] = {id = "P528", maxvals = 0}, -- to be added to {{citation}} / COinS &rft.artnum= isbn = {id = "P212", maxvals = 1, populate_from_journal = true}, -- ISBN 13 issn = {id = "P236", maxvals = 1, populate_from_journal = true}, -- distinguish from |eissn= for electronic issues? -- jfm = {id = "P?", maxvals = 1}, -- Jahrbuch über die Fortschritte der Mathematik (not Zbl) -- sbn = {id = "P?", maxvals = 1}, -- Standard Book Number (predecessor of ISBN, not ICCU) -- message-id = {id = "P?", maxvals = 1}, -- Usenet message ID chapter = {id = "P792", maxvals = 1, no_vol_qual=true}, ['publication-date'] = {id = "P577", maxvals = 1, populate_from_journal = true}, -- publication date (don't use |date=; is treated specially in {{citation}} if both are given.) series = {id = "P179", maxvals = 1, populate_from_journal = true, qual = "P1545"}, version = {id = "P348", maxvals = 0}, edition = {id = "P393", maxvals = 0}, volume = {id = "P478", maxvals = 0, populate_from_journal = true, no_vol_qual=true}, -- part = {id = "P1545"?, maxvals = 0}, -- to be added to {{citation}} / COinS &rft.part= title = {id = "P1476", rank="p n"}, -- url = {id = "P953", maxvals = 1}, -- deal with this along with archive-url pages = {id = "P304", maxvals = 0, populate_from_journal = true, no_vol_qual=true}, at = {id = "P958", maxvals = 0, populate_from_journal = true, no_vol_qual=true}, -- also incorporate lines (P7421) and columns (P3903) into this (cite map also supports |section=) -- sheets = {id = "P7416", maxvals = 0, populate_from_journal = true}, -- interviewer = {id = "P?", maxvals = 0}, -- does **not** go to "others" section! Multiple interviewers should be n-enumerated illustrator = {id = "P110", maxvals = 10, others = true}, -- goes to "others" section -- foreword and afterword, when contributions to another author's work, are contributions so belong in |contribution=; -- the writer's name goes in |contributor=; requires |title= and |author= -- However, this might need to add support for multiple contributors and their roles to {{citation}}, see Help_talk:Citation_Style_1#Others -- foreword = {id = "P2679", maxvals = 10, others = true}, -- goes to "others" section -- afterword = {id = "P2680", maxvals = 10, others = true}, -- goes to "others" section composer = {id = "P86", maxvals = 10, others = true}, -- goes to "others" section animator = {id = "P6942", maxvals = 10, others = true}, -- goes to "others" section director = {id = "P57", maxvals = 10, others = true}, -- goes to "others" section screenwriter = {id = "P58", maxvals = 10, others = true}, -- goes to "others" section signatory = {id = "P1891", maxvals = 10, others = true}, -- goes to "others" section presenter = {id = "P371", maxvals = 10, others = true}, -- goes to "others" section performer = {id = "P175", maxvals = 10, others = true}, -- goes to "others" section -- next 2 lines added for Arabic Wikipedia annotator = {id ="P11105", maxvals = 10, others = true}, -- goes to "others" section reviewer = {id ="P4032", maxvals = 10, others = true}, -- goes to "others" section supervisor = {id ="P7604", maxvals = 3, others = true}, -- goes to "others" section } local used_args_t = {accessdate=true, language=true, mode=true, ol=true, other=true, ['display-authors']=true, ['display-editors']=true, ['archive-url']=true, ['archive-date']=true, url=true, title=true} -- all_used_properties local used_properties_t = { P1071 = {arg= "place", maxvals = 0, linked = false}, -- written-at place P110 = {arg= "illustrator", maxvals = 10, others = true}, -- goes to "others" section P11105 = {arg= "annotator", maxvals = 10, others = true}, -- goes to "others" section P1144 = {arg= "lccn", maxvals = 1}, P1184 = {arg= "hdl", maxvals = 1}, -- take care of |hdl-access=? P1208 = {arg= "ismn", maxvals = 1}, P123 = {arg= "publisher", maxvals = 3}, P1433 = {arg= "journal", maxvals = 1}, P1476 = {arg= "title", rank="p n"}, P1680 = true, P175 = {arg= "performer", maxvals = 10, others = true}, -- goes to "others" section P179 = {arg= "series", maxvals = 1, populate_from_journal = true}, P1891 = {arg= "signatory", maxvals = 10, others = true}, -- goes to "others" section P1932 = true, P2093 = true, -- author string P212 = {arg= "isbn", maxvals = 1, populate_from_journal = true}, -- ISBN 13 P236 = {arg= "issn", maxvals = 1, populate_from_journal = true}, -- distinguish from |eissn= for electronic issues? P243 = {arg= "oclc", maxvals = 1}, P2699 = true, P291 = {arg= "publication-place", maxvals = 0, linked = false}, -- publication place (don't put into |place=; is treated specially in {{citation}} if both are given) P304 = {arg= "pages", maxvals = 0, populate_from_journal = true}, P348 = {arg= "version", maxvals = 0}, P356 = {arg= "doi", maxvals = 1}, -- take care of |doi-broken-date= (WD "reason for deprecation"/"stated as") and |doi-access= (WD "access status")? P371 = {arg= "presenter", maxvals = 10, others = true}, -- goes to "others" section P3784 = {arg= "citeseerx", maxvals = 1}, P3894 = {arg= "osti", maxvals = 1}, -- take care of |osti-access=? P393 = {arg= "edition", maxvals = 0}, P3951 = {arg= "biorxiv", maxvals = 1}, P4032 = {arg= "reviewer", maxvals = 10, others = true}, -- goes to "others" section P407 = true, P433 = {arg= "issue", maxvals = 0, populate_from_journal = true}, -- distinguish from |number= ("P1545"?) if both are given (still blocked by {{citation}}, but will be supported in the future) P478 = {arg= "volume", maxvals = 0, populate_from_journal = true}, P50 = true, -- author P57 = {arg= "director", maxvals = 10, others = true}, -- goes to "others" section P5749 = {arg= "asin", maxvals = 1}, -- What about |asin-tld=? (WD examples resolve to .com at present, but may change) P5769 = true, --editor P577 = {arg= "publication-date", maxvals = 1, populate_from_journal = true}, -- publication date (don't use |date=; is treated specially in {{citation}} if both are given.) P58 = {arg= "screenwriter", maxvals = 10, others = true}, -- goes to "others" section P655 = true, P6942 = {arg= "animator", maxvals = 10, others = true}, -- goes to "others" section P698 = {arg= "pmid", maxvals = 1}, P7604 = {arg ="supervisor", maxvals = 3, others = true}, -- goes to "others" section P792 = {arg= "chapter", maxvals = 1}, P818 = {arg= "arxiv", maxvals = 1}, P819 = {arg= "bibcode", maxvals = 1}, -- take care of |bibcode-access=? P8299 = {arg= "s2cid", maxvals = 1}, -- take care of |s2cid-access=? P856 = true, P86 = {arg= "composer", maxvals = 10, others = true}, -- goes to "others" section P888 = {arg= "jstor", maxvals = 1}, -- take care of |jstor-access=? P889 = {arg= "mr", maxvals = 1}, P892 = {arg= "rfc", maxvals = 1}, P893 = {arg= "ssrn", maxvals = 1}, P894 = {arg= "zbl", maxvals = 1}, P932 = {arg= "pmc", maxvals = 1}, -- take care of |pmc-embargo-date= (WD "reason for deprecation")? P953 = true, P958 = {arg= "at", maxvals = 0, populate_from_journal = true}, -- also incorporate lines (P7421) and columns (P3903) into this (cite map also supports |section=) P98 = true, P854 = true, } return { aliases_t = aliases_t, i18n_t = i18n_t, rejected_t = rejected_t, simple_properties_t = simple_properties_t, used_args_t = used_args_t, used_properties_t = used_properties_t } 68kwq53rjq8krvfbre62ren3oh6oddi نقاش المستخدم:الجوهرة العربية 3 239714 1096551 2026-07-17T15:03:32Z Dr-Taher 12861 نقل Dr-Taher صفحة [[نقاش المستخدم:الجوهرة العربية]] إلى [[نقاش المستخدم:المحفوف]]: نُقِلت الصفحة آليا عند إعادة تسمية المستخدم «[[Special:CentralAuth/الجوهرة العربية|الجوهرة العربية]]» إلى «[[Special:CentralAuth/المحفوف|المحفوف]]». 1096551 wikitext text/x-wiki #تحويل [[نقاش المستخدم:المحفوف]] onwlgfdaetl9lmkudimw0faplzipj76 تَبَدَّأَ 0 239715 1096553 2026-07-17T16:37:21Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096553 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1532854}} === المعاني === '''تَبَدَّأَ''' {{تفعّل}} {{معجمية|L1532854|معاني}} === النطق === * {{أصد-عر|تَبَدَّأَ}} {{-}} === التصريفات === {{تصريف|جذر=بدأ|وزن=تفعّل}} === المراجع === {{مراجع}} s5fxtzrn4bva423qhc09c0r91adgk72 بَدَخَ 0 239716 1096554 2026-07-17T16:39:23Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096554 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1543709}} === المعاني === '''بَدَخَ''' {{فتح}} {{معجمية|L1543709|معاني}} === النطق === * {{أصد-عر|بَدَخَ}} {{-}} === التصريفات === {{تصريف|جذر=بدخ|وزن=فعَل يفعَل}} === المراجع === {{مراجع}} 49uki7nyc76098lgndvicy84946r86z تَبَدَّخَ 0 239717 1096555 2026-07-17T16:40:02Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096555 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1532858}} === المعاني === '''تَبَدَّخَ''' {{تفعّل}} {{معجمية|L1532858|معاني}} === النطق === * {{أصد-عر|تَبَدَّخَ}} {{-}} === التصريفات === {{تصريف|جذر=بدخ|وزن=تفعّل}} === المراجع === {{مراجع}} m29hbnpmrfnsatvhzya1diznxfnomft اِبْتَدَّ 0 239718 1096556 2026-07-17T16:41:35Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096556 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1532860}} === المعاني === '''اِبْتَدَّ''' {{افتعل}} {{معجمية|L1532860|معاني}} === النطق === * {{أصد-عر|اِبْتَدَّ}} {{-}} === التصريفات === {{تصريف|جذر=بدد|وزن=افتعل}} === المراجع === {{مراجع}} 501d5smwph9n1dndhzxblycxg1rj6il تَبَادَّ 0 239719 1096557 2026-07-17T16:43:06Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096557 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1532861}} === المعاني === '''تَبَادَّ''' {{تفاعل}} {{معجمية|L1532861|معاني}} === النطق === * {{أصد-عر|تَبَادَّ}} {{-}} === التصريفات === {{تصريف|جذر=بدد|وزن=تفاعل}} === المراجع === {{مراجع}} s6iqxn9pgsz3bgl3z4ogumxrbov8wtk بَرْهَنَ 0 239720 1096558 2026-07-17T16:44:36Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096558 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1486527}} === المعاني === '''بَرْهَنَ''' {{فعلل}} {{معجمية|L1486527|معاني}} === النطق === * {{أصد-عر|بَرْهَنَ}} {{-}} === التصريفات === {{تصريف|جذر=برهن|وزن=فعلل}} === المراجع === {{مراجع}} h3v3he0u08rgiarud1s2lc21gok9w01 تَنْبَلَ 0 239721 1096564 2026-07-17T22:00:31Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096564 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1480954}} === المعاني === '''تَنْبَلَ''' {{فعلل}} {{معجمية|L1480954|معاني}} === النطق === * {{أصد-عر|تَنْبَلَ}} {{-}} === التصريفات === {{تصريف|جذر=تنبل|وزن=فعلل}} === المراجع === {{مراجع}} 9gdb7f4ym7sb24ewzin7dzt5wmuz6je اِبْتَدَى 0 239722 1096565 2026-07-17T22:02:14Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096565 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1532871}} === المعاني === '''اِبْتَدَى''' {{افتعل}} {{معجمية|L1532871|معاني}} === النطق === * {{أصد-عر|اِبْتَدَى}} {{-}} === التصريفات === {{تصريف|جذر=بدو|وزن=افتعل}} === المراجع === {{مراجع}} h32sfvh8tf41avvfxxwi7ru6sgrmrcy نقاش:yamn0678@gmail.com 1 239723 1096566 2026-07-17T22:31:26Z ~2026-40154-93 38957 yamn0678@gmail.com 1096566 wikitext text/x-wiki {{شطب}} 5tkr9rmv2varf8af7uuo0g9626zouwh اِسْتَتْرَفَ 0 239724 1096568 2026-07-18T07:53:56Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096568 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533412}} === المعاني === '''اِسْتَتْرَفَ''' {{استفعل}} {{معجمية|L1533412|معاني}} === النطق === * {{أصد-عر|اِسْتَتْرَفَ}} {{-}} === التصريفات === {{تصريف|جذر=ترف|وزن=استفعل}} === المراجع === {{مراجع}} 2eb0ef5w3mrprs7hb3s77mwgvyaa8sz تَتَرَّفَ 0 239725 1096569 2026-07-18T07:55:45Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096569 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533413}} === المعاني === '''تَتَرَّفَ''' {{تفعّل}} {{معجمية|L1533413|معاني}} === النطق === * {{أصد-عر|تَتَرَّفَ}} {{-}} === التصريفات === {{تصريف|جذر=ترف|وزن=تفعّل}} === المراجع === {{مراجع}} 0yy2rh3um9vfb0603t06c339ovsppoh اِتَّرَكَ 0 239726 1096570 2026-07-18T07:58:16Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096570 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533415}} === المعاني === '''اِتَّرَكَ''' {{افتعل}} {{معجمية|L1533415|معاني}} === النطق === * {{أصد-عر|اِتَّرَكَ}} {{-}} === التصريفات === {{تصريف|جذر=ترك|وزن=افتعل}} === المراجع === {{مراجع}} m04meyofgzgdo4902ymkkqa712hdakv تَتَارَكَ 0 239727 1096571 2026-07-18T07:59:19Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096571 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533416}} === المعاني === '''تَتَارَكَ''' {{تفاعل}} {{معجمية|L1533416|معاني}} === النطق === * {{أصد-عر|تَتَارَكَ}} {{-}} === التصريفات === {{تصريف|جذر=ترك|وزن=تفاعل}} === المراجع === {{مراجع}} 8uctm9xzk08i4hc65di3pyg52imd44p تَتَلْمَذَ 0 239728 1096572 2026-07-18T08:00:15Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096572 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1495946}} === المعاني === '''تَتَلْمَذَ''' {{تفعلل}} {{معجمية|L1495946|معاني}} === النطق === * {{أصد-عر|تَتَلْمَذَ}} {{-}} === التصريفات === {{تصريف|جذر=تلمذ|وزن=تفعلل}} === المراجع === {{مراجع}} 3c1qa56u6s22i55g3fdoptjh6f56vcm تَلْمَذَ 0 239729 1096573 2026-07-18T08:03:23Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096573 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1495790}} === المعاني === '''تَلْمَذَ''' {{فعلل}} {{معجمية|L1495790|معاني}} === النطق === * {{أصد-عر|تَلْمَذَ}} {{-}} === التصريفات === {{تصريف|جذر=تلمذ|وزن=فعلل}} === المراجع === {{مراجع}} qnsn2tsagsr45s746mahsyg6gaev0ys اِتَّلَهَ 0 239730 1096574 2026-07-18T08:04:48Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096574 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533456}} === المعاني === '''اِتَّلَهَ''' {{افتعل}} {{معجمية|L1533456|معاني}} === النطق === * {{أصد-عر|اِتَّلَهَ}} {{-}} === التصريفات === {{تصريف|جذر=تله|وزن=افتعل}} === المراجع === {{مراجع}} 6kqyc16c2v9wv997l34n23e0qq2p304 تَتَلَّهَ 0 239731 1096575 2026-07-18T08:06:02Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096575 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533457}} === المعاني === '''تَتَلَّهَ''' {{تفعّل}} {{معجمية|L1533457|معاني}} === النطق === * {{أصد-عر|تَتَلَّهَ}} {{-}} === التصريفات === {{تصريف|جذر=تله|وزن=تفعّل}} === المراجع === {{مراجع}} 3dqi9cjf6g2v0j94njb42yhbja31r93 اِتَّهَمَ 0 239732 1096576 2026-07-18T08:09:54Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096576 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1486684}} === المعاني === '''اِتَّهَمَ''' {{افتعل}} {{معجمية|L1486684|معاني}} === النطق === * {{أصد-عر|اِتَّهَمَ}} {{-}} === التصريفات === {{تصريف|جذر=تهم|وزن=افتعل}} === المراجع === {{مراجع}} 113x5uuf865uqyqr51ibpe55qyxp7a4 تَتَهَّمَ 0 239733 1096577 2026-07-18T08:10:36Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096577 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533486}} === المعاني === '''تَتَهَّمَ''' {{تفعّل}} {{معجمية|L1533486|معاني}} === النطق === * {{أصد-عر|تَتَهَّمَ}} {{-}} === التصريفات === {{تصريف|جذر=تهم|وزن=تفعّل}} === المراجع === {{مراجع}} 25nghoo3taxts0t9vse7qwb7emt5n4d تَهِنَ 0 239734 1096578 2026-07-18T08:12:22Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096578 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1544779}} === المعاني === '''تَهِنَ''' {{سمع}} {{معجمية|L1544779|معاني}} === النطق === * {{أصد-عر|تَهِنَ}} {{-}} === التصريفات === {{تصريف|جذر=تهن|وزن=فعِل يفعَل}} === المراجع === {{مراجع}} pel2hed8zlx8fx5wxu04edpl8my5myl اِسْتَتَابَ 0 239735 1096579 2026-07-18T08:14:02Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096579 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1477217}} === المعاني === '''اِسْتَتَابَ''' {{استفعل}} {{معجمية|L1477217|معاني}} === النطق === * {{أصد-عر|اِسْتَتَابَ}} {{-}} === التصريفات === {{تصريف|جذر=توب|وزن=استفعل}} === المراجع === {{مراجع}} f38kn9bftj96e04he2n5jx4q8agvl8b اِنْجَأَثَ 0 239736 1096580 2026-07-18T08:14:19Z أبو هشام 20788 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096580 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533691}} === المعاني === '''اِنْجَأَثَ''' {{انفعل}} {{معجمية|L1533691|معاني}} === النطق === * {{أصد-عر|اِنْجَأَثَ}} {{-}} === التصريفات === {{تصريف|جذر=جأث|وزن=انفعل}} === المراجع === {{مراجع}} g0l6ao0gjv5f2okfbwrfect0q3gym3n تَوْبَلَ 0 239737 1096581 2026-07-18T08:16:03Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096581 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533489}} === المعاني === '''تَوْبَلَ''' {{فعلل}} {{معجمية|L1533489|معاني}} === النطق === * {{أصد-عر|تَوْبَلَ}} {{-}} === التصريفات === {{تصريف|جذر=توبل|وزن=فعلل}} === المراجع === {{مراجع}} 77xuc4685fuwi7h9u0m7hv1ramzulgb جَئِثَ 0 239738 1096582 2026-07-18T08:16:57Z أبو هشام 20788 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096582 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1543726}} === المعاني === '''جَئِثَ''' {{سمع}} {{معجمية|L1543726|معاني}} === النطق === * {{أصد-عر|جَئِثَ}} {{-}} === التصريفات === {{تصريف|جذر=جأث|وزن=فعِل يفعَل}} === المراجع === {{مراجع}} mexn3k1l38mvhjqykr4rpdc9ao3zngs تَتَوَّجَ 0 239739 1096583 2026-07-18T08:17:40Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096583 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533490}} === المعاني === '''تَتَوَّجَ''' {{تفعّل}} {{معجمية|L1533490|معاني}} === النطق === * {{أصد-عر|تَتَوَّجَ}} {{-}} === التصريفات === {{تصريف|جذر=توج|وزن=تفعّل}} === المراجع === {{مراجع}} imrakuwrm39jax7hzld72ih5bb4b58s جَأَجَ 0 239740 1096584 2026-07-18T08:19:29Z أبو هشام 20788 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096584 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1543727}} === المعاني === '''جَأَجَ''' {{فتح}} {{معجمية|L1543727|معاني}} === النطق === * {{أصد-عر|جَأَجَ}} {{-}} === التصريفات === {{تصريف|جذر=جأج|وزن=فعَل يفعَل}} === المراجع === {{مراجع}} 48qh44cfvu1kqjdxgu00qseexpk5i8e تَجَأْجَأَ 0 239741 1096585 2026-07-18T08:25:56Z أبو هشام 20788 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096585 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533693}} === المعاني === '''تَجَأْجَأَ''' {{تفعلل}} {{معجمية|L1533693|معاني}} === النطق === * {{أصد-عر|تَجَأْجَأَ}} {{-}} === التصريفات === {{تصريف|جذر=جأجأ|وزن=تفعلل}} === المراجع === {{مراجع}} t7azyw91uqn8yuwoot2z1l9ryh2noxc جَئِرَ 0 239742 1096586 2026-07-18T08:29:28Z أبو هشام 20788 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096586 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1544596}} === المعاني === '''جَئِرَ''' {{سمع}} {{معجمية|L1544596|معاني}} === النطق === * {{أصد-عر|جَئِرَ}} {{-}} === التصريفات === {{تصريف|جذر=جأر|وزن=فعِل يفعَل}} === المراجع === {{مراجع}} d6dbg9ibkw4nbeki0s7moy1zj99l9ei جَئِزَ 0 239743 1096587 2026-07-18T08:32:58Z أبو هشام 20788 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096587 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1545112}} === المعاني === '''جَئِزَ''' {{سمع}} {{معجمية|L1545112|معاني}} === النطق === * {{أصد-عر|جَئِزَ}} {{-}} === التصريفات === {{تصريف|جذر=جأز|وزن=فعِل يفعَل}} === المراجع === {{مراجع}} gdxzepsqkzetfics94fkz90w9hxgvzl جَأَصَ 0 239744 1096588 2026-07-18T08:35:56Z أبو هشام 20788 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096588 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1502562}} === المعاني === '''جَأَصَ''' {{فتح}} {{معجمية|L1502562|معاني}} === النطق === * {{أصد-عر|جَأَصَ}} {{-}} === التصريفات === {{تصريف|جذر=جأص|وزن=فعَل يفعَل}} === المراجع === {{مراجع}} i1vbf22lqr7uw8f5c7pfla33at8wobf أَتْاسَ 0 239745 1096589 2026-07-18T08:39:19Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096589 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533501}} === المعاني === '''أَتْيَسَ''' {{أفعل}} {{معجمية|L1533501|معاني}} === النطق === * {{أصد-عر|أَتْيَسَ}} {{-}} === التصريفات === {{تصريف|جذر=تيس|وزن=أفعل}} === المراجع === {{مراجع}} 7pcye50th8389yavtqx0b0vs2ahiboa 1096590 1096589 2026-07-18T08:39:46Z إسلام 12622 نقل إسلام صفحة [[أَتْيَسَ]] إلى [[أَتْاسَ]] 1096589 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533501}} === المعاني === '''أَتْيَسَ''' {{أفعل}} {{معجمية|L1533501|معاني}} === النطق === * {{أصد-عر|أَتْيَسَ}} {{-}} === التصريفات === {{تصريف|جذر=تيس|وزن=أفعل}} === المراجع === {{مراجع}} 7pcye50th8389yavtqx0b0vs2ahiboa 1096592 1096590 2026-07-18T08:40:39Z إسلام 12622 /* عربية */ 1096592 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533501}} === المعاني === '''أَتْاسَ''' {{أفعل}} {{معجمية|L1533501|معاني}} === النطق === * {{أصد-عر|أَتْاسَ}} {{-}} === التصريفات === {{تصريف|جذر=تيس|وزن=أفعل}} === المراجع === {{مراجع}} efyywgav6z30l8cevtg0y0u38pm7go5 1096593 1096592 2026-07-18T08:41:03Z إسلام 12622 1096593 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533501}} === المعاني === '''أَتْاسَ''' {{أفعل}} {{معجمية|L1533501|معاني}} {{-}} === التصريفات === {{تصريف|جذر=تيس|وزن=أفعل}} === المراجع === {{مراجع}} i45ouwrpejjqwznigt8lb51hcfmozqz أَتْيَسَ 0 239746 1096591 2026-07-18T08:39:47Z إسلام 12622 نقل إسلام صفحة [[أَتْيَسَ]] إلى [[أَتْاسَ]] 1096591 wikitext text/x-wiki #تحويل [[أَتْاسَ]] kv0pcw8mavrmsdzlwufrg7ovxyonxmk تَقِعَ 0 239747 1096594 2026-07-18T08:44:46Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096594 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1545464}} === المعاني === '''تَقِعَ''' {{سمع}} {{معجمية|L1545464|معاني}} === النطق === * {{أصد-عر|تَقِعَ}} {{-}} === التصريفات === {{تصريف|جذر=تقع|وزن=فعِل يفعَل}} === المراجع === {{مراجع}} iuvgr4ude93qhnfm3w9w3ttsfe9nvti تَتَقَّنَ 0 239748 1096595 2026-07-18T08:46:52Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096595 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533439}} === المعاني === '''تَتَقَّنَ''' {{تفعّل}} {{معجمية|L1533439|معاني}} === النطق === * {{أصد-عر|تَتَقَّنَ}} {{-}} === التصريفات === {{تصريف|جذر=تقن|وزن=تفعّل}} === المراجع === {{مراجع}} rdkxrafvkl1q6twj3owx9iondbknwh1 اِسْتَتَكَّ 0 239749 1096596 2026-07-18T08:50:11Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096596 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533442}} === المعاني === '''اِسْتَتَكَّ''' {{استفعل}} {{معجمية|L1533442|معاني}} === النطق === * {{أصد-عر|اِسْتَتَكَّ}} {{-}} === التصريفات === {{تصريف|جذر=تكك|وزن=استفعل}} === المراجع === {{مراجع}} 3ikv1imew082cb9y35eztgph2lqu70j اِتْلَأَبَّ 0 239750 1096597 2026-07-18T08:55:04Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096597 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533443}} === المعاني === '''اِتْلَأَبَّ''' {{افعللّ}} {{معجمية|L1533443|معاني}} === النطق === * {{أصد-عر|اِتْلَأَبَّ}} {{-}} === التصريفات === {{تصريف|جذر=تلأب|وزن=افعللّ}} === المراجع === {{مراجع}} 6kivvutvpwxvmn4s697sv5qxamv0y2c تَتَلَّى 0 239751 1096598 2026-07-18T08:57:45Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096598 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533464}} === المعاني === '''تَتَلَّى''' {{تفعّل}} {{معجمية|L1533464|معاني}} === النطق === * {{أصد-عر|تَتَلَّى}} {{-}} === التصريفات === {{تصريف|جذر=تلي|وزن=تفعّل}} === المراجع === {{مراجع}} 9c3pukb42f4wm79u3gdked9779a9be2 أَجْأَى 0 239752 1096599 2026-07-18T09:05:09Z أبو هشام 20788 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096599 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533699}} === المعاني === '''أَجْأَى''' {{أفعل}} {{معجمية|L1533699|معاني}} === النطق === * {{أصد-عر|أَجْأَى}} {{-}} === التصريفات === {{تصريف|جذر=جأي|وزن=أفعل}} === المراجع === {{مراجع}} dij41lehzhmbr1ak2jb1m6pvgq5oc89 تَئِقَ 0 239753 1096600 2026-07-18T09:06:05Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096600 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1545846}} === المعاني === '''تَئِقَ''' {{سمع}} {{معجمية|L1545846|معاني}} === النطق === * {{أصد-عر|تَئِقَ}} {{-}} === التصريفات === {{تصريف|جذر=تأق|وزن=فعِل يفعَل}} === المراجع === {{مراجع}} juoutrjo0q5bxr0rvxohpt2zr7bn3x3 تَاءَمَ 0 239754 1096601 2026-07-18T09:08:26Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096601 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1481198}} === المعاني === '''تَاءَمَ''' {{فاعل}} {{معجمية|L1481198|معاني}} === النطق === * {{أصد-عر|تَاءَمَ}} {{-}} === التصريفات === {{تصريف|جذر=تأم|وزن=فاعل}} === المراجع === {{مراجع}} a79te08y69b9zqs6yub4eatjhen8qcz أَتْجَرَ 0 239755 1096602 2026-07-18T09:08:44Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096602 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533380}} === المعاني === '''أَتْجَرَ''' {{أفعل}} {{معجمية|L1533380|معاني}} === النطق === * {{أصد-عر|أَتْجَرَ}} {{-}} === التصريفات === {{تصريف|جذر=تجر|وزن=أفعل}} === المراجع === {{مراجع}} p3bkxwitsujcqfdhap5r15nb1qw2xsu اِتَّخَمَ 0 239756 1096603 2026-07-18T09:10:09Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096603 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1489198}} === المعاني === '''اِتَّخَمَ''' {{افتعل}} {{معجمية|L1489198|معاني}} === النطق === * {{أصد-عر|اِتَّخَمَ}} {{-}} === التصريفات === {{تصريف|جذر=تخم|وزن=افتعل}} === المراجع === {{مراجع}} s6kzjkqt1v9vl4cn5hef3233dkdq78h تَتَاخَمَ 0 239757 1096604 2026-07-18T09:11:12Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096604 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533390}} === المعاني === '''تَتَاخَمَ''' {{تفاعل}} {{معجمية|L1533390|معاني}} === النطق === * {{أصد-عر|تَتَاخَمَ}} {{-}} === التصريفات === {{تصريف|جذر=تخم|وزن=تفاعل}} === المراجع === {{مراجع}} frhi7x07ozedk7iuaa0pyfgqzt6etx8 تَخَمَ 0 239758 1096605 2026-07-18T09:13:02Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096605 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1484520}} === المعاني === '''تَخَمَ''' {{ضرب}} {{معجمية|L1484520|معاني}} === النطق === * {{أصد-عر|تَخَمَ}} {{-}} === التصريفات === {{تصريف|جذر=تخم|وزن=فعَل يفعِل}} === المراجع === {{مراجع}} c9v621gs0suyiea9w48lm7k7je0wcbe تَخِمَ 0 239759 1096606 2026-07-18T09:14:27Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096606 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1480869}} === المعاني === '''تَخِمَ''' {{سمع}} {{معجمية|L1480869|معاني}} === النطق === * {{أصد-عر|تَخِمَ}} {{-}} === التصريفات === {{تصريف|جذر=تخم|وزن=فعِل يفعَل}} === المراجع === {{مراجع}} d628bnc8pd80nq4re2kl9t8r595eg8z تَتَرَّبَ 0 239760 1096607 2026-07-18T09:26:36Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096607 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1486134}} === المعاني === '''تَتَرَّبَ''' {{تفعّل}} {{معجمية|L1486134|معاني}} === النطق === * {{أصد-عر|تَتَرَّبَ}} {{-}} === التصريفات === {{تصريف|جذر=ترب|وزن=تفعّل}} === المراجع === {{مراجع}} b5v5u407mwpp69eownw843s1bgenmc7 تَرِشَ 0 239761 1096608 2026-07-18T09:28:05Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096608 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1546036}} === المعاني === '''تَرِشَ''' {{سمع}} {{معجمية|L1546036|معاني}} === النطق === * {{أصد-عر|تَرِشَ}} {{-}} === التصريفات === {{تصريف|جذر=ترش|وزن=فعِل يفعَل}} === المراجع === {{مراجع}} g8bv00azablwrws9q73ikytkxaq1d5y اِسْتَتَاسَ 0 239762 1096609 2026-07-18T09:29:45Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096609 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533502}} === المعاني === '''اِسْتَتَاسَ''' {{استفعل}} {{معجمية|L1533502|معاني}} === النطق === * {{أصد-عر|اِسْتَتَاسَ}} {{-}} === التصريفات === {{تصريف|جذر=تيس|وزن=استفعل}} === المراجع === {{مراجع}} p6hj0k4ntsgt4cz1f2ol5mszmezg0rd تَاسَ 0 239763 1096610 2026-07-18T09:30:27Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096610 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1547007}} === المعاني === '''تَاسَ''' {{ضرب}} {{معجمية|L1547007|معاني}} === النطق === * {{أصد-عر|تَاسَ}} {{-}} === التصريفات === {{تصريف|جذر=تيس|وزن=فعَل يفعِل}} === المراجع === {{مراجع}} o0nw2d7m3sahfg49ju102r9fdvyjxhu تَايَسَ 0 239764 1096611 2026-07-18T09:34:56Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096611 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533504}} === المعاني === '''تَايَسَ''' {{فاعل}} {{معجمية|L1533504|معاني}} === النطق === * {{أصد-عر|تَايَسَ}} {{-}} === التصريفات === {{تصريف|جذر=تيس|وزن=فاعل}} === المراجع === {{مراجع}} 3w1hm48mice9fl7bj4c6wk8gzd2dv22 تَتَايَسَ 0 239765 1096612 2026-07-18T09:36:35Z إسلام 12622 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096612 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533503}} === المعاني === '''تَتَايَسَ''' {{تفاعل}} {{معجمية|L1533503|معاني}} === النطق === * {{أصد-عر|تَتَايَسَ}} {{-}} === التصريفات === {{تصريف|جذر=تيس|وزن=تفاعل}} === المراجع === {{مراجع}} 59uvj919ss8ewz90ub5fgxgfibsjrcj اِنْجَبَذَ 0 239766 1096614 2026-07-18T11:14:27Z أبو هشام 20788 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096614 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1496237}} === المعاني === '''اِنْجَبَذَ''' {{انفعل}} {{معجمية|L1496237|معاني}} === النطق === * {{أصد-عر|اِنْجَبَذَ}} {{-}} === التصريفات === {{تصريف|جذر=جبذ|وزن=انفعل}} === المراجع === {{مراجع}} 2ovhwv2c1iqe19jsats28u8qhktvb7f اِجْتَبَذَ 0 239767 1096615 2026-07-18T11:15:21Z أبو هشام 20788 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096615 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533710}} === المعاني === '''اِجْتَبَذَ''' {{افتعل}} {{معجمية|L1533710|معاني}} === النطق === * {{أصد-عر|اِجْتَبَذَ}} {{-}} === التصريفات === {{تصريف|جذر=جبذ|وزن=افتعل}} === المراجع === {{مراجع}} 9ya8ougvqphmzmcagrdixuft29j8jms اِنْجَثَّ 0 239768 1096616 2026-07-18T11:26:31Z أبو هشام 20788 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096616 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533727}} === المعاني === '''اِنْجَثَّ''' {{انفعل}} {{معجمية|L1533727|معاني}} === النطق === * {{أصد-عر|اِنْجَثَّ}} {{-}} === التصريفات === {{تصريف|جذر=جثث|وزن=انفعل}} === المراجع === {{مراجع}} ha921jgoxiau1dnm0cxw9mmttd2ggxz جَثْجَثَ 0 239769 1096617 2026-07-18T11:29:16Z أبو هشام 20788 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096617 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533728}} === المعاني === '''جَثْجَثَ''' {{فعلل}} {{معجمية|L1533728|معاني}} === النطق === * {{أصد-عر|جَثْجَثَ}} {{-}} === التصريفات === {{تصريف|جذر=جثجث|وزن=فعلل}} === المراجع === {{مراجع}} 7mhbpbbb9pu5jqzss5tdzp1nwyfq644 جَثَطَ 0 239770 1096619 2026-07-18T11:43:17Z أبو هشام 20788 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096619 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1546042}} === المعاني === '''جَثَطَ''' {{ضرب}} {{معجمية|L1546042|معاني}} === النطق === * {{أصد-عر|جَثَطَ}} {{-}} === التصريفات === {{تصريف|جذر=جثط|وزن=فعَل يفعِل}} === المراجع === {{مراجع}} rz4os617htjc1jilto4xrpz3t7x37ec جَثَّى 0 239771 1096620 2026-07-18T11:44:12Z أبو هشام 20788 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096620 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533733}} === المعاني === '''جَثَّى''' {{فعّل}} {{معجمية|L1533733|معاني}} === النطق === * {{أصد-عر|جَثَّى}} {{-}} === التصريفات === {{تصريف|جذر=جثو|وزن=فعّل}} === المراجع === {{مراجع}} du9e4mak5upgarr5la0lqfpi158b7vl جَثَى 0 239772 1096621 2026-07-18T11:52:47Z أبو هشام 20788 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096621 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1502459}} === المعاني === '''جَثَى''' {{ضرب}} {{معجمية|L1502459|معاني}} === النطق === * {{أصد-عر|جَثَى}} {{-}} === التصريفات === {{تصريف|جذر=جثي|وزن=فعَل يفعِل}} === المراجع === {{مراجع}} sqhcbpmjltwaeoi0rjv064rgpert0yi جَبَّعَ 0 239773 1096622 2026-07-18T11:55:17Z أبو هشام 20788 إنشاء صفحة فعل من بيانات المعاجم (ar-senses tool) 1096622 wikitext text/x-wiki == {{اللغة|عربية}} == {{صندوق معلومات فعل|L1533716}} === المعاني === '''جَبَّعَ''' {{فعّل}} {{معجمية|L1533716|معاني}} === النطق === * {{أصد-عر|جَبَّعَ}} {{-}} === التصريفات === {{تصريف|جذر=جبع|وزن=فعّل}} === المراجع === {{مراجع}} 5cxu02t3klo7g3yhl678ispb5px6auv