Modul:EntryCount
Penampilan
- Laman modul ini kekurangan sublaman pendokumenan. Sila cipta laman pendokumenan tersebut.
- Pautan berguna: senarai sublaman • pautan • transklusi • kes ujian • kotak pasir
local export = {}
function export.calculate(frame)
local total_entries = 0
local max_entries_to_check = 250
for i = 1, max_entries_to_check do
local category_name
if i == 1 then
category_name = "Laman dengan 1 entri"
else
category_name = "Laman dengan " .. i .. " entri"
end
local page_count = mw.site.stats.pagesInCategory(category_name, 'pages')
if page_count and page_count > 0 then
total_entries = total_entries + (page_count * i)
end
end
return mw.language.new('ms'):formatNum(total_entries)
end
return export