Дакументацыю да гэтага модуля можна стварыць у Модуль:Uses Wikidata/Дакументацыя

local p = {}

local function incat( name, label, dot )
  local incat = ''
  if not dot then dot = '' end
  local pincat = mw.site.stats.pagesInCategory( name, all )
  if pincat ~= 0 then incat = "[[:К:" .. name .. "|" .. label .. tostring( pincat ) .. "]]" .. dot end
  return incat
end

local function trackingcats(p_num)
  local result = 
    incat("ВП:" .. p_num .. ":выкарыстоўваецца", "'''U:'''", "•") ..
    incat("ВП:" .. p_num .. ":адсутнічае", "'''<s>U:'''", "</s>•") ..
    incat("Вікіданыя:" .. p_num .. ":адсутнічае", "'''<s>D:'''", "</s>•") ..
    incat("Вікіданыя:" .. p_num .. ":адрозніваецца", "'''↑↓:'''")
  if result ~= "" then return "[<span></span>" .. result .. "]"
  else return "" end
end

function p.usesProperty(frame)
  local parent = frame.getParent(frame)
  local result = ''
  local ii = 1
  while true do
    local p_num = ""
    if parent.args[ii] or frame.args[ii] then
      p_num = mw.text.trim(string.upper(parent.args[ii] or frame.args[ii])) end
    if p_num ~= "" then
      local label = mw.wikibase.label(p_num) or "БЕЗ НАЗВЫ"
      result = result .. "<li><b><i>[[d:Property:" .. p_num .. "|<small>" ..
        p_num .. "</small>:" .. label .. "]]</i></b> {[[d:Property talk:" ..
        p_num .. "|разм]]•[[d:Special:WhatLinksHere/Property:" ..
        p_num .. "|выкар]]}" ..
        trackingcats(p_num) .. "</li>"
      ii = ii + 1
    else break
    end
  end
  return result
end
 
return p