మాడ్యూల్:For: కూర్పుల మధ్య తేడాలు
Content deleted Content added
Updated from sandbox: categorizes as unusual "other uses" by defaulting as well as typed-out "other uses" |
Updated from sandbox: prints error if first parameter is empty (previously defaulted to "other uses"); exact-match "other uses" is still categorized |
||
పంక్తి 1:
local mArguments --initialize lazily
local yesno = require('Module:Yesno')▼
local mHatlist = require('Module:Hatnote list')
local mHatnote = require('Module:Hatnote')
local p = {}
పంక్తి 15:
function p._For (args)
local use = args[1]
if (not use) then
return mHatnote.makeWikitextError(
'no context parameter provided. Use {{other uses}} for "other uses" hatnotes.',
'Template:For#Errors',
category = '[[Category:Hatnote templates using unusual parameters]]'▼
args.category
)
end
local pages = {}
Line 26 ⟶ 28:
mHatlist.forSeeTableToString({{use = use, pages = pages}}),
{selfref = args.selfref}
) ..
(use == 'other uses') and yesNo(args.category) and
)
end
|