local mHatnote = require('Module:Hatnote')local mHatlist = require('Module:Hatnote list')local mYesno = require('Module:Yesno')local mArguments --initialize lazilylocal p =
function p.technicalReasons (frame) mArguments = require('Module:Arguments') local args = mArguments.getArgs(frame) return p._technicalReasons(args)end
function p._technicalReasons (args) --Return an error if no redirect's provided if not args[1] then return mHatnote.makeWikitextError('no redirect provided', 'Template:Technical reasons', args.category ) end --get maxArg manually because getArgs and table.maxn aren't friends local maxArg = 0 for k, v in pairs(args) do if type(k)
0 then forSee[k] = nil end end --Stringify the forSee table or set it nil forSee = #forSee ~= 0 and mHatlist.forSeeTableToString(forSee) or nil local whatRedirects = mYesno(args.prefix) and 'terms beginning with "' .. args[1] .. '" redirect' or '"' .. args[1] .. '" redirects' local lead = string.format('For technical reasons, %s here.', whatRedirects ) local text = table.concat(' ') local options = return mHatnote._hatnote(text, options)end
return p