మాడ్యూల్: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 yesnoyesNo = require('Module:Yesno')
local p = {}
 
పంక్తి 15:
function p._For (args)
local use = args[1]
if (not use) then
local category = ''
return mHatnote.makeWikitextError(
if (not use or use == 'other uses') and
'no context parameter provided. Use {{other uses}} for "other uses" hatnotes.',
(not args.category or yesno(args.category)) then
'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}
) .. category(
(use == 'other uses') and yesNo(args.category) and
category = '[[Category:Hatnote templates using unusual parameters]]' or ''
)
end
 
"https://te.wikipedia.org/wiki/మాడ్యూల్:For" నుండి వెలికితీశారు