Module:utilities: Difference between revisions

Undo revision 320503 by Sware (talk)
(Created page with "local export = {} local data = mw.loadData("Module:utilities/data") local notneeded = data.notneeded local neededhassubpage = data.neededhassubpage -- A helper function to e...")
 
(Undo revision 320503 by Sware (talk))
Tag: Undo
 
(6 intermediate revisions by the same user not shown)
Line 170: Line 170:


function export.catfix(lang, sc)
function export.catfix(lang, sc)
if not lang then
require("Module:debug").track("catfix/no lang")
return nil
elseif type(lang) ~= "table" then
require("Module:debug").track("catfix/lang not table")
return nil
end
local canonicalName = lang:getCanonicalName() or error('The first argument to the function "catfix" should be a language object from Module:languages.')
local canonicalName = lang:getCanonicalName() or error('The first argument to the function "catfix" should be a language object from Module:languages.')