Module:Number of works: Difference between revisions
Appearance
Created page with "-- This module is DEPRECATED. We turned to using DPL lists to count numbers of works in a library card. local p = {} function p.getWorkCount(frame) local category = frame.args.category or '' local pages = mw.site.stats.pagesInCategory(category) if tonumber(pages) == 1 then return "1 work" else return pages .. " works" end end function p.main(frame) return p.getWorkCount(frame) end" |
m Protected "Module:Number of works" ([Edit=Allow only administrators] (indefinite) [Move=Allow only administrators] (indefinite)) |
(No difference)
|
Latest revision as of 02:00, 13 March 2025
Documentation for this module may be created at Module:Number of works/doc
-- This module is DEPRECATED. We turned to using DPL lists to count numbers of works in a library card.
local p = {}
function p.getWorkCount(frame)
local category = frame.args.category or ''
local pages = mw.site.stats.pagesInCategory(category)
if tonumber(pages) == 1 then
return "1 work"
else
return pages .. " works"
end
end
function p.main(frame)
return p.getWorkCount(frame)
end