"మాడ్యూల్:For" కూర్పుల మధ్య తేడాలు

Updated from sandbox: prints error if first parameter is empty (previously defaulted to "other uses"); exact-match "other uses" is still categorized
(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)
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 = {}
 
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 = {}
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
 
0

edits

"https://te.wikipedia.org/wiki/ప్రత్యేక:MobileDiff/2441580" నుండి వెలికితీశారు