উইকিঅভিধান
bnwiktionary
https://bn.wiktionary.org/wiki/%E0%A6%AA%E0%A7%8D%E0%A6%B0%E0%A6%A7%E0%A6%BE%E0%A6%A8_%E0%A6%AA%E0%A6%BE%E0%A6%A4%E0%A6%BE
MediaWiki 1.47.0-wmf.9
case-sensitive
মিডিয়া
বিশেষ
আলাপ
ব্যবহারকারী
ব্যবহারকারী আলাপ
উইকিঅভিধান
উইকিঅভিধান আলোচনা
চিত্র
চিত্র আলোচনা
মিডিয়াউইকি
মিডিয়াউইকি আলোচনা
টেমপ্লেট
টেমপ্লেট আলোচনা
সাহায্য
সাহায্য আলোচনা
বিষয়শ্রেণী
বিষয়শ্রেণী আলোচনা
পরিশিষ্ট
পরিশিষ্ট আলোচনা
ছন্দ
ছন্দ আলোচনা
থিসরাস
থিসরাস আলোচনা
উদ্ধৃতি
উদ্ধৃতি আলোচনা
TimedText
TimedText talk
মডিউল
মডিউল আলাপ
ইভেন্ট
ইভেন্ট আলোচনা
মডিউল:utilities
828
6289
512462
324133
2026-07-02T18:19:30Z
Redmin
6857
ইংরেজি উইকিঅভিধান থেকে হালনাগাদ করা হলো
512462
Scribunto
text/plain
local export = {}
local headword_data_module = "Module:headword/data"
local languages_module = "Module:languages"
local links_module = "Module:links"
local load_module = "Module:load"
local pages_module = "Module:pages"
local script_utilities_module = "Module:script utilities"
local scripts_module = "Module:scripts"
local string_utilities_module = "Module:string utilities"
local utilities_data_module = "Module:utilities/data"
local mw = mw
local anchor_encode = mw.uri.anchorEncode
local concat = table.concat
local format_categories -- Defined below.
local ipairs = ipairs
local require = require
local type = type
local unstrip = mw.text.unstrip
--[==[
Loaders for functions in other modules, which overwrite themselves with the target function when called. This ensures modules are only loaded when needed, retains the speed/convenience of locally-declared pre-loaded functions, and has no overhead after the first call, since the target functions are called directly in any subsequent calls.]==]
local function decode_entities(...)
decode_entities = require(string_utilities_module).decode_entities
return decode_entities(...)
end
local function get_script(...)
get_script = require(scripts_module).getByCode
return get_script(...)
end
local function is_content_page(...)
is_content_page = require(pages_module).is_content_page
return is_content_page(...)
end
local function load_data(...)
load_data = require(load_module).load_data
return load_data(...)
end
local function remove_links(...)
remove_links = require(links_module).remove_links
return remove_links(...)
end
local function tag_text(...)
tag_text = require(script_utilities_module).tag_text
return tag_text(...)
end
local function trim(...)
trim = require(string_utilities_module).trim
return trim(...)
end
local function uupper(...)
uupper = require(string_utilities_module).upper
return uupper(...)
end
--[==[
Loaders for objects, which load data (or some other object) into some variable, which can then be accessed as "foo or get_foo()", where the function get_foo sets the object to "foo" and then returns it. This ensures they are only loaded when needed, and avoids the need to check for the existence of the object each time, since once "foo" has been set, "get_foo" will not be called again.]==]
local catfix_scripts
local function get_catfix_scripts()
catfix_scripts, get_catfix_scripts = load_data(utilities_data_module).catfix_scripts, nil
return catfix_scripts
end
local current_title
local function get_current_title()
current_title, get_current_title = mw.title.getCurrentTitle(), nil
return current_title
end
local defaultsort
local function get_defaultsort()
defaultsort, get_defaultsort = load_data(headword_data_module).page.pagename_defaultsort, nil
return defaultsort
end
local pagename
local function get_pagename()
pagename, get_pagename = load_data(headword_data_module).page.encoded_pagename, nil
return pagename
end
local und
local function get_und()
und, get_und = require(languages_module).getByCode("und"), nil
return und
end
do
local function handle_url(capture)
return capture:match("https?://[^%s%]]+%s([^%]]+)") or ""
end
--[==[
A helper function to strip wiki markup, giving the plaintext of what is displayed on the page.]==]
function export.get_plaintext(text)
text = text
:gsub("%[%[", "\1")
:gsub("%]%]", "\2")
-- Remove strip markers and HTML tags.
text = unstrip(text):gsub("<[^<>\1\2]+>", "")
-- Parse internal links for the display text, and remove categories.
text = remove_links(text)
-- Remove files.
text = text:gsub("\1[Ff][Ii][Ll][Ee]:[^\1\2]+\2", "")
:gsub("\1[Ii][Mm][Aa][Gg][Ee]:[^\1\2]+\2", "")
-- Parse external links for the display text.
text = text:gsub("%[(https?://[^%[%]]+)%]", handle_url)
-- Any remaining square brackets aren't involved in links, but must be escaped to avoid creating new links.
:gsub("\1", "[[")
:gsub("\2", "]]")
:gsub("%[", "[")
:gsub("]", "]")
-- Strip bold, italics and soft hyphens.
:gsub("('*)'''(.-'*)'''", "%1%2")
:gsub("('*)''(.-'*)''", "%1%2")
:gsub("", "")
-- Get any HTML entities and trim.
-- Note: don't decode URL percent encoding, as it shouldn't be used in display text and may cause problems if % is used.
return trim(decode_entities(text))
end
end
do
local function generate_sortkey(lang, sc, sort_key, sort_base)
-- If the sort key is "-", treat the language as undetermined (the default). This is desirable when categorising (e.g.) translation requests, as the pages to be categorised are always in English/Translingual.
if sort_key == "-" then
lang, sort_key = und or get_und(), nil
elseif not lang then
lang = und or get_und()
end
-- Generate the automatic sort key.
local auto = lang:makeSortKey(sort_base or pagename or get_pagename(), sc)
-- Use the page defaultsort if necessary. Try hard to avoid empty sort key, which causes categories to be
-- displayed as raw text; fall back to pagename if necessary.
if not auto or auto == "" then
auto = defaultsort or get_defaultsort()
end
if not auto or auto == "" then
auto = sort_base
end
if not auto or auto == "" then
auto = pagename or get_pagename()
end
-- If not sort key specified, use the automatic one.
if not sort_key or sort_key == "" then
return auto
-- Otherwise, if the language is not "und", categorize the manual sort key as either redundant or non-redundant.
-- FIXME: we should do this for "und" as well, but "Undetermined terms..." does not make sense for translations etc.
elseif lang:getCode() ~= "und" then
return sort_key, "[[Category:" .. lang:getFullName() .. " terms with " .. (
uupper(sort_key) == auto and "redundant" or
"non-redundant non-automated"
) .. " sortkeys|" .. sort_key .. "]]"
end
return sort_key
end
--[==[
Format the categories with the appropriate sort key.
* `cat` can take two forms:
** A string (the full category, minus the {"Category:"} prefix);
** A list of categories. Each category in the list can be either:
*** A string in the same format as above;
*** An object with the fields:
**** `cat`: a string in the same format as above (required);
**** `lang`: an optional language object to override the overall `lang`;
**** `sc`: an optional script object to override the overall `sc`.
**** `sort_key`: an optional sort key to override the overall `sort_key`;
**** `sort_base`: an optional sort base to override the overall `sort_base`;
* `lang` is an object encapsulating a language; if {nil}, the object for language code {"und"} (undetermined) will
be used. `lang` is used when computing the sort key (either from the subpage name or sort base).
* `sort_key` is placed in the category invocation, and indicates how the page will sort in the respective category.
Normally '''do not use this'''. Instead, leave it {nil}, and if you need to a control the sort order, use
{sort_base}, so that language-specific normalization is applied on top of the specified sort base. If neither
{sort_key} nor {sort_base} is specified, the default is to apply language-specific normalization to the subpage
name; see below.
* `sort_base` lets you override the default sort key while still maintaining appropriate language-specific
normalization. If {nil} is specified, this defaults to the subpage name, which is the portion of the full pagename
after subtracting the namespace prefix (and, in certain namespaces such as {User:}, but notably not in the
mainspace, after subtracting anything up through the final slash). The actual sort key is derived from the sort
base approximately by lowercasing, applying language-specific normalization and then uppercasing; note that the
same process is applied in deriving the sort key when no sort base is specified. For example, for French, Spanish,
etc. the normalization process maps accented letters to their unaccented equivalents, so that e.g. in French,
{{m|fr|ça}} sorts after {{m|fr|ca}} (instead of after the default Wikimedia sort order, which is approximately
based on Unicode sort order and places ç after z) and {{m|fr|côté}} sorts after {{m|fr|coté}} (instead of between
c and d). Similarly, in Russian the normalization process converts Cyrillic ё to a string consisting of Cyrillic е
followed by U+10FFFF, so that effectively ё sorts after е instead of the default Wikimedia sort, which (I think)
puts ё after я, the last letter of the Cyrillic alphabet.
* `force_output` forces normal output in all namespaces. Normally, nothing is output if the page isn't in the main,
Appendix:, Thesaurus:, Reconstruction: or Citations: namespaces.
* `sc` is a script object; if nil, the default will be derived from the sort base (or its default value, the
subpage name) by calling {lang:findBestScript()}. The value of `sc` is used during the sort base normalization
process; for example, languages with multiple scripts will often have script-specific normalization processes.]==]
function export.format_categories(cat, lang, sort_key, sort_base, force_output, sc)
if not (
force_output or
is_content_page(current_title or get_current_title()) or
current_title.prefixedText == "Wiktionary:Sandbox"
) then
return ""
elseif type(cat) == "string" then
local this_sort_key, extra = generate_sortkey(lang, sc, sort_key, sort_base)
return "[[Category:" .. cat .. "|" .. this_sort_key .. "]]" .. (extra or "")
end
local ret, i, n, default = {}, 0, 0
-- Iterate over all categories in `cat`.
while true do
i = i + 1
local category = cat[i]
if category == nil then
return concat(ret)
end
local this_sort_key, extra
-- If the category type is a table, use any custom options in it.
if type(category) == "table" then
category, this_sort_key, extra = category.cat, generate_sortkey(
category.lang or lang,
category.sc or sc,
category.sort_key or sort_key,
category.sort_base or sort_base
)
-- If `default` has already been determined, use it.
elseif default then
this_sort_key = default
-- Otherwise, calculate `default` and use it.
else
this_sort_key, extra = generate_sortkey(lang, sc, sort_key, sort_base)
default = this_sort_key
end
n = n + 1
ret[n] = "[[Category:" .. category .. "|" .. this_sort_key .. "]]" .. (extra or "")
end
end
format_categories = export.format_categories
end
--[==[
Add a "catfix", which is used on language-specific category pages to add language attributes and often script
classes to all entry names. The addition of language attributes and script classes makes the entry names display
better (using the language- or script-specific styles specified in [[MediaWiki:Common.css]]), which is particularly
important for non-English languages that do not have consistent font support in browsers.
Language attributes are added for all languages, but script classes are only added for languages with one script
listed in their data file, or for languages that have a default script listed in the {catfix_script} list in
[[Module:utilities/data]]. Some languages clearly have a default script, but still have other scripts listed in
their data file. If those other scripts are not simply scripts like {{cd|Brai}} (Braille), their default script
needs to be specified. Others do not have a default script.
* Serbo-Croatian is regularly written in both the Latin and Cyrillic scripts. Because it uses two scripts,
Serbo-Croatian cannot have a script class applied to entries in its category pages, as only one script class
can be specified at a time.
* German is usually written in the Latin script ({{cd|Latn}}), but Fraktur ({{cd|Latf}}) is also listed in
its data file. So German needs an entry in the {catfix_script} list, so that the {{cd|Latn}} (Latin) script
class will be applied to entries in its category pages.
To find the scripts listed for a language, go to [[Module:languages]] and use the search box to find the data file
for the language. To find out what a script code means, search the script code in [[Module:scripts/data]].]==]
function export.catfix(lang, sc)
if not lang or not lang.getCanonicalName then
error('The first argument to the function "catfix" should be a language object from [[Module:languages]] or [[Module:etymology languages]].')
end
if sc and not sc.getCode then
error('The second argument to the function "catfix" should be a script object from [[Module:scripts]].')
end
-- To add script classes to links on pages created by category boilerplate templates.
if not sc then
local code = (catfix_scripts or get_catfix_scripts())[lang:getCode()] or catfix_scripts[lang:getFullCode()]
if code then
sc = get_script(code)
end
end
-- If the language only has a single valid candidate script, apply it as the default.
if not sc then
local scripts = lang:getScripts()
if #scripts == 1 then
sc = scripts[1]
else
-- Iterate over scripts. If there is only one when ignoring
-- scripts like Brai, then pick that one.
for _, script in ipairs(scripts) do
if script:getCode() ~= "Brai" then
if sc then
-- Multiple candidates - fail.
sc = nil
break
else
sc = script
end
end
end
end
end
-- Hack: using a <ul> tag prevents the parser from automatically generating a <p> tag around the catfix element.
return "<ul class=\"catfix\" data-anchor=\"" ..
anchor_encode(lang:getFullName()) .. "\">" ..
tag_text("", lang, sc) .. "</ul>" ..
format_categories("Pages using catfix", nil, nil, nil, true)
end
--[==[
Given a type (as a string) and an arbitrary number of entities, checks whether all of those entities are language,
family, script, writing system or Wikimedia language objects. Useful for error handling in functions that require
one of these kinds of object.
If `noErr` is set, the function returns false instead of throwing an error, which allows customised error handling to
be done in the calling function.]==]
function export.check_object(typ, noErr, ...)
if ... == nil then
if noErr then
return false
end
error("Must provide at least one object to check.", 2)
end
for _, obj in ipairs{...} do
if type(obj) ~= "table" or type(obj.hasType) ~= "function" then
if noErr then
return false
end
error("Function expected a " .. typ .. " object, but received a " .. type(obj) .. " instead.", 2)
elseif not (typ == "object" or obj:hasType(typ)) then
for _, wrong_type in ipairs{"family", "language", "script", "Wikimedia language", "writing system"} do
if obj:hasType(wrong_type) then
if noErr then
return false
end
error("Function expected a " .. typ .. " object, but received a " .. wrong_type .. " object instead.", 2)
end
end
if noErr then
return false
end
error("Function expected a " .. typ .. " object, but received another type of object instead.", 2)
end
end
return true
end
return export
szkevg9xl5j9wpvvgbzhwuqjxjznt9y
মডিউল:yesno
828
6794
512463
324162
2026-07-02T18:21:20Z
Redmin
6857
ইংরেজি উইকিঅভিধান থেকে হালনাগাদ করা হলো
512463
Scribunto
text/plain
-- Function allowing for consistent treatment of boolean-like wikitext input.
-- It works similarly to the template {{yesno}}.
local lower = string.lower
local tonumber = tonumber
local type = type
local yesno
return function (val, default)
if val == nil then
return nil
elseif not yesno then
yesno = {
[true] = true, [false] = false,
["true"] = true, ["false"] = false,
["t"] = true, ["f"] = false,
[1] = true, [0] = false,
["1"] = true, ["0"] = false,
["yes"] = true, ["no"] = false,
["y"] = true, ["n"] = false,
["on"] = true, ["off"] = false,
}
end
local ret = yesno[val]
if ret ~= nil then
return ret
elseif type(val) ~= "string" then
return default
end
-- Catch inputs like "00".
ret = yesno[tonumber(val)]
if ret ~= nil then
return ret
end
-- Case-insensitive.
ret = yesno[lower(val)]
if ret ~= nil then
return ret
end
return default
end
50fw3j6qj6cod4hrcb5leyd15zs34hg
ঔপনিবেশিক
0
14755
512464
136726
2026-07-02T20:46:10Z
~2026-37975-85
14848
/* উচ্চারণ */ শব্দের সঠিক উচ্চারণ
512464
wikitext
text/x-wiki
== {{ভাষা|bn}} ==
=== বিশেষণ ===
{{বিশেষণ|bn}}
=== উচ্চারণ ===
ওউপোনিবেশিক্
=== ব্যুৎপত্তি ===
# [[সংস্কৃত]] জাত;
# √ উপনিবেশ + ইক।
=== অর্থ ===
* [[উপনিবেশ]] সংক্রান্ত;
* উপনিবেশ স্হাপনকারী;
* উপনিবেশে বাসকারী।
=== পদান্তর ===
# [[বিশেষ্য]] - উপনিবেশে বাসকারী ব্যক্তি।
=== সমার্থক শব্দ ===
=== উদ্ভূত শব্দ ===
#
=== প্রয়োগ ===
# বিশেষ্য - আমেরিকায় ঔপনিবেশিকদের অভাব-অভিযোগ।
# বিশেষণ - আমেরিকার ইংরেজ ঔপনিবেশিক।
=== অনুবাদসমূহ ===
{{অনুবাদ-শীর্ষ}}
:* {{en}}:
{{অনুবাদ-নীচ}}
{{উৎস-ভাষা|bn}}
89fum1097us4s392k0u29fztokrhynr
তাজিকিস্তান
0
23678
512456
115833
2026-07-02T17:12:41Z
Redmin
6857
লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L235159-এর সাথে সংযোগ তৈরি করছি
512456
wikitext
text/x-wiki
== {{langname|bn}} ==
===উচ্চারণ===
{{অডিও-দেশ-ভাষা|bn}}
===নামবাচক বিশেষ্য===
{{নামবাচক বিশেষ্য|bn}}
# [[এশিয়া]] [[মহাদেশ]]ের একটি [[সার্বভৌম]] দেশ।
{{উইকিপিডিয়া}}
{{অনুবাদ-শীর্ষ}}
:* {{en}}: [[Tajikistan]]
{{অনুবাদ-নীচ}}
{{লে|L235159}}
2saoz5ngc6qwtvgf9gvaq3c6gx6qrv3
ব্যবহারকারী আলাপ:Redmin
3
24780
512480
512448
2026-07-03T10:54:32Z
MediaWiki message delivery
2534
/* Wikidata Platform Newsletter - July 2026 */ নতুন অনুচ্ছেদ
512480
wikitext
text/x-wiki
== I seen your RedminBot Tamil entries Creations ==
I seen your RedminBot Tamil entries Creations . That's was really nice. I hope you are interested in Tamil entries creations. Thanks for your continuous support! i created a spreadsheet file for Creating Tamil entries in bnwikt [https://docs.google.com/spreadsheets/d/1KDnIFSo8mCgN5Cb4GVxMv_gcgecZxjdFzQso9l-VhWg/edit#gid=0 See this]. This maybe useful for your bot Tamil entries. Thanks Again. [[ব্যবহারকারী:Sriveenkat|Sriveenkat]] ([[ব্যবহারকারী আলাপ:Sriveenkat|আলাপ]]) ০৭:৩৩, ৫ অক্টোবর ২০২৩ (ইউটিসি)
:Thank you for this! I will make entries manually as this is too complex for the bot but this really helps. :D [[ব্যবহারকারী:Redmin|Redmin]] ([[ব্যবহারকারী আলাপ:Redmin#top|আলাপ]]) ০৯:৩৭, ৫ অক্টোবর ২০২৩ (ইউটিসি)
::Ok Redmin Thanks. We will do manually Thanks Again. [[ব্যবহারকারী:Sriveenkat|Sriveenkat]] ([[ব্যবহারকারী আলাপ:Sriveenkat|আলাপ]]) ০৯:৫৭, ৫ অক্টোবর ২০২৩ (ইউটিসি)
== পর্যালোচনা ==
[[နာမ်]] এর বিশেষ্যের জন্য মডিউল তৈরি করেছি: [[মডিউল:my-headword]]।
ইংরেজিতে [[https://en.m.wiktionary.org/wiki/Module:my-headword Module:my-headword]]
কিন্তু কাজ হচ্ছে না কেন? [[ব্যবহারকারী:খালিদ জে. হোসেইন|哈立德]] ১৮:২৩, ২৮ ডিসেম্বর ২০২৩ (ইউটিসি)
:@[[ব্যবহারকারী:খালিদ জে. হোসেইন|খালিদ জে. হোসেইন]], এখনও কি একই অবস্থা? [[ব্যবহারকারী:Redmin|Redmin]] ([[ব্যবহারকারী আলাপ:Redmin#top|আলাপ]]) ১৪:০৪, ৩ জানুয়ারি ২০২৪ (ইউটিসি)
::জ্বি, এখন ঠিক আছে। ধন্যবাদ। [[ব্যবহারকারী:খালিদ জে. হোসেইন|哈立德]] ০১:৩১, ৫ জানুয়ারি ২০২৪ (ইউটিসি)
== <span lang="en" dir="ltr" class="mw-content-ltr">Reminder to vote now to select members of the first U4C</span> ==
<div lang="en" dir="ltr" class="mw-content-ltr">
<section begin="announcement-content" />
:''[[m:Special:MyLanguage/Universal Code of Conduct/Coordinating Committee/Election/2024/Announcement – vote reminder|You can find this message translated into additional languages on Meta-wiki.]] [https://meta.wikimedia.org/w/index.php?title=Special:Translate&group=page-{{urlencode:Universal Code of Conduct/Coordinating Committee/Election/2024/Announcement – vote reminder}}&language=&action=page&filter= {{int:please-translate}}]''
Dear Wikimedian,
You are receiving this message because you previously participated in the UCoC process.
This is a reminder that the voting period for the Universal Code of Conduct Coordinating Committee (U4C) ends on May 9, 2024. Read the information on the [[m:Universal Code of Conduct/Coordinating Committee/Election/2024|voting page on Meta-wiki]] to learn more about voting and voter eligibility.
The Universal Code of Conduct Coordinating Committee (U4C) is a global group dedicated to providing an equitable and consistent implementation of the UCoC. Community members were invited to submit their applications for the U4C. For more information and the responsibilities of the U4C, please [[m:Universal Code of Conduct/Coordinating Committee/Charter|review the U4C Charter]].
Please share this message with members of your community so they can participate as well.
On behalf of the UCoC project team,<section end="announcement-content" />
</div>
[[m:User:RamzyM (WMF)|RamzyM (WMF)]] ২৩:১৬, ২ মে ২০২৪ (ইউটিসি)
<!-- https://meta.wikimedia.org/w/index.php?title=Universal_Code_of_Conduct/Coordinating_Committee/Election/2024/Previous_voters_list&oldid=26721206-এর তালিকা ব্যবহার করে বার্তাটি ব্যবহারকারী:RamzyM (WMF)@metawiki পাঠিয়েছেন -->
== <span lang="en" dir="ltr">Tech News: 2026-09</span> ==
<div lang="en" dir="ltr">
<section begin="technews-2026-W09"/><div class="plainlinks">
Latest '''[[m:Special:MyLanguage/Tech/News|tech news]]''' from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. [[m:Special:MyLanguage/Tech/News/2026/09|Translations]] are available.
'''Weekly highlight'''
* [[mw:Special:MyLanguage/Edit check/Reference Check|Reference Check]] has been deployed to English Wikipedia, completing its rollout across all Wikipedias. The feature prompts newcomers to add a citation before publishing new content, helping reduce common citation-related reverts and improve verifiability. In A/B testing, the impact was substantial: newcomers shown Reference Check were approximately 2.2 times more likely to include a reference on desktop and about 17.5 times more likely on mobile web. [https://analytics.wikimedia.org/published/reports/editing/reference_check_ab_test_report_final_2025.html]
'''Updates for editors'''
* The [[mw:Special:MyLanguage/Extension:InterwikiSorting|InterwikiSorting extension]], which allowed for the [[m:Special:MyLanguage/Interwiki sorting order|sorting of interwiki links]], has been undeployed from Wikipedia. As a result, editors who had enabled interwiki link sorting in non-compact mode (full list format) will now see links reordered. The links moving forward will be listed in the alphabetical order of language code. [https://phabricator.wikimedia.org/T253764]
* Later this week, people who are editing a page-section using the mobile visual editor, will notice a new "Edit full page" button. When tapped, you will be able to edit the entire article. This helps when the change you want to make is outside the section you initially opened. [https://phabricator.wikimedia.org/T387175][https://phabricator.wikimedia.org/T409112]
* [[mw:Special:MyLanguage/Readers/Reader Experience|The Reader Experience team]] is inviting editors to assess whether dark mode should still be considered "beta" on their wiki, based on their experience of how well it functions on desktop and mobile. If the feature is deemed mature, editors can update the interface messages in <code dir=ltr>MediaWiki:skin-theme-description</code> and <code dir=ltr>MediaWiki:Vector-night-mode-beta-tag</code> to indicate that dark mode is ready and no longer considered beta.
* The improved [[mw:Wikimedia_Apps/Team/iOS/Activity_Tab|Activity tab]] which displays user-insights is now available to all users of the Wikipedia iOS app (version 7.9.0 and later). Following earlier A/B testing that showed higher account creation among users with access to the feature, it has been rolled out to 100% of users along with some updates. The Activity tab now shows your edited articles in the timeline, offers editing impact insights like contribution counts and article view trends, and customization options to improve in-app experience for users.
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] View all {{formatnum:21}} community-submitted {{PLURAL:21|task|tasks}} that were [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|resolved last week]]. For example, a bug that prevented [[mw:Special:MyLanguage/Extension:DiscussionTools|DiscussionTools]] from working on mobile has now been fixed, restoring full functionality. [https://phabricator.wikimedia.org/T415303]
'''Updates for technical contributors'''
* The [[m:Special:GlobalWatchlist|Global Watchlist]] lets you view your watchlists from multiple wikis on one page. The [[mw:Special:MyLanguage/Extension:GlobalWatchlist|extension]] that makes this possible continues to improve. The latest upgrade is the inclusion of a [[mw:Extension:GlobalWatchlist#hook|new hook]], <code dir=ltr>ext.globalwatchlist.rebuild</code>, which fires after each watchlist rebuild. This allows you to run gadgets and user scripts for the Special page. [https://phabricator.wikimedia.org/T275159]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] Detailed code updates later this week: [[mw:MediaWiki 1.46/wmf.17|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tech news]]''' prepared by [[m:Special:MyLanguage/Tech/News/Writers|Tech News writers]] and posted by [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Contribute]] • [[m:Special:MyLanguage/Tech/News/2026/09|Translate]] • [[m:Tech|Get help]] • [[m:Talk:Tech/News|Give feedback]] • [[m:Global message delivery/Targets/Tech ambassadors|Subscribe or unsubscribe]].''
</div><section end="technews-2026-W09"/>
</div>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> ১৯:০৪, ২৩ ফেব্রুয়ারি ২০২৬ (ইউটিসি)
<!-- https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30119102-এর তালিকা ব্যবহার করে বার্তাটি ব্যবহারকারী:STei (WMF)@metawiki পাঠিয়েছেন -->
== <span lang="en" dir="ltr">Tech News: 2026-10</span> ==
<div lang="en" dir="ltr">
<section begin="technews-2026-W10"/><div class="plainlinks">
Latest '''[[m:Special:MyLanguage/Tech/News|tech news]]''' from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. [[m:Special:MyLanguage/Tech/News/2026/10|Translations]] are available.
'''Weekly highlight'''
* Wikipedia 25 [[m:Special:MyLanguage/Wikipedia 25/Easter egg experiments|Birthday mode]] is now live on Betawi, Breton, Chinese, Czech, Dutch, English, French, Gorontalo, Indonesian, Italian, Luxembourgish, Madurese, Sicilian, Spanish, Thai, and Vietnamese Wikipedias! This limited-time campaign feature celebrates 25 years of Wikipedia with a birthday mascot, Baby Globe. When turned on, Baby Globe is shown on [[m:Special:MyLanguage/Wikipedia 25/Easter egg experiments/article configuration|~2,500 articles]], waiting to be discovered by readers. Communities can choose to turn Birthday mode on by getting consensus from their community and asking an admin to enable the feature and customize it via [[m:Special:MyLanguage/Wikipedia 25/Easter egg experiments#Community Configuration Demo|community configuration]] on the local wiki.
'''Updates for editors'''
* [[:m:Special:MyLanguage/WMDE Technical Wishes/Sub-referencing|Sub-referencing]], a new feature to re-use references with different details has been released to Swedish Wikipedia, Polish Wikipedia and [[:phab:T418209|a couple of other wikis]]. You can [[:m:Special:MyLanguage/WMDE Technical Wishes/Sub-referencing#test|try the feature]] on these projects or on testwiki and [https://en.wikipedia.beta.wmcloud.org/wiki/Sub-referencing betawiki]. Learnings from the first pilot wiki German Wikipedia have been [[:m:Special:MyLanguage/WMDE Technical Wishes/Sub-referencing/Learnings|published in a report]]. Reach out to the Wikimedia Deutschland team if you are [[:m:Talk:WMDE Technical Wishes/Sub-referencing#Pilot wikis|interested in becoming a pilot wiki]].
* [[mw:Special:MyLanguage/Help:Edit check#Paste check|Paste Check]] will become available at all Wikipedias this week. The feature prompts newcomers who are pasting text they are not likely to have written into VisualEditor to consider whether doing so risks a copyright violation. Paste Check [[mw:Special:MyLanguage/Edit check/Tags|tags]] all edits where it is shown for potential review. Local administrators can configure various aspects of the feature via [[{{#special:EditChecks}}]]. [[mw:Special:MyLanguage/Edit check/Paste Check#A/B Experiment|Research]] across 22 wikis found that Paste Check resulted in an 18% decrease in relative reverted-edits compared to the control group. Translators can [https://translatewiki.net/w/i.php?title=Special%3ATranslate&group=ext-visualeditor-ve-mw-editcheck&filter=&optional=1&action=translate help to localize] this and related features.
* The [[mw:Special:MyLanguage/Readers/Reader Experience|Reader Experience team]] will be standardizing the user menu in the top right for all mobile users so that it is closer to the desktop experience. Currently this user menu is only visible to users with Advanced Mobile Controls (AMC) turned on. The only change is that a couple buttons previously in the left-side menu will move to the top right for users who do not have AMC turned on. This change is expected to go out March 9 and seeks to improve the user interface. [https://phabricator.wikimedia.org/T413912]
* Starting in the week of March 2, the emails sent out when an email address was added, removed, or changed for an account will switch to a substantially nicer and clearer HTML email from the prior plaintext one. [https://phabricator.wikimedia.org/T410807]
* Notifications are currently limited to 2,000 historic entries per user, and extend back to 2013 when the feature was released. This is going to be changed to only store Notifications from the last 5 years, but up to 10,000 of them. This will help with long-term infrastructure health and help to prevent more recent notifications from disappearing too soon. [https://phabricator.wikimedia.org/T383948]
* The [[m:Special:GlobalWatchlist|Global Watchlist]] which lets you view your watchlists from multiple wikis on a single page continues to see improvements. The latest update improves label usage experience. The [[mw:Special:MyLanguage/Extension:GlobalWatchlist|extension]] now allows activating the [[mw:Special:MyLanguage/Manual:Language#Fallback languages|language fallback system]] for Wikidata items without labels in the viewed language, and showing those labels in the user’s preferred Wikidata language if no <code dir=ltr>uselang=</code> URL parameter is provided. [https://phabricator.wikimedia.org/T373686][https://phabricator.wikimedia.org/T416111]
* The Wikipedia Android team has started a beta test of [[mw:Special:MyLanguage/Readers/Information Retrieval/Phase 1|hybrid search]] on Greek Wikipedia. Hybrid search capabilities can handle both semantic and keyword queries enabling readers to find what they’re looking for directly on Wikipedia more easily.
* For security reasons, members of certain user groups are [[m:Special:MyLanguage/Mandatory two-factor authentication for users with some extended rights|required to have two-factor authentication]] (2FA) enabled. Currently, 2FA is required to use the group, but not to be a member of it. Given that this model still has some vulnerabilities, the situation will [[phab:T418580|gradually change in March]]. Members of these groups will be unable to disable last 2FA method on their account, and it will be impossible to add users without 2FA to these groups. Users will still be able to add new authentication methods or remove them, as long as at least one method is continuously enabled. In the second half of March, users without 2FA will be removed from these groups. This applies to: CentralNotice administrators, checkusers, interface administrators, suppressors, Wikidata staff, Wikifunctions staff, WMF Office IT and WMF Trust & Safety. Nothing will change for other users. See the linked task for deployment schedule. [https://phabricator.wikimedia.org/T418580]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] View all {{formatnum:27}} community-submitted {{PLURAL:27|task|tasks}} that were [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|resolved last week]]. For example, the issue preventing users from creating an instance in [https://www.wikibase.cloud/ Wikibase.cloud] has now been fixed. [https://phabricator.wikimedia.org/T416807]
'''Updates for technical contributors'''
* To help ensure [[mw:Special:MyLanguage/MediaWiki Product Insights/Responsible Reuse|fair use of infrastructure]], over the next month the Wikimedia Foundation will implement global API rate limits across our APIs. In early March, stricter limits will be applied to unidentified requests from outside Toolforge/WMCS and API requests that are made from web browsers. In April, higher limits will be applied to identified traffic. These limits are intentionally set as high as possible to minimise impact on the community. Bots running in Toolforge/WMCS or with the bot user right on any wiki should not be affected for now. However, all developers are advised to follow updated best practices. For more information, see [[mw:Special:MyLanguage/Wikimedia APIs/Rate limits|Wikimedia APIs/Rate limits]].
* The Wikidata Query Service Linked Data Fragment (LDF) endpoint will be decommissioned in February. This endpoint served limited traffic, which was successfully migrated to other data access methods that were better suited to support existing use cases. The hardware used to support the LDF endpoint will be reallocated to support the ongoing backend migration efforts. [https://phabricator.wikimedia.org/T415696]
* The new Parsoid parser [[mw:Special:MyLanguage/Parsoid/Parser Unification/Updates|continues to be deployed to additional wikis]], improving platform sustainability and making it easier to introduce new reading and editing features. Parsoid is now the default parser on 488 WMF wikis (268 Wikipedias), now covering more than 10% of all Wikipedia page views.
* The process and criteria for [[Special:MyLanguage/Wikimedia Enterprise#Access|requesting exceptional access]] to the high volume feed of the ''Wikimedia Enterprise'' APIs (at no cost for mission-aligned usecases), [[m:Talk:Wikimedia Enterprise#Exceptional access criteria|have now been published]]. This is to provide more thorough and clearer documentation for users.
* [https://techblog.wikimedia.org/ Tech Blog], the blog dedicated to the Wikimedia technical community [https://techblog.wikimedia.org/2026/02/24/a-tech-blog-diff/ will be migrating] to [[diffblog:|Diff]], the community news and event blog. The migration should be complete in April 2026, after which new posts will be accepted for publishing. Readers will be able to access posts – old and new – on the landing page at https://diff.wikimedia.org/techblog.
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] Detailed code updates later this week: [[mw:MediaWiki 1.46/wmf.18|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tech news]]''' prepared by [[m:Special:MyLanguage/Tech/News/Writers|Tech News writers]] and posted by [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Contribute]] • [[m:Special:MyLanguage/Tech/News/2026/10|Translate]] • [[m:Tech|Get help]] • [[m:Talk:Tech/News|Give feedback]] • [[m:Global message delivery/Targets/Tech ambassadors|Subscribe or unsubscribe]].''
</div><section end="technews-2026-W10"/>
</div>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> ১৭:৫২, ২ মার্চ ২০২৬ (ইউটিসি)
<!-- https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30137798-এর তালিকা ব্যবহার করে বার্তাটি ব্যবহারকারী:STei (WMF)@metawiki পাঠিয়েছেন -->
== <span lang="en" dir="ltr">Tech News: 2026-11</span> ==
<div lang="en" dir="ltr">
<section begin="technews-2026-W11"/><div class="plainlinks">
Latest '''[[m:Special:MyLanguage/Tech/News|tech news]]''' from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. [[m:Special:MyLanguage/Tech/News/2026/11|Translations]] are available.
'''Weekly highlight'''
* [[m:Special:MyLanguage/Tech/Server switch|All wikis will be read-only]] for a few minutes on Wednesday, 25 March 2026 at [https://zonestamp.toolforge.org/1774450800 15:00 UTC]. This is for the datacenter server switchover backup tests, [[wikitech:Deployments/Yearly calendar|which happen twice a year]]. During the switchover, all Wikimedia website traffic is shifted from one primary data center to the backup data center to test availability and prevent service disruption even in emergencies.
* Last week, all wikis had 2 hours of read-only time, and extended unavailability for user-scripts and gadgets. This was due to a security incident which has since been resolved. Work is ongoing to prevent re-occurrences. For current information please see the [[m:Steward's noticeboard#Statement on Meta about today's user script security incident|post on the Stewards' noticeboard]] ([[m:Special:MyLanguage/Wikimedia Foundation/Product and Technology/Product Safety and Integrity/March 2026 User Script Incident|translations]]).
'''Updates for editors'''
* Users facing multiple blocks on mobile will now see the reasons for each block separately, instead of a generic message. This helps them understand why they are blocked and what steps they can take to resolve the issue. For example, users affected for using common VPNs (such as [[Special:MyLanguage/Apple iCloud Private Relay|iCloud Private Relay]]) will receive clearer guidance on what they need to do to start editing again. [https://phabricator.wikimedia.org/T357118]
* Later this week, [[mw:Special:MyLanguage/VisualEditor/Suggestion Mode|Suggestion Mode]] will become available as a beta feature within the visual editor at all Wikipedias. This feature proactively suggests various types of actions that people can consider taking to improve Wikipedia articles, and learn about related guidelines. The feature is locally configurable, and can also be locally expanded with custom Suggestions. Current settings can be seen at [[Special:EditChecks]] and there are [[mw:Special:MyLanguage/Help:Suggestion mode#For administrators %E2%80%93 local customization|instructions for how administrators can customize]] the links to point to local guidelines. The feature is connected to [[mw:Special:MyLanguage/Help:Edit check|Edit check]] which suggests improvements while someone is writing new content. In the future, the Editing team plans to evaluate the feature's impact with newcomers through a controlled experiment. [https://phabricator.wikimedia.org/T404600]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] View all {{formatnum:23}} community-submitted {{PLURAL:23|task|tasks}} that were [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|resolved last week]]. For example, the issue where the cursor became misaligned during the use of CodeMirror’s syntax highlighting, which makes wikitext and code easier to read, has now been fixed. This problem specifically affected users who defined a font rule in a custom stylesheet while creating a new topic with DiscussionTools. [https://phabricator.wikimedia.org/T418793]
'''Updates for technical contributors'''
* API rate limiting update: To help ensure [[mw:Special:MyLanguage/MediaWiki Product Insights/Responsible Reuse|fair use of infrastructure]], global API rate limits will be applied this week to requests without a compliant User-Agent that originate from outside Toolforge/WMCS and to unauthenticated requests made from web browsers. Higher limits will be applied to identified traffic in April. Bots running in Toolforge/WMCS or with the bot user right on any wiki should not be affected for now. However, all developers are advised to follow updated best practices. For more information, see [[mw:Special:MyLanguage/Wikimedia APIs/Rate limits|Wikimedia APIs/Rate limits]].
* The new GraphQL API has been released. The API was developed as a flexible alternative to select features of the Wikidata Query Service (WDQS), to improve developer experience and foster adaptability, and efficient data access. Try it out and [[d:Wikidata:Wikibase GraphQL#Feedback and development|give feedback]]. You can also [https://greatquestion.co/wikimediadeutschland/GraphQLAPI/apply sign up for usability tests].
* The [[m:Special:MyLanguage/Product and Technology Advisory Council/Unsupported Tools Working Group|PTAC Unsupported Tools Working Group]] continued improvements to [[commons:Special:MyLanguage/Commons:Video2commons#|Video2Commons]] in February, with fixes addressing authentication errors, large-file handling, task queue visibility, and clearer upload behavior. Work is still ongoing in some areas, including changes related to deprecated server-side uploads. Read [[m:Special:MyLanguage/Product and Technology Advisory Council/Unsupported Tools Working Group#February 2026|this update]] to learn more.
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] Detailed code updates later this week: [[mw:MediaWiki 1.46/wmf.19|MediaWiki]]
'''In depth'''
* The Article Guidance team invites experienced Wikipedia editors from selected [[mw:Special:MyLanguage/Article guidance/Pilot wikis and collaborators#Collaborators|pilot wikis]] and interested contributors from other Wikipedias to fill out this questionnaire which is available in [https://docs.google.com/forms/d/e/1FAIpQLSfmLeVWnxmsCbPoI_UF2jyRcn73WRGWCVPHzerXb4Cz97X_Ag/viewform English], [https://docs.google.com/forms/d/e/1FAIpQLSd6rzr4XXQw8r4024fE3geTPFe13M_6w7Mitj-YJi0sOlWTAw/viewform?usp=header Arabic], [https://docs.google.com/forms/d/e/1FAIpQLSdok3-RfB18lcugYTUMGkpwmqG_8p760Wv4dCXitOXOszjUDw/viewform?usp=header Bengali], [https://docs.google.com/forms/d/e/1FAIpQLSfjTfYp4jEo0akA4B1e-Nfg3QZPCudUjhJzHzzDi6AHyAaMGA/viewform?usp=header Japanese], [https://docs.google.com/forms/d/e/1FAIpQLScteVoI29Aue4xc72dekk-6RYtvmMgQxzMI900UOawrFrSTWg/viewform?usp=header Portuguese], [https://docs.google.com/forms/d/e/1FAIpQLSetdxnYwL3ub2vqA7awCg5hJZPMIYcDPaiTe12rY9h0GYnVlw/viewform?usp=header Persian], and [https://docs.google.com/forms/d/e/1FAIpQLScNvfJF-Ot-4pzA4qAN771_0QDJ4Li19YcUsaTgSKW8Nc7U_Q/viewform?usp=header Turkish]. Your answers will help the team customize guidance for less experienced editors and help them learn community policies and practices while creating an article. Learn more [[mw:Special:MyLanguage/Article guidance|on the project page]].
'''''[[m:Special:MyLanguage/Tech/News|Tech news]]''' prepared by [[m:Special:MyLanguage/Tech/News/Writers|Tech News writers]] and posted by [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Contribute]] • [[m:Special:MyLanguage/Tech/News/2026/11|Translate]] • [[m:Tech|Get help]] • [[m:Talk:Tech/News|Give feedback]] • [[m:Global message delivery/Targets/Tech ambassadors|Subscribe or unsubscribe]].''
</div><section end="technews-2026-W11"/>
</div>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> ১৮:৫৩, ৯ মার্চ ২০২৬ (ইউটিসি)
<!-- https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30213008-এর তালিকা ব্যবহার করে বার্তাটি ব্যবহারকারী:STei (WMF)@metawiki পাঠিয়েছেন -->
== <span lang="en" dir="ltr">Tech News: 2026-12</span> ==
<div lang="en" dir="ltr">
<section begin="technews-2026-W12"/><div class="plainlinks">
Latest '''[[m:Special:MyLanguage/Tech/News|tech news]]''' from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. [[m:Special:MyLanguage/Tech/News/2026/12|Translations]] are available.
'''Updates for editors'''
* The [[mw:Special:MyLanguage/Help:Extension:CodeMirror|{{int:codemirror-beta-feature-title}}]] beta feature, also known as [[mw:Special:MyLanguage/Extension:CodeMirror|CodeMirror 6]], has been used for wikitext syntax highlighting since November 2024. It will be promoted out of beta by May 2026 in order to bring improvements and new [[mw:Special:MyLanguage/Help:Extension:CodeMirror#Features|features]] to all editors who use the standard syntax highlighter. If you have any questions or concerns about promoting the feature out of beta, [[mw:Special:MyLanguage/Help talk:Extension:CodeMirror|please share]]. [https://phabricator.wikimedia.org/T259059]
* Some changes to local user groups are performed by stewards on Meta-Wiki and logged there only. Now, interwiki rights changes will be logged both on Meta-Wiki and the wiki of the target user to make it easier to access a full record of user's rights changes on a local wiki. Past log entries for such changes will be backfilled in the coming weeks. [https://phabricator.wikimedia.org/T6055]
* On wikis using [[m:Special:MyLanguage/Flagged Revisions|Flagged Revisions]], the number of pending changes shown on [[{{#Special:PendingChanges}}]] previously counted pages which were no longer pending review, because they have been removed from the system without being reviewed, e.g. due to being deleted, moved to a different namespace, or due to wiki configuration changes. The count will be correct now. On some wikis the number shown will be much smaller than before. There should be no change to the list of pages itself. [https://phabricator.wikimedia.org/T413016]
* Wikifunctions composition language has been rewritten, resulting in a new version of the language. This change aims to increase service stability by reducing the orchestrator's memory consumption. This rewrite also enables substantial latency reduction, code simplification, and better abstractions, which will open the door to later feature additions. Read more about [[f:Special:MyLanguage/Wikifunctions:Status updates/2026-03-11|the changes]].
* Users can now sort search results alphabetically by page title. The update gives an additional option to finding pages more easily and quickly. Previously, results could be sorted by Edit date, Creation date, or Relevance. To use the new option, open 'Advanced Search' on the search results page and select 'Alphabetically' under 'Sorting Order'. [https://phabricator.wikimedia.org/T403775]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] View all {{formatnum:28}} community-submitted {{PLURAL:28|task|tasks}} that were [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|resolved last week]]. For example, the bug that prevented UploadWizard on Wikimedia Commons from importing files from Flickr has now been fixed. [https://phabricator.wikimedia.org/T419263]
'''Updates for technical contributors'''
* A new special page, [[{{#special:LintTemplateErrors}}]], has been created to list transcluded pages that are flagged as containing lint errors to help users discover them easily. The list is sorted by the number of transclusions with errors. For example: [[{{#special:LintTemplateErrors}}/night-mode-unaware-background-color]]. [https://phabricator.wikimedia.org/T170874]
* Users of the [[mw:Special:MyLanguage/Help:Extension:CodeMirror|{{int:codemirror-beta-feature-title}}]] beta feature have been using [[mw:Special:MyLanguage/Extension:CodeMirror|CodeMirror]] instead of [[mw:Special:MyLanguage/Extension:CodeEditor|CodeEditor]] for syntax highlighting when editing JavaScript, CSS, JSON, Vue and Lua content pages, for some time now. Along with promoting CodeMirror 6 out of beta, the plan is to replace CodeEditor as the standard editor for these content models by May 2026. [[mw:Special:MyLanguage/Help talk:Extension:CodeMirror|Feedback or concerns are welcome]]. [https://phabricator.wikimedia.org/T419332]
* The [[mw:Special:MyLanguage/Extension:CodeMirror|CodeMirror]] JavaScript modules will soon be upgraded to CodeMirror 6. Leading up to the upgrade, loading the <code dir=ltr>ext.CodeMirror</code> or <code dir=ltr>ext.CodeMirror.lib</code> modules from gadgets and user scripts was deprecated in July 2025. The use of the <code dir=ltr>ext.CodeMirror.switch</code> hook was also deprecated in March 2025. Contributors can now make their scripts or gadgets compatible with CodeMirror 6. See the [[mw:Special:MyLanguage/Extension:CodeMirror#Gadgets and user scripts|migration guide]] for more information. [https://phabricator.wikimedia.org/T373720]
* The MediaWiki Interfaces team is expanding coverage of REST API module definitions to include [[mw:Special:MyLanguage/API:REST API/Extensions|extension APIs]]. REST API modules are groups of related endpoints that can be independently managed and versioned. Modules now exist for [https://phabricator.wikimedia.org/T414470 GrowthExperiments] and [https://phabricator.wikimedia.org/T419053 Wikifunctions] APIs. As we migrate extension APIs to this structure, documentation will move out of the main MediaWiki OpenAPI spec and REST Sandbox view, and will instead be accessible via module-specific options in the dropdown on the [https://test.wikipedia.org/wiki/Special:RestSandbox REST Sandbox] (i.e., [[{{#Special:RestSandbox}}]], available on all wiki projects).
* The [[mw:Special:MyLanguage/Extension:Scribunto|Scribunto]] extension provides different pieces of information about the wiki where the module is being used via the [[mw:Special:MyLanguage/Extension:Scribunto/Lua reference manual|mw.site]] library. Starting last week, the library also provides a [[mw:Special:MyLanguage/Extension:Scribunto/Lua reference manual#mw.site.wikiId|way]] of accessing the [[mw:Special:MyLanguage/Manual:Wiki ID|wiki ID]] that can be used to facilitate cross-wiki module maintenance. [https://phabricator.wikimedia.org/T146616]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] Detailed code updates later this week: [[mw:MediaWiki 1.46/wmf.20|MediaWiki]]
'''In depth'''
* The [[m:Special:MyLanguage/Coolest Tool Award|2026 Coolest Tool Award]] celebrating outstanding community tools, is now open for nominations! Nominate your favorite tool using the [https://wikimediafoundation.limesurvey.net/435684?lang=en nomination survey] form by 23 March 2026. For more information on privacy and data handling, please see the [[foundation:Special:MyLanguage/Legal:Coolest_Tool_Award_2026_Survey_Privacy_Statement|survey privacy statement]].
'''''[[m:Special:MyLanguage/Tech/News|Tech news]]''' prepared by [[m:Special:MyLanguage/Tech/News/Writers|Tech News writers]] and posted by [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Contribute]] • [[m:Special:MyLanguage/Tech/News/2026/12|Translate]] • [[m:Tech|Get help]] • [[m:Talk:Tech/News|Give feedback]] • [[m:Global message delivery/Targets/Tech ambassadors|Subscribe or unsubscribe]].''
</div><section end="technews-2026-W12"/>
</div>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> ১৯:৩৬, ১৬ মার্চ ২০২৬ (ইউটিসি)
<!-- https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30260505-এর তালিকা ব্যবহার করে বার্তাটি ব্যবহারকারী:STei (WMF)@metawiki পাঠিয়েছেন -->
== <span lang="en" dir="ltr">Tech News: 2026-13</span> ==
<div lang="en" dir="ltr">
<section begin="technews-2026-W13"/><div class="plainlinks">
Latest '''[[m:Special:MyLanguage/Tech/News|tech news]]''' from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. [[m:Special:MyLanguage/Tech/News/2026/13|Translations]] are available.
'''Weekly highlight'''
* Wikimedia site users can now log in without a password using passkeys. This is a secure method supported by fingerprint, facial recognition, or PIN. With this change, all users who opt for passwordless login will find it easier, faster, and more secure to log in to their accounts using any device. The new passkey login option currently appears as an autofill suggestion in the username field. An additional [[phab:T417120|"Log in with passkey" button]] will soon be available for users who have already registered a passkey. This update will improve security and user experience. The [[c:File:Passwordless_login_screencast.webm|screen recording]] demonstrates the passwordless login process step by step.
* [[m:Special:MyLanguage/Tech/Server switch|All wikis will be read-only]] for a few minutes on Wednesday, 25 March 2026 at [https://zonestamp.toolforge.org/1774450800 15:00 UTC]. This is for the datacenter server switchover backup tests, [[wikitech:Deployments/Yearly calendar|which happen twice a year]]. During the switchover, all Wikimedia website traffic is shifted from one primary data center to the backup data center to test availability and prevent service disruption even in emergencies.
'''Updates for editors'''
* Wikimedia site users can now export their notifications older than 5 years using a [[toolforge:echo-chamber|new Toolforge tool]]. This will ensure that users retain their important notifications and avoid them being lost based on the planned change to delete notifications older than 5 years, as previously announced. [https://phabricator.wikimedia.org/T383948]
* Wikipedia editors in Indonesian, Thai, Turkish, and Simple English now have access to Special:PersonalDashboard. This is an [[mw:Special:MyLanguage/Moderator Tools/Dashboard|early version of an experience]] that introduces newer editors to patrolling workflows, making it easier for them to move from making edits to participating in more advanced moderation work on their project. [https://phabricator.wikimedia.org/T402647]
* The [[Special:Block]] now has two minor interface changes. Administrators can now easily perform indefinite blocks through a dedicated radio button in the expiry section. Also, choosing an indefinite expiry provides a different set of common reasons to select from, which can be changed at: [[MediaWiki:Ipbreason-indef-dropdown]]. [https://phabricator.wikimedia.org/T401823]
* Mobile editors [[mw:Special:MyLanguage/Contributors/Account Creation Experiments#Logged-out|at several wikis]] can now see an improved logged-out edit warning, thanks to the recent updates from the Growth team. These changes released last week are part of ongoing efforts and tests to enhance [[mw:Special:MyLanguage/Contributors/Account Creation Experiments|account creation experience on mobile]] and then increase participation. [https://phabricator.wikimedia.org/T408484]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] View all {{formatnum:36}} community-submitted {{PLURAL:36|task|tasks}} that were [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|resolved last week]]. For example, the bug that prevented mobile web users from seeing the block information when affected by multiple blocks has been fixed. They can now see messages of all the blocks currently affecting them when they access Wikipedia.
'''Updates for technical contributors'''
* Images built using Toolforge will soon get the upgraded buildpacks version, bringing support for newer language versions and other upstream improvements and fixes. If you use Toolforge Build Service, review the recent [https://lists.wikimedia.org/hyperkitty/list/cloud-announce@lists.wikimedia.org/thread/EMYTA32EV2V5SQ2JIEOD2CL66YFIZEKV/ cloud-announce email] and update your build configuration as necessary to ensure your tools are compatible. [https://wikitech.wikimedia.org/w/index.php?title=Help:Toolforge/Building_container_images&oldid=2392097#Buildpack_environment_upgrade_process][https://phabricator.wikimedia.org/T380127]
* The [https://api.wikimedia.org/wiki/Main_Page API Portal] documentation wiki will shut down in June 2026. API keys created on the API Portal will continue to work normally. api.wikimedia.org endpoints will be deprecated gradually starting in July 2026. Documentation on the API Portal is moving to [[mw:Wikimedia APIs|mediawiki.org]]. Learn more on the [[wikitech:API Portal/Deprecation|project page]].
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] Detailed code updates later this week: [[mw:MediaWiki 1.46/wmf.21|MediaWiki]]
'''In depth'''
* [[m:Special:MyLanguage/WMDE Technical Wishes|WMDE Technical Wishes]] is considering improvements to [[m:WMDE Technical Wishes/References/VisualEditor automatic reference names|automatically generated reference names in VisualEditor]]. Please check out the [[m:WMDE Technical Wishes/References/VisualEditor automatic reference names#Proposed solutions|proposed solutions]] and participate in the [[m:Talk:WMDE Technical Wishes/References/VisualEditor automatic reference names#Request for comment|request for comment]].
'''''[[m:Special:MyLanguage/Tech/News|Tech news]]''' prepared by [[m:Special:MyLanguage/Tech/News/Writers|Tech News writers]] and posted by [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Contribute]] • [[m:Special:MyLanguage/Tech/News/2026/13|Translate]] • [[m:Tech|Get help]] • [[m:Talk:Tech/News|Give feedback]] • [[m:Global message delivery/Targets/Tech ambassadors|Subscribe or unsubscribe]].''
</div><section end="technews-2026-W13"/>
</div>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> ১৬:৫১, ২৩ মার্চ ২০২৬ (ইউটিসি)
<!-- https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30268305-এর তালিকা ব্যবহার করে বার্তাটি ব্যবহারকারী:UOzurumba (WMF)@metawiki পাঠিয়েছেন -->
== <span lang="en" dir="ltr">Tech News: 2026-14</span> ==
<div lang="en" dir="ltr">
<section begin="technews-2026-W14"/><div class="plainlinks">
Latest '''[[m:Special:MyLanguage/Tech/News|tech news]]''' from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. [[m:Special:MyLanguage/Tech/News/2026/14|Translations]] are available.
'''Weekly highlight'''
* The Beta version of [[abstract:|Abstract Wikipedia]] a new Wikimedia project which is language-independent, was launched last week. The project allows communities to build Wikipedia articles in their native language, which can be readily accessed by other users in their own languages. The wiki is powered by instructions from Wikifunctions and also based on structured content from Wikidata. [[:f:Special:MyLanguage/Wikifunctions:Status updates/2026-03-26|Read more]].
'''Updates for editors'''
* The Growth team is running an A/B test to evaluate a clearer, more user-friendly message that promotes account creation on wikis. Currently when logged-out mobile users begin editing, they see a jarring warning message that can feel abrupt and discouraging. This also presents temporary account editing as the default rather than encouraging account creation. The test is running on ten Wikipedias, including Arabic, French, Spanish and German. [[mw:Special:MyLanguage/Contributors/Account Creation Experiments#2. Improve logged-out warning message (T415160)|Read more]].
* The Wikimedia Apps team is inviting feedback on [[mw:Special:MyLanguage/Wikimedia Apps/Team/Future of Editing on the Mobile Apps|how editing should work on the Wikipedia mobile apps]]. The discussion focuses on improving how users access editing tools when they tap "Edit". This is part of a broader effort to convert readers who develop an interest in editing, to access a more user-friendly pathway to start contributing.
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] View all {{formatnum:45}} community-submitted {{PLURAL:45|task|tasks}} that were [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|resolved last week]]. For example, an issue where citation fetching from the large newspaper archive [https://www.newspapers.com Newspapers.com] was no longer working, due to a block in [[mw:Special:MyLanguage/Citoid|Citoid]] requests, has now been fixed. [https://phabricator.wikimedia.org/T419903]
'''Updates for technical contributors'''
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] Detailed code updates later this week: [[mw:MediaWiki 1.46/wmf.22|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tech news]]''' prepared by [[m:Special:MyLanguage/Tech/News/Writers|Tech News writers]] and posted by [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Contribute]] • [[m:Special:MyLanguage/Tech/News/2026/14|Translate]] • [[m:Tech|Get help]] • [[m:Talk:Tech/News|Give feedback]] • [[m:Global message delivery/Targets/Tech ambassadors|Subscribe or unsubscribe]].''
</div><section end="technews-2026-W14"/>
</div>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> ১৯:২৬, ৩০ মার্চ ২০২৬ (ইউটিসি)
<!-- https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30329462-এর তালিকা ব্যবহার করে বার্তাটি ব্যবহারকারী:STei (WMF)@metawiki পাঠিয়েছেন -->
== <span lang="en" dir="ltr">Tech News: 2026-15</span> ==
<div lang="en" dir="ltr">
<section begin="technews-2026-W15"/><div class="plainlinks">
Latest '''[[m:Special:MyLanguage/Tech/News|tech news]]''' from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. [[m:Special:MyLanguage/Tech/News/2026/15|Translations]] are available.
'''Updates for editors'''
* The [[mw:Special:MyLanguage/Help:Extension:CampaignEvents|CampaignEvents extension]] now includes a new group goal-setting feature, enabling organizers to set and track event goals such as the number of articles created and participating contributors in real time. Similarly, participants can work toward shared targets and see their collective impact as the event unfolds. The feature is now available on all Wikimedia wikis. Learn more in [[mw:Special:MyLanguage/Help:Extension:CampaignEvents/Registration/Collaborative contributions#Goal setting|the documentation]].
* [[File:Maki-gift-15.svg|12px|link=|class=skin-invert|Wishlist item]] The new [[mw:Special:MyLanguage/Help:Watchlist labels|watchlist labels]] feature (announced in [[m:Special:MyLanguage/Tech/News/2026/07|Tech News 2026-07]]) is now available via VisualEditor, the source editor, and the 'watchstar' (or watch link, for skins that don't have a star icon). Previously it was only possible to assign labels via [[Special:EditWatchlist|EditWatchlist]]. In all three places it is a new field following the expiry field.
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] View all {{formatnum:23}} community-submitted {{PLURAL:23|task|tasks}} that were [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|resolved last week]]. For example, the issue where talk pages on mobile with Parsoid are unusable after empty section headers, has now been fixed. [https://phabricator.wikimedia.org/T419171]
'''Updates for technical contributors'''
* The [[m:Special:MyLanguage/WMDE Technical Wishes/Sub-referencing|sub-referencing feature]], which lets editors add details to an existing reference without duplicating it, will be gradually rolled out to [[phab:T414094|more wikis]] later this year. Wikis using the [[mw:Special:MyLanguage/Reference Tooltips|Reference Tooltips]] gadget are encouraged to update their version (typically at [[m:MediaWiki:Gadget-ReferenceTooltips.js|MediaWiki:Gadget-ReferenceTooltips.js]] as shown [https://en.wikipedia.org/w/index.php?diff=1344408362 here]) to ensure compatibility. Other reference-related gadgets may also be affected. [https://phabricator.wikimedia.org/T416304]
* All Wikinews editions will be closed and switched to read-only mode on 4 May 2026. Content will remain accessible, but no new edits or articles can be added. This closure was approved by the Board of Trustees of the Wikimedia Foundation following extended discussions. [[m:Wikimedia Foundation Board noticeboard#Board of Trustees Approves Closure of Wikinews|Read more]].
* The [[:mw:Special:MyLanguage/API:Action API|Action API]] has had several formats for requested output. One of them, <bdi lang="zxx" dir="ltr"><code><nowiki>format=php</nowiki></code></bdi>, is being removed soon. Please ensure your scripts or bots use the [[mw:Special:MyLanguage/API:Data formats#Output|JSON format]]. This removal should affect very few scripts and bots. [https://phabricator.wikimedia.org/T118538]
* The [[Special:NamespaceInfo|Special:NamespaceInfo]] page now includes namespace aliases. For example "WP" for the "Project" ("Wikipedia") namespace on the German Wikipedia. [https://phabricator.wikimedia.org/T381455]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] Detailed code updates later this week: [[mw:MediaWiki 1.46/wmf.23|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tech news]]''' prepared by [[m:Special:MyLanguage/Tech/News/Writers|Tech News writers]] and posted by [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Contribute]] • [[m:Special:MyLanguage/Tech/News/2026/15|Translate]] • [[m:Tech|Get help]] • [[m:Talk:Tech/News|Give feedback]] • [[m:Global message delivery/Targets/Tech ambassadors|Subscribe or unsubscribe]].''
</div><section end="technews-2026-W15"/>
</div>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> ১৬:১৯, ৬ এপ্রিল ২০২৬ (ইউটিসি)
<!-- https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30362761-এর তালিকা ব্যবহার করে বার্তাটি ব্যবহারকারী:STei (WMF)@metawiki পাঠিয়েছেন -->
== <span lang="en" dir="ltr">Tech News: 2026-16</span> ==
<div lang="en" dir="ltr">
<section begin="technews-2026-W16"/><div class="plainlinks">
Latest '''[[m:Special:MyLanguage/Tech/News|tech news]]''' from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. [[m:Special:MyLanguage/Tech/News/2026/16|Translations]] are available.
'''Weekly highlight'''
* Experienced editors are invited to [https://b24e11a4f1.catalyst.wmcloud.org/wiki/Main_Page test] the [[mw:Special:MyLanguage/Article guidance|Article guidance]] feature, designed to help less-experienced editors create well-structured, policy-compliant Wikipedia articles. Testing instructions are [[mw:Special:MyLanguage/Article guidance/Test feature guide|available]]. Also, after reviewing [https://b24e11a4f1.catalyst.wmcloud.org/wiki/Category:Pages_using_article_guidance the outlines], please provide feedback on the [[mw:Talk:Article guidance|project talk page]]. Based on your input, the feature will be refined and transferred to the pilot Wikipedias to translate and adapt. Check out [[c:File:Article Guidance workflow demo - April 2026.webm|the video]] explaining the feature.
'''Updates for editors'''
* On most wikis, all autoconfirmed users can now use [[Special:ChangeContentModel|Special:ChangeContentModel]] page to [[mw:Special:MyLanguage/Help:ChangeContentModel|create new pages with custom content models]], such as mass message lists, making custom page formats more accessible. Check [[Special:ListGroupRights|Special:ListGroupRights]] for the status of your wiki. [https://phabricator.wikimedia.org/T248294]
* The Growth team has launched an [[mw:Special:MyLanguage/Contributors/Account_Creation_Experiments|account creation experiment]] to evaluate whether adding an account creation button to the mobile web header increases new account registrations and encourages more mobile users to contribute to the wikis. The experiment is currently live on Hindi, Indonesian, Bengali, Thai, and Hebrew Wikipedia, and targets 10% of logged-out mobile web users.
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] View all {{formatnum:30}} community-submitted {{PLURAL:30|task|tasks}} that were [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|resolved last week]]. For example, an issue where VisualEditor could get stuck loading on Windows devices with animations turned off, has now been fixed. [https://phabricator.wikimedia.org/T382856]
'''Updates for technical contributors'''
* Starting later this week, {{int:group-abusefilter}} who have the [[mw:Special:MyLanguage/Help:Extension:CodeMirror|{{int:codemirror-beta-feature-title}}]] beta feature enabled will have [[mw:Special:MyLanguage/Extension:CodeMirror|CodeMirror]] instead of [[mw:Special:MyLanguage/Extension:CodeEditor|CodeEditor]] as the editor at [[Special:AbuseFilter|Special:AbuseFilter]]. This is part of the broader effort to make the user experience more consistent across all editors. [https://phabricator.wikimedia.org/T399673][https://phabricator.wikimedia.org/T419332]
* Tools and bots that access the [[mw:Special:MyLanguage/Notifications/API|Notifications API]] (<bdi lang="zxx" dir="ltr"><code><nowiki>action=query&meta=notifications</nowiki></code></bdi>) will need to update their OAuth or BotPassword grants to also include access to private notifications. [https://phabricator.wikimedia.org/T421991]
* Due to a library upgrade, listings on category pages may be displayed out of order starting on Monday, 20th April. A migration script will be run to correct this, and will take hours to days depending on the size of the wiki (up to a week for English Wikipedia). [https://phabricator.wikimedia.org/T422544]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] Detailed code updates later this week: [[mw:MediaWiki 1.46/wmf.24|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tech news]]''' prepared by [[m:Special:MyLanguage/Tech/News/Writers|Tech News writers]] and posted by [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Contribute]] • [[m:Special:MyLanguage/Tech/News/2026/16|Translate]] • [[m:Tech|Get help]] • [[m:Talk:Tech/News|Give feedback]] • [[m:Global message delivery/Targets/Tech ambassadors|Subscribe or unsubscribe]].''
</div><section end="technews-2026-W16"/>
</div>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> ১৫:১৯, ১৩ এপ্রিল ২০২৬ (ইউটিসি)
<!-- https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30380527-এর তালিকা ব্যবহার করে বার্তাটি ব্যবহারকারী:STei (WMF)@metawiki পাঠিয়েছেন -->
== <span lang="en" dir="ltr">Tech News: 2026-17</span> ==
<div lang="en" dir="ltr">
<section begin="technews-2026-W17"/><div class="plainlinks">
Latest '''[[m:Special:MyLanguage/Tech/News|tech news]]''' from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. [[m:Special:MyLanguage/Tech/News/2026/17|Translations]] are available.
'''Weekly highlight'''
* After two years of development, [[mw:Special:MyLanguage/Help:Extension:CodeMirror|{{int:codemirror-beta-feature-title}}]], also known as [[mw:Special:MyLanguage/Extension:CodeMirror|CodeMirror 6]], is to be promoted out of beta on Tuesday, April 21. It brings better code and wikitext readability, reduction in typing errors, and other [[mw:Special:MyLanguage/Help:Extension:CodeMirror|benefits]] to all users of the standard syntax highlighter. A huge thank you to volunteer [https://phabricator.wikimedia.org/p/Bhsd/ Bhsd] who developed many of the new features, including [[mw:Special:MyLanguage/Help:Extension:CodeMirror#Code folding|code folding]], [[mw:Special:MyLanguage/Help:Extension:CodeMirror#Autocompletion|autocompletion]], and [[mw:Special:MyLanguage/Help:Extension:CodeMirror#Linting|linting]]. [https://phabricator.wikimedia.org/T259059]
* A major update to the Wikipedia app for iOS is now rolling out, redesigning the interface to align with Apple's latest "Liquid Glass" visual design. [https://apps.apple.com/us/app/wikipedia/id324715238 Download the latest version] and explore the update.
'''Updates for editors'''
* [[mw:Special:MyLanguage/Readers/Reader Experience/WE3.3.4 Reading lists|Reading lists]] is a feature which allows readers to save articles to a list for reading later. This feature is now in beta on Arabic, French, Indonesian, Vietnamese, and Chinese Wikipedias and by default for all new accounts on all Wikipedias.
* An experiment which explores extending [[mw:Special:MyLanguage/Readers/Reader Growth/Mobile page previews|Page Previews to mobile web]] will be launched in the week of April 20 on Arabic, English, French, Italian, Polish, and Vietnamese Wikipedias. Page Previews are pop-ups that display a thumbnail, lead paragraph, and a link to open the full article of a blue link, thereby improving content discovery. The feature is already available on desktop and in the apps. [[m:Special:MyLanguage/List of experiments in Product and Technology#Template|Read more about this experiment and others]].
* On several wikis, logged-in editors who haven't [[mw:Special:MyLanguage/Help:Email confirmation|confirmed their email addresses]] can now see a banner encouraging them to do so. Having the email address confirmed allows a user to restore access to the account if they lose it. [[mw:Special:MyLanguage/Product Safety and Integrity/Account Security#Encouraging users to confirm their email addresses|Learn more]]. [https://phabricator.wikimedia.org/T421366]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] View all {{formatnum:15}} community-submitted {{PLURAL:15|task|tasks}} that were [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|resolved last week]]. For example, an issue where editing very large wiki pages in the 2017 wikitext editor caused slow loading, preview and scrolling lag, and performance issues when selecting, cutting, or pasting content, has now been fixed. [https://phabricator.wikimedia.org/T184857]
'''Updates for technical contributors'''
* As part of the promotion of [[mw:Special:MyLanguage/Help:Extension:CodeMirror|CodeMirror]] from a beta feature, all users will use [[mw:Special:MyLanguage/Extension:CodeMirror|CodeMirror]] instead of [[mw:Special:MyLanguage/Extension:CodeEditor|CodeEditor]] for syntax highlighting when editing JavaScript, CSS, JSON, Vue and Lua content pages. [https://phabricator.wikimedia.org/T419332]
* The <code>mirrors.wikimedia.org</code> service for Debian and Ubuntu users will sunset and stop working on May 15. The resources for the service will be replaced with new and better options. Some users may need to switch to a different server which should take about a minute. [https://lists.wikimedia.org/hyperkitty/list/wikitech-l@lists.wikimedia.org/thread/LJYRIS4WB66HIRCAO4GIDTXCMDVZRBMA/ You can read more]. [https://phabricator.wikimedia.org/T416707]
* The <bdi lang="zxx" dir="ltr"><code><nowiki>image</nowiki></code></bdi> and <bdi lang="zxx" dir="ltr"><code><nowiki>oldimage</nowiki></code></bdi> table will be removed from [[wikitech:Help:Wiki Replicas|wikireplicas]]. If your tools or queries access <bdi lang="zxx" dir="ltr"><code><nowiki>image</nowiki></code></bdi> or <bdi lang="zxx" dir="ltr"><code><nowiki>oldimage</nowiki></code></bdi> directly, please update them to use the <bdi lang="zxx" dir="ltr"><code><nowiki>file</nowiki></code></bdi> and <bdi lang="zxx" dir="ltr"><code><nowiki>filerevision</nowiki></code></bdi> table before 28 May. [https://phabricator.wikimedia.org/T28741]
* Following the recent implementation of global API rate limits on unidentified traffic, the Wikimedia Foundation will continue efforts to ensure [[mw:Special:MyLanguage/MediaWiki Product Insights/Responsible Reuse|fair use of infrastructure]] by applying global limits to identified API traffic beginning the last week of April. These limits are intentionally set as high as possible to minimise impact on the community. Bots running in Toolforge/WMCS or with the bot user right on any wiki should not be affected for now. However, all developers are advised to follow updated best practices. For more information, see [[mw:Special:MyLanguage/Wikimedia APIs/Rate limits|Wikimedia APIs/Rate limits]] and [[mw:Special:MyLanguage/Wikimedia APIs/Rate limits/FAQ|Frequently Asked Questions]].
* The [[mw:Special:MyLanguage/Attribution API|Attribution API]] is now available as a [[mw:Special:MyLanguage/Wikimedia APIs/Stability policy|beta]]. The API fetches information for crediting Wikimedia articles and media files wherever they are used. Reference documentation is available through the REST Sandbox special page available on all Wikimedia wikis (such as the [https://en.wikipedia.org/w/index.php?api=attribution.v0-beta&title=Special%3ARestSandbox REST sandbox on English Wikipedia]). Share your feedback on the [[mw:Talk:Attribution API|project talk page]].
* There is no new MediaWiki version this week.
'''''[[m:Special:MyLanguage/Tech/News|Tech news]]''' prepared by [[m:Special:MyLanguage/Tech/News/Writers|Tech News writers]] and posted by [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Contribute]] • [[m:Special:MyLanguage/Tech/News/2026/17|Translate]] • [[m:Tech|Get help]] • [[m:Talk:Tech/News|Give feedback]] • [[m:Global message delivery/Targets/Tech ambassadors|Subscribe or unsubscribe]].''
</div><section end="technews-2026-W17"/>
</div>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> ১৫:০১, ২০ এপ্রিল ২০২৬ (ইউটিসি)
<!-- https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30432763-এর তালিকা ব্যবহার করে বার্তাটি ব্যবহারকারী:STei (WMF)@metawiki পাঠিয়েছেন -->
== <span lang="en" dir="ltr">Tech News: 2026-18</span> ==
<div lang="en" dir="ltr">
<section begin="technews-2026-W18"/><div class="plainlinks">
Latest '''[[m:Special:MyLanguage/Tech/News|tech news]]''' from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. [[m:Special:MyLanguage/Tech/News/2026/18|Translations]] are available.
'''Updates for editors'''
* There is a change in how new users are autoconfirmed that will improve anti-vandalism protection. Currently, users who have had an account for a few days and made a few edits are automatically added to the [[{{int:grouppage-autoconfirmed/{{CONTENTLANGUAGE}}}}|{{int:group-autoconfirmed}}]] group. This configuration tends to be exploited by some vandals, who create accounts and start to use them only after some time. To mitigate this, the configuration will be updated next week so that – for the purpose of becoming autoconfirmed – the account age will be counted from their first edit, instead of registration date. The numeric value of the age threshold will remain the same. This change will be deployed only to wikis which require at least one edit as part of the autoconfirmation conditions. [https://phabricator.wikimedia.org/T418484]
* All Wikipedia users with new accounts and those who activated the "automatically enable most beta features" option in their preference can now use the [[mw:Special:MyLanguage/Readers/Reader Experience/WE3.3.4 Reading lists|reading lists]] beta feature to save articles for later reading. This helps organize reading interests in one place for convenient access.
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] View all {{formatnum:30}} community-submitted {{PLURAL:30|task|tasks}} that were [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|resolved last week]]. For example, the issue where infobox images have huge padding in Firefox, has been fixed. [https://phabricator.wikimedia.org/T423676]
'''Updates for technical contributors'''
* As a reminder, the global API rate limits will be applied this week to identified API traffic. This is to help ensure [[mw:MediaWiki Product Insights/Responsible Reuse|fair use of infrastructure]]. Bots running in Toolforge/WMCS or with the bot user right on any wiki should not be affected for now. However, all developers are advised to follow updated best practices. For more information, including the actual rate limits, see [[mw:Wikimedia APIs/Rate limits|Wikimedia APIs/Rate limits]] and [[mw:Wikimedia APIs/Rate limits/FAQ|Frequently Asked Questions]].
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] Detailed code updates later this week: [[mw:MediaWiki 1.46/wmf.26|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tech news]]''' prepared by [[m:Special:MyLanguage/Tech/News/Writers|Tech News writers]] and posted by [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Contribute]] • [[m:Special:MyLanguage/Tech/News/2026/18|Translate]] • [[m:Tech|Get help]] • [[m:Talk:Tech/News|Give feedback]] • [[m:Global message delivery/Targets/Tech ambassadors|Subscribe or unsubscribe]].''
</div><section end="technews-2026-W18"/>
</div>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> ১৮:০৬, ২৭ এপ্রিল ২০২৬ (ইউটিসি)
<!-- https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30458046-এর তালিকা ব্যবহার করে বার্তাটি ব্যবহারকারী:UOzurumba (WMF)@metawiki পাঠিয়েছেন -->
== <span lang="en" dir="ltr">Tech News: 2026-19</span> ==
<div lang="en" dir="ltr">
<section begin="technews-2026-W19"/><div class="plainlinks">
Latest '''[[m:Special:MyLanguage/Tech/News|tech news]]''' from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. [[m:Special:MyLanguage/Tech/News/2026/19|Translations]] are available.
'''Weekly highlight'''
* The [[mw:Special:MyLanguage/Article guidance|Article guidance]] team invites experienced editors of [[mw:Special:MyLanguage/Article guidance/Pilot wikis and collaborators|pilot Wikipedias]]—Arabic, Bangla, Japanese, Portuguese, Persian, Turkish, Simple English, Spanish, and French—to help translate and adapt [https://b24e11a4f1.catalyst.wmcloud.org/wiki/Category:Pages_using_article_guidance sample outlines]. These outlines will guide editors in creating clear, well-structured, and policy-compliant articles when using [https://b24e11a4f1.catalyst.wmcloud.org/wiki/Special:NewArticle the feature] once it is launched in May 2026. [[mw:Special:MyLanguage/Article guidance#Adapting a sample outline in a Wikipedia|Simple instructions]] on how to translate and adapt the outlines are available.
'''Updates for editors'''
* The [[:m:Special:MyLanguage/Product and Technology Advisory Council|Product and Technology Advisory Council]] has published [[:m:Special:MyLanguage/Product and Technology Advisory Council/May 2026 draft PTAC recommendation for feedback|draft recommendations]] on a model that affiliates can follow when contributing to the technical space. Community members are invited to provide feedback on the recommendation until May 8th [[:m:Talk:Product and Technology Advisory Council/May 2026 draft PTAC recommendation for feedback|on the talk page]].
* The number of available thumbnail size preferences in MediaWiki is being reduced to three standardized options—Small (180px), Regular (250px), and Large (400px), as part of ongoing efforts to improve performance and reduce strain on thumbnail services. As a result, existing preferences will be mapped to the nearest new size (for example, smaller selections like 120px or 150px will render at 180px, while larger ones like 300px or 360px will render at 400px). The preferences interface will soon be updated to reflect these changes, and users who wish to opt out or provide feedback can do so. [https://phabricator.wikimedia.org/T424909]
* From now on, even when a permission expires automatically, users will receive an Echo notification similar to the standard notification for permission changes. There is a difference between this and [[m:Special:MyLanguage/Global reminder bot|Global reminder bot]] in that the latter reminds users a week ''before'' the rights are due to expire, so that they can renew the rights.
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] View all {{formatnum:32}} community-submitted {{PLURAL:32|task|tasks}} that were [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|resolved last week]]. For example, the problem where the ULS language selector in [[m:Special:Translate|Special:Translate]] would scroll vertically when it shouldn't, has been resolved. Previously, when users opened the "Translate to English" dropdown and typed certain inputs, the dialog would scroll vertically by a few pixels even when there was enough space to display all results. The dropdown no longer shifts unnecessarily when filtering languages. [https://phabricator.wikimedia.org/T358864]
* The [[m:Special:GlobalWatchlist|Global Watchlist]], which lets you view your watchlists from multiple wikis on a single page, continues to improve. For example, watchlists for Wikibase sites such as [[:d:|Wikidata]] now support [[mw:Special:MyLanguage/Extension:EntitySchema|EntitySchema]] elements for better tracking. The Live Updates mode now refreshes the special page every 60 seconds to comply with the updated [[mw:Special:MyLanguage/Wikimedia APIs/Rate limits|global API rate limits]] for improved real-time responsiveness. Additionally, a directionality bug that displayed links as "changes 3" instead of "3 changes" in mixed-direction lists has been fixed. [https://phabricator.wikimedia.org/T415450][https://phabricator.wikimedia.org/T424422][https://phabricator.wikimedia.org/T418091]
'''Updates for technical contributors'''
* The second phase of [[mw:Special:MyLanguage/Wikimedia APIs/Rate limits|global API rate limits]] has been rolled out to reduce the [[diffblog:2026/03/26/quo-vadis-crawlers-progress-and-whats-next-on-safeguarding-our-infrastructure/|impact of AI crawlers]] and ensure fair, sustainable access to Wikimedia resources, prioritising human and mission-aligned traffic. [[mw:Special:MyLanguage/Wikimedia APIs/Rate limits#Limits|Limits]] have been shifted from per-hour to per-minute, producing smoother traffic patterns and more predictable API load. Community users are not expected to be affected, and no action is required. Early indications show some User-Agent-based requestors are adjusting behaviour, and around 64% of automated API traffic has been identified. Monitoring continues, and Wikimedia Enterprise remains available for commercial support.
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] Detailed code updates later this week: [[mw:MediaWiki 1.46/wmf.27|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tech news]]''' prepared by [[m:Special:MyLanguage/Tech/News/Writers|Tech News writers]] and posted by [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Contribute]] • [[m:Special:MyLanguage/Tech/News/2026/19|Translate]] • [[m:Tech|Get help]] • [[m:Talk:Tech/News|Give feedback]] • [[m:Global message delivery/Targets/Tech ambassadors|Subscribe or unsubscribe]].''
</div><section end="technews-2026-W19"/>
</div>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> ২০:৪৩, ৪ মে ২০২৬ (ইউটিসি)
<!-- https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30498077-এর তালিকা ব্যবহার করে বার্তাটি ব্যবহারকারী:STei (WMF)@metawiki পাঠিয়েছেন -->
== <span lang="en" dir="ltr">Tech News: 2026-20</span> ==
<div lang="en" dir="ltr">
<section begin="technews-2026-W20"/><div class="plainlinks">
Latest '''[[m:Special:MyLanguage/Tech/News|tech news]]''' from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. [[m:Special:MyLanguage/Tech/News/2026/20|Translations]] are available.
'''Weekly highlight'''
* Community Tech has published [[m:Special:MyLanguage/Community Wishlist/How to write a good wish|new guidance]] explaining how wishes on Community Wishlist are triaged and prioritized. The documentation is intended to help contributors write stronger proposals by clarifying the factors that influence prioritization decisions. Beyond vote counts, the guidance highlights considerations such as potential impact on the community when determining which wishes move forward.
'''Updates for editors'''
* The Reader Growth team is launching an experiment to test a new [[mw:Special:MyLanguage/Readers/Reader_Growth/Share_Card|Share Card feature]] that allows readers to create visually engaging cards from Wikipedia articles or selected article sections and share them online, with each card linking back to the original article to help expand readership and article discovery. The mobile-only A/B test will be available to a portion of readers on Arabic, Chinese, French, Vietnamese, and English Wikipedia to better understand reading and sharing habits, and is scheduled to begin the week of May 18 and run for four weeks.
* The Android and iOS Wikipedia apps recently released the [[mw:Special:MyLanguage/Wikimedia_Apps/Team/25th_Birthday_Reading_Challenge|25-day reading challenge]] into Beta, as part of efforts to drive reader engagement by encouraging users to complete reading milestones. To track their reading streak during the challenge, App users can add a widget featuring Baby Globe to their home screen. The challenge officially begins May 11.
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] View all {{formatnum:17}} community-submitted {{PLURAL:17|task|tasks}} that were [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|resolved last week]]. For example, an issue where the global preference for enabling syntax highlighting in wikitext could unexpectedly disable itself after being turned on, has now been fixed. [https://phabricator.wikimedia.org/T425286]
'''Updates for technical contributors'''
* [[File:Octicons-tools.svg|12px|link=|alt=|Advanced item]] The ResourceLoader module <bdi lang="zxx" dir="ltr"><code><nowiki>mediawiki.ui.input</nowiki></code></bdi>, deprecated since [[m:Special:MyLanguage/Tech/News/2023/39|September 2023]], will be removed this week. There is a [[mw:Special:MyLanguage/Codex/Migrating_from_MediaWiki_UI|guide for migrating from MediaWiki UI to Codex]] for any tools that use it. [https://phabricator.wikimedia.org/T420125]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] Detailed code updates later this week: [[mw:MediaWiki 1.47/wmf.2|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tech news]]''' prepared by [[m:Special:MyLanguage/Tech/News/Writers|Tech News writers]] and posted by [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Contribute]] • [[m:Special:MyLanguage/Tech/News/2026/20|Translate]] • [[m:Tech|Get help]] • [[m:Talk:Tech/News|Give feedback]] • [[m:Global message delivery/Targets/Tech ambassadors|Subscribe or unsubscribe]].''
</div><section end="technews-2026-W20"/>
</div>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> ১৯:২০, ১১ মে ২০২৬ (ইউটিসি)
<!-- https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30524429-এর তালিকা ব্যবহার করে বার্তাটি ব্যবহারকারী:STei (WMF)@metawiki পাঠিয়েছেন -->
== <span lang="en" dir="ltr">Tech News: 2026-21</span> ==
<div lang="en" dir="ltr">
<section begin="technews-2026-W21"/><div class="plainlinks">
Latest '''[[m:Special:MyLanguage/Tech/News|tech news]]''' from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. [[m:Special:MyLanguage/Tech/News/2026/21|Translations]] are available.
'''Weekly highlight'''
* The Abstract Wikipedia team has identified five potential pilot wikis to assess their interest in adopting abstract articles on their wikis. The pilots are Malayalam, Bengali, Dagbani, Arabic, and Indonesian Wikipedia. The feedback period will be open until May 22. If your community is interested in becoming a pilot, [[m:Talk:Abstract Wikipedia|let us know on Meta]].
'''Updates for editors'''
* An experiment to show [[mw:Special:MyLanguage/Readers/Reader Experience/Reading lists|Reading Lists]] to logged-out readers on mobile web will launch on May 18 across German, Spanish, Italian, Portuguese, Polish, Dutch, Turkish, and Urdu Wikipedias, and will run for one month. The effort supports broader goals of helping readers save and organize articles for later reading, while encouraging habits that could lead to future Wikipedia contributions.
* To support a bookmark button in the Reading List beta feature, the "Tools > Action" menu has been updated to display icons, including the watch star indicator that helps editors identify temporarily watched articles. The icons now also match those used on mobile, improving consistency across platforms. The change is currently limited to the actions menu and mainly affects editors with privileged user rights. [https://phabricator.wikimedia.org/T426008]
* [[mw:Special:MyLanguage/VisualEditor/Suggestion Mode|Suggestion Mode]] was released as an [[w:en:A/B test|A/B test]] for newcomer editors on the mobile website at [[phab:T421189|~15 Wikipedias]]. The experiment will measure the impact that Suggestion Mode has on the proportion of newcomer mobile web edit sessions that result in constructive (un-reverted) article edits. The experiment will also evaluate the feature's impact on editor retention, and monitor changes in revert and block rates.
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] View all {{formatnum:27}} community-submitted {{PLURAL:27|task|tasks}} that were [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|resolved last week]]. For example, an issue in the Wikipedia Android app where images could sometimes fail to load after opening a recommended reading list notification, has now been fixed. [https://phabricator.wikimedia.org/T418231]
'''Updates for technical contributors'''
* The [[mw:Special:MyLanguage/Wikidata Platform|Wikidata Platform team]] has published its [[d:Special:MyLanguage/Wikidata:SPARQL query service/WDQS backend update/Backend Replacement|backend replacement recommendation]] and accompanying [[wikitech:Wikidata Query Service/WDQS Architecture re-design|technical architecture]] for the migration of the Wikidata Query Service (WDQS) away from Blazegraph. Feedback is invited until May 25th 2026, especially on potential gaps and impacts on advanced use cases. Wikidata community members and WDQS users are also encouraged to help identify high-impact tools and workflows that may need attention on [[d:Wikidata:SPARQL query service/WDQS backend update/High-Impact Use Cases|this page]]. Feedback can be shared on the [[d:Wikidata talk:SPARQL query service/WDQS backend update|Migration talk page]] or during the [[d:Special:MyLanguage/Wikidata:Blazegraph Migration Office Hours|next office hour]]. See the [[d:Special:MyLanguage/Wikidata:Wikidata Platform team/Newsletter|WDP team newsletter]] for more details.
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] Detailed code updates later this week: [[mw:MediaWiki 1.47/wmf.3|MediaWiki]]
'''In depth'''
* On English, French, Japanese, and a few other Wikipedias, there was a [[diffblog:2025/09/02/better-detecting-bots-and-replacing-our-captcha/|trial of hCaptcha]], a third-party bot detection service. The trial showed that hCaptcha effectively detects and deters some bad-faith automated activity, on its own and by giving [[w:en:Wikipedia:Village pump (technical)/Archive 225#Introducing SuggestedInvestigations|checkusers and stewards]] signals to look into. Because the results were positive, hCaptcha will be rolled out across all wikis over the next few weeks. [[mw:Special:MyLanguage/Product Safety and Integrity/Anti-abuse signals/hCaptcha|See the hCaptcha project page]] for technical information about the implementation and privacy protections. [[diffblog:2026/05/04/better-detecting-bots-and-replacing-our-captcha-part-2/|Learn more]].
* The latest Community Tech update is now available, with progress across several Community Wishlist initiatives, including Reading Lists expansion from the mobile app to the website, new language support for "Who Wrote That" and the Personal Dashboard, improvements to 3D rendering and Charts, and upcoming work on talk page sorting, audio playback, and editing workflows. The update also shares current priorities, wishlist status trends, and opportunities for community feedback on future focus areas and the Wikimedia Foundation’s 2026–2027 Annual Plan. [[m:Special:MyLanguage/Community Wishlist/Updates#May 13, 2026: Latest updates from the Community Tech team|Read the full newsletter for details]].
'''''[[m:Special:MyLanguage/Tech/News|Tech news]]''' prepared by [[m:Special:MyLanguage/Tech/News/Writers|Tech News writers]] and posted by [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Contribute]] • [[m:Special:MyLanguage/Tech/News/2026/21|Translate]] • [[m:Tech|Get help]] • [[m:Talk:Tech/News|Give feedback]] • [[m:Global message delivery/Targets/Tech ambassadors|Subscribe or unsubscribe]].''
</div><section end="technews-2026-W21"/>
</div>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> ২০:২২, ১৮ মে ২০২৬ (ইউটিসি)
<!-- https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30539262-এর তালিকা ব্যবহার করে বার্তাটি ব্যবহারকারী:STei (WMF)@metawiki পাঠিয়েছেন -->
== <span lang="en" dir="ltr">Tech News: 2026-22</span> ==
<div lang="en" dir="ltr">
<section begin="technews-2026-W22"/><div class="plainlinks">
Latest '''[[m:Special:MyLanguage/Tech/News|tech news]]''' from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. [[m:Special:MyLanguage/Tech/News/2026/22|Translations]] are available.
'''Weekly highlight'''
* Following a [[mw:Special:MyLanguage/Contributors/Account Creation Experiments#LOWM|successful account creation experiment]], an improved logged-out edit warning message will be deployed to all Wikimedia wikis in the first week of June. The change will only affect logged-out users on mobile web who open an editing session. The updated experience is designed to encourage account creation more clearly, while still allowing users to edit with temporary accounts. Results from the experiment showed a significant increase in account creation, with a 27% relative lift among users shown the updated message. As expected, as more people funnel into account creation, temporary accounts decreased by a relative 16%. The experiment did not show any significant changes in constructive edit rates or other monitored contributor metrics. [https://phabricator.wikimedia.org/T424595]
'''Updates for editors'''
* For security reasons, members of certain user groups are [[m:Special:MyLanguage/Mandatory two-factor authentication for users with some extended rights|required to have two-factor authentication]] (2FA) enabled. Members of these groups will be unable to disable the last 2FA method on their account, and it will be impossible to add users without 2FA to these groups. Users will still be able to add new authentication methods or remove them, as long as at least one method is continuously enabled. In the next few weeks, users without 2FA will be removed from these groups. Notably, this applies to bureaucrats. See the linked tasks for deployment schedules. [https://phabricator.wikimedia.org/T423119][https://phabricator.wikimedia.org/T423120]
* [[m:Special:MyLanguage/WMDE Technical Wishes|WMDE Technical Wishes]] will run an [[w:en:A/B testing|A/B test]] on [[:phab:T415904|10 wikis]], testing [[m:WMDE Technical Wishes/References/Reference Previews|potential improvements for Reference Previews]]. The experiment will run for ~2 weeks at the end of May / beginning of June and will affect 10% of desktop readers on the participating wikis.
* After two successful experiments, the Reader Growth team is rolling out an [[mw:Special:MyLanguage/Readers/Reader Growth/Image Browsing|Image Browsing]] beta feature for all Wikipedias on mobile on May 25. This means that anyone who has all beta features on by default will start to see this feature, and others can check the box to turn it on in their preferences. The beta feature will include a carousel of all an article's images at the top of the article, with controls for editors to [[mw:Readers/Reader_Growth/Image_Browsing#Phase_2.1_beta_feature|exclude images from the article's carousel or to exclude an article from the feature entirely]].
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] View all {{formatnum:30}} community-submitted {{PLURAL:30|task|tasks}} that were [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|resolved last week]]. For example, three dimensional STL files were being rendered incorrectly by the media viewer 3D extension which is now fixed. [https://phabricator.wikimedia.org/T416723]
'''Updates for technical contributors'''
* The legacy CSS classes <bdi lang="zxx" dir="ltr"><code><nowiki>tleft</nowiki></code></bdi> and <bdi lang="zxx" dir="ltr"><code><nowiki>tright</nowiki></code></bdi> have been replaced with <bdi lang="zxx" dir="ltr"><code><nowiki>floatleft</nowiki></code></bdi> and <bdi lang="zxx" dir="ltr"><code><nowiki>floatright</nowiki></code></bdi> as the former do not work consistently across all MediaWiki platforms, notably mobile web and mobile apps. Projects relying on these classes are encouraged to review related usage and plan for migration. Please note that <bdi lang="zxx" dir="ltr"><code><nowiki>floatleft</nowiki></code></bdi> and <bdi lang="zxx" dir="ltr"><code><nowiki>floatright</nowiki></code></bdi> may also be deprecated in future, although there are currently no plans to do so. [[phab:T426452|Read more]].
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] Detailed code updates later this week: [[mw:MediaWiki 1.47/wmf.4|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tech news]]''' prepared by [[m:Special:MyLanguage/Tech/News/Writers|Tech News writers]] and posted by [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Contribute]] • [[m:Special:MyLanguage/Tech/News/2026/22|Translate]] • [[m:Tech|Get help]] • [[m:Talk:Tech/News|Give feedback]] • [[m:Global message delivery/Targets/Tech ambassadors|Subscribe or unsubscribe]].''
</div><section end="technews-2026-W22"/>
</div>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> ২১:৫২, ২৫ মে ২০২৬ (ইউটিসি)
<!-- https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30584502-এর তালিকা ব্যবহার করে বার্তাটি ব্যবহারকারী:Quiddity (WMF)@metawiki পাঠিয়েছেন -->
== <span lang="en" dir="ltr">Tech News: 2026-23</span> ==
<div lang="en" dir="ltr">
<section begin="technews-2026-W23"/><div class="plainlinks">
Latest '''[[m:Special:MyLanguage/Tech/News|tech news]]''' from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. [[m:Special:MyLanguage/Tech/News/2026/23|Translations]] are available.
'''Updates for editors'''
* The [[mw:Special:MyLanguage/Readers/Reader Experience|Reader Experience team]] is conducting an experiment to show the [[mw:Special:MyLanguage/Readers/Reader Experience/Reading lists|reading lists]] feature, which is still in development, to logged-out mobile readers to test whether it encourages account creation at a higher rate compared to the watchstar button. The [[mw:Special:MyLanguage/Readers/Reader Experience/Reading lists#Experiment timeline|experiment]] was launched on May 18th on German, Spanish, Italian, Portuguese, Polish, Dutch, Turkish, and Urdu wikis, and it will run for a month.
* The Wikimedia Apps team released [[mw:Special:MyLanguage/Wikimedia Apps/Team/Explore Feed Refresh/Phase 1|Phase 1]] of the redesigned Home Feed to the Android Beta app. The new Home Feed includes a refreshed "Community" tab and a personalized "For You" tab featuring daily updated reading recommendations. The redesign is part of a broader effort to improve content discovery and create more engaging learning experiences in the Wikipedia apps.
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] View all {{formatnum:18}} community-submitted {{PLURAL:18|task|tasks}} that were [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|resolved last week]]. For example, an issue where images could fail to load for some suggested edits on [[w:Special:Homepage|Special:Homepage]], leaving the thumbnail stuck in a loading state, has now been fixed. [https://phabricator.wikimedia.org/T424048]
'''Updates for technical contributors'''
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] Detailed code updates later this week: [[mw:MediaWiki 1.47/wmf.5|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tech news]]''' prepared by [[m:Special:MyLanguage/Tech/News/Writers|Tech News writers]] and posted by [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Contribute]] • [[m:Special:MyLanguage/Tech/News/2026/23|Translate]] • [[m:Tech|Get help]] • [[m:Talk:Tech/News|Give feedback]] • [[m:Global message delivery/Targets/Tech ambassadors|Subscribe or unsubscribe]].''
</div><section end="technews-2026-W23"/>
</div>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> ২১:০৯, ১ জুন ২০২৬ (ইউটিসি)
<!-- https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30613639-এর তালিকা ব্যবহার করে বার্তাটি ব্যবহারকারী:STei (WMF)@metawiki পাঠিয়েছেন -->
== <span lang="en" dir="ltr"> Wikidata Platform Newsletter - June 2026</span> ==
<div lang="en" dir="ltr">
<section begin="message"/>
This is the 7th issue of our [[D:Wikidata:Wikidata_Platform_team/Newsletter|monthly newsletter]]! The next issue will be published in July 2026.
* '''QLever as the New Backend System for WDQS:''' After reviewing feedback from the community on our architectural proposals shared last month (see [[D:Wikidata:SPARQL_query_service/WDQS_backend_update/Backend_Replacement|Backend Replacement]] and [[wikitech:Wikidata_Query_Service/WDQS_Architecture_re-design|WDQS Architecture Re-Design]]), we have decided to migrate to '''QLever''' as the new backend for the Wikidata Query Service. This decision has been aligned upon across partners in WMF, WMDE, and the QLever team. We are very excited about the improvements to performance and sustainability that this choice unlocks for WDQS users. We will continue to share details on the user-facing impacts of this decision, in future [[D:Wikidata:Wikidata_Platform_team/Newsletter|newsletters]] and on our [[D:Wikidata:SPARQL_query_service/WDQS_backend_update|migration project page]], as the work progresses.
: We encourage all members of the community to continue helping us identify higher-risk areas by reporting use cases on our [[D:Wikidata:SPARQL_query_service/WDQS_backend_update/High-Impact_Use_Cases|high-impact use cases and tools page]]. This page is not intended to catalogue all WDQS usage, but to highlight complex or critical cases that may require additional attention.
* '''Migration Timeline:''' Following the decision to use QLever, we would like to share some key milestones for our migration. More details will be shared as we approach full implementation. Please note that all dates are targets and may change in the event of unforeseen challenges. Refer to the [[D:Wikidata:SPARQL_query_service/WDQS_backend_update|migration project page]] for up to date information.
*# '''Exploration:''' ('''COMPLETED''') From September through March, the team conducted traffic and benchmarking analyses to understand the needs of WDQS users and alternatives to our current system. This culminated in our final recommendations for a new backend and platform architecture, which have been reviewed and aligned upon across stakeholders.
*# '''Installation:''' ('''IN-PROGRESS''') In April, the team began building. The development of new QLever endpoints (ie. WDQS v2) is underway, as is the refactoring of our platform architecture. This includes work on indexing, update pipelines, and rewriting observed production traffic into the SPARQL 1.1 standard. We are on track to complete our build of the new endpoints by '''July 1st''' and transition into initial implementation. The query service will continue to be available in its current state through implementation phases.
*# '''Initial Implementation:''' ('''NOT STARTED''') WDQS v2, a new endpoint built on QLever, will be first available to a small number of pilot users. The team will work closely with this group to learn where improvements are needed and how we can best support users in independently migrating their use cases. A self-service hub will be published by '''October 1st'''. This will include learnings from our pilot group, guidance on how all users of WDQS can migrate their work flows, and documentation on best practices for adapting all Blazegraph dependencies to our new system or alternative endpoints where needed.
*# '''Full Implementation:''' ('''NOT STARTED''') The new endpoints will be scaled to meet the needs of the broader community and will be generally accessible to all. The original Blazegraph endpoints will still be available, but may experience service degradation beginning in '''February, 2027''' as we reallocate resources to the new infrastructure and begin slowly winding down the legacy service. We aim to have all WDQS traffic migrated by '''June 30, 2027''', at which time the Blazegraph endpoint will be decommissioned.
* '''Query Categorization and Testing:''' We have begun evaluating WDQS queries to identify Blazegraph-specific features and functionality. All bespoke query aspects need to be rewritten into the SPARQL 1.1 standard in order to work with the new QLever backend. We have documented our process for this work in two Wikitech publications on [[wikitech:SPARQL_Query_Characterization|SPARQL Query Characterization]] and [[Wikitech:Test_Architecture_for_QLever|Test Architecture for QLever]]. These documents provide more detail on methodology and testing used to validate the correctness and performance across the new and old backends. They are intended as supporting technical references for contributors interested in the migration validation and benchmarking approach.
* '''2026-05-08 incident report:''' On May 7, 2026, aggressive web scrapers began overwhelming the Wikidata Query Service (WDQS), triggering a multi-day service degradation that impacted both availability and lag SLOs. The excessive load caused Blazegraph to timeout for over half of users at peak, while also throttling the streaming updater, which blocked index updates and cascaded into edit throttling on wikidata.org itself. Initial mitigation on May 7-8 included depooling the eqiad datacenter WDQS deployment and applying rate limits based on sampled request data, but the outage persisted through the weekend. Full resolution came on Monday, May 11, when deeper analysis of WDQS logs revealed a scraper that had evaded sampled webrequest data used for initial rate limiting. Once a targeted rate limiting rule was applied to the scraper's signatures, timeout rates returned to normal. ''[[wikitech:Incidents/2026-05-13_wdqs|See the full incident report]]''
* '''[[D:Event:Blazegraph_Migration_Office_Hours_-_June_2026|Blazegraph Migration Office Hour (June session)]]:''' Our next Blazegraph Migration Office Hour will take place on Tuesday, 9 June 2026 (Tomorrow) at {{zonestamp|2026-05-12 16:00|16:00 UTC}}. This session is focused on supporting the migration away from Blazegraph as the backend of WDQS. Whether you have questions, need clarification, or want to discuss how your use case may be affected. You can register for the session via [[D:Event:Blazegraph_Migration_Office_Hours_-_May_2026|the event page]].
: In preparation, we encourage you to add questions, feedback, or migration-related support needs to [https://etherpad.wikimedia.org/p/Blazegraph_Migration_Office_Hours this etherpad]. This helps us shape the agenda and focus on the most relevant topics during the session.
<section end="message"/>
</div>
<bdi lang="en" dir="ltr">[[User:Udehb-WMF|Udehb-WMF]] ([[User talk:Udehb-WMF|আলোচনা]]) ১১:১০, ৮ জুন ২০২৬ (ইউটিসি)</bdi>
<!-- https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/WDP_team_updates&oldid=30635883-এর তালিকা ব্যবহার করে বার্তাটি ব্যবহারকারী:Udehb-WMF@metawiki পাঠিয়েছেন -->
== <span lang="en" dir="ltr">Tech News: 2026-24</span> ==
<div lang="en" dir="ltr">
<section begin="technews-2026-W24"/><div class="plainlinks">
Latest '''[[m:Special:MyLanguage/Tech/News|tech news]]''' from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. [[m:Special:MyLanguage/Tech/News/2026/24|Translations]] are available.
'''Weekly highlight'''
* Wikimedia Enterprise has increased the free usage limits for its API offerings. The monthly request limit for the On-demand API has increased from 5,000 to 50,000 requests, while the Snapshot API limit has increased from 15 to 30 requests per month. In addition, Structured Contents snapshots are now available for free accounts. These changes expand access to Wikimedia Enterprise data for developers, researchers, and organizations using Wikimedia content. [https://enterprise.wikimedia.com/blog/enhanced-free-api]
'''Updates for editors'''
* The [[mw:Special:MyLanguage/Wikimedia_Apps/Team/Explore Feed Refresh/Phase 1|refreshed Explore Feed]], now called the Home Feed, is rolling out to 50% of users of the Wikipedia Android app. The Home Feed helps readers discover relevant content through two new tabs: ''Community'' and ''For You''. The Community tab provides a scrollable feed of curated content and updates from the broader Wikimedia community and movement, while the ''For You'' tab offers a full-screen, swipeable experience that shows content tailored to a user's interests. The redesign is part of a broader effort to improve discovery and enhance the learning experience in the Wikipedia app.
* The [[mw:Special:MyLanguage/Wikimedia Apps/Team/iOS/"Which came first?" Game|Which came first?]] daily trivia game is now available in the beta version of the Wikipedia iOS app in English, German, French, Portuguese, Russian, Spanish, Arabic, Chinese, and Turkish. The game uses historical events from Wikipedia's "On This Day" content and challenges readers to guess which of two events happened first. The game was previously released on Android. Communities interested in making the game available in their languages can [[mw:Special:MyLanguage/Wikimedia_Apps/Team/Games#Game availability by language|read the instructions and requirements]].
* [[m:Special:MyLanguage/WMDE Technical Wishes/Sub-referencing|Sub-referencing]], a new MediaWiki feature that allows editors to reuse references with different details, will begin rolling out to Wikimedia wikis following a successful pilot phase. Deployment will start on 8 June for most [[wikitech:Deployments/Train#Wednesday|Group 1 wikis]] and French Wikipedia, with additional Wikipedia language editions receiving the feature over the coming months. Communities are encouraged to prepare by checking for [https://translatewiki.net/w/i.php?title=Special%3ATranslate&group=ext-cite&language=en&action_source=search&filter=%21translated&optional=1&action=translate untranslated Cite extension messages] in their language and reviewing any use of [[mw:Special:MyLanguage/Reference Tooltips|Reference Tooltips]], which may require [[:phab:T416304#11668731|updates]] to support the new functionality. Wikis using [[mw:Special:MyLanguage/Help:Reference Previews|Reference Previews]] do not need to take any action. Communities may also wish to create the ''cite-tracking-category-ref-details'' [[Special:TrackingCategories|tracking category]] as a hidden category using <code><nowiki>__HIDDENCAT__</nowiki></code> (or a dedicated template), and connect it to the corresponding Wikidata item [[d:Q129764848]]. [https://phabricator.wikimedia.org/T425662]
* The [[mw:Special:MyLanguage/Readers/Reader Growth/Mobile page previews#Experimentation|Page Previews experiment]] on mobile web has concluded. The team decided not to roll out the feature after the results showed no statistically significant impact on reader retention, as the primary success metric was retention improvement. Page Previews, which are already available on desktop and in the apps, display a thumbnail, lead paragraph, and link to the full article when readers tap a blue link. The experiment tested this experience on mobile web across six Wikipedias.
* The [[mw:Special:MyLanguage/Codex/Design/Icons|user interface icon library]] will be [[phab:T399175|updated later this week or next week]]. Most of the ~300 icons have been slightly refined and ~30 new icons have been added. These changes improve the icons to make them more consistent and comprehensible, and provide more visual balance when they are used in groups.
* The [[mw:Special:MyLanguage/Universal Language Selector|Universal Language Selector]] (ULS) interface in MediaWiki, which helps users select content in other languages, has been updated. The new version improves speed and accessibility, and users of Wikimedia projects can now pin languages for quicker language switching. The deployment to Wikimedia sites will happen gradually in the coming weeks. You can test it now as a beta feature by selecting [[Special:Preferences#mw-prefsection-betafeatures|beta features]] in your profile preferences and share your feedback on [[mw:Special:MyLanguage/Universal Language Selector/New ULS|the project page]].
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] View all {{formatnum:21}} community-submitted {{PLURAL:21|task|tasks}} that were [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|resolved last week]]. For example, an issue where the Pageviews Analysis dashboard on pageviews.wmcloud.org stopped updating graph data in May 2026, affecting all users, has been fixed. [https://phabricator.wikimedia.org/T427171]
'''Updates for technical contributors'''
* The function signature for <bdi lang="zxx" dir="ltr"><code><nowiki>mw.util.addPortletLink()</nowiki></code></bdi> has been simplified. Developers can now pass a configuration object instead of a list of positional parameters when creating portlet links. The previous function signature remains supported for backwards compatibility. For example, instead of: <bdi lang="zxx" dir="ltr"><code><nowiki>mw.util.addPortletLink('p-cactions', '#', 'Stub', 'ca-stubtag', 'Add a stub tag to this page');</nowiki></code></bdi> use <bdi lang="zxx" dir="ltr"><code><nowiki>mw.util.addPortletLink('p-cactions', { href: '#', text: 'Stub', id: 'ca-stubtag', tooltip: 'Add a stub tag to this page' });</nowiki></code></bdi>. Script maintainers are encouraged to review existing uses of <bdi lang="zxx" dir="ltr"><code><nowiki>addPortletLink()</nowiki></code></bdi> and update them where appropriate. This change will be available on all wikis from 11 June. Thanks to community volunteer Gerges for contributing this improvement. [https://phabricator.wikimedia.org/T427945]
* '''Community Wishlist discussion''': Product & Technology [[m:Special:MyLanguage/Community Wishlist/Updates#May 20, 2026: Community Tech becomes a program|introduced changes]] meant to increase the number and complexity of wishes fulfilled, including the disbanding of the Community Tech team. They are [[m:Special:MyLanguage/Community Wishlist/Updates|engaging in discussions]] about a [[m:Talk:Community Wishlist#Proposed direction for Wishlist|proposed direction for the wishlist]] from community members. Includes ways to structure annual voting, better tracking of wishes, removing focus areas, and [[m:Special:MyLanguage/Community Wishlist/Updates|staffing updates]].
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] Detailed code updates later this week: [[mw:MediaWiki 1.47/wmf.6|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tech news]]''' prepared by [[m:Special:MyLanguage/Tech/News/Writers|Tech News writers]] and posted by [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Contribute]] • [[m:Special:MyLanguage/Tech/News/2026/24|Translate]] • [[m:Tech|Get help]] • [[m:Talk:Tech/News|Give feedback]] • [[m:Global message delivery/Targets/Tech ambassadors|Subscribe or unsubscribe]].''
</div><section end="technews-2026-W24"/>
</div>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> ২১:৩০, ৮ জুন ২০২৬ (ইউটিসি)
<!-- https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30650573-এর তালিকা ব্যবহার করে বার্তাটি ব্যবহারকারী:STei (WMF)@metawiki পাঠিয়েছেন -->
== <span lang="en" dir="ltr">Tech News: 2026-25</span> ==
<div lang="en" dir="ltr">
<section begin="technews-2026-W25"/><div class="plainlinks">
Latest '''[[m:Special:MyLanguage/Tech/News|tech news]]''' from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. [[m:Special:MyLanguage/Tech/News/2026/25|Translations]] are available.
'''Weekly highlight'''
* The [[mw:Special:MyLanguage/Readers/Reader Growth|Reader Growth team]] has launched an [[mw:Special:MyLanguage/Readers/Reader Growth/Image Browsing|Image Browsing]] beta feature on the mobile web version of all Wikipedias. The feature shows an image carousel at the top of articles with 3 or more images. Editors can configure this feature with the following controls: to hide a specific image from a page, either use <code>class=notpageimage</code> excluding it from thumbnail previews, or <code>class=noviewer</code> excluding it from MediaViewer. The carousel can also be disabled from a page entirely, with the magic word <code><nowiki>__NOMEDIAVIEWERCAROUSEL__</nowiki></code>. To submit feedback or flag bugs, please visit the [[mw:Talk:Readers/Reader Growth/Image Browsing|project page]].
* [[mw:Special:MyLanguage/Help:Tables#class="wikitable"|Wikitables]] can now be [[mw:Special:MyLanguage/Help:Sortable tables#Forcing the initial sort direction|sorted in descending order]] on the first click by adding <code dir=ltr>data-sort-order="desc"</code> to the header cell. Previously, by default, clicking a column header for the first time sorts it in ascending order. This addition to a Wikitable gives it more control and flexibility, while the default behavior for subsequent clicks remains unchanged. [https://phabricator.wikimedia.org/T398416]
'''Updates for editors'''
* The [[mw:Special:MyLanguage/Article guidance|Article guidance]] feature is currently being tested with some editors creating new articles on the Simple English, French, and Turkish Wikipedias. The experiment will soon begin on the Arabic and Bangla Wikipedias as well. [[w:simple:Special:NewArticle|This feature]] gives editors community-curated guidance to help them create articles that follow community standards. Experienced editors can continue creating or adapting outlines for specific article types that are commonly created by less experienced contributors. The outlines guide less experienced editors in creating high-quality articles. A quick guide to markups used in outlines can be found on [[mw:Special:MyLanguage/Article guidance/Test feature guide#Markups in outlines|this page]]. [[w:simple:Wikipedia:Article Guidance|Example outlines]] that can be adapted and instructions for how to adapt them are on [[mw:Special:MyLanguage/Article guidance#Adapting a sample outline in a Wikipedia|this section]] of the project page.
* Wikis that wish to replace the "indefinitely" button in Special:Block for temporary accounts (for example, wikis that block temporary users only until account expiration) will be able to do so by creating [[MediaWiki:ipb-indefinite-expiry-temporary-account]] with the block duration they want. [https://phabricator.wikimedia.org/T427125]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] View all {{formatnum:41}} community-submitted {{PLURAL:41|task|tasks}} that were [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|resolved last week]].
'''Updates for technical contributors'''
* By the end of June, a valid user-agent string will be required for automated dumps downloads from the dumps.wikimedia.org website. Automated requests that provide a generic or empty user-agent will be blocked. This [[phab:T400119|extends enforcement]] of the long standing [[foundation:Special:MyLanguage/Policy:Wikimedia Foundation User-Agent Policy|user-agent policy]]. Access to dumps through Wikimedia Cloud Services will not change.
* The roll out of global [[mw:Wikimedia APIs/Rate limits|API rate limits]] is now complete, with limits enforced across all APIs and at the documented levels for all groups. Bots running in Toolforge/WMCS or with the bot user right on any wiki remain exempt. All bots should continue to follow the documented best practices to avoid being rate limited.
* The [https://api.wikimedia.org/wiki/Main_Page API Portal wiki] will be read only starting this week (June 15-18). The following week (June 22-25), all API Portal wiki URLs will redirect to [[mw:Wikimedia APIs|Wikimedia APIs on mediawiki.org]]. Learn more on the [[wikitech:API Portal/Deprecation|project page]].
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] Detailed code updates later this week: [[mw:MediaWiki 1.47/wmf.7|MediaWiki]]
'''Meetings and events'''
* On June 17th at 6pm UTC the WMF will be holding Discord call focused on a code review. We've heard through the [[mw:Special:MyLanguage/Developer Satisfaction Survey/2026|Developer Satisfaction Survey]] that volunteers are struggling with code review and we'd like to discuss these experiences with the goal of surfacing workable solutions. You can join the call [https://discord.gg/wikipedia?event=1514727511102062664 via the Wikimedia Community Discord server].
* The [[m:Special:MyLanguage/Conferencia Wikimedia de América Latina 2026|Latin American Wikimedia Conference]] will host a regional hackathon that will bring together the Wikimedia movement’s technical community including developers, system administrators, data scientists, and users with extended rights. Interested technical contributors can [https://docs.google.com/forms/d/e/1FAIpQLSf4osJzTHBJjQbYJk7TMVEJjTEQv7IgtsUDfP-o-qTgeRQQxw/viewform apply for a scholarship] to participate until June 21 at midnight (Bolivia time, UTC-4).
* Sign up for Wikimania Team Challenges to join this special event. The Team challenges will take place online and in person from July 21 to 22, before Wikimania conference. Everyone is welcome, regardless of skills or Wikimania registration. Teams will work on 10 important challenges supporting the Wikimedia community. For details, visit [[wmania:Special:MyLanguage/2026:Team challenges|the Team Challenges page]] and [https://wikimedia.eventyay.com/wm/teamchallenges/ register there]. Registration closes on June 20th at 11pm UTC.
'''''[[m:Special:MyLanguage/Tech/News|Tech news]]''' prepared by [[m:Special:MyLanguage/Tech/News/Writers|Tech News writers]] and posted by [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Contribute]] • [[m:Special:MyLanguage/Tech/News/2026/25|Translate]] • [[m:Tech|Get help]] • [[m:Talk:Tech/News|Give feedback]] • [[m:Global message delivery/Targets/Tech ambassadors|Subscribe or unsubscribe]].''
</div><section end="technews-2026-W25"/>
</div>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> ১৬:৪৯, ১৫ জুন ২০২৬ (ইউটিসি)
<!-- https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30689604-এর তালিকা ব্যবহার করে বার্তাটি ব্যবহারকারী:UOzurumba (WMF)@metawiki পাঠিয়েছেন -->
== Wikifunctions & Abstract Wikipedia Newsletter #253 is out: The or not the, this is (the?) question ==
There is [[:f:Special:MyLanguage/Wikifunctions:Status updates/2026-06-19|a new update]] for Abstract Wikipedia and Wikifunctions. Please, come and read it!
In this issue, we present you a delicate question regarding grammatical framework, we talk about our next events and about the results of our latest online meetings, we discuss news about Types, and we take a look at the latest software developments.
Want to catch up with the previous updates? Check [[:f:Special:MyLanguage/Wikifunctions:Status updates|our archive]]!
Enjoy the reading! -- [[User:Sannita (WMF)|User:Sannita (WMF)]] ([[User talk:Sannita (WMF)|talk]]) ১২:৩৪, ১৯ জুন ২০২৬ (ইউটিসি)
<!-- https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Wikifunctions_%26_Abstract_Wikipedia&oldid=30701693-এর তালিকা ব্যবহার করে বার্তাটি ব্যবহারকারী:Sannita (WMF)@metawiki পাঠিয়েছেন -->
== <span lang="en" dir="ltr">Tech News: 2026-26</span> ==
<div lang="en" dir="ltr">
<section begin="technews-2026-W26"/><div class="plainlinks">
Latest '''[[m:Special:MyLanguage/Tech/News|tech news]]''' from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. [[m:Special:MyLanguage/Tech/News/2026/26|Translations]] are available.
'''Weekly highlight'''
* [[mw:Special:MyLanguage/Growth/Feature summary|Growth features]] are [[phab:T418115|now available at Wikidata]]. This update enables access to Mentorship ([[mw:Special:MyLanguage/Help:Growth/Mentorship|if configured]]), Impact module, the Help Panel, and a simplified Newcomer Homepage (without Suggested Edits). Wikidata administrators are still configuring the features through Community Configuration.
'''Updates for editors'''
* The special page [[{{#special:RangeCalculator}}]] has been created. It allows users to find an IP range without needing to rely on external tools. Until now, this tool was only available to CheckUsers. [https://phabricator.wikimedia.org/T268429]
* [[m:Special:MyLanguage/WMDE Technical Wishes/Sub-referencing|Sub-referencing]] is a new MediaWiki feature that allows editors to reuse references with different details. It will be deployed to most small and medium-sized Wikipedia language versions on June 23. The [[m:Special:MyLanguage/WMDE Technical Wishes/Sub-referencing#deployment|FAQ]] lists possible actions to take on your wiki to support the deployment. Check the [[:phab:T414094|rollout plan]] for the next deployment steps. [https://phabricator.wikimedia.org/T428902]
* Starting next week, users will get a notification when they are blocked or unblocked from editing, or if this block changes. [https://phabricator.wikimedia.org/T100974]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] View all {{formatnum:32}} community-submitted {{PLURAL:32|task|tasks}} that were [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|resolved last week]].
'''Updates for technical contributors'''
* Starting next week, abuse filters that are set to "require CAPTCHA verification" will begin to also affect users with the <code>skipcaptcha</code> right, which includes most autoconfirmed users. Bots are exempted. This change only affects edits that trigger an abuse filter. The <code>skipcaptcha</code> right will continue to exempt users from having to solve CAPTCHAs in the ordinary course of using the wikis. [https://phabricator.wikimedia.org/T402595]
* Reference documentation for the [[wikitech:Machine_Learning/LiftWing/API|Lift Wing API]] has moved from the API Portal to the interactive [https://wikitech.wikimedia.org/w/index.php?api=lift-wing&title=Special%3ARestSandbox REST Sandbox].
* The API Portal wiki is now closed. For API documentation, see [[mw:Special:MyLanguage/Wikimedia_APIs|Wikimedia APIs on mediawiki.org]]. All API Portal wiki URLs (https://api.wikimedia.org/wiki/) will redirect to the mediawiki.org page starting June 22. [https://phabricator.wikimedia.org/T427537]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] Detailed code updates later this week: [[mw:MediaWiki 1.47/wmf.8|MediaWiki]]
'''Meetings and events'''
* Join an online call on 25 June at 2:30pm UTC to meet the current Wikimedia interns for [[mw:Google_Summer_of_Code/2026|Google Summer of Code]] and [[mw:Outreachy/Round_32|Outreachy]]. Interns will provide an overview of their projects and a brief demo of their work so far. Attendees are encouraged to [[mw:event:Google_Summer_of_Code/Summer_2026_June_Internship_open_session|share ideas and connections in their community]].
'''''[[m:Special:MyLanguage/Tech/News|Tech news]]''' prepared by [[m:Special:MyLanguage/Tech/News/Writers|Tech News writers]] and posted by [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Contribute]] • [[m:Special:MyLanguage/Tech/News/2026/26|Translate]] • [[m:Tech|Get help]] • [[m:Talk:Tech/News|Give feedback]] • [[m:Global message delivery/Targets/Tech ambassadors|Subscribe or unsubscribe]].''
</div><section end="technews-2026-W26"/>
</div>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> ১৩:০৫, ২৩ জুন ২০২৬ (ইউটিসি)
<!-- https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30722494-এর তালিকা ব্যবহার করে বার্তাটি ব্যবহারকারী:Trizek (WMF)@metawiki পাঠিয়েছেন -->
== Wikifunctions & Abstract Wikipedia Newsletter #254: Working on Functions, together ==
There is [[:f:Special:MyLanguage/Wikifunctions:Status updates/2026-06-26|a new update]] for Abstract Wikipedia and Wikifunctions. Please, come and read it!
In this issue, we report on new collaborative patterns emerging in our community, we discuss news in Types, we share some events that relate to Wikifunctions and Abstract Wikipedia at Wikimania 2026, and we take a look at the latest software developments.
Want to catch up with the previous updates? Check [[:f:Special:MyLanguage/Wikifunctions:Status updates|our archive]]!
Also, we remind you that if you have questions or ideas to discuss, the next '''Volunteers' Corner''' will be held on '''[https://zonestamp.toolforge.org/1783359000 July 6, at 17:30 UTC]''' ([https://meet.google.com/xuy-njxh-rkw link to the meeting]).
Enjoy the reading! -- [[User:Sannita (WMF)|User:Sannita (WMF)]] ([[User talk:Sannita (WMF)|talk]]) ০৯:৫৮, ২৭ জুন ২০২৬ (ইউটিসি)
<!-- https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Wikifunctions_%26_Abstract_Wikipedia&oldid=30724999-এর তালিকা ব্যবহার করে বার্তাটি ব্যবহারকারী:Sannita (WMF)@metawiki পাঠিয়েছেন -->
== <span lang="en" dir="ltr">Tech News: 2026-27</span> ==
<div lang="en" dir="ltr">
<section begin="technews-2026-W27"/><div class="plainlinks">
Latest '''[[m:Special:MyLanguage/Tech/News|tech news]]''' from the Wikimedia technical community. Please tell other users about these changes. Not all changes will affect you. [[m:Special:MyLanguage/Tech/News/2026/27|Translations]] are available.
'''Updates for editors'''
* As part of the [[mw:Special:MyLanguage/Contributors/Account Creation Experiments|Account Creation Experiments]], the Growth team tested adding a user account icon in the mobile web header for logged-out users, providing direct access to "Create account" and "Log in" actions. The experiment increased account creation by about 20% without negatively affecting edit quality or constructive edit rates. The feature will now be rolled out to all Wikimedia Foundation wikis on mobile web in the first week of July. [https://phabricator.wikimedia.org/T428220]
* After a [[phab:T426248|successful experiment]], logged-in users who did not [[mw:Special:MyLanguage/Help:Email_confirmation|confirm their email address]] when their account was created see a new banner asking them to complete that process. This helps reduce the risk that users get locked out of their account, and makes account email addresses overall more reliable. This is part of the [[mw:Special:MyLanguage/Product Safety and Integrity/Account Security|Account Security]] project. [https://phabricator.wikimedia.org/T428292]
* An update to [[Special:Search|Search]] is refining how the <bdi lang="zxx" dir="ltr"><code><nowiki>-prefix:</nowiki></code></bdi> behaves when used to exclude results. Previously, using <bdi lang="zxx" dir="ltr"><code><nowiki>-prefix:</nowiki></code></bdi> with negation could unintentionally broaden search results by adding the namespaces included in the search scope, leading to confusing behavior for users expecting a straightforward exclusion filter. With the update, <bdi lang="zxx" dir="ltr"><code><nowiki>-prefix:</nowiki></code></bdi> will now strictly exclude matching page titles as intended and may display a warning if the relevant namespace has not been explicitly selected. The behavior of <bdi lang="zxx" dir="ltr"><code><nowiki>prefix:</nowiki></code></bdi> without negation however remains unchanged. [https://phabricator.wikimedia.org/T427443]
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] View all {{formatnum:33}} community-submitted {{PLURAL:33|task|tasks}} that were [[m:Special:MyLanguage/Tech/News/Recently resolved community tasks|resolved last week]]. For example, an issue where reviewers using the Page Curation toolbar were not automatically subscribed to talk page discussions they started has now been fixed. Reviewers will now receive notifications when someone replies to those discussions. [https://phabricator.wikimedia.org/T329346]
'''Updates for technical contributors'''
* Starting June 29th, automated downloads from the dumps.wikimedia.org website will be subject to the [[Foundation:Special:MyLanguage/Policy:Wikimedia Foundation User-Agent Policy|user-agent policy]]. Automated requests that provide a generic or empty user-agent will be blocked. Access to dumps through Wikimedia Cloud Services remains unaffected. This is a follow up to the announcement made in the [[m:Special:MyLanguage/Tech/News/2026/25|2026/25 issue of Tech News]].
* [[File:Reload icon with two arrows.svg|12px|link=|class=skin-invert|Recurrent item]] Detailed code updates later this week: [[mw:MediaWiki 1.47/wmf.9|MediaWiki]]
'''''[[m:Special:MyLanguage/Tech/News|Tech news]]''' prepared by [[m:Special:MyLanguage/Tech/News/Writers|Tech News writers]] and posted by [[m:Special:MyLanguage/User:MediaWiki message delivery|bot]] • [[m:Special:MyLanguage/Tech/News#contribute|Contribute]] • [[m:Special:MyLanguage/Tech/News/2026/27|Translate]] • [[m:Tech|Get help]] • [[m:Talk:Tech/News|Give feedback]] • [[m:Global message delivery/Targets/Tech ambassadors|Subscribe or unsubscribe]].''
</div><section end="technews-2026-W27"/>
</div>
<bdi lang="en" dir="ltr">[[User:MediaWiki message delivery|MediaWiki message delivery]]</bdi> ১১:৪৮, ২৯ জুন ২০২৬ (ইউটিসি)
<!-- https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Tech_ambassadors&oldid=30744833-এর তালিকা ব্যবহার করে বার্তাটি ব্যবহারকারী:STei (WMF)@metawiki পাঠিয়েছেন -->
== Wikifunctions & Abstract Wikipedia Newsletter #255: Integration on test wiki and annual plan ==
There is [[:f:Special:MyLanguage/Wikifunctions:Status updates/2026-07-01|a new update]] for Abstract Wikipedia and Wikifunctions. Please, come and read it!
In this issue, we discuss integration of Abstract Wikipedia in Test Wiki and our objectives for the new Wikimedia Foundation Fiscal Year, we remind you of the Wikifunctions and Abstract Wikipedia events at Wikimania 2026, and we take a look at the latest software developments.
Want to catch up with the previous updates? Check [[:f:Special:MyLanguage/Wikifunctions:Status updates|our archive]]!
Also, we remind you that if you have questions or ideas to discuss, the next '''Volunteers' Corner''' will be held on '''[https://zonestamp.toolforge.org/1783359000 July 6, at 17:30 UTC]''' ([https://meet.google.com/xuy-njxh-rkw link to the meeting]).
Enjoy the reading! -- [[User:Sannita (WMF)|User:Sannita (WMF)]] ([[User talk:Sannita (WMF)|talk]]) ০৮:২২, ২ জুলাই ২০২৬ (ইউটিসি)
<!-- https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/Wikifunctions_%26_Abstract_Wikipedia&oldid=30755600-এর তালিকা ব্যবহার করে বার্তাটি ব্যবহারকারী:Sannita (WMF)@metawiki পাঠিয়েছেন -->
== <span lang="en" dir="ltr"> Wikidata Platform Newsletter - July 2026</span> ==
<div lang="en" dir="ltr">
<section begin="message"/>
This is the 8th issue of our [[D:Wikidata:Wikidata_Platform_team/Newsletter|monthly newsletter]]! The next issue will be published in August 2026.
* '''Documentation on Query Rewrites:''' As WDQS continues its migration off Blazegraph, queries that rely on Blazegraph-specific extensions will need to be updated to comply with the SPARQL 1.1 and GeoSPARQL standards. To support this, we are publishing documentation to help you identify affected queries and rewrite them, so your queries keep working through the migration and beyond.
:This transition to standard SPARQL reduces vendor lock-in, improves interoperability with other triplestores, and ensures our codebase remains robust. Importantly, the specifics of these rewrites are doing more than just guiding manual code updates. The details define the processing logic for an upcoming tool designed to automatically convert Blazegraph queries into standard SPARQL for the QLever engine.
:The query rewrite details are focused on four key areas:
:# Graph Analytic Services (GAS): See [[wikitech:Blazegraph_Migration:_Rewrite_of_GAS|Blazegraph_Migration:_Rewrite_of_GAS]]
:# MediaWiki API (MWAPI) Service: See [[wikitech:Blazegraph_Migration:_Rewrite_of_MWAPI|Blazegraph_Migration:_Rewrite_of_MWAPI]]
:# Label and Utility Services: See [[wikitech:Blazegraph_Migration:_Rewrite_of_Label_and_Utility_Services_and_Functions|Blazegraph_Migration:_Rewrite_of_Label_and_Utility_Services_and_Functions]]
:# Geospatial Functions: See [[wikitech:Blazegraph_Migration:_Rewrite_of_Geospatial_Services_and_Functions|Blazegraph_Migration:_Rewrite_of_Geospatial_Services_and_Functions]]
:'''We Want Your Feedback!'''
:As we map out these transition rules and develop the automated QLever conversion program, your input is critical. Please review the Wikitech pages linked above and let us know whether:
:* The rewrite rules cover your use cases
:* There are edge cases or specific Blazegraph quirks that are not accounted for
: Please share your thoughts, concerns, or examples of queries on the related Discussion pages of the links above, so we can ensure the automated converter works seamlessly for everyone.
* '''Technical Build Complete:''' We are preparing to onboard the pilot migration cohort at https://query-next.wikidata.org (and https://query-scholarly-next.wikidata.org).
:The system architecture from the WDQS v2 design doc has been implemented and deployed on Kubernetes. We ran a successful end-to end-test and validated that the QLever deployment can pick up a newly built index, start to backfill it with real-time events, and once ready the database can be queried. The service returns valid results, metrics are properly reported and available in Grafana, and logs are shipped to Wikimedia’s Observability Platform. Upcoming work will be focused on performance optimization and improvements to the indexing and real-time update pipelines supporting the service.
* '''Timeline Update:''' As mentioned in [[D:Wikidata:Wikidata_Platform_team/Newsletter_June_2026|our June newsletter]], we are kicking off the Initial Implementation phase of the Blazegraph migration in July. After a few short weeks of final testing and iteration on the new endpoints, the first round of WDQS v2 users will be given access to the new endpoints so they can begin their migration. The QLever endpoints will become accessible to the broader community by October 1st, when we kick off Full Implementation, along with documentation on query rewriting.
* '''Reminder to Report Use Cases:''' We encourage all members of the community to continue helping us identify higher-risk areas, namely SPARQL queries that are highly complex, by reporting use cases on our [[D:Wikidata:SPARQL query service/WDQS backend update/High-Impact Use Cases|high-impact use cases and tools page]]. As a reminder, any use case can be reported through this mechanism. The purpose of this page is to give the WDP team visibility into user-level migration needs.
* '''Blazegraph Migration Office Hour (July session):''' Our next [[D:Wikidata:Blazegraph Migration Office Hours|Blazegraph Migration Office Hour]] will take place, Tuesday, 7 July 2026. This session is focused on supporting the migration away from Blazegraph as the backend of WDQS. Whether you have questions, need clarification, or want to discuss how your use case may be affected. You can register for the session via [[D:Event:Blazegraph Migration Office Hours - July 2026|the event page]].
: In preparation, we encourage you to add questions, feedback, or migration-related support needs to [https://etherpad.wikimedia.org/p/Blazegraph_Migration_Office_Hours this etherpad]. This helps us shape the agenda and focus on the most relevant topics during the session.
<section end="message"/>
</div>
<bdi lang="en" dir="ltr">[[User:Udehb-WMF|Udehb-WMF]] ([[User talk:Udehb-WMF|আলোচনা]]) ১০:৫৪, ৩ জুলাই ২০২৬ (ইউটিসি)</bdi>
<!-- https://meta.wikimedia.org/w/index.php?title=Global_message_delivery/Targets/WDP_team_updates&oldid=30756389-এর তালিকা ব্যবহার করে বার্তাটি ব্যবহারকারী:Udehb-WMF@metawiki পাঠিয়েছেন -->
k59syu7plob3eh6s4juuwc6i7ozaahs
মডিউল:collation
828
25825
512466
323295
2026-07-02T23:30:15Z
Redmin
6857
ইংরেজি উইকিঅভিধান থেকে হালনাগাদ করা হলো
512466
Scribunto
text/plain
local export = {}
local compare_module = "Module:compare"
local functions_module = "Module:fun"
local memoize_module = "Module:memoize"
local string_utilities_module = "Module:string utilities"
local utilities_module = "Module:utilities"
local concat = table.concat
local find = string.find
local format = string.format
local make_sort_function -- defined below
local match = string.match
local remove = table.remove
local require = require
local sort = table.sort
local sub = string.sub
local type = type
local function get_plaintext(...)
get_plaintext = require(utilities_module).get_plaintext
return get_plaintext(...)
end
local function is_callable(...)
is_callable = require(functions_module).is_callable
return is_callable(...)
end
local function memoize(...)
memoize = require(memoize_module)
return memoize(...)
end
local function trim(...)
trim = require(string_utilities_module).trim
return trim(...)
end
-- Custom functions for generating a sortkey that will achieve the desired sort
-- order.
local custom_funcs
local function get_custom_funcs()
custom_funcs, get_custom_funcs = {
ahk = "Mymr-sortkey",
aio = "Mymr-sortkey",
blk = "Mymr-sortkey",
egy = "egy-utilities",
kac = "Mymr-sortkey",
kht = "Mymr-sortkey",
ksw = "Mymr-sortkey",
kyu = "Mymr-sortkey",
["mkh-mmn"] = "Mymr-sortkey",
mnw = "Mymr-sortkey",
my = "Mymr-sortkey",
phk = "Mymr-sortkey",
pwo = "Mymr-sortkey",
omx = "Mymr-sortkey",
shn = "Mymr-sortkey",
tjl = "Mymr-sortkey",
}, nil
return custom_funcs
end
local function is_lang_object(lang)
return lang and type(lang) == "table" and type(lang.getCanonicalName) == "function"
end
local function check_function(funcName, argIdx, func)
return is_callable(func) or error(format("bad argument #%d to %s: expected function or callable table; got %s", argIdx, funcName, type(func)), 2)
end
function export.make_lang_sortkey_function(lang, make_sortbase)
local makeDisplayText, makeSortKey = lang.makeDisplayText
local custom = (custom_funcs or get_custom_funcs())[lang:getCode()]
if custom then
local _makeSortKey = require("Module:" .. custom).makeSortKey
function makeSortKey(_, text)
return _makeSortKey(text, lang, lang:findBestScript(text))
end
else
makeSortKey = lang.makeSortKey
end
return make_sortbase and check_function("make_sort_function", 3, make_sortbase) and function(element)
return (makeSortKey(
lang,
(makeDisplayText(
lang,
get_plaintext(make_sortbase(element))
))
))
end or function(element)
return (makeSortKey(
lang,
(makeDisplayText(
lang,
get_plaintext(element)
))
))
end
end
do
local compare
local function get_compare()
compare, get_compare = require(compare_module), nil
return compare
end
function export.make_sort_function(lang, make_sortbase)
local compare_func, make_sortkey = compare or get_compare()
if is_lang_object(lang) then
make_sortkey = memoize(export.make_lang_sortkey_function(lang, make_sortbase), true)
elseif make_sortbase and check_function("make_sort_function", 2, make_sortbase) then
make_sortkey = memoize(make_sortbase, true)
else
return compare_func
end
return function(elem1, elem2)
return compare_func(make_sortkey(elem1), make_sortkey(elem2))
end
end
make_sort_function = export.make_sort_function
end
function export.sort(elems, lang, make_sortbase)
return sort(elems, make_sort_function(lang, make_sortbase))
end
function export.sort_template(frame)
if not mw.isSubsting() then
error("This template must be substed.")
end
local args = (frame.args.parent and frame:getParent() or frame).args
local m_table = require("Module:table")
local elems = m_table.shallowCopy(args)
local code, lang_param = args.lang
if code then
-- List starts at 1.
lang_param = "lang"
else
-- List starts at 2: retrieve `code` from key 1 with remove(). which
lang_param = 1
code = remove(elems, 1)
-- remove() also shifts the remaining elements down by 1 as a side-
-- effect, so the list now starts at 1.
end
if code then
trim(code)
end
local lang = require("Module:languages").getByCode(code, lang_param, true)
local i = 1
while true do
local elem = elems[i]
while elem do
elem = trim(elem, "%s")
if elem ~= "" then
break
end
remove(elems, i)
elem = elems[i]
end
if not elem then
break
elseif not ( -- Strip redundant wikilinks.
not match(elem, "^()%[%[") or
find(elem, "[[", 3, true) or
find(elem, "]]", 3, true) ~= #elem - 1 or
find(elem, "|", 3, true)
) then
elem = sub(elem, 3, -3)
elem = trim(elem, "%s")
end
elems[i] = elem .. "\n"
i = i + 1
end
elems = m_table.removeDuplicates(elems)
export.sort(elems, lang)
return concat(elems, args.sep or "|")
end
return export
1329hn2ohk3bwec6f4512tyaf8hrk1j
boob
0
30836
512473
91118
2026-07-03T05:31:35Z
Redmin
6857
লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L1571468-এর সাথে সংযোগ তৈরি করছি
512473
wikitext
text/x-wiki
== {{langname|en}} ==
=== উচ্চারণ ===
* {{আধ্বব|en|/ˈbuːb/}}
* {{অডিও|en|en-us-boob.ogg|অডিও (যুক্তরাষ্ট্র)}}
* {{অন্ত্যমিল|en|uːb}}
=== বিশেষ্য ===
{{en-বিশেষ্য}}
# [[ভুল]]
{{লে|L1571468|না}}
5l0r2fmhu8pzp909cp2bip10ynhn7vq
512474
512473
2026-07-03T05:37:35Z
Redmin
6857
লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L16167-এর সাথে সংযোগ তৈরি করছি
512474
wikitext
text/x-wiki
== {{langname|en}} ==
=== উচ্চারণ ===
* {{আধ্বব|en|/ˈbuːb/}}
* {{অডিও|en|en-us-boob.ogg|অডিও (যুক্তরাষ্ট্র)}}
* {{অন্ত্যমিল|en|uːb}}
=== বিশেষ্য ===
{{en-বিশেষ্য}}
# [[ভুল]]
{{লে|L1571468|না}}
{{লে|L16167|না}}
be7y9zt35kbfyof2wekiaupz2pirgdk
512475
512474
2026-07-03T05:51:15Z
Redmin
6857
লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L1571469-এর সাথে সংযোগ তৈরি করছি
512475
wikitext
text/x-wiki
{{লে|L1571469|উচ্চারণ=* {{অন্ত্যমিল|en|uːb}}}}
{{লে|L1571468|না}}
{{লে|L16167|না}}
7wqkmnrkx8002z1uhspjhvoli24x4zv
মডিউল:আভিধানিক উপাত্ত
828
50158
512450
512446
2026-07-02T14:14:47Z
Redmin
6857
512450
Scribunto
text/plain
local p = {}
local i18n = require('মডিউল:আভিধানিক উপাত্ত/i18n')
local references = require('মডিউল:উইকিউপাত্ত তথ্যসূত্র বিন্যাসকরণ').format
local getArgs = require('Module:Arguments').getArgs
local wb = mw.wikibase
local ustring = mw.ustring
local html = mw.html
local mw_lang = mw.language
local entity_cache = {}
local reference_cache = {}
local forms
local lang_code
local lex_cat
local matched_lemma
local lang_id
local function wrapStringInWikilinks(str)
local exceptions = i18n.nolinks
local result = str:gsub('(%S+)', function(token)
local word, trailing_char = token:match('^(.-)([;,.:!?]*)$')
local wrapped = word:gsub('[^(-/]+', function(part)
if exceptions[part] then
return part
else
return '[[' .. mw.text.nowiki(part) .. '#' .. i18n['content_lang_name'] .. '|' .. mw.text.nowiki(part) .. ']]'
end
end)
return wrapped .. trailing_char
end)
return result
end
local function serializeTable(val, name, skipnewlines, depth) -- https://stackoverflow.com/a/6081639
skipnewlines = skipnewlines or false
depth = depth or 0
local tmp = string.rep(" ", depth)
if name then tmp = tmp .. name .. " = " end
if type(val) == "table" then
tmp = tmp .. "{" .. (not skipnewlines and "\n" or "")
for k, v in pairs(val) do
tmp = tmp .. serializeTable(v, k, skipnewlines, depth + 1) .. "," .. (not skipnewlines and "\n" or "")
end
tmp = tmp .. string.rep(" ", depth) .. "}"
elseif type(val) == "number" then
tmp = tmp .. tostring(val)
elseif type(val) == "string" then
tmp = tmp .. string.format("%q", val)
elseif type(val) == "boolean" then
tmp = tmp .. (val and "true" or "false")
else
tmp = tmp .. "\"[inserializable datatype:" .. type(val) .. "]\""
end
return tmp
end
-- Use this to safely expand templates when you are not sure that they exist.
local function safeExpand(frame, title, args)
local _, result = pcall(function()
return frame:expandTemplate{ title = title, args = args }
end)
if result:find('does not exist') then -- expandTemplate{} doesn't seem to throw any error that can be handled with pcall() so string search is the only viable option.
return nil
end
return result
end
local function checkTitleCodePointInRange(title, start_point, end_point)
return ustring.find( title, '[' ..ustring.char(start_point) .. '-' .. ustring.char(end_point) .. ']' )
end
local function getLanguageForCategories( current_page_title )
-- বিশেষ ভাষার জন্য
if lang_id == 'Q11051' then -- হিন্দি/উর্দু
if checkTitleCodePointInRange(current_page_title, 0x0600, 0x06ff) then -- উর্দু
lang_id = 'Q11051ur'
elseif checkTitleCodePointInRange(current_page_title, 0x0900, 0x097f) then -- হিন্দি
lang_id = 'Q11051hi'
end
elseif lang_id == 'Q58635' then -- পাঞ্জাবি
if checkTitleCodePointInRange(current_page_title, 0x0600, 0x06ff) then -- শাহমুখী
lang_id = 'Q58635pnb'
elseif checkTitleCodePointInRange(current_page_title, 0x0a00, 0x0a7f) then -- গুরুমুখী
lang_id = 'Q58635pa'
end
elseif lang_id == 'Q56356571' then -- নয়া ফার্সি ভাষা
if checkTitleCodePointInRange(current_page_title, 0x0600, 0x06ff) then -- ফার্সি (ইরান/আফগানিস্তান)
lang_id = 'Q56356571fa'
elseif checkTitleCodePointInRange(current_page_title, 0x0400, 0x04ff) then -- তাজিক
lang_id = 'Q56356571tg'
end
end
return lang_id
end
local function getEntity( id )
if entity_cache[id] == nil then
entity_cache[id] = wb.getEntity(id) or error('Invalid ID provided: ' .. id)
end
return entity_cache[id] ~= false and entity_cache[id] or nil
end
-- Use this function to get the label of an item even if that item does not have any label in the wiki's content language or English.
local function getLabel(id)
if id == 'Q11051hi' then
return 'হিন্দি'
elseif id == 'Q11051ur' then
return 'উর্দু'
elseif id == 'Q56356571fa' then
return 'ফার্সি'
elseif id == 'Q56356571tg' then
return 'তাজিক'
elseif id == 'Q58635pa' or id == 'Q58635pnb' then
return 'পাঞ্জাবি'
end
local label = wb.getLabel(id)
if label then
return label
end
local labels = getEntity(id).labels
if not labels then
return id
end
for _, v in pairs(labels) do
if v and v.value then
return v.value
end
end
end
local function getReference( id, reference )
local out_id = nil
local url_value
if reference_cache[id] == nil then
local ref_text = references(reference, wb, mw_lang, i18n['content_lang_code'], i18n['wikipedia'])
if reference.snaks then
if reference.snaks['P248'] then
for _, snak in pairs(reference.snaks['P248']) do
if snak.datavalue and snak.datavalue.value.id == 'Q428' then -- কুরআন
ref_text = ustring.gsub(ref_text, 'নামক অনুচ্ছেদ', 'নং আয়াত')
break
end
end
end
if reference.snaks['P854'] then
local snak = reference.snaks['P854'][1]
if snak.datavalue then
url_value = snak.datavalue.value
end
end
end
if url_value then
ref_text = ref_text .. ', [' .. url_value .. ' সংযোগ]'
end
reference_cache[id] = ref_text
else
out_id = id
end
return {out_id, reference_cache[id]}
end
-- Returns the Wiktionary language code for a lexeme entity or nil, in the latter case, getLemmas() can be relied on to fetch the language code by stripping extraneous bits from the 'language' string as necessary
local function getLexemeLanguageCode(lexeme)
local lang_item_id = lexeme:getLanguage()
local lang_entity = getEntity(lang_item_id)
for i, statement_property in ipairs({'P305','P424', 'P220'}) do -- আইইটিএফ ভাষা ট্যাগ, উইকিমিডিয়া ভাষা কোড, আইএসও ৬৩৯-৩
local statements = lang_entity:getBestStatements(statement_property)
if statements[1] then
local code = statements[1].mainsnak.datavalue.value
if code == 'hr' then
return 'sh'
elseif code == 'pan' then
return 'pa'
else
return code
end
end
end
end
-- Return the first form of the lexeme which has exactly the given grammatical feature.
local function formWithSingleGrammaticalFeature( item_id )
for i = 1, #forms do
local grammaticalFeatures = forms[i]:getGrammaticalFeatures()
if #grammaticalFeatures == 1 and grammaticalFeatures[1] == item_id then
return forms[i]
end
end
return nil
end
local function getArticleLinkTemplate(frame, stmt_value)
local template = ''
local sitelink = getEntity(stmt_value):getSitelink(i18n['wikipedia'])
if sitelink then
template = frame:expandTemplate{
title=i18n['template_wikipedia'],
args={sitelink}
}
end
return template
end
local function getArticleLinks (frame, sense )
local article_links = ''
for i, stmt in pairs(sense:getAllStatements('P5137')) do -- এই অর্থের জন্য আইটেম
article_links = article_links .. getArticleLinkTemplate(frame, stmt.mainsnak.datavalue.value.id)
end
for i, stmt in pairs(sense:getAllStatements('P9970')) do -- এই অর্থের জন্য বিধেয়
article_links = article_links .. getArticleLinkTemplate(frame, stmt.mainsnak.datavalue.value.id)
end
return article_links
end
-- @TODO: Generalise
local function expandTemplateForProperty(frame, object, property, template)
local lemmas = {}
local n = 0
for _, stmt in pairs(object:getAllStatements(property)) do
local lex = wb.lexeme.splitLexemeId(stmt.mainsnak.datavalue.value.id)
if lex then
lex = getEntity(lex)
n = n + 1
lemmas[n] = lex:getLemma(lang_code)
end
end
if not lang_code or n == 0 then
return ''
end
-- Build args: first lang_code, then lemmas
local args = {lang_code}
for i = 1, n do
args[#args + 1] = lemmas[i]
end
return frame:expandTemplate{
title = template,
args = args
}
end
local function getExternalLinks( entity ) -- T418639
local external_links = {}
if entity.claims == nil then return external_links end
local formatter_urls = require('মডিউল:আভিধানিক উপাত্ত/urls').formatter_urls
for property_id, statements in pairs(entity.claims) do
local formatter_url = formatter_urls[property_id]
if formatter_url then
local property_source = wb.getBestStatements(property_id, 'P9073')
local source_name
if next(property_source) then
source_name = getLabel(property_source[1].mainsnak.datavalue.value.id)
or property_source[1].mainsnak.datavalue.value.id
else
source_name = getLabel(property_id) or property_id
end
for i = 1, #statements do
local stmt = statements[i]
if stmt.mainsnak.datavalue then
local formatted_link = ustring.gsub(
ustring.gsub(formatter_url, '$1', stmt.mainsnak.datavalue.value),
' ', '+'
)
table.insert(external_links,
'[' .. formatted_link .. ' ' .. source_name .. ']')
end
end
end
end
return external_links
end
p.getExternalLinks = getExternalLinks -- রেখে দিন যাতে ডিবাগিং সম্ভব হয়
local function heading_level(text, level)
return '<h' .. level .. '>' .. ' ' .. text .. ' ' .. '</h' .. level .. '>'
end
local function termSpan( term )
local text = term[1]
local lang = term[2]
local dir = mw_lang.new( lang ):getDir()
local span = html.create( 'span' )
span:attr( 'lang', lang )
:attr( 'dir', dir )
:wikitext( text )
return tostring( span )
end
local function getLemmata( current_lexeme )
local lemma_string = ''
for i, rep in pairs(current_lexeme:getLemmas()) do
if lemma_string == '' then
lemma_string = termSpan(rep)
else
lemma_string = lemma_string .. '/' .. termSpan(rep)
end
end
return lemma_string
end
local function getLinkedLemmata(lexeme, frame)
local lemma_string = ''
local lang
for i, rep in pairs(lexeme:getLemmas()) do
lang = getLexemeLanguageCode(lexeme)
if lang == nil then
lang = string.gsub(rep[2], '-%S+', '')
end
if lemma_string == '' then
lemma_string = frame:expandTemplate{title='link', args={lang, rep[1]}}
else
lemma_string = lemma_string .. '/' .. frame:expandTemplate{title='link', args={lang, rep[1]}}
end
end
return lemma_string
end
local function getExamples( current_lexeme, sense_id, references_seen )
local examples = html.create('dl')
local example_text, example_lang, example_form, example_str
for i, stmt in pairs(current_lexeme:getAllStatements('P5831')) do -- ব্যবহারের উদাহরণ
if stmt.qualifiers and stmt.qualifiers['P6072'] and stmt.qualifiers['P6072'][1].datavalue.value.id == sense_id then -- বিষয়ে লেক্সিমের অর্থ
example_text = ustring.gsub(stmt.mainsnak.datavalue.value.text, ' / ','<br/>')
example_lang = stmt.mainsnak.datavalue.value.language
local example_form_strs = {}
if stmt.qualifiers['P1810'] then
table.insert(example_form_strs, stmt.qualifiers['P1810'][1].datavalue.value)
elseif stmt.qualifiers['P5830'] then
example_form = getEntity(stmt.qualifiers['P5830'][1].datavalue.value.id) -- বিষয়ে লেক্সিমের রূপ
for _, rep in pairs(example_form:getRepresentations()) do
table.insert(example_form_strs, rep[1])
end
end
for _, example_form_str in pairs(example_form_strs) do
local new_example_text = ustring.gsub(example_text, example_form_str, "'''" .. example_form_str .. "'''")
if new_example_text ~= example_text then
example_str = termSpan({new_example_text, example_lang})
break
end
example_text = new_example_text
end
if example_str == nil then
example_str = termSpan({example_text, example_lang})
end
local reference_text = ''
if stmt.references then
for j, reference in pairs(stmt.references) do
table.insert(references_seen, reference.hash)
local got_reference = getReference(reference.hash, reference)
reference_text = reference_text .. '\n\n' .. got_reference[2]
end
end
if example_str then
examples:tag('dd'):wikitext("''" .. example_str .. "''")
if reference_text ~= '' then
examples:done():tag('dd'):css('text-indent', '2em'):wikitext(reference_text)
end
end
end
end
for i, stmt in pairs(wb.getAllStatements(sense_id, 'P5831')) do -- ব্যবহারের উদাহরণ
example_text = ustring.gsub(stmt.mainsnak.datavalue.value.text, ' / ','<br/>')
example_lang = stmt.mainsnak.datavalue.value.language
local example_form_str = nil
if stmt.qualifiers then
example_form = getEntity(stmt.qualifiers['P5830'][1].datavalue.value.id) -- বিষয়ে লেক্সিমের রূপ
if stmt.qualifiers['P1810'] then
example_form_str = stmt.qualifiers['P1810'][1].datavalue.value
end
end
if example_form and example_form_str == nil then
example_form_str = example_form:getRepresentation(i18n['content_lang_code'])
end
if example_form and example_form_str == nil then
example_form_str = example_form:getRepresentations()[1][1]
end
if example_form_str then
example_text = ustring.gsub(example_text, example_form_str, "'''" .. example_form_str .. "'''")
end
example_str = termSpan({example_text, example_lang})
local reference_text = ''
if stmt.references then
for j, reference in pairs(stmt.references) do
table.insert(references_seen, reference.hash)
local got_reference = getReference(reference.hash, reference)
reference_text = reference_text .. '\n\n' .. got_reference[2]
end
end
if example_str then
examples:tag('dd'):wikitext("''" .. example_str .. "''")
if reference_text ~= '' then
examples:done():tag('dd'):css('text-indent', '2em'):wikitext(reference_text)
end
end
end
return { tostring(examples) , references_seen }
end
-- This calls frame:preprocess() instead of :callParserFunction() because the latter does not work for Wikifunctions function calls yet (see https://www.wikifunctions.org/wiki/Wikifunctions:Embedded_function_calls).
local function callWikifunctionsFunction(args, frame)
return frame:preprocess('{{#function:' .. args .. '}}')
end
local function getOneValueForProperty(object, property)
local val
local stmts = object:getAllStatements(property)
if #stmts ~= 0 then
val = stmts[1].mainsnak.datavalue.value
end
return val
end
local function getLastValueForProperty(object, property)
local val
local stmts = object:getAllStatements(property)
for i, j in ipairs(stmts) do
count = i
end
val = stmts[count].mainsnak.datavalue.value
return val
end
local function getTranslations(frame, senses)
if #senses == 0 then
return nil
end
local all_translations = {}
local wmlang, item, label
for _, sense in pairs(senses) do
local translation_set = {}
local gloss = sense:getGloss(i18n['content_lang_code'])
if lex_cat ~= 'Q34698' then
item = getOneValueForProperty(sense, 'P5137')
if item then
item = item.id
label = getLabel(item)
end
end
if item then
wmlang = require("Module:wikimedia languages")
end
for _, stmt in pairs(sense:getAllStatements('P5972')) do
local translation = stmt.mainsnak.datavalue.value.id
local lexeme_id = wb.lexeme.splitLexemeId(translation)
local trans_lexeme = getEntity(lexeme_id)
local lang_name = getLabel(trans_lexeme:getLanguage())
local trans_code = getLexemeLanguageCode(trans_lexeme)
if trans_code then
table.insert(translation_set, lang_name .. ': ' .. frame:expandTemplate{title=i18n['template_t'], args={trans_code, getLinkedLemmata(trans_lexeme, frame) .. '<br/>'}})
else
table.insert(translation_set, lang_name .. ': ' .. getLinkedLemmata(trans_lexeme, frame) .. '<br/>' .. i18n.trans_category(lang_name))
end
end
if item then
for _, v in pairs(getEntity(item).labels) do
if string.find(v.language, '-') == nil then -- @TODO: Implement deduplication of translation and get rid of this check
local lang = wmlang.getByCode(v.language)
local wikt = lang:getWiktionaryLanguage()
if wikt:hasType('regular') then
table.insert(translation_set, getLabel(wikt:getWikidataItem()) .. ': ' .. frame:expandTemplate{title=i18n['template_t'], args={wikt:getCode(), v.value .. '<br/>'}})
end
end
end
end
if #translation_set > 0 then
local block = frame:expandTemplate{ title = i18n['template_trans-top'], args = { gloss or label } }
block = block .. table.concat(translation_set, '\n') .. frame:expandTemplate{ title = i18n['template_trans-bottom'] }
table.insert(all_translations, block)
end
end
if #all_translations == 0 then
return nil
end
return heading_level(i18n['heading_translation'], 4) .. ' \n' .. table.concat(all_translations, '\n')
end
local createicon = function(langcode, entityID, propertyID)
langcode = langcode or ""
propertyID = propertyID or ""
local icon = " <span class='penicon autoconfirmed-show'>[["
-- " <span data-bridge-edit-flow='overwrite' class='penicon'>[[" -> enable Wikidata Bridge
.. "File:OOjs UI icon edit-ltr-progressive.svg |frameless |text-top |10px |alt="
.. i18n['edit_wikidata']
.. "|link=https://www.wikidata.org/entity/" .. entityID
if langcode ~= "" then icon = icon .. "?uselang=" .. langcode end
if propertyID ~= "" then icon = icon .. "#" .. propertyID end
icon = icon .. "|" .. i18n['edit_wikidata'] .. "]]</span>"
return icon
end
local function getMeanings( frame, args, current_lexeme, senses, references_seen, language_name)
if #senses == 0 then
return {createicon(i18n['content_lang_code'], current_lexeme:getId()) .. "''" .. i18n['text_category_rfdef'] .. "''" .. i18n.tocatlink(i18n['category_rfdef']), references_seen}
end
local meanings = html.create( 'ol' )
local idlinkset = {}
for i, sense in pairs(senses) do
local item_label_gloss_parts = {}
local gloss_text_parts = {}
local main_gloss_text = frame:expandTemplate{
title=i18n['template_anchor'],
args={sense:getId()}
}
local specifiers = {}
for k, property_id in ipairs({'P6084', 'P6191', 'P9488'}) do -- অবস্থান যেখানে শব্দার্থ ব্যবহৃত, যে রীতিতে শব্দার্থ ব্যবহৃত হয়, যে ক্ষেত্রে ব্যবহৃত
for _, stmt in pairs(sense:getAllStatements(property_id)) do
local stmt_value = stmt.mainsnak.datavalue.value.id
local reference_text = ''
local refs = stmt.references
if refs then
for j, reference in pairs(refs) do
table.insert(references_seen, reference.hash)
local got_reference = getReference(reference.hash, reference)
reference_text = reference_text .. '\n\n' .. frame:extensionTag('ref', got_reference[2])
end
end
local val = getLabel(stmt_value)
table.insert(specifiers, val .. reference_text)
if property_id == 'P9488' and lang_code ~= nil then
table.insert(item_label_gloss_parts, i18n.tocatlink(lang_code .. ':' .. val))
end
end
end
if #specifiers > 0 then
main_gloss_text = main_gloss_text .. "(''" .. table.concat(specifiers, "'', ''") .. "'') "
end
local gloss = sense:getGloss( i18n['content_lang_code'] )
if gloss then
main_gloss_text = main_gloss_text .. wrapStringInWikilinks(gloss)
if gloss:match('^প্রদত্ত%s*(%S-)%s*নাম$') then -- given names
main_gloss_text = main_gloss_text .. i18n.tocatlink(language_name .. ' ' .. i18n['category_given_names'])
end
else
local other_gloss_text, other_gloss_lang, item_label
local stmt_value = getOneValueForProperty(sense, 'P5137')
if stmt_value then
stmt_value = stmt_value.id
item_label = getLabel(stmt_value)
end
if item_label then
table.insert(item_label_gloss_parts, '[[:d:' .. stmt_value .. '|' .. item_label .. ']]')
end
if #item_label_gloss_parts > 0 then
other_gloss_text = table.concat(item_label_gloss_parts, '; ')
end
if other_gloss_text == nil then
for _, fallback_lang in ipairs(mw_lang.getFallbacksFor( i18n['content_lang_code'] )) do
if sense:getGloss( fallback_lang ) then
other_gloss_text, other_gloss_lang = sense:getGloss( fallback_lang )
end
end
if other_gloss_lang == nil then
local glosses = sense:getGlosses()
for _, gloss in pairs(glosses) do
other_gloss_text = gloss[1]
other_gloss_lang = gloss[2]
break
end
end
main_gloss_text = main_gloss_text .. other_gloss_text .. "<sup><em>" .. mw_lang.fetchLanguageName(other_gloss_lang, i18n['content_lang_code']) .. "</em></sup>"
else
main_gloss_text = main_gloss_text .. "''" .. other_gloss_text .. "''"
end
main_gloss_text = main_gloss_text .. i18n.tocatlink(i18n['category_rfdef_equivalent'])
end
local synonym = expandTemplateForProperty(frame, sense, 'P5973', i18n['template_synonym'])
if synonym ~= '' then
main_gloss_text = main_gloss_text .. ' <br/> ' .. synonym
end
local antonym = expandTemplateForProperty(frame, sense, 'P5974', i18n['template_antonym'])
if antonym ~= '' then
main_gloss_text = main_gloss_text .. ' <br/> ' .. antonym
end
local hypernym = expandTemplateForProperty(frame, sense, 'P6593', i18n['template_hypernym'])
if hypernym ~= '' then
main_gloss_text = main_gloss_text .. ' <br/> ' .. hypernym
end
if lex_cat == 'Q1084' or lex_cat == 'Q147276' then -- noun or proper noun
local demonym = expandTemplateForProperty(frame, sense, 'P6271', i18n['template_demonym-noun'])
main_gloss_text = main_gloss_text .. ' <br/> ' .. demonym
elseif lex_cat == 'Q34698' then
local demonym = expandTemplateForProperty(frame, sense, 'P6271', i18n['template_demonym-adj'])
main_gloss_text = main_gloss_text .. ' <br/> ' .. demonym
end
table.insert(gloss_text_parts, main_gloss_text .. createicon(i18n['content_lang_code'], sense:getId()))
for _, stmt in pairs(sense:getAllStatements('P8394')) do -- টিপ্পনীর উদ্ধৃতি
local gloss_quote = termSpan({stmt.mainsnak.datavalue.value.text, stmt.mainsnak.datavalue.value.language})
if stmt.references[1] then
local got_reference = getReference ( stmt.references[1].hash, stmt.references[1] )
gloss_quote = '"' .. gloss_quote .. '" ' .. got_reference[2]
end
table.insert(references_seen, stmt.references[1].hash)
table.insert(gloss_text_parts, frame:extensionTag('ref', gloss_quote))
end
for _, stmt in pairs(sense:getAllStatements('P1343')) do -- বর্ণিত উৎস
-- TODO: do away with making fake reference objects
local fake_reference = { ['snaks'] = {} }
fake_reference.snaks['P248'] = { [1] = stmt.mainsnak }
local qualifiers_order = stmt['qualifiers-order']
if qualifiers_order then
for _, k in ipairs(qualifiers_order) do fake_reference.snaks[k] = stmt.qualifiers[k] end
end
fake_reference.hash = mw.hash.hashValue('sha3-512', serializeTable(fake_reference))
table.insert(references_seen, fake_reference.hash)
local got_reference = getReference(fake_reference.hash, fake_reference)
if got_reference[1] == nil then
table.insert(gloss_text_parts, frame:extensionTag('ref', got_reference[2], {name = fake_reference.hash}))
else
table.insert(gloss_text_parts, frame:extensionTag{name = 'ref', content='', args = {name = got_reference[1]}})
end
end
local first_sense_image = ''
local sense_images = sense:getAllStatements('P18')
if next(sense_images) then
first_sense_image = sense_images[1].mainsnak.datavalue.value
end
if first_sense_image ~= '' then
table.insert(gloss_text_parts, '[[চিত্র:' .. first_sense_image .. "|thumb|'''" .. getLemmata(current_lexeme) .. "'''—" .. main_gloss_text .. ']]')
end
local idlinks = getExternalLinks(sense)
if #idlinks > 0 then
local idlinktext = '<small>('
for _, idlink in pairs(idlinks) do
idlinktext = idlinktext .. idlink .. '\n'
end
idlinktext = idlinktext .. ')</small>'
table.insert(gloss_text_parts, idlinktext)
table.insert(idlinkset, idlinks)
end
local externallinks = getArticleLinks(frame, sense)
if externallinks ~= '' then
table.insert(gloss_text_parts, externallinks)
end
local new_notes = {}
local sense_keys = { sense:getId(), string.sub(sense:getId(), string.find(sense:getId(), '-')+1) }
for _, v in ipairs(sense_keys) do
if args[v] then
table.insert(new_notes, args[v])
end
end
if #new_notes > 0 then
for _, v in ipairs(new_notes) do
if i == 1 then
table.insert(gloss_text_parts, '<br/>' .. v)
else
table.insert(gloss_text_parts, v)
end
end
end
local examples
examples, references_seen = unpack(getExamples( current_lexeme, sense:getId(), references_seen ))
local gloss_text = table.concat(gloss_text_parts, '\n')
meanings:tag('li'):wikitext(gloss_text):wikitext(examples)
end
return {meanings, references_seen, idlinkset}
end
local function getPronunciationBaseForm()
local base_form = nil
-- (!) অন্য ভাষার শব্দের যদি অন্য রকম মূল ফর্ম থাকে সেগুলো এখানে নতুন if বিবৃতি দিয়ে যোগ করা যায়।
if lang_code == 'bn' then
if lex_cat == 'Q1084' then -- বিশেষ্য
base_form = formWithSingleGrammaticalFeature( 'Q131105' ) -- কর্তৃকারক
elseif lex_cat == 'Q24905' then -- ক্রিয়া
base_form = formWithSingleGrammaticalFeature( 'Q1350145' ) -- ক্রিয়া বিশেষ্য
end
end
if base_form == nil then
for i, form in pairs(forms) do
base_form = form
break
end
end
return base_form
end
local function getCombines( current_lexeme, frame )
local combines = ''
local index_mappings = {}
for i, stmt in pairs(current_lexeme:getAllStatements('P5238')) do
if stmt.qualifiers and stmt.qualifiers['P1545'] then -- ক্রম
local current_index = tonumber(stmt.qualifiers['P1545'][1].datavalue.value)
index_mappings[current_index] = stmt
end
end
if #index_mappings ~= 0 then
for i, stmt in ipairs(index_mappings) do
if stmt.mainsnak.datavalue then
local part_lexeme_id = stmt.mainsnak.datavalue.value.id
local part_lexeme = getEntity(part_lexeme_id)
local current_substring = getLinkedLemmata(part_lexeme, frame)
local part_etymology = getEtymology(part_lexeme, frame, 'partial')
if part_etymology ~= '' and part_etymology then
current_substring = current_substring .. ' (← ' .. part_etymology .. ')'
end
if combines == '' then
combines = current_substring
else -- @TODO: This should use the 'affix' and 'compound' templates instead.
combines = combines .. ' + ' .. current_substring
end
end
end
end
return combines
end
function getRoots( current_lexeme, frame )
local stmts = current_lexeme:getAllStatements('P5920')
if #stmts == 0 then return '', '', '' end
local root_lexeme = getEntity(stmts[1].mainsnak.datavalue.value.id)
return getLexemeLanguageCode(root_lexeme), '√' .. getLinkedLemmata(root_lexeme, frame), root_lexeme:getLemma('ar')
end
function getEtymology( current_lexeme, frame, mode )
-- @TODO: Fix the etymology chains that are not possible to render
local etymology = ''
local current_combines = getCombines(current_lexeme, frame)
local root_lang, current_roots, root_str = getRoots(current_lexeme, frame)
if mode ~= 'partial' and root_str then
--frame:expandTemplate{title=i18n['template_root'], args={lang_code, root_lang, root_str}}
end
local stmts = current_lexeme:getAllStatements('P5191')
local new_etymology_string
if #stmts == 0 then
if current_roots ~= '' and current_combines ~= '' and current_roots then
return current_roots .. '<br/>(' .. current_combines .. ')'
elseif current_roots ~= '' then
if lang_code == 'ar' and mode ~= 'partial' and root_str ~= matched_lemma then
return frame:expandTemplate{title=i18n['template_ar-rootbox'], args={root_str}}
else
return current_roots
end
else
return current_combines
end
end
local origin_lexeme_string
for i, stmt in pairs(stmts) do
local origin_lexeme_dv = stmt.mainsnak.datavalue -- If this is nil, the origin lexeme is not known.
if origin_lexeme_dv then
local origin_lexeme = getEntity(origin_lexeme_dv.value.id)
local origin_lexeme_lang = getLabel(origin_lexeme:getLanguage())
local sitelink = i18n.wplink(origin_lexeme:getLanguage(), origin_lexeme_lang, wb)
if sitelink ~= '' then
origin_lexeme_string = getLinkedLemmata(origin_lexeme, frame) .. ' (' .. sitelink .. ')'
else
origin_lexeme_string = getLinkedLemmata(origin_lexeme, frame) .. ' (' .. origin_lexeme_lang .. ')'
end
if stmt.qualifiers and stmt.qualifiers['P5886'] then
local mode_of_derivation = stmt.qualifiers['P5886'][1].datavalue.value.id
if mode_of_derivation == 'Q1345001' then
-- @TODO: Add support for showing gender
origin_lexeme_string = frame:expandTemplate{title=i18n['template_borrowed'], args={lang_code, getLexemeLanguageCode(origin_lexeme), getLemmata(origin_lexeme), pos=getLabel(lex_cat)}} .. ' ' .. i18n['etymology_borrowing']
elseif mode_of_derivation == 'Q845079' then
origin_lexeme_string = ustring.gsub(i18n['etymology_learned_borrowing'], '$1', origin_lexeme_string)
elseif mode_of_derivation == 'Q56611986' then
origin_lexeme_string = frame:expandTemplate{title=i18n['template_inherited'], args={lang_code, getLexemeLanguageCode(origin_lexeme), getLemmata(origin_lexeme), pos=getLabel(lex_cat)}} .. ' ' .. i18n['etymology_inheritance']
elseif mode_of_derivation == 'Q189743' then
origin_lexeme_string = frame:expandTemplate{title=i18n['template_ellipsis'], args={lang_code, getLemmata(origin_lexeme)}} .. ' ' .. i18n['etymology_ellipsis']
end
end
local origin_origin = getEtymology(origin_lexeme, frame)
if origin_origin ~= '' and origin_origin then
new_etymology_string = origin_lexeme_string .. ' ← ' .. origin_origin
else
new_etymology_string = origin_lexeme_string
end
end
if etymology == '' then
etymology = new_etymology_string
elseif origin_lexeme_string and etymology then
etymology = etymology .. ' ' .. origin_lexeme_string
elseif origin_lexeme_string and etymology == nil then
etymology = origin_lexeme_string
end
end
if current_roots ~= '' and etymology and current_roots then
etymology = etymology .. ' ' .. current_roots
elseif current_roots ~= '' and etymology == nil then
etymology = current_roots
end
if current_combines ~= '' and etymology then
etymology = etymology .. '<br/>(' .. current_combines .. ')'
end
return etymology
end
local function pronunciationBlock(block, value)
return '* ' .. i18n['text_' .. block] .. ' ' .. value
end
local function getPronunciation(frame, current_lexeme, lang_name)
local pronunciations = {}
local base_form = getPronunciationBaseForm()
local iast, iso15919_transcription, itrans, xsampa
if base_form then
for i, stmt in pairs(base_form:getAllStatements('P443')) do -- উচ্চারণের অডিও
local pronunciation_file = stmt.mainsnak.datavalue.value
local specifier_text = ''
local specifiers = {}
if stmt.qualifiers then
for k, property_id in ipairs({'P5237'}) do -- উচ্চারণের ধরন
local qual = stmt.qualifiers[property_id]
if qual then
for _, qual in pairs(qual) do
local stmt_value = qual.datavalue.value.id
table.insert(specifiers, getLabel(stmt_value))
end
end
end
end
if #specifiers > 0 then
specifier_text = table.concat(specifiers, "'', ''")
end
local audio_text
if specifier_text ~= '' then
audio_text = i18n['text_audio'] .. ' (' .. specifier_text .. ')'
else
audio_text = i18n['text_audio']
end
table.insert(pronunciations, '* ' .. frame:expandTemplate{
title= i18n['template_audio'],
args = {lang_name, pronunciation_file, audio_text}
})
end
iso15919_transcription = getOneValueForProperty(base_form, 'P5825') -- আইএসও ১৫৯১৯ প্রতিলিপিকরণ
itrans = getOneValueForProperty(base_form, 'P8881') -- ITRANS
iast = getOneValueForProperty(base_form, 'P7581') -- আইএএসটি প্রতিলিপিকরণ
xsampa = getOneValueForProperty(base_form, 'P2859')
local ipa_transcription = base_form:getAllStatements('P898') -- আধ্বব প্রতিলিপিকরণ
-- @TODO: অডিও ও প্রতিলিপিকরণ দুটোই থাকলে একটার ঠিক পরেই আরেকটা দেখানো উচিত
if #ipa_transcription ~= 0 then
for i, stmt in pairs(ipa_transcription) do
local ipa_text = stmt.mainsnak.datavalue.value
local specifier_text = ''
local specifiers = {}
if stmt.qualifiers then
for k, property_id in ipairs({'P5237'}) do -- উচ্চারণের ধরন
for l, qual in ipairs(stmt.qualifiers[property_id]) do
table.insert(specifiers, getLabel( qual.datavalue.value.id ))
end
end
end
if #specifiers > 0 then
specifier_text = "(''" .. table.concat(specifiers, "'', ''") .. "'') "
end
local syllable_count
if lang_code == 'tr' then
syllable_count = i18n['text_syllable_count'] .. ' ' .. callWikifunctionsFunction('Z10029|' .. ipa_text, frame)
else
syllable_count = i18n['text_syllable_count'] .. ' ' .. callWikifunctionsFunction('Z30837|' .. ipa_text, frame)
end
table.insert(pronunciations, '* ' .. specifier_text .. frame:expandTemplate{
title= i18n['template_ipa'],
args = {lang_name, ipa_text}
} .. '\n* ' .. syllable_count)
end
-- The following checks are ordered based on which one is expected to be true in a higher number of cases.
elseif lang_code == 'bn' then
table.insert(pronunciations, '* ' .. frame:expandTemplate{
title='bn-IPA',
})
elseif lang_code == 'ar' then
local lemma = current_lexeme:getLemma('ar')
table.insert(pronunciations, '* ' .. frame:expandTemplate{
title='ar-IPA',
args={lemma}
})
elseif lang_code == 'en' then
table.insert(pronunciations, '* ' .. i18n['text_syllable_count'] .. ' ' .. callWikifunctionsFunction('Z29940|' .. matched_lemma, frame))
elseif lang_code == 'pl' then
table.insert(pronunciations, '* ' .. frame:expandTemplate{
title='pl-IPA',
})
elseif lang_code == 'ko' then
table.insert(pronunciations, '* ' .. frame:expandTemplate{
title='ko-IPA',
})
elseif lang_code == 'fi' then
table.insert(pronunciations, '* ' .. frame:expandTemplate{
title='fi-IPA',
})
elseif lang_code == 'ta' then
table.insert(pronunciations, '* ' .. frame:expandTemplate{
title='ta-IPA',
})
elseif lang_code == 'fax' then
table.insert(pronunciations, '* ' .. frame:expandTemplate{
title='fax-pron',
})
end
end -- {{আধ্বব|en|/ˈɪntəvjuː/}}
if iso15919_transcription then
table.insert(pronunciations, pronunciationBlock('iso15919', iso15919_transcription))
end
if itrans then
table.insert(pronunciations, pronunciationBlock('itrans', itrans))
end
if iast then
table.insert(pronunciations, pronunciationBlock('iast', iast))
end
if xsampa then
table.insert(pronunciations, pronunciationBlock('xsampa', xsampa))
end
return table.concat(pronunciations, '\n')
end
local function getAlternativeSpellings( current_lexeme, frame )
local alt_spellings = {}
for i, stmt in pairs(current_lexeme:getAllStatements('P11577')) do -- বিকল্প বানান
if stmt.mainsnak.datavalue then
table.insert(alt_spellings, '* ' .. frame:expandTemplate{title=i18n['template_alter'], args={lang_code, getLemmata(getEntity(stmt.mainsnak.datavalue.value.id), frame)}})
end
end
return table.concat(alt_spellings, '\n')
end
function get_any_notes(sections, args, keys)
local notes = {}
for i, v in ipairs(keys) do
if args[v] then
table.insert(notes, args[v])
end
end
return notes
end
function add_specific_notes(sections, notes)
for i, v in ipairs(notes) do
table.insert(sections, v)
end
end
local function add_any_notes(sections, args, keys, heading)
for i, v in ipairs(keys) do
if args[v] then
if heading then
table.insert(sections, heading)
end
table.insert(sections, args[v])
end
end
end
local function getMatchingLemmaForPageTitle(lexeme, title)
local lemmas = lexeme:getLemmas()
local match
for _, lemma_entry in ipairs(lemmas) do
local lemma = lemma_entry[1]
if lemma == title then
match = lemma
break
end
end
if match == nil then
if lang_code == 'ar' then
match = lexeme:getLemma('ar')
elseif lang_code == 'rhg' then
match = lexeme:getLemma('rhg-arab')
elseif lang_id == 'Q11051ur' then
match = lexeme:getLemma('ur')
elseif lang_code == 'arz' then
match = lexeme:getLemma('arz')
end
end
return match
end
-- Returns the grammatical gender of a lexeme
local function getGenderOfLexeme(lexeme)
local gender = ''
local stmts = lexeme:getAllStatements('P5185') -- ব্যাকরণগত লিঙ্গ
if #stmts ~= 0 and stmts[1].mainsnak.datavalue then
if #stmts == 1 then
local gender_qid = stmts[1].mainsnak.datavalue.value.id
if gender_qid == 'Q499327' then
gender = 'm'
elseif gender_qid == 'Q1775415' then
gender = 'f'
elseif gender_qid == 'Q1775461' then
gender = 'n'
elseif gender_qid == 'Q1305037' then
gender = 'c'
end
end
else
for i, stmt in pairs(stmts) do
local qid = stmts[i].mainsnak.datavalue
if qid then
qid = qid.value.id
end
if qid == 'Q499327' then
gender = gender .. 'm'
elseif qid == 'Q1775415' then
gender = gender .. 'f'
end
end
end
return gender
end
-- Returns the semantic gender for a sense
-- @TODO: Complete this
local function getGenderForSense(sense)
local gender = ''
local stmts = sense:getAllStatements('P10339') -- semantic gender
if #stmts ~= 0 and stmts[1].mainsnak.datavalue then
if #stmts == 1 then
local gender_qid = stmts[1].mainsnak.datavalue.value.id
if gender_qid == 'Q6581097' then
gender = 'm'
elseif gender_qid == 'Q1775415' then
gender = 'f'
elseif gender_qid == 'Q1775461' then
gender = 'n'
elseif gender_qid == 'Q1305037' then
gender = 'c'
elseif gender_qid == 'Q70853302' then
gender = 'mfbysense'
end
end
else
for i, stmt in pairs(stmts) do
local qid = stmts[i].mainsnak.datavalue
if qid then
qid = qid.value.id
end
if qid == 'Q499327' then
gender = gender .. 'm'
elseif qid == 'Q1775415' then
gender = gender .. 'f'
end
end
end
return gender
end
local function buildLanguageAgnosticInflectionTable()
local has_image = false
local form_images = {}
for i, form in ipairs(forms) do
local form_image = form:getAllStatements('P7407')
if next(form_image) then
form_images[i] = form_image[1].mainsnak.datavalue.value
has_image = true
end
end
local table_class = "wikitable mw-collapsible sortable"
if not has_image then
table_class = table_class .. " mw-collapsed"
end
local text = "{| class='" .. table_class .. "' style='border:solid 1px rgb(80%,80%,100%); text-align:center;'\n"
text = text .. "|+ " .. i18n['heading_inflection_table'] .. "\n"
text = text .. "|- \n"
text = text .. "! " .. i18n['heading_form'] .. " !! " .. i18n['heading_grammatical_features']
if has_image then
text = text .. " !! " .. (i18n['heading_image'])
end
text = text .. " \n"
for i, form in ipairs(forms) do
local rep = form:getRepresentations()
local feat = form:getGrammaticalFeatures()
local rep_text = ""
for j, r in pairs(rep) do
if rep_text == "" then
rep_text = r[1]
else
rep_text = rep_text .. " / " .. r[1]
end
end
local feat_text = ""
if feat then
for j, f in ipairs(feat) do
local label = getLabel(f) or f
if feat_text == "" then
feat_text = label
else
feat_text = feat_text .. ", " .. label
end
end
end
text = text .. "|-\n"
text = text .. "| " .. (rep_text ~= "" and rep_text or "—")
text = text .. " || " .. (feat_text ~= "" and feat_text or "—")
if has_image then
local image_cell = "—"
if form_images[i] then
image_cell = "[[চিত্র:" .. form_images[i] .. "|50px]]"
end
text = text .. " || " .. image_cell
end
text = text .. "\n"
end
text = text .. "|}"
return text
end
function p.all(frame)
local args = getArgs(frame)
local lexeme_id = args[1]
local current_lexeme = getEntity(lexeme_id)
local language = current_lexeme:getLanguage()
lang_id = language
local senses = current_lexeme:getSenses()
local add_heading = true
forms = current_lexeme:getForms()
if args[2] then
local val = mw.text.trim(tostring(args[2]))
if val == "false" or val == "0" or val == "না" then
add_heading = false
end
end
local references_seen = {}
local sections = {}
local title = mw.title.getCurrentTitle().text
local lang_category = getLanguageForCategories(title, true)
local lang_name = getLabel(lang_category)
if add_heading == true then
local lang_heading = heading_level(lang_name, 2)
table.insert(sections, lang_heading)
end
lang_code = getLexemeLanguageCode(current_lexeme)
matched_lemma = getMatchingLemmaForPageTitle(current_lexeme, title)
lex_cat = current_lexeme:getLexicalCategory()
local cat = i18n.lang_category(getLabel(lex_cat), lang_name)
local lex_cat_template, ety_added, pron_added, alt_added
if cat then
table.insert(sections, heading_level(getLabel(lex_cat) .. cat .. frame:expandTemplate{
title = i18n['template_anchor'],
args = { lexeme_id }
}, 3))
table.insert(sections, frame:expandTemplate{
title= i18n['template_lexeme'],
args = {lexeme_id}
})
add_any_notes(sections, args, i18n['manual_category'])
local etymology = getEtymology( current_lexeme, frame )
if etymology ~= '' and etymology then
table.insert(sections, heading_level(i18n['heading_etymology'], 4))
table.insert(sections, tostring(etymology))
ety_added = true
end
if ety_added then
add_any_notes(sections, args, i18n['manual_etymology'])
else
add_any_notes(sections, args, i18n['manual_etymology'], heading_level(i18n['heading_etymology'], 4))
end
local pronunciation = getPronunciation( frame, current_lexeme, lang_name)
if pronunciation ~= '' then
table.insert(sections, heading_level(i18n['heading_pronunciation'], 4))
table.insert(sections, tostring(pronunciation))
pron_added = true
end
if pron_added then
add_any_notes(sections, args, i18n['manual_pronunciation'])
else
add_any_notes(sections, args, i18n['manual_pronunciation'], heading_level(i18n['heading_pronunciation'], 4))
end
local alternative_spellings = getAlternativeSpellings(current_lexeme, frame)
if alternative_spellings ~= '' then
table.insert(sections, heading_level(i18n['heading_alternative_spellings'], 4))
table.insert(sections, alternative_spellings)
alt_added = true
end
if alt_added then
add_any_notes(sections, args, i18n['manual_alternative_spellings'])
else
add_any_notes(sections, args, i18n['manual_alternative_spellings'], heading_level( i18n['heading_alternative_spellings'], 4))
end
local gender = getGenderOfLexeme(current_lexeme)
if lang_code and lang_code ~= 'ksy' and lang_code ~= 'rkt' then -- Skip for Kharia Thar, Rangpuri
if lex_cat == 'Q34698' then -- বিশেষণ
if lang_code == 'en' or lang_code == 'bn' then
if #forms <= 1 then
lex_cat_template = frame:expandTemplate{title= lang_code .. '-বিশেষণ'}
end
else
lex_cat_template = safeExpand(frame, lang_code .. '-adj')
if not lex_cat_template then
lex_cat_template = safeExpand(frame, lang_code .. '-বিশেষণ')
end
end
elseif lex_cat == 'Q1084' then -- @TODO: Also check for plural forms
-- The following checks are ordered based on which one is expected to be true in a higher number of cases.
if language == 'Q13955' then
if matched_lemma then
lex_cat_template = safeExpand(frame, 'ar-noun', {matched_lemma,gender})
else
lex_cat_template = frame:expandTemplate{title='ar-noun', args={nil,gender}}
end
elseif language == 'Q29919' then
lex_cat_template = frame:expandTemplate{title='arz-noun', args={g=gender}}
elseif language == 'Q397' then
if matched_lemma then
lex_cat_template = frame:expandTemplate{title='la-noun', args={matched_lemma,g=gender}}
end
elseif language == 'Q11059' then
lex_cat_template = frame:expandTemplate{title='sa-noun', args={g=gender}}
elseif language ~= 'Q1860' then -- These templates require the gender to be passed as the 1st argument.
lex_cat_template = safeExpand(frame, lang_code .. i18n['noun_template_suffix'], {gender})
if not lex_cat_template then
lex_cat_template = safeExpand(frame, lang_code .. i18n['noun_template_suffix_fallback'], {gender})
end
end
elseif lex_cat == 'Q24905' then -- ক্রিয়া
if lang_code == 'ar' then
local conj_class = getLastValueForProperty(current_lexeme, 'P5186')
if conj_class then
conj_class = wb.getLabelByLang(getLastValueForProperty(current_lexeme, 'P5186').id, 'en'):gsub('Form ', '')
lex_cat_template = frame:expandTemplate{title='ar-verb', args={conj_class}}
end
else
lex_cat_template = safeExpand(frame, lang_code .. '-verb')
end
end
end
-- elseif lex_cat == 'Q147276' then
-- lex_cat_template = safeExpand(frame, lang_code .. '-proper noun', {gender})
-- if not lex_cat_template then
-- lex_cat_template = safeExpand(frame, lang_code .. '-নামবাচক বিশেষ্য', {gender})
-- end
end
if lex_cat_template then
table.insert(sections, lex_cat_template)
else
if matched_lemma then
table.insert(sections, heading_level(matched_lemma, 4))
else
table.insert(sections, i18n.tocatlink(i18n['category_no_matching_lemma']))
end
end
local meanings, references_seen, sense_extlinks = unpack(getMeanings( frame, args, current_lexeme, senses, references_seen, lang_name))
table.insert(sections, tostring(meanings))
add_any_notes(sections, args, i18n['manual_meaning'])
local instance_of = current_lexeme:getAllStatements('P31') -- সত্ত্বার ধরন
if #instance_of ~= 0 then
local instance_of_entity = instance_of[1].mainsnak.datavalue.value.id
if instance_of_entity == 'Q376431' then -- বর্ণের নাম
table.insert(sections, i18n.tocatlink(lang_code .. ':রং'))
else
table.insert(sections, heading_level(i18n['heading_special_info'], 4) .. i18n['text_instance_of'] .. ' ' .. '[[d:' .. instance_of_entity .. '|' .. getLabel(instance_of_entity) .. ']]' .. i18n['text_sentence_terminator'])
end
end
if lex_cat ~= 'Q9788' then
local translations = getTranslations(frame, senses)
if translations then
table.insert(sections, translations)
end
end
-- (!) বিশেষ ভাষার বিভক্তির সারণি যদি থাকে সেগুলো এখানে নতুন if বিবৃতি যোগ করা যায়।
if next(forms) then
if language == 'Q9610' then -- বাংলা
if lex_cat == 'Q24905' then
local conjTable = require('মডিউল:আভিধানিক উপাত্ত/Q9610').getConjTable(frame, forms)
table.insert(sections, conjTable)
elseif lex_cat == 'Q1084' then
table.insert(sections, callWikifunctionsFunction('Z33243|' .. lexeme_id .. '|', frame))
else
if #forms > 1 then
table.insert(sections, buildLanguageAgnosticInflectionTable())
end
end
--elseif language == 'Q13955' then -- আরবি
-- if lex_cat == 'Q1084' then
-- table.insert(sections, frame:expandTemplate{title='ar-decl-noun', args={lemma}})
-- end
elseif language == 'Q188' and lex_cat == 'Q1084' then -- জার্মান
table.insert(sections, callWikifunctionsFunction('Z28602|' .. lexeme_id .. '|', frame))
--elseif language == 'Q397' and lex_cat == 'Q1084' then -- লাতিন
-- table.insert(sections, callWikifunctionsFunction('Z26333|' .. matched_lemma .. '|', frame))
elseif language == 'Q150' and lex_cat == 'Q34698' then -- ফরাসি
table.insert(sections, callWikifunctionsFunction('Z36435|' .. lexeme_id .. '|', frame))
elseif language == 'Q652' and lex_cat == 'Q34698' then -- ইতালীয়
table.insert(sections, callWikifunctionsFunction('Z36407|' .. lexeme_id .. '|', frame))
elseif language == 'Q809' or language == 'Q9058' or language == 'Q6654' or language == 'Q9056' then -- পোলীয়, স্লোভাক, ক্রোয়েশীয়, চেক
table.insert(sections, callWikifunctionsFunction('Z36421|' .. lexeme_id .. '|', frame))
elseif #forms > 1 and language ~= 'Q150' then
table.insert(sections, buildLanguageAgnosticInflectionTable())
end
end
if lex_cat == 'Q134830' then
table.insert(sections, frame:expandTemplate{title='prefixsee', args={lang_code}})
elseif lex_cat == 'Q102047' then
table.insert(sections, frame:expandTemplate{title='suffixsee', args={lang_code}})
-- elseif lex_cat == 'Q111029' then
-- table.insert(sections, frame:expandTemplate{title='rootsee', args={'+', lang_code, matched_lemma}})
end
local reference_notes = get_any_notes(sections, args, i18n['manual_reference'])
if #references_seen > 0 or #reference_notes > 0 then
table.insert(sections, heading_level(i18n['heading_references'], 4))
table.insert(sections, frame:extensionTag('references'))
add_specific_notes(sections, reference_notes)
end
local external_link_table = getExternalLinks ( current_lexeme )
if #external_link_table > 0 then
local external_links = '* ' .. table.concat(external_link_table, '\n* ')
table.insert(sections, heading_level(i18n['heading_external_links'], 4))
table.insert(sections, external_links)
end
add_any_notes(sections, args, i18n['manual_external_link'])
if #references_seen == 0 and #reference_notes == 0 and sense_extlinks and #sense_extlinks == 0 and #external_link_table == 0 and #get_any_notes(sections, args, i18n['manual_external_link']) == 0 then
table.insert(sections, i18n.rfref_category(lang_name))
end
return table.concat(sections,"\n\n")
end
return p
s1vfbsc0s1hlihls7koufpsgrshdods
512451
512450
2026-07-02T16:59:35Z
Redmin
6857
+ Z37217 and Z37219
512451
Scribunto
text/plain
local p = {}
local i18n = require('মডিউল:আভিধানিক উপাত্ত/i18n')
local references = require('মডিউল:উইকিউপাত্ত তথ্যসূত্র বিন্যাসকরণ').format
local getArgs = require('Module:Arguments').getArgs
local wb = mw.wikibase
local ustring = mw.ustring
local html = mw.html
local mw_lang = mw.language
local entity_cache = {}
local reference_cache = {}
local forms
local lang_code
local lex_cat
local matched_lemma
local lang_id
local function wrapStringInWikilinks(str)
local exceptions = i18n.nolinks
local result = str:gsub('(%S+)', function(token)
local word, trailing_char = token:match('^(.-)([;,.:!?]*)$')
local wrapped = word:gsub('[^(-/]+', function(part)
if exceptions[part] then
return part
else
return '[[' .. mw.text.nowiki(part) .. '#' .. i18n['content_lang_name'] .. '|' .. mw.text.nowiki(part) .. ']]'
end
end)
return wrapped .. trailing_char
end)
return result
end
local function serializeTable(val, name, skipnewlines, depth) -- https://stackoverflow.com/a/6081639
skipnewlines = skipnewlines or false
depth = depth or 0
local tmp = string.rep(" ", depth)
if name then tmp = tmp .. name .. " = " end
if type(val) == "table" then
tmp = tmp .. "{" .. (not skipnewlines and "\n" or "")
for k, v in pairs(val) do
tmp = tmp .. serializeTable(v, k, skipnewlines, depth + 1) .. "," .. (not skipnewlines and "\n" or "")
end
tmp = tmp .. string.rep(" ", depth) .. "}"
elseif type(val) == "number" then
tmp = tmp .. tostring(val)
elseif type(val) == "string" then
tmp = tmp .. string.format("%q", val)
elseif type(val) == "boolean" then
tmp = tmp .. (val and "true" or "false")
else
tmp = tmp .. "\"[inserializable datatype:" .. type(val) .. "]\""
end
return tmp
end
-- Use this to safely expand templates when you are not sure that they exist.
local function safeExpand(frame, title, args)
local _, result = pcall(function()
return frame:expandTemplate{ title = title, args = args }
end)
if result:find('does not exist') then -- expandTemplate{} doesn't seem to throw any error that can be handled with pcall() so string search is the only viable option.
return nil
end
return result
end
local function checkTitleCodePointInRange(title, start_point, end_point)
return ustring.find( title, '[' ..ustring.char(start_point) .. '-' .. ustring.char(end_point) .. ']' )
end
local function getLanguageForCategories( current_page_title )
-- বিশেষ ভাষার জন্য
if lang_id == 'Q11051' then -- হিন্দি/উর্দু
if checkTitleCodePointInRange(current_page_title, 0x0600, 0x06ff) then -- উর্দু
lang_id = 'Q11051ur'
elseif checkTitleCodePointInRange(current_page_title, 0x0900, 0x097f) then -- হিন্দি
lang_id = 'Q11051hi'
end
elseif lang_id == 'Q58635' then -- পাঞ্জাবি
if checkTitleCodePointInRange(current_page_title, 0x0600, 0x06ff) then -- শাহমুখী
lang_id = 'Q58635pnb'
elseif checkTitleCodePointInRange(current_page_title, 0x0a00, 0x0a7f) then -- গুরুমুখী
lang_id = 'Q58635pa'
end
elseif lang_id == 'Q56356571' then -- নয়া ফার্সি ভাষা
if checkTitleCodePointInRange(current_page_title, 0x0600, 0x06ff) then -- ফার্সি (ইরান/আফগানিস্তান)
lang_id = 'Q56356571fa'
elseif checkTitleCodePointInRange(current_page_title, 0x0400, 0x04ff) then -- তাজিক
lang_id = 'Q56356571tg'
end
end
return lang_id
end
local function getEntity( id )
if entity_cache[id] == nil then
entity_cache[id] = wb.getEntity(id) or error('Invalid ID provided: ' .. id)
end
return entity_cache[id] ~= false and entity_cache[id] or nil
end
-- Use this function to get the label of an item even if that item does not have any label in the wiki's content language or English.
local function getLabel(id)
if id == 'Q11051hi' then
return 'হিন্দি'
elseif id == 'Q11051ur' then
return 'উর্দু'
elseif id == 'Q56356571fa' then
return 'ফার্সি'
elseif id == 'Q56356571tg' then
return 'তাজিক'
elseif id == 'Q58635pa' or id == 'Q58635pnb' then
return 'পাঞ্জাবি'
end
local label = wb.getLabel(id)
if label then
return label
end
local labels = getEntity(id).labels
if not labels then
return id
end
for _, v in pairs(labels) do
if v and v.value then
return v.value
end
end
end
local function getReference( id, reference )
local out_id = nil
local url_value
if reference_cache[id] == nil then
local ref_text = references(reference, wb, mw_lang, i18n['content_lang_code'], i18n['wikipedia'])
if reference.snaks then
if reference.snaks['P248'] then
for _, snak in pairs(reference.snaks['P248']) do
if snak.datavalue and snak.datavalue.value.id == 'Q428' then -- কুরআন
ref_text = ustring.gsub(ref_text, 'নামক অনুচ্ছেদ', 'নং আয়াত')
break
end
end
end
if reference.snaks['P854'] then
local snak = reference.snaks['P854'][1]
if snak.datavalue then
url_value = snak.datavalue.value
end
end
end
if url_value then
ref_text = ref_text .. ', [' .. url_value .. ' সংযোগ]'
end
reference_cache[id] = ref_text
else
out_id = id
end
return {out_id, reference_cache[id]}
end
-- Returns the Wiktionary language code for a lexeme entity or nil, in the latter case, getLemmas() can be relied on to fetch the language code by stripping extraneous bits from the 'language' string as necessary
local function getLexemeLanguageCode(lexeme)
local lang_item_id = lexeme:getLanguage()
local lang_entity = getEntity(lang_item_id)
for i, statement_property in ipairs({'P305','P424', 'P220'}) do -- আইইটিএফ ভাষা ট্যাগ, উইকিমিডিয়া ভাষা কোড, আইএসও ৬৩৯-৩
local statements = lang_entity:getBestStatements(statement_property)
if statements[1] then
local code = statements[1].mainsnak.datavalue.value
if code == 'hr' then
return 'sh'
elseif code == 'pan' then
return 'pa'
else
return code
end
end
end
end
-- Return the first form of the lexeme which has exactly the given grammatical feature.
local function formWithSingleGrammaticalFeature( item_id )
for i = 1, #forms do
local grammaticalFeatures = forms[i]:getGrammaticalFeatures()
if #grammaticalFeatures == 1 and grammaticalFeatures[1] == item_id then
return forms[i]
end
end
return nil
end
local function getArticleLinkTemplate(frame, stmt_value)
local template = ''
local sitelink = getEntity(stmt_value):getSitelink(i18n['wikipedia'])
if sitelink then
template = frame:expandTemplate{
title=i18n['template_wikipedia'],
args={sitelink}
}
end
return template
end
local function getArticleLinks (frame, sense )
local article_links = ''
for i, stmt in pairs(sense:getAllStatements('P5137')) do -- এই অর্থের জন্য আইটেম
article_links = article_links .. getArticleLinkTemplate(frame, stmt.mainsnak.datavalue.value.id)
end
for i, stmt in pairs(sense:getAllStatements('P9970')) do -- এই অর্থের জন্য বিধেয়
article_links = article_links .. getArticleLinkTemplate(frame, stmt.mainsnak.datavalue.value.id)
end
return article_links
end
-- @TODO: Generalise
local function expandTemplateForProperty(frame, object, property, template)
local lemmas = {}
local n = 0
for _, stmt in pairs(object:getAllStatements(property)) do
local lex = wb.lexeme.splitLexemeId(stmt.mainsnak.datavalue.value.id)
if lex then
lex = getEntity(lex)
n = n + 1
lemmas[n] = lex:getLemma(lang_code)
end
end
if not lang_code or n == 0 then
return ''
end
-- Build args: first lang_code, then lemmas
local args = {lang_code}
for i = 1, n do
args[#args + 1] = lemmas[i]
end
return frame:expandTemplate{
title = template,
args = args
}
end
local function getExternalLinks( entity ) -- T418639
local external_links = {}
if entity.claims == nil then return external_links end
local formatter_urls = require('মডিউল:আভিধানিক উপাত্ত/urls').formatter_urls
for property_id, statements in pairs(entity.claims) do
local formatter_url = formatter_urls[property_id]
if formatter_url then
local property_source = wb.getBestStatements(property_id, 'P9073')
local source_name
if next(property_source) then
source_name = getLabel(property_source[1].mainsnak.datavalue.value.id)
or property_source[1].mainsnak.datavalue.value.id
else
source_name = getLabel(property_id) or property_id
end
for i = 1, #statements do
local stmt = statements[i]
if stmt.mainsnak.datavalue then
local formatted_link = ustring.gsub(
ustring.gsub(formatter_url, '$1', stmt.mainsnak.datavalue.value),
' ', '+'
)
table.insert(external_links,
'[' .. formatted_link .. ' ' .. source_name .. ']')
end
end
end
end
return external_links
end
p.getExternalLinks = getExternalLinks -- রেখে দিন যাতে ডিবাগিং সম্ভব হয়
local function heading_level(text, level)
return '<h' .. level .. '>' .. ' ' .. text .. ' ' .. '</h' .. level .. '>'
end
local function termSpan( term )
local text = term[1]
local lang = term[2]
local dir = mw_lang.new( lang ):getDir()
local span = html.create( 'span' )
span:attr( 'lang', lang )
:attr( 'dir', dir )
:wikitext( text )
return tostring( span )
end
local function getLemmata( current_lexeme )
local lemma_string = ''
for i, rep in pairs(current_lexeme:getLemmas()) do
if lemma_string == '' then
lemma_string = termSpan(rep)
else
lemma_string = lemma_string .. '/' .. termSpan(rep)
end
end
return lemma_string
end
local function getLinkedLemmata(lexeme, frame)
local lemma_string = ''
local lang
for i, rep in pairs(lexeme:getLemmas()) do
lang = getLexemeLanguageCode(lexeme)
if lang == nil then
lang = string.gsub(rep[2], '-%S+', '')
end
if lemma_string == '' then
lemma_string = frame:expandTemplate{title='link', args={lang, rep[1]}}
else
lemma_string = lemma_string .. '/' .. frame:expandTemplate{title='link', args={lang, rep[1]}}
end
end
return lemma_string
end
local function getExamples( current_lexeme, sense_id, references_seen )
local examples = html.create('dl')
local example_text, example_lang, example_form, example_str
for i, stmt in pairs(current_lexeme:getAllStatements('P5831')) do -- ব্যবহারের উদাহরণ
if stmt.qualifiers and stmt.qualifiers['P6072'] and stmt.qualifiers['P6072'][1].datavalue.value.id == sense_id then -- বিষয়ে লেক্সিমের অর্থ
example_text = ustring.gsub(stmt.mainsnak.datavalue.value.text, ' / ','<br/>')
example_lang = stmt.mainsnak.datavalue.value.language
local example_form_strs = {}
if stmt.qualifiers['P1810'] then
table.insert(example_form_strs, stmt.qualifiers['P1810'][1].datavalue.value)
elseif stmt.qualifiers['P5830'] then
example_form = getEntity(stmt.qualifiers['P5830'][1].datavalue.value.id) -- বিষয়ে লেক্সিমের রূপ
for _, rep in pairs(example_form:getRepresentations()) do
table.insert(example_form_strs, rep[1])
end
end
for _, example_form_str in pairs(example_form_strs) do
local new_example_text = ustring.gsub(example_text, example_form_str, "'''" .. example_form_str .. "'''")
if new_example_text ~= example_text then
example_str = termSpan({new_example_text, example_lang})
break
end
example_text = new_example_text
end
if example_str == nil then
example_str = termSpan({example_text, example_lang})
end
local reference_text = ''
if stmt.references then
for j, reference in pairs(stmt.references) do
table.insert(references_seen, reference.hash)
local got_reference = getReference(reference.hash, reference)
reference_text = reference_text .. '\n\n' .. got_reference[2]
end
end
if example_str then
examples:tag('dd'):wikitext("''" .. example_str .. "''")
if reference_text ~= '' then
examples:done():tag('dd'):css('text-indent', '2em'):wikitext(reference_text)
end
end
end
end
for i, stmt in pairs(wb.getAllStatements(sense_id, 'P5831')) do -- ব্যবহারের উদাহরণ
example_text = ustring.gsub(stmt.mainsnak.datavalue.value.text, ' / ','<br/>')
example_lang = stmt.mainsnak.datavalue.value.language
local example_form_str = nil
if stmt.qualifiers then
example_form = getEntity(stmt.qualifiers['P5830'][1].datavalue.value.id) -- বিষয়ে লেক্সিমের রূপ
if stmt.qualifiers['P1810'] then
example_form_str = stmt.qualifiers['P1810'][1].datavalue.value
end
end
if example_form and example_form_str == nil then
example_form_str = example_form:getRepresentation(i18n['content_lang_code'])
end
if example_form and example_form_str == nil then
example_form_str = example_form:getRepresentations()[1][1]
end
if example_form_str then
example_text = ustring.gsub(example_text, example_form_str, "'''" .. example_form_str .. "'''")
end
example_str = termSpan({example_text, example_lang})
local reference_text = ''
if stmt.references then
for j, reference in pairs(stmt.references) do
table.insert(references_seen, reference.hash)
local got_reference = getReference(reference.hash, reference)
reference_text = reference_text .. '\n\n' .. got_reference[2]
end
end
if example_str then
examples:tag('dd'):wikitext("''" .. example_str .. "''")
if reference_text ~= '' then
examples:done():tag('dd'):css('text-indent', '2em'):wikitext(reference_text)
end
end
end
return { tostring(examples) , references_seen }
end
-- This calls frame:preprocess() instead of :callParserFunction() because the latter does not work for Wikifunctions function calls yet (see https://www.wikifunctions.org/wiki/Wikifunctions:Embedded_function_calls).
local function callWikifunctionsFunction(args, frame)
return frame:preprocess('{{#function:' .. args .. '}}')
end
local function getOneValueForProperty(object, property)
local val
local stmts = object:getAllStatements(property)
if #stmts ~= 0 then
val = stmts[1].mainsnak.datavalue.value
end
return val
end
local function getLastValueForProperty(object, property)
local val
local stmts = object:getAllStatements(property)
for i, j in ipairs(stmts) do
count = i
end
val = stmts[count].mainsnak.datavalue.value
return val
end
local function getTranslations(frame, senses)
if #senses == 0 then
return nil
end
local all_translations = {}
local wmlang, item, label
for _, sense in pairs(senses) do
local translation_set = {}
local gloss = sense:getGloss(i18n['content_lang_code'])
if lex_cat ~= 'Q34698' then
item = getOneValueForProperty(sense, 'P5137')
if item then
item = item.id
label = getLabel(item)
end
end
if item then
wmlang = require("Module:wikimedia languages")
end
for _, stmt in pairs(sense:getAllStatements('P5972')) do
local translation = stmt.mainsnak.datavalue.value.id
local lexeme_id = wb.lexeme.splitLexemeId(translation)
local trans_lexeme = getEntity(lexeme_id)
local lang_name = getLabel(trans_lexeme:getLanguage())
local trans_code = getLexemeLanguageCode(trans_lexeme)
if trans_code then
table.insert(translation_set, lang_name .. ': ' .. frame:expandTemplate{title=i18n['template_t'], args={trans_code, getLinkedLemmata(trans_lexeme, frame) .. '<br/>'}})
else
table.insert(translation_set, lang_name .. ': ' .. getLinkedLemmata(trans_lexeme, frame) .. '<br/>' .. i18n.trans_category(lang_name))
end
end
if item then
for _, v in pairs(getEntity(item).labels) do
if string.find(v.language, '-') == nil then -- @TODO: Implement deduplication of translation and get rid of this check
local lang = wmlang.getByCode(v.language)
local wikt = lang:getWiktionaryLanguage()
if wikt:hasType('regular') then
table.insert(translation_set, getLabel(wikt:getWikidataItem()) .. ': ' .. frame:expandTemplate{title=i18n['template_t'], args={wikt:getCode(), v.value .. '<br/>'}})
end
end
end
end
if #translation_set > 0 then
local block = frame:expandTemplate{ title = i18n['template_trans-top'], args = { gloss or label } }
block = block .. table.concat(translation_set, '\n') .. frame:expandTemplate{ title = i18n['template_trans-bottom'] }
table.insert(all_translations, block)
end
end
if #all_translations == 0 then
return nil
end
return heading_level(i18n['heading_translation'], 4) .. ' \n' .. table.concat(all_translations, '\n')
end
local createicon = function(langcode, entityID, propertyID)
langcode = langcode or ""
propertyID = propertyID or ""
local icon = " <span class='penicon autoconfirmed-show'>[["
-- " <span data-bridge-edit-flow='overwrite' class='penicon'>[[" -> enable Wikidata Bridge
.. "File:OOjs UI icon edit-ltr-progressive.svg |frameless |text-top |10px |alt="
.. i18n['edit_wikidata']
.. "|link=https://www.wikidata.org/entity/" .. entityID
if langcode ~= "" then icon = icon .. "?uselang=" .. langcode end
if propertyID ~= "" then icon = icon .. "#" .. propertyID end
icon = icon .. "|" .. i18n['edit_wikidata'] .. "]]</span>"
return icon
end
local function getMeanings( frame, args, current_lexeme, senses, references_seen, language_name)
if #senses == 0 then
return {createicon(i18n['content_lang_code'], current_lexeme:getId()) .. "''" .. i18n['text_category_rfdef'] .. "''" .. i18n.tocatlink(i18n['category_rfdef']), references_seen}
end
local meanings = html.create( 'ol' )
local idlinkset = {}
for i, sense in pairs(senses) do
local item_label_gloss_parts = {}
local gloss_text_parts = {}
local main_gloss_text = frame:expandTemplate{
title=i18n['template_anchor'],
args={sense:getId()}
}
local specifiers = {}
for k, property_id in ipairs({'P6084', 'P6191', 'P9488'}) do -- অবস্থান যেখানে শব্দার্থ ব্যবহৃত, যে রীতিতে শব্দার্থ ব্যবহৃত হয়, যে ক্ষেত্রে ব্যবহৃত
for _, stmt in pairs(sense:getAllStatements(property_id)) do
local stmt_value = stmt.mainsnak.datavalue.value.id
local reference_text = ''
local refs = stmt.references
if refs then
for j, reference in pairs(refs) do
table.insert(references_seen, reference.hash)
local got_reference = getReference(reference.hash, reference)
reference_text = reference_text .. '\n\n' .. frame:extensionTag('ref', got_reference[2])
end
end
local val = getLabel(stmt_value)
table.insert(specifiers, val .. reference_text)
if property_id == 'P9488' and lang_code ~= nil then
table.insert(item_label_gloss_parts, i18n.tocatlink(lang_code .. ':' .. val))
end
end
end
if #specifiers > 0 then
main_gloss_text = main_gloss_text .. "(''" .. table.concat(specifiers, "'', ''") .. "'') "
end
local gloss = sense:getGloss( i18n['content_lang_code'] )
if gloss then
main_gloss_text = main_gloss_text .. wrapStringInWikilinks(gloss)
if gloss:match('^প্রদত্ত%s*(%S-)%s*নাম$') then -- given names
main_gloss_text = main_gloss_text .. i18n.tocatlink(language_name .. ' ' .. i18n['category_given_names'])
end
else
local other_gloss_text, other_gloss_lang, item_label
local stmt_value = getOneValueForProperty(sense, 'P5137')
if stmt_value then
stmt_value = stmt_value.id
item_label = getLabel(stmt_value)
end
if item_label then
table.insert(item_label_gloss_parts, '[[:d:' .. stmt_value .. '|' .. item_label .. ']]')
end
if #item_label_gloss_parts > 0 then
other_gloss_text = table.concat(item_label_gloss_parts, '; ')
end
if other_gloss_text == nil then
for _, fallback_lang in ipairs(mw_lang.getFallbacksFor( i18n['content_lang_code'] )) do
if sense:getGloss( fallback_lang ) then
other_gloss_text, other_gloss_lang = sense:getGloss( fallback_lang )
end
end
if other_gloss_lang == nil then
local glosses = sense:getGlosses()
for _, gloss in pairs(glosses) do
other_gloss_text = gloss[1]
other_gloss_lang = gloss[2]
break
end
end
main_gloss_text = main_gloss_text .. other_gloss_text .. "<sup><em>" .. mw_lang.fetchLanguageName(other_gloss_lang, i18n['content_lang_code']) .. "</em></sup>"
else
main_gloss_text = main_gloss_text .. "''" .. other_gloss_text .. "''"
end
main_gloss_text = main_gloss_text .. i18n.tocatlink(i18n['category_rfdef_equivalent'])
end
local synonym = expandTemplateForProperty(frame, sense, 'P5973', i18n['template_synonym'])
if synonym ~= '' then
main_gloss_text = main_gloss_text .. ' <br/> ' .. synonym
end
local antonym = expandTemplateForProperty(frame, sense, 'P5974', i18n['template_antonym'])
if antonym ~= '' then
main_gloss_text = main_gloss_text .. ' <br/> ' .. antonym
end
local hypernym = expandTemplateForProperty(frame, sense, 'P6593', i18n['template_hypernym'])
if hypernym ~= '' then
main_gloss_text = main_gloss_text .. ' <br/> ' .. hypernym
end
if lex_cat == 'Q1084' or lex_cat == 'Q147276' then -- noun or proper noun
local demonym = expandTemplateForProperty(frame, sense, 'P6271', i18n['template_demonym-noun'])
main_gloss_text = main_gloss_text .. ' <br/> ' .. demonym
elseif lex_cat == 'Q34698' then
local demonym = expandTemplateForProperty(frame, sense, 'P6271', i18n['template_demonym-adj'])
main_gloss_text = main_gloss_text .. ' <br/> ' .. demonym
end
table.insert(gloss_text_parts, main_gloss_text .. createicon(i18n['content_lang_code'], sense:getId()))
for _, stmt in pairs(sense:getAllStatements('P8394')) do -- টিপ্পনীর উদ্ধৃতি
local gloss_quote = termSpan({stmt.mainsnak.datavalue.value.text, stmt.mainsnak.datavalue.value.language})
if stmt.references[1] then
local got_reference = getReference ( stmt.references[1].hash, stmt.references[1] )
gloss_quote = '"' .. gloss_quote .. '" ' .. got_reference[2]
end
table.insert(references_seen, stmt.references[1].hash)
table.insert(gloss_text_parts, frame:extensionTag('ref', gloss_quote))
end
for _, stmt in pairs(sense:getAllStatements('P1343')) do -- বর্ণিত উৎস
-- TODO: do away with making fake reference objects
local fake_reference = { ['snaks'] = {} }
fake_reference.snaks['P248'] = { [1] = stmt.mainsnak }
local qualifiers_order = stmt['qualifiers-order']
if qualifiers_order then
for _, k in ipairs(qualifiers_order) do fake_reference.snaks[k] = stmt.qualifiers[k] end
end
fake_reference.hash = mw.hash.hashValue('sha3-512', serializeTable(fake_reference))
table.insert(references_seen, fake_reference.hash)
local got_reference = getReference(fake_reference.hash, fake_reference)
if got_reference[1] == nil then
table.insert(gloss_text_parts, frame:extensionTag('ref', got_reference[2], {name = fake_reference.hash}))
else
table.insert(gloss_text_parts, frame:extensionTag{name = 'ref', content='', args = {name = got_reference[1]}})
end
end
local first_sense_image = ''
local sense_images = sense:getAllStatements('P18')
if next(sense_images) then
first_sense_image = sense_images[1].mainsnak.datavalue.value
end
if first_sense_image ~= '' then
table.insert(gloss_text_parts, '[[চিত্র:' .. first_sense_image .. "|thumb|'''" .. getLemmata(current_lexeme) .. "'''—" .. main_gloss_text .. ']]')
end
local idlinks = getExternalLinks(sense)
if #idlinks > 0 then
local idlinktext = '<small>('
for _, idlink in pairs(idlinks) do
idlinktext = idlinktext .. idlink .. '\n'
end
idlinktext = idlinktext .. ')</small>'
table.insert(gloss_text_parts, idlinktext)
table.insert(idlinkset, idlinks)
end
local externallinks = getArticleLinks(frame, sense)
if externallinks ~= '' then
table.insert(gloss_text_parts, externallinks)
end
local new_notes = {}
local sense_keys = { sense:getId(), string.sub(sense:getId(), string.find(sense:getId(), '-')+1) }
for _, v in ipairs(sense_keys) do
if args[v] then
table.insert(new_notes, args[v])
end
end
if #new_notes > 0 then
for _, v in ipairs(new_notes) do
if i == 1 then
table.insert(gloss_text_parts, '<br/>' .. v)
else
table.insert(gloss_text_parts, v)
end
end
end
local examples
examples, references_seen = unpack(getExamples( current_lexeme, sense:getId(), references_seen ))
local gloss_text = table.concat(gloss_text_parts, '\n')
meanings:tag('li'):wikitext(gloss_text):wikitext(examples)
end
return {meanings, references_seen, idlinkset}
end
local function getPronunciationBaseForm()
local base_form = nil
-- (!) অন্য ভাষার শব্দের যদি অন্য রকম মূল ফর্ম থাকে সেগুলো এখানে নতুন if বিবৃতি দিয়ে যোগ করা যায়।
if lang_code == 'bn' then
if lex_cat == 'Q1084' then -- বিশেষ্য
base_form = formWithSingleGrammaticalFeature( 'Q131105' ) -- কর্তৃকারক
elseif lex_cat == 'Q24905' then -- ক্রিয়া
base_form = formWithSingleGrammaticalFeature( 'Q1350145' ) -- ক্রিয়া বিশেষ্য
end
end
if base_form == nil then
for i, form in pairs(forms) do
base_form = form
break
end
end
return base_form
end
local function getCombines( current_lexeme, frame )
local combines = ''
local index_mappings = {}
for i, stmt in pairs(current_lexeme:getAllStatements('P5238')) do
if stmt.qualifiers and stmt.qualifiers['P1545'] then -- ক্রম
local current_index = tonumber(stmt.qualifiers['P1545'][1].datavalue.value)
index_mappings[current_index] = stmt
end
end
if #index_mappings ~= 0 then
for i, stmt in ipairs(index_mappings) do
if stmt.mainsnak.datavalue then
local part_lexeme_id = stmt.mainsnak.datavalue.value.id
local part_lexeme = getEntity(part_lexeme_id)
local current_substring = getLinkedLemmata(part_lexeme, frame)
local part_etymology = getEtymology(part_lexeme, frame, 'partial')
if part_etymology ~= '' and part_etymology then
current_substring = current_substring .. ' (← ' .. part_etymology .. ')'
end
if combines == '' then
combines = current_substring
else -- @TODO: This should use the 'affix' and 'compound' templates instead.
combines = combines .. ' + ' .. current_substring
end
end
end
end
return combines
end
function getRoots( current_lexeme, frame )
local stmts = current_lexeme:getAllStatements('P5920')
if #stmts == 0 then return '', '', '' end
local root_lexeme = getEntity(stmts[1].mainsnak.datavalue.value.id)
return getLexemeLanguageCode(root_lexeme), '√' .. getLinkedLemmata(root_lexeme, frame), root_lexeme:getLemma('ar')
end
function getEtymology( current_lexeme, frame, mode )
-- @TODO: Fix the etymology chains that are not possible to render
local etymology = ''
local current_combines = getCombines(current_lexeme, frame)
local root_lang, current_roots, root_str = getRoots(current_lexeme, frame)
if mode ~= 'partial' and root_str then
--frame:expandTemplate{title=i18n['template_root'], args={lang_code, root_lang, root_str}}
end
local stmts = current_lexeme:getAllStatements('P5191')
local new_etymology_string
if #stmts == 0 then
if current_roots ~= '' and current_combines ~= '' and current_roots then
return current_roots .. '<br/>(' .. current_combines .. ')'
elseif current_roots ~= '' then
if lang_code == 'ar' and mode ~= 'partial' and root_str ~= matched_lemma then
return frame:expandTemplate{title=i18n['template_ar-rootbox'], args={root_str}}
else
return current_roots
end
else
return current_combines
end
end
local origin_lexeme_string
for i, stmt in pairs(stmts) do
local origin_lexeme_dv = stmt.mainsnak.datavalue -- If this is nil, the origin lexeme is not known.
if origin_lexeme_dv then
local origin_lexeme = getEntity(origin_lexeme_dv.value.id)
local origin_lexeme_lang = getLabel(origin_lexeme:getLanguage())
local sitelink = i18n.wplink(origin_lexeme:getLanguage(), origin_lexeme_lang, wb)
if sitelink ~= '' then
origin_lexeme_string = getLinkedLemmata(origin_lexeme, frame) .. ' (' .. sitelink .. ')'
else
origin_lexeme_string = getLinkedLemmata(origin_lexeme, frame) .. ' (' .. origin_lexeme_lang .. ')'
end
if stmt.qualifiers and stmt.qualifiers['P5886'] then
local mode_of_derivation = stmt.qualifiers['P5886'][1].datavalue.value.id
if mode_of_derivation == 'Q1345001' then
-- @TODO: Add support for showing gender
origin_lexeme_string = frame:expandTemplate{title=i18n['template_borrowed'], args={lang_code, getLexemeLanguageCode(origin_lexeme), getLemmata(origin_lexeme), pos=getLabel(lex_cat)}} .. ' ' .. i18n['etymology_borrowing']
elseif mode_of_derivation == 'Q845079' then
origin_lexeme_string = ustring.gsub(i18n['etymology_learned_borrowing'], '$1', origin_lexeme_string)
elseif mode_of_derivation == 'Q56611986' then
origin_lexeme_string = frame:expandTemplate{title=i18n['template_inherited'], args={lang_code, getLexemeLanguageCode(origin_lexeme), getLemmata(origin_lexeme), pos=getLabel(lex_cat)}} .. ' ' .. i18n['etymology_inheritance']
elseif mode_of_derivation == 'Q189743' then
origin_lexeme_string = frame:expandTemplate{title=i18n['template_ellipsis'], args={lang_code, getLemmata(origin_lexeme)}} .. ' ' .. i18n['etymology_ellipsis']
end
end
local origin_origin = getEtymology(origin_lexeme, frame)
if origin_origin ~= '' and origin_origin then
new_etymology_string = origin_lexeme_string .. ' ← ' .. origin_origin
else
new_etymology_string = origin_lexeme_string
end
end
if etymology == '' then
etymology = new_etymology_string
elseif origin_lexeme_string and etymology then
etymology = etymology .. ' ' .. origin_lexeme_string
elseif origin_lexeme_string and etymology == nil then
etymology = origin_lexeme_string
end
end
if current_roots ~= '' and etymology and current_roots then
etymology = etymology .. ' ' .. current_roots
elseif current_roots ~= '' and etymology == nil then
etymology = current_roots
end
if current_combines ~= '' and etymology then
etymology = etymology .. '<br/>(' .. current_combines .. ')'
end
return etymology
end
local function pronunciationBlock(block, value)
return '* ' .. i18n['text_' .. block] .. ' ' .. value
end
local function getPronunciation(frame, current_lexeme, lang_name)
local pronunciations = {}
local base_form = getPronunciationBaseForm()
local iast, iso15919_transcription, itrans, xsampa
if base_form then
for i, stmt in pairs(base_form:getAllStatements('P443')) do -- উচ্চারণের অডিও
local pronunciation_file = stmt.mainsnak.datavalue.value
local specifier_text = ''
local specifiers = {}
if stmt.qualifiers then
for k, property_id in ipairs({'P5237'}) do -- উচ্চারণের ধরন
local qual = stmt.qualifiers[property_id]
if qual then
for _, qual in pairs(qual) do
local stmt_value = qual.datavalue.value.id
table.insert(specifiers, getLabel(stmt_value))
end
end
end
end
if #specifiers > 0 then
specifier_text = table.concat(specifiers, "'', ''")
end
local audio_text
if specifier_text ~= '' then
audio_text = i18n['text_audio'] .. ' (' .. specifier_text .. ')'
else
audio_text = i18n['text_audio']
end
table.insert(pronunciations, '* ' .. frame:expandTemplate{
title= i18n['template_audio'],
args = {lang_name, pronunciation_file, audio_text}
})
end
iso15919_transcription = getOneValueForProperty(base_form, 'P5825') -- আইএসও ১৫৯১৯ প্রতিলিপিকরণ
itrans = getOneValueForProperty(base_form, 'P8881') -- ITRANS
iast = getOneValueForProperty(base_form, 'P7581') -- আইএএসটি প্রতিলিপিকরণ
xsampa = getOneValueForProperty(base_form, 'P2859')
local ipa_transcription = base_form:getAllStatements('P898') -- আধ্বব প্রতিলিপিকরণ
-- @TODO: অডিও ও প্রতিলিপিকরণ দুটোই থাকলে একটার ঠিক পরেই আরেকটা দেখানো উচিত
if #ipa_transcription ~= 0 then
for i, stmt in pairs(ipa_transcription) do
local ipa_text = stmt.mainsnak.datavalue.value
local specifier_text = ''
local specifiers = {}
if stmt.qualifiers then
for k, property_id in ipairs({'P5237'}) do -- উচ্চারণের ধরন
for l, qual in ipairs(stmt.qualifiers[property_id]) do
table.insert(specifiers, getLabel( qual.datavalue.value.id ))
end
end
end
if #specifiers > 0 then
specifier_text = "(''" .. table.concat(specifiers, "'', ''") .. "'') "
end
local syllable_count
if lang_code == 'tr' then
syllable_count = i18n['text_syllable_count'] .. ' ' .. callWikifunctionsFunction('Z10029|' .. ipa_text, frame)
else
syllable_count = i18n['text_syllable_count'] .. ' ' .. callWikifunctionsFunction('Z30837|' .. ipa_text, frame)
end
table.insert(pronunciations, '* ' .. specifier_text .. frame:expandTemplate{
title= i18n['template_ipa'],
args = {lang_name, ipa_text}
} .. '\n* ' .. syllable_count)
end
-- The following checks are ordered based on which one is expected to be true in a higher number of cases.
elseif lang_code == 'bn' then
table.insert(pronunciations, '* ' .. frame:expandTemplate{
title='bn-IPA',
})
elseif lang_code == 'ar' then
local lemma = current_lexeme:getLemma('ar')
table.insert(pronunciations, '* ' .. frame:expandTemplate{
title='ar-IPA',
args={lemma}
})
elseif lang_code == 'en' then
table.insert(pronunciations, '* ' .. i18n['text_syllable_count'] .. ' ' .. callWikifunctionsFunction('Z29940|' .. matched_lemma, frame))
elseif lang_code == 'pl' then
table.insert(pronunciations, '* ' .. frame:expandTemplate{
title='pl-IPA',
})
elseif lang_code == 'ko' then
table.insert(pronunciations, '* ' .. frame:expandTemplate{
title='ko-IPA',
})
elseif lang_code == 'fi' then
table.insert(pronunciations, '* ' .. frame:expandTemplate{
title='fi-IPA',
})
elseif lang_code == 'ta' then
table.insert(pronunciations, '* ' .. frame:expandTemplate{
title='ta-IPA',
})
elseif lang_code == 'fax' then
table.insert(pronunciations, '* ' .. frame:expandTemplate{
title='fax-pron',
})
end
end -- {{আধ্বব|en|/ˈɪntəvjuː/}}
if iso15919_transcription then
table.insert(pronunciations, pronunciationBlock('iso15919', iso15919_transcription))
end
if itrans then
table.insert(pronunciations, pronunciationBlock('itrans', itrans))
end
if iast then
table.insert(pronunciations, pronunciationBlock('iast', iast))
end
if xsampa then
table.insert(pronunciations, pronunciationBlock('xsampa', xsampa))
end
return table.concat(pronunciations, '\n')
end
local function getAlternativeSpellings( current_lexeme, frame )
local alt_spellings = {}
for i, stmt in pairs(current_lexeme:getAllStatements('P11577')) do -- বিকল্প বানান
if stmt.mainsnak.datavalue then
table.insert(alt_spellings, '* ' .. frame:expandTemplate{title=i18n['template_alter'], args={lang_code, getLemmata(getEntity(stmt.mainsnak.datavalue.value.id), frame)}})
end
end
return table.concat(alt_spellings, '\n')
end
function get_any_notes(sections, args, keys)
local notes = {}
for i, v in ipairs(keys) do
if args[v] then
table.insert(notes, args[v])
end
end
return notes
end
function add_specific_notes(sections, notes)
for i, v in ipairs(notes) do
table.insert(sections, v)
end
end
local function add_any_notes(sections, args, keys, heading)
for i, v in ipairs(keys) do
if args[v] then
if heading then
table.insert(sections, heading)
end
table.insert(sections, args[v])
end
end
end
local function getMatchingLemmaForPageTitle(lexeme, title)
local lemmas = lexeme:getLemmas()
local match
for _, lemma_entry in ipairs(lemmas) do
local lemma = lemma_entry[1]
if lemma == title then
match = lemma
break
end
end
if match == nil then
if lang_code == 'ar' then
match = lexeme:getLemma('ar')
elseif lang_code == 'rhg' then
match = lexeme:getLemma('rhg-arab')
elseif lang_id == 'Q11051ur' then
match = lexeme:getLemma('ur')
elseif lang_code == 'arz' then
match = lexeme:getLemma('arz')
end
end
return match
end
-- Returns the grammatical gender of a lexeme
local function getGenderOfLexeme(lexeme)
local gender = ''
local stmts = lexeme:getAllStatements('P5185') -- ব্যাকরণগত লিঙ্গ
if #stmts ~= 0 and stmts[1].mainsnak.datavalue then
if #stmts == 1 then
local gender_qid = stmts[1].mainsnak.datavalue.value.id
if gender_qid == 'Q499327' then
gender = 'm'
elseif gender_qid == 'Q1775415' then
gender = 'f'
elseif gender_qid == 'Q1775461' then
gender = 'n'
elseif gender_qid == 'Q1305037' then
gender = 'c'
end
end
else
for i, stmt in pairs(stmts) do
local qid = stmts[i].mainsnak.datavalue
if qid then
qid = qid.value.id
end
if qid == 'Q499327' then
gender = gender .. 'm'
elseif qid == 'Q1775415' then
gender = gender .. 'f'
end
end
end
return gender
end
-- Returns the semantic gender for a sense
-- @TODO: Complete this
local function getGenderForSense(sense)
local gender = ''
local stmts = sense:getAllStatements('P10339') -- semantic gender
if #stmts ~= 0 and stmts[1].mainsnak.datavalue then
if #stmts == 1 then
local gender_qid = stmts[1].mainsnak.datavalue.value.id
if gender_qid == 'Q6581097' then
gender = 'm'
elseif gender_qid == 'Q1775415' then
gender = 'f'
elseif gender_qid == 'Q1775461' then
gender = 'n'
elseif gender_qid == 'Q1305037' then
gender = 'c'
elseif gender_qid == 'Q70853302' then
gender = 'mfbysense'
end
end
else
for i, stmt in pairs(stmts) do
local qid = stmts[i].mainsnak.datavalue
if qid then
qid = qid.value.id
end
if qid == 'Q499327' then
gender = gender .. 'm'
elseif qid == 'Q1775415' then
gender = gender .. 'f'
end
end
end
return gender
end
local function buildLanguageAgnosticInflectionTable()
local has_image = false
local form_images = {}
for i, form in ipairs(forms) do
local form_image = form:getAllStatements('P7407')
if next(form_image) then
form_images[i] = form_image[1].mainsnak.datavalue.value
has_image = true
end
end
local table_class = "wikitable mw-collapsible sortable"
if not has_image then
table_class = table_class .. " mw-collapsed"
end
local text = "{| class='" .. table_class .. "' style='border:solid 1px rgb(80%,80%,100%); text-align:center;'\n"
text = text .. "|+ " .. i18n['heading_inflection_table'] .. "\n"
text = text .. "|- \n"
text = text .. "! " .. i18n['heading_form'] .. " !! " .. i18n['heading_grammatical_features']
if has_image then
text = text .. " !! " .. (i18n['heading_image'])
end
text = text .. " \n"
for i, form in ipairs(forms) do
local rep = form:getRepresentations()
local feat = form:getGrammaticalFeatures()
local rep_text = ""
for j, r in pairs(rep) do
if rep_text == "" then
rep_text = r[1]
else
rep_text = rep_text .. " / " .. r[1]
end
end
local feat_text = ""
if feat then
for j, f in ipairs(feat) do
local label = getLabel(f) or f
if feat_text == "" then
feat_text = label
else
feat_text = feat_text .. ", " .. label
end
end
end
text = text .. "|-\n"
text = text .. "| " .. (rep_text ~= "" and rep_text or "—")
text = text .. " || " .. (feat_text ~= "" and feat_text or "—")
if has_image then
local image_cell = "—"
if form_images[i] then
image_cell = "[[চিত্র:" .. form_images[i] .. "|50px]]"
end
text = text .. " || " .. image_cell
end
text = text .. "\n"
end
text = text .. "|}"
return text
end
function p.all(frame)
local args = getArgs(frame)
local lexeme_id = args[1]
local current_lexeme = getEntity(lexeme_id)
local language = current_lexeme:getLanguage()
lang_id = language
local senses = current_lexeme:getSenses()
local add_heading = true
forms = current_lexeme:getForms()
if args[2] then
local val = mw.text.trim(tostring(args[2]))
if val == "false" or val == "0" or val == "না" then
add_heading = false
end
end
local references_seen = {}
local sections = {}
local title = mw.title.getCurrentTitle().text
local lang_category = getLanguageForCategories(title, true)
local lang_name = getLabel(lang_category)
if add_heading == true then
local lang_heading = heading_level(lang_name, 2)
table.insert(sections, lang_heading)
end
lang_code = getLexemeLanguageCode(current_lexeme)
matched_lemma = getMatchingLemmaForPageTitle(current_lexeme, title)
lex_cat = current_lexeme:getLexicalCategory()
local cat = i18n.lang_category(getLabel(lex_cat), lang_name)
local lex_cat_template, ety_added, pron_added, alt_added
if cat then
table.insert(sections, heading_level(getLabel(lex_cat) .. cat .. frame:expandTemplate{
title = i18n['template_anchor'],
args = { lexeme_id }
}, 3))
table.insert(sections, frame:expandTemplate{
title= i18n['template_lexeme'],
args = {lexeme_id}
})
add_any_notes(sections, args, i18n['manual_category'])
local etymology = getEtymology( current_lexeme, frame )
if etymology ~= '' and etymology then
table.insert(sections, heading_level(i18n['heading_etymology'], 4))
table.insert(sections, tostring(etymology))
ety_added = true
end
if ety_added then
add_any_notes(sections, args, i18n['manual_etymology'])
else
add_any_notes(sections, args, i18n['manual_etymology'], heading_level(i18n['heading_etymology'], 4))
end
local pronunciation = getPronunciation( frame, current_lexeme, lang_name)
if pronunciation ~= '' then
table.insert(sections, heading_level(i18n['heading_pronunciation'], 4))
table.insert(sections, tostring(pronunciation))
pron_added = true
end
if pron_added then
add_any_notes(sections, args, i18n['manual_pronunciation'])
else
add_any_notes(sections, args, i18n['manual_pronunciation'], heading_level(i18n['heading_pronunciation'], 4))
end
local alternative_spellings = getAlternativeSpellings(current_lexeme, frame)
if alternative_spellings ~= '' then
table.insert(sections, heading_level(i18n['heading_alternative_spellings'], 4))
table.insert(sections, alternative_spellings)
alt_added = true
end
if alt_added then
add_any_notes(sections, args, i18n['manual_alternative_spellings'])
else
add_any_notes(sections, args, i18n['manual_alternative_spellings'], heading_level( i18n['heading_alternative_spellings'], 4))
end
local gender = getGenderOfLexeme(current_lexeme)
if lang_code and lang_code ~= 'ksy' and lang_code ~= 'rkt' then -- Skip for Kharia Thar, Rangpuri
if lex_cat == 'Q34698' then -- বিশেষণ
if lang_code == 'en' or lang_code == 'bn' then
if #forms <= 1 then
lex_cat_template = frame:expandTemplate{title= lang_code .. '-বিশেষণ'}
end
else
lex_cat_template = safeExpand(frame, lang_code .. '-adj')
if not lex_cat_template then
lex_cat_template = safeExpand(frame, lang_code .. '-বিশেষণ')
end
end
elseif lex_cat == 'Q1084' then -- @TODO: Also check for plural forms
-- The following checks are ordered based on which one is expected to be true in a higher number of cases.
if language == 'Q13955' then
if matched_lemma then
lex_cat_template = safeExpand(frame, 'ar-noun', {matched_lemma,gender})
else
lex_cat_template = frame:expandTemplate{title='ar-noun', args={nil,gender}}
end
elseif language == 'Q29919' then
lex_cat_template = frame:expandTemplate{title='arz-noun', args={g=gender}}
elseif language == 'Q397' then
if matched_lemma then
lex_cat_template = frame:expandTemplate{title='la-noun', args={matched_lemma,g=gender}}
end
elseif language == 'Q11059' then
lex_cat_template = frame:expandTemplate{title='sa-noun', args={g=gender}}
elseif language ~= 'Q1860' then -- These templates require the gender to be passed as the 1st argument.
lex_cat_template = safeExpand(frame, lang_code .. i18n['noun_template_suffix'], {gender})
if not lex_cat_template then
lex_cat_template = safeExpand(frame, lang_code .. i18n['noun_template_suffix_fallback'], {gender})
end
end
elseif lex_cat == 'Q24905' then -- ক্রিয়া
if lang_code == 'ar' then
local conj_class = getLastValueForProperty(current_lexeme, 'P5186')
if conj_class then
conj_class = wb.getLabelByLang(getLastValueForProperty(current_lexeme, 'P5186').id, 'en'):gsub('Form ', '')
lex_cat_template = frame:expandTemplate{title='ar-verb', args={conj_class}}
end
else
lex_cat_template = safeExpand(frame, lang_code .. '-verb')
end
end
end
-- elseif lex_cat == 'Q147276' then
-- lex_cat_template = safeExpand(frame, lang_code .. '-proper noun', {gender})
-- if not lex_cat_template then
-- lex_cat_template = safeExpand(frame, lang_code .. '-নামবাচক বিশেষ্য', {gender})
-- end
end
if lex_cat_template then
table.insert(sections, lex_cat_template)
else
if matched_lemma then
table.insert(sections, heading_level(matched_lemma, 4))
else
table.insert(sections, i18n.tocatlink(i18n['category_no_matching_lemma']))
end
end
local meanings, references_seen, sense_extlinks = unpack(getMeanings( frame, args, current_lexeme, senses, references_seen, lang_name))
table.insert(sections, tostring(meanings))
add_any_notes(sections, args, i18n['manual_meaning'])
local instance_of = current_lexeme:getAllStatements('P31') -- সত্ত্বার ধরন
if #instance_of ~= 0 then
local instance_of_entity = instance_of[1].mainsnak.datavalue.value.id
if instance_of_entity == 'Q376431' then -- বর্ণের নাম
table.insert(sections, i18n.tocatlink(lang_code .. ':রং'))
else
table.insert(sections, heading_level(i18n['heading_special_info'], 4) .. i18n['text_instance_of'] .. ' ' .. '[[d:' .. instance_of_entity .. '|' .. getLabel(instance_of_entity) .. ']]' .. i18n['text_sentence_terminator'])
end
end
if lex_cat ~= 'Q9788' then
local translations = getTranslations(frame, senses)
if translations then
table.insert(sections, translations)
end
end
-- (!) বিশেষ ভাষার বিভক্তির সারণি যদি থাকে সেগুলো এখানে নতুন if বিবৃতি যোগ করা যায়।
if next(forms) then
if language == 'Q9610' then -- বাংলা
if lex_cat == 'Q24905' then
local conjTable = require('মডিউল:আভিধানিক উপাত্ত/Q9610').getConjTable(frame, forms)
table.insert(sections, conjTable)
elseif lex_cat == 'Q1084' then
table.insert(sections, callWikifunctionsFunction('Z33243|' .. lexeme_id .. '|', frame))
else
if #forms > 1 then
table.insert(sections, buildLanguageAgnosticInflectionTable())
end
end
--elseif language == 'Q13955' then -- ar
-- if lex_cat == 'Q1084' then
-- table.insert(sections, frame:expandTemplate{title='ar-decl-noun', args={lemma}})
-- end
elseif language == 'Q188' and lex_cat == 'Q1084' then -- de
table.insert(sections, callWikifunctionsFunction('Z28602|' .. lexeme_id .. '|', frame))
elseif lang_code == 'as' and lex_cat == 'Q1084' then
table.insert(sections, callWikifunctionsFunction('Z37219|' .. lexeme_id .. '|', frame))
elseif lang_code == 'ml' and lex_cat == 'Q1084' then
table.insert(sections, callWikifunctionsFunction('Z37217|' .. lexeme_id .. '|', frame))
--elseif language == 'Q397' and lex_cat == 'Q1084' then -- la
-- table.insert(sections, callWikifunctionsFunction('Z26333|' .. matched_lemma .. '|', frame))
elseif language == 'Q150' and lex_cat == 'Q34698' then -- fr
table.insert(sections, callWikifunctionsFunction('Z36435|' .. lexeme_id .. '|', frame))
elseif language == 'Q652' and lex_cat == 'Q34698' then -- ইতালীয়
table.insert(sections, callWikifunctionsFunction('Z36407|' .. lexeme_id .. '|', frame))
elseif language == 'Q809' or language == 'Q9058' or language == 'Q6654' or language == 'Q9056' then -- পোলীয়, স্লোভাক, ক্রোয়েশীয়, চেক
table.insert(sections, callWikifunctionsFunction('Z36421|' .. lexeme_id .. '|', frame))
elseif #forms > 1 and language ~= 'Q150' then
table.insert(sections, buildLanguageAgnosticInflectionTable())
end
end
if lex_cat == 'Q134830' then
table.insert(sections, frame:expandTemplate{title='prefixsee', args={lang_code}})
elseif lex_cat == 'Q102047' then
table.insert(sections, frame:expandTemplate{title='suffixsee', args={lang_code}})
-- elseif lex_cat == 'Q111029' then
-- table.insert(sections, frame:expandTemplate{title='rootsee', args={'+', lang_code, matched_lemma}})
end
local reference_notes = get_any_notes(sections, args, i18n['manual_reference'])
if #references_seen > 0 or #reference_notes > 0 then
table.insert(sections, heading_level(i18n['heading_references'], 4))
table.insert(sections, frame:extensionTag('references'))
add_specific_notes(sections, reference_notes)
end
local external_link_table = getExternalLinks ( current_lexeme )
if #external_link_table > 0 then
local external_links = '* ' .. table.concat(external_link_table, '\n* ')
table.insert(sections, heading_level(i18n['heading_external_links'], 4))
table.insert(sections, external_links)
end
add_any_notes(sections, args, i18n['manual_external_link'])
if #references_seen == 0 and #reference_notes == 0 and sense_extlinks and #sense_extlinks == 0 and #external_link_table == 0 and #get_any_notes(sections, args, i18n['manual_external_link']) == 0 then
table.insert(sections, i18n.rfref_category(lang_name))
end
return table.concat(sections,"\n\n")
end
return p
80tolnmu01scluuls3hdw5vmkjmanxj
512460
512451
2026-07-02T17:51:22Z
Redmin
6857
512460
Scribunto
text/plain
local p = {}
local i18n = require('মডিউল:আভিধানিক উপাত্ত/i18n')
local references = require('মডিউল:উইকিউপাত্ত তথ্যসূত্র বিন্যাসকরণ').format
local getArgs = require('Module:Arguments').getArgs
local wb = mw.wikibase
local ustring = mw.ustring
local html = mw.html
local mw_lang = mw.language
local entity_cache = {}
local reference_cache = {}
local forms
local lang_code
local lex_cat
local matched_lemma
local lang_id
local function wrapStringInWikilinks(str)
local exceptions = i18n.nolinks
local result = str:gsub('(%S+)', function(token)
local word, trailing_char = token:match('^(.-)([;,.:!?]*)$')
local wrapped = word:gsub('[^(-/]+', function(part)
if exceptions[part] then
return part
else
return '[[' .. mw.text.nowiki(part) .. '#' .. i18n['content_lang_name'] .. '|' .. mw.text.nowiki(part) .. ']]'
end
end)
return wrapped .. trailing_char
end)
return result
end
local function serializeTable(val, name, skipnewlines, depth) -- https://stackoverflow.com/a/6081639
skipnewlines = skipnewlines or false
depth = depth or 0
local tmp = string.rep(" ", depth)
if name then tmp = tmp .. name .. " = " end
if type(val) == "table" then
tmp = tmp .. "{" .. (not skipnewlines and "\n" or "")
for k, v in pairs(val) do
tmp = tmp .. serializeTable(v, k, skipnewlines, depth + 1) .. "," .. (not skipnewlines and "\n" or "")
end
tmp = tmp .. string.rep(" ", depth) .. "}"
elseif type(val) == "number" then
tmp = tmp .. tostring(val)
elseif type(val) == "string" then
tmp = tmp .. string.format("%q", val)
elseif type(val) == "boolean" then
tmp = tmp .. (val and "true" or "false")
else
tmp = tmp .. "\"[inserializable datatype:" .. type(val) .. "]\""
end
return tmp
end
-- Use this to safely expand templates when you are not sure that they exist.
local function safeExpand(frame, title, args)
local _, result = pcall(function()
return frame:expandTemplate{ title = title, args = args }
end)
if result:find('does not exist') then -- expandTemplate{} doesn't seem to throw any error that can be handled with pcall() so string search is the only viable option.
return nil
end
return result
end
local function checkTitleCodePointInRange(title, start_point, end_point)
return ustring.find( title, '[' ..ustring.char(start_point) .. '-' .. ustring.char(end_point) .. ']' )
end
local function getLanguageForCategories( current_page_title )
-- বিশেষ ভাষার জন্য
if lang_id == 'Q11051' then -- হিন্দি/উর্দু
if checkTitleCodePointInRange(current_page_title, 0x0600, 0x06ff) then -- উর্দু
lang_id = 'Q11051ur'
elseif checkTitleCodePointInRange(current_page_title, 0x0900, 0x097f) then -- হিন্দি
lang_id = 'Q11051hi'
end
elseif lang_id == 'Q58635' then -- পাঞ্জাবি
if checkTitleCodePointInRange(current_page_title, 0x0600, 0x06ff) then -- শাহমুখী
lang_id = 'Q58635pnb'
elseif checkTitleCodePointInRange(current_page_title, 0x0a00, 0x0a7f) then -- গুরুমুখী
lang_id = 'Q58635pa'
end
elseif lang_id == 'Q56356571' then -- নয়া ফার্সি ভাষা
if checkTitleCodePointInRange(current_page_title, 0x0600, 0x06ff) then -- ফার্সি (ইরান/আফগানিস্তান)
lang_id = 'Q56356571fa'
elseif checkTitleCodePointInRange(current_page_title, 0x0400, 0x04ff) then -- তাজিক
lang_id = 'Q56356571tg'
end
end
return lang_id
end
local function getEntity( id )
if entity_cache[id] == nil then
entity_cache[id] = wb.getEntity(id) or error('Invalid ID provided: ' .. id)
end
return entity_cache[id] ~= false and entity_cache[id] or nil
end
-- Use this function to get the label of an item even if that item does not have any label in the wiki's content language or English.
local function getLabel(id)
if id == 'Q11051hi' then
return 'হিন্দি'
elseif id == 'Q11051ur' then
return 'উর্দু'
elseif id == 'Q56356571fa' then
return 'ফার্সি'
elseif id == 'Q56356571tg' then
return 'তাজিক'
elseif id == 'Q58635pa' or id == 'Q58635pnb' then
return 'পাঞ্জাবি'
end
local label = wb.getLabel(id)
if label then
return label
end
local labels = getEntity(id).labels
if not labels then
return id
end
for _, v in pairs(labels) do
if v and v.value then
return v.value
end
end
end
local function getReference( id, reference )
local out_id = nil
local url_value
if reference_cache[id] == nil then
local ref_text = references(reference, wb, mw_lang, i18n['content_lang_code'], i18n['wikipedia'])
if reference.snaks then
if reference.snaks['P248'] then
for _, snak in pairs(reference.snaks['P248']) do
if snak.datavalue and snak.datavalue.value.id == 'Q428' then -- কুরআন
ref_text = ustring.gsub(ref_text, 'নামক অনুচ্ছেদ', 'নং আয়াত')
break
end
end
end
if reference.snaks['P854'] then
local snak = reference.snaks['P854'][1]
if snak.datavalue then
url_value = snak.datavalue.value
end
end
end
if url_value then
ref_text = ref_text .. ', [' .. url_value .. ' সংযোগ]'
end
reference_cache[id] = ref_text
else
out_id = id
end
return {out_id, reference_cache[id]}
end
-- Returns the Wiktionary language code for a lexeme entity or nil, in the latter case, getLemmas() can be relied on to fetch the language code by stripping extraneous bits from the 'language' string as necessary
local function getLexemeLanguageCode(lexeme)
local lang_item_id = lexeme:getLanguage()
local lang_entity = getEntity(lang_item_id)
for i, statement_property in ipairs({'P305','P424', 'P220'}) do -- আইইটিএফ ভাষা ট্যাগ, উইকিমিডিয়া ভাষা কোড, আইএসও ৬৩৯-৩
local statements = lang_entity:getBestStatements(statement_property)
if statements[1] then
local code = statements[1].mainsnak.datavalue.value
if code == 'hr' then
return 'sh'
elseif code == 'pan' then
return 'pa'
else
return code
end
end
end
end
-- Return the first form of the lexeme which has exactly the given grammatical feature.
local function formWithSingleGrammaticalFeature( item_id )
for i = 1, #forms do
local grammaticalFeatures = forms[i]:getGrammaticalFeatures()
if #grammaticalFeatures == 1 and grammaticalFeatures[1] == item_id then
return forms[i]
end
end
return nil
end
local function getArticleLinkTemplate(frame, stmt_value)
local template = ''
local sitelink = getEntity(stmt_value):getSitelink(i18n['wikipedia'])
if sitelink then
template = frame:expandTemplate{
title=i18n['template_wikipedia'],
args={sitelink}
}
end
return template
end
local function getArticleLinks (frame, sense )
local article_links = ''
for i, stmt in pairs(sense:getAllStatements('P5137')) do -- এই অর্থের জন্য আইটেম
article_links = article_links .. getArticleLinkTemplate(frame, stmt.mainsnak.datavalue.value.id)
end
for i, stmt in pairs(sense:getAllStatements('P9970')) do -- এই অর্থের জন্য বিধেয়
article_links = article_links .. getArticleLinkTemplate(frame, stmt.mainsnak.datavalue.value.id)
end
return article_links
end
-- @TODO: Generalise
local function expandTemplateForProperty(frame, object, property, template)
local lemmas = {}
local n = 0
for _, stmt in pairs(object:getAllStatements(property)) do
local lex = wb.lexeme.splitLexemeId(stmt.mainsnak.datavalue.value.id)
if lex then
lex = getEntity(lex)
n = n + 1
lemmas[n] = lex:getLemma(lang_code)
end
end
if not lang_code or n == 0 then
return ''
end
-- Build args: first lang_code, then lemmas
local args = {lang_code}
for i = 1, n do
args[#args + 1] = lemmas[i]
end
return frame:expandTemplate{
title = template,
args = args
}
end
local function getExternalLinks( entity ) -- T418639
local external_links = {}
if entity.claims == nil then return external_links end
local formatter_urls = require('মডিউল:আভিধানিক উপাত্ত/urls').formatter_urls
for property_id, statements in pairs(entity.claims) do
local formatter_url = formatter_urls[property_id]
if formatter_url then
local property_source = wb.getBestStatements(property_id, 'P9073')
local source_name
if next(property_source) then
source_name = getLabel(property_source[1].mainsnak.datavalue.value.id)
or property_source[1].mainsnak.datavalue.value.id
else
source_name = getLabel(property_id) or property_id
end
for i = 1, #statements do
local stmt = statements[i]
if stmt.mainsnak.datavalue then
local formatted_link = ustring.gsub(
ustring.gsub(formatter_url, '$1', stmt.mainsnak.datavalue.value),
' ', '+'
)
table.insert(external_links,
'[' .. formatted_link .. ' ' .. source_name .. ']')
end
end
end
end
return external_links
end
p.getExternalLinks = getExternalLinks -- রেখে দিন যাতে ডিবাগিং সম্ভব হয়
local function heading_level(text, level)
return '<h' .. level .. '>' .. ' ' .. text .. ' ' .. '</h' .. level .. '>'
end
local function termSpan( term )
local text = term[1]
local lang = term[2]
local dir = mw_lang.new( lang ):getDir()
local span = html.create( 'span' )
span:attr( 'lang', lang )
:attr( 'dir', dir )
:wikitext( text )
return tostring( span )
end
local function getLemmata( current_lexeme )
local lemma_string = ''
for i, rep in pairs(current_lexeme:getLemmas()) do
if lemma_string == '' then
lemma_string = termSpan(rep)
else
lemma_string = lemma_string .. '/' .. termSpan(rep)
end
end
return lemma_string
end
local function getLinkedLemmata(lexeme, frame)
local lemma_string = ''
local lang
for i, rep in pairs(lexeme:getLemmas()) do
lang = getLexemeLanguageCode(lexeme)
if lang == nil then
lang = string.gsub(rep[2], '-%S+', '')
end
if lemma_string == '' then
lemma_string = frame:expandTemplate{title='link', args={lang, rep[1]}}
else
lemma_string = lemma_string .. '/' .. frame:expandTemplate{title='link', args={lang, rep[1]}}
end
end
return lemma_string
end
local function getExamples( current_lexeme, sense_id, references_seen )
local examples = html.create('dl')
local example_text, example_lang, example_form, example_str
for i, stmt in pairs(current_lexeme:getAllStatements('P5831')) do -- ব্যবহারের উদাহরণ
if stmt.qualifiers and stmt.qualifiers['P6072'] and stmt.qualifiers['P6072'][1].datavalue.value.id == sense_id then -- বিষয়ে লেক্সিমের অর্থ
example_text = ustring.gsub(stmt.mainsnak.datavalue.value.text, ' / ','<br/>')
example_lang = stmt.mainsnak.datavalue.value.language
local example_form_strs = {}
if stmt.qualifiers['P1810'] then
table.insert(example_form_strs, stmt.qualifiers['P1810'][1].datavalue.value)
elseif stmt.qualifiers['P5830'] then
example_form = getEntity(stmt.qualifiers['P5830'][1].datavalue.value.id) -- বিষয়ে লেক্সিমের রূপ
for _, rep in pairs(example_form:getRepresentations()) do
table.insert(example_form_strs, rep[1])
end
end
for _, example_form_str in pairs(example_form_strs) do
local new_example_text = ustring.gsub(example_text, example_form_str, "'''" .. example_form_str .. "'''")
if new_example_text ~= example_text then
example_str = termSpan({new_example_text, example_lang})
break
end
example_text = new_example_text
end
if example_str == nil then
example_str = termSpan({example_text, example_lang})
end
local reference_text = ''
if stmt.references then
for j, reference in pairs(stmt.references) do
table.insert(references_seen, reference.hash)
local got_reference = getReference(reference.hash, reference)
reference_text = reference_text .. '\n\n' .. got_reference[2]
end
end
if example_str then
examples:tag('dd'):wikitext("''" .. example_str .. "''")
if reference_text ~= '' then
examples:done():tag('dd'):css('text-indent', '2em'):wikitext(reference_text)
end
end
end
end
for i, stmt in pairs(wb.getAllStatements(sense_id, 'P5831')) do -- ব্যবহারের উদাহরণ
example_text = ustring.gsub(stmt.mainsnak.datavalue.value.text, ' / ','<br/>')
example_lang = stmt.mainsnak.datavalue.value.language
local example_form_str = nil
if stmt.qualifiers then
example_form = getEntity(stmt.qualifiers['P5830'][1].datavalue.value.id) -- বিষয়ে লেক্সিমের রূপ
if stmt.qualifiers['P1810'] then
example_form_str = stmt.qualifiers['P1810'][1].datavalue.value
end
end
if example_form and example_form_str == nil then
example_form_str = example_form:getRepresentation(i18n['content_lang_code'])
end
if example_form and example_form_str == nil then
example_form_str = example_form:getRepresentations()[1][1]
end
if example_form_str then
example_text = ustring.gsub(example_text, example_form_str, "'''" .. example_form_str .. "'''")
end
example_str = termSpan({example_text, example_lang})
local reference_text = ''
if stmt.references then
for j, reference in pairs(stmt.references) do
table.insert(references_seen, reference.hash)
local got_reference = getReference(reference.hash, reference)
reference_text = reference_text .. '\n\n' .. got_reference[2]
end
end
if example_str then
examples:tag('dd'):wikitext("''" .. example_str .. "''")
if reference_text ~= '' then
examples:done():tag('dd'):css('text-indent', '2em'):wikitext(reference_text)
end
end
end
return { tostring(examples) , references_seen }
end
-- This calls frame:preprocess() instead of :callParserFunction() because the latter does not work for Wikifunctions function calls yet (see https://www.wikifunctions.org/wiki/Wikifunctions:Embedded_function_calls).
local function callWikifunctionsFunction(args, frame)
return frame:preprocess('{{#function:' .. args .. '}}')
end
local function getOneValueForProperty(object, property)
local val
local stmts = object:getAllStatements(property)
if #stmts ~= 0 then
val = stmts[1].mainsnak.datavalue.value
end
return val
end
local function getLastValueForProperty(object, property)
local val, count
local stmts = object:getAllStatements(property)
for i, j in ipairs(stmts) do
count = i
end
if count then
val = stmts[count].mainsnak.datavalue.value
end
return val
end
local function getTranslations(frame, senses)
if #senses == 0 then
return nil
end
local all_translations = {}
local wmlang, item, label
for _, sense in pairs(senses) do
local translation_set = {}
local gloss = sense:getGloss(i18n['content_lang_code'])
if lex_cat ~= 'Q34698' then
item = getOneValueForProperty(sense, 'P5137')
if item then
item = item.id
label = getLabel(item)
end
end
if item then
wmlang = require("Module:wikimedia languages")
end
for _, stmt in pairs(sense:getAllStatements('P5972')) do
local translation = stmt.mainsnak.datavalue.value.id
local lexeme_id = wb.lexeme.splitLexemeId(translation)
local trans_lexeme = getEntity(lexeme_id)
local lang_name = getLabel(trans_lexeme:getLanguage())
local trans_code = getLexemeLanguageCode(trans_lexeme)
if trans_code then
table.insert(translation_set, lang_name .. ': ' .. frame:expandTemplate{title=i18n['template_t'], args={trans_code, getLinkedLemmata(trans_lexeme, frame) .. '<br/>'}})
else
table.insert(translation_set, lang_name .. ': ' .. getLinkedLemmata(trans_lexeme, frame) .. '<br/>' .. i18n.trans_category(lang_name))
end
end
if item then
for _, v in pairs(getEntity(item).labels) do
if string.find(v.language, '-') == nil then -- @TODO: Implement deduplication of translation and get rid of this check
local lang = wmlang.getByCode(v.language)
local wikt = lang:getWiktionaryLanguage()
if wikt:hasType('regular') then
table.insert(translation_set, getLabel(wikt:getWikidataItem()) .. ': ' .. frame:expandTemplate{title=i18n['template_t'], args={wikt:getCode(), v.value .. '<br/>'}})
end
end
end
end
if #translation_set > 0 then
local block = frame:expandTemplate{ title = i18n['template_trans-top'], args = { gloss or label } }
block = block .. table.concat(translation_set, '\n') .. frame:expandTemplate{ title = i18n['template_trans-bottom'] }
table.insert(all_translations, block)
end
end
if #all_translations == 0 then
return nil
end
return heading_level(i18n['heading_translation'], 4) .. ' \n' .. table.concat(all_translations, '\n')
end
local createicon = function(langcode, entityID, propertyID)
langcode = langcode or ""
propertyID = propertyID or ""
local icon = " <span class='penicon autoconfirmed-show'>[["
-- " <span data-bridge-edit-flow='overwrite' class='penicon'>[[" -> enable Wikidata Bridge
.. "File:OOjs UI icon edit-ltr-progressive.svg |frameless |text-top |10px |alt="
.. i18n['edit_wikidata']
.. "|link=https://www.wikidata.org/entity/" .. entityID
if langcode ~= "" then icon = icon .. "?uselang=" .. langcode end
if propertyID ~= "" then icon = icon .. "#" .. propertyID end
icon = icon .. "|" .. i18n['edit_wikidata'] .. "]]</span>"
return icon
end
local function getMeanings( frame, args, current_lexeme, senses, references_seen, language_name)
if #senses == 0 then
return {createicon(i18n['content_lang_code'], current_lexeme:getId()) .. "''" .. i18n['text_category_rfdef'] .. "''" .. i18n.tocatlink(i18n['category_rfdef']), references_seen}
end
local meanings = html.create( 'ol' )
local idlinkset = {}
for i, sense in pairs(senses) do
local item_label_gloss_parts = {}
local gloss_text_parts = {}
local main_gloss_text = frame:expandTemplate{
title=i18n['template_anchor'],
args={sense:getId()}
}
local specifiers = {}
for k, property_id in ipairs({'P6084', 'P6191', 'P9488'}) do -- অবস্থান যেখানে শব্দার্থ ব্যবহৃত, যে রীতিতে শব্দার্থ ব্যবহৃত হয়, যে ক্ষেত্রে ব্যবহৃত
for _, stmt in pairs(sense:getAllStatements(property_id)) do
local stmt_value = stmt.mainsnak.datavalue.value.id
local reference_text = ''
local refs = stmt.references
if refs then
for j, reference in pairs(refs) do
table.insert(references_seen, reference.hash)
local got_reference = getReference(reference.hash, reference)
reference_text = reference_text .. '\n\n' .. frame:extensionTag('ref', got_reference[2])
end
end
local val = getLabel(stmt_value)
table.insert(specifiers, val .. reference_text)
if property_id == 'P9488' and lang_code ~= nil then
table.insert(item_label_gloss_parts, i18n.tocatlink(lang_code .. ':' .. val))
end
end
end
if #specifiers > 0 then
main_gloss_text = main_gloss_text .. "(''" .. table.concat(specifiers, "'', ''") .. "'') "
end
local gloss = sense:getGloss( i18n['content_lang_code'] )
if gloss then
main_gloss_text = main_gloss_text .. wrapStringInWikilinks(gloss)
if gloss:match('^প্রদত্ত%s*(%S-)%s*নাম$') then -- given names
main_gloss_text = main_gloss_text .. i18n.tocatlink(language_name .. ' ' .. i18n['category_given_names'])
end
else
local other_gloss_text, other_gloss_lang, item_label
local stmt_value = getOneValueForProperty(sense, 'P5137')
if stmt_value then
stmt_value = stmt_value.id
item_label = getLabel(stmt_value)
end
if item_label then
table.insert(item_label_gloss_parts, '[[:d:' .. stmt_value .. '|' .. item_label .. ']]')
end
if #item_label_gloss_parts > 0 then
other_gloss_text = table.concat(item_label_gloss_parts, '; ')
end
if other_gloss_text == nil then
for _, fallback_lang in ipairs(mw_lang.getFallbacksFor( i18n['content_lang_code'] )) do
if sense:getGloss( fallback_lang ) then
other_gloss_text, other_gloss_lang = sense:getGloss( fallback_lang )
end
end
if other_gloss_lang == nil then
local glosses = sense:getGlosses()
for _, gloss in pairs(glosses) do
other_gloss_text = gloss[1]
other_gloss_lang = gloss[2]
break
end
end
main_gloss_text = main_gloss_text .. other_gloss_text .. "<sup><em>" .. mw_lang.fetchLanguageName(other_gloss_lang, i18n['content_lang_code']) .. "</em></sup>"
else
main_gloss_text = main_gloss_text .. "''" .. other_gloss_text .. "''"
end
main_gloss_text = main_gloss_text .. i18n.tocatlink(i18n['category_rfdef_equivalent'])
end
local synonym = expandTemplateForProperty(frame, sense, 'P5973', i18n['template_synonym'])
if synonym ~= '' then
main_gloss_text = main_gloss_text .. ' <br/> ' .. synonym
end
local antonym = expandTemplateForProperty(frame, sense, 'P5974', i18n['template_antonym'])
if antonym ~= '' then
main_gloss_text = main_gloss_text .. ' <br/> ' .. antonym
end
local hypernym = expandTemplateForProperty(frame, sense, 'P6593', i18n['template_hypernym'])
if hypernym ~= '' then
main_gloss_text = main_gloss_text .. ' <br/> ' .. hypernym
end
if lex_cat == 'Q1084' or lex_cat == 'Q147276' then -- noun or proper noun
local demonym = expandTemplateForProperty(frame, sense, 'P6271', i18n['template_demonym-noun'])
main_gloss_text = main_gloss_text .. ' <br/> ' .. demonym
elseif lex_cat == 'Q34698' then
local demonym = expandTemplateForProperty(frame, sense, 'P6271', i18n['template_demonym-adj'])
main_gloss_text = main_gloss_text .. ' <br/> ' .. demonym
end
table.insert(gloss_text_parts, main_gloss_text .. createicon(i18n['content_lang_code'], sense:getId()))
for _, stmt in pairs(sense:getAllStatements('P8394')) do -- টিপ্পনীর উদ্ধৃতি
local gloss_quote = termSpan({stmt.mainsnak.datavalue.value.text, stmt.mainsnak.datavalue.value.language})
if stmt.references[1] then
local got_reference = getReference ( stmt.references[1].hash, stmt.references[1] )
gloss_quote = '"' .. gloss_quote .. '" ' .. got_reference[2]
end
table.insert(references_seen, stmt.references[1].hash)
table.insert(gloss_text_parts, frame:extensionTag('ref', gloss_quote))
end
for _, stmt in pairs(sense:getAllStatements('P1343')) do -- বর্ণিত উৎস
-- TODO: do away with making fake reference objects
local fake_reference = { ['snaks'] = {} }
fake_reference.snaks['P248'] = { [1] = stmt.mainsnak }
local qualifiers_order = stmt['qualifiers-order']
if qualifiers_order then
for _, k in ipairs(qualifiers_order) do fake_reference.snaks[k] = stmt.qualifiers[k] end
end
fake_reference.hash = mw.hash.hashValue('sha3-512', serializeTable(fake_reference))
table.insert(references_seen, fake_reference.hash)
local got_reference = getReference(fake_reference.hash, fake_reference)
if got_reference[1] == nil then
table.insert(gloss_text_parts, frame:extensionTag('ref', got_reference[2], {name = fake_reference.hash}))
else
table.insert(gloss_text_parts, frame:extensionTag{name = 'ref', content='', args = {name = got_reference[1]}})
end
end
local first_sense_image = ''
local sense_images = sense:getAllStatements('P18')
if next(sense_images) then
first_sense_image = sense_images[1].mainsnak.datavalue.value
end
if first_sense_image ~= '' then
table.insert(gloss_text_parts, '[[চিত্র:' .. first_sense_image .. "|thumb|'''" .. getLemmata(current_lexeme) .. "'''—" .. main_gloss_text .. ']]')
end
local idlinks = getExternalLinks(sense)
if #idlinks > 0 then
local idlinktext = '<small>('
for _, idlink in pairs(idlinks) do
idlinktext = idlinktext .. idlink .. '\n'
end
idlinktext = idlinktext .. ')</small>'
table.insert(gloss_text_parts, idlinktext)
table.insert(idlinkset, idlinks)
end
local externallinks = getArticleLinks(frame, sense)
if externallinks ~= '' then
table.insert(gloss_text_parts, externallinks)
end
local new_notes = {}
local sense_keys = { sense:getId(), string.sub(sense:getId(), string.find(sense:getId(), '-')+1) }
for _, v in ipairs(sense_keys) do
if args[v] then
table.insert(new_notes, args[v])
end
end
if #new_notes > 0 then
for _, v in ipairs(new_notes) do
if i == 1 then
table.insert(gloss_text_parts, '<br/>' .. v)
else
table.insert(gloss_text_parts, v)
end
end
end
local examples
examples, references_seen = unpack(getExamples( current_lexeme, sense:getId(), references_seen ))
local gloss_text = table.concat(gloss_text_parts, '\n')
meanings:tag('li'):wikitext(gloss_text):wikitext(examples)
end
return {meanings, references_seen, idlinkset}
end
local function getPronunciationBaseForm()
local base_form = nil
-- (!) অন্য ভাষার শব্দের যদি অন্য রকম মূল ফর্ম থাকে সেগুলো এখানে নতুন if বিবৃতি দিয়ে যোগ করা যায়।
if lang_code == 'bn' then
if lex_cat == 'Q1084' then -- বিশেষ্য
base_form = formWithSingleGrammaticalFeature( 'Q131105' ) -- কর্তৃকারক
elseif lex_cat == 'Q24905' then -- ক্রিয়া
base_form = formWithSingleGrammaticalFeature( 'Q1350145' ) -- ক্রিয়া বিশেষ্য
end
end
if base_form == nil then
for i, form in pairs(forms) do
base_form = form
break
end
end
return base_form
end
local function getCombines( current_lexeme, frame )
local combines = ''
local index_mappings = {}
for i, stmt in pairs(current_lexeme:getAllStatements('P5238')) do
if stmt.qualifiers and stmt.qualifiers['P1545'] then -- ক্রম
local current_index = tonumber(stmt.qualifiers['P1545'][1].datavalue.value)
index_mappings[current_index] = stmt
end
end
if #index_mappings ~= 0 then
for i, stmt in ipairs(index_mappings) do
if stmt.mainsnak.datavalue then
local part_lexeme_id = stmt.mainsnak.datavalue.value.id
local part_lexeme = getEntity(part_lexeme_id)
local current_substring = getLinkedLemmata(part_lexeme, frame)
local part_etymology = getEtymology(part_lexeme, frame, 'partial')
if part_etymology ~= '' and part_etymology then
current_substring = current_substring .. ' (← ' .. part_etymology .. ')'
end
if combines == '' then
combines = current_substring
else -- @TODO: This should use the 'affix' and 'compound' templates instead.
combines = combines .. ' + ' .. current_substring
end
end
end
end
return combines
end
function getRoots( current_lexeme, frame )
local stmts = current_lexeme:getAllStatements('P5920')
if #stmts == 0 then return '', '', '' end
local root_lexeme = getEntity(stmts[1].mainsnak.datavalue.value.id)
return getLexemeLanguageCode(root_lexeme), '√' .. getLinkedLemmata(root_lexeme, frame), root_lexeme:getLemma('ar')
end
function getEtymology( current_lexeme, frame, mode )
-- @TODO: Fix the etymology chains that are not possible to render
local etymology = ''
local current_combines = getCombines(current_lexeme, frame)
local root_lang, current_roots, root_str = getRoots(current_lexeme, frame)
if mode ~= 'partial' and root_str then
--frame:expandTemplate{title=i18n['template_root'], args={lang_code, root_lang, root_str}}
end
local stmts = current_lexeme:getAllStatements('P5191')
local new_etymology_string
if #stmts == 0 then
if current_roots ~= '' and current_combines ~= '' and current_roots then
return current_roots .. '<br/>(' .. current_combines .. ')'
elseif current_roots ~= '' then
if lang_code == 'ar' and mode ~= 'partial' and root_str ~= matched_lemma then
return frame:expandTemplate{title=i18n['template_ar-rootbox'], args={root_str}}
else
return current_roots
end
else
return current_combines
end
end
local origin_lexeme_string
for i, stmt in pairs(stmts) do
local origin_lexeme_dv = stmt.mainsnak.datavalue -- If this is nil, the origin lexeme is not known.
if origin_lexeme_dv then
local origin_lexeme = getEntity(origin_lexeme_dv.value.id)
local origin_lexeme_lang = getLabel(origin_lexeme:getLanguage())
local sitelink = i18n.wplink(origin_lexeme:getLanguage(), origin_lexeme_lang, wb)
if sitelink ~= '' then
origin_lexeme_string = getLinkedLemmata(origin_lexeme, frame) .. ' (' .. sitelink .. ')'
else
origin_lexeme_string = getLinkedLemmata(origin_lexeme, frame) .. ' (' .. origin_lexeme_lang .. ')'
end
if stmt.qualifiers and stmt.qualifiers['P5886'] then
local mode_of_derivation = stmt.qualifiers['P5886'][1].datavalue.value.id
if mode_of_derivation == 'Q1345001' then
-- @TODO: Add support for showing gender
origin_lexeme_string = frame:expandTemplate{title=i18n['template_borrowed'], args={lang_code, getLexemeLanguageCode(origin_lexeme), getLemmata(origin_lexeme), pos=getLabel(lex_cat)}} .. ' ' .. i18n['etymology_borrowing']
elseif mode_of_derivation == 'Q845079' then
origin_lexeme_string = ustring.gsub(i18n['etymology_learned_borrowing'], '$1', origin_lexeme_string)
elseif mode_of_derivation == 'Q56611986' then
origin_lexeme_string = frame:expandTemplate{title=i18n['template_inherited'], args={lang_code, getLexemeLanguageCode(origin_lexeme), getLemmata(origin_lexeme), pos=getLabel(lex_cat)}} .. ' ' .. i18n['etymology_inheritance']
elseif mode_of_derivation == 'Q189743' then
origin_lexeme_string = frame:expandTemplate{title=i18n['template_ellipsis'], args={lang_code, getLemmata(origin_lexeme)}} .. ' ' .. i18n['etymology_ellipsis']
end
end
local origin_origin = getEtymology(origin_lexeme, frame)
if origin_origin ~= '' and origin_origin then
new_etymology_string = origin_lexeme_string .. ' ← ' .. origin_origin
else
new_etymology_string = origin_lexeme_string
end
end
if etymology == '' then
etymology = new_etymology_string
elseif origin_lexeme_string and etymology then
etymology = etymology .. ' ' .. origin_lexeme_string
elseif origin_lexeme_string and etymology == nil then
etymology = origin_lexeme_string
end
end
if current_roots ~= '' and etymology and current_roots then
etymology = etymology .. ' ' .. current_roots
elseif current_roots ~= '' and etymology == nil then
etymology = current_roots
end
if current_combines ~= '' and etymology then
etymology = etymology .. '<br/>(' .. current_combines .. ')'
end
return etymology
end
local function pronunciationBlock(block, value)
return '* ' .. i18n['text_' .. block] .. ' ' .. value
end
local function getPronunciation(frame, current_lexeme, lang_name)
local pronunciations = {}
local base_form = getPronunciationBaseForm()
local iast, iso15919_transcription, itrans, xsampa
if base_form then
for i, stmt in pairs(base_form:getAllStatements('P443')) do -- উচ্চারণের অডিও
local pronunciation_file = stmt.mainsnak.datavalue.value
local specifier_text = ''
local specifiers = {}
if stmt.qualifiers then
for k, property_id in ipairs({'P5237'}) do -- উচ্চারণের ধরন
local qual = stmt.qualifiers[property_id]
if qual then
for _, qual in pairs(qual) do
local stmt_value = qual.datavalue.value.id
table.insert(specifiers, getLabel(stmt_value))
end
end
end
end
if #specifiers > 0 then
specifier_text = table.concat(specifiers, "'', ''")
end
local audio_text
if specifier_text ~= '' then
audio_text = i18n['text_audio'] .. ' (' .. specifier_text .. ')'
else
audio_text = i18n['text_audio']
end
table.insert(pronunciations, '* ' .. frame:expandTemplate{
title= i18n['template_audio'],
args = {lang_name, pronunciation_file, audio_text}
})
end
iso15919_transcription = getOneValueForProperty(base_form, 'P5825') -- আইএসও ১৫৯১৯ প্রতিলিপিকরণ
itrans = getOneValueForProperty(base_form, 'P8881') -- ITRANS
iast = getOneValueForProperty(base_form, 'P7581') -- আইএএসটি প্রতিলিপিকরণ
xsampa = getOneValueForProperty(base_form, 'P2859')
local ipa_transcription = base_form:getAllStatements('P898') -- আধ্বব প্রতিলিপিকরণ
-- @TODO: অডিও ও প্রতিলিপিকরণ দুটোই থাকলে একটার ঠিক পরেই আরেকটা দেখানো উচিত
if #ipa_transcription ~= 0 then
for i, stmt in pairs(ipa_transcription) do
local ipa_text = stmt.mainsnak.datavalue.value
local specifier_text = ''
local specifiers = {}
if stmt.qualifiers then
for k, property_id in ipairs({'P5237'}) do -- উচ্চারণের ধরন
for l, qual in ipairs(stmt.qualifiers[property_id]) do
table.insert(specifiers, getLabel( qual.datavalue.value.id ))
end
end
end
if #specifiers > 0 then
specifier_text = "(''" .. table.concat(specifiers, "'', ''") .. "'') "
end
local syllable_count
if lang_code == 'tr' then
syllable_count = i18n['text_syllable_count'] .. ' ' .. callWikifunctionsFunction('Z10029|' .. ipa_text, frame)
else
syllable_count = i18n['text_syllable_count'] .. ' ' .. callWikifunctionsFunction('Z30837|' .. ipa_text, frame)
end
table.insert(pronunciations, '* ' .. specifier_text .. frame:expandTemplate{
title= i18n['template_ipa'],
args = {lang_name, ipa_text}
} .. '\n* ' .. syllable_count)
end
-- The following checks are ordered based on which one is expected to be true in a higher number of cases.
elseif lang_code == 'bn' then
table.insert(pronunciations, '* ' .. frame:expandTemplate{
title='bn-IPA',
})
elseif lang_code == 'ar' then
local lemma = current_lexeme:getLemma('ar')
table.insert(pronunciations, '* ' .. frame:expandTemplate{
title='ar-IPA',
args={lemma}
})
elseif lang_code == 'en' then
table.insert(pronunciations, '* ' .. i18n['text_syllable_count'] .. ' ' .. callWikifunctionsFunction('Z29940|' .. matched_lemma, frame))
elseif lang_code == 'pl' then
table.insert(pronunciations, '* ' .. frame:expandTemplate{
title='pl-IPA',
})
elseif lang_code == 'ko' then
table.insert(pronunciations, '* ' .. frame:expandTemplate{
title='ko-IPA',
})
elseif lang_code == 'fi' then
table.insert(pronunciations, '* ' .. frame:expandTemplate{
title='fi-IPA',
})
elseif lang_code == 'ta' then
table.insert(pronunciations, '* ' .. frame:expandTemplate{
title='ta-IPA',
})
elseif lang_code == 'fax' then
table.insert(pronunciations, '* ' .. frame:expandTemplate{
title='fax-pron',
})
end
end -- {{আধ্বব|en|/ˈɪntəvjuː/}}
if iso15919_transcription then
table.insert(pronunciations, pronunciationBlock('iso15919', iso15919_transcription))
end
if itrans then
table.insert(pronunciations, pronunciationBlock('itrans', itrans))
end
if iast then
table.insert(pronunciations, pronunciationBlock('iast', iast))
end
if xsampa then
table.insert(pronunciations, pronunciationBlock('xsampa', xsampa))
end
return table.concat(pronunciations, '\n')
end
local function getAlternativeSpellings( current_lexeme, frame )
local alt_spellings = {}
for i, stmt in pairs(current_lexeme:getAllStatements('P11577')) do -- বিকল্প বানান
if stmt.mainsnak.datavalue then
table.insert(alt_spellings, '* ' .. frame:expandTemplate{title=i18n['template_alter'], args={lang_code, getLemmata(getEntity(stmt.mainsnak.datavalue.value.id), frame)}})
end
end
return table.concat(alt_spellings, '\n')
end
function get_any_notes(sections, args, keys)
local notes = {}
for i, v in ipairs(keys) do
if args[v] then
table.insert(notes, args[v])
end
end
return notes
end
function add_specific_notes(sections, notes)
for i, v in ipairs(notes) do
table.insert(sections, v)
end
end
local function add_any_notes(sections, args, keys, heading)
for i, v in ipairs(keys) do
if args[v] then
if heading then
table.insert(sections, heading)
end
table.insert(sections, args[v])
end
end
end
local function getMatchingLemmaForPageTitle(lexeme, title)
local lemmas = lexeme:getLemmas()
local match
for _, lemma_entry in ipairs(lemmas) do
local lemma = lemma_entry[1]
if lemma == title then
match = lemma
break
end
end
if match == nil then
if lang_code == 'ar' then
match = lexeme:getLemma('ar')
elseif lang_code == 'rhg' then
match = lexeme:getLemma('rhg-arab')
elseif lang_id == 'Q11051ur' then
match = lexeme:getLemma('ur')
elseif lang_code == 'arz' then
match = lexeme:getLemma('arz')
end
end
return match
end
-- Returns the grammatical gender of a lexeme
local function getGenderOfLexeme(lexeme)
local gender = ''
local stmts = lexeme:getAllStatements('P5185') -- ব্যাকরণগত লিঙ্গ
if #stmts ~= 0 and stmts[1].mainsnak.datavalue then
if #stmts == 1 then
local gender_qid = stmts[1].mainsnak.datavalue.value.id
if gender_qid == 'Q499327' then
gender = 'm'
elseif gender_qid == 'Q1775415' then
gender = 'f'
elseif gender_qid == 'Q1775461' then
gender = 'n'
elseif gender_qid == 'Q1305037' then
gender = 'c'
end
end
else
for i, stmt in pairs(stmts) do
local qid = stmts[i].mainsnak.datavalue
if qid then
qid = qid.value.id
end
if qid == 'Q499327' then
gender = gender .. 'm'
elseif qid == 'Q1775415' then
gender = gender .. 'f'
end
end
end
return gender
end
-- Returns the semantic gender for a sense
-- @TODO: Complete this
local function getGenderForSense(sense)
local gender = ''
local stmts = sense:getAllStatements('P10339') -- semantic gender
if #stmts ~= 0 and stmts[1].mainsnak.datavalue then
if #stmts == 1 then
local gender_qid = stmts[1].mainsnak.datavalue.value.id
if gender_qid == 'Q6581097' then
gender = 'm'
elseif gender_qid == 'Q1775415' then
gender = 'f'
elseif gender_qid == 'Q1775461' then
gender = 'n'
elseif gender_qid == 'Q1305037' then
gender = 'c'
elseif gender_qid == 'Q70853302' then
gender = 'mfbysense'
end
end
else
for i, stmt in pairs(stmts) do
local qid = stmts[i].mainsnak.datavalue
if qid then
qid = qid.value.id
end
if qid == 'Q499327' then
gender = gender .. 'm'
elseif qid == 'Q1775415' then
gender = gender .. 'f'
end
end
end
return gender
end
local function buildLanguageAgnosticInflectionTable()
local has_image = false
local form_images = {}
for i, form in ipairs(forms) do
local form_image = form:getAllStatements('P7407')
if next(form_image) then
form_images[i] = form_image[1].mainsnak.datavalue.value
has_image = true
end
end
local table_class = "wikitable mw-collapsible sortable"
if not has_image then
table_class = table_class .. " mw-collapsed"
end
local text = "{| class='" .. table_class .. "' style='border:solid 1px rgb(80%,80%,100%); text-align:center;'\n"
text = text .. "|+ " .. i18n['heading_inflection_table'] .. "\n"
text = text .. "|- \n"
text = text .. "! " .. i18n['heading_form'] .. " !! " .. i18n['heading_grammatical_features']
if has_image then
text = text .. " !! " .. (i18n['heading_image'])
end
text = text .. " \n"
for i, form in ipairs(forms) do
local rep = form:getRepresentations()
local feat = form:getGrammaticalFeatures()
local rep_text = ""
for j, r in pairs(rep) do
if rep_text == "" then
rep_text = r[1]
else
rep_text = rep_text .. " / " .. r[1]
end
end
local feat_text = ""
if feat then
for j, f in ipairs(feat) do
local label = getLabel(f) or f
if feat_text == "" then
feat_text = label
else
feat_text = feat_text .. ", " .. label
end
end
end
text = text .. "|-\n"
text = text .. "| " .. (rep_text ~= "" and rep_text or "—")
text = text .. " || " .. (feat_text ~= "" and feat_text or "—")
if has_image then
local image_cell = "—"
if form_images[i] then
image_cell = "[[চিত্র:" .. form_images[i] .. "|50px]]"
end
text = text .. " || " .. image_cell
end
text = text .. "\n"
end
text = text .. "|}"
return text
end
function p.all(frame)
local args = getArgs(frame)
local lexeme_id = args[1]
local current_lexeme = getEntity(lexeme_id)
local language = current_lexeme:getLanguage()
lang_id = language
local senses = current_lexeme:getSenses()
local add_heading = true
forms = current_lexeme:getForms()
if args[2] then
local val = mw.text.trim(tostring(args[2]))
if val == "false" or val == "0" or val == "না" then
add_heading = false
end
end
local references_seen = {}
local sections = {}
local title = mw.title.getCurrentTitle().text
local lang_category = getLanguageForCategories(title, true)
local lang_name = getLabel(lang_category)
local conj_class = getLastValueForProperty(current_lexeme, 'P5186')
if conj_class then
conj_class = wb.getLabelByLang(getLastValueForProperty(current_lexeme, 'P5186').id, 'en'):gsub('Form ', '')
end
if add_heading == true then
local lang_heading = heading_level(lang_name, 2)
table.insert(sections, lang_heading)
end
lang_code = getLexemeLanguageCode(current_lexeme)
matched_lemma = getMatchingLemmaForPageTitle(current_lexeme, title)
lex_cat = current_lexeme:getLexicalCategory()
local cat = i18n.lang_category(getLabel(lex_cat), lang_name)
local lex_cat_template, ety_added, pron_added, alt_added
if cat then
table.insert(sections, heading_level(getLabel(lex_cat) .. cat .. frame:expandTemplate{
title = i18n['template_anchor'],
args = { lexeme_id }
}, 3))
table.insert(sections, frame:expandTemplate{
title= i18n['template_lexeme'],
args = {lexeme_id}
})
add_any_notes(sections, args, i18n['manual_category'])
local etymology = getEtymology( current_lexeme, frame )
if etymology ~= '' and etymology then
table.insert(sections, heading_level(i18n['heading_etymology'], 4))
table.insert(sections, tostring(etymology))
ety_added = true
end
if ety_added then
add_any_notes(sections, args, i18n['manual_etymology'])
else
add_any_notes(sections, args, i18n['manual_etymology'], heading_level(i18n['heading_etymology'], 4))
end
local pronunciation = getPronunciation( frame, current_lexeme, lang_name)
if pronunciation ~= '' then
table.insert(sections, heading_level(i18n['heading_pronunciation'], 4))
table.insert(sections, tostring(pronunciation))
pron_added = true
end
if pron_added then
add_any_notes(sections, args, i18n['manual_pronunciation'])
else
add_any_notes(sections, args, i18n['manual_pronunciation'], heading_level(i18n['heading_pronunciation'], 4))
end
local alternative_spellings = getAlternativeSpellings(current_lexeme, frame)
if alternative_spellings ~= '' then
table.insert(sections, heading_level(i18n['heading_alternative_spellings'], 4))
table.insert(sections, alternative_spellings)
alt_added = true
end
if alt_added then
add_any_notes(sections, args, i18n['manual_alternative_spellings'])
else
add_any_notes(sections, args, i18n['manual_alternative_spellings'], heading_level( i18n['heading_alternative_spellings'], 4))
end
local gender = getGenderOfLexeme(current_lexeme)
if lang_code and lang_code ~= 'ksy' and lang_code ~= 'rkt' then -- Skip for Kharia Thar, Rangpuri
if lex_cat == 'Q34698' then -- বিশেষণ
if lang_code == 'en' or lang_code == 'bn' then
if #forms <= 1 then
lex_cat_template = frame:expandTemplate{title= lang_code .. '-বিশেষণ'}
end
else
lex_cat_template = safeExpand(frame, lang_code .. '-adj')
if not lex_cat_template then
lex_cat_template = safeExpand(frame, lang_code .. '-বিশেষণ')
end
end
elseif lex_cat == 'Q1084' then -- @TODO: Also check for plural forms
-- The following checks are ordered based on which one is expected to be true in a higher number of cases.
if language == 'Q13955' then
if matched_lemma then
lex_cat_template = safeExpand(frame, 'ar-noun', {matched_lemma,gender})
else
lex_cat_template = frame:expandTemplate{title='ar-noun', args={nil,gender}}
end
elseif language == 'Q29919' then
lex_cat_template = frame:expandTemplate{title='arz-noun', args={g=gender}}
elseif language == 'Q397' then
if matched_lemma then
lex_cat_template = frame:expandTemplate{title='la-noun', args={matched_lemma,g=gender}}
end
elseif language == 'Q11059' then
lex_cat_template = frame:expandTemplate{title='sa-noun', args={g=gender}}
elseif language ~= 'Q1860' then -- These templates require the gender to be passed as the 1st argument.
lex_cat_template = safeExpand(frame, lang_code .. i18n['noun_template_suffix'], {gender})
if not lex_cat_template then
lex_cat_template = safeExpand(frame, lang_code .. i18n['noun_template_suffix_fallback'], {gender})
end
end
elseif lex_cat == 'Q24905' then -- ক্রিয়া
if lang_code == 'ar' then
if conj_class then
lex_cat_template = frame:expandTemplate{title='ar-verb', args={conj_class}}
end
else
lex_cat_template = safeExpand(frame, lang_code .. '-verb')
end
end
end
-- elseif lex_cat == 'Q147276' then
-- lex_cat_template = safeExpand(frame, lang_code .. '-proper noun', {gender})
-- if not lex_cat_template then
-- lex_cat_template = safeExpand(frame, lang_code .. '-নামবাচক বিশেষ্য', {gender})
-- end
end
if lex_cat_template then
table.insert(sections, lex_cat_template)
else
if matched_lemma then
table.insert(sections, heading_level(matched_lemma, 4))
else
table.insert(sections, i18n.tocatlink(i18n['category_no_matching_lemma']))
end
end
local meanings, references_seen, sense_extlinks = unpack(getMeanings( frame, args, current_lexeme, senses, references_seen, lang_name))
table.insert(sections, tostring(meanings))
add_any_notes(sections, args, i18n['manual_meaning'])
local instance_of = current_lexeme:getAllStatements('P31') -- সত্ত্বার ধরন
if #instance_of ~= 0 then
local instance_of_entity = instance_of[1].mainsnak.datavalue.value.id
if instance_of_entity == 'Q376431' then -- বর্ণের নাম
table.insert(sections, i18n.tocatlink(lang_code .. ':রং'))
else
table.insert(sections, heading_level(i18n['heading_special_info'], 4) .. i18n['text_instance_of'] .. ' ' .. '[[d:' .. instance_of_entity .. '|' .. getLabel(instance_of_entity) .. ']]' .. i18n['text_sentence_terminator'])
end
end
if lex_cat ~= 'Q9788' then
local translations = getTranslations(frame, senses)
if translations then
table.insert(sections, translations)
end
end
-- (!) বিশেষ ভাষার বিভক্তির সারণি যদি থাকে সেগুলো এখানে নতুন if বিবৃতি যোগ করা যায়।
if next(forms) then
if language == 'Q9610' then -- বাংলা
if lex_cat == 'Q24905' then
local conjTable = require('মডিউল:আভিধানিক উপাত্ত/Q9610').getConjTable(frame, forms)
table.insert(sections, conjTable)
elseif lex_cat == 'Q1084' then
table.insert(sections, callWikifunctionsFunction('Z33243|' .. lexeme_id .. '|', frame))
else
if #forms > 1 then
table.insert(sections, buildLanguageAgnosticInflectionTable())
end
end
--elseif language == 'Q13955' then -- ar
-- if lex_cat == 'Q1084' then
-- table.insert(sections, frame:expandTemplate{title='ar-decl-noun', args={lemma}})
-- end
--elseif lang_code == 'ar' and lex_cat == 'Q24905' then
--table.insert(sections, frame:expandTemplate{title='ar-conj', args={conj_class}})
elseif language == 'Q188' and lex_cat == 'Q1084' then -- de
table.insert(sections, callWikifunctionsFunction('Z28602|' .. lexeme_id .. '|', frame))
elseif lang_code == 'as' and lex_cat == 'Q1084' then
table.insert(sections, callWikifunctionsFunction('Z37219|' .. lexeme_id .. '|', frame))
elseif lang_code == 'ml' and lex_cat == 'Q1084' then
table.insert(sections, callWikifunctionsFunction('Z37217|' .. lexeme_id .. '|', frame))
--elseif language == 'Q397' and lex_cat == 'Q1084' then -- la
-- table.insert(sections, callWikifunctionsFunction('Z26333|' .. matched_lemma .. '|', frame))
elseif language == 'Q150' and lex_cat == 'Q34698' then -- fr
table.insert(sections, callWikifunctionsFunction('Z36435|' .. lexeme_id .. '|', frame))
elseif language == 'Q652' and lex_cat == 'Q34698' then -- ইতালীয়
table.insert(sections, callWikifunctionsFunction('Z36407|' .. lexeme_id .. '|', frame))
elseif language == 'Q809' or language == 'Q9058' or language == 'Q6654' or language == 'Q9056' then -- পোলীয়, স্লোভাক, ক্রোয়েশীয়, চেক
table.insert(sections, callWikifunctionsFunction('Z36421|' .. lexeme_id .. '|', frame))
elseif #forms > 1 and language ~= 'Q150' then
table.insert(sections, buildLanguageAgnosticInflectionTable())
end
end
if lex_cat == 'Q134830' then
table.insert(sections, frame:expandTemplate{title='prefixsee', args={lang_code}})
elseif lex_cat == 'Q102047' then
table.insert(sections, frame:expandTemplate{title='suffixsee', args={lang_code}})
-- elseif lex_cat == 'Q111029' then
-- table.insert(sections, frame:expandTemplate{title='rootsee', args={'+', lang_code, matched_lemma}})
end
local reference_notes = get_any_notes(sections, args, i18n['manual_reference'])
if #references_seen > 0 or #reference_notes > 0 then
table.insert(sections, heading_level(i18n['heading_references'], 4))
table.insert(sections, frame:extensionTag('references'))
add_specific_notes(sections, reference_notes)
end
local external_link_table = getExternalLinks ( current_lexeme )
if #external_link_table > 0 then
local external_links = '* ' .. table.concat(external_link_table, '\n* ')
table.insert(sections, heading_level(i18n['heading_external_links'], 4))
table.insert(sections, external_links)
end
add_any_notes(sections, args, i18n['manual_external_link'])
if #references_seen == 0 and #reference_notes == 0 and sense_extlinks and #sense_extlinks == 0 and #external_link_table == 0 and #get_any_notes(sections, args, i18n['manual_external_link']) == 0 then
table.insert(sections, i18n.rfref_category(lang_name))
end
return table.concat(sections,"\n\n")
end
return p
7f5zrlweks8bu51mroddrno8nt0mr0c
দাড়ি
0
58529
512454
339086
2026-07-02T17:10:32Z
Redmin
6857
লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L300830-এর সাথে সংযোগ তৈরি করছি
512454
wikitext
text/x-wiki
=={{langname|bn}}==
{{wp}}
[[File:Beard3.jpg|thumb|এক পুরুষ মানুষের দাড়িভর্তি গাল]]
=== ব্যুৎপত্তি ===
{{শুরু}} {{inh|bn|sa|दाढिका}} {{হতে}} {{inh+|bn|inc-pra|𑀤𑀸𑀠𑀺𑀆}}।
=== উচ্চারণ ===
* {{IPA|bn|/daɽi/|[ˈdaɽ̟iˑ]}}
*: {{অডিও|bn|LL-Q9610 (ben)-Titodutta-দাড়ি.wav|অডিও}}
*: {{বাংলা উচ্চারণ|দাড়ি}}
* {{rhymes|bn|ari|s=2}}
* {{hyphenation|bn|দা|ড়ি}}
=== বিশেষ্য ===
{{bn-বিশেষ্য}}
# [[গাল]] ও [[চিবুক|চিবুকে]] গজানো একধরনের [[লোম]]।
#: {{syn|bn|শ্মশ্রু}}
#: {{ux|bn|তুই কি '''দাড়ি''' রাখবি?}}
====অনুবাদসমূহ====
{{অনুবাদ-শীর্ষ}}
* {{as}}: {{l|as|দাড়ি}}
* {{en}}: {{l|en|beard}}
* {{hi}}: {{l|hi|दाढ़ी}}
{{অনুবাদ-নিচ}}
==== আরও দেখুন ====
* {{l|bn|গোঁপ}}, {{l|bn|গোঁফ}}
=== আরও পড়ুন ===
* {{R:CDIAL|*dāṁṣṭra|6250|page=358}}
{{লে|L300830|উচ্চারণ=
* {{IPA|as|/dari/}}|ব্যুৎপত্তি=
{{শুরু}} {{inh|as|sa|दाढिका}} {{হতে}} {{inh+|as|inc-pra|𑀤𑀸𑀠𑀺𑀆}}।
}}
46yagl33i92ydce636nabxs9xexag2h
512457
512454
2026-07-02T17:17:21Z
Redmin
6857
512457
wikitext
text/x-wiki
=={{langname|bn}}==
{{wp}}
[[File:Beard3.jpg|thumb|এক পুরুষ মানুষের দাড়িভর্তি গাল]]
=== ব্যুৎপত্তি ===
{{শুরু}} {{inh|bn|sa|दाढिका}} {{হতে}} {{inh+|bn|pra|𑀤𑀸𑀠𑀺𑀆}}।
=== উচ্চারণ ===
* {{IPA|bn|/daɽi/|[ˈdaɽ̟iˑ]}}
*: {{অডিও|bn|LL-Q9610 (ben)-Titodutta-দাড়ি.wav|অডিও}}
*: {{বাংলা উচ্চারণ|দাড়ি}}
* {{rhymes|bn|ari|s=2}}
* {{hyphenation|bn|দা|ড়ি}}
=== বিশেষ্য ===
{{bn-বিশেষ্য}}
# [[গাল]] ও [[চিবুক|চিবুকে]] গজানো একধরনের [[লোম]]।
#: {{syn|bn|শ্মশ্রু}}
#: {{ux|bn|তুই কি '''দাড়ি''' রাখবি?}}
====অনুবাদসমূহ====
{{অনুবাদ-শীর্ষ}}
* {{as}}: {{l|as|দাড়ি}}
* {{en}}: {{l|en|beard}}
* {{hi}}: {{l|hi|दाढ़ी}}
{{অনুবাদ-নিচ}}
==== আরও দেখুন ====
* {{l|bn|গোঁপ}}, {{l|bn|গোঁফ}}
=== আরও পড়ুন ===
* {{R:CDIAL|*dāṁṣṭra|6250|page=358}}
{{লে|L300830|উচ্চারণ=
* {{IPA|as|/dari/}}|ব্যুৎপত্তি=
{{শুরু}} {{inh|as|sa|दाढिका}} {{হতে}} {{inh+|as|pra|𑀤𑀸𑀠𑀺𑀆}}।
}}
5uau7v5pqdvy4fnaawx7ff5spbsbo9u
বৃত্ত
0
60333
512476
398077
2026-07-03T05:53:55Z
Redmin
6857
লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L689453-এর সাথে সংযোগ তৈরি করছি
512476
wikitext
text/x-wiki
{{লে|L689453}}
4i1p4a2odb13tbr32c4bh3t4bla0chm
কুকুৰ
0
66773
512455
182742
2026-07-02T17:11:50Z
Redmin
6857
লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L295100-এর সাথে সংযোগ তৈরি করছি
512455
wikitext
text/x-wiki
[[চিত্র:Wikilabrador jardin.JPG|thumb|right|200px|''কুকুৰ'']]
{{লে|L295100|meaning=# [[সারমেয়]]|উচ্চারণ=
* {{IPA|as|/kukuɹ/}}|ব্যুৎপত্তি=
{{inh+|as|sa|कुक्कुर}}।}}
stykla8slfzpqa7iz7o10tb4mmm5bm5
512458
512455
2026-07-02T17:18:48Z
Redmin
6857
512458
wikitext
text/x-wiki
[[চিত্র:Wikilabrador jardin.JPG|thumb|right|200px|''কুকুৰ'']]
{{লে|L295100|উচ্চারণ=* {{IPA|as|/kukuɹ/}}|ব্যুৎপত্তি={{inh+|as|sa|कुक्कुर}}।}}
0khdhmdyg8evlz7r4acwuammqdznpgp
মিলন
0
109834
512479
492644
2026-07-03T06:43:14Z
Redmin
6857
লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L643391-এর সাথে সংযোগ তৈরি করছি
512479
wikitext
text/x-wiki
{{লে|L643391}}
igkkvs8hc8cjoyyntgsd8iqsncf2k59
মিশ্র
0
109862
512478
492667
2026-07-03T06:13:49Z
Redmin
6857
লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L1571470-এর সাথে সংযোগ তৈরি করছি
512478
wikitext
text/x-wiki
{{লে|L1571470|meaning=#অন্য [[কোনো]] [[শিল্প]] বা বিদ্যার সঙ্গে [[যুক্ত]] করা হয়েছে এমন ([[মিশ্র]] রাগ)।
#(গণিত) জটিল ([[মিশ্র]] সমীকরণ)।
#(ব্যাকরণ) সং[[যুক্ত]] করা হয়েছে এমন ([[মিশ্র]] বাক্য)।
}}
5wst112lwj6cofdps56ok9oz2xksu43
মিশ্রিত
0
109867
512477
492672
2026-07-03T06:02:53Z
Redmin
6857
লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L1142885-এর সাথে সংযোগ তৈরি করছি
512477
wikitext
text/x-wiki
{{লে|L1142885|meaning=#[[ভেজাল]]।}}
alx8zd56mqhvyziz6ciz6osvnemx07n
মডিউল:template parser
828
122086
512461
324083
2026-07-02T18:14:40Z
Redmin
6857
ইংরেজি উইকিঅভিধান থেকে হালনাগাদ করা হলো
512461
Scribunto
text/plain
--[[
NOTE: This module works by using recursive backtracking to build a node tree, which can then be traversed as necessary.
Because it is called by a number of high-use modules, it has been optimised for speed using a profiler, since it is used to scrape data from large numbers of pages very quickly. To that end, it rolls some of its own methods in cases where this is faster than using a function from one of the standard libraries. Please DO NOT "simplify" the code by removing these, since you are almost guaranteed to slow things down, which could seriously impact performance on pages which call this module hundreds or thousands of times.
It has also been designed to emulate the native parser's behaviour as much as possible, which in some cases means replicating bugs or unintuitive behaviours in that code; these should not be "fixed", since it is important that the outputs are the same. Most of these originate from deficient regular expressions, which can't be used here, so the bugs have to be manually reintroduced as special cases (e.g. onlyinclude tags being case-sensitive and whitespace intolerant, unlike all other tags). If any of these are fixed, this module should also be updated accordingly.
]]
local export = {}
local data_module = "Module:template parser/data"
local load_module = "Module:load"
local magic_words_data_module = "Module:data/magic words"
local pages_module = "Module:pages"
local parser_extension_tags_data_module = "Module:data/parser extension tags"
local parser_module = "Module:parser"
local scribunto_module = "Module:Scribunto"
local string_pattern_escape_module = "Module:string/patternEscape"
local string_replacement_escape_module = "Module:string/replacementEscape"
local string_utilities_module = "Module:string utilities"
local table_length_module = "Module:table/length"
local table_shallow_copy_module = "Module:table/shallowCopy"
local table_sorted_pairs_module = "Module:table/sortedPairs"
local title_is_title_module = "Module:title/isTitle"
local title_make_title_module = "Module:title/makeTitle"
local title_new_title_module = "Module:title/newTitle"
local title_redirect_target_module = "Module:title/redirectTarget"
local require = require
local m_parser = require(parser_module)
local mw = mw
local mw_title = mw.title
local mw_uri = mw.uri
local string = string
local table = table
local anchor_encode = mw_uri.anchorEncode
local build_template -- defined as export.buildTemplate below
local class_else_type = m_parser.class_else_type
local concat = table.concat
local encode_uri = mw_uri.encode
local find = string.find
local format = string.format
local gsub = string.gsub
local html_create = mw.html.create
local insert = table.insert
local is_node = m_parser.is_node
local lower = string.lower
local match = string.match
local next = next
local pairs = pairs
local parse -- defined as export.parse below
local parse_template_name -- defined below
local pcall = pcall
local rep = string.rep
local select = select
local sub = string.sub
local title_equals = mw_title.equals
local tostring = m_parser.tostring
local type = type
local umatch = mw.ustring.match
--[==[
Loaders for functions in other modules, which overwrite themselves with the target function when called. This ensures modules are only loaded when needed, retains the speed/convenience of locally-declared pre-loaded functions, and has no overhead after the first call, since the target functions are called directly in any subsequent calls.]==]
local function decode_entities(...)
decode_entities = require(string_utilities_module).decode_entities
return decode_entities(...)
end
local function encode_entities(...)
encode_entities = require(string_utilities_module).encode_entities
return encode_entities(...)
end
local function get_link_target(...)
get_link_target = require(pages_module).get_link_target
return get_link_target(...)
end
local function is_title(...)
is_title = require(title_is_title_module)
return is_title(...)
end
local function load_data(...)
load_data = require(load_module).load_data
return load_data(...)
end
local function make_title(...)
make_title = require(title_make_title_module)
return make_title(...)
end
local function new_title(...)
new_title = require(title_new_title_module)
return new_title(...)
end
local function pattern_escape(...)
pattern_escape = require(string_pattern_escape_module)
return pattern_escape(...)
end
local function php_htmlspecialchars(...)
php_htmlspecialchars = require(scribunto_module).php_htmlspecialchars
return php_htmlspecialchars(...)
end
local function php_ltrim(...)
php_ltrim = require(scribunto_module).php_ltrim
return php_ltrim(...)
end
local function php_trim(...)
php_trim = require(scribunto_module).php_trim
return php_trim(...)
end
local function redirect_target(...)
redirect_target = require(title_redirect_target_module)
return redirect_target(...)
end
local function replacement_escape(...)
replacement_escape = require(string_replacement_escape_module)
return replacement_escape(...)
end
local function scribunto_parameter_key(...)
scribunto_parameter_key = require(scribunto_module).scribunto_parameter_key
return scribunto_parameter_key(...)
end
local function shallow_copy(...)
shallow_copy = require(table_shallow_copy_module)
return shallow_copy(...)
end
local function sorted_pairs(...)
sorted_pairs = require(table_sorted_pairs_module)
return sorted_pairs(...)
end
local function split(...)
split = require(string_utilities_module).split
return split(...)
end
local function table_len(...)
table_len = require(table_length_module)
return table_len(...)
end
local function uupper(...)
uupper = require(string_utilities_module).upper
return uupper(...)
end
--[==[
Loaders for objects, which load data (or some other object) into some variable, which can then be accessed as "foo or get_foo()", where the function get_foo sets the object to "foo" and then returns it. This ensures they are only loaded when needed, and avoids the need to check for the existence of the object each time, since once "foo" has been set, "get_foo" will not be called again.]==]
local data
local function get_data()
data, get_data = load_data(data_module), nil
return data
end
local frame
local function get_frame()
frame, get_frame = mw.getCurrentFrame(), nil
return frame
end
local magic_words
local function get_magic_words()
magic_words, get_magic_words = load_data(magic_words_data_module), nil
return magic_words
end
local parser_extension_tags
local function get_parser_extension_tags()
parser_extension_tags, get_parser_extension_tags = load_data(parser_extension_tags_data_module), nil
return parser_extension_tags
end
------------------------------------------------------------------------------------
--
-- Nodes
--
------------------------------------------------------------------------------------
local Node = m_parser.node()
local new_node = Node.new
local function expand(obj, frame_args)
return is_node(obj) and obj:expand(frame_args) or obj
end
export.expand = expand
function Node:expand(frame_args)
local output = {}
for i = 1, #self do
output[i] = expand(self[i], frame_args)
end
return concat(output)
end
local Wikitext = Node:new_class("wikitext")
-- force_node ensures the output will always be a Wikitext node.
function Wikitext:new(this, force_node)
if type(this) ~= "table" then
return force_node and new_node(self, {this}) or this
elseif #this == 1 then
local this1 = this[1]
return force_node and class_else_type(this1) ~= "wikitext" and new_node(self, this) or this1
end
local success, str = pcall(concat, this)
if success then
return force_node and new_node(self, {str}) or str
end
return new_node(self, this)
end
-- First value is the parameter name.
-- Second value is the parameter's default value.
-- Any additional values are ignored: e.g. "{{{a|b|c}}}" is parameter "a" with default value "b" (*not* "b|c").
local Parameter = Node:new_class("parameter")
function Parameter:new(this)
local this2 = this[2]
if class_else_type(this2) == "argument" then
insert(this2, 2, "=")
this2 = Wikitext:new(this2)
end
if this[3] == nil then
this[2] = this2
else
this = {this[1], this2}
end
return new_node(self, this)
end
function Parameter:__tostring()
local output = {}
for i = 1, #self do
output[i] = tostring(self[i])
end
return "{{{" .. concat(output, "|") .. "}}}"
end
function Parameter:get_name(frame_args)
return scribunto_parameter_key(expand(self[1], frame_args))
end
function Parameter:get_default(frame_args)
local default = self[2]
if default ~= nil then
return expand(default, frame_args)
end
return "{{{" .. expand(self[1], frame_args) .. "}}}"
end
function Parameter:expand(frame_args)
if frame_args == nil then
return self:get_default()
end
local name = expand(self[1], frame_args)
local val = frame_args[scribunto_parameter_key(name)] -- Parameter in use.
if val ~= nil then
return val
end
val = self[2] -- Default.
if val ~= nil then
return expand(val, frame_args)
end
return "{{{" .. name .. "}}}"
end
local Argument = Node:new_class("argument")
function Argument:new(this)
local key = this._parse_data.key
this = Wikitext:new(this)
if key == nil then
return this
end
return new_node(self, {Wikitext:new(key), this})
end
function Argument:__tostring()
return tostring(self[1]) .. "=" .. tostring(self[2])
end
function Argument:expand(frame_args)
return expand(self[1], frame_args) .. "=" .. expand(self[2], frame_args)
end
local Template = Node:new_class("template")
function Template:__tostring()
local output = {}
for i = 1, #self do
output[i] = tostring(self[i])
end
return "{{" .. concat(output, "|") .. "}}"
end
-- Normalize the template name, check it's a valid template, then memoize results (using false for invalid titles).
-- Parser functions (e.g. {{#IF:a|b|c}}) need to have the first argument extracted from the title, as it comes after the colon. Because of this, the parser function and first argument are memoized as a table.
-- FIXME: Some parser functions have special argument handling (e.g. {{#SWITCH:}}).
do
local templates, parser_variables, parser_functions = {}, {}, {}
local function retrieve_magic_word_data(chunk)
local mgw_data = (magic_words or get_magic_words())[chunk]
if mgw_data then
return mgw_data
end
local normalized = uupper(chunk)
mgw_data = magic_words[normalized]
if mgw_data and not mgw_data.case_sensitive then
return mgw_data
end
end
-- Returns the name required to transclude the title object `title` using
-- template {{ }} syntax. If the `shortcut` flag is set, then any calls
-- which require a namespace prefix will use the abbreviated form where one
-- exists (e.g. "Template:PAGENAME" becomes "T:PAGENAME").
local function get_template_invocation_name(title, shortcut)
if not (is_title(title) and not title.isExternal) then
error("Template invocations require a valid page title, which cannot contain an interwiki prefix.")
end
local namespace = title.namespace
-- If not in the template namespace, include the prefix (or ":" if
-- mainspace).
if namespace ~= 10 then
return get_link_target(title, shortcut)
end
-- If in the template namespace and it shares a name with a magic word,
-- it needs the prefix "Template:".
local text, fragment = title.text, title.fragment
if fragment and fragment ~= "" then
text = text .. "#" .. fragment
end
local colon = find(text, ":", nil, true)
if not colon then
local mgw_data = retrieve_magic_word_data(text)
return mgw_data and mgw_data.parser_variable and get_link_target(title, shortcut) or text
end
local mgw_data = retrieve_magic_word_data(sub(text, 1, colon - 1))
if mgw_data and (mgw_data.parser_function or mgw_data.transclusion_modifier) then
return get_link_target(title, shortcut)
end
-- Also if "Template:" is necessary for disambiguation (e.g.
-- "Template:Category:Foo" can't be called with "Category:Foo").
local check = new_title(text, namespace)
return check and title_equals(title, check) and text or get_link_target(title, shortcut)
end
export.getTemplateInvocationName = get_template_invocation_name
function parse_template_name(name, has_args, fragment, force_transclusion)
local chunks, colon, start, n, p = {}, find(name, ":", nil, true), 1, 0, 0
while colon do
local mgw_data = retrieve_magic_word_data(php_ltrim(sub(name, start, colon - 1)))
if not mgw_data then
break
end
local priority = mgw_data.priority
if not (priority and priority > p) then
local pf = mgw_data.parser_function and mgw_data.name or nil
if pf then
n = n + 1
chunks[n] = pf .. ":"
return chunks, "parser function", sub(name, colon + 1)
end
break
end
n = n + 1
chunks[n] = mgw_data.name .. ":"
start, p = colon + 1, priority
colon = find(name, ":", start, true)
end
if start > 1 then
name = sub(name, start)
end
name = php_trim(name)
-- Parser variables can only take SUBST:/SAFESUBST: as modifiers.
if not has_args and p <= 1 then
local mgw_data = retrieve_magic_word_data(name)
local pv = mgw_data and mgw_data.parser_variable and mgw_data.name or nil
if pv then
n = n + 1
chunks[n] = pv
return chunks, "parser variable"
end
end
-- Get the template title with the custom new_title() function in
-- [[Module:title/newTitle]], with `allowOnlyFragment` set to false
-- (e.g. "{{#foo}}" is invalid) and `allowRelative` set to true, for
-- relative links for namespaces with subpages (e.g. "{{/foo}}").
local title = new_title(name, 10, false, true)
if not (title and not title.isExternal) then
return nil
end
if force_transclusion ~= "no_redirect" then
-- Resolve any redirects. If the redirect target is an interwiki link,
-- the template won't fail, but the redirect does not get resolved (i.e.
-- the redirect page itself gets transcluded, so the template name
-- should not be normalized to the target).
local redirect = redirect_target(title, force_transclusion)
if redirect and not redirect.isExternal then
title = redirect
end
end
-- If `fragment` is not true, unset it from the title object to prevent
-- it from being included by get_template_invocation_name.
if not fragment then
title.fragment = ""
end
chunks[n + 1] = get_template_invocation_name(title)
return chunks, "template"
end
-- Note: `force_transclusion` avoids incrementing the expensive parser function count by forcing transclusion
-- instead. This should only be used when there is a real risk that the expensive parser function limit of
-- 500 will be hit. If `force_transclusion` has the value "no_redirect", redirect checking is turned off
-- entirely. This should only be used in very limited circumstances when it is otherwise impossible to avoid
-- hitting the expensive parser limit and we are willing to handle the possible redirects ourselves.
local function process_name(self, frame_args, force_transclusion)
local name = expand(self[1], frame_args)
local has_args, norm = #self > 1
if not has_args then
norm = parser_variables[name]
if norm then
return norm, "parser variable"
end
end
norm = templates[name]
if norm then
local pf_arg1 = parser_functions[name]
return norm, pf_arg1 and "parser function" or "template", pf_arg1
elseif norm == false then
return nil
end
local chunks, subclass, pf_arg1 = parse_template_name(name, has_args, nil, force_transclusion)
-- Fail if invalid.
if not chunks then
templates[name] = false
return nil
end
local chunk1 = chunks[1]
-- Fail on SUBST:.
if chunk1 == "SUBST:" then
templates[name] = false
return nil
-- Any modifiers are ignored.
elseif subclass == "parser function" then
local pf = chunks[#chunks]
templates[name] = pf
parser_functions[name] = pf_arg1
return pf, "parser function", pf_arg1
end
-- Ignore SAFESUBST:, and treat MSGNW: as a parser function with the pagename as its first argument (ignoring any RAW: that comes after).
if chunks[chunk1 == "SAFESUBST:" and 2 or 1] == "MSGNW:" then
pf_arg1 = chunks[#chunks]
local pf = "MSGNW:"
templates[name] = pf
parser_functions[name] = pf_arg1
return pf, "parser function", pf_arg1
end
-- Ignore any remaining modifiers, as they've done their job.
local output = chunks[#chunks]
if subclass == "parser variable" then
parser_variables[name] = output
else
templates[name] = output
end
return output, subclass
end
function Template:get_name(frame_args, force_transclusion)
-- Only return the first return value.
return (process_name(self, frame_args, force_transclusion))
end
function Template:get_arguments(frame_args)
local name, subclass, pf_arg1 = process_name(self, frame_args)
if name == nil then
return nil
elseif subclass == "parser variable" then
return {}
end
local template_args = {}
if subclass == "parser function" then
template_args[1] = pf_arg1
for i = 2, #self do
template_args[i] = expand(self[i], frame_args) -- Not trimmed.
end
return template_args
end
local implicit = 0
for i = 2, #self do
local arg = self[i]
if class_else_type(arg) == "argument" then
template_args[scribunto_parameter_key(expand(arg[1], frame_args))] = php_trim((expand(arg[2], frame_args)))
else
implicit = implicit + 1
template_args[implicit] = expand(arg, frame_args) -- Not trimmed.
end
end
return template_args
end
-- BIG TODO: manual template expansion.
function Template:expand(frame_args)
local name, subclass, pf_arg1 = process_name(self, frame_args)
if name == nil then
local output = {}
for i = 1, #self do
output[i] = expand(self[i], frame_args)
end
return "{{" .. concat(output, "|") .. "}}"
elseif subclass == "parser variable" then
return (frame or get_frame()):preprocess("{{" .. name .. "}}")
elseif subclass == "parser function" then
local f = frame or get_frame()
if frame_args ~= nil then
local success, new_f = pcall(f.newChild, f, {args = frame_args})
if success then
f = new_f
end
end
return f:preprocess(tostring(self))
end
local output = {}
for i = 1, #self do
output[i] = expand(self[i], frame_args)
end
return (frame or get_frame()):preprocess("{{" .. concat(output, "|") .. "}}")
end
end
local Tag = Node:new_class("tag")
function Tag:__tostring()
local open_tag, attributes, n = {"<", self.name}, self:get_attributes(), 2
for attr, value in next, attributes do
n = n + 1
open_tag[n] = " " .. php_htmlspecialchars(attr) .. "=\"" .. php_htmlspecialchars(value, "compat") .. "\""
end
if self.self_closing then
return concat(open_tag) .. "/>"
end
return concat(open_tag) .. ">" .. concat(self) .. "</" .. self.name .. ">"
end
do
local valid_attribute_name
local function get_valid_attribute_name()
valid_attribute_name, get_valid_attribute_name = (data or get_data()).valid_attribute_name, nil
return valid_attribute_name
end
function Tag:get_attributes()
local raw = self.attributes
if not raw then
self.attributes = {}
return self.attributes
elseif type(raw) == "table" then
return raw
end
if sub(raw, -1) == "/" then
raw = sub(raw, 1, -2)
end
local attributes, head = {}, 1
-- Semi-manual implementation of the native regex.
while true do
local name, loc = match(raw, "([^\t\n\f\r />][^\t\n\f\r /=>]*)()", head)
if not name then
break
end
head = loc
local value
loc = match(raw, "^[\t\n\f\r ]*=[\t\n\f\r ]*()", head)
if loc then
head = loc
-- Either "", '' or the value ends on a space/at the end. Missing
-- end quotes are repaired by closing the value at the end.
value, loc = match(raw, "^\"([^\"]*)\"?()", head)
if not value then
value, loc = match(raw, "^'([^']*)'?()", head)
if not value then
value, loc = match(raw, "^([^\t\n\f\r ]*)()", head)
end
end
head = loc
end
-- valid_attribute_name is a pattern matching a valid attribute name.
-- Defined in the data due to its length - see there for more info.
if umatch(name, valid_attribute_name or get_valid_attribute_name()) then
-- Sanitizer applies PHP strtolower (ASCII-only).
attributes[lower(name)] = value and decode_entities(
php_trim((gsub(value, "[\t\n\r ]+", " ")))
) or ""
end
end
self.attributes = attributes
return attributes
end
end
function Tag:expand()
return (frame or get_frame()):preprocess(tostring(self))
end
local Heading = Node:new_class("heading")
function Heading:new(this)
if #this > 1 then
local success, str = pcall(concat, this)
if success then
return new_node(self, {
str,
level = this.level,
section = this.section,
index = this.index
})
end
end
return new_node(self, this)
end
do
local node_tostring = Node.__tostring
function Heading:__tostring()
local eq = rep("=", self.level)
return eq .. node_tostring(self) .. eq
end
end
do
local expand_node = Node.expand
-- Expanded heading names can contain "\n" (e.g. inside nowiki tags), which
-- causes any heading containing them to fail. However, in such cases, the
-- native parser still treats it as a heading for the purpose of section
-- numbers.
local function validate_name(self, frame_args)
local name = expand_node(self, frame_args)
if find(name, "\n", nil, true) then
return nil
end
return name
end
function Heading:get_name(frame_args)
local name = validate_name(self, frame_args)
return name ~= nil and php_trim(name) or nil
end
-- FIXME: account for anchor disambiguation.
function Heading:get_anchor(frame_args)
local name = validate_name(self, frame_args)
return name ~= nil and decode_entities(anchor_encode(name)) or nil
end
function Heading:expand(frame_args)
local eq = rep("=", self.level)
return eq .. expand_node(self, frame_args) .. eq
end
end
------------------------------------------------------------------------------------
--
-- Parser
--
------------------------------------------------------------------------------------
local Parser = m_parser.string_parser()
-- Template or parameter.
-- Parsed by matching the opening braces innermost-to-outermost (ignoring lone closing braces). Parameters {{{ }}} take priority over templates {{ }} where possible, but a double closing brace will always result in a closure, even if there are 3+ opening braces.
-- For example, "{{{{foo}}}}" (4) is parsed as a parameter enclosed by single braces, and "{{{{{foo}}}}}" (5) is a parameter inside a template. However, "{{{{{foo }} }}}" is a template inside a parameter, due to "}}" forcing the closure of the inner node.
do
-- Handlers.
local handle_name
local handle_argument
local handle_value
local function do_template_or_parameter(self, inner_node)
self:push_sublayer(handle_name)
self:set_pattern("[\n<[{|}]")
-- If a node has already been parsed, nest it at the start of the new
-- outer node (e.g. when parsing"{{{{foo}}bar}}", the template "{{foo}}"
-- is parsed first, since it's the innermost, and becomes the first
-- node of the outer template.
if inner_node then
self:emit(inner_node)
end
end
local function pipe(self)
self:emit(Wikitext:new(self:pop_sublayer()))
self:push_sublayer(handle_argument)
self:set_pattern("[\n<=[{|}]")
end
local function rbrace(self, this)
if self:read(1) == "}" then
self:emit(Wikitext:new(self:pop_sublayer()))
return self:pop()
end
self:emit(this)
end
function handle_name(self, ...)
handle_name = self:switch(handle_name, {
["\n"] = Parser.heading_block,
["<"] = Parser.tag,
["["] = Parser.wikilink_block,
["{"] = Parser.braces,
["|"] = pipe,
["}"] = rbrace,
[""] = Parser.fail_route,
[false] = Parser.emit
})
return handle_name(self, ...)
end
function handle_argument(self, ...)
handle_argument = self:switch(handle_argument, {
["\n"] = function(self, this)
return self:heading_block(this, "==")
end,
["<"] = Parser.tag,
["="] = function(self)
local key = self:pop_sublayer()
self:push_sublayer(handle_value)
self:set_pattern("[\n<[{|}]")
self.current_layer._parse_data.key = key
end,
["["] = Parser.wikilink_block,
["{"] = Parser.braces,
["|"] = pipe,
["}"] = rbrace,
[""] = Parser.fail_route,
[false] = Parser.emit
})
return handle_argument(self, ...)
end
function handle_value(self, ...)
handle_value = self:switch(handle_value, {
["\n"] = Parser.heading_block,
["<"] = Parser.tag,
["["] = Parser.wikilink_block,
["{"] = Parser.braces,
["|"] = function(self)
self:emit(Argument:new(self:pop_sublayer()))
self:push_sublayer(handle_argument)
self:set_pattern("[\n<=[{|}]")
end,
["}"] = function(self, this)
if self:read(1) == "}" then
self:emit(Argument:new(self:pop_sublayer()))
return self:pop()
end
self:emit(this)
end,
[""] = Parser.fail_route,
[false] = Parser.emit
})
return handle_value(self, ...)
end
function Parser:template_or_parameter()
local text, head, node_to_emit, failed = self.text, self.head
-- Comments/tags interrupt the brace count.
local braces = match(text, "^{+()", head) - head
self:advance(braces)
while true do
local success, node = self:try(do_template_or_parameter, node_to_emit)
-- Fail means no "}}" or "}}}" was found, so emit any remaining
-- unmatched opening braces before any templates/parameters that
-- were found.
if not success then
self:emit(rep("{", braces))
failed = true
break
-- If there are 3+ opening and closing braces, it's a parameter.
elseif braces >= 3 and self:read(2) == "}" then
self:advance(3)
braces = braces - 3
node = Parameter:new(node)
-- Otherwise, it's a template.
else
self:advance(2)
braces = braces - 2
node = Template:new(node)
end
local index = head + braces
node.index = index
node.raw = sub(text, index, self.head - 1)
node_to_emit = node
-- Terminate once not enough braces remain for further matches.
if braces == 0 then
break
-- Emit any stray opening brace before any matched nodes.
elseif braces == 1 then
self:emit("{")
break
end
end
if node_to_emit then
self:emit(node_to_emit)
end
return braces, failed
end
end
-- Tag.
do
local end_tags
local function get_end_tags()
end_tags, get_end_tags = (data or get_data()).end_tags, nil
return end_tags
end
-- Handlers.
local handle_start
local handle_tag
local function do_tag(self)
local layer = self.current_layer
layer._parse_data.handler, layer.index = handle_start, self.head
self:set_pattern("[%s/>]")
self:advance()
end
local function is_ignored_tag(self, this)
if self.transcluded then
return this == "includeonly"
end
return this == "noinclude" or this == "onlyinclude"
end
local function ignored_tag(self, text, head)
local loc = find(text, ">", head, true)
if not loc then
return self:fail_route()
end
self:jump(loc)
local tag = self:pop()
tag.ignored = true
return tag
end
function handle_start(self, this)
if this == "/" then
local text, head = self.text, self.head + 1
local this = match(text, "^[^%s/>]+", head)
if this and is_ignored_tag(self, lower(this)) then
head = head + #this
if not match(text, "^/[^>]", head) then
return ignored_tag(self, text, head)
end
end
return self:fail_route()
elseif this == "" then
return self:fail_route()
end
-- Tags are only case-insensitive with ASCII characters.
local raw_name = this
this = lower(this)
local end_tag_pattern = (end_tags or get_end_tags())[this]
if not end_tag_pattern then -- Validity check.
return self:fail_route()
end
local layer = self.current_layer
local pdata = layer._parse_data
local text, head = self.text, self.head + pdata.step
if match(text, "^/[^>]", head) then
return self:fail_route()
elseif is_ignored_tag(self, this) then
return ignored_tag(self, text, head)
-- If an onlyinclude tag is not ignored (and cannot be active since it
-- would have triggered special handling earlier), it must be plaintext.
elseif this == "onlyinclude" then
return self:fail_route()
elseif this == "noinclude" or this == "includeonly" then
layer.ignored = true -- Ignored block.
layer.raw_name = raw_name
end
layer.name, pdata.handler, pdata.end_tag_pattern = this, handle_tag, end_tag_pattern
self:set_pattern(">")
end
function handle_tag(self, this)
if this == "" then
return self:fail_route()
end
local layer = self.current_layer
if this ~= ">" then
layer.attributes = this
return
elseif self:read(-1) == "/" then
layer.self_closing = true
return self:pop()
end
local text, head = self.text, self.head + 1
local loc1, loc2 = find(text, layer._parse_data.end_tag_pattern, head)
if loc1 then
if loc1 > head then
self:emit(sub(text, head, loc1 - 1))
end
self:jump(loc2)
return self:pop()
-- noinclude and includeonly will tolerate having no closing tag, but
-- only if given in lowercase. This is due to a preprocessor bug, as
-- it uses a regex with the /i (case-insensitive) flag to check for
-- end tags, but a simple array lookup with lowercase tag names when
-- looking up which tags should tolerate no closing tag (exact match
-- only, so case-sensitive).
elseif layer.ignored then
local raw_name = layer.raw_name
if raw_name == "noinclude" or raw_name == "includeonly" then
self:jump(#text)
return self:pop()
end
end
return self:fail_route()
end
function Parser:tag()
-- HTML comment.
if self:read(1, 3) == "!--" then
local text = self.text
self:jump(select(2, find(text, "-->", self.head + 4, true)) or #text)
-- onlyinclude tags (which must be lowercase with no whitespace).
elseif self.onlyinclude and self:read(1, 13) == "/onlyinclude>" then
local text = self.text
self:jump(select(2, find(text, "<onlyinclude>", self.head + 14, true)) or #text)
else
local success, tag = self:try(do_tag)
if not success then
self:emit("<")
elseif not tag.ignored then
self:emit(Tag:new(tag))
end
end
end
end
-- Heading.
-- The preparser assigns each heading a number, which is used for things like section edit links. The preparser will only do this for heading blocks which aren't nested inside templates, parameters and parser tags. In some cases (e.g. when template blocks contain untrimmed newlines), a preparsed heading may not be treated as a heading in the final output. That does not affect the preparser, however, which will always count sections based on the preparser heading count, since it can't know what a template's final output will be.
do
-- Handlers.
local handle_start
local handle_body
local handle_possible_end
local function do_heading(self)
local layer, head = self.current_layer, self.head
layer._parse_data.handler, layer.index = handle_start, head
self:set_pattern("[\t\n ]")
-- Comments/tags interrupt the equals count.
local eq = match(self.text, "^=+()", head) - head
layer.level = eq
self:advance(eq)
end
local function do_heading_possible_end(self)
self.current_layer._parse_data.handler = handle_possible_end
self:set_pattern("[\n<]")
end
function handle_start(self, ...)
-- ===== is "=" as an L2; ======== is "==" as an L3 etc.
local function newline(self)
local layer = self.current_layer
local eq = layer.level
if eq <= 2 then
return self:fail_route()
end
-- Calculate which equals signs determine the heading level.
local level_eq = eq - (2 - eq % 2)
level_eq = level_eq > 12 and 12 or level_eq
-- Emit the excess.
self:emit(rep("=", eq - level_eq))
layer.level = level_eq / 2
return self:pop()
end
local function whitespace(self)
local success, possible_end = self:try(do_heading_possible_end)
if success then
self:emit(Wikitext:new(possible_end))
self.current_layer._parse_data.handler = handle_body
self:set_pattern("[\n<=[{]")
return self:consume()
end
return newline(self)
end
handle_start = self:switch(handle_start, {
["\t"] = whitespace,
["\n"] = newline,
[" "] = whitespace,
[""] = newline,
[false] = function(self)
-- Emit any excess = signs once we know it's a conventional heading. Up till now, we couldn't know if the heading is just a string of = signs (e.g. ========), so it wasn't guaranteed that the heading text starts after the 6th.
local layer = self.current_layer
local eq = layer.level
if eq > 6 then
self:emit(1, rep("=", eq - 6))
layer.level = 6
end
layer._parse_data.handler = handle_body
self:set_pattern("[\n<=[{]")
return self:consume()
end
})
return handle_start(self, ...)
end
function handle_body(self, ...)
handle_body = self:switch(handle_body, {
["\n"] = Parser.fail_route,
["<"] = Parser.tag,
["="] = function(self)
-- Comments/tags interrupt the equals count.
local eq = match(self.text, "^=+", self.head)
local eq_len = #eq
self:advance(eq_len)
local success, possible_end = self:try(do_heading_possible_end)
if success then
self:emit(eq)
self:emit(Wikitext:new(possible_end))
return self:consume()
end
local layer = self.current_layer
local level = layer.level
if eq_len > level then
self:emit(rep("=", eq_len - level))
elseif level > eq_len then
layer.level = eq_len
self:emit(1, rep("=", level - eq_len))
end
return self:pop()
end,
["["] = Parser.wikilink_block,
["{"] = function(self, this)
return self:braces(this, true)
end,
[""] = Parser.fail_route,
[false] = Parser.emit
})
return handle_body(self, ...)
end
function handle_possible_end(self, ...)
handle_possible_end = self:switch(handle_possible_end, {
["\n"] = Parser.fail_route,
["<"] = function(self)
if self:read(1, 3) ~= "!--" then
return self:pop()
end
local head = select(2, find(self.text, "-->", self.head + 4, true))
if not head then
return self:pop()
end
self:jump(head)
end,
[""] = Parser.fail_route,
[false] = function(self, this)
if not match(this, "^[\t ]+()$") then
return self:pop()
end
self:emit(this)
end
})
return handle_possible_end(self, ...)
end
function Parser:heading()
local success, heading = self:try(do_heading)
if success then
local section = self.section + 1
heading.section = section
self.section = section
self:emit(Heading:new(heading))
return self:consume()
else
self:emit("=")
end
end
end
------------------------------------------------------------------------------------
--
-- Block handlers
--
------------------------------------------------------------------------------------
-- Block handlers.
-- These are blocks which can affect template/parameter parsing, since they're also parsed by Parsoid at the same time (even though they aren't processed until later).
-- All blocks (including templates/parameters) can nest inside each other, but an inner block must be closed before the outer block which contains it. This is why, for example, the wikitext "{{template| [[ }}" will result in an unprocessed template, since the inner "[[" is treated as the opening of a wikilink block, which prevents "}}" from being treated as the closure of the template block. On the other hand, "{{template| [[ ]] }}" will process correctly, since the wikilink block is closed before the template closure. It makes no difference whether the block will be treated as valid or not when it's processed later on, so "{{template| [[ }} ]] }}" would also work, even though "[[ }} ]]" is not a valid wikilink.
-- Note that nesting also affects pipes and equals signs, in addition to block closures.
-- These blocks can be nested to any degree, so "{{template| [[ [[ [[ ]] }}" will not work, since only one of the three wikilink blocks has been closed. On the other hand, "{{template| [[ [[ [[ ]] ]] ]] }}" will work.
-- All blocks are implicitly closed by the end of the text, since their validity is irrelevant at this stage.
-- Language conversion block.
-- Opens with "-{" and closes with "}-". However, templates/parameters take priority, so "-{{" is parsed as "-" followed by the opening of a template/parameter block (depending on what comes after).
-- Note: Language conversion blocks aren't actually enabled on the English Wiktionary, but Parsoid still parses them at this stage, so they can affect the closure of outer blocks: e.g. "[[ -{ ]]" is not a valid wikilink block, since the "]]" falls inside the new language conversion block.
do
--Handler.
local handle_language_conversion_block
local function do_language_conversion_block(self)
self.current_layer._parse_data.handler = handle_language_conversion_block
self:set_pattern("[\n<[{}]")
end
function handle_language_conversion_block(self, ...)
handle_language_conversion_block = self:switch(handle_language_conversion_block, {
["\n"] = Parser.heading_block,
["<"] = Parser.tag,
["["] = Parser.wikilink_block,
["{"] = Parser.braces,
["}"] = function(self, this)
if self:read(1) == "-" then
self:emit("}-")
self:advance()
return self:pop()
end
self:emit(this)
end,
[""] = Parser.pop,
[false] = Parser.emit
})
return handle_language_conversion_block(self, ...)
end
function Parser:braces(this, fail_on_unclosed_braces)
local language_conversion_block = self:read(-1) == "-"
if self:read(1) == "{" then
local braces, failed = self:template_or_parameter()
-- Headings will fail if they contain an unclosed brace block.
if failed and fail_on_unclosed_braces then
return self:fail_route()
-- Language conversion blocks cannot begin "-{{", but can begin
-- "-{{{" iff parsed as "-{" + "{{".
elseif not (language_conversion_block and braces == 1) then
return self:consume()
end
else
self:emit(this)
if not language_conversion_block then
return
end
self:advance()
end
self:emit(Wikitext:new(self:get(do_language_conversion_block)))
end
end
--[==[
Headings
Opens with "\n=" (or "=" at the start of the text), and closes with "\n" or the end of the text. Note that it doesn't matter whether the heading will fail to process due to a premature newline (e.g. if there are no closing signs), so at this stage the only thing that matters for closure is the newline or end of text.
Note: Heading blocks are only parsed like this if they occur inside a template, since they do not iterate the preparser's heading count (i.e. they aren't proper headings).
Note 2: if directly inside a template argument with no previous equals signs, a newline followed by a single equals sign is parsed as an argument equals sign, not the opening of a new L1 heading block. This does not apply to any other heading levels. As such, {{template|key\n=}}, {{template|key\n=value}} or even {{template|\n=}} will successfully close, but {{template|key\n==}}, {{template|key=value\n=more value}}, {{template\n=}} etc. will not, since in the latter cases the "}}" would fall inside the new heading block.
]==]
do
--Handler.
local handle_heading_block
local function do_heading_block(self)
self.current_layer._parse_data.handler = handle_heading_block
self:set_pattern("[\n<[{]")
end
function handle_heading_block(self, ...)
handle_heading_block = self:switch(handle_heading_block, {
["\n"] = function(self)
self:newline()
return self:pop()
end,
["<"] = Parser.tag,
["["] = Parser.wikilink_block,
["{"] = Parser.braces,
[""] = Parser.pop,
[false] = Parser.emit
})
return handle_heading_block(self, ...)
end
function Parser:heading_block(this, nxt)
self:newline()
this = this .. (nxt or "=")
local loc = #this - 1
while self:read(0, loc) == this do
self:advance()
self:emit(Wikitext:new(self:get(do_heading_block)))
end
end
end
-- Wikilink block.
-- Opens with "[[" and closes with "]]".
do
-- Handler.
local handle_wikilink_block
local function do_wikilink_block(self)
self.current_layer._parse_data.handler = handle_wikilink_block
self:set_pattern("[\n<[%]{]")
end
function handle_wikilink_block(self, ...)
handle_wikilink_block = self:switch(handle_wikilink_block, {
["\n"] = Parser.heading_block,
["<"] = Parser.tag,
["["] = Parser.wikilink_block,
["]"] = function(self, this)
if self:read(1) == "]" then
self:emit("]]")
self:advance()
return self:pop()
end
self:emit(this)
end,
["{"] = Parser.braces,
[""] = Parser.pop,
[false] = Parser.emit
})
return handle_wikilink_block(self, ...)
end
function Parser:wikilink_block()
if self:read(1) == "[" then
self:emit("[[")
self:advance(2)
self:emit(Wikitext:new(self:get(do_wikilink_block)))
else
self:emit("[")
end
end
end
-- Lines which only contain comments, " " and "\t" are eaten, so long as
-- they're bookended by "\n" (i.e. not the first or last line).
function Parser:newline()
local text, head = self.text, self.head
while true do
repeat
local loc = match(text, "^[\t ]*<!%-%-()", head + 1)
if not loc then
break
end
loc = select(2, find(text, "-->", loc, true))
head = loc or head
until not loc
-- Fail if no comments found.
if head == self.head then
break
end
head = match(text, "^[\t ]*()\n", head + 1)
if not head then
break
end
self:jump(head)
end
self:emit("\n")
end
do
-- Handlers.
local handle_start
local main_handler
-- If `transcluded` is true, then the text is checked for a pair of
-- onlyinclude tags. If these are found (even if they're in the wrong
-- order), then the start of the page is treated as though it is preceded
-- by a closing onlyinclude tag.
-- Note 1: unlike other parser extension tags, onlyinclude tags are case-
-- sensitive and cannot contain whitespace.
-- Note 2: onlyinclude tags *can* be implicitly closed by the end of the
-- text, but the hard requirement above means this can only happen if
-- either the tags are in the wrong order or there are multiple onlyinclude
-- blocks.
local function do_parse(self, transcluded)
self.current_layer._parse_data.handler = handle_start
self:set_pattern(".")
self.section = 0
if not transcluded then
return
end
self.transcluded = true
local text = self.text
if find(text, "</onlyinclude>", nil, true) then
local head = find(text, "<onlyinclude>", nil, true)
if head then
self.onlyinclude = true
self:jump(head + 13)
end
end
end
-- If the first character is "=", try parsing it as a heading.
function handle_start(self, this)
self.current_layer._parse_data.handler = main_handler
self:set_pattern("[\n<{]")
if this == "=" then
return self:heading()
end
return self:consume()
end
function main_handler(self, ...)
main_handler = self:switch(main_handler, {
["\n"] = function(self)
self:newline()
if self:read(1) == "=" then
self:advance()
return self:heading()
end
end,
["<"] = Parser.tag,
["{"] = function(self, this)
if self:read(1) == "{" then
self:template_or_parameter()
return self:consume()
end
self:emit(this)
end,
[""] = Parser.pop,
[false] = Parser.emit
})
return main_handler(self, ...)
end
function export.parse(text, transcluded)
local text_type = type(text)
return (select(2, Parser:parse{
text = text_type == "string" and text or
text_type == "number" and tostring(text) or
error("bad argument #1 (string expected, got " .. text_type .. ")"),
node = {Wikitext, true},
route = {do_parse, transcluded}
}))
end
parse = export.parse
end
function export.find_templates(text, not_transcluded)
return parse(text, not not_transcluded):iterate_nodes("template")
end
do
local link_parameter_1, link_parameter_2
local function get_link_parameter_1()
link_parameter_1, get_link_parameter_1 = (data or get_data()).template_link_param_1, nil
return link_parameter_1
end
local function get_link_parameter_2()
link_parameter_2, get_link_parameter_2 = (data or get_data()).template_link_param_2, nil
return link_parameter_2
end
-- Generate a link. If the target title doesn't have a fragment, use "#top"
-- (which is an implicit anchor at the top of every page), as this ensures
-- self-links still display as links, since bold display is distracting and
-- unintuitive for template links.
local function link_page(title, display)
local fragment = title.fragment
if fragment == "" then
fragment = "top"
end
return format(
"[[:%s|%s]]",
encode_uri(title.prefixedText .. "#" .. fragment, "WIKI"),
display
)
end
-- pf_arg1 or pf_arg2 may need to be linked if a given parser function
-- treats them as a pagename. If a key exists in `namespace`, the value is
-- the namespace for the page: if not 0, then the namespace prefix will
-- always be added to the input (e.g. {{#invoke:}} can only target the
-- Module: namespace, so inputting "Template:foo" gives
-- "Module:Template:foo", and "Module:foo" gives "Module:Module:foo").
-- However, this isn't possible with mainspace (namespace 0), so prefixes
-- are respected. make_title() handles all of this automatically.
local function finalize_arg(pagename, namespace)
if namespace == nil then
return pagename
end
local title = make_title(namespace, pagename)
return title and not title.isExternal and link_page(title, pagename) or pagename
end
local function render_title(name, args)
-- parse_template_name returns a table of transclusion modifiers plus
-- the normalized template/magic word name, which will be used as link
-- targets. The third return value pf_arg1 is the first argument of a
-- a parser function, which comes after the colon (e.g. "foo" in
-- "{{#IF:foo|bar|baz}}"). This means args[1] (i.e. the first argument
-- that comes after a pipe is actually argument 2, and so on. Note: the
-- second parameter of parse_template_name checks if there are any
-- arguments, since parser variables cannot take arguments (e.g.
-- {{CURRENTYEAR}} is a parser variable, but {{CURRENTYEAR|foo}}
-- transcludes "Template:CURRENTYEAR"). In such cases, the returned
-- table explicitly includes the "Template:" prefix in the template
-- name. The third parameter instructs it to retain any fragment in the
-- template name in the returned table, if present.
local chunks, subclass, pf_arg1 = parse_template_name(
name,
args and pairs(args)(args) ~= nil,
true
)
if chunks == nil then
return name, args
end
local chunks_len = #chunks
-- Additionally, generate the corresponding table `rawchunks`, which
-- is a list of colon-separated chunks in the raw input. This is used
-- to retrieve the display forms for each chunk.
local rawchunks = split(name, ":")
for i = 1, chunks_len - 1 do
chunks[i] = format(
"[[%s|%s]]",
encode_uri((magic_words or get_magic_words())[sub(chunks[i], 1, -2)].transclusion_modifier, "WIKI"),
rawchunks[i]
)
end
local chunk = chunks[chunks_len]
-- If it's a template, return a link to it with link_page, concatenating
-- the remaining chunks in `rawchunks` to form the display text.
-- Use new_title with the default namespace 10 (Template:) to generate
-- a target title, which is the same setting used for retrieving
-- templates (including those in other namespaces, as prefixes override
-- the default).
if subclass == "template" then
chunks[chunks_len] = link_page(
new_title(chunk, 10),
concat(rawchunks, ":", chunks_len) -- :
)
return concat(chunks, ":"), args -- :
elseif subclass == "parser variable" then
chunks[chunks_len] = format(
"[[%s|%s]]",
encode_uri((magic_words or get_magic_words())[chunk].parser_variable, "WIKI"),
rawchunks[chunks_len]
)
return concat(chunks, ":"), args -- :
end
-- Otherwise, it must be a parser function.
local mgw_data = (magic_words or get_magic_words())[sub(chunk, 1, -2)]
local link = mgw_data.parser_function or mgw_data.transclusion_modifier
local pf_arg2 = args and args[1] or nil
-- Some magic words have different links, depending on whether argument
-- 2 is specified (e.g. "baz" in {{foo:bar|baz}}).
if type(link) == "table" then
link = pf_arg2 and link[2] or link[1]
end
chunks[chunks_len] = format(
"[[%s|%s]]",
encode_uri(link, "WIKI"),
rawchunks[chunks_len]
)
-- #TAG: has special handling, because documentation links for parser
-- extension tags come from [[Module:data/parser extension tags]].
if chunk == "#TAG:" then
-- Tags are only case-insensitive with ASCII characters.
local tag = (parser_extension_tags or get_parser_extension_tags())[lower(php_trim(pf_arg1))]
if tag then
pf_arg1 = format(
"[[%s|%s]]",
encode_uri(tag, "WIKI"),
pf_arg1
)
end
-- Otherwise, finalize pf_arg1 and add it to `chunks`.
else
pf_arg1 = finalize_arg(pf_arg1, (link_parameter_1 or get_link_parameter_1())[chunk])
end
chunks[chunks_len + 1] = pf_arg1
-- Finalize pf_arg2 (if applicable), then return.
if pf_arg2 then
args = shallow_copy(args) -- Avoid destructively modifying args.
args[1] = finalize_arg(pf_arg2, (link_parameter_2 or get_link_parameter_2())[chunk])
end
return concat(chunks, ":"), args -- :
end
function export.buildTemplate(title, args)
local output = {title}
if not args then
return output
end
-- Iterate over all numbered parameters in order, followed by any
-- remaining parameters in codepoint order. Implicit parameters are
-- used wherever possible, even if explicit numbers are interpolated
-- between them (e.g. 0 would go before any implicit parameters, and
-- 2.5 between 2 and 3).
-- TODO: handle "=" and "|" in params/values.
local implicit
for k, v in sorted_pairs(args) do
if type(k) == "number" and k >= 1 and k % 1 == 0 then
if implicit == nil then
implicit = table_len(args)
end
insert(output, k <= implicit and v or k .. "=" .. v)
else
insert(output, k .. "=" .. v)
end
end
return output
end
build_template = export.buildTemplate
function export.templateLink(title, args, no_link)
if not no_link then
title, args = render_title(title, args)
end
local output = build_template(title, args)
for i = 1, #output do
output[i] = encode_entities(output[i], "={}", true, true)
end
return tostring(html_create("code")
:css("white-space", "pre-wrap")
:wikitext("{{" .. concat(output, "|") .. "}}") -- {{ | }}
)
end
end
do
function export.find_parameters(text, not_transcluded)
return parse(text, not not_transcluded):iterate_nodes("parameter")
end
function export.displayParameter(name, default)
return tostring(html_create("code")
:css("white-space", "pre-wrap")
:wikitext("{{{" .. concat({name, default}, "|") .. "}}}") -- {{{ | }}}
)
end
end
do
local function check_level(level)
if type(level) ~= "number" then
error("Heading levels must be numbers.")
elseif level < 1 or level > 6 or level % 1 ~= 0 then
error("Heading levels must be integers between 1 and 6.")
end
return level
end
-- FIXME: should headings which contain "\n" be returned? This may depend
-- on variable factors, like template expansion. They iterate the heading
-- count number, but fail on rendering. However, in some cases a different
-- heading might still be rendered due to intermediate equals signs; it
-- may even be of a different heading level: e.g., this is parsed as an
-- L2 heading with a newline (due to the wikilink block), but renders as the
-- L1 heading "=foo[[". Section edit links are sometimes (but not always)
-- present in such cases.
-- ==[[=
-- ]]==
-- TODO: section numbers for edit links seem to also include headings
-- nested inside templates and parameters (but apparently not those in
-- parser extension tags - need to test this more). If we ever want to add
-- section edit links manually, this will need to be accounted for.
function export.find_headings(text, i, j)
local parsed = parse(text)
if i == nil and j == nil then
return parse(text):iterate_nodes("heading")
end
i = i and check_level(i) or 1
j = j and check_level(j) or 6
return parsed:iterate(function(v)
if class_else_type(v) == "heading" then
local level = v.level
return level >= i and level <= j
end
end)
end
end
do
local function make_tag(tag)
return tostring(html_create("code")
:css("white-space", "pre-wrap")
:wikitext("<" .. tag .. ">")
)
end
-- Note: invalid tags are returned without links.
function export.wikitagLink(tag)
-- ">" can't appear in tags (including attributes) since the parser
-- unconditionally treats ">" as the end of a tag.
if find(tag, ">", nil, true) then
return make_tag(tag)
end
-- Tags must start "<tagname..." or "</tagname...", with no whitespace
-- after "<" or "</".
local slash, tagname, remainder = match(tag, "^(/?)([^/%s]+)(.*)$")
if not tagname then
return make_tag(tag)
end
-- Tags are only case-insensitive with ASCII characters.
local link = lower(tagname)
if (
-- onlyinclude tags must be lowercase and are whitespace intolerant.
link == "onlyinclude" and (link ~= tagname or remainder ~= "") or
-- Closing wikitags (except onlyinclude) can only have whitespace
-- after the tag name.
slash == "/" and not match(remainder, "^%s*()$") or
-- Tagnames cannot be followed immediately by "/", unless it comes
-- at the end (e.g. "<nowiki/>", but not "<nowiki/ >").
remainder ~= "/" and sub(remainder, 1, 1) == "/"
) then
-- Output with no link.
return make_tag(tag)
end
-- Partial transclusion tags aren't in the table of parser extension
-- tags.
if link == "noinclude" or link == "includeonly" or link == "onlyinclude" then
link = "mw:Transclusion#Partial transclusion"
else
link = (parser_extension_tags or get_parser_extension_tags())[link]
end
if link then
tag = gsub(tag, pattern_escape(tagname), "[[" .. replacement_escape(encode_uri(link, "WIKI")) .. "|%0]]", 1)
end
return make_tag(tag)
end
end
-- For convenience.
export.class_else_type = class_else_type
return export
g7883esvq9rqr796jeq8jsmk6y4r8t1
বজাৰ
0
150816
512452
455834
2026-07-02T17:06:23Z
Redmin
6857
লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L1410211-এর সাথে সংযোগ তৈরি করছি
512452
wikitext
text/x-wiki
{{লে|L1410211|উচ্চারণ=
* {{as-IPA|bodʑar|bozar}}|L1410211-S1={{q|কম প্রচলিত}} {{syn|as|হাট|পোহাৰ|বিপণ}}
}}
====উদ্ভূত শব্দ====
{{col2|as|বজাৰ কৰা|বজৰুৱা}}
4p4e29utadmayk0g2gu422hz9gqlkhh
512453
512452
2026-07-02T17:07:29Z
Redmin
6857
512453
wikitext
text/x-wiki
{{লে|L1410211|উচ্চারণ=
* {{as-IPA|bodʑar|bozar}}|L1410211-S1={{q|কম প্রচলিত}} {{syn|as|হাট|পোহাৰ|বিপণ}}
}}
====শব্দবিভক্তি====
{{as-noun-oখন|bozar}}
====উদ্ভূত শব্দ====
{{col2|as|বজাৰ কৰা|বজৰুৱা}}
bt17zkhz1rvluv8hs9ooceh88mp4ksk
utricle
0
158136
512459
333514
2026-07-02T17:24:45Z
Redmin
6857
512459
wikitext
text/x-wiki
=={{ভাষা|en}}==
===বিকল্প রূপ===
* {{alter|en|utriculus}}
===উৎপত্তি===
{{root|en|ine-pro|*wed-}}
ফরাসি {{bor|en|fr|utricule}} অথবা লাতিন {{bor|en|la|ūtriculus||একটি ছোট চামড়া বা চামড়ার বোতল}} থেকে গৃহীত, যা {{m|la|ūter||প্রাণীর চামড়া দিয়ে তৈরি থলে বা বোতল}} শব্দের ক্ষুদ্র রূপ। {{doublet|en|utriculus}}
===উচ্চারণ===
* {{IPA|en|/ˈjuː.tɹɪk.əl/}}
===বিশেষ্য===
{{en-noun}}
# {{lb|en|জীববিদ্যা}} প্রাণী বা উদ্ভিদে একটি ছোট [[কোষ]], [[থলি]] বা [[মূত্রাশয়সদৃশ]] [[স্ফীতি]]:
## {{lb|en|অঙ্গতত্ত্ব}} [[মেরুদণ্ডী]] [[অন্তঃকর্ণ|অন্তঃকর্ণের]] অংশে অবস্থিত দুটি [[তরল]]-ভরা [[গহ্বর|গহ্বরের]] মধ্যে বৃহত্তমটি (অপরটি [[স্যাকুল]]), যেখানে [[আর্ধবৃত্তাকার নালি|আর্ধবৃত্তাকার নালিগুলি]] সংযুক্ত থাকে। এতে [[কেশিক কোষ]] ও [[অটোলিথ]] থাকে, যা মাথার [[অবস্থান]] সংক্রান্ত সংকেত মস্তিষ্কে প্রেরণ করে।
## {{lb|en|অঙ্গতত্ত্ব}} {{clip of|en|প্রোস্টেটিক ইউট্রিকল}}।
## {{lb|en|উদ্ভিদবিদ্যা}} পাতলা [[ঝিল্লিযুক্ত]] [[পরিকার্প]] বিশিষ্ট একটি [[শুকনো]], [[অবিস্ফোটিত]] এক-বীজবিশিষ্ট [[ফল]], যা [[আকিন]] সদৃশ এবং [[চুকন্দর]] ও [[ডক]] উদ্ভিদে দেখা যায়।
====উপধরন====
* {{l|en|প্রোস্টেটিক ইউট্রিকল}}
====উৎপন্ন পদাবলি====
* {{l|en|utricular|pos=বিশেষণ}}
* {{l|en|utriculo-}}
===আরও দেখুন===
* {{l|en|saccule}}
===তথ্যসূত্র===
* {{R:Lexico}}
* {{R:MWO}}
{{C|en|উদ্ভিদ অঙ্গতত্ত্ব}}
5asu4rpfqi3sqv85abggtteri95h78e
টেমপ্লেট:inflection-table-top/style.css
10
162406
512465
447524
2026-07-02T23:24:38Z
Redmin
6857
ইংরেজি উইকিঅভিধান থেকে হালনাগাদ করা হলো
512465
sanitized-css
text/css
/**
* This CSS page provides styling for the {{inflection-table-top}} family of templates.
*
* The style rules are complex and have various dependencies on one another.
* They have been comprehensively tested on desktop and mobile.
* Take care before making any changes. If you're not confident with CSS,
* consider requesting help from an interface administrator.
*/
.inflection-table-wrapper {
padding: 3px;
margin: 0.5em 0; /* matches styling for <p> elements in Vector classic */
background: var(--wikt-palette-paleblue); /* standard MediaWiki table background colour. Note this color also appears a few other times in this file - search for BGC */
border: 1px solid var(--wikt-palette-grey);
position: relative; /* needed for NavToggle styles */
/* SHOULD BE width: fit-content, BUT THE CSS SANITIZER DOESN'T LIKE IT.. */
max-width: 100%;
box-sizing: border-box;
overflow-x: auto;
}
.inflection-table-wrapper.inflection-table-collapsed {
overflow: hidden;
}
.inflection-table-wrapper.inflection-table-no-title {
border: 0;
padding: 0;
}
.inflection-table-wrapper > table {
display: table; /* override Minerva styles */
width: 100%; /* of containing div - needed when the notes are wider than the table itself */
margin: 0; /* override Minerva styles */
text-align: center;
border-collapse: collapse;
border: 1px solid var(--wikt-palette-grey-6);
background: var(--wikt-palette-white);
}
.inflection-table-wrapper > table > caption {
display: table-caption; /* override Minerva styles */
background: var(--wikt-palette-paleblue); /* BGC - Minerva resets this, so we have to set it back again */
text-align: left;
font-size: 95%;
padding: 0.1em 0.5em;
font-weight: bold;
}
.inflection-table-wrapper.wide > table > tbody > tr {
font-size: 90%;
}
.inflection-table-wrapper > table > tbody > tr > td,
.inflection-table-wrapper > table > tbody > tr > th {
padding: 0.15em 0.6em;
border: solid var(--wikt-palette-grey-6);
border-width: 0 1px 1px 0;
}
.inflection-table-wrapper > table > tbody > tr > td:not(.secondary):not(.separator) {
min-width: 5em;
}
/* very-narrow class for use on tables of unusually short words (e.g. pronouns) */
/* note, this rule needs to have higher specificity than the previous rule, so even
though the :not selectors are unnecessary styling-wise, we need to keep them */
.inflection-table-wrapper.very-narrow > table > tbody > tr > td:not(.secondary):not(.separator) {
min-width: auto;
}
.inflection-table-wrapper > table > tbody > tr > td.secondary {
background: var(--wikt-palette-lightergrey);
}
.inflection-table-wrapper > table > tbody > tr > th.secondary,
.inflection-table-wrapper > table > tbody > tr > th.outer {
font-style: italic;
}
.inflection-table-wrapper > table > tbody > tr > th.secondary > sup,
.inflection-table-wrapper > table > tbody > tr > th.outer > sup {
font-style: normal;
}
/* separator cells, or blank cells: see [[Template:la-adecl]] and [[Template:ga-decl-noun]] */
.inflection-table-wrapper .separator {
height: 0.5em;
width: 0.5em;
min-height: 0.5em;
min-width: 0.5em;
padding: 0;
background: var(--wikt-palette-paleblue); /* BGC */
}
.inflection-table-wrapper .separator[rowspan] { /* vertical separator */
border-top: 1px solid var(--wikt-palette-paleblue); /* BGC */
border-bottom: 1px solid var(--wikt-palette-paleblue); /* BGC */
}
.inflection-table-wrapper .separator[colspan] { /* horizontal separator */
border-left: 1px solid var(--wikt-palette-paleblue); /* BGC */
border-right: 1px solid var(--wikt-palette-paleblue); /* BGC */
}
/* blank cell at end of row: see [[Template:sco-conj-be]] */
.inflection-table-wrapper .blank-end-row {
background: var(--wikt-palette-paleblue); /* BGC */
border-right: 1px solid var(--wikt-palette-paleblue); /* BGC */
border-top: 1px solid var(--wikt-palette-paleblue); /* BGC */
border-bottom: 1px solid var(--wikt-palette-paleblue); /* BGC */
}
/* Notes at foot of table */
.inflection-table-notes {
text-align: left; /* undo centering in inflection boxes */
margin: 0.2em 0.5em 0.2em;
}
.inflection-table-notes p {
margin: 0.5em 0 0.2em;
}
.inflection-table-wrapper.wide > .inflection-table-notes {
font-size: 90%;
}
/* Collapsibility */
html.client-js .inflection-table-collapsed > table,
html.client-js .inflection-table-collapsed > table > tbody > tr > td,
html.client-js .inflection-table-collapsed > table > tbody > tr > th {
border-color: transparent;
}
html.client-js .inflection-table-collapsed > table > tbody {
visibility: collapse; /* the perfect solution for this use case, but is not implemented in some browsers (Safari - the new IE) */
}
html.client-js .inflection-table-collapsed > table > caption {
margin-bottom: -0.15em; /* reduce excessive height of collapsed box - not entirely sure where this height originates from, so this is a hack */
}
html.client-js .inflection-table-collapsed .inflection-table-notes {
display: none; /* collapse notes */
}
/* workaround for browsers that do not support visibility: collapse. The .no-vc class is removed by JS code when not needed */
html.client-js .inflection-table-collapsible.no-vc.inflection-table-collapsed {
max-height: calc(1.5em + 8px); /* almost 1lh (= 1.6em) + padding and border on .inflection-table-wrapper */
overflow: hidden;
}
html.client-js .inflection-table-collapsible.no-vc.inflection-table-collapsed > table > tbody {
visibility: hidden;
}
html.client-js .inflection-table-collapsible.no-vc > table > caption {
white-space: nowrap; /* if there was ever more than one line of text, it would get occluded by the <div>'s max-height */
}
.no-vc-spacer {
display: inline-block;
width: 4em;
}
/* make sure [hide] link doesn't scroll away when table is uncollapsed */
.inflection-table-wrapper .NavToggle {
position: sticky;
right: 0.5em; /* matches padding on <caption> */
background: inherit;
}
/* Single border display style - EXPERIMENTAL! */
.inflection-table-wrapper.single-border {
padding: 0;
border: 0;
}
.inflection-table-wrapper.single-border > table > caption {
border: 1px solid var(--wikt-palette-grey);
border-bottom: 0;
}
html.client-js .inflection-table-collapsed.single-border > table > caption {
border-bottom: 1px solid var(--wikt-palette-grey);
}
.inflection-table-wrapper.inflection-table-collapsible.single-border .inflection-table-notes {
border: 1px solid var(--wikt-palette-grey);
border-top: 0;
}
/* Mobile styling */
@media all and (max-width: 639px) { /* matches calc(640px - 1px) in Minerva CSS */
.inflection-table-wrapper {
overflow: auto;
max-width: 100%;
width: auto !important; /* override inline style that is being used to avoid a CSS sanitiser bug/lacuna - has to have !important to allow this */
}
/* fix for collapsed tables */
.inflection-table-collapsed tbody {
display: none;
}
/* make sure [hide] link doesn't scroll away when table is uncollapsed */
.inflection-table-wrapper .NavToggle {
position: sticky;
right: 0.5em; /* matches padding on <caption> */
background: inherit;
}
/* when there is a single column of header cells down the left, "stick" this column in place */
.inflection-table-wrapper.sticky-left-column > table > tbody > tr > th:first-child {
position: sticky;
left: -4px; /* counteract 3px padding on .inflection-table-wrapper + 1px border on table */
max-width: 35vw; /* limit these cells to 35% of screen width */
}
.inflection-table-wrapper.inflection-table-no-title.sticky-left-column > table > tbody > tr > th:first-child {
left: -1px; /* counteract 1px border on table */
}
}
/* Place transliterations in a paler colour on their own line */
.inflection-table-wrapper:not(.tr-alongside) table > tbody td span.tr {
color: var(--wikt-palette-grey-9); /* TODO this is just slightly below AAA contrast when used on a -0 coloured background */
}
.inflection-table-wrapper:not(.tr-alongside) table > tbody td span.tr:before {
content: "\a"; /* newline */
white-space: pre;
}
.inflection-table-wrapper:not(.tr-alongside) table > tbody td span.mention-gloss-paren {
display: none; /* hide parens surrounding translit */
}
/* Inflection boxes - multiple tables inside one box */
.inflection-box > table {
background: none;
border: 0;
}
.inflection-box > table > tbody > tr > td {
padding: 0 0.2em;
border: 0;
vertical-align: top;
}
.inflection-box .inflection-table-wrapper {
display: inline-block;
vertical-align: top;
margin: 0.2em 0.1em;
}
/* overqualified on purpose to increase specificity */
.inflection-box .inflection-table-wrapper > table.inflection-table {
background: var(--wikt-palette-white); /* override no-title palette rules below */
}
.inflection-box.flow-vertical .inflection-table-wrapper {
display: block;
width: auto !important; /* override inline style that is being used to avoid a CSS sanitiser bug/lacuna - has to have !important to allow this */
}
.inflection-box.flow-vertical .inflection-table-wrapper + .inflection-table-wrapper {
margin-top: 0.5em; /* mimic a .separator row between adjacent tables */
}
/* Individual palettes: dark-on-light */
/* Generate this in your browser's JavaScript console by running the following code
and right-clicking on the output to "copy string contents"
colors = ['red', 'scarlet', 'orange', 'amber', 'yellow', 'lime', 'green', 'teal', 'cyan', 'blue', 'indigo', 'purple', 'magenta', 'rose', 'grey', 'brown']
css = ''
for (let color of colors) css += `
.inflection-table-${color}.inflection-table-no-title table {
background-color: var(--wikt-palette-${color}-0); /* when no title, provide a colour that gently contrasts with the page background *\/
}
.inflection-table-${color} tr.secondary > th,
.inflection-table-${color} th.secondary,
.inflection-table tr.inflection-table-${color}.secondary > th,
.inflection-table tr.inflection-table-${color} > th.secondary,
.inflection-table tr.secondary > th.inflection-table-${color},
.inflection-table th.inflection-table-${color}.secondary {
background-color: var(--wikt-palette-${color}-1);
}
.inflection-table-${color} th,
.inflection-table tr.inflection-table-${color} > th,
.inflection-table th.inflection-table-${color} {
background-color: var(--wikt-palette-${color}-2);
}
.inflection-table-${color} tr.outer > th,
.inflection-table-${color} th.outer,
.inflection-table tr.inflection-table-${color}.outer > th,
.inflection-table tr.inflection-table-${color} > th.outer,
.inflection-table tr.outer > th.inflection-table-${color},
.inflection-table th.inflection-table-${color}.outer {
background-color: var(--wikt-palette-${color}-4);
}
.inflection-table-${color} tr.darker > td,
.inflection-table-${color} td.darker,
.inflection-table tr.inflection-table-${color}.darker > td,
.inflection-table tr.inflection-table-${color} > td.darker,
.inflection-table tr.darker > td.inflection-table-${color},
.inflection-table td.inflection-table-${color}.darker {
background-color: var(--wikt-palette-grey-${color}-1) !important;
}`
*/
.inflection-table-red.inflection-table-no-title table {
background-color: var(--wikt-palette-red-0); /* when no title, provide a colour that gently contrasts with the page background */
}
.inflection-table-red tr.secondary > th,
.inflection-table-red th.secondary,
.inflection-table tr.inflection-table-red.secondary > th,
.inflection-table tr.inflection-table-red > th.secondary,
.inflection-table tr.secondary > th.inflection-table-red,
.inflection-table th.inflection-table-red.secondary {
background-color: var(--wikt-palette-red-1);
}
.inflection-table-red th,
.inflection-table tr.inflection-table-red > th,
.inflection-table th.inflection-table-red {
background-color: var(--wikt-palette-red-2);
}
.inflection-table-red tr.outer > th,
.inflection-table-red th.outer,
.inflection-table tr.inflection-table-red.outer > th,
.inflection-table tr.inflection-table-red > th.outer,
.inflection-table tr.outer > th.inflection-table-red,
.inflection-table th.inflection-table-red.outer {
background-color: var(--wikt-palette-red-4);
}
.inflection-table-red tr.darker > td,
.inflection-table-red td.darker,
.inflection-table tr.inflection-table-red.darker > td,
.inflection-table tr.inflection-table-red > td.darker,
.inflection-table tr.darker > td.inflection-table-red,
.inflection-table td.inflection-table-red.darker {
background-color: var(--wikt-palette-grey-red-1) !important;
}
.inflection-table-scarlet.inflection-table-no-title table {
background-color: var(--wikt-palette-scarlet-0); /* when no title, provide a colour that gently contrasts with the page background */
}
.inflection-table-scarlet tr.secondary > th,
.inflection-table-scarlet th.secondary,
.inflection-table tr.inflection-table-scarlet.secondary > th,
.inflection-table tr.inflection-table-scarlet > th.secondary,
.inflection-table tr.secondary > th.inflection-table-scarlet,
.inflection-table th.inflection-table-scarlet.secondary {
background-color: var(--wikt-palette-scarlet-1);
}
.inflection-table-scarlet th,
.inflection-table tr.inflection-table-scarlet > th,
.inflection-table th.inflection-table-scarlet {
background-color: var(--wikt-palette-scarlet-2);
}
.inflection-table-scarlet tr.outer > th,
.inflection-table-scarlet th.outer,
.inflection-table tr.inflection-table-scarlet.outer > th,
.inflection-table tr.inflection-table-scarlet > th.outer,
.inflection-table tr.outer > th.inflection-table-scarlet,
.inflection-table th.inflection-table-scarlet.outer {
background-color: var(--wikt-palette-scarlet-4);
}
.inflection-table-scarlet tr.darker > td,
.inflection-table-scarlet td.darker,
.inflection-table tr.inflection-table-scarlet.darker > td,
.inflection-table tr.inflection-table-scarlet > td.darker,
.inflection-table tr.darker > td.inflection-table-scarlet,
.inflection-table td.inflection-table-scarlet.darker {
background-color: var(--wikt-palette-grey-scarlet-1) !important;
}
.inflection-table-orange.inflection-table-no-title table {
background-color: var(--wikt-palette-orange-0); /* when no title, provide a colour that gently contrasts with the page background */
}
.inflection-table-orange tr.secondary > th,
.inflection-table-orange th.secondary,
.inflection-table tr.inflection-table-orange.secondary > th,
.inflection-table tr.inflection-table-orange > th.secondary,
.inflection-table tr.secondary > th.inflection-table-orange,
.inflection-table th.inflection-table-orange.secondary {
background-color: var(--wikt-palette-orange-1);
}
.inflection-table-orange th,
.inflection-table tr.inflection-table-orange > th,
.inflection-table th.inflection-table-orange {
background-color: var(--wikt-palette-orange-2);
}
.inflection-table-orange tr.outer > th,
.inflection-table-orange th.outer,
.inflection-table tr.inflection-table-orange.outer > th,
.inflection-table tr.inflection-table-orange > th.outer,
.inflection-table tr.outer > th.inflection-table-orange,
.inflection-table th.inflection-table-orange.outer {
background-color: var(--wikt-palette-orange-4);
}
.inflection-table-orange tr.darker > td,
.inflection-table-orange td.darker,
.inflection-table tr.inflection-table-orange.darker > td,
.inflection-table tr.inflection-table-orange > td.darker,
.inflection-table tr.darker > td.inflection-table-orange,
.inflection-table td.inflection-table-orange.darker {
background-color: var(--wikt-palette-grey-orange-1) !important;
}
.inflection-table-amber.inflection-table-no-title table {
background-color: var(--wikt-palette-amber-0); /* when no title, provide a colour that gently contrasts with the page background */
}
.inflection-table-amber tr.secondary > th,
.inflection-table-amber th.secondary,
.inflection-table tr.inflection-table-amber.secondary > th,
.inflection-table tr.inflection-table-amber > th.secondary,
.inflection-table tr.secondary > th.inflection-table-amber,
.inflection-table th.inflection-table-amber.secondary {
background-color: var(--wikt-palette-amber-1);
}
.inflection-table-amber th,
.inflection-table tr.inflection-table-amber > th,
.inflection-table th.inflection-table-amber {
background-color: var(--wikt-palette-amber-2);
}
.inflection-table-amber tr.outer > th,
.inflection-table-amber th.outer,
.inflection-table tr.inflection-table-amber.outer > th,
.inflection-table tr.inflection-table-amber > th.outer,
.inflection-table tr.outer > th.inflection-table-amber,
.inflection-table th.inflection-table-amber.outer {
background-color: var(--wikt-palette-amber-4);
}
.inflection-table-amber tr.darker > td,
.inflection-table-amber td.darker,
.inflection-table tr.inflection-table-amber.darker > td,
.inflection-table tr.inflection-table-amber > td.darker,
.inflection-table tr.darker > td.inflection-table-amber,
.inflection-table td.inflection-table-amber.darker {
background-color: var(--wikt-palette-grey-amber-1) !important;
}
.inflection-table-yellow.inflection-table-no-title table {
background-color: var(--wikt-palette-yellow-0); /* when no title, provide a colour that gently contrasts with the page background */
}
.inflection-table-yellow tr.secondary > th,
.inflection-table-yellow th.secondary,
.inflection-table tr.inflection-table-yellow.secondary > th,
.inflection-table tr.inflection-table-yellow > th.secondary,
.inflection-table tr.secondary > th.inflection-table-yellow,
.inflection-table th.inflection-table-yellow.secondary {
background-color: var(--wikt-palette-yellow-1);
}
.inflection-table-yellow th,
.inflection-table tr.inflection-table-yellow > th,
.inflection-table th.inflection-table-yellow {
background-color: var(--wikt-palette-yellow-2);
}
.inflection-table-yellow tr.outer > th,
.inflection-table-yellow th.outer,
.inflection-table tr.inflection-table-yellow.outer > th,
.inflection-table tr.inflection-table-yellow > th.outer,
.inflection-table tr.outer > th.inflection-table-yellow,
.inflection-table th.inflection-table-yellow.outer {
background-color: var(--wikt-palette-yellow-4);
}
.inflection-table-yellow tr.darker > td,
.inflection-table-yellow td.darker,
.inflection-table tr.inflection-table-yellow.darker > td,
.inflection-table tr.inflection-table-yellow > td.darker,
.inflection-table tr.darker > td.inflection-table-yellow,
.inflection-table td.inflection-table-yellow.darker {
background-color: var(--wikt-palette-grey-yellow-1) !important;
}
.inflection-table-lime.inflection-table-no-title table {
background-color: var(--wikt-palette-lime-0); /* when no title, provide a colour that gently contrasts with the page background */
}
.inflection-table-lime tr.secondary > th,
.inflection-table-lime th.secondary,
.inflection-table tr.inflection-table-lime.secondary > th,
.inflection-table tr.inflection-table-lime > th.secondary,
.inflection-table tr.secondary > th.inflection-table-lime,
.inflection-table th.inflection-table-lime.secondary {
background-color: var(--wikt-palette-lime-1);
}
.inflection-table-lime th,
.inflection-table tr.inflection-table-lime > th,
.inflection-table th.inflection-table-lime {
background-color: var(--wikt-palette-lime-2);
}
.inflection-table-lime tr.outer > th,
.inflection-table-lime th.outer,
.inflection-table tr.inflection-table-lime.outer > th,
.inflection-table tr.inflection-table-lime > th.outer,
.inflection-table tr.outer > th.inflection-table-lime,
.inflection-table th.inflection-table-lime.outer {
background-color: var(--wikt-palette-lime-4);
}
.inflection-table-lime tr.darker > td,
.inflection-table-lime td.darker,
.inflection-table tr.inflection-table-lime.darker > td,
.inflection-table tr.inflection-table-lime > td.darker,
.inflection-table tr.darker > td.inflection-table-lime,
.inflection-table td.inflection-table-lime.darker {
background-color: var(--wikt-palette-grey-lime-1) !important;
}
.inflection-table-green.inflection-table-no-title table {
background-color: var(--wikt-palette-green-0); /* when no title, provide a colour that gently contrasts with the page background */
}
.inflection-table-green tr.secondary > th,
.inflection-table-green th.secondary,
.inflection-table tr.inflection-table-green.secondary > th,
.inflection-table tr.inflection-table-green > th.secondary,
.inflection-table tr.secondary > th.inflection-table-green,
.inflection-table th.inflection-table-green.secondary {
background-color: var(--wikt-palette-green-1);
}
.inflection-table-green th,
.inflection-table tr.inflection-table-green > th,
.inflection-table th.inflection-table-green {
background-color: var(--wikt-palette-green-2);
}
.inflection-table-green tr.outer > th,
.inflection-table-green th.outer,
.inflection-table tr.inflection-table-green.outer > th,
.inflection-table tr.inflection-table-green > th.outer,
.inflection-table tr.outer > th.inflection-table-green,
.inflection-table th.inflection-table-green.outer {
background-color: var(--wikt-palette-green-4);
}
.inflection-table-green tr.darker > td,
.inflection-table-green td.darker,
.inflection-table tr.inflection-table-green.darker > td,
.inflection-table tr.inflection-table-green > td.darker,
.inflection-table tr.darker > td.inflection-table-green,
.inflection-table td.inflection-table-green.darker {
background-color: var(--wikt-palette-grey-green-1) !important;
}
.inflection-table-teal.inflection-table-no-title table {
background-color: var(--wikt-palette-teal-0); /* when no title, provide a colour that gently contrasts with the page background */
}
.inflection-table-teal tr.secondary > th,
.inflection-table-teal th.secondary,
.inflection-table tr.inflection-table-teal.secondary > th,
.inflection-table tr.inflection-table-teal > th.secondary,
.inflection-table tr.secondary > th.inflection-table-teal,
.inflection-table th.inflection-table-teal.secondary {
background-color: var(--wikt-palette-teal-1);
}
.inflection-table-teal th,
.inflection-table tr.inflection-table-teal > th,
.inflection-table th.inflection-table-teal {
background-color: var(--wikt-palette-teal-2);
}
.inflection-table-teal tr.outer > th,
.inflection-table-teal th.outer,
.inflection-table tr.inflection-table-teal.outer > th,
.inflection-table tr.inflection-table-teal > th.outer,
.inflection-table tr.outer > th.inflection-table-teal,
.inflection-table th.inflection-table-teal.outer {
background-color: var(--wikt-palette-teal-4);
}
.inflection-table-teal tr.darker > td,
.inflection-table-teal td.darker,
.inflection-table tr.inflection-table-teal.darker > td,
.inflection-table tr.inflection-table-teal > td.darker,
.inflection-table tr.darker > td.inflection-table-teal,
.inflection-table td.inflection-table-teal.darker {
background-color: var(--wikt-palette-grey-teal-1) !important;
}
.inflection-table-cyan.inflection-table-no-title table {
background-color: var(--wikt-palette-cyan-0); /* when no title, provide a colour that gently contrasts with the page background */
}
.inflection-table-cyan tr.secondary > th,
.inflection-table-cyan th.secondary,
.inflection-table tr.inflection-table-cyan.secondary > th,
.inflection-table tr.inflection-table-cyan > th.secondary,
.inflection-table tr.secondary > th.inflection-table-cyan,
.inflection-table th.inflection-table-cyan.secondary {
background-color: var(--wikt-palette-cyan-1);
}
.inflection-table-cyan th,
.inflection-table tr.inflection-table-cyan > th,
.inflection-table th.inflection-table-cyan {
background-color: var(--wikt-palette-cyan-2);
}
.inflection-table-cyan tr.outer > th,
.inflection-table-cyan th.outer,
.inflection-table tr.inflection-table-cyan.outer > th,
.inflection-table tr.inflection-table-cyan > th.outer,
.inflection-table tr.outer > th.inflection-table-cyan,
.inflection-table th.inflection-table-cyan.outer {
background-color: var(--wikt-palette-cyan-4);
}
.inflection-table-cyan tr.darker > td,
.inflection-table-cyan td.darker,
.inflection-table tr.inflection-table-cyan.darker > td,
.inflection-table tr.inflection-table-cyan > td.darker,
.inflection-table tr.darker > td.inflection-table-cyan,
.inflection-table td.inflection-table-cyan.darker {
background-color: var(--wikt-palette-grey-cyan-1) !important;
}
.inflection-table-blue.inflection-table-no-title table {
background-color: var(--wikt-palette-blue-0); /* when no title, provide a colour that gently contrasts with the page background */
}
.inflection-table-blue tr.secondary > th,
.inflection-table-blue th.secondary,
.inflection-table tr.inflection-table-blue.secondary > th,
.inflection-table tr.inflection-table-blue > th.secondary,
.inflection-table tr.secondary > th.inflection-table-blue,
.inflection-table th.inflection-table-blue.secondary {
background-color: var(--wikt-palette-blue-1);
}
.inflection-table-blue th,
.inflection-table tr.inflection-table-blue > th,
.inflection-table th.inflection-table-blue {
background-color: var(--wikt-palette-blue-2);
}
.inflection-table-blue tr.outer > th,
.inflection-table-blue th.outer,
.inflection-table tr.inflection-table-blue.outer > th,
.inflection-table tr.inflection-table-blue > th.outer,
.inflection-table tr.outer > th.inflection-table-blue,
.inflection-table th.inflection-table-blue.outer {
background-color: var(--wikt-palette-blue-4);
}
.inflection-table-blue tr.darker > td,
.inflection-table-blue td.darker,
.inflection-table tr.inflection-table-blue.darker > td,
.inflection-table tr.inflection-table-blue > td.darker,
.inflection-table tr.darker > td.inflection-table-blue,
.inflection-table td.inflection-table-blue.darker {
background-color: var(--wikt-palette-grey-blue-1) !important;
}
.inflection-table-indigo.inflection-table-no-title table {
background-color: var(--wikt-palette-indigo-0); /* when no title, provide a colour that gently contrasts with the page background */
}
.inflection-table-indigo tr.secondary > th,
.inflection-table-indigo th.secondary,
.inflection-table tr.inflection-table-indigo.secondary > th,
.inflection-table tr.inflection-table-indigo > th.secondary,
.inflection-table tr.secondary > th.inflection-table-indigo,
.inflection-table th.inflection-table-indigo.secondary {
background-color: var(--wikt-palette-indigo-1);
}
.inflection-table-indigo th,
.inflection-table tr.inflection-table-indigo > th,
.inflection-table th.inflection-table-indigo {
background-color: var(--wikt-palette-indigo-2);
}
.inflection-table-indigo tr.outer > th,
.inflection-table-indigo th.outer,
.inflection-table tr.inflection-table-indigo.outer > th,
.inflection-table tr.inflection-table-indigo > th.outer,
.inflection-table tr.outer > th.inflection-table-indigo,
.inflection-table th.inflection-table-indigo.outer {
background-color: var(--wikt-palette-indigo-4);
}
.inflection-table-indigo tr.darker > td,
.inflection-table-indigo td.darker,
.inflection-table tr.inflection-table-indigo.darker > td,
.inflection-table tr.inflection-table-indigo > td.darker,
.inflection-table tr.darker > td.inflection-table-indigo,
.inflection-table td.inflection-table-indigo.darker {
background-color: var(--wikt-palette-grey-indigo-1) !important;
}
.inflection-table-purple.inflection-table-no-title table {
background-color: var(--wikt-palette-purple-0); /* when no title, provide a colour that gently contrasts with the page background */
}
.inflection-table-purple tr.secondary > th,
.inflection-table-purple th.secondary,
.inflection-table tr.inflection-table-purple.secondary > th,
.inflection-table tr.inflection-table-purple > th.secondary,
.inflection-table tr.secondary > th.inflection-table-purple,
.inflection-table th.inflection-table-purple.secondary {
background-color: var(--wikt-palette-purple-1);
}
.inflection-table-purple th,
.inflection-table tr.inflection-table-purple > th,
.inflection-table th.inflection-table-purple {
background-color: var(--wikt-palette-purple-2);
}
.inflection-table-purple tr.outer > th,
.inflection-table-purple th.outer,
.inflection-table tr.inflection-table-purple.outer > th,
.inflection-table tr.inflection-table-purple > th.outer,
.inflection-table tr.outer > th.inflection-table-purple,
.inflection-table th.inflection-table-purple.outer {
background-color: var(--wikt-palette-purple-4);
}
.inflection-table-purple tr.darker > td,
.inflection-table-purple td.darker,
.inflection-table tr.inflection-table-purple.darker > td,
.inflection-table tr.inflection-table-purple > td.darker,
.inflection-table tr.darker > td.inflection-table-purple,
.inflection-table td.inflection-table-purple.darker {
background-color: var(--wikt-palette-grey-purple-1) !important;
}
.inflection-table-magenta.inflection-table-no-title table {
background-color: var(--wikt-palette-magenta-0); /* when no title, provide a colour that gently contrasts with the page background */
}
.inflection-table-magenta tr.secondary > th,
.inflection-table-magenta th.secondary,
.inflection-table tr.inflection-table-magenta.secondary > th,
.inflection-table tr.inflection-table-magenta > th.secondary,
.inflection-table tr.secondary > th.inflection-table-magenta,
.inflection-table th.inflection-table-magenta.secondary {
background-color: var(--wikt-palette-magenta-1);
}
.inflection-table-magenta th,
.inflection-table tr.inflection-table-magenta > th,
.inflection-table th.inflection-table-magenta {
background-color: var(--wikt-palette-magenta-2);
}
.inflection-table-magenta tr.outer > th,
.inflection-table-magenta th.outer,
.inflection-table tr.inflection-table-magenta.outer > th,
.inflection-table tr.inflection-table-magenta > th.outer,
.inflection-table tr.outer > th.inflection-table-magenta,
.inflection-table th.inflection-table-magenta.outer {
background-color: var(--wikt-palette-magenta-4);
}
.inflection-table-magenta tr.darker > td,
.inflection-table-magenta td.darker,
.inflection-table tr.inflection-table-magenta.darker > td,
.inflection-table tr.inflection-table-magenta > td.darker,
.inflection-table tr.darker > td.inflection-table-magenta,
.inflection-table td.inflection-table-magenta.darker {
background-color: var(--wikt-palette-grey-magenta-1) !important;
}
.inflection-table-rose.inflection-table-no-title table {
background-color: var(--wikt-palette-rose-0); /* when no title, provide a colour that gently contrasts with the page background */
}
.inflection-table-rose tr.secondary > th,
.inflection-table-rose th.secondary,
.inflection-table tr.inflection-table-rose.secondary > th,
.inflection-table tr.inflection-table-rose > th.secondary,
.inflection-table tr.secondary > th.inflection-table-rose,
.inflection-table th.inflection-table-rose.secondary {
background-color: var(--wikt-palette-rose-1);
}
.inflection-table-rose th,
.inflection-table tr.inflection-table-rose > th,
.inflection-table th.inflection-table-rose {
background-color: var(--wikt-palette-rose-2);
}
.inflection-table-rose tr.outer > th,
.inflection-table-rose th.outer,
.inflection-table tr.inflection-table-rose.outer > th,
.inflection-table tr.inflection-table-rose > th.outer,
.inflection-table tr.outer > th.inflection-table-rose,
.inflection-table th.inflection-table-rose.outer {
background-color: var(--wikt-palette-rose-4);
}
.inflection-table-rose tr.darker > td,
.inflection-table-rose td.darker,
.inflection-table tr.inflection-table-rose.darker > td,
.inflection-table tr.inflection-table-rose > td.darker,
.inflection-table tr.darker > td.inflection-table-rose,
.inflection-table td.inflection-table-rose.darker {
background-color: var(--wikt-palette-grey-rose-1) !important;
}
.inflection-table-grey.inflection-table-no-title table {
background-color: var(--wikt-palette-grey-0); /* when no title, provide a colour that gently contrasts with the page background */
}
.inflection-table-grey tr.secondary > th,
.inflection-table-grey th.secondary,
.inflection-table tr.inflection-table-grey.secondary > th,
.inflection-table tr.inflection-table-grey > th.secondary,
.inflection-table tr.secondary > th.inflection-table-grey,
.inflection-table th.inflection-table-grey.secondary {
background-color: var(--wikt-palette-grey-1);
}
.inflection-table-grey th,
.inflection-table tr.inflection-table-grey > th,
.inflection-table th.inflection-table-grey {
background-color: var(--wikt-palette-grey-2);
}
.inflection-table-grey tr.outer > th,
.inflection-table-grey th.outer,
.inflection-table tr.inflection-table-grey.outer > th,
.inflection-table tr.inflection-table-grey > th.outer,
.inflection-table tr.outer > th.inflection-table-grey,
.inflection-table th.inflection-table-grey.outer {
background-color: var(--wikt-palette-grey-4);
}
.inflection-table-grey tr.darker > td,
.inflection-table-grey td.darker,
.inflection-table tr.inflection-table-grey.darker > td,
.inflection-table tr.inflection-table-grey > td.darker,
.inflection-table tr.darker > td.inflection-table-grey,
.inflection-table td.inflection-table-grey.darker {
background-color: var(--wikt-palette-grey-grey-1) !important;
}
.inflection-table-brown.inflection-table-no-title table {
background-color: var(--wikt-palette-brown-0); /* when no title, provide a colour that gently contrasts with the page background */
}
.inflection-table-brown tr.secondary > th,
.inflection-table-brown th.secondary,
.inflection-table tr.inflection-table-brown.secondary > th,
.inflection-table tr.inflection-table-brown > th.secondary,
.inflection-table tr.secondary > th.inflection-table-brown,
.inflection-table th.inflection-table-brown.secondary {
background-color: var(--wikt-palette-brown-1);
}
.inflection-table-brown th,
.inflection-table tr.inflection-table-brown > th,
.inflection-table th.inflection-table-brown {
background-color: var(--wikt-palette-brown-2);
}
.inflection-table-brown tr.outer > th,
.inflection-table-brown th.outer,
.inflection-table tr.inflection-table-brown.outer > th,
.inflection-table tr.inflection-table-brown > th.outer,
.inflection-table tr.outer > th.inflection-table-brown,
.inflection-table th.inflection-table-brown.outer {
background-color: var(--wikt-palette-brown-4);
}
.inflection-table-brown tr.darker > td,
.inflection-table-brown td.darker,
.inflection-table tr.inflection-table-brown.darker > td,
.inflection-table tr.inflection-table-brown > td.darker,
.inflection-table tr.darker > td.inflection-table-brown,
.inflection-table td.inflection-table-brown.darker {
background-color: var(--wikt-palette-grey-brown-1) !important;
}
0ybztmwlg9bq6qihsdz58s0862omjax
বিষয়শ্রেণী:তামিল অনুবাদসহ পাতা
14
170168
512467
2026-07-02T23:45:05Z
Redmin
6857
+
512467
wikitext
text/x-wiki
[[বিষয়শ্রেণী:অনুবাদসহ পাতা]]
ocbk2qm0kj7e8l1bhqz9s4szoehf6k6
moratorium
0
170169
512468
2026-07-03T05:18:34Z
Redmin
6857
লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L270108-এর জন্য একটি নতুন ভুক্তি তৈরি করছি
512468
wikitext
text/x-wiki
{{লে|L270108}}
f5p8bk997gtm9koygrtt82zm03mqkl4
512470
512468
2026-07-03T05:23:48Z
Redmin
6857
লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L1562399-এর সাথে সংযোগ তৈরি করছি
512470
wikitext
text/x-wiki
{{লে|L270108}}
{{লে|L1562399}}
q2mk45255kmi59aj2hqz3tayy1jxxq4
512471
512470
2026-07-03T05:24:43Z
Redmin
6857
লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L700322-এর সাথে সংযোগ তৈরি করছি
512471
wikitext
text/x-wiki
{{লে|L270108}}
{{লে|L1562399}}
{{লে|L700322}}
dg4stcn7fmhrzm667id68zwkg8ppbjx
Moratorium
0
170170
512469
2026-07-03T05:21:30Z
Redmin
6857
লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L906390-এর জন্য একটি নতুন ভুক্তি তৈরি করছি
512469
wikitext
text/x-wiki
{{লে|L906390}}
2zsujshrjx6mrt8qwol587xcg66tfvb
boob out
0
170171
512472
2026-07-03T05:27:27Z
Redmin
6857
লেক্সিম লিংকার এক্সটেনশনের সাহায্যে উইকিউপাত্ত লেক্সিম L1503124-এর জন্য একটি নতুন ভুক্তি তৈরি করছি
512472
wikitext
text/x-wiki
{{লে|L1503124}}
kn5gf8yu5nufedkdf0ge57ib0w8tcff