मजकूराशीं उडकी मार

एकक:Main

विकिपीडिया कडल्यान

Documentation for this module may be created atएकक:Main/doc

--[[
-- This module produces a link to a main article or articles. It implements the
-- template {{main}}.
--
-- If the module is used in category or category talk space, it produces "The
-- main article for this category is xxx ". Otherwise, it produces
-- "Main article: xxx".
--]]

localmHatnote=require('Module:Hatnote')
localmHatlist=require('Module:Hatnote list')
localmArguments-- lazily initialise
localp={}

functionp.main(frame)
mArguments=require('Module:Arguments')
localargs=mArguments.getArgs(frame,{parentOnly=true})
localpages={}
fork,vinpairs(args)do
iftype(k)=='number'then
localdisplay=args['label '..k]orargs['l'..k]
localpage=displayand
string.format('%s|%s',string.gsub(v,'|.*$',''),display)orv
pages[#pages+1]=page
end
end
if#pages==0andmw.title.getCurrentTitle().namespace==0then
returnmHatnote.makeWikitextError(
'no page names specified',
'Template:Main#Errors',
args.category
)
end
localoptions={
selfref=args.selfref
}
returnp._main(pages,options)
end

functionp._main(args,options)
-- Get the list of pages. If no first page was specified we use the current
-- page name.
localcurrentTitle=mw.title.getCurrentTitle()
if#args==0thenargs={currentTitle.text}end
localfirstPage=string.gsub(args[1],'|.*$','')
-- Find the pagetype.
localpageType=mHatnote.findNamespaceId(firstPage)==0and'article'or'page'
-- Make the formatted link text
list=mHatlist.andList(args,true)
-- Build the text.
localisPlural=#args>1
localmainForm
localcurNs=currentTitle.namespace
if(curNs==14)or(curNs==15)then--category/talk namespaces
mainForm=isPluraland
'The main %ss for this [[Help:Categories|category]] are %s'
or
'The main %s for this [[Help:Categories|category]] is %s'
else
mainForm=isPluraland'Main %ss: %s'or'Main %s: %s'
end
localtext=string.format(mainForm,pageType,list)
-- Process the options and pass the text to the _rellink function in
-- [[Module:Hatnote]].
options=optionsor{}
localhnOptions={
selfref=options.selfref
}
returnmHatnote._hatnote(text,hnOptions)
end

returnp
"https://gom.wikipedia.org/w/index.php?title=एकक:Main&oldid=184868"चे कडल्यान परतून मेळयलें