Module:Object weight and Module:Object weight/sandbox: Difference between pages

(Difference between pages)
Jump to navigation Jump to search
Page 1
Page 2
imported>Zackmann08
fixing indentation issue
 
imported>Zackmann08
add a tracking category
 
Line 2: Line 2:


local p = {}
local p = {}
local tracking_category = ' '
if mw.title.getCurrentTitle():inNamespaces(0, 828, 829) then
-- Category only in namespaces: 0=article, 828=module & 829=module talk (last 2 needed for testcases)
tracking_category = '[[Category:Pages where weight is being automatically converted]]'
end


local function clean_weight(s)
local function clean_weight(s)
Line 67: Line 72:


if type(targs) == 'table' then
if type(targs) == 'table' then
return frame:expandTemplate{ title = 'convert', args = targs} .. str
return frame:expandTemplate{ title = 'convert', args = targs} .. str .. tracking_category
else
else
return str
return str