Module:Message box: रिवीजन सभ के बीचा में अंतर

Content deleted Content added
dated cat formatting changed
allow all templates to disable the plainlinks class
लाइन 10:
-- Get a language object for formatDate and ucfirst.
local lang = mw.language.getContentLanguage()
 
-- Define constants
local CONFIG_MODULE = 'Module:Message box/configuration'
 
--------------------------------------------------------------------------------
Line 155 ⟶ 158:
-- Add attributes, classes and styles.
self.id = args.id
if yesno(args.plainlinks) ~= false then
self:addClass('plainlinks')
cfg.usePlainlinksParam and yesno(args.plainlinks or true) and 'plainlinks'
)end
for _, class in ipairs(cfg.classes or {}) do
self:addClass(class)
Line 202 ⟶ 205:
local sect
if args.sect == '' then
sect = 'एहThis ' .. (cfg.sectionDefault or 'पन्नाpage')
elseif type(args.sect) == 'string' then
sect = 'एहThis ' .. args.sect
end
local issue = args.issue
Line 246 ⟶ 249:
end
if talkTitle and talkTitle.exists then
local talkText = 'संबंधितRelevant जानकारी,discussion सलाहmay भाbe चर्चा खातिरfound on'
if talkArgIsTalkPage then
talkText = string.format(
'%s [[%s|%s]] देखल जाय।.',
talkText,
talk,
Line 256 ⟶ 259:
else
talkText = string.format(
'%s the [[%s#%s|बातचीतtalk पन्नाpage]] देखल जाय।.',
talkText,
talkTitle.prefixedText,
Line 278 ⟶ 281:
end
self.info = args.info
if yesno(args.removalnotice) then
self.removalNotice = cfg.removalNotice
end
end
 
Line 337 ⟶ 343:
local date = args.date
date = type(date) == 'string' and date
local suffixpreposition = 'सेfrom'
local prefix = ''
for _, num in ipairs(nums) do
local mainCat = args['cat' .. tostring(num)]
Line 346 ⟶ 351:
allCat = type(allCat) == 'string' and allCat
if mainCat and date and date ~= '' then
local catTitle = string.format('%s %s %s %s', prefixmainCat, datepreposition, suffix, mainCat date)
self:addCat(0, catTitle)
catTitle = getTitleObject('Category:' .. catTitle)
if not catTitle or not catTitle.exists then
self:addCat(0, 'टेम्पलेटArticles मेंwith गलतinvalid तारीखdate पैरामीटरparameter वालाin लेखtemplate')
end
elseif mainCat and (not date or date == '') then
Line 494 ⟶ 499:
:addClass('mbox-text-span')
:wikitext(self.issue or nil)
if (self.talk or self.fix) and not self.isSmall then
textCellSpan:tag('span')
:addClass('hide-when-compact')
Line 501 ⟶ 506:
end
textCellSpan:wikitext(self.date and (' ' .. self.date) or nil)
if self.info and not self.isSmall then
textCellSpan
:tag('span')
:addClass('hide-when-compact')
:wikitext(self.info and (' ' .. self.info) or nil)
end
if self.removalNotice then
textCellSpan:tag('small')
:addClass('hide-when-compact')
:tag('i')
:wikitext(string.format(" (%s)", self.removalNotice))
end
else
Line 566 ⟶ 577:
 
function p.main(boxType, args, cfgTables)
local box = MessageBox.new(boxType, args, cfgTables or mw.loadData('Module:Message box/configuration'CONFIG_MODULE))
box:setParameters()
box:setCategories()
"https://bh.wikipedia.org/wiki/Module:Message_box" से लिहल गइल