"Module:Asbox": अवतरणों में अंतर

Content deleted Content added
छो en:Module:Asbox से 80 अवतरण आयात किये गए
modified after bhwiki version and translated in order to localize
पंक्ति 10:
 
Both templates had significant contributions from numerous others listed in the revision history tab of their respective pages.
 
Localized for Bhojpuri Wikipedia (bh.wikipedia) by User:सत्यम् मिश्र
Localized for this wiki (hi.wikipedia) by User:सत्यम् मिश्र
--]]
local WRAPPER_TEMPLATE, args = 'Template:Asbox'
Line 36 ⟶ 39:
or a table of strings and/or tables containing parts. (See below)
]]
local attention, catTag, catKey = Buffer'Stubआधार messageसाँचे templatesजिनकी needingओर attentionध्यान देने की ज़रूरत है', '[[Categoryश्रेणी:%s]]', '%s|%s%s'
local function category(cat)
for _, v in ipairs((tostring(cat) == cat or cat.t) and {cat} or cat) do
Line 85 ⟶ 88:
for k, v in ipairs(stubCats) do
--Get category names and, if called by p.templatepage, the optional sort key
local tsort, cat = args['tempsort' .. v], mw.ustring.gsublower(args['category' .. v], '[^%w%p%s]', '')--remove all hidden unicode chars
--remove all hidden unicode chars is replaced by code to change category name in lower case because it was removing Matraas in Devnagari letters and we don't have to use Uppercase letters in Roman script
--Do not place template in main category if |tempsort = 'no'. However, DO place articles of that template in the main category.
table.insert(stubCats.v,
Line 97 ⟶ 101:
--Check category existance only if on the template page (i.e. stub documentation)
if page then
if not mw.title.new('Categoryश्रेणी:' .. cat).exists then
code = code or mw.html.create'code':wikitext'|category'
table.insert(stubCats.missing, tostring(mw.clone(code):wikitext(v)))
Line 103 ⟶ 107:
--[[
Checks non-demo stub template for documentation and flags if doc is present.
All stub cats names are checked and flagged if it does not match 'Category: [] stubआधार'.
The main stub cat is exempt from the name check if the stub template has its own doc
(presumably, this doc would have an explanation as to why the main stub cat is non-conforming).
]]
table.insert(stubCats.v, v == '' and not p.demo and pageDoc.exists and
'आधार साँचे जिनके प्रलेखन उपपृष्ठ हैं'
'Stub message templates with documentation subpages'
or not cat:match' stubsआधार$' and {k = 'S', t = page.text}
)
end
Line 119 ⟶ 123:
--One or more of the stub categories defined in this template do not seem to exist!
--Please double-check the parameters {{para|category}}, {{para|category1}} and {{para|category2}}.
.. ' not exist: पैरामीटर' .. mw.text.listToText(stubCats.missing),
'The following parameter'
.. (#stubCats.missing == 1 and ' एक ऐसी आधार श्रेणी निर्दिष्ट कर रहा है जो मौज़ूद नहीं है।' or ' ऐसी आधार श्रेणियाँ निर्दिष्ट कर रहा है जो नौजूद नहीं हैं।'),
.. (#stubCats.missing == 1 and ' defines a stub category that does' or 's define stub categories that do')
.. ' not exist: ' .. mw.text.listToText(stubCats.missing),
{k = 'N', t = page.text}
}
Line 128 ⟶ 131:
--Shows population of categories found by catStub(). Outputs demo values if none
local function population()
local wikitext, base = {}, '* [[:Categoryश्रेणी:%s]] (populationपृष्ठ संख्या: %s)\n'
if not args.category and stubCats[1] ~= false then
table.insert(stubCats, 1, false)
Line 151 ⟶ 154:
ombox{--Show ombox warnings for missing args.
ifNot = args.category,
'पैरामीटर <code>|category</code> नहीं दिया गया है। इस पैरामीटर के लिये एक उचित आधार श्रेणी दें।',
'The <code>|category</code> parameter is not set. Please add an appropriate stub category.',
{k = 'C', t = page.text}
})
:_(ombox{
ifNot = args.subject or args.article or args.qualifier,
'Thisइस stubआधार templateसाँचे containsमें noकोई description!विवरण Atनहीं leastदिया oneगया of the parametersहै! <code>|subject</code>, <code>|article</code> orया <code>|qualifier</code> mustमें से कम से कम एक पैरामीटर देना beआवश्यक defined.है।',
{k = 'D', t = page.text}
})
Line 162 ⟶ 165:
:_(category{
done = p.demo ~= 'doc',--Outputs categories if not doc demo
'आधार सन्देश साँचे',
'Stub message templates',
'Exclude in print',
args.icon and
'चित्र आइकन वाले आधार साँचे'
'Stub message templates using icon parameter'
or args.image and (
mw.title.new('Media:' .. mw.text.split(args.image, '|')[1]).exists--do nothing if exists. category() will reject true
or {k = 'B', t = page.text}
)
or 'बिना चित्र आइकन वाले आधार साँचे',
or 'Stub message templates without images',
args.imagealt and {k = 'I', t = page.text},
})
:_((not p.demo or p.demo == 'doc') and--Add standard stub template documentation
require('Module:Documentation').main{
content = Buffer(page.text ~= 'Stubआधार' and--This comparison performed in {{Asbox/stubtree}} before it invokes Module:Asbox stubtree
require('Module:Asbox stubtree').subtree{args = {pagename = page.text}}
)
:_in'\n== About this template ==\nThis template is used to identify a':_(args.subject):_'stubआधार':_(args.qualifier):_out' '--space
:_'. It uses {{[[Template:Asbox|asbox]]}}, which is a meta-template designed to ease the process of creating and maintaining stub templates.\n=== Usage ===\nTyping '
:_(mw.html.create'code'
:wikitext('{{', page.text == 'Stubआधार' and 'stubआधार' or page.text, '}}')
)
:_' produces the message shown at the beginning, and adds the article to the following categor'
Line 203 ⟶ 206:
)
:_out()
:_(page.protectionLevels.edit and page.protectionLevels.edit[1] == 'sysop' and
"This template is [[WP:PROTECT|fully protected]] and any [[WP:CAT|categories]] should be added to the template's ["
.. pageDoc:fullUrl('action=edit&preload=Template:Category_interwiki/preload', 'relative')
Line 230 ⟶ 233:
:tag'i'
:wikitext(
Buffer'Thisयह':_(args.subject):_(args.article or 'articleलेख'):_(args.qualifier)' ',--space
' एक [[विकिपीडिया:आधार|आधार]] है। जानकारी जोड़कर इसे [',
' is a [[Wikipedia:stub|stub]]. You can help Wikipedia by [',
page:fullUrl('action=edit', 'relative'),
' बढ़ाने में] विकिपीडिया की मदद करें।'
' expanding it].'
)
:done()
Line 259 ⟶ 262:
]]
if page.namespace == 0 then -- Main namespace
category'Allसभी stubआधार articlesलेख'
catStub()
elseif p.demo then
Line 269 ⟶ 272:
:node(output)
:tag'small':wikitext(
'Demoडेमो categoriesश्रेणियाँ: ',
(category{done = true}:gsub('(%[%[)(Categoryश्रेणी:)([^|%]]-)(%|)', '%1%2%3|%2%3%4'):gsub('(%[%[)(Categoryश्रेणी:)', '%1:%2'))
):done()
:wikitext(p.demo == 'doc' and p.demodoc or nil)
"https://hi.wikipedia.org/wiki/Module:Asbox" से प्राप्त