ವಿಕಿಕೋಟ್ knwikiquote https://kn.wikiquote.org/wiki/%E0%B2%AE%E0%B3%81%E0%B2%96%E0%B3%8D%E0%B2%AF_%E0%B2%AA%E0%B3%81%E0%B2%9F MediaWiki 1.47.0-wmf.16 first-letter ಮೀಡಿಯ ವಿಶೇಷ ಚರ್ಚೆಪುಟ ಸದಸ್ಯ ಸದಸ್ಯರ ಚರ್ಚೆಪುಟ ವಿಕಿಕೋಟ್ ವಿಕಿಕೋಟ್ ಚರ್ಚೆಪುಟ ಚಿತ್ರ ಚಿತ್ರ ಚರ್ಚೆಪುಟ ಮೀಡಿಯವಿಕಿ ಮೀಡಿಯವಿಕಿ ಚರ್ಚೆಪುಟ ಟೆಂಪ್ಲೇಟು ಟೆಂಪ್ಲೇಟು ಚರ್ಚೆಪುಟ ಸಹಾಯ ಸಹಾಯ ಚರ್ಚೆಪುಟ ವರ್ಗ ವರ್ಗ ಚರ್ಚೆಪುಟ TimedText TimedText talk ಮಾಡ್ಯೂಲ್ ಮಾಡ್ಯೂಲ್ ಚರ್ಚೆಪುಟ Event Event talk ಮಾಡ್ಯೂಲ್:Documentation 828 2820 15623 9562 2026-07-24T04:53:25Z w>A826 0 ೧ revisions imported from [[:en:Module:Documentation]] 15623 Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub local format = mw.ustring.format ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4) end return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return format('[[%s|%s]]', page, display) else return format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end -- 'documentation-toolbar' return format( '<span class="%s">(%s)</span>', message('toolbar-class'), table.concat(ret, ' &#124; ') ) end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- function p.nonexistent(frame) if mw.title.getCurrentTitle().subpageText == 'testcases' then return frame:expandTemplate{title = 'module test cases notice'} else return p.main(frame) end end p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :wikitext(p._getModuleWikitext(args, env)) :wikitext(p.protectionTemplate(env)) :wikitext(p.sandboxNotice(args, env)) :tag('div') -- 'documentation-container' :addClass(message('container')) :attr('role', 'complementary') :attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil) :attr('aria-label', args.heading == '' and 'Documentation' or nil) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :wikitext(p._endBox(args, env)) :done() :wikitext(p.addTrackingCategories(env)) -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title -- objects and other namespace- or path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- -- Data includes: -- env.protectionLevels - the protection levels table of the title object. -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') or (subpage == message('doc-subpage') and mw.title.getCurrentTitle().namespace == env.docSpace) then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.protectionLevels() -- The protection levels table of the title object. return env.title.protectionLevels end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the -- same as the subject namespace. However, pages in the Article, File, -- MediaWiki or Category namespaces must have their /doc, /sandbox and -- /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.canonicalUrl( 'Special:ComparePages', { page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Auxiliary templates ---------------------------------------------------------------------------- p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext') function p._getModuleWikitext(args, env) local currentTitle = mw.title.getCurrentTitle() if currentTitle.contentModel ~= 'Scribunto' then return end pcall(require, currentTitle.prefixedText) -- if it fails, we don't care local moduleWikitext = package.loaded["Module:Module wikitext"] if moduleWikitext then return moduleWikitext.main() end end function p.sandboxNotice(args, env) --[=[ -- Generates a sandbox notice for display above sandbox pages. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-notice-image' --> '[[File:Sandbox.svg|50px|alt=|link=]]' -- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' -- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' -- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page' -- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page' -- 'sandbox-notice-pagetype-other' --> 'sandbox page' -- 'sandbox-notice-compare-link-display' --> 'diff' -- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.' -- 'sandbox-notice-testcases-link-display' --> 'test cases' -- 'sandbox-category' --> 'Template sandboxes' -- 'module-sandbox-category' --> 'Module sandboxes' -- 'other-sandbox-category' --> 'Sandboxes outside of template or module namespace' --]=] local title = env.title local sandboxTitle = env.sandboxTitle local templateTitle = env.templateTitle local subjectSpace = env.subjectSpace if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then return nil end -- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text". local omargs = {} omargs.image = message('sandbox-notice-image') -- Get the text. We start with the opening blurb, which is something like -- "This is the template sandbox for [[Template:Foo]] (diff)." local text = '__EXPECTUNUSEDTEMPLATE__' local pagetype, sandboxCat if subjectSpace == 10 then pagetype = message('sandbox-notice-pagetype-template') sandboxCat = message('sandbox-category') elseif subjectSpace == 828 then pagetype = message('sandbox-notice-pagetype-module') sandboxCat = message('module-sandbox-category') else pagetype = message('sandbox-notice-pagetype-other') sandboxCat = message('other-sandbox-category') end local templateLink = makeWikilink(templateTitle.prefixedText) local compareUrl = env.compareUrl if compareUrl then local compareDisplay = message('sandbox-notice-compare-link-display') local compareLink = makeUrlLink(compareUrl, compareDisplay) text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) else text = text .. message('sandbox-notice-blurb', {pagetype, templateLink}) end -- Get the test cases page blurb if the page exists. This is something like -- "See also the companion subpage for [[Template:Foo/testcases|test cases]]." local testcasesTitle = env.testcasesTitle if testcasesTitle and testcasesTitle.exists then if testcasesTitle.contentModel == "Scribunto" then local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) else local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) end end -- Add the sandbox to the sandbox category. omargs.text = text .. makeCategoryLink(sandboxCat) -- 'documentation-clear' return '<div class="' .. message('clear') .. '"></div>' .. require('Module:Message box').main('ombox', omargs) end function p.protectionTemplate(env) -- Generates the padlock icon in the top right. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'protection-template' --> 'pp-template' -- 'protection-template-args' --> {docusage = 'yes'} local protectionLevels = env.protectionLevels if not protectionLevels then return nil end local editProt = protectionLevels.edit and protectionLevels.edit[1] local moveProt = protectionLevels.move and protectionLevels.move[1] if editProt then -- The page is edit-protected. return require('Module:Protection banner')._main{ message('protection-reason-edit'), small = true } elseif moveProt and moveProt ~= 'autoconfirmed' then -- The page is move-protected but not edit-protected. Exclude move -- protection with the level "autoconfirmed", as this is equivalent to -- no move protection at all. return require('Module:Protection banner')._main{ action = 'move', small = true } else return nil end end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content or args[1] then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end return { title = title, docTitle = docTitle, -- View, display, edit, and purge links if /doc exists. viewLinkDisplay = message('view-link-display'), editLinkDisplay = message('edit-link-display'), historyLinkDisplay = message('history-link-display'), purgeLinkDisplay = message('purge-link-display'), preload = preload, createLinkDisplay = message('create-link-display') } end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create][purge] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local docTitle = data.docTitle -- yes, we do intend to purge the template page on which the documentation appears local purgeLink = makeWikilink("Special:Purge/" .. data.title.prefixedText, data.purgeLinkDisplay) if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, data.editLinkDisplay) local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, data.historyLinkDisplay) return viewLink .. editLink .. historyLink .. purgeLink else local createLink = makeUrlLink(docTitle:canonicalUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) return createLink .. purgeLink end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end -- Data for the [view][edit][history][purge] or [create] links. if links then -- 'mw-editsection-like plainlinks' data.linksClass = message('start-box-link-classes') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox -- 'documentation-startbox' :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :attr('id', 'documentation-heading') :cssText(data.headingStyleText) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. return '\n' .. (content or '') .. '\n' end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the link box. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" end end local box = mw.html.create('div') -- 'documentation-metadata' box:attr('role', 'note') :addClass(message('end-box-class')) -- 'plainlinks' :addClass(message('end-box-plainlinks')) :wikitext(text) :done() return '\n' .. tostring(box) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Wikipedia:Template documentation|documentation]] -- is [[Help:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle then return nil end if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editDisplay = message('edit-link-display') local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, editDisplay) local historyDisplay = message('history-link-display') local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, historyDisplay) return message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:canonicalUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) return message('create-module-doc-blurb', {createLink}) .. '<br />' end end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeWikilink("Special:EditPage/" .. sandboxPage, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary} end local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:canonicalUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeWikilink("Special:EditPage/" .. testcasesPage, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then local testcasesRunLinkDisplay = message('testcases-run-link-display') local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) else testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) end else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:canonicalUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then return makeCategoryLink(message('strange-usage-category')) end return '' end return p bo74oekmmsj1xtpw7dlzkvkhc0k05g6 15624 15623 2026-08-22T11:00:59Z A826 1864 ೧ revisions imported from [[:w:ಮಾಡ್ಯೂಲ್:Documentation]] 15623 Scribunto text/plain -- This module implements {{documentation}}. -- Get required modules. local getArgs = require('Module:Arguments').getArgs -- Get the config table. local cfg = mw.loadData('Module:Documentation/config') local p = {} -- Often-used functions. local ugsub = mw.ustring.gsub local format = mw.ustring.format ---------------------------------------------------------------------------- -- Helper functions -- -- These are defined as local functions, but are made available in the p -- table for testing purposes. ---------------------------------------------------------------------------- local function message(cfgKey, valArray, expectType) --[[ -- Gets a message from the cfg table and formats it if appropriate. -- The function raises an error if the value from the cfg table is not -- of the type expectType. The default type for expectType is 'string'. -- If the table valArray is present, strings such as $1, $2 etc. in the -- message are substituted with values from the table keys [1], [2] etc. -- For example, if the message "foo-message" had the value 'Foo $2 bar $1.', -- message('foo-message', {'baz', 'qux'}) would return "Foo qux bar baz." --]] local msg = cfg[cfgKey] expectType = expectType or 'string' if type(msg) ~= expectType then error('message: type error in message cfg.' .. cfgKey .. ' (' .. expectType .. ' expected, got ' .. type(msg) .. ')', 2) end if not valArray then return msg end local function getMessageVal(match) match = tonumber(match) return valArray[match] or error('message: no value found for key $' .. match .. ' in message cfg.' .. cfgKey, 4) end return ugsub(msg, '$([1-9][0-9]*)', getMessageVal) end p.message = message local function makeWikilink(page, display) if display then return format('[[%s|%s]]', page, display) else return format('[[%s]]', page) end end p.makeWikilink = makeWikilink local function makeCategoryLink(cat, sort) local catns = mw.site.namespaces[14].name return makeWikilink(catns .. ':' .. cat, sort) end p.makeCategoryLink = makeCategoryLink local function makeUrlLink(url, display) return format('[%s %s]', url, display) end p.makeUrlLink = makeUrlLink local function makeToolbar(...) local ret = {} local lim = select('#', ...) if lim < 1 then return nil end for i = 1, lim do ret[#ret + 1] = select(i, ...) end -- 'documentation-toolbar' return format( '<span class="%s">(%s)</span>', message('toolbar-class'), table.concat(ret, ' &#124; ') ) end p.makeToolbar = makeToolbar ---------------------------------------------------------------------------- -- Argument processing ---------------------------------------------------------------------------- local function makeInvokeFunc(funcName) return function (frame) local args = getArgs(frame, { valueFunc = function (key, value) if type(value) == 'string' then value = value:match('^%s*(.-)%s*$') -- Remove whitespace. if key == 'heading' or value ~= '' then return value else return nil end else return value end end }) return p[funcName](args) end end ---------------------------------------------------------------------------- -- Entry points ---------------------------------------------------------------------------- function p.nonexistent(frame) if mw.title.getCurrentTitle().subpageText == 'testcases' then return frame:expandTemplate{title = 'module test cases notice'} else return p.main(frame) end end p.main = makeInvokeFunc('_main') function p._main(args) --[[ -- This function defines logic flow for the module. -- @args - table of arguments passed by the user --]] local env = p.getEnvironment(args) local root = mw.html.create() root :wikitext(p._getModuleWikitext(args, env)) :wikitext(p.protectionTemplate(env)) :wikitext(p.sandboxNotice(args, env)) :tag('div') -- 'documentation-container' :addClass(message('container')) :attr('role', 'complementary') :attr('aria-labelledby', args.heading ~= '' and 'documentation-heading' or nil) :attr('aria-label', args.heading == '' and 'Documentation' or nil) :newline() :tag('div') -- 'documentation' :addClass(message('main-div-classes')) :newline() :wikitext(p._startBox(args, env)) :wikitext(p._content(args, env)) :tag('div') -- 'documentation-clear' :addClass(message('clear')) :done() :newline() :done() :wikitext(p._endBox(args, env)) :done() :wikitext(p.addTrackingCategories(env)) -- 'Module:Documentation/styles.css' return mw.getCurrentFrame():extensionTag ( 'templatestyles', '', {src=cfg['templatestyles'] }) .. tostring(root) end ---------------------------------------------------------------------------- -- Environment settings ---------------------------------------------------------------------------- function p.getEnvironment(args) --[[ -- Returns a table with information about the environment, including title -- objects and other namespace- or path-related data. -- @args - table of arguments passed by the user -- -- Title objects include: -- env.title - the page we are making documentation for (usually the current title) -- env.templateTitle - the template (or module, file, etc.) -- env.docTitle - the /doc subpage. -- env.sandboxTitle - the /sandbox subpage. -- env.testcasesTitle - the /testcases subpage. -- -- Data includes: -- env.protectionLevels - the protection levels table of the title object. -- env.subjectSpace - the number of the title's subject namespace. -- env.docSpace - the number of the namespace the title puts its documentation in. -- env.docpageBase - the text of the base page of the /doc, /sandbox and /testcases pages, with namespace. -- env.compareUrl - URL of the Special:ComparePages page comparing the sandbox with the template. -- -- All table lookups are passed through pcall so that errors are caught. If an error occurs, the value -- returned will be nil. --]] local env, envFuncs = {}, {} -- Set up the metatable. If triggered we call the corresponding function in the envFuncs table. The value -- returned by that function is memoized in the env table so that we don't call any of the functions -- more than once. (Nils won't be memoized.) setmetatable(env, { __index = function (t, key) local envFunc = envFuncs[key] if envFunc then local success, val = pcall(envFunc) if success then env[key] = val -- Memoise the value. return val end end return nil end }) function envFuncs.title() -- The title object for the current page, or a test page passed with args.page. local title local titleArg = args.page if titleArg then title = mw.title.new(titleArg) else title = mw.title.getCurrentTitle() end return title end function envFuncs.templateTitle() --[[ -- The template (or module, etc.) title object. -- Messages: -- 'sandbox-subpage' --> 'sandbox' -- 'testcases-subpage' --> 'testcases' --]] local subjectSpace = env.subjectSpace local title = env.title local subpage = title.subpageText if subpage == message('sandbox-subpage') or subpage == message('testcases-subpage') or (subpage == message('doc-subpage') and mw.title.getCurrentTitle().namespace == env.docSpace) then return mw.title.makeTitle(subjectSpace, title.baseText) else return mw.title.makeTitle(subjectSpace, title.text) end end function envFuncs.docTitle() --[[ -- Title object of the /doc subpage. -- Messages: -- 'doc-subpage' --> 'doc' --]] local title = env.title local docname = args[1] -- User-specified doc page. local docpage if docname then docpage = docname else docpage = env.docpageBase .. '/' .. message('doc-subpage') end return mw.title.new(docpage) end function envFuncs.sandboxTitle() --[[ -- Title object for the /sandbox subpage. -- Messages: -- 'sandbox-subpage' --> 'sandbox' --]] return mw.title.new(env.docpageBase .. '/' .. message('sandbox-subpage')) end function envFuncs.testcasesTitle() --[[ -- Title object for the /testcases subpage. -- Messages: -- 'testcases-subpage' --> 'testcases' --]] return mw.title.new(env.docpageBase .. '/' .. message('testcases-subpage')) end function envFuncs.protectionLevels() -- The protection levels table of the title object. return env.title.protectionLevels end function envFuncs.subjectSpace() -- The subject namespace number. return mw.site.namespaces[env.title.namespace].subject.id end function envFuncs.docSpace() -- The documentation namespace number. For most namespaces this is the -- same as the subject namespace. However, pages in the Article, File, -- MediaWiki or Category namespaces must have their /doc, /sandbox and -- /testcases pages in talk space. local subjectSpace = env.subjectSpace if subjectSpace == 0 or subjectSpace == 6 or subjectSpace == 8 or subjectSpace == 14 then return subjectSpace + 1 else return subjectSpace end end function envFuncs.docpageBase() -- The base page of the /doc, /sandbox, and /testcases subpages. -- For some namespaces this is the talk page, rather than the template page. local templateTitle = env.templateTitle local docSpace = env.docSpace local docSpaceText = mw.site.namespaces[docSpace].name -- Assemble the link. docSpace is never the main namespace, so we can hardcode the colon. return docSpaceText .. ':' .. templateTitle.text end function envFuncs.compareUrl() -- Diff link between the sandbox and the main template using [[Special:ComparePages]]. local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle if templateTitle.exists and sandboxTitle.exists then local compareUrl = mw.uri.canonicalUrl( 'Special:ComparePages', { page1 = templateTitle.prefixedText, page2 = sandboxTitle.prefixedText} ) return tostring(compareUrl) else return nil end end return env end ---------------------------------------------------------------------------- -- Auxiliary templates ---------------------------------------------------------------------------- p.getModuleWikitext = makeInvokeFunc('_getModuleWikitext') function p._getModuleWikitext(args, env) local currentTitle = mw.title.getCurrentTitle() if currentTitle.contentModel ~= 'Scribunto' then return end pcall(require, currentTitle.prefixedText) -- if it fails, we don't care local moduleWikitext = package.loaded["Module:Module wikitext"] if moduleWikitext then return moduleWikitext.main() end end function p.sandboxNotice(args, env) --[=[ -- Generates a sandbox notice for display above sandbox pages. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-notice-image' --> '[[File:Sandbox.svg|50px|alt=|link=]]' -- 'sandbox-notice-blurb' --> 'This is the $1 for $2.' -- 'sandbox-notice-diff-blurb' --> 'This is the $1 for $2 ($3).' -- 'sandbox-notice-pagetype-template' --> '[[Wikipedia:Template test cases|template sandbox]] page' -- 'sandbox-notice-pagetype-module' --> '[[Wikipedia:Template test cases|module sandbox]] page' -- 'sandbox-notice-pagetype-other' --> 'sandbox page' -- 'sandbox-notice-compare-link-display' --> 'diff' -- 'sandbox-notice-testcases-blurb' --> 'See also the companion subpage for $1.' -- 'sandbox-notice-testcases-link-display' --> 'test cases' -- 'sandbox-category' --> 'Template sandboxes' -- 'module-sandbox-category' --> 'Module sandboxes' -- 'other-sandbox-category' --> 'Sandboxes outside of template or module namespace' --]=] local title = env.title local sandboxTitle = env.sandboxTitle local templateTitle = env.templateTitle local subjectSpace = env.subjectSpace if not (subjectSpace and title and sandboxTitle and templateTitle and mw.title.equals(title, sandboxTitle)) then return nil end -- Build the table of arguments to pass to {{ombox}}. We need just two fields, "image" and "text". local omargs = {} omargs.image = message('sandbox-notice-image') -- Get the text. We start with the opening blurb, which is something like -- "This is the template sandbox for [[Template:Foo]] (diff)." local text = '__EXPECTUNUSEDTEMPLATE__' local pagetype, sandboxCat if subjectSpace == 10 then pagetype = message('sandbox-notice-pagetype-template') sandboxCat = message('sandbox-category') elseif subjectSpace == 828 then pagetype = message('sandbox-notice-pagetype-module') sandboxCat = message('module-sandbox-category') else pagetype = message('sandbox-notice-pagetype-other') sandboxCat = message('other-sandbox-category') end local templateLink = makeWikilink(templateTitle.prefixedText) local compareUrl = env.compareUrl if compareUrl then local compareDisplay = message('sandbox-notice-compare-link-display') local compareLink = makeUrlLink(compareUrl, compareDisplay) text = text .. message('sandbox-notice-diff-blurb', {pagetype, templateLink, compareLink}) else text = text .. message('sandbox-notice-blurb', {pagetype, templateLink}) end -- Get the test cases page blurb if the page exists. This is something like -- "See also the companion subpage for [[Template:Foo/testcases|test cases]]." local testcasesTitle = env.testcasesTitle if testcasesTitle and testcasesTitle.exists then if testcasesTitle.contentModel == "Scribunto" then local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesRunLinkDisplay = message('sandbox-notice-testcases-run-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-run-blurb', {testcasesLink, testcasesRunLink}) else local testcasesLinkDisplay = message('sandbox-notice-testcases-link-display') local testcasesLink = makeWikilink(testcasesTitle.prefixedText, testcasesLinkDisplay) text = text .. '<br />' .. message('sandbox-notice-testcases-blurb', {testcasesLink}) end end -- Add the sandbox to the sandbox category. omargs.text = text .. makeCategoryLink(sandboxCat) -- 'documentation-clear' return '<div class="' .. message('clear') .. '"></div>' .. require('Module:Message box').main('ombox', omargs) end function p.protectionTemplate(env) -- Generates the padlock icon in the top right. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'protection-template' --> 'pp-template' -- 'protection-template-args' --> {docusage = 'yes'} local protectionLevels = env.protectionLevels if not protectionLevels then return nil end local editProt = protectionLevels.edit and protectionLevels.edit[1] local moveProt = protectionLevels.move and protectionLevels.move[1] if editProt then -- The page is edit-protected. return require('Module:Protection banner')._main{ message('protection-reason-edit'), small = true } elseif moveProt and moveProt ~= 'autoconfirmed' then -- The page is move-protected but not edit-protected. Exclude move -- protection with the level "autoconfirmed", as this is equivalent to -- no move protection at all. return require('Module:Protection banner')._main{ action = 'move', small = true } else return nil end end ---------------------------------------------------------------------------- -- Start box ---------------------------------------------------------------------------- p.startBox = makeInvokeFunc('_startBox') function p._startBox(args, env) --[[ -- This function generates the start box. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- The actual work is done by p.makeStartBoxLinksData and p.renderStartBoxLinks which make -- the [view] [edit] [history] [purge] links, and by p.makeStartBoxData and p.renderStartBox -- which generate the box HTML. --]] env = env or p.getEnvironment(args) local links local content = args.content if not content or args[1] then -- No need to include the links if the documentation is on the template page itself. local linksData = p.makeStartBoxLinksData(args, env) if linksData then links = p.renderStartBoxLinks(linksData) end end -- Generate the start box html. local data = p.makeStartBoxData(args, env, links) if data then return p.renderStartBox(data) else -- User specified no heading. return nil end end function p.makeStartBoxLinksData(args, env) --[[ -- Does initial processing of data to make the [view] [edit] [history] [purge] links. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'view-link-display' --> 'view' -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'purge-link-display' --> 'purge' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'docpage-preload' --> 'Template:Documentation/preload' -- 'create-link-display' --> 'create' --]] local subjectSpace = env.subjectSpace local title = env.title local docTitle = env.docTitle if not title or not docTitle then return nil end if docTitle.isRedirect then docTitle = docTitle.redirectTarget end -- Create link if /doc doesn't exist. local preload = args.preload if not preload then if subjectSpace == 828 then -- Module namespace preload = message('module-preload') else preload = message('docpage-preload') end end return { title = title, docTitle = docTitle, -- View, display, edit, and purge links if /doc exists. viewLinkDisplay = message('view-link-display'), editLinkDisplay = message('edit-link-display'), historyLinkDisplay = message('history-link-display'), purgeLinkDisplay = message('purge-link-display'), preload = preload, createLinkDisplay = message('create-link-display') } end function p.renderStartBoxLinks(data) --[[ -- Generates the [view][edit][history][purge] or [create][purge] links from the data table. -- @data - a table of data generated by p.makeStartBoxLinksData --]] local docTitle = data.docTitle -- yes, we do intend to purge the template page on which the documentation appears local purgeLink = makeWikilink("Special:Purge/" .. data.title.prefixedText, data.purgeLinkDisplay) if docTitle.exists then local viewLink = makeWikilink(docTitle.prefixedText, data.viewLinkDisplay) local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, data.editLinkDisplay) local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, data.historyLinkDisplay) return viewLink .. editLink .. historyLink .. purgeLink else local createLink = makeUrlLink(docTitle:canonicalUrl{action = 'edit', preload = data.preload}, data.createLinkDisplay) return createLink .. purgeLink end return ret end function p.makeStartBoxData(args, env, links) --[=[ -- Does initial processing of data to pass to the start-box render function, p.renderStartBox. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- @links - a string containing the [view][edit][history][purge] links - could be nil if there's an error. -- -- Messages: -- 'documentation-icon-wikitext' --> '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- 'template-namespace-heading' --> 'Template documentation' -- 'module-namespace-heading' --> 'Module documentation' -- 'file-namespace-heading' --> 'Summary' -- 'other-namespaces-heading' --> 'Documentation' -- 'testcases-create-link-display' --> 'create' --]=] local subjectSpace = env.subjectSpace if not subjectSpace then -- Default to an "other namespaces" namespace, so that we get at least some output -- if an error occurs. subjectSpace = 2 end local data = {} -- Heading local heading = args.heading -- Blank values are not removed. if heading == '' then -- Don't display the start box if the heading arg is defined but blank. return nil end if heading then data.heading = heading elseif subjectSpace == 10 then -- Template namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('template-namespace-heading') elseif subjectSpace == 828 then -- Module namespace data.heading = message('documentation-icon-wikitext') .. ' ' .. message('module-namespace-heading') elseif subjectSpace == 6 then -- File namespace data.heading = message('file-namespace-heading') else data.heading = message('other-namespaces-heading') end -- Heading CSS local headingStyle = args['heading-style'] if headingStyle then data.headingStyleText = headingStyle else -- 'documentation-heading' data.headingClass = message('main-div-heading-class') end -- Data for the [view][edit][history][purge] or [create] links. if links then -- 'mw-editsection-like plainlinks' data.linksClass = message('start-box-link-classes') data.links = links end return data end function p.renderStartBox(data) -- Renders the start box html. -- @data - a table of data generated by p.makeStartBoxData. local sbox = mw.html.create('div') sbox -- 'documentation-startbox' :addClass(message('start-box-class')) :newline() :tag('span') :addClass(data.headingClass) :attr('id', 'documentation-heading') :cssText(data.headingStyleText) :wikitext(data.heading) local links = data.links if links then sbox:tag('span') :addClass(data.linksClass) :attr('id', data.linksId) :wikitext(links) end return tostring(sbox) end ---------------------------------------------------------------------------- -- Documentation content ---------------------------------------------------------------------------- p.content = makeInvokeFunc('_content') function p._content(args, env) -- Displays the documentation contents -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment env = env or p.getEnvironment(args) local docTitle = env.docTitle local content = args.content if not content and docTitle and docTitle.exists then content = args._content or mw.getCurrentFrame():expandTemplate{title = docTitle.prefixedText} end -- The line breaks below are necessary so that "=== Headings ===" at the start and end -- of docs are interpreted correctly. return '\n' .. (content or '') .. '\n' end p.contentTitle = makeInvokeFunc('_contentTitle') function p._contentTitle(args, env) env = env or p.getEnvironment(args) local docTitle = env.docTitle if not args.content and docTitle and docTitle.exists then return docTitle.prefixedText else return '' end end ---------------------------------------------------------------------------- -- End box ---------------------------------------------------------------------------- p.endBox = makeInvokeFunc('_endBox') function p._endBox(args, env) --[=[ -- This function generates the end box (also known as the link box). -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- --]=] -- Get environment data. env = env or p.getEnvironment(args) local subjectSpace = env.subjectSpace local docTitle = env.docTitle if not subjectSpace or not docTitle then return nil end -- Check whether we should output the end box at all. Add the end -- box by default if the documentation exists or if we are in the -- user, module or template namespaces. local linkBox = args['link box'] if linkBox == 'off' or not ( docTitle.exists or subjectSpace == 2 or subjectSpace == 828 or subjectSpace == 10 ) then return nil end -- Assemble the link box. local text = '' if linkBox then text = text .. linkBox else text = text .. (p.makeDocPageBlurb(args, env) or '') -- "This documentation is transcluded from [[Foo]]." if subjectSpace == 2 or subjectSpace == 10 or subjectSpace == 828 then -- We are in the user, template or module namespaces. -- Add sandbox and testcases links. -- "Editors can experiment in this template's sandbox and testcases pages." text = text .. (p.makeExperimentBlurb(args, env) or '') .. '<br />' if not args.content and not args[1] then -- "Please add categories to the /doc subpage." -- Don't show this message with inline docs or with an explicitly specified doc page, -- as then it is unclear where to add the categories. text = text .. (p.makeCategoriesBlurb(args, env) or '') end text = text .. ' ' .. (p.makeSubpagesBlurb(args, env) or '') --"Subpages of this template" end end local box = mw.html.create('div') -- 'documentation-metadata' box:attr('role', 'note') :addClass(message('end-box-class')) -- 'plainlinks' :addClass(message('end-box-plainlinks')) :wikitext(text) :done() return '\n' .. tostring(box) end function p.makeDocPageBlurb(args, env) --[=[ -- Makes the blurb "This documentation is transcluded from [[Template:Foo]] (edit, history)". -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'edit-link-display' --> 'edit' -- 'history-link-display' --> 'history' -- 'transcluded-from-blurb' --> -- 'The above [[Wikipedia:Template documentation|documentation]] -- is [[Help:Transclusion|transcluded]] from $1.' -- 'module-preload' --> 'Template:Documentation/preload-module-doc' -- 'create-link-display' --> 'create' -- 'create-module-doc-blurb' --> -- 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' --]=] local docTitle = env.docTitle if not docTitle then return nil end if docTitle.exists then -- /doc exists; link to it. local docLink = makeWikilink(docTitle.prefixedText) local editDisplay = message('edit-link-display') local editLink = makeWikilink("Special:EditPage/" .. docTitle.prefixedText, editDisplay) local historyDisplay = message('history-link-display') local historyLink = makeWikilink("Special:PageHistory/" .. docTitle.prefixedText, historyDisplay) return message('transcluded-from-blurb', {docLink}) .. ' ' .. makeToolbar(editLink, historyLink) .. '<br />' elseif env.subjectSpace == 828 then -- /doc does not exist; ask to create it. local createUrl = docTitle:canonicalUrl{action = 'edit', preload = message('module-preload')} local createDisplay = message('create-link-display') local createLink = makeUrlLink(createUrl, createDisplay) return message('create-module-doc-blurb', {createLink}) .. '<br />' end end function p.makeExperimentBlurb(args, env) --[[ -- Renders the text "Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- -- Messages: -- 'sandbox-link-display' --> 'sandbox' -- 'sandbox-edit-link-display' --> 'edit' -- 'compare-link-display' --> 'diff' -- 'module-sandbox-preload' --> 'Template:Documentation/preload-module-sandbox' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'sandbox-create-link-display' --> 'create' -- 'mirror-edit-summary' --> 'Create sandbox version of $1' -- 'mirror-link-display' --> 'mirror' -- 'mirror-link-preload' --> 'Template:Documentation/mirror' -- 'sandbox-link-display' --> 'sandbox' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display'--> 'edit' -- 'template-sandbox-preload' --> 'Template:Documentation/preload-sandbox' -- 'testcases-create-link-display' --> 'create' -- 'testcases-link-display' --> 'testcases' -- 'testcases-edit-link-display' --> 'edit' -- 'module-testcases-preload' --> 'Template:Documentation/preload-module-testcases' -- 'template-testcases-preload' --> 'Template:Documentation/preload-testcases' -- 'experiment-blurb-module' --> 'Editors can experiment in this module's $1 and $2 pages.' -- 'experiment-blurb-template' --> 'Editors can experiment in this template's $1 and $2 pages.' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle local sandboxTitle = env.sandboxTitle local testcasesTitle = env.testcasesTitle local templatePage = templateTitle.prefixedText if not subjectSpace or not templateTitle or not sandboxTitle or not testcasesTitle then return nil end -- Make links. local sandboxLinks, testcasesLinks if sandboxTitle.exists then local sandboxPage = sandboxTitle.prefixedText local sandboxDisplay = message('sandbox-link-display') local sandboxLink = makeWikilink(sandboxPage, sandboxDisplay) local sandboxEditDisplay = message('sandbox-edit-link-display') local sandboxEditLink = makeWikilink("Special:EditPage/" .. sandboxPage, sandboxEditDisplay) local compareUrl = env.compareUrl local compareLink if compareUrl then local compareDisplay = message('compare-link-display') compareLink = makeUrlLink(compareUrl, compareDisplay) end sandboxLinks = sandboxLink .. ' ' .. makeToolbar(sandboxEditLink, compareLink) else local sandboxPreload if subjectSpace == 828 then sandboxPreload = message('module-sandbox-preload') else sandboxPreload = message('template-sandbox-preload') end local sandboxCreateUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = sandboxPreload} local sandboxCreateDisplay = message('sandbox-create-link-display') local sandboxCreateLink = makeUrlLink(sandboxCreateUrl, sandboxCreateDisplay) local mirrorSummary = message('mirror-edit-summary', {makeWikilink(templatePage)}) local mirrorPreload = message('mirror-link-preload') local mirrorUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = mirrorPreload, summary = mirrorSummary} if subjectSpace == 828 then mirrorUrl = sandboxTitle:canonicalUrl{action = 'edit', preload = templateTitle.prefixedText, summary = mirrorSummary} end local mirrorDisplay = message('mirror-link-display') local mirrorLink = makeUrlLink(mirrorUrl, mirrorDisplay) sandboxLinks = message('sandbox-link-display') .. ' ' .. makeToolbar(sandboxCreateLink, mirrorLink) end if testcasesTitle.exists then local testcasesPage = testcasesTitle.prefixedText local testcasesDisplay = message('testcases-link-display') local testcasesLink = makeWikilink(testcasesPage, testcasesDisplay) local testcasesEditUrl = testcasesTitle:canonicalUrl{action = 'edit'} local testcasesEditDisplay = message('testcases-edit-link-display') local testcasesEditLink = makeWikilink("Special:EditPage/" .. testcasesPage, testcasesEditDisplay) -- for Modules, add testcases run link if exists if testcasesTitle.contentModel == "Scribunto" and testcasesTitle.talkPageTitle and testcasesTitle.talkPageTitle.exists then local testcasesRunLinkDisplay = message('testcases-run-link-display') local testcasesRunLink = makeWikilink(testcasesTitle.talkPageTitle.prefixedText, testcasesRunLinkDisplay) testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink, testcasesRunLink) else testcasesLinks = testcasesLink .. ' ' .. makeToolbar(testcasesEditLink) end else local testcasesPreload if subjectSpace == 828 then testcasesPreload = message('module-testcases-preload') else testcasesPreload = message('template-testcases-preload') end local testcasesCreateUrl = testcasesTitle:canonicalUrl{action = 'edit', preload = testcasesPreload} local testcasesCreateDisplay = message('testcases-create-link-display') local testcasesCreateLink = makeUrlLink(testcasesCreateUrl, testcasesCreateDisplay) testcasesLinks = message('testcases-link-display') .. ' ' .. makeToolbar(testcasesCreateLink) end local messageName if subjectSpace == 828 then messageName = 'experiment-blurb-module' else messageName = 'experiment-blurb-template' end return message(messageName, {sandboxLinks, testcasesLinks}) end function p.makeCategoriesBlurb(args, env) --[[ -- Generates the text "Please add categories to the /doc subpage." -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'doc-link-display' --> '/doc' -- 'add-categories-blurb' --> 'Please add categories to the $1 subpage.' --]] local docTitle = env.docTitle if not docTitle then return nil end local docPathLink = makeWikilink(docTitle.prefixedText, message('doc-link-display')) return message('add-categories-blurb', {docPathLink}) end function p.makeSubpagesBlurb(args, env) --[[ -- Generates the "Subpages of this template" link. -- @args - a table of arguments passed by the user -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'template-pagetype' --> 'template' -- 'module-pagetype' --> 'module' -- 'default-pagetype' --> 'page' -- 'subpages-link-display' --> 'Subpages of this $1' --]] local subjectSpace = env.subjectSpace local templateTitle = env.templateTitle if not subjectSpace or not templateTitle then return nil end local pagetype if subjectSpace == 10 then pagetype = message('template-pagetype') elseif subjectSpace == 828 then pagetype = message('module-pagetype') else pagetype = message('default-pagetype') end local subpagesLink = makeWikilink( 'Special:PrefixIndex/' .. templateTitle.prefixedText .. '/', message('subpages-link-display', {pagetype}) ) return message('subpages-blurb', {subpagesLink}) end ---------------------------------------------------------------------------- -- Tracking categories ---------------------------------------------------------------------------- function p.addTrackingCategories(env) --[[ -- Check if {{documentation}} is transcluded on a /doc or /testcases page. -- @env - environment table containing title objects, etc., generated with p.getEnvironment -- Messages: -- 'display-strange-usage-category' --> true -- 'doc-subpage' --> 'doc' -- 'testcases-subpage' --> 'testcases' -- 'strange-usage-category' --> 'Wikipedia pages with strange ((documentation)) usage' -- -- /testcases pages in the module namespace are not categorised, as they may have -- {{documentation}} transcluded automatically. --]] local title = env.title local subjectSpace = env.subjectSpace if not title or not subjectSpace then return nil end local subpage = title.subpageText if message('display-strange-usage-category', nil, 'boolean') and ( subpage == message('doc-subpage') or subjectSpace ~= 828 and subpage == message('testcases-subpage') ) then return makeCategoryLink(message('strange-usage-category')) end return '' end return p bo74oekmmsj1xtpw7dlzkvkhc0k05g6 ಟೆಂಪ್ಲೇಟು:Documentation subpage 10 2999 15575 10592 2026-07-28T15:58:21Z w>A826 0 ೧ revisions imported from [[:en:Template:Documentation_subpage]] 15575 wikitext text/x-wiki <includeonly><!-- -->{{#ifeq:{{lc:{{SUBPAGENAME}}}} |{{{override|doc}}} | <!--(this template has been transcluded on a /doc or /{{{override}}} page)--> </includeonly><!-- -->{{#ifeq:{{{doc-notice|show}}} |show | {{Mbox | type = notice | style = margin-bottom:1.0em; | image = [[File:Edit-copy green.svg|40px|alt=icon]] | text = {{strong|This is a [[Wikipedia:Template documentation|documentation subpage]]}} for {{terminate sentence|{{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}}}<br />It may contain usage information, [[Wikipedia:Categorization|categories]] and other content that is not part of the original {{#if:{{{text2|}}} |{{{text2}}} |{{#if:{{{text1|}}} |{{{text1}}} |{{#ifeq:{{SUBJECTSPACE}} |{{ns:User}} |{{lc:{{SUBJECTSPACE}}}} template page |{{#if:{{SUBJECTSPACE}} |{{lc:{{SUBJECTSPACE}}}} page|article}}}}}}}}. }} }}<!-- -->{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}<!-- --><includeonly>__EXPECTED_UNCONNECTED_PAGE__</includeonly><!-- -->{{#if:{{{nocat|}}}{{{inhibit|}}}|<!--(don't categorize)--> |<includeonly><!-- -->{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}} | [[Category:{{#switch:{{SUBJECTSPACE}} |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]] | [[Category:Documentation subpages without corresponding pages]] }}<!-- --></includeonly> }}<!-- (completing initial #ifeq: at start of template:) --><includeonly> | <!--(this template has not been transcluded on a /doc or /{{{override}}} page)--> }}<!-- --></includeonly><noinclude>{{Documentation}}</noinclude> iwz7dreef73y68fx96yxyj3ry6l1x58 15576 15575 2026-08-22T10:32:56Z A826 1864 ೧ revisions imported from [[:w:ಟೆಂಪ್ಲೇಟು:Documentation_subpage]] 15575 wikitext text/x-wiki <includeonly><!-- -->{{#ifeq:{{lc:{{SUBPAGENAME}}}} |{{{override|doc}}} | <!--(this template has been transcluded on a /doc or /{{{override}}} page)--> </includeonly><!-- -->{{#ifeq:{{{doc-notice|show}}} |show | {{Mbox | type = notice | style = margin-bottom:1.0em; | image = [[File:Edit-copy green.svg|40px|alt=icon]] | text = {{strong|This is a [[Wikipedia:Template documentation|documentation subpage]]}} for {{terminate sentence|{{{1|[[:{{SUBJECTSPACE}}:{{BASEPAGENAME}}]]}}}}}<br />It may contain usage information, [[Wikipedia:Categorization|categories]] and other content that is not part of the original {{#if:{{{text2|}}} |{{{text2}}} |{{#if:{{{text1|}}} |{{{text1}}} |{{#ifeq:{{SUBJECTSPACE}} |{{ns:User}} |{{lc:{{SUBJECTSPACE}}}} template page |{{#if:{{SUBJECTSPACE}} |{{lc:{{SUBJECTSPACE}}}} page|article}}}}}}}}. }} }}<!-- -->{{DEFAULTSORT:{{{defaultsort|{{PAGENAME}}}}}}}<!-- --><includeonly>__EXPECTED_UNCONNECTED_PAGE__</includeonly><!-- -->{{#if:{{{nocat|}}}{{{inhibit|}}}|<!--(don't categorize)--> |<includeonly><!-- -->{{#ifexist:{{NAMESPACE}}:{{BASEPAGENAME}} | [[Category:{{#switch:{{SUBJECTSPACE}} |Template=Template |Module=Module |User=User |#default=Wikipedia}} documentation pages]] | [[Category:Documentation subpages without corresponding pages]] }}<!-- --></includeonly> }}<!-- (completing initial #ifeq: at start of template:) --><includeonly> | <!--(this template has not been transcluded on a /doc or /{{{override}}} page)--> }}<!-- --></includeonly><noinclude>{{Documentation}}</noinclude> iwz7dreef73y68fx96yxyj3ry6l1x58 ಮಾಡ್ಯೂಲ್:Message box 828 3168 15569 9530 2025-10-25T04:28:08Z w>A826 0 ೧ revisions imported from [[:en:Module:Message_box]] 15569 Scribunto text/plain require('strict') local getArgs local yesno = require('Module:Yesno') local lang = mw.language.getContentLanguage() local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getTitleObject(...) -- Get the title object, passing the function through pcall -- in case we are over the expensive function count limit. local success, title = pcall(mw.title.new, ...) if success then return title end end local function union(t1, t2) -- Returns the union of two arrays. local vals = {} for i, v in ipairs(t1) do vals[v] = true end for i, v in ipairs(t2) do vals[v] = true end local ret = {} for k in pairs(vals) do table.insert(ret, k) end table.sort(ret) return ret end local function getArgNums(args, prefix) local nums = {} for k, v in pairs(args) do local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -------------------------------------------------------------------------------- -- Box class definition -------------------------------------------------------------------------------- local MessageBox = {} MessageBox.__index = MessageBox function MessageBox.new(boxType, args, cfg) args = args or {} local obj = {} -- Set the title object and the namespace. obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle() -- Set the config for our box type. obj.cfg = cfg[boxType] if not obj.cfg then local ns = obj.title.namespace -- boxType is "mbox" or invalid input if args.demospace and args.demospace ~= '' then -- implement demospace parameter of mbox local demospace = string.lower(args.demospace) if DEMOSPACES[demospace] then -- use template from DEMOSPACES obj.cfg = cfg[DEMOSPACES[demospace]] elseif string.find( demospace, 'talk' ) then -- demo as a talk page obj.cfg = cfg.tmbox else -- default to ombox obj.cfg = cfg.ombox end elseif ns == 0 then obj.cfg = cfg.ambox -- main namespace elseif ns == 6 then obj.cfg = cfg.imbox -- file namespace elseif ns == 14 then obj.cfg = cfg.cmbox -- category namespace else local nsTable = mw.site.namespaces[ns] if nsTable and nsTable.isTalk then obj.cfg = cfg.tmbox -- any talk namespace else obj.cfg = cfg.ombox -- other namespaces or invalid input end end end -- Set the arguments, and remove all blank arguments except for the ones -- listed in cfg.allowBlankParams. do local newArgs = {} for k, v in pairs(args) do if v ~= '' then newArgs[k] = v end end for i, param in ipairs(obj.cfg.allowBlankParams or {}) do newArgs[param] = args[param] end obj.args = newArgs end -- Define internal data structure. obj.categories = {} obj.classes = {} -- For lazy loading of [[Module:Category handler]]. obj.hasCategories = false return setmetatable(obj, MessageBox) end function MessageBox:addCat(ns, cat, sort) if not cat then return nil end if sort then cat = string.format('[[Category:%s|%s]]', cat, sort) else cat = string.format('[[Category:%s]]', cat) end self.hasCategories = true self.categories[ns] = self.categories[ns] or {} table.insert(self.categories[ns], cat) end function MessageBox:addClass(class) if not class then return nil end table.insert(self.classes, class) end function MessageBox:setParameters() local args = self.args local cfg = self.cfg -- Get type data. self.type = args.type local typeData = cfg.types[self.type] self.invalidTypeError = cfg.showInvalidTypeError and self.type and not typeData typeData = typeData or cfg.types[cfg.default] self.typeClass = typeData.class self.typeImage = typeData.image self.typeImageNeedsLink = typeData.imageNeedsLink -- Find if the box has been wrongly substituted. self.isSubstituted = cfg.substCheck and args.subst == 'SUBST' -- Find whether we are using a small message box. self.isSmall = cfg.allowSmall and ( cfg.smallParam and args.small == cfg.smallParam or not cfg.smallParam and yesno(args.small) ) -- Set the below row. self.below = cfg.below and args.below -- Add attributes, classes and styles. self.id = args.id self.name = args.name if self.name then self:addClass('box-' .. string.gsub(self.name,' ','_')) end if yesno(args.plainlinks) ~= false then self:addClass('plainlinks') end if self.below then self:addClass('mbox-with-below') end for _, class in ipairs(cfg.classes or {}) do self:addClass(class) end if self.isSmall then self:addClass(cfg.smallClass or 'mbox-small') end self:addClass(self.typeClass) self:addClass(args.class) self.style = args.style self.attrs = args.attrs -- Set text style. self.textstyle = args.textstyle -- Set image classes. self.imageRightClass = args.imagerightclass or args.imageclass self.imageLeftClass = args.imageleftclass or args.imageclass -- Find if we are on the template page or not. This functionality is only -- used if useCollapsibleTextFields is set, or if both cfg.templateCategory -- and cfg.templateCategoryRequireName are set. self.useCollapsibleTextFields = cfg.useCollapsibleTextFields if self.useCollapsibleTextFields or cfg.templateCategory and cfg.templateCategoryRequireName then if self.name then local templateName = mw.ustring.match( self.name, '^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$' ) or self.name templateName = 'Template:' .. templateName self.templateTitle = getTitleObject(templateName) end self.isTemplatePage = self.templateTitle and mw.title.equals(self.title, self.templateTitle) end -- Process data for collapsible text fields. At the moment these are only -- used in {{ambox}}. if self.useCollapsibleTextFields then -- Get the self.issue value. if self.isSmall and args.smalltext then self.issue = args.smalltext else 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 issue = type(issue) == 'string' and issue ~= '' and issue or nil local text = args.text text = type(text) == 'string' and text or nil local issues = {} table.insert(issues, sect) table.insert(issues, issue) table.insert(issues, text) self.issue = table.concat(issues, ' ') end -- Get the self.talk value. local talk = args.talk -- Show talk links on the template page or template subpages if the talk -- parameter is blank. if talk == '' and self.templateTitle and ( mw.title.equals(self.templateTitle, self.title) or self.title:isSubpageOf(self.templateTitle) ) then talk = '#' elseif talk == '' then talk = nil end if talk then -- If the talk value is a talk page, make a link to that page. Else -- assume that it's a section heading, and make a link to the talk -- page of the current page with that section heading. local talkTitle = getTitleObject(talk) local talkArgIsTalkPage = true if not talkTitle or not talkTitle.isTalkPage then talkArgIsTalkPage = false talkTitle = getTitleObject( self.title.text, mw.site.namespaces[self.title.namespace].talk.id ) end if talkTitle and talkTitle.exists then local talkText if self.isSmall then local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. (talk == '#' and '' or '#') .. talk) talkText = string.format('([[%s|talk]])', talkLink) else talkText = 'Relevant discussion may be found on' if talkArgIsTalkPage then talkText = string.format( '%s [[%s|%s]].', talkText, talk, talkTitle.prefixedText ) else talkText = string.format( '%s the [[%s' .. (talk == '#' and '' or '#') .. '%s|talk page]].', talkText, talkTitle.prefixedText, talk ) end end self.talk = talkText end end -- Get other values. self.fix = args.fix ~= '' and args.fix or nil local date if args.date and args.date ~= '' then date = args.date elseif args.date == '' and self.isTemplatePage then date = lang:formatDate('F Y') end if date then self.date = string.format(" <span class='date-container'><i>(<span class='date'>%s</span>)</i></span>", date) end self.info = args.info if yesno(args.removalnotice) then self.removalNotice = cfg.removalNotice end end -- Set the non-collapsible text field. At the moment this is used by all box -- types other than ambox, and also by ambox when small=yes. if self.isSmall then self.text = args.smalltext or args.text else self.text = args.text end -- General image settings. self.imageCellDiv = not self.isSmall and cfg.imageCellDiv self.imageEmptyCell = cfg.imageEmptyCell -- Left image settings. local imageLeft = self.isSmall and args.smallimage or args.image if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none' or not cfg.imageCheckBlank and imageLeft ~= 'none' then self.imageLeft = imageLeft if not imageLeft then local imageSize = self.isSmall and (cfg.imageSmallSize or '30x30px') or '40x40px' self.imageLeft = string.format('[[File:%s|%s%s|alt=]]', self.typeImage or 'Information icon4.svg', imageSize, self.typeImageNeedsLink and "" or "|link=" ) end end -- Right image settings. local imageRight = self.isSmall and args.smallimageright or args.imageright if not (cfg.imageRightNone and imageRight == 'none') then self.imageRight = imageRight end -- set templatestyles self.base_templatestyles = cfg.templatestyles self.templatestyles = args.templatestyles end function MessageBox:setMainspaceCategories() local args = self.args local cfg = self.cfg if not cfg.allowMainspaceCategories then return nil end local nums = {} for _, prefix in ipairs{'cat', 'category', 'all'} do args[prefix .. '1'] = args[prefix] nums = union(nums, getArgNums(args, prefix)) end -- The following is roughly equivalent to the old {{Ambox/category}}. local date = args.date date = type(date) == 'string' and date local preposition = 'from' for _, num in ipairs(nums) do local mainCat = args['cat' .. tostring(num)] or args['category' .. tostring(num)] local allCat = args['all' .. tostring(num)] mainCat = type(mainCat) == 'string' and mainCat allCat = type(allCat) == 'string' and allCat if mainCat and date and date ~= '' then local catTitle = string.format('%s %s %s', mainCat, preposition, 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 self:addCat(0, mainCat) end if allCat then self:addCat(0, allCat) end end end function MessageBox:setTemplateCategories() local args = self.args local cfg = self.cfg -- Add template categories. if cfg.templateCategory then if cfg.templateCategoryRequireName then if self.isTemplatePage then self:addCat(10, cfg.templateCategory) end elseif not self.title.isSubpage then self:addCat(10, cfg.templateCategory) end end -- Add template error categories. if cfg.templateErrorCategory then local templateErrorCategory = cfg.templateErrorCategory local templateCat, templateSort if not self.name and not self.title.isSubpage then templateCat = templateErrorCategory elseif self.isTemplatePage then local paramsToCheck = cfg.templateErrorParamsToCheck or {} local count = 0 for i, param in ipairs(paramsToCheck) do if not args[param] then count = count + 1 end end if count > 0 then templateCat = templateErrorCategory templateSort = tostring(count) end if self.categoryNums and #self.categoryNums > 0 then templateCat = templateErrorCategory templateSort = 'C' end end self:addCat(10, templateCat, templateSort) end end function MessageBox:setAllNamespaceCategories() -- Set categories for all namespaces. if self.invalidTypeError then local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort) end if self.isSubstituted then self:addCat('all', 'Pages with incorrectly substituted templates') end end function MessageBox:setCategories() if self.title.namespace == 0 then self:setMainspaceCategories() elseif self.title.namespace == 10 then self:setTemplateCategories() end self:setAllNamespaceCategories() end function MessageBox:renderCategories() if not self.hasCategories then -- No categories added, no need to pass them to Category handler so, -- if it was invoked, it would return the empty string. -- So we shortcut and return the empty string. return "" end -- Convert category tables to strings and pass them through -- [[Module:Category handler]]. return require('Module:Category handler')._main{ main = table.concat(self.categories[0] or {}), template = table.concat(self.categories[10] or {}), all = table.concat(self.categories.all or {}), nocat = self.args.nocat, page = self.args.page } end function MessageBox:exportDiv() local root = mw.html.create() -- Add the subst check error. if self.isSubstituted and self.name then root:tag('b') :addClass('error') :wikitext(string.format( 'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.', mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}') )) end local frame = mw.getCurrentFrame() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.base_templatestyles }, }) -- Add support for a single custom templatestyles sheet. Undocumented as -- need should be limited and many templates using mbox are substed; we -- don't want to spread templatestyles sheets around to arbitrary places if self.templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.templatestyles }, }) end -- Create the box. local mbox = root:tag('div') mbox:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do mbox:addClass(class or nil) end mbox :cssText(self.style or nil) if self.attrs then mbox:attr(self.attrs) end local flex_container if self.below then -- we need to wrap the flex components (`image(right)` and `text`) in their -- own container div to support the `below` parameter flex_container = mw.html.create('div') flex_container:addClass('mbox-flex') else -- the mbox itself is the parent, so we need no HTML flex_container flex_container = mw.html.create() end -- Add the left-hand image. if self.imageLeft then local imageLeftCell = flex_container:tag('div'):addClass('mbox-image') imageLeftCell :addClass(self.imageLeftClass) :wikitext(self.imageLeft or nil) end -- Add the text. local textCell = flex_container:tag('div'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end if self.removalNotice then textCellDiv:tag('span') :addClass('hide-when-compact') :tag('i') :wikitext(string.format(" (%s)", self.removalNotice)) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = flex_container:tag('div'):addClass('mbox-imageright') imageRightCell :addClass(self.imageRightClass) :wikitext(self.imageRight or nil) end mbox:node(flex_container) -- Add the below row. if self.below then mbox:tag('div') :addClass('mbox-text mbox-below') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :addClass('mbox-invalid-type') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end function MessageBox:export() local root = mw.html.create() -- Add the subst check error. if self.isSubstituted and self.name then root:tag('b') :addClass('error') :wikitext(string.format( 'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.', mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}') )) end local frame = mw.getCurrentFrame() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.base_templatestyles }, }) -- Add support for a single custom templatestyles sheet. Undocumented as -- need should be limited and many templates using mbox are substed; we -- don't want to spread templatestyles sheets around to arbitrary places if self.templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.templatestyles }, }) end -- Create the box table. local boxTable = root:tag('table') boxTable:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do boxTable:addClass(class or nil) end boxTable :cssText(self.style or nil) :attr('role', 'presentation') if self.attrs then boxTable:attr(self.attrs) end -- Add the left-hand image. local row = boxTable:tag('tr') if self.imageLeft then local imageLeftCell = row:tag('td'):addClass('mbox-image') if self.imageCellDiv then -- If we are using a div, redefine imageLeftCell so that the image -- is inside it. Divs use style="width: 52px;", which limits the -- image width to 52px. If any images in a div are wider than that, -- they may overlap with the text or cause other display problems. imageLeftCell = imageLeftCell:tag('div'):addClass('mbox-image-div') end imageLeftCell :addClass(self.imageLeftClass) :wikitext(self.imageLeft or nil) elseif self.imageEmptyCell then -- Some message boxes define an empty cell if no image is specified, and -- some don't. The old template code in templates where empty cells are -- specified gives the following hint: "No image. Cell with some width -- or padding necessary for text cell to have 100% width." row:tag('td') :addClass('mbox-empty-cell') end -- Add the text. local textCell = row:tag('td'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end if self.removalNotice then textCellDiv:tag('span') :addClass('hide-when-compact') :tag('i') :wikitext(string.format(" (%s)", self.removalNotice)) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = row:tag('td'):addClass('mbox-imageright') if self.imageCellDiv then -- If we are using a div, redefine imageRightCell so that the image -- is inside it. imageRightCell = imageRightCell:tag('div'):addClass('mbox-image-div') end imageRightCell :addClass(self.imageRightClass) :wikitext(self.imageRight or nil) end -- Add the below row. if self.below then boxTable:tag('tr') :tag('td') :attr('colspan', self.imageRight and '3' or '2') :addClass('mbox-text') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :addClass('mbox-invalid-type') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p, mt = {}, {} function p._exportClasses() -- For testing. return { MessageBox = MessageBox } end function p.main(boxType, args, cfgTables) local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE)) box:setParameters() box:setCategories() -- DIV MIGRATION CONDITIONAL if box.cfg.div_structure then return box:exportDiv() end -- END DIV MIGRATION CONDITIONAL return box:export() end function mt.__index(t, k) return function (frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return t.main(k, getArgs(frame, {trim = false, removeBlanks = false})) end end return setmetatable(p, mt) ocboyo877qnpqum2b9fyiquh72vukqa 15570 15569 2026-08-22T10:32:55Z A826 1864 ೧ revisions imported from [[:w:ಮಾಡ್ಯೂಲ್:Message_box]] 15569 Scribunto text/plain require('strict') local getArgs local yesno = require('Module:Yesno') local lang = mw.language.getContentLanguage() local CONFIG_MODULE = 'Module:Message box/configuration' local DEMOSPACES = {talk = 'tmbox', image = 'imbox', file = 'imbox', category = 'cmbox', article = 'ambox', main = 'ambox'} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function getTitleObject(...) -- Get the title object, passing the function through pcall -- in case we are over the expensive function count limit. local success, title = pcall(mw.title.new, ...) if success then return title end end local function union(t1, t2) -- Returns the union of two arrays. local vals = {} for i, v in ipairs(t1) do vals[v] = true end for i, v in ipairs(t2) do vals[v] = true end local ret = {} for k in pairs(vals) do table.insert(ret, k) end table.sort(ret) return ret end local function getArgNums(args, prefix) local nums = {} for k, v in pairs(args) do local num = mw.ustring.match(tostring(k), '^' .. prefix .. '([1-9]%d*)$') if num then table.insert(nums, tonumber(num)) end end table.sort(nums) return nums end -------------------------------------------------------------------------------- -- Box class definition -------------------------------------------------------------------------------- local MessageBox = {} MessageBox.__index = MessageBox function MessageBox.new(boxType, args, cfg) args = args or {} local obj = {} -- Set the title object and the namespace. obj.title = getTitleObject(args.page) or mw.title.getCurrentTitle() -- Set the config for our box type. obj.cfg = cfg[boxType] if not obj.cfg then local ns = obj.title.namespace -- boxType is "mbox" or invalid input if args.demospace and args.demospace ~= '' then -- implement demospace parameter of mbox local demospace = string.lower(args.demospace) if DEMOSPACES[demospace] then -- use template from DEMOSPACES obj.cfg = cfg[DEMOSPACES[demospace]] elseif string.find( demospace, 'talk' ) then -- demo as a talk page obj.cfg = cfg.tmbox else -- default to ombox obj.cfg = cfg.ombox end elseif ns == 0 then obj.cfg = cfg.ambox -- main namespace elseif ns == 6 then obj.cfg = cfg.imbox -- file namespace elseif ns == 14 then obj.cfg = cfg.cmbox -- category namespace else local nsTable = mw.site.namespaces[ns] if nsTable and nsTable.isTalk then obj.cfg = cfg.tmbox -- any talk namespace else obj.cfg = cfg.ombox -- other namespaces or invalid input end end end -- Set the arguments, and remove all blank arguments except for the ones -- listed in cfg.allowBlankParams. do local newArgs = {} for k, v in pairs(args) do if v ~= '' then newArgs[k] = v end end for i, param in ipairs(obj.cfg.allowBlankParams or {}) do newArgs[param] = args[param] end obj.args = newArgs end -- Define internal data structure. obj.categories = {} obj.classes = {} -- For lazy loading of [[Module:Category handler]]. obj.hasCategories = false return setmetatable(obj, MessageBox) end function MessageBox:addCat(ns, cat, sort) if not cat then return nil end if sort then cat = string.format('[[Category:%s|%s]]', cat, sort) else cat = string.format('[[Category:%s]]', cat) end self.hasCategories = true self.categories[ns] = self.categories[ns] or {} table.insert(self.categories[ns], cat) end function MessageBox:addClass(class) if not class then return nil end table.insert(self.classes, class) end function MessageBox:setParameters() local args = self.args local cfg = self.cfg -- Get type data. self.type = args.type local typeData = cfg.types[self.type] self.invalidTypeError = cfg.showInvalidTypeError and self.type and not typeData typeData = typeData or cfg.types[cfg.default] self.typeClass = typeData.class self.typeImage = typeData.image self.typeImageNeedsLink = typeData.imageNeedsLink -- Find if the box has been wrongly substituted. self.isSubstituted = cfg.substCheck and args.subst == 'SUBST' -- Find whether we are using a small message box. self.isSmall = cfg.allowSmall and ( cfg.smallParam and args.small == cfg.smallParam or not cfg.smallParam and yesno(args.small) ) -- Set the below row. self.below = cfg.below and args.below -- Add attributes, classes and styles. self.id = args.id self.name = args.name if self.name then self:addClass('box-' .. string.gsub(self.name,' ','_')) end if yesno(args.plainlinks) ~= false then self:addClass('plainlinks') end if self.below then self:addClass('mbox-with-below') end for _, class in ipairs(cfg.classes or {}) do self:addClass(class) end if self.isSmall then self:addClass(cfg.smallClass or 'mbox-small') end self:addClass(self.typeClass) self:addClass(args.class) self.style = args.style self.attrs = args.attrs -- Set text style. self.textstyle = args.textstyle -- Set image classes. self.imageRightClass = args.imagerightclass or args.imageclass self.imageLeftClass = args.imageleftclass or args.imageclass -- Find if we are on the template page or not. This functionality is only -- used if useCollapsibleTextFields is set, or if both cfg.templateCategory -- and cfg.templateCategoryRequireName are set. self.useCollapsibleTextFields = cfg.useCollapsibleTextFields if self.useCollapsibleTextFields or cfg.templateCategory and cfg.templateCategoryRequireName then if self.name then local templateName = mw.ustring.match( self.name, '^[tT][eE][mM][pP][lL][aA][tT][eE][%s_]*:[%s_]*(.*)$' ) or self.name templateName = 'Template:' .. templateName self.templateTitle = getTitleObject(templateName) end self.isTemplatePage = self.templateTitle and mw.title.equals(self.title, self.templateTitle) end -- Process data for collapsible text fields. At the moment these are only -- used in {{ambox}}. if self.useCollapsibleTextFields then -- Get the self.issue value. if self.isSmall and args.smalltext then self.issue = args.smalltext else 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 issue = type(issue) == 'string' and issue ~= '' and issue or nil local text = args.text text = type(text) == 'string' and text or nil local issues = {} table.insert(issues, sect) table.insert(issues, issue) table.insert(issues, text) self.issue = table.concat(issues, ' ') end -- Get the self.talk value. local talk = args.talk -- Show talk links on the template page or template subpages if the talk -- parameter is blank. if talk == '' and self.templateTitle and ( mw.title.equals(self.templateTitle, self.title) or self.title:isSubpageOf(self.templateTitle) ) then talk = '#' elseif talk == '' then talk = nil end if talk then -- If the talk value is a talk page, make a link to that page. Else -- assume that it's a section heading, and make a link to the talk -- page of the current page with that section heading. local talkTitle = getTitleObject(talk) local talkArgIsTalkPage = true if not talkTitle or not talkTitle.isTalkPage then talkArgIsTalkPage = false talkTitle = getTitleObject( self.title.text, mw.site.namespaces[self.title.namespace].talk.id ) end if talkTitle and talkTitle.exists then local talkText if self.isSmall then local talkLink = talkArgIsTalkPage and talk or (talkTitle.prefixedText .. (talk == '#' and '' or '#') .. talk) talkText = string.format('([[%s|talk]])', talkLink) else talkText = 'Relevant discussion may be found on' if talkArgIsTalkPage then talkText = string.format( '%s [[%s|%s]].', talkText, talk, talkTitle.prefixedText ) else talkText = string.format( '%s the [[%s' .. (talk == '#' and '' or '#') .. '%s|talk page]].', talkText, talkTitle.prefixedText, talk ) end end self.talk = talkText end end -- Get other values. self.fix = args.fix ~= '' and args.fix or nil local date if args.date and args.date ~= '' then date = args.date elseif args.date == '' and self.isTemplatePage then date = lang:formatDate('F Y') end if date then self.date = string.format(" <span class='date-container'><i>(<span class='date'>%s</span>)</i></span>", date) end self.info = args.info if yesno(args.removalnotice) then self.removalNotice = cfg.removalNotice end end -- Set the non-collapsible text field. At the moment this is used by all box -- types other than ambox, and also by ambox when small=yes. if self.isSmall then self.text = args.smalltext or args.text else self.text = args.text end -- General image settings. self.imageCellDiv = not self.isSmall and cfg.imageCellDiv self.imageEmptyCell = cfg.imageEmptyCell -- Left image settings. local imageLeft = self.isSmall and args.smallimage or args.image if cfg.imageCheckBlank and imageLeft ~= 'blank' and imageLeft ~= 'none' or not cfg.imageCheckBlank and imageLeft ~= 'none' then self.imageLeft = imageLeft if not imageLeft then local imageSize = self.isSmall and (cfg.imageSmallSize or '30x30px') or '40x40px' self.imageLeft = string.format('[[File:%s|%s%s|alt=]]', self.typeImage or 'Information icon4.svg', imageSize, self.typeImageNeedsLink and "" or "|link=" ) end end -- Right image settings. local imageRight = self.isSmall and args.smallimageright or args.imageright if not (cfg.imageRightNone and imageRight == 'none') then self.imageRight = imageRight end -- set templatestyles self.base_templatestyles = cfg.templatestyles self.templatestyles = args.templatestyles end function MessageBox:setMainspaceCategories() local args = self.args local cfg = self.cfg if not cfg.allowMainspaceCategories then return nil end local nums = {} for _, prefix in ipairs{'cat', 'category', 'all'} do args[prefix .. '1'] = args[prefix] nums = union(nums, getArgNums(args, prefix)) end -- The following is roughly equivalent to the old {{Ambox/category}}. local date = args.date date = type(date) == 'string' and date local preposition = 'from' for _, num in ipairs(nums) do local mainCat = args['cat' .. tostring(num)] or args['category' .. tostring(num)] local allCat = args['all' .. tostring(num)] mainCat = type(mainCat) == 'string' and mainCat allCat = type(allCat) == 'string' and allCat if mainCat and date and date ~= '' then local catTitle = string.format('%s %s %s', mainCat, preposition, 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 self:addCat(0, mainCat) end if allCat then self:addCat(0, allCat) end end end function MessageBox:setTemplateCategories() local args = self.args local cfg = self.cfg -- Add template categories. if cfg.templateCategory then if cfg.templateCategoryRequireName then if self.isTemplatePage then self:addCat(10, cfg.templateCategory) end elseif not self.title.isSubpage then self:addCat(10, cfg.templateCategory) end end -- Add template error categories. if cfg.templateErrorCategory then local templateErrorCategory = cfg.templateErrorCategory local templateCat, templateSort if not self.name and not self.title.isSubpage then templateCat = templateErrorCategory elseif self.isTemplatePage then local paramsToCheck = cfg.templateErrorParamsToCheck or {} local count = 0 for i, param in ipairs(paramsToCheck) do if not args[param] then count = count + 1 end end if count > 0 then templateCat = templateErrorCategory templateSort = tostring(count) end if self.categoryNums and #self.categoryNums > 0 then templateCat = templateErrorCategory templateSort = 'C' end end self:addCat(10, templateCat, templateSort) end end function MessageBox:setAllNamespaceCategories() -- Set categories for all namespaces. if self.invalidTypeError then local allSort = (self.title.namespace == 0 and 'Main:' or '') .. self.title.prefixedText self:addCat('all', 'Wikipedia message box parameter needs fixing', allSort) end if self.isSubstituted then self:addCat('all', 'Pages with incorrectly substituted templates') end end function MessageBox:setCategories() if self.title.namespace == 0 then self:setMainspaceCategories() elseif self.title.namespace == 10 then self:setTemplateCategories() end self:setAllNamespaceCategories() end function MessageBox:renderCategories() if not self.hasCategories then -- No categories added, no need to pass them to Category handler so, -- if it was invoked, it would return the empty string. -- So we shortcut and return the empty string. return "" end -- Convert category tables to strings and pass them through -- [[Module:Category handler]]. return require('Module:Category handler')._main{ main = table.concat(self.categories[0] or {}), template = table.concat(self.categories[10] or {}), all = table.concat(self.categories.all or {}), nocat = self.args.nocat, page = self.args.page } end function MessageBox:exportDiv() local root = mw.html.create() -- Add the subst check error. if self.isSubstituted and self.name then root:tag('b') :addClass('error') :wikitext(string.format( 'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.', mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}') )) end local frame = mw.getCurrentFrame() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.base_templatestyles }, }) -- Add support for a single custom templatestyles sheet. Undocumented as -- need should be limited and many templates using mbox are substed; we -- don't want to spread templatestyles sheets around to arbitrary places if self.templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.templatestyles }, }) end -- Create the box. local mbox = root:tag('div') mbox:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do mbox:addClass(class or nil) end mbox :cssText(self.style or nil) if self.attrs then mbox:attr(self.attrs) end local flex_container if self.below then -- we need to wrap the flex components (`image(right)` and `text`) in their -- own container div to support the `below` parameter flex_container = mw.html.create('div') flex_container:addClass('mbox-flex') else -- the mbox itself is the parent, so we need no HTML flex_container flex_container = mw.html.create() end -- Add the left-hand image. if self.imageLeft then local imageLeftCell = flex_container:tag('div'):addClass('mbox-image') imageLeftCell :addClass(self.imageLeftClass) :wikitext(self.imageLeft or nil) end -- Add the text. local textCell = flex_container:tag('div'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end if self.removalNotice then textCellDiv:tag('span') :addClass('hide-when-compact') :tag('i') :wikitext(string.format(" (%s)", self.removalNotice)) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = flex_container:tag('div'):addClass('mbox-imageright') imageRightCell :addClass(self.imageRightClass) :wikitext(self.imageRight or nil) end mbox:node(flex_container) -- Add the below row. if self.below then mbox:tag('div') :addClass('mbox-text mbox-below') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :addClass('mbox-invalid-type') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end function MessageBox:export() local root = mw.html.create() -- Add the subst check error. if self.isSubstituted and self.name then root:tag('b') :addClass('error') :wikitext(string.format( 'Template <code>%s[[Template:%s|%s]]%s</code> has been incorrectly substituted.', mw.text.nowiki('{{'), self.name, self.name, mw.text.nowiki('}}') )) end local frame = mw.getCurrentFrame() root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.base_templatestyles }, }) -- Add support for a single custom templatestyles sheet. Undocumented as -- need should be limited and many templates using mbox are substed; we -- don't want to spread templatestyles sheets around to arbitrary places if self.templatestyles then root:wikitext(frame:extensionTag{ name = 'templatestyles', args = { src = self.templatestyles }, }) end -- Create the box table. local boxTable = root:tag('table') boxTable:attr('id', self.id or nil) for i, class in ipairs(self.classes or {}) do boxTable:addClass(class or nil) end boxTable :cssText(self.style or nil) :attr('role', 'presentation') if self.attrs then boxTable:attr(self.attrs) end -- Add the left-hand image. local row = boxTable:tag('tr') if self.imageLeft then local imageLeftCell = row:tag('td'):addClass('mbox-image') if self.imageCellDiv then -- If we are using a div, redefine imageLeftCell so that the image -- is inside it. Divs use style="width: 52px;", which limits the -- image width to 52px. If any images in a div are wider than that, -- they may overlap with the text or cause other display problems. imageLeftCell = imageLeftCell:tag('div'):addClass('mbox-image-div') end imageLeftCell :addClass(self.imageLeftClass) :wikitext(self.imageLeft or nil) elseif self.imageEmptyCell then -- Some message boxes define an empty cell if no image is specified, and -- some don't. The old template code in templates where empty cells are -- specified gives the following hint: "No image. Cell with some width -- or padding necessary for text cell to have 100% width." row:tag('td') :addClass('mbox-empty-cell') end -- Add the text. local textCell = row:tag('td'):addClass('mbox-text') if self.useCollapsibleTextFields then -- The message box uses advanced text parameters that allow things to be -- collapsible. At the moment, only ambox uses this. textCell:cssText(self.textstyle or nil) local textCellDiv = textCell:tag('div') textCellDiv :addClass('mbox-text-span') :wikitext(self.issue or nil) if (self.talk or self.fix) then textCellDiv:tag('span') :addClass('hide-when-compact') :wikitext(self.talk and (' ' .. self.talk) or nil) :wikitext(self.fix and (' ' .. self.fix) or nil) end textCellDiv:wikitext(self.date and (' ' .. self.date) or nil) if self.info and not self.isSmall then textCellDiv :tag('span') :addClass('hide-when-compact') :wikitext(self.info and (' ' .. self.info) or nil) end if self.removalNotice then textCellDiv:tag('span') :addClass('hide-when-compact') :tag('i') :wikitext(string.format(" (%s)", self.removalNotice)) end else -- Default text formatting - anything goes. textCell :cssText(self.textstyle or nil) :wikitext(self.text or nil) end -- Add the right-hand image. if self.imageRight then local imageRightCell = row:tag('td'):addClass('mbox-imageright') if self.imageCellDiv then -- If we are using a div, redefine imageRightCell so that the image -- is inside it. imageRightCell = imageRightCell:tag('div'):addClass('mbox-image-div') end imageRightCell :addClass(self.imageRightClass) :wikitext(self.imageRight or nil) end -- Add the below row. if self.below then boxTable:tag('tr') :tag('td') :attr('colspan', self.imageRight and '3' or '2') :addClass('mbox-text') :cssText(self.textstyle or nil) :wikitext(self.below or nil) end -- Add error message for invalid type parameters. if self.invalidTypeError then root:tag('div') :addClass('mbox-invalid-type') :wikitext(string.format( 'This message box is using an invalid "type=%s" parameter and needs fixing.', self.type or '' )) end -- Add categories. root:wikitext(self:renderCategories() or nil) return tostring(root) end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p, mt = {}, {} function p._exportClasses() -- For testing. return { MessageBox = MessageBox } end function p.main(boxType, args, cfgTables) local box = MessageBox.new(boxType, args, cfgTables or mw.loadData(CONFIG_MODULE)) box:setParameters() box:setCategories() -- DIV MIGRATION CONDITIONAL if box.cfg.div_structure then return box:exportDiv() end -- END DIV MIGRATION CONDITIONAL return box:export() end function mt.__index(t, k) return function (frame) if not getArgs then getArgs = require('Module:Arguments').getArgs end return t.main(k, getArgs(frame, {trim = false, removeBlanks = false})) end end return setmetatable(p, mt) ocboyo877qnpqum2b9fyiquh72vukqa ಮಾಡ್ಯೂಲ್:Message box/configuration 828 3169 15571 9532 2025-10-25T04:28:08Z w>A826 0 ೧ revisions imported from [[:en:Module:Message_box/configuration]] 15571 Scribunto text/plain -------------------------------------------------------------------------------- -- Message box configuration -- -- -- -- This module contains configuration data for [[Module:Message box]]. -- -------------------------------------------------------------------------------- return { ambox = { types = { speedy = { class = 'ambox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ambox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ambox-content', image = 'Ambox important.svg' }, style = { class = 'ambox-style', image = 'Edit-clear.svg' }, move = { class = 'ambox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ambox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ambox-notice', image = 'Information icon4.svg' } }, default = 'notice', allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'}, allowSmall = true, smallParam = 'left', smallClass = 'mbox-small-left', substCheck = true, classes = {'metadata', 'ambox'}, imageEmptyCell = true, imageCheckBlank = true, imageSmallSize = '20x20px', imageCellDiv = true, useCollapsibleTextFields = true, imageRightNone = true, sectionDefault = 'article', allowMainspaceCategories = true, templateCategory = 'Article message templates', templateCategoryRequireName = true, templateErrorCategory = 'Article message templates with missing parameters', templateErrorParamsToCheck = {'issue', 'fix', 'subst'}, removalNotice = '<small>[[Help:Maintenance template removal|Learn how and when to remove this message]]</small>', templatestyles = 'Module:Message box/ambox.css' }, cmbox = { types = { speedy = { class = 'cmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'cmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'cmbox-content', image = 'Ambox important.svg' }, style = { class = 'cmbox-style', image = 'Edit-clear.svg' }, move = { class = 'cmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'cmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'cmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'cmbox'}, imageEmptyCell = true, templatestyles = 'Module:Message box/cmbox.css', div_structure = true, }, fmbox = { types = { warning = { class = 'fmbox-warning', image = 'Ambox warning pn.svg' }, editnotice = { class = 'fmbox-editnotice', image = 'Information icon4.svg' }, system = { class = 'fmbox-system', image = 'Information icon4.svg' } }, default = 'system', showInvalidTypeError = true, classes = {'fmbox'}, imageEmptyCell = false, imageRightNone = false, templatestyles = 'Module:Message box/fmbox.css', div_structure = true, }, imbox = { types = { speedy = { class = 'imbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'imbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'imbox-content', image = 'Ambox important.svg' }, style = { class = 'imbox-style', image = 'Edit-clear.svg' }, move = { class = 'imbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'imbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, license = { class = 'imbox-license licensetpl', image = 'Imbox-license.svg' }, ["license-related"] = { class = 'imbox-license', image = 'Imbox-license.svg' }, featured = { class = 'imbox-featured', image = 'Cscr-featured.svg', imageNeedsLink = true }, notice = { class = 'imbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'imbox'}, imageEmptyCell = true, below = true, templateCategory = 'File message boxes', templatestyles = 'Module:Message box/imbox.css', div_structure = true, }, ombox = { types = { speedy = { class = 'ombox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ombox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ombox-content', image = 'Ambox important.svg' }, style = { class = 'ombox-style', image = 'Edit-clear.svg' }, move = { class = 'ombox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ombox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ombox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'ombox'}, allowSmall = true, imageEmptyCell = true, imageRightNone = true, templatestyles = 'Module:Message box/ombox.css' }, tmbox = { types = { speedy = { class = 'tmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'tmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'tmbox-content', image = 'Ambox important.svg' }, style = { class = 'tmbox-style', image = 'Edit-clear.svg' }, move = { class = 'tmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'tmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'tmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'tmbox'}, allowSmall = true, imageRightNone = true, imageEmptyCell = true, templateCategory = 'Talk message boxes', templatestyles = 'Module:Message box/tmbox.css' } } p36hrbxjy99m7clj64lhlint2en3bo0 15572 15571 2026-08-22T10:32:55Z A826 1864 ೧ revisions imported from [[:w:ಮಾಡ್ಯೂಲ್:Message_box/configuration]] 15571 Scribunto text/plain -------------------------------------------------------------------------------- -- Message box configuration -- -- -- -- This module contains configuration data for [[Module:Message box]]. -- -------------------------------------------------------------------------------- return { ambox = { types = { speedy = { class = 'ambox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ambox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ambox-content', image = 'Ambox important.svg' }, style = { class = 'ambox-style', image = 'Edit-clear.svg' }, move = { class = 'ambox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ambox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ambox-notice', image = 'Information icon4.svg' } }, default = 'notice', allowBlankParams = {'talk', 'sect', 'date', 'issue', 'fix', 'subst', 'hidden'}, allowSmall = true, smallParam = 'left', smallClass = 'mbox-small-left', substCheck = true, classes = {'metadata', 'ambox'}, imageEmptyCell = true, imageCheckBlank = true, imageSmallSize = '20x20px', imageCellDiv = true, useCollapsibleTextFields = true, imageRightNone = true, sectionDefault = 'article', allowMainspaceCategories = true, templateCategory = 'Article message templates', templateCategoryRequireName = true, templateErrorCategory = 'Article message templates with missing parameters', templateErrorParamsToCheck = {'issue', 'fix', 'subst'}, removalNotice = '<small>[[Help:Maintenance template removal|Learn how and when to remove this message]]</small>', templatestyles = 'Module:Message box/ambox.css' }, cmbox = { types = { speedy = { class = 'cmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'cmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'cmbox-content', image = 'Ambox important.svg' }, style = { class = 'cmbox-style', image = 'Edit-clear.svg' }, move = { class = 'cmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'cmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'cmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'cmbox'}, imageEmptyCell = true, templatestyles = 'Module:Message box/cmbox.css', div_structure = true, }, fmbox = { types = { warning = { class = 'fmbox-warning', image = 'Ambox warning pn.svg' }, editnotice = { class = 'fmbox-editnotice', image = 'Information icon4.svg' }, system = { class = 'fmbox-system', image = 'Information icon4.svg' } }, default = 'system', showInvalidTypeError = true, classes = {'fmbox'}, imageEmptyCell = false, imageRightNone = false, templatestyles = 'Module:Message box/fmbox.css', div_structure = true, }, imbox = { types = { speedy = { class = 'imbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'imbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'imbox-content', image = 'Ambox important.svg' }, style = { class = 'imbox-style', image = 'Edit-clear.svg' }, move = { class = 'imbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'imbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, license = { class = 'imbox-license licensetpl', image = 'Imbox-license.svg' }, ["license-related"] = { class = 'imbox-license', image = 'Imbox-license.svg' }, featured = { class = 'imbox-featured', image = 'Cscr-featured.svg', imageNeedsLink = true }, notice = { class = 'imbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'imbox'}, imageEmptyCell = true, below = true, templateCategory = 'File message boxes', templatestyles = 'Module:Message box/imbox.css', div_structure = true, }, ombox = { types = { speedy = { class = 'ombox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'ombox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'ombox-content', image = 'Ambox important.svg' }, style = { class = 'ombox-style', image = 'Edit-clear.svg' }, move = { class = 'ombox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'ombox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'ombox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'ombox'}, allowSmall = true, imageEmptyCell = true, imageRightNone = true, templatestyles = 'Module:Message box/ombox.css' }, tmbox = { types = { speedy = { class = 'tmbox-speedy', image = 'Ambox warning pn.svg' }, delete = { class = 'tmbox-delete', image = 'Ambox warning pn.svg' }, content = { class = 'tmbox-content', image = 'Ambox important.svg' }, style = { class = 'tmbox-style', image = 'Edit-clear.svg' }, move = { class = 'tmbox-move', image = 'Merge-split-transwiki default.svg' }, protection = { class = 'tmbox-protection', image = 'Semi-protection-shackle-keyhole.svg' }, notice = { class = 'tmbox-notice', image = 'Information icon4.svg' } }, default = 'notice', showInvalidTypeError = true, classes = {'tmbox'}, allowSmall = true, imageRightNone = true, imageEmptyCell = true, templateCategory = 'Talk message boxes', templatestyles = 'Module:Message box/tmbox.css' } } p36hrbxjy99m7clj64lhlint2en3bo0 ಮಾಡ್ಯೂಲ್:Message box/ombox.css 828 3182 15585 9556 2025-10-02T12:41:24Z w>A826 0 ೧ revisions imported from [[:en:Module:Message_box/ombox.css]] 15585 sanitized-css text/css /* {{pp|small=y}} */ .ombox { margin: 4px 0; border-collapse: collapse; border: 1px solid #a2a9b1; /* Default "notice" gray */ background-color: var(--background-color-neutral-subtle, #f8f9fa); box-sizing: border-box; color: var(--color-base, #202122); } /* For the "small=yes" option. */ .ombox.mbox-small { font-size: 88%; line-height: 1.25em; } .ombox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .ombox-delete { border: 2px solid #b32424; /* Red */ } .ombox-content { border: 1px solid #f28500; /* Orange */ } .ombox-style { border: 1px solid #fc3; /* Yellow */ } .ombox-move { border: 1px solid #9932cc; /* Purple */ } .ombox-protection { border: 2px solid #a2a9b1; /* Gray-gold */ } .ombox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .ombox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .ombox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .ombox .mbox-empty-cell { border: none; padding: 0; width: 1px; } /* keep synced with each other type of message box as this isn't qualified */ .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .ombox { margin: 4px 10%; } .ombox.mbox-small { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin: 4px 0 4px 1em; width: 238px; } } /** T367463 */ body.skin--responsive table.ombox img { max-width: none !important; } @media screen { html.skin-theme-clientpref-night .ombox-speedy { background-color: #310402; /* Dark red, same hue/saturation as light */ } } @media screen and (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .ombox-speedy { background-color: #310402; /* Dark red, same hue/saturation as light */ } } s3kd4o8l90hza7k55c82cm0ltkd3xp2 15586 15585 2026-08-22T10:32:56Z A826 1864 ೧ revisions imported from [[:w:ಮಾಡ್ಯೂಲ್:Message_box/ombox.css]] 15585 sanitized-css text/css /* {{pp|small=y}} */ .ombox { margin: 4px 0; border-collapse: collapse; border: 1px solid #a2a9b1; /* Default "notice" gray */ background-color: var(--background-color-neutral-subtle, #f8f9fa); box-sizing: border-box; color: var(--color-base, #202122); } /* For the "small=yes" option. */ .ombox.mbox-small { font-size: 88%; line-height: 1.25em; } .ombox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .ombox-delete { border: 2px solid #b32424; /* Red */ } .ombox-content { border: 1px solid #f28500; /* Orange */ } .ombox-style { border: 1px solid #fc3; /* Yellow */ } .ombox-move { border: 1px solid #9932cc; /* Purple */ } .ombox-protection { border: 2px solid #a2a9b1; /* Gray-gold */ } .ombox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .ombox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .ombox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .ombox .mbox-empty-cell { border: none; padding: 0; width: 1px; } /* keep synced with each other type of message box as this isn't qualified */ .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .ombox { margin: 4px 10%; } .ombox.mbox-small { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin: 4px 0 4px 1em; width: 238px; } } /** T367463 */ body.skin--responsive table.ombox img { max-width: none !important; } @media screen { html.skin-theme-clientpref-night .ombox-speedy { background-color: #310402; /* Dark red, same hue/saturation as light */ } } @media screen and (prefers-color-scheme: dark) { html.skin-theme-clientpref-os .ombox-speedy { background-color: #310402; /* Dark red, same hue/saturation as light */ } } s3kd4o8l90hza7k55c82cm0ltkd3xp2 ಟೆಂಪ್ಲೇಟು:Str left 10 3233 15567 10540 2025-12-22T05:44:32Z w>A826 0 ೧ revisions imported from [[:d:Template:Str_left]] 15567 wikitext text/x-wiki <includeonly>{{safesubst:padleft:|{{{2|1}}}|{{{1}}}}}</includeonly><noinclude> {{Documentation}} <!-- Categories go on the /doc subpage. --> </noinclude> 1b6plvfixcru8aabeofs0uj4t46wwdv 15568 15567 2026-08-22T10:32:55Z A826 1864 ೧ revisions imported from [[:w:ಟೆಂಪ್ಲೇಟು:Str_left]] 15567 wikitext text/x-wiki <includeonly>{{safesubst:padleft:|{{{2|1}}}|{{{1}}}}}</includeonly><noinclude> {{Documentation}} <!-- Categories go on the /doc subpage. --> </noinclude> 1b6plvfixcru8aabeofs0uj4t46wwdv ಮಾಡ್ಯೂಲ್:Documentation/config 828 3268 15625 9564 2025-10-25T04:45:27Z w>A826 0 ೧ revisions imported from [[:en:Module:Documentation/config]] 15625 Scribunto text/plain ---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------------------------- local cfg = {} -- Do not edit this line. ---------------------------------------------------------------------------------------------------- -- Protection template configuration ---------------------------------------------------------------------------------------------------- -- cfg['protection-reason-edit'] -- The protection reason for edit-protected templates to pass to -- [[Module:Protection banner]]. cfg['protection-reason-edit'] = 'template' --[[ ---------------------------------------------------------------------------------------------------- -- Sandbox notice configuration -- -- On sandbox pages the module can display a template notifying users that the current page is a -- sandbox, and the location of test cases pages, etc. The module decides whether the page is a -- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the -- messages that the notices contains. ---------------------------------------------------------------------------------------------------- --]] -- cfg['sandbox-notice-image'] -- The image displayed in the sandbox notice. cfg['sandbox-notice-image'] = '[[File:Edit In Sandbox Icon - Color.svg|50px|alt=|link=]]' --[[ -- cfg['sandbox-notice-pagetype-template'] -- cfg['sandbox-notice-pagetype-module'] -- cfg['sandbox-notice-pagetype-other'] -- The page type of the sandbox page. The message that is displayed depends on the current subject -- namespace. This message is used in either cfg['sandbox-notice-blurb'] or -- cfg['sandbox-notice-diff-blurb']. --]] cfg['sandbox-notice-pagetype-template'] = '[[Wikipedia:Template test cases|template sandbox]] page' cfg['sandbox-notice-pagetype-module'] = '[[Wikipedia:Template test cases|module sandbox]] page' cfg['sandbox-notice-pagetype-other'] = 'sandbox page' --[[ -- cfg['sandbox-notice-blurb'] -- cfg['sandbox-notice-diff-blurb'] -- cfg['sandbox-notice-diff-display'] -- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence -- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page -- type, which is either cfg['sandbox-notice-pagetype-template'], -- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what -- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between -- the sandbox and the main template. The display value of the diff link is set by -- cfg['sandbox-notice-compare-link-display']. --]] cfg['sandbox-notice-blurb'] = 'This is the $1 for $2.' cfg['sandbox-notice-diff-blurb'] = 'This is the $1 for $2 ($3).' cfg['sandbox-notice-compare-link-display'] = 'diff' --[[ -- cfg['sandbox-notice-testcases-blurb'] -- cfg['sandbox-notice-testcases-link-display'] -- cfg['sandbox-notice-testcases-run-blurb'] -- cfg['sandbox-notice-testcases-run-link-display'] -- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit. $1 is a link to the test cases page. -- cfg['sandbox-notice-testcases-link-display'] is the display value for that link. -- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test -- cases page, and $2 is a link to the page to run it. -- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test -- cases. --]] cfg['sandbox-notice-testcases-blurb'] = 'See also the companion subpage for $1.' cfg['sandbox-notice-testcases-link-display'] = 'test cases' cfg['sandbox-notice-testcases-run-blurb'] = 'See also the companion subpage for $1 ($2).' cfg['sandbox-notice-testcases-run-link-display'] = 'run' -- cfg['sandbox-category'] - A category to add to all template sandboxes. -- cfg['module-sandbox-category'] - A category to add to all module sandboxes. -- cfg['module-sandbox-category'] - A category to add to all sandboxe not in templates or modules. cfg['sandbox-category'] = 'Template sandboxes' cfg['module-sandbox-category'] = 'Module sandboxes' cfg['other-sandbox-category'] = 'Sandboxes outside of template or module namespace' ---------------------------------------------------------------------------------------------------- -- Start box configuration ---------------------------------------------------------------------------------------------------- -- cfg['documentation-icon-wikitext'] -- The wikitext for the icon shown at the top of the template. cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- cfg['template-namespace-heading'] -- The heading shown in the template namespace. cfg['template-namespace-heading'] = 'Template documentation' -- cfg['module-namespace-heading'] -- The heading shown in the module namespace. cfg['module-namespace-heading'] = 'Module documentation' -- cfg['file-namespace-heading'] -- The heading shown in the file namespace. cfg['file-namespace-heading'] = 'Summary' -- cfg['other-namespaces-heading'] -- The heading shown in other namespaces. cfg['other-namespaces-heading'] = 'Documentation' -- cfg['view-link-display'] -- The text to display for "view" links. cfg['view-link-display'] = 'view' -- cfg['edit-link-display'] -- The text to display for "edit" links. cfg['edit-link-display'] = 'edit' -- cfg['history-link-display'] -- The text to display for "history" links. cfg['history-link-display'] = 'history' -- cfg['purge-link-display'] -- The text to display for "purge" links. cfg['purge-link-display'] = 'purge' -- cfg['create-link-display'] -- The text to display for "create" links. cfg['create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Link box (end box) configuration ---------------------------------------------------------------------------------------------------- -- cfg['transcluded-from-blurb'] -- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page. cfg['transcluded-from-blurb'] = 'The above [[Wikipedia:Template documentation|documentation]] is [[Help:Transclusion|transcluded]] from $1.' --[[ -- cfg['create-module-doc-blurb'] -- Notice displayed in the module namespace when the documentation subpage does not exist. -- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the -- display cfg['create-link-display']. --]] cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' ---------------------------------------------------------------------------------------------------- -- Experiment blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['experiment-blurb-template'] -- cfg['experiment-blurb-module'] -- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages. -- It is only shown in the template and module namespaces. With the default English settings, it -- might look like this: -- -- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. -- -- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links. -- -- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending -- on what namespace we are in. -- -- Parameters: -- -- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display']) -- -- If the sandbox doesn't exist, it is in the format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display']) -- -- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload'] -- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display'] -- loads a default edit summary of cfg['mirror-edit-summary']. -- -- $2 is a link to the test cases page. If the test cases page exists, it is in the following format: -- -- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display']) -- -- If the test cases page doesn't exist, it is in the format: -- -- cfg['testcases-link-display'] (cfg['testcases-create-link-display']) -- -- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the -- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current -- namespace. --]] cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages." cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages." ---------------------------------------------------------------------------------------------------- -- Sandbox link configuration ---------------------------------------------------------------------------------------------------- -- cfg['sandbox-subpage'] -- The name of the template subpage typically used for sandboxes. cfg['sandbox-subpage'] = 'sandbox' -- cfg['template-sandbox-preload'] -- Preload file for template sandbox pages. cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox' -- cfg['module-sandbox-preload'] -- Preload file for Lua module sandbox pages. cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox' -- cfg['sandbox-link-display'] -- The text to display for "sandbox" links. cfg['sandbox-link-display'] = 'sandbox' -- cfg['sandbox-edit-link-display'] -- The text to display for sandbox "edit" links. cfg['sandbox-edit-link-display'] = 'edit' -- cfg['sandbox-create-link-display'] -- The text to display for sandbox "create" links. cfg['sandbox-create-link-display'] = 'create' -- cfg['compare-link-display'] -- The text to display for "compare" links. cfg['compare-link-display'] = 'diff' -- cfg['mirror-edit-summary'] -- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the -- template page. cfg['mirror-edit-summary'] = 'Create sandbox version of $1' -- cfg['mirror-link-display'] -- The text to display for "mirror" links. cfg['mirror-link-display'] = 'mirror' -- cfg['mirror-link-preload'] -- The page to preload when a user clicks the "mirror" link. cfg['mirror-link-preload'] = 'Template:Documentation/mirror' ---------------------------------------------------------------------------------------------------- -- Test cases link configuration ---------------------------------------------------------------------------------------------------- -- cfg['testcases-subpage'] -- The name of the template subpage typically used for test cases. cfg['testcases-subpage'] = 'testcases' -- cfg['template-testcases-preload'] -- Preload file for template test cases pages. cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases' -- cfg['module-testcases-preload'] -- Preload file for Lua module test cases pages. cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases' -- cfg['testcases-link-display'] -- The text to display for "testcases" links. cfg['testcases-link-display'] = 'testcases' -- cfg['testcases-edit-link-display'] -- The text to display for test cases "edit" links. cfg['testcases-edit-link-display'] = 'edit' -- cfg['testcases-run-link-display'] -- The text to display for test cases "run" links. cfg['testcases-run-link-display'] = 'run' -- cfg['testcases-create-link-display'] -- The text to display for test cases "create" links. cfg['testcases-create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Add categories blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['add-categories-blurb'] -- Text to direct users to add categories to the /doc subpage. Not used if the "content" or -- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a -- link to the /doc subpage with a display value of cfg['doc-link-display']. --]] cfg['add-categories-blurb'] = 'Add categories to the $1 subpage.' -- cfg['doc-link-display'] -- The text to display when linking to the /doc subpage. cfg['doc-link-display'] = '/doc' ---------------------------------------------------------------------------------------------------- -- Subpages link configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['subpages-blurb'] -- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a -- display value of cfg['subpages-link-display']. In the English version this blurb is simply -- the link followed by a period, and the link display provides the actual text. --]] cfg['subpages-blurb'] = '$1.' --[[ -- cfg['subpages-link-display'] -- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'], -- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in -- the template namespace, the module namespace, or another namespace. --]] cfg['subpages-link-display'] = 'Subpages of this $1' -- cfg['template-pagetype'] -- The pagetype to display for template pages. cfg['template-pagetype'] = 'template' -- cfg['module-pagetype'] -- The pagetype to display for Lua module pages. cfg['module-pagetype'] = 'module' -- cfg['default-pagetype'] -- The pagetype to display for pages other than templates or Lua modules. cfg['default-pagetype'] = 'page' ---------------------------------------------------------------------------------------------------- -- Doc link configuration ---------------------------------------------------------------------------------------------------- -- cfg['doc-subpage'] -- The name of the subpage typically used for documentation pages. cfg['doc-subpage'] = 'doc' -- cfg['docpage-preload'] -- Preload file for template documentation pages in all namespaces. cfg['docpage-preload'] = 'Template:Documentation/preload' -- cfg['module-preload'] -- Preload file for Lua module documentation pages. cfg['module-preload'] = 'Template:Documentation/preload-module-doc' ---------------------------------------------------------------------------------------------------- -- HTML and CSS configuration ---------------------------------------------------------------------------------------------------- -- cfg['templatestyles'] -- The name of the TemplateStyles page where CSS is kept. -- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed. cfg['templatestyles'] = 'Module:Documentation/styles.css' -- cfg['container'] -- Class which can be used to set flex or grid CSS on the -- two child divs documentation and documentation-metadata cfg['container'] = 'documentation-container' -- cfg['main-div-classes'] -- Classes added to the main HTML "div" tag. cfg['main-div-classes'] = 'documentation' -- cfg['main-div-heading-class'] -- Class for the main heading for templates and modules and assoc. talk spaces cfg['main-div-heading-class'] = 'documentation-heading' -- cfg['start-box-class'] -- Class for the start box cfg['start-box-class'] = 'documentation-startbox' -- cfg['start-box-link-classes'] -- Classes used for the [view][edit][history] or [create] links in the start box. -- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]] cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks' -- cfg['end-box-class'] -- Class for the end box. cfg['end-box-class'] = 'documentation-metadata' -- cfg['end-box-plainlinks'] -- Plainlinks cfg['end-box-plainlinks'] = 'plainlinks' -- cfg['toolbar-class'] -- Class added for toolbar links. cfg['toolbar-class'] = 'documentation-toolbar' -- cfg['clear'] -- Just used to clear things. cfg['clear'] = 'documentation-clear' ---------------------------------------------------------------------------------------------------- -- Tracking category configuration ---------------------------------------------------------------------------------------------------- -- cfg['display-strange-usage-category'] -- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage -- or a /testcases subpage. This should be a boolean value (either true or false). cfg['display-strange-usage-category'] = true -- cfg['strange-usage-category'] -- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a -- /doc subpage or a /testcases subpage. cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage' --[[ ---------------------------------------------------------------------------------------------------- -- End configuration -- -- Don't edit anything below this line. ---------------------------------------------------------------------------------------------------- --]] return cfg 2z4v6f5nkabra0nulgb7sxch1cktfsn 15626 15625 2026-08-22T11:00:59Z A826 1864 ೧ revisions imported from [[:w:ಮಾಡ್ಯೂಲ್:Documentation/config]] 15625 Scribunto text/plain ---------------------------------------------------------------------------------------------------- -- -- Configuration for Module:Documentation -- -- Here you can set the values of the parameters and messages used in Module:Documentation to -- localise it to your wiki and your language. Unless specified otherwise, values given here -- should be string values. ---------------------------------------------------------------------------------------------------- local cfg = {} -- Do not edit this line. ---------------------------------------------------------------------------------------------------- -- Protection template configuration ---------------------------------------------------------------------------------------------------- -- cfg['protection-reason-edit'] -- The protection reason for edit-protected templates to pass to -- [[Module:Protection banner]]. cfg['protection-reason-edit'] = 'template' --[[ ---------------------------------------------------------------------------------------------------- -- Sandbox notice configuration -- -- On sandbox pages the module can display a template notifying users that the current page is a -- sandbox, and the location of test cases pages, etc. The module decides whether the page is a -- sandbox or not based on the value of cfg['sandbox-subpage']. The following settings configure the -- messages that the notices contains. ---------------------------------------------------------------------------------------------------- --]] -- cfg['sandbox-notice-image'] -- The image displayed in the sandbox notice. cfg['sandbox-notice-image'] = '[[File:Edit In Sandbox Icon - Color.svg|50px|alt=|link=]]' --[[ -- cfg['sandbox-notice-pagetype-template'] -- cfg['sandbox-notice-pagetype-module'] -- cfg['sandbox-notice-pagetype-other'] -- The page type of the sandbox page. The message that is displayed depends on the current subject -- namespace. This message is used in either cfg['sandbox-notice-blurb'] or -- cfg['sandbox-notice-diff-blurb']. --]] cfg['sandbox-notice-pagetype-template'] = '[[Wikipedia:Template test cases|template sandbox]] page' cfg['sandbox-notice-pagetype-module'] = '[[Wikipedia:Template test cases|module sandbox]] page' cfg['sandbox-notice-pagetype-other'] = 'sandbox page' --[[ -- cfg['sandbox-notice-blurb'] -- cfg['sandbox-notice-diff-blurb'] -- cfg['sandbox-notice-diff-display'] -- Either cfg['sandbox-notice-blurb'] or cfg['sandbox-notice-diff-blurb'] is the opening sentence -- of the sandbox notice. The latter has a diff link, but the former does not. $1 is the page -- type, which is either cfg['sandbox-notice-pagetype-template'], -- cfg['sandbox-notice-pagetype-module'] or cfg['sandbox-notice-pagetype-other'] depending what -- namespace we are in. $2 is a link to the main template page, and $3 is a diff link between -- the sandbox and the main template. The display value of the diff link is set by -- cfg['sandbox-notice-compare-link-display']. --]] cfg['sandbox-notice-blurb'] = 'This is the $1 for $2.' cfg['sandbox-notice-diff-blurb'] = 'This is the $1 for $2 ($3).' cfg['sandbox-notice-compare-link-display'] = 'diff' --[[ -- cfg['sandbox-notice-testcases-blurb'] -- cfg['sandbox-notice-testcases-link-display'] -- cfg['sandbox-notice-testcases-run-blurb'] -- cfg['sandbox-notice-testcases-run-link-display'] -- cfg['sandbox-notice-testcases-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit. $1 is a link to the test cases page. -- cfg['sandbox-notice-testcases-link-display'] is the display value for that link. -- cfg['sandbox-notice-testcases-run-blurb'] is a sentence notifying the user that there is a test cases page -- corresponding to this sandbox that they can edit, along with a link to run it. $1 is a link to the test -- cases page, and $2 is a link to the page to run it. -- cfg['sandbox-notice-testcases-run-link-display'] is the display value for the link to run the test -- cases. --]] cfg['sandbox-notice-testcases-blurb'] = 'See also the companion subpage for $1.' cfg['sandbox-notice-testcases-link-display'] = 'test cases' cfg['sandbox-notice-testcases-run-blurb'] = 'See also the companion subpage for $1 ($2).' cfg['sandbox-notice-testcases-run-link-display'] = 'run' -- cfg['sandbox-category'] - A category to add to all template sandboxes. -- cfg['module-sandbox-category'] - A category to add to all module sandboxes. -- cfg['module-sandbox-category'] - A category to add to all sandboxe not in templates or modules. cfg['sandbox-category'] = 'Template sandboxes' cfg['module-sandbox-category'] = 'Module sandboxes' cfg['other-sandbox-category'] = 'Sandboxes outside of template or module namespace' ---------------------------------------------------------------------------------------------------- -- Start box configuration ---------------------------------------------------------------------------------------------------- -- cfg['documentation-icon-wikitext'] -- The wikitext for the icon shown at the top of the template. cfg['documentation-icon-wikitext'] = '[[File:Test Template Info-Icon - Version (2).svg|50px|link=|alt=]]' -- cfg['template-namespace-heading'] -- The heading shown in the template namespace. cfg['template-namespace-heading'] = 'Template documentation' -- cfg['module-namespace-heading'] -- The heading shown in the module namespace. cfg['module-namespace-heading'] = 'Module documentation' -- cfg['file-namespace-heading'] -- The heading shown in the file namespace. cfg['file-namespace-heading'] = 'Summary' -- cfg['other-namespaces-heading'] -- The heading shown in other namespaces. cfg['other-namespaces-heading'] = 'Documentation' -- cfg['view-link-display'] -- The text to display for "view" links. cfg['view-link-display'] = 'view' -- cfg['edit-link-display'] -- The text to display for "edit" links. cfg['edit-link-display'] = 'edit' -- cfg['history-link-display'] -- The text to display for "history" links. cfg['history-link-display'] = 'history' -- cfg['purge-link-display'] -- The text to display for "purge" links. cfg['purge-link-display'] = 'purge' -- cfg['create-link-display'] -- The text to display for "create" links. cfg['create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Link box (end box) configuration ---------------------------------------------------------------------------------------------------- -- cfg['transcluded-from-blurb'] -- Notice displayed when the docs are transcluded from another page. $1 is a wikilink to that page. cfg['transcluded-from-blurb'] = 'The above [[Wikipedia:Template documentation|documentation]] is [[Help:Transclusion|transcluded]] from $1.' --[[ -- cfg['create-module-doc-blurb'] -- Notice displayed in the module namespace when the documentation subpage does not exist. -- $1 is a link to create the documentation page with the preload cfg['module-preload'] and the -- display cfg['create-link-display']. --]] cfg['create-module-doc-blurb'] = 'You might want to $1 a documentation page for this [[Wikipedia:Lua|Scribunto module]].' ---------------------------------------------------------------------------------------------------- -- Experiment blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['experiment-blurb-template'] -- cfg['experiment-blurb-module'] -- The experiment blurb is the text inviting editors to experiment in sandbox and test cases pages. -- It is only shown in the template and module namespaces. With the default English settings, it -- might look like this: -- -- Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages. -- -- In this example, "sandbox", "edit", "diff", "testcases", and "edit" would all be links. -- -- There are two versions, cfg['experiment-blurb-template'] and cfg['experiment-blurb-module'], depending -- on what namespace we are in. -- -- Parameters: -- -- $1 is a link to the sandbox page. If the sandbox exists, it is in the following format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-edit-link-display'] | cfg['compare-link-display']) -- -- If the sandbox doesn't exist, it is in the format: -- -- cfg['sandbox-link-display'] (cfg['sandbox-create-link-display'] | cfg['mirror-link-display']) -- -- The link for cfg['sandbox-create-link-display'] link preloads the page with cfg['template-sandbox-preload'] -- or cfg['module-sandbox-preload'], depending on the current namespace. The link for cfg['mirror-link-display'] -- loads a default edit summary of cfg['mirror-edit-summary']. -- -- $2 is a link to the test cases page. If the test cases page exists, it is in the following format: -- -- cfg['testcases-link-display'] (cfg['testcases-edit-link-display'] | cfg['testcases-run-link-display']) -- -- If the test cases page doesn't exist, it is in the format: -- -- cfg['testcases-link-display'] (cfg['testcases-create-link-display']) -- -- If the test cases page doesn't exist, the link for cfg['testcases-create-link-display'] preloads the -- page with cfg['template-testcases-preload'] or cfg['module-testcases-preload'], depending on the current -- namespace. --]] cfg['experiment-blurb-template'] = "Editors can experiment in this template's $1 and $2 pages." cfg['experiment-blurb-module'] = "Editors can experiment in this module's $1 and $2 pages." ---------------------------------------------------------------------------------------------------- -- Sandbox link configuration ---------------------------------------------------------------------------------------------------- -- cfg['sandbox-subpage'] -- The name of the template subpage typically used for sandboxes. cfg['sandbox-subpage'] = 'sandbox' -- cfg['template-sandbox-preload'] -- Preload file for template sandbox pages. cfg['template-sandbox-preload'] = 'Template:Documentation/preload-sandbox' -- cfg['module-sandbox-preload'] -- Preload file for Lua module sandbox pages. cfg['module-sandbox-preload'] = 'Template:Documentation/preload-module-sandbox' -- cfg['sandbox-link-display'] -- The text to display for "sandbox" links. cfg['sandbox-link-display'] = 'sandbox' -- cfg['sandbox-edit-link-display'] -- The text to display for sandbox "edit" links. cfg['sandbox-edit-link-display'] = 'edit' -- cfg['sandbox-create-link-display'] -- The text to display for sandbox "create" links. cfg['sandbox-create-link-display'] = 'create' -- cfg['compare-link-display'] -- The text to display for "compare" links. cfg['compare-link-display'] = 'diff' -- cfg['mirror-edit-summary'] -- The default edit summary to use when a user clicks the "mirror" link. $1 is a wikilink to the -- template page. cfg['mirror-edit-summary'] = 'Create sandbox version of $1' -- cfg['mirror-link-display'] -- The text to display for "mirror" links. cfg['mirror-link-display'] = 'mirror' -- cfg['mirror-link-preload'] -- The page to preload when a user clicks the "mirror" link. cfg['mirror-link-preload'] = 'Template:Documentation/mirror' ---------------------------------------------------------------------------------------------------- -- Test cases link configuration ---------------------------------------------------------------------------------------------------- -- cfg['testcases-subpage'] -- The name of the template subpage typically used for test cases. cfg['testcases-subpage'] = 'testcases' -- cfg['template-testcases-preload'] -- Preload file for template test cases pages. cfg['template-testcases-preload'] = 'Template:Documentation/preload-testcases' -- cfg['module-testcases-preload'] -- Preload file for Lua module test cases pages. cfg['module-testcases-preload'] = 'Template:Documentation/preload-module-testcases' -- cfg['testcases-link-display'] -- The text to display for "testcases" links. cfg['testcases-link-display'] = 'testcases' -- cfg['testcases-edit-link-display'] -- The text to display for test cases "edit" links. cfg['testcases-edit-link-display'] = 'edit' -- cfg['testcases-run-link-display'] -- The text to display for test cases "run" links. cfg['testcases-run-link-display'] = 'run' -- cfg['testcases-create-link-display'] -- The text to display for test cases "create" links. cfg['testcases-create-link-display'] = 'create' ---------------------------------------------------------------------------------------------------- -- Add categories blurb configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['add-categories-blurb'] -- Text to direct users to add categories to the /doc subpage. Not used if the "content" or -- "docname fed" arguments are set, as then it is not clear where to add the categories. $1 is a -- link to the /doc subpage with a display value of cfg['doc-link-display']. --]] cfg['add-categories-blurb'] = 'Add categories to the $1 subpage.' -- cfg['doc-link-display'] -- The text to display when linking to the /doc subpage. cfg['doc-link-display'] = '/doc' ---------------------------------------------------------------------------------------------------- -- Subpages link configuration ---------------------------------------------------------------------------------------------------- --[[ -- cfg['subpages-blurb'] -- The "Subpages of this template" blurb. $1 is a link to the main template's subpages with a -- display value of cfg['subpages-link-display']. In the English version this blurb is simply -- the link followed by a period, and the link display provides the actual text. --]] cfg['subpages-blurb'] = '$1.' --[[ -- cfg['subpages-link-display'] -- The text to display for the "subpages of this page" link. $1 is cfg['template-pagetype'], -- cfg['module-pagetype'] or cfg['default-pagetype'], depending on whether the current page is in -- the template namespace, the module namespace, or another namespace. --]] cfg['subpages-link-display'] = 'Subpages of this $1' -- cfg['template-pagetype'] -- The pagetype to display for template pages. cfg['template-pagetype'] = 'template' -- cfg['module-pagetype'] -- The pagetype to display for Lua module pages. cfg['module-pagetype'] = 'module' -- cfg['default-pagetype'] -- The pagetype to display for pages other than templates or Lua modules. cfg['default-pagetype'] = 'page' ---------------------------------------------------------------------------------------------------- -- Doc link configuration ---------------------------------------------------------------------------------------------------- -- cfg['doc-subpage'] -- The name of the subpage typically used for documentation pages. cfg['doc-subpage'] = 'doc' -- cfg['docpage-preload'] -- Preload file for template documentation pages in all namespaces. cfg['docpage-preload'] = 'Template:Documentation/preload' -- cfg['module-preload'] -- Preload file for Lua module documentation pages. cfg['module-preload'] = 'Template:Documentation/preload-module-doc' ---------------------------------------------------------------------------------------------------- -- HTML and CSS configuration ---------------------------------------------------------------------------------------------------- -- cfg['templatestyles'] -- The name of the TemplateStyles page where CSS is kept. -- Sandbox CSS will be at Module:Documentation/sandbox/styles.css when needed. cfg['templatestyles'] = 'Module:Documentation/styles.css' -- cfg['container'] -- Class which can be used to set flex or grid CSS on the -- two child divs documentation and documentation-metadata cfg['container'] = 'documentation-container' -- cfg['main-div-classes'] -- Classes added to the main HTML "div" tag. cfg['main-div-classes'] = 'documentation' -- cfg['main-div-heading-class'] -- Class for the main heading for templates and modules and assoc. talk spaces cfg['main-div-heading-class'] = 'documentation-heading' -- cfg['start-box-class'] -- Class for the start box cfg['start-box-class'] = 'documentation-startbox' -- cfg['start-box-link-classes'] -- Classes used for the [view][edit][history] or [create] links in the start box. -- mw-editsection-like is per [[Wikipedia:Village pump (technical)/Archive 117]] cfg['start-box-link-classes'] = 'mw-editsection-like plainlinks' -- cfg['end-box-class'] -- Class for the end box. cfg['end-box-class'] = 'documentation-metadata' -- cfg['end-box-plainlinks'] -- Plainlinks cfg['end-box-plainlinks'] = 'plainlinks' -- cfg['toolbar-class'] -- Class added for toolbar links. cfg['toolbar-class'] = 'documentation-toolbar' -- cfg['clear'] -- Just used to clear things. cfg['clear'] = 'documentation-clear' ---------------------------------------------------------------------------------------------------- -- Tracking category configuration ---------------------------------------------------------------------------------------------------- -- cfg['display-strange-usage-category'] -- Set to true to enable output of cfg['strange-usage-category'] if the module is used on a /doc subpage -- or a /testcases subpage. This should be a boolean value (either true or false). cfg['display-strange-usage-category'] = true -- cfg['strange-usage-category'] -- Category to output if cfg['display-strange-usage-category'] is set to true and the module is used on a -- /doc subpage or a /testcases subpage. cfg['strange-usage-category'] = 'Wikipedia pages with strange ((documentation)) usage' --[[ ---------------------------------------------------------------------------------------------------- -- End configuration -- -- Don't edit anything below this line. ---------------------------------------------------------------------------------------------------- --]] return cfg 2z4v6f5nkabra0nulgb7sxch1cktfsn ಮಾಡ್ಯೂಲ್:Documentation/styles.css 828 3269 15627 9566 2026-07-24T04:53:26Z w>A826 0 ೧ revisions imported from [[:en:Module:Documentation/styles.css]] 15627 sanitized-css text/css /* {{pp|small=yes}} */ .documentation, .documentation-metadata { border: 1px solid var( --border-color-base, #a2a9b1 ); background-color: #ecfcf4; color:inherit; clear: both; } .documentation { margin: 1em 0 0 0; padding: 1em; } .documentation-metadata { margin: 0.2em 0; /* same margin left-right as .documentation */ font-style: italic; padding: 0.4em 1em; /* same padding left-right as .documentation */ } .documentation-startbox { padding-bottom: 3px; border-bottom: 1px solid var( --border-color-base, #a2a9b1 ); margin-bottom: 1ex; } .documentation-heading { font-weight: bold; font-size: 125%; } body.skin-minerva .documentation-startbox .mw-editsection-like a, body.skin-timeless .documentation-startbox .mw-editsection-like a { display: inline-block; margin-left: 0.3em; margin-right: 0.3em; } .documentation-clear { /* Don't want things to stick out where they shouldn't. */ clear: both; } .documentation-toolbar { font-style: normal; font-size: 85%; } @media screen { html.skin-theme-clientpref-night .documentation, html.skin-theme-clientpref-night .documentation-metadata { background-color: #0b1e1c; } } @media screen and ( prefers-color-scheme: dark ) { html.skin-theme-clientpref-os .documentation, html.skin-theme-clientpref-os .documentation-metadata { background-color: #0b1e1c; } } ohekqp4ao232tow40gho8bknn5qdpvd 15628 15627 2026-08-22T11:00:59Z A826 1864 ೧ revisions imported from [[:w:ಮಾಡ್ಯೂಲ್:Documentation/styles.css]] 15627 sanitized-css text/css /* {{pp|small=yes}} */ .documentation, .documentation-metadata { border: 1px solid var( --border-color-base, #a2a9b1 ); background-color: #ecfcf4; color:inherit; clear: both; } .documentation { margin: 1em 0 0 0; padding: 1em; } .documentation-metadata { margin: 0.2em 0; /* same margin left-right as .documentation */ font-style: italic; padding: 0.4em 1em; /* same padding left-right as .documentation */ } .documentation-startbox { padding-bottom: 3px; border-bottom: 1px solid var( --border-color-base, #a2a9b1 ); margin-bottom: 1ex; } .documentation-heading { font-weight: bold; font-size: 125%; } body.skin-minerva .documentation-startbox .mw-editsection-like a, body.skin-timeless .documentation-startbox .mw-editsection-like a { display: inline-block; margin-left: 0.3em; margin-right: 0.3em; } .documentation-clear { /* Don't want things to stick out where they shouldn't. */ clear: both; } .documentation-toolbar { font-style: normal; font-size: 85%; } @media screen { html.skin-theme-clientpref-night .documentation, html.skin-theme-clientpref-night .documentation-metadata { background-color: #0b1e1c; } } @media screen and ( prefers-color-scheme: dark ) { html.skin-theme-clientpref-os .documentation, html.skin-theme-clientpref-os .documentation-metadata { background-color: #0b1e1c; } } ohekqp4ao232tow40gho8bknn5qdpvd ಟೆಂಪ್ಲೇಟು:Databox 10 4456 15557 2026-07-26T16:17:23Z w>A826 0 Protected "[[ಟೆಂಪ್ಲೇಟು:Databox]]": ಹೆಚ್ಚಿನ ದಟ್ಟಣೆ ಪುಟ ([ಸಂಪಾದನೆ=ನಿರ್ವಾಹಕರು ಮಾತ್ರ] (ಅನಿರ್ದಿಷ್ಟ) [ಸ್ಥಳಾಂತರ=ನಿರ್ವಾಹಕರು ಮಾತ್ರ] (ಅನಿರ್ದಿಷ್ಟ)) 15557 wikitext text/x-wiki {{#invoke:Databox|databox|useImage={{{useImage|}}}|excludeProperties={{{excludeProperties|}}}}} etixe24he4rn2h9b4euxkal7ihzwk91 15558 15557 2026-08-22T10:32:32Z A826 1864 ೧ revisions imported from [[:w:ಟೆಂಪ್ಲೇಟು:Databox]] 15557 wikitext text/x-wiki {{#invoke:Databox|databox|useImage={{{useImage|}}}|excludeProperties={{{excludeProperties|}}}}} etixe24he4rn2h9b4euxkal7ihzwk91 ಮಾಡ್ಯೂಲ್:Databox 828 4457 15559 2026-08-06T05:07:45Z w>A826 0 15559 Scribunto text/plain -- A modified version based on sv.wikipedia.org/wiki/Modul:Databox -- Displays Wikidata properties dynamically inside an infobox. function valuesToKeys(array) local result = {} for _, v in pairs(array) do result[v] = true end return result end local p = {} function p.databox(frame) local args = frame:getParent().args local argsLocal = frame.args local itemId = nil if args.item then itemId = args.item end local useImage = nil if argsLocal.useImage then useImage = argsLocal["useImage"] end -- Option to display aliases below the title (defaults to true) local useAliases = true if argsLocal.useAliases and (argsLocal.useAliases == "false" or argsLocal.useAliases == "no" or argsLocal.useAliases == "0") then useAliases = false end -- local excludeProperties parameter allows excluding specific properties per page if needed local excludeProperties = {} if argsLocal.excludeProperties then for item in string.gmatch(argsLocal.excludeProperties, "[^,]+") do table.insert(excludeProperties, item) end end local lang = mw.language.getContentLanguage() local item = mw.wikibase.getEntity(itemId) if item == nil then mw.addWarning("Wikidata item not found") return "" end local databoxRoot = mw.html.create('div') :addClass('infobox') :css({ float = 'right', border = '1px solid #aaa', ['max-width'] = '250px', padding = '0 0.4em', margin = '0 0 0.4em 0.4em', }) -- Title local titleDiv = databoxRoot:tag('div') :css({ ['text-align'] = 'center', ['background-color'] = '#f5f5f5', padding = '0.5em 0', margin = '0.5em 0', ['font-size'] = '120%', ['font-weight'] = 'bold', }) :wikitext(item:getLabel() or mw.title.getCurrentTitle().text) -- Aliases display (Color set to #6f9f9c) if useAliases and item.aliases then local langCode = lang:getCode() local aliases = item.aliases[langCode] if aliases and #aliases > 0 then local aliasList = {} for _, aliasObj in ipairs(aliases) do table.insert(aliasList, aliasObj.value) end titleDiv:tag('div') :css({ ['font-size'] = '75%', ['font-weight'] = 'normal', ['font-style'] = 'italic', ['color'] = '#6f9f9c', ['margin-top'] = '0.2em' }) :wikitext(table.concat(aliasList, ', ')) end end -- Image local databoxImage = nil if useImage and useImage ~= "" then local allWikidataImages = item:getAllStatements('P18') if #allWikidataImages >= 1 then for _, image in ipairs( allWikidataImages ) do if image.mainsnak.datavalue.value == useImage then databoxImage = useImage break end end end end if databoxImage == nil then local bestWikidataImages = item:getBestStatements('P18') if #bestWikidataImages >= 1 then databoxImage = bestWikidataImages[1].mainsnak.datavalue.value end end if databoxImage then databoxRoot :tag('div') :wikitext('[[File:' .. databoxImage .. '|frameless|240px|center]]') end -- Signature (P109) local signatureImage = nil local signatureImages = item:getBestStatements('P109') if #signatureImages >= 1 then signatureImage = signatureImages[1].mainsnak.datavalue.value end if signatureImage then databoxRoot :tag('div') :css({ ['text-align'] = 'center', ['font-size'] = '90%', ['font-style'] = 'italic', padding = '0.2em 0', }) :wikitext('Signature') databoxRoot :tag('div') :wikitext('[[File:' .. signatureImage .. '|frameless|200px|center]]') end -- Table local dataTable = databoxRoot :tag('table') :css({ ['text-align'] = 'left', ['font-size'] = '90%', ['word-break'] = 'break-word', ['width'] = '100%', ['table-layout'] = 'fixed', }) dataTable:tag('caption') :addClass('notheme') :css({ ['background-color'] = '#f5f5f5', ['font-weight'] = 'bold', ['margin-top'] = '0.2em', }) :wikitext(item:formatStatements('P31').value) local properties = mw.wikibase.orderProperties(item:getProperties()) -- Excluded property table handles local exclusions local excludeProperties_hash = valuesToKeys(excludeProperties) excludeProperties_hash['P31'] = true -- Instance of excludeProperties_hash['P373'] = true -- Commons category excludeProperties_hash['P935'] = true -- Commons gallery excludeProperties_hash['P910'] = true -- Main category of topic excludeProperties_hash['P1792'] = true -- Category of associated people excludeProperties_hash['P9495'] = true -- Category for maps or plans excludeProperties_hash['P1014'] = true -- Category for pictures taken with this camera excludeProperties_hash['P5777'] = true -- Category for the view of the item excludeProperties_hash['P8744'] = true -- Economy of topic excludeProperties_hash['P8745'] = true -- Demographics of topic excludeProperties_hash['P1889'] = true -- Different from local edit_message = mw.message.new('vector-view-edit'):plain() for _, property in pairs(properties) do local datatype = item.claims[property][1].mainsnak.datatype local valueCount = #item:getBestStatements(property) if datatype ~= 'commonsMedia' and datatype ~= 'external-id' and datatype ~= 'quantity' and datatype ~= 'wikibase-property' and datatype ~= 'geo-shape' and datatype ~= 'tabular-data' and not excludeProperties_hash[property] and valueCount > 0 and valueCount <= 5 then local propertyValue = item:formatStatements(property) if propertyValue and propertyValue.value then -- Get the raw value to make it clickable local displayValue = propertyValue.value local claims = item.claims[property] if claims then local linkedValues = {} for _, claim in ipairs(claims) do if claim.mainsnak and claim.mainsnak.datavalue then local value = claim.mainsnak.datavalue.value if type(value) == 'table' and value.id then -- It's a Wikidata item, create a link local entity = mw.wikibase.getEntity(value.id) if entity then local label = entity:getLabel() if label then table.insert(linkedValues, '[[:d:' .. value.id .. '|' .. label .. ']]') else table.insert(linkedValues, '[[:d:' .. value.id .. '|' .. value.id .. ']]') end else table.insert(linkedValues, '[[:d:' .. value.id .. '|' .. value.id .. ']]') end elseif type(value) == 'string' then table.insert(linkedValues, value) elseif type(value) == 'number' then table.insert(linkedValues, tostring(value)) end end end if #linkedValues > 0 then displayValue = table.concat(linkedValues, ', ') end end dataTable:tag('tr') :tag('th') :attr('scope', 'row') :wikitext(lang:ucfirst(propertyValue.label)):done() :tag('td') :wikitext(displayValue) :wikitext('&nbsp;[[File:OOjs UI icon edit-ltr.svg|' .. edit_message .. '|12px|baseline|class=noviewer|link=https://www.wikidata.org/wiki/' .. item.id .. '#' .. property .. ']]') end end end -- Helper function to clean category name local function cleanCategoryName(value) if not value then return nil end if type(value) == 'table' then value = tostring(value) end value = value:gsub("^Category:", "") value = value:gsub("^%s+", ""):gsub("%s+$", "") return value end -- Helper function to get entity label or value local function getEntityLabel(value) if type(value) == 'table' and value.id then local entity = mw.wikibase.getEntity(value.id) if entity then return entity:getLabel() or value.id end return value.id elseif type(value) == 'table' then return tostring(value) end return value end -- Economy of topic (P8744) local economyStatements = item:getBestStatements('P8744') if #economyStatements >= 1 and economyStatements[1].mainsnak.datavalue then local economyValue = economyStatements[1].mainsnak.datavalue.value local displayValue = getEntityLabel(economyValue) if displayValue then dataTable:tag('tr') :tag('th') :attr('scope', 'row') :wikitext('Economy of topic'):done() :tag('td') :wikitext("'''" .. displayValue .. "'''") :wikitext('&nbsp;[[File:OOjs UI icon edit-ltr.svg|' .. edit_message .. '|12px|baseline|class=noviewer|link=https://www.wikidata.org/wiki/' .. item.id .. '#P8744]]') end end -- Demographics of topic (P8745) local demographicsStatements = item:getBestStatements('P8745') if #demographicsStatements >= 1 and demographicsStatements[1].mainsnak.datavalue then local demographicsValue = demographicsStatements[1].mainsnak.datavalue.value local displayValue = getEntityLabel(demographicsValue) if displayValue then dataTable:tag('tr') :tag('th') :attr('scope', 'row') :wikitext('Demographics of topic'):done() :tag('td') :wikitext("'''" .. displayValue .. "'''") :wikitext('&nbsp;[[File:OOjs UI icon edit-ltr.svg|' .. edit_message .. '|12px|baseline|class=noviewer|link=https://www.wikidata.org/wiki/' .. item.id .. '#P8745]]') end end -- Different from (P1889) local differentFromStatements = item:getBestStatements('P1889') if #differentFromStatements >= 1 and differentFromStatements[1].mainsnak.datavalue then local differentFromValue = differentFromStatements[1].mainsnak.datavalue.value local displayValue = getEntityLabel(differentFromValue) if displayValue then dataTable:tag('tr') :tag('th') :attr('scope', 'row') :wikitext('Different from'):done() :tag('td') :wikitext("'''" .. displayValue .. "'''") :wikitext('&nbsp;[[File:OOjs UI icon edit-ltr.svg|' .. edit_message .. '|12px|baseline|class=noviewer|link=https://www.wikidata.org/wiki/' .. item.id .. '#P1889]]') end end -- Commons Gallery (P935) local commonsGalleryStatements = item:getBestStatements('P935') if #commonsGalleryStatements >= 1 and commonsGalleryStatements[1].mainsnak.datavalue then local commonsGallery = commonsGalleryStatements[1].mainsnak.datavalue.value local displayValue = getEntityLabel(commonsGallery) if displayValue then local cleanValue = cleanCategoryName(displayValue) dataTable:tag('tr') :tag('th') :attr('scope', 'row') :wikitext('Commons gallery'):done() :tag('td') :wikitext('[[:commons:' .. cleanValue .. '|' .. cleanValue .. ']]') :wikitext('&nbsp;[[File:OOjs UI icon edit-ltr.svg|' .. edit_message .. '|12px|baseline|class=noviewer|link=https://www.wikidata.org/wiki/' .. item.id .. '#P935]]') end end -- Commons Category (P373) local commonsCategoryStatements = item:getBestStatements('P373') if #commonsCategoryStatements >= 1 and commonsCategoryStatements[1].mainsnak.datavalue then local commonsCat = commonsCategoryStatements[1].mainsnak.datavalue.value local displayValue = getEntityLabel(commonsCat) if displayValue then -- Split categories if multiple (comma separated) local categories = {} for cat in string.gmatch(displayValue, "[^,]+") do local trimmedCat = cat:gsub("^%s+", ""):gsub("%s+$", "") local cleanCat = cleanCategoryName(trimmedCat) categories[#categories + 1] = '[[:commons:Category:' .. cleanCat .. '|' .. cleanCat .. ']]' end local categoryLinksText = table.concat(categories, ' • ') dataTable:tag('tr') :tag('th') :attr('scope', 'row') :wikitext('Commons category'):done() :tag('td') :wikitext(categoryLinksText) :wikitext('&nbsp;[[File:OOjs UI icon edit-ltr.svg|' .. edit_message .. '|12px|baseline|class=noviewer|link=https://www.wikidata.org/wiki/' .. item.id .. '#P373]]') end end -- Map local coordinates_statements = item:getBestStatements('P625') if #coordinates_statements >= 1 and coordinates_statements[1].mainsnak.datavalue and coordinates_statements[1].mainsnak.datavalue.value.globe == 'http://www.wikidata.org/entity/Q2' then -- Build the call to mapframe local latitude = coordinates_statements[1].mainsnak.datavalue.value.latitude local longitude = coordinates_statements[1].mainsnak.datavalue.value.longitude local geojson = { type = 'Feature', geometry = { type = 'Point', coordinates = { longitude, latitude } }, properties = { title = item:getLabel() or mw.title.getCurrentTitle().text, ['marker-symbol'] = 'marker', ['marker-color'] = '#224422', } } databoxRoot:wikitext(frame:extensionTag('mapframe', mw.text.jsonEncode(geojson), { height = 240, width = 240, frameless = 'frameless', align = 'center', latitude = latitude, longitude = longitude, zoom = zoom })) end -- Wikidata Link (Footer) databoxRoot:tag('div') :css({ ['display'] = 'flex', ['align-items'] = 'center', ['justify-content'] = 'center', padding = '0.3em 0', ['width'] = '100%', ['font-size'] = '90%', ['text-align'] = 'center', }) :addClass('databox-from-wikidata-link') :wikitext('[[File:Wikidata-logo.svg|22px|class=noviewer skin-invert|link=https://www.wikidata.org/wiki/' .. item.id .. ']]') :tag('div') :css({ margin = '0 0 0 0.3em' }) :wikitext('[[d:' .. item.id .. '|From Wikidata]]') return tostring(databoxRoot) end return p 5bdvkd90hwgtbjtbzg8cl43ntkqlay9 15560 15559 2026-08-22T10:32:32Z A826 1864 ೧ revisions imported from [[:w:ಮಾಡ್ಯೂಲ್:Databox]] 15559 Scribunto text/plain -- A modified version based on sv.wikipedia.org/wiki/Modul:Databox -- Displays Wikidata properties dynamically inside an infobox. function valuesToKeys(array) local result = {} for _, v in pairs(array) do result[v] = true end return result end local p = {} function p.databox(frame) local args = frame:getParent().args local argsLocal = frame.args local itemId = nil if args.item then itemId = args.item end local useImage = nil if argsLocal.useImage then useImage = argsLocal["useImage"] end -- Option to display aliases below the title (defaults to true) local useAliases = true if argsLocal.useAliases and (argsLocal.useAliases == "false" or argsLocal.useAliases == "no" or argsLocal.useAliases == "0") then useAliases = false end -- local excludeProperties parameter allows excluding specific properties per page if needed local excludeProperties = {} if argsLocal.excludeProperties then for item in string.gmatch(argsLocal.excludeProperties, "[^,]+") do table.insert(excludeProperties, item) end end local lang = mw.language.getContentLanguage() local item = mw.wikibase.getEntity(itemId) if item == nil then mw.addWarning("Wikidata item not found") return "" end local databoxRoot = mw.html.create('div') :addClass('infobox') :css({ float = 'right', border = '1px solid #aaa', ['max-width'] = '250px', padding = '0 0.4em', margin = '0 0 0.4em 0.4em', }) -- Title local titleDiv = databoxRoot:tag('div') :css({ ['text-align'] = 'center', ['background-color'] = '#f5f5f5', padding = '0.5em 0', margin = '0.5em 0', ['font-size'] = '120%', ['font-weight'] = 'bold', }) :wikitext(item:getLabel() or mw.title.getCurrentTitle().text) -- Aliases display (Color set to #6f9f9c) if useAliases and item.aliases then local langCode = lang:getCode() local aliases = item.aliases[langCode] if aliases and #aliases > 0 then local aliasList = {} for _, aliasObj in ipairs(aliases) do table.insert(aliasList, aliasObj.value) end titleDiv:tag('div') :css({ ['font-size'] = '75%', ['font-weight'] = 'normal', ['font-style'] = 'italic', ['color'] = '#6f9f9c', ['margin-top'] = '0.2em' }) :wikitext(table.concat(aliasList, ', ')) end end -- Image local databoxImage = nil if useImage and useImage ~= "" then local allWikidataImages = item:getAllStatements('P18') if #allWikidataImages >= 1 then for _, image in ipairs( allWikidataImages ) do if image.mainsnak.datavalue.value == useImage then databoxImage = useImage break end end end end if databoxImage == nil then local bestWikidataImages = item:getBestStatements('P18') if #bestWikidataImages >= 1 then databoxImage = bestWikidataImages[1].mainsnak.datavalue.value end end if databoxImage then databoxRoot :tag('div') :wikitext('[[File:' .. databoxImage .. '|frameless|240px|center]]') end -- Signature (P109) local signatureImage = nil local signatureImages = item:getBestStatements('P109') if #signatureImages >= 1 then signatureImage = signatureImages[1].mainsnak.datavalue.value end if signatureImage then databoxRoot :tag('div') :css({ ['text-align'] = 'center', ['font-size'] = '90%', ['font-style'] = 'italic', padding = '0.2em 0', }) :wikitext('Signature') databoxRoot :tag('div') :wikitext('[[File:' .. signatureImage .. '|frameless|200px|center]]') end -- Table local dataTable = databoxRoot :tag('table') :css({ ['text-align'] = 'left', ['font-size'] = '90%', ['word-break'] = 'break-word', ['width'] = '100%', ['table-layout'] = 'fixed', }) dataTable:tag('caption') :addClass('notheme') :css({ ['background-color'] = '#f5f5f5', ['font-weight'] = 'bold', ['margin-top'] = '0.2em', }) :wikitext(item:formatStatements('P31').value) local properties = mw.wikibase.orderProperties(item:getProperties()) -- Excluded property table handles local exclusions local excludeProperties_hash = valuesToKeys(excludeProperties) excludeProperties_hash['P31'] = true -- Instance of excludeProperties_hash['P373'] = true -- Commons category excludeProperties_hash['P935'] = true -- Commons gallery excludeProperties_hash['P910'] = true -- Main category of topic excludeProperties_hash['P1792'] = true -- Category of associated people excludeProperties_hash['P9495'] = true -- Category for maps or plans excludeProperties_hash['P1014'] = true -- Category for pictures taken with this camera excludeProperties_hash['P5777'] = true -- Category for the view of the item excludeProperties_hash['P8744'] = true -- Economy of topic excludeProperties_hash['P8745'] = true -- Demographics of topic excludeProperties_hash['P1889'] = true -- Different from local edit_message = mw.message.new('vector-view-edit'):plain() for _, property in pairs(properties) do local datatype = item.claims[property][1].mainsnak.datatype local valueCount = #item:getBestStatements(property) if datatype ~= 'commonsMedia' and datatype ~= 'external-id' and datatype ~= 'quantity' and datatype ~= 'wikibase-property' and datatype ~= 'geo-shape' and datatype ~= 'tabular-data' and not excludeProperties_hash[property] and valueCount > 0 and valueCount <= 5 then local propertyValue = item:formatStatements(property) if propertyValue and propertyValue.value then -- Get the raw value to make it clickable local displayValue = propertyValue.value local claims = item.claims[property] if claims then local linkedValues = {} for _, claim in ipairs(claims) do if claim.mainsnak and claim.mainsnak.datavalue then local value = claim.mainsnak.datavalue.value if type(value) == 'table' and value.id then -- It's a Wikidata item, create a link local entity = mw.wikibase.getEntity(value.id) if entity then local label = entity:getLabel() if label then table.insert(linkedValues, '[[:d:' .. value.id .. '|' .. label .. ']]') else table.insert(linkedValues, '[[:d:' .. value.id .. '|' .. value.id .. ']]') end else table.insert(linkedValues, '[[:d:' .. value.id .. '|' .. value.id .. ']]') end elseif type(value) == 'string' then table.insert(linkedValues, value) elseif type(value) == 'number' then table.insert(linkedValues, tostring(value)) end end end if #linkedValues > 0 then displayValue = table.concat(linkedValues, ', ') end end dataTable:tag('tr') :tag('th') :attr('scope', 'row') :wikitext(lang:ucfirst(propertyValue.label)):done() :tag('td') :wikitext(displayValue) :wikitext('&nbsp;[[File:OOjs UI icon edit-ltr.svg|' .. edit_message .. '|12px|baseline|class=noviewer|link=https://www.wikidata.org/wiki/' .. item.id .. '#' .. property .. ']]') end end end -- Helper function to clean category name local function cleanCategoryName(value) if not value then return nil end if type(value) == 'table' then value = tostring(value) end value = value:gsub("^Category:", "") value = value:gsub("^%s+", ""):gsub("%s+$", "") return value end -- Helper function to get entity label or value local function getEntityLabel(value) if type(value) == 'table' and value.id then local entity = mw.wikibase.getEntity(value.id) if entity then return entity:getLabel() or value.id end return value.id elseif type(value) == 'table' then return tostring(value) end return value end -- Economy of topic (P8744) local economyStatements = item:getBestStatements('P8744') if #economyStatements >= 1 and economyStatements[1].mainsnak.datavalue then local economyValue = economyStatements[1].mainsnak.datavalue.value local displayValue = getEntityLabel(economyValue) if displayValue then dataTable:tag('tr') :tag('th') :attr('scope', 'row') :wikitext('Economy of topic'):done() :tag('td') :wikitext("'''" .. displayValue .. "'''") :wikitext('&nbsp;[[File:OOjs UI icon edit-ltr.svg|' .. edit_message .. '|12px|baseline|class=noviewer|link=https://www.wikidata.org/wiki/' .. item.id .. '#P8744]]') end end -- Demographics of topic (P8745) local demographicsStatements = item:getBestStatements('P8745') if #demographicsStatements >= 1 and demographicsStatements[1].mainsnak.datavalue then local demographicsValue = demographicsStatements[1].mainsnak.datavalue.value local displayValue = getEntityLabel(demographicsValue) if displayValue then dataTable:tag('tr') :tag('th') :attr('scope', 'row') :wikitext('Demographics of topic'):done() :tag('td') :wikitext("'''" .. displayValue .. "'''") :wikitext('&nbsp;[[File:OOjs UI icon edit-ltr.svg|' .. edit_message .. '|12px|baseline|class=noviewer|link=https://www.wikidata.org/wiki/' .. item.id .. '#P8745]]') end end -- Different from (P1889) local differentFromStatements = item:getBestStatements('P1889') if #differentFromStatements >= 1 and differentFromStatements[1].mainsnak.datavalue then local differentFromValue = differentFromStatements[1].mainsnak.datavalue.value local displayValue = getEntityLabel(differentFromValue) if displayValue then dataTable:tag('tr') :tag('th') :attr('scope', 'row') :wikitext('Different from'):done() :tag('td') :wikitext("'''" .. displayValue .. "'''") :wikitext('&nbsp;[[File:OOjs UI icon edit-ltr.svg|' .. edit_message .. '|12px|baseline|class=noviewer|link=https://www.wikidata.org/wiki/' .. item.id .. '#P1889]]') end end -- Commons Gallery (P935) local commonsGalleryStatements = item:getBestStatements('P935') if #commonsGalleryStatements >= 1 and commonsGalleryStatements[1].mainsnak.datavalue then local commonsGallery = commonsGalleryStatements[1].mainsnak.datavalue.value local displayValue = getEntityLabel(commonsGallery) if displayValue then local cleanValue = cleanCategoryName(displayValue) dataTable:tag('tr') :tag('th') :attr('scope', 'row') :wikitext('Commons gallery'):done() :tag('td') :wikitext('[[:commons:' .. cleanValue .. '|' .. cleanValue .. ']]') :wikitext('&nbsp;[[File:OOjs UI icon edit-ltr.svg|' .. edit_message .. '|12px|baseline|class=noviewer|link=https://www.wikidata.org/wiki/' .. item.id .. '#P935]]') end end -- Commons Category (P373) local commonsCategoryStatements = item:getBestStatements('P373') if #commonsCategoryStatements >= 1 and commonsCategoryStatements[1].mainsnak.datavalue then local commonsCat = commonsCategoryStatements[1].mainsnak.datavalue.value local displayValue = getEntityLabel(commonsCat) if displayValue then -- Split categories if multiple (comma separated) local categories = {} for cat in string.gmatch(displayValue, "[^,]+") do local trimmedCat = cat:gsub("^%s+", ""):gsub("%s+$", "") local cleanCat = cleanCategoryName(trimmedCat) categories[#categories + 1] = '[[:commons:Category:' .. cleanCat .. '|' .. cleanCat .. ']]' end local categoryLinksText = table.concat(categories, ' • ') dataTable:tag('tr') :tag('th') :attr('scope', 'row') :wikitext('Commons category'):done() :tag('td') :wikitext(categoryLinksText) :wikitext('&nbsp;[[File:OOjs UI icon edit-ltr.svg|' .. edit_message .. '|12px|baseline|class=noviewer|link=https://www.wikidata.org/wiki/' .. item.id .. '#P373]]') end end -- Map local coordinates_statements = item:getBestStatements('P625') if #coordinates_statements >= 1 and coordinates_statements[1].mainsnak.datavalue and coordinates_statements[1].mainsnak.datavalue.value.globe == 'http://www.wikidata.org/entity/Q2' then -- Build the call to mapframe local latitude = coordinates_statements[1].mainsnak.datavalue.value.latitude local longitude = coordinates_statements[1].mainsnak.datavalue.value.longitude local geojson = { type = 'Feature', geometry = { type = 'Point', coordinates = { longitude, latitude } }, properties = { title = item:getLabel() or mw.title.getCurrentTitle().text, ['marker-symbol'] = 'marker', ['marker-color'] = '#224422', } } databoxRoot:wikitext(frame:extensionTag('mapframe', mw.text.jsonEncode(geojson), { height = 240, width = 240, frameless = 'frameless', align = 'center', latitude = latitude, longitude = longitude, zoom = zoom })) end -- Wikidata Link (Footer) databoxRoot:tag('div') :css({ ['display'] = 'flex', ['align-items'] = 'center', ['justify-content'] = 'center', padding = '0.3em 0', ['width'] = '100%', ['font-size'] = '90%', ['text-align'] = 'center', }) :addClass('databox-from-wikidata-link') :wikitext('[[File:Wikidata-logo.svg|22px|class=noviewer skin-invert|link=https://www.wikidata.org/wiki/' .. item.id .. ']]') :tag('div') :css({ margin = '0 0 0 0.3em' }) :wikitext('[[d:' .. item.id .. '|From Wikidata]]') return tostring(databoxRoot) end return p 5bdvkd90hwgtbjtbzg8cl43ntkqlay9 ಟೆಂಪ್ಲೇಟು:Databox/doc 10 4458 15561 2026-07-26T16:19:52Z w>A826 0 /* ಉದಾಹರಣೆಗಳು */ 15561 wikitext text/x-wiki {{Documentation subpage|[[Template:Databox]]|override=doc}} {{#ifeq:{{NAMESPACE}}|Template|{{Lua|Module:Databox}}}} ಈ ಮಾಡ್ಯೂಲ್ ವಿಕಿಡೇಟಾ (Wikidata) ಆಧಾರಿತ ಅತ್ಯಂತ ಸರಳವಾದ ಇನ್ಫೋಬಾಕ್ಸ್ (infobox) ವ್ಯವಸ್ಥೆಯನ್ನು ಒದಗಿಸುತ್ತದೆ. [[File:Wikidata Reuse Days 2022 - Databox.pdf|thumb|ವಿಕಿಡೇಟಾ ಮರುಬಳಕೆ ದಿನಗಳು 2022 ರಲ್ಲಿ ನೀಡಲಾದ ಡೇಟಾಬಾಕ್ಸ್‌ನ ಪರಿಚಯಾತ್ಮಕ ಪ್ರಸ್ತುತಿ]] ಇದು ಸಂಪೂರ್ಣವಾಗಿ ಸ್ವಯಂಚಾಲಿತವಾಗಿದೆ, ಇದನ್ನು ಬಳಸಲು ಯಾವುದೇ ಸಂರಚನೆಯ ಅಗತ್ಯವಿಲ್ಲ ಮತ್ತು ಅಸ್ತಿತ್ವದ ಪ್ರಕಾರಕ್ಕೆ (ವ್ಯಕ್ತಿ, ಸ್ಥಳ...) ಅನುಗುಣವಾಗಿ ಯಾವುದೇ ಬದಲಾವಣೆಗಳನ್ನು ಹೊಂದುವುದಿಲ್ಲ. == ಇದು ಹೇಗೆ ಕೆಲಸ ಮಾಡುತ್ತದೆ? == ಈ ಮಾಡ್ಯೂಲ್ [[Template:Databox|Databox template]] ನ ಬ್ಯಾಕೆಂಡ್ ಕೋಡ್ ಆಗಿದೆ. ಇದು ಪ್ರಸ್ತುತ ಪುಟಕ್ಕೆ ಲಿಂಕ್ ಮಾಡಲಾದ ವಿಕಿಡೇಟಾ ಐಟಂ ಅಥವಾ 'item' ಪ್ಯಾರಾಮೀಟರ್‌ನಲ್ಲಿ ಭರ್ತಿ ಮಾಡಲಾದ ಐಟಂ ಐಡಿಯನ್ನು ಬಳಸಿಕೊಂಡು ಸ್ವಯಂಚಾಲಿತವಾಗಿ ಇನ್ಫೋಬಾಕ್ಸ್ ಅನ್ನು ನಿರ್ಮಿಸುತ್ತದೆ. ಇದರ ಮೂಲ ಅಲ್ಗಾರಿದಮ್ ಹೀಗಿದೆ: * ಇನ್ಫೋಬಾಕ್ಸ್ ಶೀರ್ಷಿಕೆಗಾಗಿ ಐಟಂನ ಲೇಬಲ್ ಅನ್ನು ಬಳಸಿ, ಅಥವಾ ಯಾವುದೂ ಇಲ್ಲದಿದ್ದರೆ, ಪುಟದ ಶೀರ್ಷಿಕೆಯನ್ನು ಬಳಸಿ. * ಮುಖ್ಯ ಚಿತ್ರಕ್ಕಾಗಿ {{P|18}} ರ ಮೌಲ್ಯವನ್ನು ಬಳಸಿ. * ಡೇಟಾ ಟೇಬಲ್ ಶೀರ್ಷಿಕೆಗಾಗಿ {{P|31}} ರ ಮೌಲ್ಯವನ್ನು ಬಳಸಿ. * ಐಟಂ ಬಳಸುವ ಎಲ್ಲಾ ಪ್ರಾಪರ್ಟಿಗಳನ್ನು (Properties) ತೆಗೆದುಕೊಂಡು, ಅವುಗಳನ್ನು [[MediaWiki:Wikibase-SortedProperties]] ಪ್ರಕಾರ ವಿಂಗಡಿಸಿ, ಮತ್ತು ಪ್ರತಿಯೊಂದಕ್ಕೂ: ** ಪ್ರಾಪರ್ಟಿಯು {{datatype|external-id}}, {{datatype|commonsMedia}} ಅಥವಾ {{datatype|quantity}} ಡೇಟಾ ಪ್ರಕಾರವನ್ನು ಹೊಂದಿದ್ದರೆ, ಏನನ್ನೂ ಪ್ರದರ್ಶಿಸಬೇಡಿ. ** ಪ್ರಾಪರ್ಟಿಯು ಮಾಡ್ಯೂಲ್‌ನ 'site_excluded_properties' ಅರ್ರೇನಲ್ಲಿದ್ದರೆ, ಏನನ್ನೂ ಪ್ರದರ್ಶಿಸಬೇಡಿ (ಇನ್ಫೋಬಾಕ್ಸ್‌ಗಳಲ್ಲಿ ಪ್ರದರ್ಶಿಸಲು ಅಷ್ಟು ಪ್ರಸ್ತುತವಲ್ಲದ ಪ್ರಾಪರ್ಟಿಗಳನ್ನು ಫಿಲ್ಟರ್ ಮಾಡಲು ಇದನ್ನು ಮಾಡಲಾಗುತ್ತದೆ). ** ಪ್ರಾಪರ್ಟಿಯು 5 ಕ್ಕಿಂತ ಹೆಚ್ಚು ಮೌಲ್ಯಗಳನ್ನು ಹೊಂದಿದ್ದರೆ ಏನನ್ನೂ ಪ್ರದರ್ಶಿಸಬೇಡಿ (ಇನ್ಫೋಬಾಕ್ಸ್‌ನಲ್ಲಿ ದೀರ್ಘ ಪಟ್ಟಿಗಳನ್ನು ತಪ್ಪಿಸಲು). ** "ಅತ್ಯುತ್ತಮ" ಶ್ರೇಯಾಂಕವನ್ನು ಹೊಂದಿರುವ ಮೌಲ್ಯಗಳನ್ನು ಪ್ರದರ್ಶಿಸಲು ಡಿಫಾಲ್ಟ್ [[mw:Extension:Wikibase client|Wikibase]] ರೆಂಡರಿಂಗ್ ವ್ಯವಸ್ಥೆಯನ್ನು ಬಳಸಿ. * {{P|625}} ಗೆ ಮೌಲ್ಯವಿದ್ದರೆ, [[mw:Help:Extension:Kartographer|Kartographer]] ಬಳಸಿ ನಕ್ಷೆಯನ್ನು ಪ್ರದರ್ಶಿಸಿ. == ಅನುಸ್ಥಾಪನಾ ಸೂಚನೆಗಳು == '''ಮಾಡ್ಯೂಲ್ ಕೋಡ್ ಸೇರಿಸಿ''' 1. ಡೇಟಾಬಾಕ್ಸ್ ಮಾಡ್ಯೂಲ್ ಅನ್ನು ನಿಮ್ಮ ವಿಕಿಗೆ ಕಾಪಿ-ಪೇಸ್ಟ್ ಮಾಡಿ * <code>[[d:Module:Databox#com-module-code|Module:Databox-Code]]</code> ಗೆ ಹೋಗಿ ಮತ್ತು ಕೋಡ್ ಬ್ಲಾಕ್‌ನಲ್ಲಿರುವ ಎಲ್ಲಾ ವಿಷಯಗಳನ್ನು ಕಾಪಿ ಮಾಡಿ. * ಈ ವಿಷಯಗಳನ್ನು ನಿಮ್ಮ ಸ್ವಂತ ವಿಕಿಯ <code>Module:Databox</code> ಪುಟಕ್ಕೆ ಪೇಸ್ಟ್ ಮಾಡಿ (ಇನ್ನೂ ಇಲ್ಲದಿದ್ದರೆ, ಒಂದನ್ನು ರಚಿಸಿ). 2. ಹೊಸದಾಗಿ ರಚಿಸಲಾದ ಪುಟದ (Module:Databox) ಸೈಟ್‌ಲಿಂಕ್ ಅನ್ನು ವಿಕಿಡೇಟಾ ಐಟಂ <code>Module:Databox</code> ([[d:Q53931871|Q53931871]]) ಗೆ ಸೇರಿಸಿ. '''ಟೆಂಪ್ಲೇಟ್ ಕೋಡ್ ಸೇರಿಸಿ''' 3. ಕೆಳಗಿನ ಟೆಂಪ್ಲೇಟ್ ಕೋಡ್ ಅನ್ನು ನಿಮ್ಮ ಸ್ವಂತ ವಿಕಿ <code>Template:Databox</code> ಪುಟಕ್ಕೆ ಕಾಪಿ-ಪೇಸ್ಟ್ ಮಾಡಿ. {{#invoke:Databox|databox|useImage={{{useImage|}}}|excludeProperties={{{excludeProperties|}}}}} 4. ಹೊಸದಾಗಿ ರಚಿಸಲಾದ Template:Databox ಪುಟವನ್ನು ವಿಕಿಡೇಟಾ ಐಟಂ <code>Template:Databox</code> ([[d:Q20702632|Q20702632]]) ಗೆ ಸಂಪರ್ಕಿಸಿ. 5. ಟೆಂಪ್ಲೇಟ್ ಅನ್ನು ಪರೀಕ್ಷಿಸಿ * ವಿಕಿಡೇಟಾ ಐಟಂಗೆ ಸಂಪರ್ಕಗೊಂಡಿರುವ ಲೇಖನವನ್ನು ಎಡಿಟ್ ಮಾಡಿ, ಉದಾಹರಣೆಗೆ ನಿಮ್ಮ ದೇಶದ ರಾಜಧಾನಿ ನಗರ. * ಎಡಿಟ್ ಸೋರ್ಸ್ (edit source) ವೀಕ್ಷಣೆಗೆ ಹೋಗಿ ಮತ್ತು ಪುಟದ ಮೇಲ್ಭಾಗದಲ್ಲಿ <nowiki>{{Databox}}</nowiki> ಕೋಡ್ ಸೇರಿಸಿ. * ಪುಟದಲ್ಲಿ ಡೇಟಾಬಾಕ್ಸ್ ಕಾಣಿಸಿಕೊಂಡಿದೆಯೇ ಎಂದು ಪರಿಶೀಲಿಸಲು ಮುನ್ನೋಟ (Preview) ನೋಡಿ, ತದನಂತರ ಬದಲಾವಣೆಗಳನ್ನು ಉಳಿಸಲು ಪ್ರಕಟಿಸಿ. * ಅಭಿನಂದನೆಗಳು, ನೀವು ನಿಮ್ಮ ಮೊದಲ ಡೇಟಾಬಾಕ್ಸ್ ಅನ್ನು ಸ್ಥಾಪಿಸಿದ್ದೀರಿ! == ಡೇಟಾಬಾಕ್ಸ್ ಡೇಟಾವನ್ನು ಎಡಿಟ್ ಮಾಡಿ == ಕೆಲವೊಮ್ಮೆ ಡೇಟಾ ತಪ್ಪಾಗಿರಬಹುದು ಅಥವಾ ಹಳೆಯದಾಗಿರಬಹುದು ಮತ್ತು ಅದನ್ನು ಬದಲಾಯಿಸುವ ಅಥವಾ ನವೀಕರಿಸುವ ಅಗತ್ಯವಿರುತ್ತದೆ, ಆದರೆ ನೀವು ಅದನ್ನು ಪ್ರಸ್ತುತ ಪುಟದಿಂದ ಮಾಡಲು ಸಾಧ್ಯವಿಲ್ಲ. ಡೇಟಾಬಾಕ್ಸ್‌ನಲ್ಲಿ ಕಂಡುಬರುವ ಡೇಟಾವನ್ನು ಸ್ಥಳೀಯವಾಗಿ ಸಂಗ್ರಹಿಸಲಾಗಿರುವುದಿಲ್ಲ, ಇದನ್ನು [[d:|Wikidata]] ನಿಂದ ಪಡೆಯಲಾಗುತ್ತದೆ. '''ಡೇಟಾಬಾಕ್ಸ್‌ನಲ್ಲಿ ತೋರಿಸಲಾದ ಡೇಟಾವನ್ನು ಬದಲಾಯಿಸಲು ಅಥವಾ ಎಡಿಟ್ ಮಾಡಲು:''' 1. ಡೇಟಾಬಾಕ್ಸ್‌ನಲ್ಲಿರುವ ಹೇಳಿಕೆಯ (statement) ಪಕ್ಕದಲ್ಲಿರುವ ಪೆನ್ಸಿಲ್ ಐಕಾನ್ [[File:OOjs UI icon edit-ltr-gray.svg|20px]] ಮೇಲೆ ಕ್ಲಿಕ್ ಮಾಡಿ. 2. ಇದು ನಿಮ್ಮನ್ನು ವಿಕಿಡೇಟಾ ಐಟಂನಲ್ಲಿ ಆ ಹೇಳಿಕೆಯನ್ನು ಎಲ್ಲಿ ಸಂಗ್ರಹಿಸಲಾಗಿದೆ ಎಂಬುದಕ್ಕೆ ಕರೆದೊಯ್ಯುತ್ತದೆ. 3. ಸ್ಟೇಟ್‌ಮೆಂಟ್ ಬಾಕ್ಸ್‌ನ ಬದಿಯಲ್ಲಿರುವ ಪೆನ್ಸಿಲ್ ಐಕಾನ್ ಮೇಲೆ ಮತ್ತೆ ಕ್ಲಿಕ್ ಮಾಡಿ. ಇದು ವಿಕಿಡೇಟಾದಲ್ಲಿ ಎಡಿಟ್ ಮೋಡ್ ಅನ್ನು ತೆರೆಯುತ್ತದೆ. * ಇನ್ಪುಟ್ ಫೀಲ್ಡ್‌ನಲ್ಲಿ ಹೊಸ ಮೌಲ್ಯವನ್ನು ನಮೂದಿಸಿ. ಅಗತ್ಯವಿದ್ದಲ್ಲಿ ಕ್ವಾಲಿಫೈಯರ್ ಅಥವಾ ಉಲ್ಲೇಖಗಳನ್ನು ಸೇರಿಸಿ. * ಮೌಲ್ಯವು ಹಳೆಯದಾಗಿದ್ದರೂ ಇನ್ನೂ ಸರಿಯಾಗಿದ್ದರೆ (ಜನಗಣತಿ ಡೇಟಾದಂತೆ), ಪೆನ್ಸಿಲ್ ಐಕಾನ್ ಬದಲಿಗೆ ಅದರ ಬಲಭಾಗದಲ್ಲಿರುವ '+' ಐಕಾನ್ ಕ್ಲಿಕ್ ಮಾಡಿ ಮತ್ತು ಹೊಸ ಮೌಲ್ಯವನ್ನು ನಮೂದಿಸಿ. 4. ಹೇಳಿಕೆಯನ್ನು ಪ್ರಕಟಿಸಲು ಚೆಕ್‌ಮಾರ್ಕ್ [[File:Ic check 36px.svg|20px]] ಬಟನ್ ಕ್ಲಿಕ್ ಮಾಡಿ. ಡೇಟಾಬಾಕ್ಸ್ ತಕ್ಷಣವೇ ನವೀಕರಣಗೊಳ್ಳುತ್ತದೆ ಮತ್ತು ಹೊಸ ಮಾಹಿತಿ ಕಾಣಿಸಿಕೊಳ್ಳುತ್ತದೆ. === ಟಿಪ್ಪಣಿಗಳು === <references group=a/> == ಉದಾಹರಣೆಗಳು == {{{!}} class="wikitable" {{!}} {{Databox|item=Q10725594}} {{Databox|item=Q13365715}} {{!}} {{Databox|item=Q153}} {{!}} {{Databox|item=Q2513}} {{!}} {{Databox|item=Q3030}} {{!}} {{Databox|item=Q7066}} {{!-}} {{!}} {{Databox|item=Q192724}} {{!}} {{Databox|item=Q67}} {{!}} {{Databox|item=Q143}} {{!}} {{Databox|item=Q64}} {{!}} {{Databox|item=Q42}} {{!}}} <templatedata> { "params": { "from": { "description": "ಪುಟಕ್ಕೆ ಲಿಂಕ್ ಮಾಡಲಾದ ವಿಕಿಡೇಟಾ ಐಟಂ ಬದಲಿಗೆ ನಿರ್ದಿಷ್ಟ ವಿಕಿಡೇಟಾ ಐಟಂನಿಂದ (Q123) ಡೇಟಾವನ್ನು ಹಿಂಪಡೆಯಲು ಡೇಟಾಬಾಕ್ಸ್ ಅನ್ನು ಒತ್ತಾಯಿಸುತ್ತದೆ.", "type": "string" }, "useImage": { "description": "ವಿಕಿಡೇಟಾ ಎಂಟಿಟಿಯಿಂದ ಬಳಸಲು ಆದ್ಯತೆಯ ಚಿತ್ರದ ಫೈಲ್ ಹೆಸರು", "type": "string" }, "excludeProperties": { "description": "ಡೇಟಾಬಾಕ್ಸ್‌ನಿಂದ ತೆಗೆದುಹಾಕಬೇಕಾದ ವಿಕಿಡೇಟಾ ಪ್ರಾಪರ್ಟಿ ಐಡಿಗಳ ಕಾಮಾ ಬೇರ್ಪಡಿಸಿದ ಪಟ್ಟಿ", "type": "string" } } } </templatedata> === ವಿಕಿಟೆಕ್ಸ್ಟ್ ಡೇಟಾಬಾಕ್ಸ್ ಉದಾಹರಣೆಗಳು === ಕೆಳಗಿನ ಉದಾಹರಣೆಗಳು ಎಡಿಟ್ ಸೋರ್ಸ್ ವೀಕ್ಷಣೆಯಲ್ಲಿ ಡೇಟಾಬಾಕ್ಸ್ ಟೆಂಪ್ಲೇಟ್ ಹೇಗೆ ಕಾಣಿಸಬಹುದು ಎಂಬುದನ್ನು ತೋರಿಸುತ್ತವೆ. * <code><nowiki>{{Databox}}</nowiki></code> :ಡಿಫಾಲ್ಟ್ ಆಯ್ಕೆ. ಇದು ಪುಟಕ್ಕೆ ಸಂಪರ್ಕಗೊಂಡಿರುವ ವಿಕಿಡೇಟಾ ಐಟಂನಿಂದ ಡೇಟಾವನ್ನು ಹಿಂಪಡೆಯುತ್ತದೆ. * <code><nowiki>{{Databox|from=Q123}}</nowiki></code> :ನಿರ್ದಿಷ್ಟಪಡಿಸಿದ ವಿಕಿಡೇಟಾ ಐಟಂನಿಂದ ಡೇಟಾವನ್ನು ಪಡೆಯಲು ಡೇಟಾಬಾಕ್ಸ್ ಅನ್ನು ಒತ್ತಾಯಿಸುತ್ತದೆ. * <code><nowiki>{{Databox|useImage=filename.jpg}}</nowiki></code> :ಡೇಟಾಬಾಕ್ಸ್‌ನಲ್ಲಿ ಪ್ರದರ್ಶಿಸಲು ಇನ್ನೊಂದು ಚಿತ್ರವನ್ನು (P18) ಹಸ್ತಚಾಲಿತವಾಗಿ ನಿರ್ದಿಷ್ಟಪಡಿಸಿ. * <code><nowiki>{{Databox|excludeProperties=P123}}</nowiki></code> :ಪ್ರಸ್ತುತ ಡೇಟಾಬಾಕ್ಸ್‌ನಲ್ಲಿ ತೋರಿಸಬಾರದ ವಿಕಿಡೇಟಾ ಪ್ರಾಪರ್ಟಿಗಳ (PID ಗಳು) ಪಟ್ಟಿಯನ್ನು ನಿರ್ದಿಷ್ಟಪಡಿಸಿ. * <code><nowiki>{{Databox|useImage=filename.jpg|excludeProperties=P123}}</nowiki></code> :ಪ್ಯಾರಾಮೀಟರ್‌ಗಳನ್ನು ಸಂಯೋಜಿಸುವುದು ವಿಷಯದ ಮೇಲೆ ಹೆಚ್ಚಿನ ನಿಯಂತ್ರಣಕ್ಕೆ ಅನುವು ಮಾಡಿಕೊಡುತ್ತದೆ. == ಇದನ್ನೂ ನೋಡಿ == * [[:ru:Template:Универсальная карточка]] - ರಷ್ಯನ್ ವಿಕಿಪೀಡಿಯಾದಲ್ಲಿರುವ ಇದೇ ರೀತಿಯ ಆದರೆ ಹೆಚ್ಚು ಅಭಿವೃದ್ಧಿ ಹೊಂದಿದ ಟೆಂಪ್ಲೇಟ್. * [[:en:Template:Infobox person/Wikidata]] - ಇಂಗ್ಲಿಷ್ ವಿಕಿಪೀಡಿಯಾದಲ್ಲಿ ಕೇವಲ ವ್ಯಕ್ತಿಗಳಿಗಾಗಿ ಇರುವ ಇದೇ ರೀತಿಯ ಟೆಂಪ್ಲೇಟ್. * [[:commons:Template:Wikidata Infobox]] - ಕಾಮನ್ಸ್‌ನ ಸಮಾನ ರೂಪ; ಹೆಚ್ಚಾಗಿ ವರ್ಗಗಳಿಗಾಗಿ (categories) ಬಳಸಲಾಗುತ್ತದೆ. b4li9xe9cq98tcphm272v46pbz32wvv 15562 15561 2026-08-22T10:32:41Z A826 1864 ೧ revisions imported from [[:w:ಟೆಂಪ್ಲೇಟು:Databox/doc]] 15561 wikitext text/x-wiki {{Documentation subpage|[[Template:Databox]]|override=doc}} {{#ifeq:{{NAMESPACE}}|Template|{{Lua|Module:Databox}}}} ಈ ಮಾಡ್ಯೂಲ್ ವಿಕಿಡೇಟಾ (Wikidata) ಆಧಾರಿತ ಅತ್ಯಂತ ಸರಳವಾದ ಇನ್ಫೋಬಾಕ್ಸ್ (infobox) ವ್ಯವಸ್ಥೆಯನ್ನು ಒದಗಿಸುತ್ತದೆ. [[File:Wikidata Reuse Days 2022 - Databox.pdf|thumb|ವಿಕಿಡೇಟಾ ಮರುಬಳಕೆ ದಿನಗಳು 2022 ರಲ್ಲಿ ನೀಡಲಾದ ಡೇಟಾಬಾಕ್ಸ್‌ನ ಪರಿಚಯಾತ್ಮಕ ಪ್ರಸ್ತುತಿ]] ಇದು ಸಂಪೂರ್ಣವಾಗಿ ಸ್ವಯಂಚಾಲಿತವಾಗಿದೆ, ಇದನ್ನು ಬಳಸಲು ಯಾವುದೇ ಸಂರಚನೆಯ ಅಗತ್ಯವಿಲ್ಲ ಮತ್ತು ಅಸ್ತಿತ್ವದ ಪ್ರಕಾರಕ್ಕೆ (ವ್ಯಕ್ತಿ, ಸ್ಥಳ...) ಅನುಗುಣವಾಗಿ ಯಾವುದೇ ಬದಲಾವಣೆಗಳನ್ನು ಹೊಂದುವುದಿಲ್ಲ. == ಇದು ಹೇಗೆ ಕೆಲಸ ಮಾಡುತ್ತದೆ? == ಈ ಮಾಡ್ಯೂಲ್ [[Template:Databox|Databox template]] ನ ಬ್ಯಾಕೆಂಡ್ ಕೋಡ್ ಆಗಿದೆ. ಇದು ಪ್ರಸ್ತುತ ಪುಟಕ್ಕೆ ಲಿಂಕ್ ಮಾಡಲಾದ ವಿಕಿಡೇಟಾ ಐಟಂ ಅಥವಾ 'item' ಪ್ಯಾರಾಮೀಟರ್‌ನಲ್ಲಿ ಭರ್ತಿ ಮಾಡಲಾದ ಐಟಂ ಐಡಿಯನ್ನು ಬಳಸಿಕೊಂಡು ಸ್ವಯಂಚಾಲಿತವಾಗಿ ಇನ್ಫೋಬಾಕ್ಸ್ ಅನ್ನು ನಿರ್ಮಿಸುತ್ತದೆ. ಇದರ ಮೂಲ ಅಲ್ಗಾರಿದಮ್ ಹೀಗಿದೆ: * ಇನ್ಫೋಬಾಕ್ಸ್ ಶೀರ್ಷಿಕೆಗಾಗಿ ಐಟಂನ ಲೇಬಲ್ ಅನ್ನು ಬಳಸಿ, ಅಥವಾ ಯಾವುದೂ ಇಲ್ಲದಿದ್ದರೆ, ಪುಟದ ಶೀರ್ಷಿಕೆಯನ್ನು ಬಳಸಿ. * ಮುಖ್ಯ ಚಿತ್ರಕ್ಕಾಗಿ {{P|18}} ರ ಮೌಲ್ಯವನ್ನು ಬಳಸಿ. * ಡೇಟಾ ಟೇಬಲ್ ಶೀರ್ಷಿಕೆಗಾಗಿ {{P|31}} ರ ಮೌಲ್ಯವನ್ನು ಬಳಸಿ. * ಐಟಂ ಬಳಸುವ ಎಲ್ಲಾ ಪ್ರಾಪರ್ಟಿಗಳನ್ನು (Properties) ತೆಗೆದುಕೊಂಡು, ಅವುಗಳನ್ನು [[MediaWiki:Wikibase-SortedProperties]] ಪ್ರಕಾರ ವಿಂಗಡಿಸಿ, ಮತ್ತು ಪ್ರತಿಯೊಂದಕ್ಕೂ: ** ಪ್ರಾಪರ್ಟಿಯು {{datatype|external-id}}, {{datatype|commonsMedia}} ಅಥವಾ {{datatype|quantity}} ಡೇಟಾ ಪ್ರಕಾರವನ್ನು ಹೊಂದಿದ್ದರೆ, ಏನನ್ನೂ ಪ್ರದರ್ಶಿಸಬೇಡಿ. ** ಪ್ರಾಪರ್ಟಿಯು ಮಾಡ್ಯೂಲ್‌ನ 'site_excluded_properties' ಅರ್ರೇನಲ್ಲಿದ್ದರೆ, ಏನನ್ನೂ ಪ್ರದರ್ಶಿಸಬೇಡಿ (ಇನ್ಫೋಬಾಕ್ಸ್‌ಗಳಲ್ಲಿ ಪ್ರದರ್ಶಿಸಲು ಅಷ್ಟು ಪ್ರಸ್ತುತವಲ್ಲದ ಪ್ರಾಪರ್ಟಿಗಳನ್ನು ಫಿಲ್ಟರ್ ಮಾಡಲು ಇದನ್ನು ಮಾಡಲಾಗುತ್ತದೆ). ** ಪ್ರಾಪರ್ಟಿಯು 5 ಕ್ಕಿಂತ ಹೆಚ್ಚು ಮೌಲ್ಯಗಳನ್ನು ಹೊಂದಿದ್ದರೆ ಏನನ್ನೂ ಪ್ರದರ್ಶಿಸಬೇಡಿ (ಇನ್ಫೋಬಾಕ್ಸ್‌ನಲ್ಲಿ ದೀರ್ಘ ಪಟ್ಟಿಗಳನ್ನು ತಪ್ಪಿಸಲು). ** "ಅತ್ಯುತ್ತಮ" ಶ್ರೇಯಾಂಕವನ್ನು ಹೊಂದಿರುವ ಮೌಲ್ಯಗಳನ್ನು ಪ್ರದರ್ಶಿಸಲು ಡಿಫಾಲ್ಟ್ [[mw:Extension:Wikibase client|Wikibase]] ರೆಂಡರಿಂಗ್ ವ್ಯವಸ್ಥೆಯನ್ನು ಬಳಸಿ. * {{P|625}} ಗೆ ಮೌಲ್ಯವಿದ್ದರೆ, [[mw:Help:Extension:Kartographer|Kartographer]] ಬಳಸಿ ನಕ್ಷೆಯನ್ನು ಪ್ರದರ್ಶಿಸಿ. == ಅನುಸ್ಥಾಪನಾ ಸೂಚನೆಗಳು == '''ಮಾಡ್ಯೂಲ್ ಕೋಡ್ ಸೇರಿಸಿ''' 1. ಡೇಟಾಬಾಕ್ಸ್ ಮಾಡ್ಯೂಲ್ ಅನ್ನು ನಿಮ್ಮ ವಿಕಿಗೆ ಕಾಪಿ-ಪೇಸ್ಟ್ ಮಾಡಿ * <code>[[d:Module:Databox#com-module-code|Module:Databox-Code]]</code> ಗೆ ಹೋಗಿ ಮತ್ತು ಕೋಡ್ ಬ್ಲಾಕ್‌ನಲ್ಲಿರುವ ಎಲ್ಲಾ ವಿಷಯಗಳನ್ನು ಕಾಪಿ ಮಾಡಿ. * ಈ ವಿಷಯಗಳನ್ನು ನಿಮ್ಮ ಸ್ವಂತ ವಿಕಿಯ <code>Module:Databox</code> ಪುಟಕ್ಕೆ ಪೇಸ್ಟ್ ಮಾಡಿ (ಇನ್ನೂ ಇಲ್ಲದಿದ್ದರೆ, ಒಂದನ್ನು ರಚಿಸಿ). 2. ಹೊಸದಾಗಿ ರಚಿಸಲಾದ ಪುಟದ (Module:Databox) ಸೈಟ್‌ಲಿಂಕ್ ಅನ್ನು ವಿಕಿಡೇಟಾ ಐಟಂ <code>Module:Databox</code> ([[d:Q53931871|Q53931871]]) ಗೆ ಸೇರಿಸಿ. '''ಟೆಂಪ್ಲೇಟ್ ಕೋಡ್ ಸೇರಿಸಿ''' 3. ಕೆಳಗಿನ ಟೆಂಪ್ಲೇಟ್ ಕೋಡ್ ಅನ್ನು ನಿಮ್ಮ ಸ್ವಂತ ವಿಕಿ <code>Template:Databox</code> ಪುಟಕ್ಕೆ ಕಾಪಿ-ಪೇಸ್ಟ್ ಮಾಡಿ. {{#invoke:Databox|databox|useImage={{{useImage|}}}|excludeProperties={{{excludeProperties|}}}}} 4. ಹೊಸದಾಗಿ ರಚಿಸಲಾದ Template:Databox ಪುಟವನ್ನು ವಿಕಿಡೇಟಾ ಐಟಂ <code>Template:Databox</code> ([[d:Q20702632|Q20702632]]) ಗೆ ಸಂಪರ್ಕಿಸಿ. 5. ಟೆಂಪ್ಲೇಟ್ ಅನ್ನು ಪರೀಕ್ಷಿಸಿ * ವಿಕಿಡೇಟಾ ಐಟಂಗೆ ಸಂಪರ್ಕಗೊಂಡಿರುವ ಲೇಖನವನ್ನು ಎಡಿಟ್ ಮಾಡಿ, ಉದಾಹರಣೆಗೆ ನಿಮ್ಮ ದೇಶದ ರಾಜಧಾನಿ ನಗರ. * ಎಡಿಟ್ ಸೋರ್ಸ್ (edit source) ವೀಕ್ಷಣೆಗೆ ಹೋಗಿ ಮತ್ತು ಪುಟದ ಮೇಲ್ಭಾಗದಲ್ಲಿ <nowiki>{{Databox}}</nowiki> ಕೋಡ್ ಸೇರಿಸಿ. * ಪುಟದಲ್ಲಿ ಡೇಟಾಬಾಕ್ಸ್ ಕಾಣಿಸಿಕೊಂಡಿದೆಯೇ ಎಂದು ಪರಿಶೀಲಿಸಲು ಮುನ್ನೋಟ (Preview) ನೋಡಿ, ತದನಂತರ ಬದಲಾವಣೆಗಳನ್ನು ಉಳಿಸಲು ಪ್ರಕಟಿಸಿ. * ಅಭಿನಂದನೆಗಳು, ನೀವು ನಿಮ್ಮ ಮೊದಲ ಡೇಟಾಬಾಕ್ಸ್ ಅನ್ನು ಸ್ಥಾಪಿಸಿದ್ದೀರಿ! == ಡೇಟಾಬಾಕ್ಸ್ ಡೇಟಾವನ್ನು ಎಡಿಟ್ ಮಾಡಿ == ಕೆಲವೊಮ್ಮೆ ಡೇಟಾ ತಪ್ಪಾಗಿರಬಹುದು ಅಥವಾ ಹಳೆಯದಾಗಿರಬಹುದು ಮತ್ತು ಅದನ್ನು ಬದಲಾಯಿಸುವ ಅಥವಾ ನವೀಕರಿಸುವ ಅಗತ್ಯವಿರುತ್ತದೆ, ಆದರೆ ನೀವು ಅದನ್ನು ಪ್ರಸ್ತುತ ಪುಟದಿಂದ ಮಾಡಲು ಸಾಧ್ಯವಿಲ್ಲ. ಡೇಟಾಬಾಕ್ಸ್‌ನಲ್ಲಿ ಕಂಡುಬರುವ ಡೇಟಾವನ್ನು ಸ್ಥಳೀಯವಾಗಿ ಸಂಗ್ರಹಿಸಲಾಗಿರುವುದಿಲ್ಲ, ಇದನ್ನು [[d:|Wikidata]] ನಿಂದ ಪಡೆಯಲಾಗುತ್ತದೆ. '''ಡೇಟಾಬಾಕ್ಸ್‌ನಲ್ಲಿ ತೋರಿಸಲಾದ ಡೇಟಾವನ್ನು ಬದಲಾಯಿಸಲು ಅಥವಾ ಎಡಿಟ್ ಮಾಡಲು:''' 1. ಡೇಟಾಬಾಕ್ಸ್‌ನಲ್ಲಿರುವ ಹೇಳಿಕೆಯ (statement) ಪಕ್ಕದಲ್ಲಿರುವ ಪೆನ್ಸಿಲ್ ಐಕಾನ್ [[File:OOjs UI icon edit-ltr-gray.svg|20px]] ಮೇಲೆ ಕ್ಲಿಕ್ ಮಾಡಿ. 2. ಇದು ನಿಮ್ಮನ್ನು ವಿಕಿಡೇಟಾ ಐಟಂನಲ್ಲಿ ಆ ಹೇಳಿಕೆಯನ್ನು ಎಲ್ಲಿ ಸಂಗ್ರಹಿಸಲಾಗಿದೆ ಎಂಬುದಕ್ಕೆ ಕರೆದೊಯ್ಯುತ್ತದೆ. 3. ಸ್ಟೇಟ್‌ಮೆಂಟ್ ಬಾಕ್ಸ್‌ನ ಬದಿಯಲ್ಲಿರುವ ಪೆನ್ಸಿಲ್ ಐಕಾನ್ ಮೇಲೆ ಮತ್ತೆ ಕ್ಲಿಕ್ ಮಾಡಿ. ಇದು ವಿಕಿಡೇಟಾದಲ್ಲಿ ಎಡಿಟ್ ಮೋಡ್ ಅನ್ನು ತೆರೆಯುತ್ತದೆ. * ಇನ್ಪುಟ್ ಫೀಲ್ಡ್‌ನಲ್ಲಿ ಹೊಸ ಮೌಲ್ಯವನ್ನು ನಮೂದಿಸಿ. ಅಗತ್ಯವಿದ್ದಲ್ಲಿ ಕ್ವಾಲಿಫೈಯರ್ ಅಥವಾ ಉಲ್ಲೇಖಗಳನ್ನು ಸೇರಿಸಿ. * ಮೌಲ್ಯವು ಹಳೆಯದಾಗಿದ್ದರೂ ಇನ್ನೂ ಸರಿಯಾಗಿದ್ದರೆ (ಜನಗಣತಿ ಡೇಟಾದಂತೆ), ಪೆನ್ಸಿಲ್ ಐಕಾನ್ ಬದಲಿಗೆ ಅದರ ಬಲಭಾಗದಲ್ಲಿರುವ '+' ಐಕಾನ್ ಕ್ಲಿಕ್ ಮಾಡಿ ಮತ್ತು ಹೊಸ ಮೌಲ್ಯವನ್ನು ನಮೂದಿಸಿ. 4. ಹೇಳಿಕೆಯನ್ನು ಪ್ರಕಟಿಸಲು ಚೆಕ್‌ಮಾರ್ಕ್ [[File:Ic check 36px.svg|20px]] ಬಟನ್ ಕ್ಲಿಕ್ ಮಾಡಿ. ಡೇಟಾಬಾಕ್ಸ್ ತಕ್ಷಣವೇ ನವೀಕರಣಗೊಳ್ಳುತ್ತದೆ ಮತ್ತು ಹೊಸ ಮಾಹಿತಿ ಕಾಣಿಸಿಕೊಳ್ಳುತ್ತದೆ. === ಟಿಪ್ಪಣಿಗಳು === <references group=a/> == ಉದಾಹರಣೆಗಳು == {{{!}} class="wikitable" {{!}} {{Databox|item=Q10725594}} {{Databox|item=Q13365715}} {{!}} {{Databox|item=Q153}} {{!}} {{Databox|item=Q2513}} {{!}} {{Databox|item=Q3030}} {{!}} {{Databox|item=Q7066}} {{!-}} {{!}} {{Databox|item=Q192724}} {{!}} {{Databox|item=Q67}} {{!}} {{Databox|item=Q143}} {{!}} {{Databox|item=Q64}} {{!}} {{Databox|item=Q42}} {{!}}} <templatedata> { "params": { "from": { "description": "ಪುಟಕ್ಕೆ ಲಿಂಕ್ ಮಾಡಲಾದ ವಿಕಿಡೇಟಾ ಐಟಂ ಬದಲಿಗೆ ನಿರ್ದಿಷ್ಟ ವಿಕಿಡೇಟಾ ಐಟಂನಿಂದ (Q123) ಡೇಟಾವನ್ನು ಹಿಂಪಡೆಯಲು ಡೇಟಾಬಾಕ್ಸ್ ಅನ್ನು ಒತ್ತಾಯಿಸುತ್ತದೆ.", "type": "string" }, "useImage": { "description": "ವಿಕಿಡೇಟಾ ಎಂಟಿಟಿಯಿಂದ ಬಳಸಲು ಆದ್ಯತೆಯ ಚಿತ್ರದ ಫೈಲ್ ಹೆಸರು", "type": "string" }, "excludeProperties": { "description": "ಡೇಟಾಬಾಕ್ಸ್‌ನಿಂದ ತೆಗೆದುಹಾಕಬೇಕಾದ ವಿಕಿಡೇಟಾ ಪ್ರಾಪರ್ಟಿ ಐಡಿಗಳ ಕಾಮಾ ಬೇರ್ಪಡಿಸಿದ ಪಟ್ಟಿ", "type": "string" } } } </templatedata> === ವಿಕಿಟೆಕ್ಸ್ಟ್ ಡೇಟಾಬಾಕ್ಸ್ ಉದಾಹರಣೆಗಳು === ಕೆಳಗಿನ ಉದಾಹರಣೆಗಳು ಎಡಿಟ್ ಸೋರ್ಸ್ ವೀಕ್ಷಣೆಯಲ್ಲಿ ಡೇಟಾಬಾಕ್ಸ್ ಟೆಂಪ್ಲೇಟ್ ಹೇಗೆ ಕಾಣಿಸಬಹುದು ಎಂಬುದನ್ನು ತೋರಿಸುತ್ತವೆ. * <code><nowiki>{{Databox}}</nowiki></code> :ಡಿಫಾಲ್ಟ್ ಆಯ್ಕೆ. ಇದು ಪುಟಕ್ಕೆ ಸಂಪರ್ಕಗೊಂಡಿರುವ ವಿಕಿಡೇಟಾ ಐಟಂನಿಂದ ಡೇಟಾವನ್ನು ಹಿಂಪಡೆಯುತ್ತದೆ. * <code><nowiki>{{Databox|from=Q123}}</nowiki></code> :ನಿರ್ದಿಷ್ಟಪಡಿಸಿದ ವಿಕಿಡೇಟಾ ಐಟಂನಿಂದ ಡೇಟಾವನ್ನು ಪಡೆಯಲು ಡೇಟಾಬಾಕ್ಸ್ ಅನ್ನು ಒತ್ತಾಯಿಸುತ್ತದೆ. * <code><nowiki>{{Databox|useImage=filename.jpg}}</nowiki></code> :ಡೇಟಾಬಾಕ್ಸ್‌ನಲ್ಲಿ ಪ್ರದರ್ಶಿಸಲು ಇನ್ನೊಂದು ಚಿತ್ರವನ್ನು (P18) ಹಸ್ತಚಾಲಿತವಾಗಿ ನಿರ್ದಿಷ್ಟಪಡಿಸಿ. * <code><nowiki>{{Databox|excludeProperties=P123}}</nowiki></code> :ಪ್ರಸ್ತುತ ಡೇಟಾಬಾಕ್ಸ್‌ನಲ್ಲಿ ತೋರಿಸಬಾರದ ವಿಕಿಡೇಟಾ ಪ್ರಾಪರ್ಟಿಗಳ (PID ಗಳು) ಪಟ್ಟಿಯನ್ನು ನಿರ್ದಿಷ್ಟಪಡಿಸಿ. * <code><nowiki>{{Databox|useImage=filename.jpg|excludeProperties=P123}}</nowiki></code> :ಪ್ಯಾರಾಮೀಟರ್‌ಗಳನ್ನು ಸಂಯೋಜಿಸುವುದು ವಿಷಯದ ಮೇಲೆ ಹೆಚ್ಚಿನ ನಿಯಂತ್ರಣಕ್ಕೆ ಅನುವು ಮಾಡಿಕೊಡುತ್ತದೆ. == ಇದನ್ನೂ ನೋಡಿ == * [[:ru:Template:Универсальная карточка]] - ರಷ್ಯನ್ ವಿಕಿಪೀಡಿಯಾದಲ್ಲಿರುವ ಇದೇ ರೀತಿಯ ಆದರೆ ಹೆಚ್ಚು ಅಭಿವೃದ್ಧಿ ಹೊಂದಿದ ಟೆಂಪ್ಲೇಟ್. * [[:en:Template:Infobox person/Wikidata]] - ಇಂಗ್ಲಿಷ್ ವಿಕಿಪೀಡಿಯಾದಲ್ಲಿ ಕೇವಲ ವ್ಯಕ್ತಿಗಳಿಗಾಗಿ ಇರುವ ಇದೇ ರೀತಿಯ ಟೆಂಪ್ಲೇಟ್. * [[:commons:Template:Wikidata Infobox]] - ಕಾಮನ್ಸ್‌ನ ಸಮಾನ ರೂಪ; ಹೆಚ್ಚಾಗಿ ವರ್ಗಗಳಿಗಾಗಿ (categories) ಬಳಸಲಾಗುತ್ತದೆ. b4li9xe9cq98tcphm272v46pbz32wvv ಮಾಡ್ಯೂಲ್:Wd 828 4459 15563 2025-08-03T13:22:40Z w>A826 0 ೧ revisions imported from [[:en:Module:Wd]] 15563 Scribunto text/plain -- Original module located at [[:en:Module:Wd]] and [[:en:Module:Wd/i18n]]. require("strict") local p = {} local module_arg = ... local i18n local i18nPath local function loadI18n(aliasesP, frame) local title if frame then -- current module invoked by page/template, get its title from frame title = frame:getTitle() else -- current module included by other module, get its title from ... title = module_arg end if not i18n then i18nPath = title .. "/i18n" i18n = require(i18nPath).init(aliasesP) end end p.claimCommands = { property = "property", properties = "properties", qualifier = "qualifier", qualifiers = "qualifiers", reference = "reference", references = "references" } p.generalCommands = { label = "label", title = "title", description = "description", alias = "alias", aliases = "aliases", badge = "badge", badges = "badges" } p.flags = { linked = "linked", short = "short", raw = "raw", multilanguage = "multilanguage", unit = "unit", ------------- preferred = "preferred", normal = "normal", deprecated = "deprecated", best = "best", future = "future", current = "current", former = "former", edit = "edit", editAtEnd = "edit@end", mdy = "mdy", single = "single", sourced = "sourced" } p.args = { eid = "eid", page = "page", date = "date", globalSiteId = "globalSiteId" } local aliasesP = { coord = "P625", ----------------------- image = "P18", author = "P50", authorNameString = "P2093", publisher = "P123", importedFrom = "P143", wikimediaImportURL = "P4656", statedIn = "P248", pages = "P304", language = "P407", hasPart = "P527", publicationDate = "P577", startTime = "P580", endTime = "P582", chapter = "P792", retrieved = "P813", referenceURL = "P854", sectionVerseOrParagraph = "P958", archiveURL = "P1065", title = "P1476", formatterURL = "P1630", quote = "P1683", shortName = "P1813", definingFormula = "P2534", archiveDate = "P2960", inferredFrom = "P3452", typeOfReference = "P3865", column = "P3903", subjectNamedAs = "P1810", wikidataProperty = "P1687", publishedIn = "P1433", lastUpdate = "P5017" } local aliasesQ = { percentage = "Q11229", prolepticJulianCalendar = "Q1985786", citeWeb = "Q5637226", citeQ = "Q22321052" } local parameters = { property = "%p", qualifier = "%q", reference = "%r", alias = "%a", badge = "%b", separator = "%s", general = "%x" } local formats = { property = "%p[%s][%r]", qualifier = "%q[%s][%r]", reference = "%r", propertyWithQualifier = "%p[ <span style=\"font-size:85\\%\">(%q)</span>][%s][%r]", alias = "%a[%s]", badge = "%b[%s]" } local hookNames = { -- {level_1, level_2} [parameters.property] = {"getProperty"}, [parameters.reference] = {"getReferences", "getReference"}, [parameters.qualifier] = {"getAllQualifiers"}, [parameters.qualifier.."\\d"] = {"getQualifiers", "getQualifier"}, [parameters.alias] = {"getAlias"}, [parameters.badge] = {"getBadge"} } -- default value objects, should NOT be mutated but instead copied local defaultSeparators = { ["sep"] = {" "}, ["sep%s"] = {","}, ["sep%q"] = {"; "}, ["sep%q\\d"] = {", "}, ["sep%r"] = nil, -- none ["punc"] = nil -- none } local rankTable = { ["preferred"] = 1, ["normal"] = 2, ["deprecated"] = 3 } local function replaceAlias(id) if aliasesP[id] then id = aliasesP[id] end return id end local function errorText(code, ...) local text = i18n["errors"][code] if arg then text = mw.ustring.format(text, unpack(arg)) end return text end local function throwError(errorMessage, ...) error(errorText(errorMessage, unpack(arg))) end local function replaceDecimalMark(num) return mw.ustring.gsub(num, "[.]", i18n['numeric']['decimal-mark'], 1) end local function padZeros(num, numDigits) local numZeros local negative = false if num < 0 then negative = true num = num * -1 end num = tostring(num) numZeros = numDigits - num:len() for _ = 1, numZeros do num = "0"..num end if negative then num = "-"..num end return num end local function replaceSpecialChar(chr) if chr == '_' then -- replace underscores with spaces return ' ' else return chr end end local function replaceSpecialChars(str) local chr local esc = false local strOut = "" for i = 1, #str do chr = str:sub(i,i) if not esc then if chr == '\\' then esc = true else strOut = strOut .. replaceSpecialChar(chr) end else strOut = strOut .. chr esc = false end end return strOut end local function buildWikilink(target, label) if not label or target == label then return "[[" .. target .. "]]" else return "[[" .. target .. "|" .. label .. "]]" end end -- used to make frame.args mutable, to replace #frame.args (which is always 0) -- with the actual amount and to simply copy tables local function copyTable(tIn) if not tIn then return nil end local tOut = {} for i, v in pairs(tIn) do tOut[i] = v end return tOut end -- used to merge output arrays together; -- note that it currently mutates the first input array local function mergeArrays(a1, a2) for i = 1, #a2 do a1[#a1 + 1] = a2[i] end return a1 end local function split(str, del) local out = {} local i, j = str:find(del) if i and j then out[1] = str:sub(1, i - 1) out[2] = str:sub(j + 1) else out[1] = str end return out end local function parseWikidataURL(url) local id if url:match('^http[s]?://') then id = split(url, "Q") if id[2] then return "Q" .. id[2] end end return nil end local function parseDate(dateStr, precision) precision = precision or "d" local i, j, index, ptr local parts = {nil, nil, nil} if dateStr == nil then return parts[1], parts[2], parts[3] -- year, month, day end -- 'T' for snak values, '/' for outputs with '/Julian' attached i, j = dateStr:find("[T/]") if i then dateStr = dateStr:sub(1, i-1) end local from = 1 if dateStr:sub(1,1) == "-" then -- this is a negative number, look further ahead from = 2 end index = 1 ptr = 1 i, j = dateStr:find("-", from) if i then -- year parts[index] = tonumber(dateStr:sub(ptr, i-1), 10) -- explicitly give base 10 to prevent error if parts[index] == -0 then parts[index] = tonumber("0") -- for some reason, 'parts[index] = 0' may actually store '-0', so parse from string instead end if precision == "y" then -- we're done return parts[1], parts[2], parts[3] -- year, month, day end index = index + 1 ptr = i + 1 i, j = dateStr:find("-", ptr) if i then -- month parts[index] = tonumber(dateStr:sub(ptr, i-1), 10) if precision == "m" then -- we're done return parts[1], parts[2], parts[3] -- year, month, day end index = index + 1 ptr = i + 1 end end if dateStr:sub(ptr) ~= "" then -- day if we have month, month if we have year, or year parts[index] = tonumber(dateStr:sub(ptr), 10) end return parts[1], parts[2], parts[3] -- year, month, day end local function datePrecedesDate(aY, aM, aD, bY, bM, bD) if aY == nil or bY == nil then return nil end aM = aM or 1 aD = aD or 1 bM = bM or 1 bD = bD or 1 if aY < bY then return true end if aY > bY then return false end if aM < bM then return true end if aM > bM then return false end if aD < bD then return true end return false end local function getHookName(param, index) if hookNames[param] then return hookNames[param][index] elseif param:len() > 2 then return hookNames[param:sub(1, 2).."\\d"][index] else return nil end end local function alwaysTrue() return true end -- The following function parses a format string. -- -- The example below shows how a parsed string is structured in memory. -- Variables other than 'str' and 'child' are left out for clarity's sake. -- -- Example: -- "A %p B [%s[%q1]] C [%r] D" -- -- Structure: -- [ -- { -- str = "A " -- }, -- { -- str = "%p" -- }, -- { -- str = " B ", -- child = -- [ -- { -- str = "%s", -- child = -- [ -- { -- str = "%q1" -- } -- ] -- } -- ] -- }, -- { -- str = " C ", -- child = -- [ -- { -- str = "%r" -- } -- ] -- }, -- { -- str = " D" -- } -- ] -- local function parseFormat(str) local chr, esc, param, root, cur, prev, new local params = {} local function newObject(array) local obj = {} -- new object obj.str = "" array[#array + 1] = obj -- array{object} obj.parent = array return obj end local function endParam() if param > 0 then if cur.str ~= "" then cur.str = "%"..cur.str cur.param = true params[cur.str] = true cur.parent.req[cur.str] = true prev = cur cur = newObject(cur.parent) end param = 0 end end root = {} -- array root.req = {} cur = newObject(root) prev = nil esc = false param = 0 for i = 1, #str do chr = str:sub(i,i) if not esc then if chr == '\\' then endParam() esc = true elseif chr == '%' then endParam() if cur.str ~= "" then cur = newObject(cur.parent) end param = 2 elseif chr == '[' then endParam() if prev and cur.str == "" then table.remove(cur.parent) cur = prev end cur.child = {} -- new array cur.child.req = {} cur.child.parent = cur cur = newObject(cur.child) elseif chr == ']' then endParam() if cur.parent.parent then new = newObject(cur.parent.parent.parent) if cur.str == "" then table.remove(cur.parent) end cur = new end else if param > 1 then param = param - 1 elseif param == 1 then if not chr:match('%d') then endParam() end end cur.str = cur.str .. replaceSpecialChar(chr) end else cur.str = cur.str .. chr esc = false end prev = nil end endParam() -- make sure that at least one required parameter has been defined if not next(root.req) then throwError("missing-required-parameter") end -- make sure that the separator parameter "%s" is not amongst the required parameters if root.req[parameters.separator] then throwError("extra-required-parameter", parameters.separator) end return root, params end local function sortOnRank(claims) local rankPos local ranks = {{}, {}, {}, {}} -- preferred, normal, deprecated, (default) local sorted = {} for _, v in ipairs(claims) do rankPos = rankTable[v.rank] or 4 ranks[rankPos][#ranks[rankPos] + 1] = v end sorted = ranks[1] sorted = mergeArrays(sorted, ranks[2]) sorted = mergeArrays(sorted, ranks[3]) return sorted end local function isValueInTable(searchedItem, inputTable) for _, item in pairs(inputTable) do if item == searchedItem then return true end end return false end local Config = {} -- allows for recursive calls function Config:new() local cfg = {} setmetatable(cfg, self) self.__index = self cfg.separators = { -- single value objects wrapped in arrays so that we can pass by reference ["sep"] = {copyTable(defaultSeparators["sep"])}, ["sep%s"] = {copyTable(defaultSeparators["sep%s"])}, ["sep%q"] = {copyTable(defaultSeparators["sep%q"])}, ["sep%r"] = {copyTable(defaultSeparators["sep%r"])}, ["punc"] = {copyTable(defaultSeparators["punc"])} } cfg.entity = nil cfg.entityID = nil cfg.propertyID = nil cfg.propertyValue = nil cfg.qualifierIDs = {} cfg.qualifierIDsAndValues = {} cfg.bestRank = true cfg.ranks = {true, true, false} -- preferred = true, normal = true, deprecated = false cfg.foundRank = #cfg.ranks cfg.flagBest = false cfg.flagRank = false cfg.periods = {true, true, true} -- future = true, current = true, former = true cfg.flagPeriod = false cfg.atDate = {parseDate(os.date('!%Y-%m-%d'))} -- today as {year, month, day} cfg.mdyDate = false cfg.singleClaim = false cfg.sourcedOnly = false cfg.editable = false cfg.editAtEnd = false cfg.inSitelinks = false cfg.langCode = mw.language.getContentLanguage().code cfg.langName = mw.language.fetchLanguageName(cfg.langCode, cfg.langCode) cfg.langObj = mw.language.new(cfg.langCode) cfg.siteID = mw.wikibase.getGlobalSiteId() cfg.states = {} cfg.states.qualifiersCount = 0 cfg.curState = nil cfg.prefetchedRefs = nil return cfg end local State = {} function State:new(cfg, type) local stt = {} setmetatable(stt, self) self.__index = self stt.conf = cfg stt.type = type stt.results = {} stt.parsedFormat = {} stt.separator = {} stt.movSeparator = {} stt.puncMark = {} stt.linked = false stt.rawValue = false stt.shortName = false stt.anyLanguage = false stt.unitOnly = false stt.singleValue = false return stt end -- if id == nil then item connected to current page is used function Config:getLabel(id, raw, link, short) local label = nil local prefix, title= "", nil if not id then id = mw.wikibase.getEntityIdForCurrentPage() if not id then return "" end end id = id:upper() -- just to be sure if raw then -- check if given id actually exists if mw.wikibase.isValidEntityId(id) and mw.wikibase.entityExists(id) then label = id end prefix, title = "d:Special:EntityPage/", label -- may be nil else -- try short name first if requested if short then label = p._property{aliasesP.shortName, [p.args.eid] = id} -- get short name if label == "" then label = nil end end -- get label if not label then label = mw.wikibase.getLabel(id) end end if not label then label = "" elseif link then -- build a link if requested if not title then if id:sub(1,1) == "Q" then title = mw.wikibase.getSitelink(id) elseif id:sub(1,1) == "P" then -- properties have no sitelink, link to Wikidata instead prefix, title = "d:Special:EntityPage/", id end end label = mw.text.nowiki(label) -- escape raw label text so it cannot be wikitext markup if title then label = buildWikilink(prefix .. title, label) end end return label end function Config:getEditIcon() local value = "" local prefix = "" local front = "&nbsp;" local back = "" if self.entityID:sub(1,1) == "P" then prefix = "Property:" end if self.editAtEnd then front = '<span style="float:' if self.langObj:isRTL() then front = front .. 'left' else front = front .. 'right' end front = front .. '">' back = '</span>' end value = "[[File:OOjs UI icon edit-ltr-progressive.svg|frameless|text-top|10px|alt=" .. i18n['info']['edit-on-wikidata'] .. "|link=https://www.wikidata.org/wiki/" .. prefix .. self.entityID .. "?uselang=" .. self.langCode if self.propertyID then value = value .. "#" .. self.propertyID elseif self.inSitelinks then value = value .. "#sitelinks-wikipedia" end value = value .. "|" .. i18n['info']['edit-on-wikidata'] .. "]]" return front .. value .. back end -- used to create the final output string when it's all done, so that for references the -- function extensionTag("ref", ...) is only called when they really ended up in the final output function Config:concatValues(valuesArray) local outString = "" local j, skip for i = 1, #valuesArray do -- check if this is a reference if valuesArray[i].refHash then j = i - 1 skip = false -- skip this reference if it is part of a continuous row of references that already contains the exact same reference while valuesArray[j] and valuesArray[j].refHash do if valuesArray[i].refHash == valuesArray[j].refHash then skip = true break end j = j - 1 end if not skip then -- add <ref> tag with the reference's hash as its name (to deduplicate references) outString = outString .. mw.getCurrentFrame():extensionTag("ref", valuesArray[i][1], {name = valuesArray[i].refHash}) end else outString = outString .. valuesArray[i][1] end end return outString end function Config:convertUnit(unit, raw, link, short, unitOnly) local space = " " local label = "" local itemID if unit == "" or unit == "1" then return nil end if unitOnly then space = "" end itemID = parseWikidataURL(unit) if itemID then if itemID == aliasesQ.percentage then return "%" else label = self:getLabel(itemID, raw, link, short) if label ~= "" then return space .. label end end end return "" end function State:getValue(snak) return self.conf:getValue(snak, self.rawValue, self.linked, self.shortName, self.anyLanguage, self.unitOnly, false, self.type:sub(1,2)) end function Config:getValue(snak, raw, link, short, anyLang, unitOnly, noSpecial, type) if snak.snaktype == 'value' then local datatype = snak.datavalue.type local subtype = snak.datatype local datavalue = snak.datavalue.value if datatype == 'string' then if subtype == 'url' and link then -- create link explicitly if raw then -- will render as a linked number like [1] return "[" .. datavalue .. "]" else return "[" .. datavalue .. " " .. datavalue .. "]" end elseif subtype == 'commonsMedia' then if link then return buildWikilink("c:File:" .. datavalue, datavalue) elseif not raw then return "[[File:" .. datavalue .. "]]" else return datavalue end elseif subtype == 'geo-shape' and link then return buildWikilink("c:" .. datavalue, datavalue) elseif subtype == 'math' and not raw then local attribute = nil if (type == parameters.property or (type == parameters.qualifier and self.propertyID == aliasesP.hasPart)) and snak.property == aliasesP.definingFormula then attribute = {qid = self.entityID} end return mw.getCurrentFrame():extensionTag("math", datavalue, attribute) elseif subtype == 'external-id' and link then local url = p._property{aliasesP.formatterURL, [p.args.eid] = snak.property} -- get formatter URL if url ~= "" then url = mw.ustring.gsub(url, "$1", datavalue) return "[" .. url .. " " .. datavalue .. "]" else return datavalue end else return datavalue end elseif datatype == 'monolingualtext' then if anyLang or datavalue['language'] == self.langCode then return datavalue['text'] else return nil end elseif datatype == 'quantity' then local value = "" local unit if not unitOnly then -- get value and strip + signs from front value = mw.ustring.gsub(datavalue['amount'], "^%+(.+)$", "%1") if raw then return value end -- replace decimal mark based on locale value = replaceDecimalMark(value) -- add delimiters for readability value = i18n.addDelimiters(value) end unit = self:convertUnit(datavalue['unit'], raw, link, short, unitOnly) if unit then value = value .. unit end return value elseif datatype == 'time' then local y, m, d, p, yDiv, yRound, yFull, value, calendarID, dateStr local yFactor = 1 local sign = 1 local prefix = "" local suffix = "" local mayAddCalendar = false local calendar = "" local precision = datavalue['precision'] if precision == 11 then p = "d" elseif precision == 10 then p = "m" else p = "y" yFactor = 10^(9-precision) end y, m, d = parseDate(datavalue['time'], p) if y < 0 then sign = -1 y = y * sign end -- if precision is tens/hundreds/thousands/millions/billions of years if precision <= 8 then yDiv = y / yFactor -- if precision is tens/hundreds/thousands of years if precision >= 6 then mayAddCalendar = true if precision <= 7 then -- round centuries/millenniums up (e.g. 20th century or 3rd millennium) yRound = math.ceil(yDiv) if not raw then if precision == 6 then suffix = i18n['datetime']['suffixes']['millennium'] else suffix = i18n['datetime']['suffixes']['century'] end suffix = i18n.getOrdinalSuffix(yRound) .. suffix else -- if not verbose, take the first year of the century/millennium -- (e.g. 1901 for 20th century or 2001 for 3rd millennium) yRound = (yRound - 1) * yFactor + 1 end else -- precision == 8 -- round decades down (e.g. 2010s) yRound = math.floor(yDiv) * yFactor if not raw then prefix = i18n['datetime']['prefixes']['decade-period'] suffix = i18n['datetime']['suffixes']['decade-period'] end end if raw and sign < 0 then -- if BCE then compensate for "counting backwards" -- (e.g. -2019 for 2010s BCE, -2000 for 20th century BCE or -3000 for 3rd millennium BCE) yRound = yRound + yFactor - 1 end else local yReFactor, yReDiv, yReRound -- round to nearest for tens of thousands of years or more yRound = math.floor(yDiv + 0.5) if yRound == 0 then if precision <= 2 and y ~= 0 then yReFactor = 1e6 yReDiv = y / yReFactor yReRound = math.floor(yReDiv + 0.5) if yReDiv == yReRound then -- change precision to millions of years only if we have a whole number of them precision = 3 yFactor = yReFactor yRound = yReRound end end if yRound == 0 then -- otherwise, take the unrounded (original) number of years precision = 5 yFactor = 1 yRound = y mayAddCalendar = true end end if precision >= 1 and y ~= 0 then yFull = yRound * yFactor yReFactor = 1e9 yReDiv = yFull / yReFactor yReRound = math.floor(yReDiv + 0.5) if yReDiv == yReRound then -- change precision to billions of years if we're in that range precision = 0 yFactor = yReFactor yRound = yReRound else yReFactor = 1e6 yReDiv = yFull / yReFactor yReRound = math.floor(yReDiv + 0.5) if yReDiv == yReRound then -- change precision to millions of years if we're in that range precision = 3 yFactor = yReFactor yRound = yReRound end end end if not raw then if precision == 3 then suffix = i18n['datetime']['suffixes']['million-years'] elseif precision == 0 then suffix = i18n['datetime']['suffixes']['billion-years'] else yRound = yRound * yFactor if yRound == 1 then suffix = i18n['datetime']['suffixes']['year'] else suffix = i18n['datetime']['suffixes']['years'] end end else yRound = yRound * yFactor end end else yRound = y mayAddCalendar = true end if mayAddCalendar then calendarID = parseWikidataURL(datavalue['calendarmodel']) if calendarID and calendarID == aliasesQ.prolepticJulianCalendar then if not raw then if link then calendar = " ("..buildWikilink(i18n['datetime']['julian-calendar'], i18n['datetime']['julian'])..")" else calendar = " ("..i18n['datetime']['julian']..")" end else calendar = "/"..i18n['datetime']['julian'] end end end if not raw then local ce = nil if sign < 0 then ce = i18n['datetime']['BCE'] elseif precision <= 5 then ce = i18n['datetime']['CE'] end if ce then if link then ce = buildWikilink(i18n['datetime']['common-era'], ce) end suffix = suffix .. " " .. ce end value = tostring(yRound) if m then dateStr = self.langObj:formatDate("F", "1-"..m.."-1") if d then if self.mdyDate then dateStr = dateStr .. " " .. d .. "," else dateStr = d .. " " .. dateStr end end value = dateStr .. " " .. value end value = prefix .. value .. suffix .. calendar else value = padZeros(yRound * sign, 4) if m then value = value .. "-" .. padZeros(m, 2) if d then value = value .. "-" .. padZeros(d, 2) end end value = value .. calendar end return value elseif datatype == 'globecoordinate' then -- logic from https://github.com/DataValues/Geo (v4.0.1) local precision, unitsPerDegree, numDigits, strFormat, value, globe local latitude, latConv, latValue, latLink local longitude, lonConv, lonValue, lonLink local latDirection, latDirectionN, latDirectionS, latDirectionEN local lonDirection, lonDirectionE, lonDirectionW, lonDirectionEN local degSymbol, minSymbol, secSymbol, separator local latDegrees = nil local latMinutes = nil local latSeconds = nil local lonDegrees = nil local lonMinutes = nil local lonSeconds = nil local latDegSym = "" local latMinSym = "" local latSecSym = "" local lonDegSym = "" local lonMinSym = "" local lonSecSym = "" local latDirectionEN_N = "N" local latDirectionEN_S = "S" local lonDirectionEN_E = "E" local lonDirectionEN_W = "W" if not raw then latDirectionN = i18n['coord']['latitude-north'] latDirectionS = i18n['coord']['latitude-south'] lonDirectionE = i18n['coord']['longitude-east'] lonDirectionW = i18n['coord']['longitude-west'] degSymbol = i18n['coord']['degrees'] minSymbol = i18n['coord']['minutes'] secSymbol = i18n['coord']['seconds'] separator = i18n['coord']['separator'] else latDirectionN = latDirectionEN_N latDirectionS = latDirectionEN_S lonDirectionE = lonDirectionEN_E lonDirectionW = lonDirectionEN_W degSymbol = "/" minSymbol = "/" secSymbol = "/" separator = "/" end latitude = datavalue['latitude'] longitude = datavalue['longitude'] if latitude < 0 then latDirection = latDirectionS latDirectionEN = latDirectionEN_S latitude = math.abs(latitude) else latDirection = latDirectionN latDirectionEN = latDirectionEN_N end if longitude < 0 then lonDirection = lonDirectionW lonDirectionEN = lonDirectionEN_W longitude = math.abs(longitude) else lonDirection = lonDirectionE lonDirectionEN = lonDirectionEN_E end precision = datavalue['precision'] if not precision or precision <= 0 then precision = 1 / 3600 -- precision not set (correctly), set to arcsecond end -- remove insignificant detail latitude = math.floor(latitude / precision + 0.5) * precision longitude = math.floor(longitude / precision + 0.5) * precision if precision >= 1 - (1 / 60) and precision < 1 then precision = 1 elseif precision >= (1 / 60) - (1 / 3600) and precision < (1 / 60) then precision = 1 / 60 end if precision >= 1 then unitsPerDegree = 1 elseif precision >= (1 / 60) then unitsPerDegree = 60 else unitsPerDegree = 3600 end numDigits = math.ceil(-math.log10(unitsPerDegree * precision)) if numDigits <= 0 then numDigits = tonumber("0") -- for some reason, 'numDigits = 0' may actually store '-0', so parse from string instead end strFormat = "%." .. numDigits .. "f" if precision >= 1 then latDegrees = strFormat:format(latitude) lonDegrees = strFormat:format(longitude) if not raw then latDegSym = replaceDecimalMark(latDegrees) .. degSymbol lonDegSym = replaceDecimalMark(lonDegrees) .. degSymbol else latDegSym = latDegrees .. degSymbol lonDegSym = lonDegrees .. degSymbol end else latConv = math.floor(latitude * unitsPerDegree * 10^numDigits + 0.5) / 10^numDigits lonConv = math.floor(longitude * unitsPerDegree * 10^numDigits + 0.5) / 10^numDigits if precision >= (1 / 60) then latMinutes = latConv lonMinutes = lonConv else latSeconds = latConv lonSeconds = lonConv latMinutes = math.floor(latSeconds / 60) lonMinutes = math.floor(lonSeconds / 60) latSeconds = strFormat:format(latSeconds - (latMinutes * 60)) lonSeconds = strFormat:format(lonSeconds - (lonMinutes * 60)) if not raw then latSecSym = replaceDecimalMark(latSeconds) .. secSymbol lonSecSym = replaceDecimalMark(lonSeconds) .. secSymbol else latSecSym = latSeconds .. secSymbol lonSecSym = lonSeconds .. secSymbol end end latDegrees = math.floor(latMinutes / 60) lonDegrees = math.floor(lonMinutes / 60) latDegSym = latDegrees .. degSymbol lonDegSym = lonDegrees .. degSymbol latMinutes = latMinutes - (latDegrees * 60) lonMinutes = lonMinutes - (lonDegrees * 60) if precision >= (1 / 60) then latMinutes = strFormat:format(latMinutes) lonMinutes = strFormat:format(lonMinutes) if not raw then latMinSym = replaceDecimalMark(latMinutes) .. minSymbol lonMinSym = replaceDecimalMark(lonMinutes) .. minSymbol else latMinSym = latMinutes .. minSymbol lonMinSym = lonMinutes .. minSymbol end else latMinSym = latMinutes .. minSymbol lonMinSym = lonMinutes .. minSymbol end end latValue = latDegSym .. latMinSym .. latSecSym .. latDirection lonValue = lonDegSym .. lonMinSym .. lonSecSym .. lonDirection value = latValue .. separator .. lonValue if link then globe = parseWikidataURL(datavalue['globe']) if globe then globe = mw.wikibase.getLabelByLang(globe, "en"):lower() else globe = "earth" end latLink = table.concat({latDegrees, latMinutes, latSeconds}, "_") lonLink = table.concat({lonDegrees, lonMinutes, lonSeconds}, "_") value = "[https://geohack.toolforge.org/geohack.php?language="..self.langCode.."&params="..latLink.."_"..latDirectionEN.."_"..lonLink.."_"..lonDirectionEN.."_globe:"..globe.." "..value.."]" end return value elseif datatype == 'wikibase-entityid' then local label local itemID = datavalue['numeric-id'] if subtype == 'wikibase-item' then itemID = "Q" .. itemID elseif subtype == 'wikibase-property' then itemID = "P" .. itemID else return '<strong class="error">' .. errorText('unknown-data-type', subtype) .. '</strong>' end label = self:getLabel(itemID, raw, link, short) if label == "" then label = nil end return label else return '<strong class="error">' .. errorText('unknown-data-type', datatype) .. '</strong>' end elseif snak.snaktype == 'somevalue' and not noSpecial then if raw then return " " -- single space represents 'somevalue' else return i18n['values']['unknown'] end elseif snak.snaktype == 'novalue' and not noSpecial then if raw then return "" -- empty string represents 'novalue' else return i18n['values']['none'] end else return nil end end function Config:getSingleRawQualifier(claim, qualifierID) local qualifiers if claim.qualifiers then qualifiers = claim.qualifiers[qualifierID] end if qualifiers and qualifiers[1] then return self:getValue(qualifiers[1], true) -- raw = true else return nil end end function Config:snakEqualsValue(snak, value) local snakValue = self:getValue(snak, true) -- raw = true if snakValue and snak.snaktype == 'value' and snak.datavalue.type == 'wikibase-entityid' then value = value:upper() end return snakValue == value end function Config:setRank(rank) local rankPos if rank == p.flags.best then self.bestRank = true self.flagBest = true -- mark that 'best' flag was given return end if rank:sub(1,9) == p.flags.preferred then rankPos = 1 elseif rank:sub(1,6) == p.flags.normal then rankPos = 2 elseif rank:sub(1,10) == p.flags.deprecated then rankPos = 3 else return end -- one of the rank flags was given, check if another one was given before if not self.flagRank then self.ranks = {false, false, false} -- no other rank flag given before, so unset ranks self.bestRank = self.flagBest -- unsets bestRank only if 'best' flag was not given before self.flagRank = true -- mark that a rank flag was given end if rank:sub(-1) == "+" then for i = rankPos, 1, -1 do self.ranks[i] = true end elseif rank:sub(-1) == "-" then for i = rankPos, #self.ranks do self.ranks[i] = true end else self.ranks[rankPos] = true end end function Config:setPeriod(period) local periodPos if period == p.flags.future then periodPos = 1 elseif period == p.flags.current then periodPos = 2 elseif period == p.flags.former then periodPos = 3 else return end -- one of the period flags was given, check if another one was given before if not self.flagPeriod then self.periods = {false, false, false} -- no other period flag given before, so unset periods self.flagPeriod = true -- mark that a period flag was given end self.periods[periodPos] = true end function Config:qualifierMatches(claim, id, value) local qualifiers if claim.qualifiers then qualifiers = claim.qualifiers[id] end if qualifiers then for _, v in pairs(qualifiers) do if self:snakEqualsValue(v, value) then return true end end elseif value == "" then -- if the qualifier is not present then treat it the same as the special value 'novalue' return true end return false end function Config:rankMatches(rankPos) if self.bestRank then return (self.ranks[rankPos] and self.foundRank >= rankPos) else return self.ranks[rankPos] end end function Config:timeMatches(claim) local startTime = nil local startTimeY = nil local startTimeM = nil local startTimeD = nil local endTime = nil local endTimeY = nil local endTimeM = nil local endTimeD = nil if self.periods[1] and self.periods[2] and self.periods[3] then -- any time return true end startTime = self:getSingleRawQualifier(claim, aliasesP.startTime) if startTime and startTime ~= "" and startTime ~= " " then startTimeY, startTimeM, startTimeD = parseDate(startTime) end endTime = self:getSingleRawQualifier(claim, aliasesP.endTime) if endTime and endTime ~= "" and endTime ~= " " then endTimeY, endTimeM, endTimeD = parseDate(endTime) end if startTimeY ~= nil and endTimeY ~= nil and datePrecedesDate(endTimeY, endTimeM, endTimeD, startTimeY, startTimeM, startTimeD) then -- invalidate end time if it precedes start time endTimeY = nil endTimeM = nil endTimeD = nil end if self.periods[1] then -- future if startTimeY and datePrecedesDate(self.atDate[1], self.atDate[2], self.atDate[3], startTimeY, startTimeM, startTimeD) then return true end end if self.periods[2] then -- current if (startTimeY == nil or not datePrecedesDate(self.atDate[1], self.atDate[2], self.atDate[3], startTimeY, startTimeM, startTimeD)) and (endTimeY == nil or datePrecedesDate(self.atDate[1], self.atDate[2], self.atDate[3], endTimeY, endTimeM, endTimeD)) then return true end end if self.periods[3] then -- former if endTimeY and not datePrecedesDate(self.atDate[1], self.atDate[2], self.atDate[3], endTimeY, endTimeM, endTimeD) then return true end end return false end function Config:processFlag(flag) if not flag then return false end if flag == p.flags.linked then self.curState.linked = true return true elseif flag == p.flags.raw then self.curState.rawValue = true if self.curState == self.states[parameters.reference] then -- raw reference values end with periods and require a separator (other than none) self.separators["sep%r"][1] = {" "} end return true elseif flag == p.flags.short then self.curState.shortName = true return true elseif flag == p.flags.multilanguage then self.curState.anyLanguage = true return true elseif flag == p.flags.unit then self.curState.unitOnly = true return true elseif flag == p.flags.mdy then self.mdyDate = true return true elseif flag == p.flags.single then self.singleClaim = true return true elseif flag == p.flags.sourced then self.sourcedOnly = true return true elseif flag == p.flags.edit then self.editable = true return true elseif flag == p.flags.editAtEnd then self.editable = true self.editAtEnd = true return true elseif flag == p.flags.best or flag:match('^'..p.flags.preferred..'[+-]?$') or flag:match('^'..p.flags.normal..'[+-]?$') or flag:match('^'..p.flags.deprecated..'[+-]?$') then self:setRank(flag) return true elseif flag == p.flags.future or flag == p.flags.current or flag == p.flags.former then self:setPeriod(flag) return true elseif flag == "" then -- ignore empty flags and carry on return true else return false end end function Config:processFlagOrCommand(flag) local param = "" if not flag then return false end if flag == p.claimCommands.property or flag == p.claimCommands.properties then param = parameters.property elseif flag == p.claimCommands.qualifier or flag == p.claimCommands.qualifiers then self.states.qualifiersCount = self.states.qualifiersCount + 1 param = parameters.qualifier .. self.states.qualifiersCount self.separators["sep"..param] = {copyTable(defaultSeparators["sep%q\\d"])} elseif flag == p.claimCommands.reference or flag == p.claimCommands.references then param = parameters.reference else return self:processFlag(flag) end if self.states[param] then return false end -- create a new state for each command self.states[param] = State:new(self, param) -- use "%x" as the general parameter name self.states[param].parsedFormat = parseFormat(parameters.general) -- will be overwritten for param=="%p" -- set the separator self.states[param].separator = self.separators["sep"..param] -- will be nil for param=="%p", which will be set separately if flag == p.claimCommands.property or flag == p.claimCommands.qualifier or flag == p.claimCommands.reference then self.states[param].singleValue = true end self.curState = self.states[param] return true end function Config:processSeparators(args) local sep for i, v in pairs(self.separators) do if args[i] then sep = replaceSpecialChars(args[i]) if sep ~= "" then self.separators[i][1] = {sep} else self.separators[i][1] = nil end end end end function Config:setFormatAndSeparators(state, parsedFormat) state.parsedFormat = parsedFormat state.separator = self.separators["sep"] state.movSeparator = self.separators["sep"..parameters.separator] state.puncMark = self.separators["punc"] end -- determines if a claim has references by prefetching them from the claim using getReferences, -- which applies some filtering that determines if a reference is actually returned, -- and caches the references for later use function State:isSourced(claim) self.conf.prefetchedRefs = self:getReferences(claim) return (#self.conf.prefetchedRefs > 0) end function State:resetCaches() -- any prefetched references of the previous claim must not be used self.conf.prefetchedRefs = nil end function State:claimMatches(claim) local matches, rankPos -- first of all, reset any cached values used for the previous claim self:resetCaches() -- if a property value was given, check if it matches the claim's property value if self.conf.propertyValue then matches = self.conf:snakEqualsValue(claim.mainsnak, self.conf.propertyValue) else matches = true end -- if any qualifier values were given, check if each matches one of the claim's qualifier values for i, v in pairs(self.conf.qualifierIDsAndValues) do matches = (matches and self.conf:qualifierMatches(claim, i, v)) end -- check if the claim's rank and time period match rankPos = rankTable[claim.rank] or 4 matches = (matches and self.conf:rankMatches(rankPos) and self.conf:timeMatches(claim)) -- if only claims with references must be returned, check if this one has any if self.conf.sourcedOnly then matches = (matches and self:isSourced(claim)) -- prefetches and caches references end return matches, rankPos end function State:out() local result -- collection of arrays with value objects local valuesArray -- array with value objects local sep = nil -- value object local out = {} -- array with value objects local function walk(formatTable, result) local valuesArray = {} -- array with value objects for i, v in pairs(formatTable.req) do if not result[i] or not result[i][1] then -- we've got no result for a parameter that is required on this level, -- so skip this level (and its children) by returning an empty result return {} end end for _, v in ipairs(formatTable) do if v.param then valuesArray = mergeArrays(valuesArray, result[v.str]) elseif v.str ~= "" then valuesArray[#valuesArray + 1] = {v.str} end if v.child then valuesArray = mergeArrays(valuesArray, walk(v.child, result)) end end return valuesArray end -- iterate through the results from back to front, so that we know when to add separators for i = #self.results, 1, -1 do result = self.results[i] -- if there is already some output, then add the separators if #out > 0 then sep = self.separator[1] -- fixed separator result[parameters.separator] = {self.movSeparator[1]} -- movable separator else sep = nil result[parameters.separator] = {self.puncMark[1]} -- optional punctuation mark end valuesArray = walk(self.parsedFormat, result) if #valuesArray > 0 then if sep then valuesArray[#valuesArray + 1] = sep end out = mergeArrays(valuesArray, out) end end -- reset state before next iteration self.results = {} return out end -- level 1 hook function State:getProperty(claim) local value = {self:getValue(claim.mainsnak)} -- create one value object if #value > 0 then return {value} -- wrap the value object in an array and return it else return {} -- return empty array if there was no value end end -- level 1 hook function State:getQualifiers(claim, param) local qualifiers if claim.qualifiers then qualifiers = claim.qualifiers[self.conf.qualifierIDs[param]] end if qualifiers then -- iterate through claim's qualifier statements to collect their values; -- return array with multiple value objects return self.conf.states[param]:iterate(qualifiers, {[parameters.general] = hookNames[parameters.qualifier.."\\d"][2], count = 1}) -- pass qualifier state with level 2 hook else return {} -- return empty array end end -- level 2 hook function State:getQualifier(snak) local value = {self:getValue(snak)} -- create one value object if #value > 0 then return {value} -- wrap the value object in an array and return it else return {} -- return empty array if there was no value end end -- level 1 hook function State:getAllQualifiers(claim, param, result, hooks) local out = {} -- array with value objects local sep = self.conf.separators["sep"..parameters.qualifier][1] -- value object -- iterate through the output of the separate "qualifier(s)" commands for i = 1, self.conf.states.qualifiersCount do -- if a hook has not been called yet, call it now if not result[parameters.qualifier..i] then self:callHook(parameters.qualifier..i, hooks, claim, result) end -- if there is output for this particular "qualifier(s)" command, then add it if result[parameters.qualifier..i] and result[parameters.qualifier..i][1] then -- if there is already some output, then add the separator if #out > 0 and sep then out[#out + 1] = sep end out = mergeArrays(out, result[parameters.qualifier..i]) end end return out end -- level 1 hook function State:getReferences(claim) if self.conf.prefetchedRefs then -- return references that have been prefetched by isSourced return self.conf.prefetchedRefs end if claim.references then -- iterate through claim's reference statements to collect their values; -- return array with multiple value objects return self.conf.states[parameters.reference]:iterate(claim.references, {[parameters.general] = hookNames[parameters.reference][2], count = 1}) -- pass reference state with level 2 hook else return {} -- return empty array end end -- level 2 hook function State:getReference(statement) local citeParamMapping = i18n['cite']['param-mapping'] local citeConfig = i18n['cite']['config'] local citeTypes = i18n['cite']['output-types'] -- will hold rendered properties of the reference which are not directly from statement.snaks, -- Namely, is URL generated from an external ID. local additionalProcessedProperties = {} -- for each citation type, there will be an associative array that associates lists of rendered properties -- to citation-template parameters local candidateParams = {} -- like above, but only associates one rendered property to each parameter; if the above variable -- contains more strings for a parameter, the strings will be assigned to numbered params (e.g. "author1") local citeParams = {} local citeErrors = {} local referenceEmpty = true -- will be set to false if at least one parameter is left unremoved local version = 12 -- increment this each time the below logic is changed to avoid conflict errors if not statement.snaks then return {} end -- don't use bot-added references referencing Wikimedia projects or containing "inferred from" (such references are not usable on Wikipedia) if statement.snaks[aliasesP.importedFrom] or statement.snaks[aliasesP.wikimediaImportURL] or statement.snaks[aliasesP.inferredFrom] then return {} end -- don't include "type of reference" if statement.snaks[aliasesP.typeOfReference] then statement.snaks[aliasesP.typeOfReference] = nil end -- don't include "image" to prevent littering if statement.snaks[aliasesP.image] then statement.snaks[aliasesP.image] = nil end -- don't include "language" if it is equal to the local one if self:getReferenceDetail(statement.snaks, aliasesP.language) == self.conf.langName then statement.snaks[aliasesP.language] = nil end if statement.snaks[aliasesP.statedIn] and not statement.snaks[aliasesP.referenceURL] then -- "stated in" was given but "reference URL" was not. -- get "Wikidata property" properties from the item in "stated in" -- if any of the returned properties of the external-id datatype is in statement.snaks, generate a link from it and use the link in the reference -- find the "Wikidata property" properties in the item from "stated in" local wikidataPropertiesOfSource = mw.text.split(p._properties{p.flags.raw, aliasesP.wikidataProperty, [p.args.eid] = self.conf:getValue(statement.snaks[aliasesP.statedIn][1], true, false)}, ", ", true) for i, wikidataPropertyOfSource in pairs(wikidataPropertiesOfSource) do if statement.snaks[wikidataPropertyOfSource] and statement.snaks[wikidataPropertyOfSource][1].datatype == "external-id" then local tempLink = self:getReferenceDetail(statement.snaks, wikidataPropertyOfSource, false, true) -- not raw, linked if mw.ustring.match(tempLink, "^%[%Z- %Z+%]$") then -- getValue returned a URL in square brackets. -- the link is in wiki markup, so strip the square brackets and the display text -- gsub also returns another, discarted value, therefore the result is assigned to tempLink first tempLink = mw.ustring.gsub(tempLink, "^%[(%Z-) %Z+%]$", "%1") additionalProcessedProperties[aliasesP.referenceURL] = {tempLink} statement.snaks[wikidataPropertyOfSource] = nil break end end end end -- initialize candidateParams and citeParams for _, citeType in ipairs(citeTypes) do candidateParams[citeType] = {} citeParams[citeType] = {} end -- fill candidateParams for _, citeType in ipairs(citeTypes) do -- This will contain value--priority pairs for each param name. local candidateValuesAndPriorities = {} -- fill candidateValuesAndPriorities for refProperty in pairs(statement.snaks) do if citeErrors[citeType] then break end repeat -- just a simple wrapper to emulate "continue" -- set mappingKey and prefix local mappingKey local prefix = "" if statement.snaks[refProperty][1].datatype == 'external-id' then mappingKey = "external-id" prefix = self.conf:getLabel(refProperty) if prefix ~= "" then prefix = prefix .. " " end else mappingKey = refProperty end local paramName = citeParamMapping[citeType][mappingKey] -- skip properties with empty parameter name if paramName == "" then break -- skip this property for this value of citeType end -- handle unknown properties in the reference if not paramName then referenceEmpty = false local error_message = errorText("unknown-property-in-ref", refProperty) assert(error_message) -- Should not be nil citeErrors[citeType] = error_message break end -- set processedProperty local processedProperty local raw = false -- if the value is wanted raw if isValueInTable(paramName, citeConfig[citeType]["raw-value-params"] or {}) then raw = true end if isValueInTable(paramName, citeConfig[citeType]["numbered-params"] or {}) then -- Multiple values may be given. processedProperty = self:getReferenceDetails(statement.snaks, refProperty, raw, self.linked, true) -- anyLang = true else -- If multiple values are given, all but the first suitable one are discarted. processedProperty = {self:getReferenceDetail(statement.snaks, refProperty, raw, self.linked and (statement.snaks[refProperty][1].datatype ~= 'url'), true)} -- link = true/false, anyLang = true end if #processedProperty == 0 then break end referenceEmpty = false -- add an empty entry to candidateValuesAndPriorities, if there isn't one already if not candidateValuesAndPriorities[paramName] then candidateValuesAndPriorities[paramName] = {} end -- find the priority of refProperty local thisPropertyPriority = -1 local thisParamPrioritization = citeConfig[citeType]["prioritization"][paramName] if thisParamPrioritization then for i_priority, i_property in ipairs(thisParamPrioritization) do if i_property == refProperty then thisPropertyPriority = i_priority end end end for _, propertyValue in pairs(processedProperty) do table.insert( candidateValuesAndPriorities[paramName], {prefix .. propertyValue, thisPropertyPriority} ) end until true end -- fill candidateParams[citeType] if not citeErrors[citeType] then local compareValuePriorities = function(pair1, pair2) if pair1[2] == -1 and pair2[2] ~= -1 then return false end if pair1[2] ~= -1 and pair2[2] == -1 then return true end return pair1[2] < pair2[2] end -- fill candidateParams[citeType][paramName] for each used param for paramName, _ in pairs(candidateValuesAndPriorities) do table.sort(candidateValuesAndPriorities[paramName], compareValuePriorities) candidateParams[citeType][paramName] = {} for _, valuePriorityPair in ipairs(candidateValuesAndPriorities[paramName]) do table.insert(candidateParams[citeType][paramName], valuePriorityPair[1]) end end end end -- handle additional properties for refProperty in pairs(additionalProcessedProperties) do for _, citeType in ipairs(citeTypes) do repeat -- skip if there already have been errors if citeErrors[citeType] then break end local paramName = citeParamMapping[citeType][refProperty] -- handle unknown properties in the reference if not paramName then -- Skip this additional property, but do not cause an error. break end if paramName == "" then break end referenceEmpty = false if not candidateParams[citeType][paramName] then candidateParams[citeType][paramName] = {} end for _, propertyValue in pairs(additionalProcessedProperties[refProperty]) do table.insert(candidateParams[citeType][paramName], propertyValue) end until true end end -- fill citeParams for _, citeType in ipairs(citeTypes) do for paramName, paramValues in pairs(candidateParams[citeType]) do if #paramValues == 1 or not isValueInTable(paramName, citeConfig[citeType]["numbered-params"] or {}) then citeParams[citeType][paramName] = paramValues[1] else -- There is more than one value for this parameter - the values will -- go into separate numbered parameters (e.g. "author1", "author2") for paramNum, paramValue in pairs(paramValues) do citeParams[citeType][paramName .. paramNum] = paramValue end end end end -- handle missing mandatory parameters for the templates for _, citeType in ipairs(citeTypes) do for _, requiredCiteParam in pairs(citeConfig[citeType]["mandatory-params"] or {}) do if not citeParams[citeType][requiredCiteParam] then -- The required param is not present. if citeErrors[citeType] then -- Do not override the previous error, if it exists. break end local error_message = errorText("missing-mandatory-param", requiredCiteParam) assert(error_message) -- Should not be nil citeErrors[citeType] = error_message end end end local citeTypeToUse = nil -- choose the output template for _, citeType in ipairs(citeTypes) do if not citeErrors[citeType] then citeTypeToUse = citeType break end end -- set refContent local refContent = "" if citeTypeToUse then local templateToUse = citeConfig[citeTypeToUse]["template"] local paramsToUse = citeParams[citeTypeToUse] if not templateToUse or templateToUse == "" then throwError("no-such-reference-template", tostring(templateToUse), i18nPath, citeTypeToUse) end -- if this module is being substituted then build a regular template call, otherwise expand the template if mw.isSubsting() then for i, v in pairs(paramsToUse) do refContent = refContent .. "|" .. i .. "=" .. v end refContent = "{{" .. templateToUse .. refContent .. "}}" else xpcall( function () refContent = mw.getCurrentFrame():expandTemplate{title=templateToUse, args=paramsToUse} end, function () throwError("no-such-reference-template", templateToUse, i18nPath, citeTypeToUse) end ) end -- If the citation couldn't be displayed using any template, but is not empty (barring ignored propeties), throw an error. elseif not referenceEmpty then refContent = errorText("malformed-reference-header") for _, citeType in ipairs(citeTypes) do refContent = refContent .. errorText("template-failure-reason", citeConfig[citeType]["template"], citeErrors[citeType]) end refContent = refContent .. errorText("malformed-reference-footer") end -- wrap refContent local ref = {} if refContent ~= "" then ref = {refContent} if not self.rawValue then -- this should become a <ref> tag, so save the reference's hash for later ref.refHash = "wikidata-" .. statement.hash .. "-v" .. (tonumber(i18n['version']) + version) end return {ref} else return {} end end -- gets a detail of one particular type for a reference function State:getReferenceDetail(snaks, dType, raw, link, anyLang) local switchLang = anyLang local value = nil if not snaks[dType] then return nil end -- if anyLang, first try the local language and otherwise any language repeat for _, v in ipairs(snaks[dType]) do value = self.conf:getValue(v, raw, link, false, anyLang and not switchLang, false, true) -- noSpecial = true if value then break end end if value or not anyLang then break end switchLang = not switchLang until anyLang and switchLang return value end -- gets the details of one particular type for a reference function State:getReferenceDetails(snaks, dType, raw, link, anyLang) local values = {} if not snaks[dType] then return {} end for _, v in ipairs(snaks[dType]) do -- if nil is returned then it will not be added to the table values[#values + 1] = self.conf:getValue(v, raw, link, false, anyLang, false, true) -- noSpecial = true end return values end -- level 1 hook function State:getAlias(object) local value = object.value local title = nil if value and self.linked then if self.conf.entityID:sub(1,1) == "Q" then title = mw.wikibase.getSitelink(self.conf.entityID) elseif self.conf.entityID:sub(1,1) == "P" then title = "d:Property:" .. self.conf.entityID end if title then value = buildWikilink(title, value) end end value = {value} -- create one value object if #value > 0 then return {value} -- wrap the value object in an array and return it else return {} -- return empty array if there was no value end end -- level 1 hook function State:getBadge(value) value = self.conf:getLabel(value, self.rawValue, self.linked, self.shortName) if value == "" then value = nil end value = {value} -- create one value object if #value > 0 then return {value} -- wrap the value object in an array and return it else return {} -- return empty array if there was no value end end function State:callHook(param, hooks, statement, result) -- call a parameter's hook if it has been defined and if it has not been called before if not result[param] and hooks[param] then local valuesArray = self[hooks[param]](self, statement, param, result, hooks) -- array with value objects -- add to the result if #valuesArray > 0 then result[param] = valuesArray result.count = result.count + 1 else result[param] = {} -- an empty array to indicate that we've tried this hook already return true -- miss == true end end return false end -- iterate through claims, claim's qualifiers or claim's references to collect values function State:iterate(statements, hooks, matchHook) matchHook = matchHook or alwaysTrue local matches = false local rankPos = nil local result, gotRequired for _, v in ipairs(statements) do -- rankPos will be nil for non-claim statements (e.g. qualifiers, references, etc.) matches, rankPos = matchHook(self, v) if matches then result = {count = 0} -- collection of arrays with value objects local function walk(formatTable) local miss for i2, v2 in pairs(formatTable.req) do -- call a hook, adding its return value to the result miss = self:callHook(i2, hooks, v, result) if miss then -- we miss a required value for this level, so return false return false end if result.count == hooks.count then -- we're done if all hooks have been called; -- returning at this point breaks the loop return true end end for _, v2 in ipairs(formatTable) do if result.count == hooks.count then -- we're done if all hooks have been called; -- returning at this point prevents further childs from being processed return true end if v2.child then walk(v2.child) end end return true end gotRequired = walk(self.parsedFormat) -- only append the result if we got values for all required parameters on the root level if gotRequired then -- if we have a rankPos (only with matchHook() for complete claims), then update the foundRank if rankPos and self.conf.foundRank > rankPos then self.conf.foundRank = rankPos end -- append the result self.results[#self.results + 1] = result -- break if we only need a single value if self.singleValue then break end end end end return self:out() end local function getEntityId(arg, eid, page, allowOmitPropPrefix, globalSiteId) local id = nil local prop = nil if arg then if arg:sub(1,1) == ":" then page = arg eid = nil elseif arg:sub(1,1):upper() == "Q" or arg:sub(1,9):lower() == "property:" or allowOmitPropPrefix then eid = arg page = nil else prop = arg end end if eid then if eid:sub(1,9):lower() == "property:" then id = replaceAlias(mw.text.trim(eid:sub(10))) if id:sub(1,1):upper() ~= "P" then id = "" end else id = replaceAlias(eid) end elseif page then if page:sub(1,1) == ":" then page = mw.text.trim(page:sub(2)) end id = mw.wikibase.getEntityIdForTitle(page, globalSiteId) or "" end if not id then id = mw.wikibase.getEntityIdForCurrentPage() or "" end id = id:upper() if not mw.wikibase.isValidEntityId(id) then id = "" end return id, prop end local function nextArg(args) local arg = args[args.pointer] if arg then args.pointer = args.pointer + 1 return mw.text.trim(arg) else return nil end end local function claimCommand(args, funcName) local cfg = Config:new() cfg:processFlagOrCommand(funcName) -- process first command (== function name) local lastArg, parsedFormat, formatParams, claims, value local hooks = {count = 0} -- set the date if given; -- must come BEFORE processing the flags if args[p.args.date] then cfg.atDate = {parseDate(args[p.args.date])} cfg.periods = {false, true, false} -- change default time constraint to 'current' end -- process flags and commands repeat lastArg = nextArg(args) until not cfg:processFlagOrCommand(lastArg) -- get the entity ID from either the positional argument, the eid argument or the page argument cfg.entityID, cfg.propertyID = getEntityId(lastArg, args[p.args.eid], args[p.args.page], false, args[p.args.globalSiteId]) if cfg.entityID == "" then return "" -- we cannot continue without a valid entity ID end cfg.entity = mw.wikibase.getEntity(cfg.entityID) if not cfg.propertyID then cfg.propertyID = nextArg(args) end cfg.propertyID = replaceAlias(cfg.propertyID) if not cfg.entity or not cfg.propertyID then return "" -- we cannot continue without an entity or a property ID end cfg.propertyID = cfg.propertyID:upper() if not cfg.entity.claims or not cfg.entity.claims[cfg.propertyID] then return "" -- there is no use to continue without any claims end claims = cfg.entity.claims[cfg.propertyID] if cfg.states.qualifiersCount > 0 then -- do further processing if "qualifier(s)" command was given if #args - args.pointer + 1 > cfg.states.qualifiersCount then -- claim ID or literal value has been given cfg.propertyValue = nextArg(args) end for i = 1, cfg.states.qualifiersCount do -- check if given qualifier ID is an alias and add it cfg.qualifierIDs[parameters.qualifier..i] = replaceAlias(nextArg(args) or ""):upper() end elseif cfg.states[parameters.reference] then -- do further processing if "reference(s)" command was given cfg.propertyValue = nextArg(args) end -- check for special property value 'somevalue' or 'novalue' if cfg.propertyValue then cfg.propertyValue = replaceSpecialChars(cfg.propertyValue) if cfg.propertyValue ~= "" and mw.text.trim(cfg.propertyValue) == "" then cfg.propertyValue = " " -- single space represents 'somevalue', whereas empty string represents 'novalue' else cfg.propertyValue = mw.text.trim(cfg.propertyValue) end end -- parse the desired format, or choose an appropriate format if args["format"] then parsedFormat, formatParams = parseFormat(args["format"]) elseif cfg.states.qualifiersCount > 0 then -- "qualifier(s)" command given if cfg.states[parameters.property] then -- "propert(y|ies)" command given parsedFormat, formatParams = parseFormat(formats.propertyWithQualifier) else parsedFormat, formatParams = parseFormat(formats.qualifier) end elseif cfg.states[parameters.property] then -- "propert(y|ies)" command given parsedFormat, formatParams = parseFormat(formats.property) else -- "reference(s)" command given parsedFormat, formatParams = parseFormat(formats.reference) end -- if a "qualifier(s)" command and no "propert(y|ies)" command has been given, make the movable separator a semicolon if cfg.states.qualifiersCount > 0 and not cfg.states[parameters.property] then cfg.separators["sep"..parameters.separator][1] = {";"} end -- if only "reference(s)" has been given, set the default separator to none (except when raw) if cfg.states[parameters.reference] and not cfg.states[parameters.property] and cfg.states.qualifiersCount == 0 and not cfg.states[parameters.reference].rawValue then cfg.separators["sep"][1] = nil end -- if exactly one "qualifier(s)" command has been given, make "sep%q" point to "sep%q1" to make them equivalent if cfg.states.qualifiersCount == 1 then cfg.separators["sep"..parameters.qualifier] = cfg.separators["sep"..parameters.qualifier.."1"] end -- process overridden separator values; -- must come AFTER tweaking the default separators cfg:processSeparators(args) -- define the hooks that should be called (getProperty, getQualifiers, getReferences); -- only define a hook if both its command ("propert(y|ies)", "reference(s)", "qualifier(s)") and its parameter ("%p", "%r", "%q1", "%q2", "%q3") have been given for i, v in pairs(cfg.states) do -- e.g. 'formatParams["%q1"] or formatParams["%q"]' to define hook even if "%q1" was not defined to be able to build a complete value for "%q" if formatParams[i] or formatParams[i:sub(1, 2)] then hooks[i] = getHookName(i, 1) hooks.count = hooks.count + 1 end end -- the "%q" parameter is not attached to a state, but is a collection of the results of multiple states (attached to "%q1", "%q2", "%q3", ...); -- so if this parameter is given then this hook must be defined separately, but only if at least one "qualifier(s)" command has been given if formatParams[parameters.qualifier] and cfg.states.qualifiersCount > 0 then hooks[parameters.qualifier] = getHookName(parameters.qualifier, 1) hooks.count = hooks.count + 1 end -- create a state for "properties" if it doesn't exist yet, which will be used as a base configuration for each claim iteration; -- must come AFTER defining the hooks if not cfg.states[parameters.property] then cfg.states[parameters.property] = State:new(cfg, parameters.property) -- if the "single" flag has been given then this state should be equivalent to "property" (singular) if cfg.singleClaim then cfg.states[parameters.property].singleValue = true end end -- if the "sourced" flag has been given then create a state for "reference" if it doesn't exist yet, using default values, -- which must exist in order to be able to determine if a claim has any references; -- must come AFTER defining the hooks if cfg.sourcedOnly and not cfg.states[parameters.reference] then cfg:processFlagOrCommand(p.claimCommands.reference) -- use singular "reference" to minimize overhead end -- set the parsed format and the separators (and optional punctuation mark); -- must come AFTER creating the additonal states cfg:setFormatAndSeparators(cfg.states[parameters.property], parsedFormat) -- process qualifier matching values, analogous to cfg.propertyValue for i, v in pairs(args) do i = tostring(i) if i:match('^[Pp]%d+$') or aliasesP[i] then v = replaceSpecialChars(v) -- check for special qualifier value 'somevalue' if v ~= "" and mw.text.trim(v) == "" then v = " " -- single space represents 'somevalue' end cfg.qualifierIDsAndValues[replaceAlias(i):upper()] = v end end -- first sort the claims on rank to pre-define the order of output (preferred first, then normal, then deprecated) claims = sortOnRank(claims) -- then iterate through the claims to collect values value = cfg:concatValues(cfg.states[parameters.property]:iterate(claims, hooks, State.claimMatches)) -- pass property state with level 1 hooks and matchHook -- if desired, add a clickable icon that may be used to edit the returned values on Wikidata if cfg.editable and value ~= "" then value = value .. cfg:getEditIcon() end return value end local function generalCommand(args, funcName) local cfg = Config:new() cfg.curState = State:new(cfg) local lastArg local value = nil repeat lastArg = nextArg(args) until not cfg:processFlag(lastArg) -- get the entity ID from either the positional argument, the eid argument or the page argument cfg.entityID = getEntityId(lastArg, args[p.args.eid], args[p.args.page], true, args[p.args.globalSiteId]) if cfg.entityID == "" or not mw.wikibase.entityExists(cfg.entityID) then return "" -- we cannot continue without an entity end -- serve according to the given command if funcName == p.generalCommands.label then value = cfg:getLabel(cfg.entityID, cfg.curState.rawValue, cfg.curState.linked, cfg.curState.shortName) elseif funcName == p.generalCommands.title then cfg.inSitelinks = true if cfg.entityID:sub(1,1) == "Q" then value = mw.wikibase.getSitelink(cfg.entityID) end if cfg.curState.linked and value then value = buildWikilink(value) end elseif funcName == p.generalCommands.description then value = mw.wikibase.getDescription(cfg.entityID) else local parsedFormat, formatParams local hooks = {count = 0} cfg.entity = mw.wikibase.getEntity(cfg.entityID) if funcName == p.generalCommands.alias or funcName == p.generalCommands.badge then cfg.curState.singleValue = true end if funcName == p.generalCommands.alias or funcName == p.generalCommands.aliases then if not cfg.entity.aliases or not cfg.entity.aliases[cfg.langCode] then return "" -- there is no use to continue without any aliasses end local aliases = cfg.entity.aliases[cfg.langCode] -- parse the desired format, or parse the default aliases format if args["format"] then parsedFormat, formatParams = parseFormat(args["format"]) else parsedFormat, formatParams = parseFormat(formats.alias) end -- process overridden separator values; -- must come AFTER tweaking the default separators cfg:processSeparators(args) -- define the hook that should be called (getAlias); -- only define the hook if the parameter ("%a") has been given if formatParams[parameters.alias] then hooks[parameters.alias] = getHookName(parameters.alias, 1) hooks.count = hooks.count + 1 end -- set the parsed format and the separators (and optional punctuation mark) cfg:setFormatAndSeparators(cfg.curState, parsedFormat) -- iterate to collect values value = cfg:concatValues(cfg.curState:iterate(aliases, hooks)) elseif funcName == p.generalCommands.badge or funcName == p.generalCommands.badges then if not cfg.entity.sitelinks or not cfg.entity.sitelinks[cfg.siteID] or not cfg.entity.sitelinks[cfg.siteID].badges then return "" -- there is no use to continue without any badges end local badges = cfg.entity.sitelinks[cfg.siteID].badges cfg.inSitelinks = true -- parse the desired format, or parse the default aliases format if args["format"] then parsedFormat, formatParams = parseFormat(args["format"]) else parsedFormat, formatParams = parseFormat(formats.badge) end -- process overridden separator values; -- must come AFTER tweaking the default separators cfg:processSeparators(args) -- define the hook that should be called (getBadge); -- only define the hook if the parameter ("%b") has been given if formatParams[parameters.badge] then hooks[parameters.badge] = getHookName(parameters.badge, 1) hooks.count = hooks.count + 1 end -- set the parsed format and the separators (and optional punctuation mark) cfg:setFormatAndSeparators(cfg.curState, parsedFormat) -- iterate to collect values value = cfg:concatValues(cfg.curState:iterate(badges, hooks)) end end value = value or "" if cfg.editable and value ~= "" then -- if desired, add a clickable icon that may be used to edit the returned value on Wikidata value = value .. cfg:getEditIcon() end return value end -- modules that include this module should call the functions with an underscore prepended, e.g.: p._property(args) local function establishCommands(commandList, commandFunc) for _, commandName in pairs(commandList) do local function wikitextWrapper(frame) local args = copyTable(frame.args) args.pointer = 1 loadI18n(aliasesP, frame) return commandFunc(args, commandName) end p[commandName] = wikitextWrapper local function luaWrapper(args) args = copyTable(args) args.pointer = 1 loadI18n(aliasesP) return commandFunc(args, commandName) end p["_" .. commandName] = luaWrapper end end establishCommands(p.claimCommands, claimCommand) establishCommands(p.generalCommands, generalCommand) -- main function that is supposed to be used by wrapper templates function p.main(frame) if not mw.wikibase then return nil end local f, args loadI18n(aliasesP, frame) -- get the parent frame to take the arguments that were passed to the wrapper template frame = frame:getParent() or frame if not frame.args[1] then throwError("no-function-specified") end f = mw.text.trim(frame.args[1]) if f == "main" then throwError("main-called-twice") end assert(p["_"..f], errorText('no-such-function', f)) -- copy arguments from immutable to mutable table args = copyTable(frame.args) -- remove the function name from the list table.remove(args, 1) return p["_"..f](args) end return p j5a6l03tjwodgrvfnv3lb4x5up93wlv 15564 15563 2026-08-22T10:32:54Z A826 1864 ೧ revisions imported from [[:w:ಮಾಡ್ಯೂಲ್:Wd]] 15563 Scribunto text/plain -- Original module located at [[:en:Module:Wd]] and [[:en:Module:Wd/i18n]]. require("strict") local p = {} local module_arg = ... local i18n local i18nPath local function loadI18n(aliasesP, frame) local title if frame then -- current module invoked by page/template, get its title from frame title = frame:getTitle() else -- current module included by other module, get its title from ... title = module_arg end if not i18n then i18nPath = title .. "/i18n" i18n = require(i18nPath).init(aliasesP) end end p.claimCommands = { property = "property", properties = "properties", qualifier = "qualifier", qualifiers = "qualifiers", reference = "reference", references = "references" } p.generalCommands = { label = "label", title = "title", description = "description", alias = "alias", aliases = "aliases", badge = "badge", badges = "badges" } p.flags = { linked = "linked", short = "short", raw = "raw", multilanguage = "multilanguage", unit = "unit", ------------- preferred = "preferred", normal = "normal", deprecated = "deprecated", best = "best", future = "future", current = "current", former = "former", edit = "edit", editAtEnd = "edit@end", mdy = "mdy", single = "single", sourced = "sourced" } p.args = { eid = "eid", page = "page", date = "date", globalSiteId = "globalSiteId" } local aliasesP = { coord = "P625", ----------------------- image = "P18", author = "P50", authorNameString = "P2093", publisher = "P123", importedFrom = "P143", wikimediaImportURL = "P4656", statedIn = "P248", pages = "P304", language = "P407", hasPart = "P527", publicationDate = "P577", startTime = "P580", endTime = "P582", chapter = "P792", retrieved = "P813", referenceURL = "P854", sectionVerseOrParagraph = "P958", archiveURL = "P1065", title = "P1476", formatterURL = "P1630", quote = "P1683", shortName = "P1813", definingFormula = "P2534", archiveDate = "P2960", inferredFrom = "P3452", typeOfReference = "P3865", column = "P3903", subjectNamedAs = "P1810", wikidataProperty = "P1687", publishedIn = "P1433", lastUpdate = "P5017" } local aliasesQ = { percentage = "Q11229", prolepticJulianCalendar = "Q1985786", citeWeb = "Q5637226", citeQ = "Q22321052" } local parameters = { property = "%p", qualifier = "%q", reference = "%r", alias = "%a", badge = "%b", separator = "%s", general = "%x" } local formats = { property = "%p[%s][%r]", qualifier = "%q[%s][%r]", reference = "%r", propertyWithQualifier = "%p[ <span style=\"font-size:85\\%\">(%q)</span>][%s][%r]", alias = "%a[%s]", badge = "%b[%s]" } local hookNames = { -- {level_1, level_2} [parameters.property] = {"getProperty"}, [parameters.reference] = {"getReferences", "getReference"}, [parameters.qualifier] = {"getAllQualifiers"}, [parameters.qualifier.."\\d"] = {"getQualifiers", "getQualifier"}, [parameters.alias] = {"getAlias"}, [parameters.badge] = {"getBadge"} } -- default value objects, should NOT be mutated but instead copied local defaultSeparators = { ["sep"] = {" "}, ["sep%s"] = {","}, ["sep%q"] = {"; "}, ["sep%q\\d"] = {", "}, ["sep%r"] = nil, -- none ["punc"] = nil -- none } local rankTable = { ["preferred"] = 1, ["normal"] = 2, ["deprecated"] = 3 } local function replaceAlias(id) if aliasesP[id] then id = aliasesP[id] end return id end local function errorText(code, ...) local text = i18n["errors"][code] if arg then text = mw.ustring.format(text, unpack(arg)) end return text end local function throwError(errorMessage, ...) error(errorText(errorMessage, unpack(arg))) end local function replaceDecimalMark(num) return mw.ustring.gsub(num, "[.]", i18n['numeric']['decimal-mark'], 1) end local function padZeros(num, numDigits) local numZeros local negative = false if num < 0 then negative = true num = num * -1 end num = tostring(num) numZeros = numDigits - num:len() for _ = 1, numZeros do num = "0"..num end if negative then num = "-"..num end return num end local function replaceSpecialChar(chr) if chr == '_' then -- replace underscores with spaces return ' ' else return chr end end local function replaceSpecialChars(str) local chr local esc = false local strOut = "" for i = 1, #str do chr = str:sub(i,i) if not esc then if chr == '\\' then esc = true else strOut = strOut .. replaceSpecialChar(chr) end else strOut = strOut .. chr esc = false end end return strOut end local function buildWikilink(target, label) if not label or target == label then return "[[" .. target .. "]]" else return "[[" .. target .. "|" .. label .. "]]" end end -- used to make frame.args mutable, to replace #frame.args (which is always 0) -- with the actual amount and to simply copy tables local function copyTable(tIn) if not tIn then return nil end local tOut = {} for i, v in pairs(tIn) do tOut[i] = v end return tOut end -- used to merge output arrays together; -- note that it currently mutates the first input array local function mergeArrays(a1, a2) for i = 1, #a2 do a1[#a1 + 1] = a2[i] end return a1 end local function split(str, del) local out = {} local i, j = str:find(del) if i and j then out[1] = str:sub(1, i - 1) out[2] = str:sub(j + 1) else out[1] = str end return out end local function parseWikidataURL(url) local id if url:match('^http[s]?://') then id = split(url, "Q") if id[2] then return "Q" .. id[2] end end return nil end local function parseDate(dateStr, precision) precision = precision or "d" local i, j, index, ptr local parts = {nil, nil, nil} if dateStr == nil then return parts[1], parts[2], parts[3] -- year, month, day end -- 'T' for snak values, '/' for outputs with '/Julian' attached i, j = dateStr:find("[T/]") if i then dateStr = dateStr:sub(1, i-1) end local from = 1 if dateStr:sub(1,1) == "-" then -- this is a negative number, look further ahead from = 2 end index = 1 ptr = 1 i, j = dateStr:find("-", from) if i then -- year parts[index] = tonumber(dateStr:sub(ptr, i-1), 10) -- explicitly give base 10 to prevent error if parts[index] == -0 then parts[index] = tonumber("0") -- for some reason, 'parts[index] = 0' may actually store '-0', so parse from string instead end if precision == "y" then -- we're done return parts[1], parts[2], parts[3] -- year, month, day end index = index + 1 ptr = i + 1 i, j = dateStr:find("-", ptr) if i then -- month parts[index] = tonumber(dateStr:sub(ptr, i-1), 10) if precision == "m" then -- we're done return parts[1], parts[2], parts[3] -- year, month, day end index = index + 1 ptr = i + 1 end end if dateStr:sub(ptr) ~= "" then -- day if we have month, month if we have year, or year parts[index] = tonumber(dateStr:sub(ptr), 10) end return parts[1], parts[2], parts[3] -- year, month, day end local function datePrecedesDate(aY, aM, aD, bY, bM, bD) if aY == nil or bY == nil then return nil end aM = aM or 1 aD = aD or 1 bM = bM or 1 bD = bD or 1 if aY < bY then return true end if aY > bY then return false end if aM < bM then return true end if aM > bM then return false end if aD < bD then return true end return false end local function getHookName(param, index) if hookNames[param] then return hookNames[param][index] elseif param:len() > 2 then return hookNames[param:sub(1, 2).."\\d"][index] else return nil end end local function alwaysTrue() return true end -- The following function parses a format string. -- -- The example below shows how a parsed string is structured in memory. -- Variables other than 'str' and 'child' are left out for clarity's sake. -- -- Example: -- "A %p B [%s[%q1]] C [%r] D" -- -- Structure: -- [ -- { -- str = "A " -- }, -- { -- str = "%p" -- }, -- { -- str = " B ", -- child = -- [ -- { -- str = "%s", -- child = -- [ -- { -- str = "%q1" -- } -- ] -- } -- ] -- }, -- { -- str = " C ", -- child = -- [ -- { -- str = "%r" -- } -- ] -- }, -- { -- str = " D" -- } -- ] -- local function parseFormat(str) local chr, esc, param, root, cur, prev, new local params = {} local function newObject(array) local obj = {} -- new object obj.str = "" array[#array + 1] = obj -- array{object} obj.parent = array return obj end local function endParam() if param > 0 then if cur.str ~= "" then cur.str = "%"..cur.str cur.param = true params[cur.str] = true cur.parent.req[cur.str] = true prev = cur cur = newObject(cur.parent) end param = 0 end end root = {} -- array root.req = {} cur = newObject(root) prev = nil esc = false param = 0 for i = 1, #str do chr = str:sub(i,i) if not esc then if chr == '\\' then endParam() esc = true elseif chr == '%' then endParam() if cur.str ~= "" then cur = newObject(cur.parent) end param = 2 elseif chr == '[' then endParam() if prev and cur.str == "" then table.remove(cur.parent) cur = prev end cur.child = {} -- new array cur.child.req = {} cur.child.parent = cur cur = newObject(cur.child) elseif chr == ']' then endParam() if cur.parent.parent then new = newObject(cur.parent.parent.parent) if cur.str == "" then table.remove(cur.parent) end cur = new end else if param > 1 then param = param - 1 elseif param == 1 then if not chr:match('%d') then endParam() end end cur.str = cur.str .. replaceSpecialChar(chr) end else cur.str = cur.str .. chr esc = false end prev = nil end endParam() -- make sure that at least one required parameter has been defined if not next(root.req) then throwError("missing-required-parameter") end -- make sure that the separator parameter "%s" is not amongst the required parameters if root.req[parameters.separator] then throwError("extra-required-parameter", parameters.separator) end return root, params end local function sortOnRank(claims) local rankPos local ranks = {{}, {}, {}, {}} -- preferred, normal, deprecated, (default) local sorted = {} for _, v in ipairs(claims) do rankPos = rankTable[v.rank] or 4 ranks[rankPos][#ranks[rankPos] + 1] = v end sorted = ranks[1] sorted = mergeArrays(sorted, ranks[2]) sorted = mergeArrays(sorted, ranks[3]) return sorted end local function isValueInTable(searchedItem, inputTable) for _, item in pairs(inputTable) do if item == searchedItem then return true end end return false end local Config = {} -- allows for recursive calls function Config:new() local cfg = {} setmetatable(cfg, self) self.__index = self cfg.separators = { -- single value objects wrapped in arrays so that we can pass by reference ["sep"] = {copyTable(defaultSeparators["sep"])}, ["sep%s"] = {copyTable(defaultSeparators["sep%s"])}, ["sep%q"] = {copyTable(defaultSeparators["sep%q"])}, ["sep%r"] = {copyTable(defaultSeparators["sep%r"])}, ["punc"] = {copyTable(defaultSeparators["punc"])} } cfg.entity = nil cfg.entityID = nil cfg.propertyID = nil cfg.propertyValue = nil cfg.qualifierIDs = {} cfg.qualifierIDsAndValues = {} cfg.bestRank = true cfg.ranks = {true, true, false} -- preferred = true, normal = true, deprecated = false cfg.foundRank = #cfg.ranks cfg.flagBest = false cfg.flagRank = false cfg.periods = {true, true, true} -- future = true, current = true, former = true cfg.flagPeriod = false cfg.atDate = {parseDate(os.date('!%Y-%m-%d'))} -- today as {year, month, day} cfg.mdyDate = false cfg.singleClaim = false cfg.sourcedOnly = false cfg.editable = false cfg.editAtEnd = false cfg.inSitelinks = false cfg.langCode = mw.language.getContentLanguage().code cfg.langName = mw.language.fetchLanguageName(cfg.langCode, cfg.langCode) cfg.langObj = mw.language.new(cfg.langCode) cfg.siteID = mw.wikibase.getGlobalSiteId() cfg.states = {} cfg.states.qualifiersCount = 0 cfg.curState = nil cfg.prefetchedRefs = nil return cfg end local State = {} function State:new(cfg, type) local stt = {} setmetatable(stt, self) self.__index = self stt.conf = cfg stt.type = type stt.results = {} stt.parsedFormat = {} stt.separator = {} stt.movSeparator = {} stt.puncMark = {} stt.linked = false stt.rawValue = false stt.shortName = false stt.anyLanguage = false stt.unitOnly = false stt.singleValue = false return stt end -- if id == nil then item connected to current page is used function Config:getLabel(id, raw, link, short) local label = nil local prefix, title= "", nil if not id then id = mw.wikibase.getEntityIdForCurrentPage() if not id then return "" end end id = id:upper() -- just to be sure if raw then -- check if given id actually exists if mw.wikibase.isValidEntityId(id) and mw.wikibase.entityExists(id) then label = id end prefix, title = "d:Special:EntityPage/", label -- may be nil else -- try short name first if requested if short then label = p._property{aliasesP.shortName, [p.args.eid] = id} -- get short name if label == "" then label = nil end end -- get label if not label then label = mw.wikibase.getLabel(id) end end if not label then label = "" elseif link then -- build a link if requested if not title then if id:sub(1,1) == "Q" then title = mw.wikibase.getSitelink(id) elseif id:sub(1,1) == "P" then -- properties have no sitelink, link to Wikidata instead prefix, title = "d:Special:EntityPage/", id end end label = mw.text.nowiki(label) -- escape raw label text so it cannot be wikitext markup if title then label = buildWikilink(prefix .. title, label) end end return label end function Config:getEditIcon() local value = "" local prefix = "" local front = "&nbsp;" local back = "" if self.entityID:sub(1,1) == "P" then prefix = "Property:" end if self.editAtEnd then front = '<span style="float:' if self.langObj:isRTL() then front = front .. 'left' else front = front .. 'right' end front = front .. '">' back = '</span>' end value = "[[File:OOjs UI icon edit-ltr-progressive.svg|frameless|text-top|10px|alt=" .. i18n['info']['edit-on-wikidata'] .. "|link=https://www.wikidata.org/wiki/" .. prefix .. self.entityID .. "?uselang=" .. self.langCode if self.propertyID then value = value .. "#" .. self.propertyID elseif self.inSitelinks then value = value .. "#sitelinks-wikipedia" end value = value .. "|" .. i18n['info']['edit-on-wikidata'] .. "]]" return front .. value .. back end -- used to create the final output string when it's all done, so that for references the -- function extensionTag("ref", ...) is only called when they really ended up in the final output function Config:concatValues(valuesArray) local outString = "" local j, skip for i = 1, #valuesArray do -- check if this is a reference if valuesArray[i].refHash then j = i - 1 skip = false -- skip this reference if it is part of a continuous row of references that already contains the exact same reference while valuesArray[j] and valuesArray[j].refHash do if valuesArray[i].refHash == valuesArray[j].refHash then skip = true break end j = j - 1 end if not skip then -- add <ref> tag with the reference's hash as its name (to deduplicate references) outString = outString .. mw.getCurrentFrame():extensionTag("ref", valuesArray[i][1], {name = valuesArray[i].refHash}) end else outString = outString .. valuesArray[i][1] end end return outString end function Config:convertUnit(unit, raw, link, short, unitOnly) local space = " " local label = "" local itemID if unit == "" or unit == "1" then return nil end if unitOnly then space = "" end itemID = parseWikidataURL(unit) if itemID then if itemID == aliasesQ.percentage then return "%" else label = self:getLabel(itemID, raw, link, short) if label ~= "" then return space .. label end end end return "" end function State:getValue(snak) return self.conf:getValue(snak, self.rawValue, self.linked, self.shortName, self.anyLanguage, self.unitOnly, false, self.type:sub(1,2)) end function Config:getValue(snak, raw, link, short, anyLang, unitOnly, noSpecial, type) if snak.snaktype == 'value' then local datatype = snak.datavalue.type local subtype = snak.datatype local datavalue = snak.datavalue.value if datatype == 'string' then if subtype == 'url' and link then -- create link explicitly if raw then -- will render as a linked number like [1] return "[" .. datavalue .. "]" else return "[" .. datavalue .. " " .. datavalue .. "]" end elseif subtype == 'commonsMedia' then if link then return buildWikilink("c:File:" .. datavalue, datavalue) elseif not raw then return "[[File:" .. datavalue .. "]]" else return datavalue end elseif subtype == 'geo-shape' and link then return buildWikilink("c:" .. datavalue, datavalue) elseif subtype == 'math' and not raw then local attribute = nil if (type == parameters.property or (type == parameters.qualifier and self.propertyID == aliasesP.hasPart)) and snak.property == aliasesP.definingFormula then attribute = {qid = self.entityID} end return mw.getCurrentFrame():extensionTag("math", datavalue, attribute) elseif subtype == 'external-id' and link then local url = p._property{aliasesP.formatterURL, [p.args.eid] = snak.property} -- get formatter URL if url ~= "" then url = mw.ustring.gsub(url, "$1", datavalue) return "[" .. url .. " " .. datavalue .. "]" else return datavalue end else return datavalue end elseif datatype == 'monolingualtext' then if anyLang or datavalue['language'] == self.langCode then return datavalue['text'] else return nil end elseif datatype == 'quantity' then local value = "" local unit if not unitOnly then -- get value and strip + signs from front value = mw.ustring.gsub(datavalue['amount'], "^%+(.+)$", "%1") if raw then return value end -- replace decimal mark based on locale value = replaceDecimalMark(value) -- add delimiters for readability value = i18n.addDelimiters(value) end unit = self:convertUnit(datavalue['unit'], raw, link, short, unitOnly) if unit then value = value .. unit end return value elseif datatype == 'time' then local y, m, d, p, yDiv, yRound, yFull, value, calendarID, dateStr local yFactor = 1 local sign = 1 local prefix = "" local suffix = "" local mayAddCalendar = false local calendar = "" local precision = datavalue['precision'] if precision == 11 then p = "d" elseif precision == 10 then p = "m" else p = "y" yFactor = 10^(9-precision) end y, m, d = parseDate(datavalue['time'], p) if y < 0 then sign = -1 y = y * sign end -- if precision is tens/hundreds/thousands/millions/billions of years if precision <= 8 then yDiv = y / yFactor -- if precision is tens/hundreds/thousands of years if precision >= 6 then mayAddCalendar = true if precision <= 7 then -- round centuries/millenniums up (e.g. 20th century or 3rd millennium) yRound = math.ceil(yDiv) if not raw then if precision == 6 then suffix = i18n['datetime']['suffixes']['millennium'] else suffix = i18n['datetime']['suffixes']['century'] end suffix = i18n.getOrdinalSuffix(yRound) .. suffix else -- if not verbose, take the first year of the century/millennium -- (e.g. 1901 for 20th century or 2001 for 3rd millennium) yRound = (yRound - 1) * yFactor + 1 end else -- precision == 8 -- round decades down (e.g. 2010s) yRound = math.floor(yDiv) * yFactor if not raw then prefix = i18n['datetime']['prefixes']['decade-period'] suffix = i18n['datetime']['suffixes']['decade-period'] end end if raw and sign < 0 then -- if BCE then compensate for "counting backwards" -- (e.g. -2019 for 2010s BCE, -2000 for 20th century BCE or -3000 for 3rd millennium BCE) yRound = yRound + yFactor - 1 end else local yReFactor, yReDiv, yReRound -- round to nearest for tens of thousands of years or more yRound = math.floor(yDiv + 0.5) if yRound == 0 then if precision <= 2 and y ~= 0 then yReFactor = 1e6 yReDiv = y / yReFactor yReRound = math.floor(yReDiv + 0.5) if yReDiv == yReRound then -- change precision to millions of years only if we have a whole number of them precision = 3 yFactor = yReFactor yRound = yReRound end end if yRound == 0 then -- otherwise, take the unrounded (original) number of years precision = 5 yFactor = 1 yRound = y mayAddCalendar = true end end if precision >= 1 and y ~= 0 then yFull = yRound * yFactor yReFactor = 1e9 yReDiv = yFull / yReFactor yReRound = math.floor(yReDiv + 0.5) if yReDiv == yReRound then -- change precision to billions of years if we're in that range precision = 0 yFactor = yReFactor yRound = yReRound else yReFactor = 1e6 yReDiv = yFull / yReFactor yReRound = math.floor(yReDiv + 0.5) if yReDiv == yReRound then -- change precision to millions of years if we're in that range precision = 3 yFactor = yReFactor yRound = yReRound end end end if not raw then if precision == 3 then suffix = i18n['datetime']['suffixes']['million-years'] elseif precision == 0 then suffix = i18n['datetime']['suffixes']['billion-years'] else yRound = yRound * yFactor if yRound == 1 then suffix = i18n['datetime']['suffixes']['year'] else suffix = i18n['datetime']['suffixes']['years'] end end else yRound = yRound * yFactor end end else yRound = y mayAddCalendar = true end if mayAddCalendar then calendarID = parseWikidataURL(datavalue['calendarmodel']) if calendarID and calendarID == aliasesQ.prolepticJulianCalendar then if not raw then if link then calendar = " ("..buildWikilink(i18n['datetime']['julian-calendar'], i18n['datetime']['julian'])..")" else calendar = " ("..i18n['datetime']['julian']..")" end else calendar = "/"..i18n['datetime']['julian'] end end end if not raw then local ce = nil if sign < 0 then ce = i18n['datetime']['BCE'] elseif precision <= 5 then ce = i18n['datetime']['CE'] end if ce then if link then ce = buildWikilink(i18n['datetime']['common-era'], ce) end suffix = suffix .. " " .. ce end value = tostring(yRound) if m then dateStr = self.langObj:formatDate("F", "1-"..m.."-1") if d then if self.mdyDate then dateStr = dateStr .. " " .. d .. "," else dateStr = d .. " " .. dateStr end end value = dateStr .. " " .. value end value = prefix .. value .. suffix .. calendar else value = padZeros(yRound * sign, 4) if m then value = value .. "-" .. padZeros(m, 2) if d then value = value .. "-" .. padZeros(d, 2) end end value = value .. calendar end return value elseif datatype == 'globecoordinate' then -- logic from https://github.com/DataValues/Geo (v4.0.1) local precision, unitsPerDegree, numDigits, strFormat, value, globe local latitude, latConv, latValue, latLink local longitude, lonConv, lonValue, lonLink local latDirection, latDirectionN, latDirectionS, latDirectionEN local lonDirection, lonDirectionE, lonDirectionW, lonDirectionEN local degSymbol, minSymbol, secSymbol, separator local latDegrees = nil local latMinutes = nil local latSeconds = nil local lonDegrees = nil local lonMinutes = nil local lonSeconds = nil local latDegSym = "" local latMinSym = "" local latSecSym = "" local lonDegSym = "" local lonMinSym = "" local lonSecSym = "" local latDirectionEN_N = "N" local latDirectionEN_S = "S" local lonDirectionEN_E = "E" local lonDirectionEN_W = "W" if not raw then latDirectionN = i18n['coord']['latitude-north'] latDirectionS = i18n['coord']['latitude-south'] lonDirectionE = i18n['coord']['longitude-east'] lonDirectionW = i18n['coord']['longitude-west'] degSymbol = i18n['coord']['degrees'] minSymbol = i18n['coord']['minutes'] secSymbol = i18n['coord']['seconds'] separator = i18n['coord']['separator'] else latDirectionN = latDirectionEN_N latDirectionS = latDirectionEN_S lonDirectionE = lonDirectionEN_E lonDirectionW = lonDirectionEN_W degSymbol = "/" minSymbol = "/" secSymbol = "/" separator = "/" end latitude = datavalue['latitude'] longitude = datavalue['longitude'] if latitude < 0 then latDirection = latDirectionS latDirectionEN = latDirectionEN_S latitude = math.abs(latitude) else latDirection = latDirectionN latDirectionEN = latDirectionEN_N end if longitude < 0 then lonDirection = lonDirectionW lonDirectionEN = lonDirectionEN_W longitude = math.abs(longitude) else lonDirection = lonDirectionE lonDirectionEN = lonDirectionEN_E end precision = datavalue['precision'] if not precision or precision <= 0 then precision = 1 / 3600 -- precision not set (correctly), set to arcsecond end -- remove insignificant detail latitude = math.floor(latitude / precision + 0.5) * precision longitude = math.floor(longitude / precision + 0.5) * precision if precision >= 1 - (1 / 60) and precision < 1 then precision = 1 elseif precision >= (1 / 60) - (1 / 3600) and precision < (1 / 60) then precision = 1 / 60 end if precision >= 1 then unitsPerDegree = 1 elseif precision >= (1 / 60) then unitsPerDegree = 60 else unitsPerDegree = 3600 end numDigits = math.ceil(-math.log10(unitsPerDegree * precision)) if numDigits <= 0 then numDigits = tonumber("0") -- for some reason, 'numDigits = 0' may actually store '-0', so parse from string instead end strFormat = "%." .. numDigits .. "f" if precision >= 1 then latDegrees = strFormat:format(latitude) lonDegrees = strFormat:format(longitude) if not raw then latDegSym = replaceDecimalMark(latDegrees) .. degSymbol lonDegSym = replaceDecimalMark(lonDegrees) .. degSymbol else latDegSym = latDegrees .. degSymbol lonDegSym = lonDegrees .. degSymbol end else latConv = math.floor(latitude * unitsPerDegree * 10^numDigits + 0.5) / 10^numDigits lonConv = math.floor(longitude * unitsPerDegree * 10^numDigits + 0.5) / 10^numDigits if precision >= (1 / 60) then latMinutes = latConv lonMinutes = lonConv else latSeconds = latConv lonSeconds = lonConv latMinutes = math.floor(latSeconds / 60) lonMinutes = math.floor(lonSeconds / 60) latSeconds = strFormat:format(latSeconds - (latMinutes * 60)) lonSeconds = strFormat:format(lonSeconds - (lonMinutes * 60)) if not raw then latSecSym = replaceDecimalMark(latSeconds) .. secSymbol lonSecSym = replaceDecimalMark(lonSeconds) .. secSymbol else latSecSym = latSeconds .. secSymbol lonSecSym = lonSeconds .. secSymbol end end latDegrees = math.floor(latMinutes / 60) lonDegrees = math.floor(lonMinutes / 60) latDegSym = latDegrees .. degSymbol lonDegSym = lonDegrees .. degSymbol latMinutes = latMinutes - (latDegrees * 60) lonMinutes = lonMinutes - (lonDegrees * 60) if precision >= (1 / 60) then latMinutes = strFormat:format(latMinutes) lonMinutes = strFormat:format(lonMinutes) if not raw then latMinSym = replaceDecimalMark(latMinutes) .. minSymbol lonMinSym = replaceDecimalMark(lonMinutes) .. minSymbol else latMinSym = latMinutes .. minSymbol lonMinSym = lonMinutes .. minSymbol end else latMinSym = latMinutes .. minSymbol lonMinSym = lonMinutes .. minSymbol end end latValue = latDegSym .. latMinSym .. latSecSym .. latDirection lonValue = lonDegSym .. lonMinSym .. lonSecSym .. lonDirection value = latValue .. separator .. lonValue if link then globe = parseWikidataURL(datavalue['globe']) if globe then globe = mw.wikibase.getLabelByLang(globe, "en"):lower() else globe = "earth" end latLink = table.concat({latDegrees, latMinutes, latSeconds}, "_") lonLink = table.concat({lonDegrees, lonMinutes, lonSeconds}, "_") value = "[https://geohack.toolforge.org/geohack.php?language="..self.langCode.."&params="..latLink.."_"..latDirectionEN.."_"..lonLink.."_"..lonDirectionEN.."_globe:"..globe.." "..value.."]" end return value elseif datatype == 'wikibase-entityid' then local label local itemID = datavalue['numeric-id'] if subtype == 'wikibase-item' then itemID = "Q" .. itemID elseif subtype == 'wikibase-property' then itemID = "P" .. itemID else return '<strong class="error">' .. errorText('unknown-data-type', subtype) .. '</strong>' end label = self:getLabel(itemID, raw, link, short) if label == "" then label = nil end return label else return '<strong class="error">' .. errorText('unknown-data-type', datatype) .. '</strong>' end elseif snak.snaktype == 'somevalue' and not noSpecial then if raw then return " " -- single space represents 'somevalue' else return i18n['values']['unknown'] end elseif snak.snaktype == 'novalue' and not noSpecial then if raw then return "" -- empty string represents 'novalue' else return i18n['values']['none'] end else return nil end end function Config:getSingleRawQualifier(claim, qualifierID) local qualifiers if claim.qualifiers then qualifiers = claim.qualifiers[qualifierID] end if qualifiers and qualifiers[1] then return self:getValue(qualifiers[1], true) -- raw = true else return nil end end function Config:snakEqualsValue(snak, value) local snakValue = self:getValue(snak, true) -- raw = true if snakValue and snak.snaktype == 'value' and snak.datavalue.type == 'wikibase-entityid' then value = value:upper() end return snakValue == value end function Config:setRank(rank) local rankPos if rank == p.flags.best then self.bestRank = true self.flagBest = true -- mark that 'best' flag was given return end if rank:sub(1,9) == p.flags.preferred then rankPos = 1 elseif rank:sub(1,6) == p.flags.normal then rankPos = 2 elseif rank:sub(1,10) == p.flags.deprecated then rankPos = 3 else return end -- one of the rank flags was given, check if another one was given before if not self.flagRank then self.ranks = {false, false, false} -- no other rank flag given before, so unset ranks self.bestRank = self.flagBest -- unsets bestRank only if 'best' flag was not given before self.flagRank = true -- mark that a rank flag was given end if rank:sub(-1) == "+" then for i = rankPos, 1, -1 do self.ranks[i] = true end elseif rank:sub(-1) == "-" then for i = rankPos, #self.ranks do self.ranks[i] = true end else self.ranks[rankPos] = true end end function Config:setPeriod(period) local periodPos if period == p.flags.future then periodPos = 1 elseif period == p.flags.current then periodPos = 2 elseif period == p.flags.former then periodPos = 3 else return end -- one of the period flags was given, check if another one was given before if not self.flagPeriod then self.periods = {false, false, false} -- no other period flag given before, so unset periods self.flagPeriod = true -- mark that a period flag was given end self.periods[periodPos] = true end function Config:qualifierMatches(claim, id, value) local qualifiers if claim.qualifiers then qualifiers = claim.qualifiers[id] end if qualifiers then for _, v in pairs(qualifiers) do if self:snakEqualsValue(v, value) then return true end end elseif value == "" then -- if the qualifier is not present then treat it the same as the special value 'novalue' return true end return false end function Config:rankMatches(rankPos) if self.bestRank then return (self.ranks[rankPos] and self.foundRank >= rankPos) else return self.ranks[rankPos] end end function Config:timeMatches(claim) local startTime = nil local startTimeY = nil local startTimeM = nil local startTimeD = nil local endTime = nil local endTimeY = nil local endTimeM = nil local endTimeD = nil if self.periods[1] and self.periods[2] and self.periods[3] then -- any time return true end startTime = self:getSingleRawQualifier(claim, aliasesP.startTime) if startTime and startTime ~= "" and startTime ~= " " then startTimeY, startTimeM, startTimeD = parseDate(startTime) end endTime = self:getSingleRawQualifier(claim, aliasesP.endTime) if endTime and endTime ~= "" and endTime ~= " " then endTimeY, endTimeM, endTimeD = parseDate(endTime) end if startTimeY ~= nil and endTimeY ~= nil and datePrecedesDate(endTimeY, endTimeM, endTimeD, startTimeY, startTimeM, startTimeD) then -- invalidate end time if it precedes start time endTimeY = nil endTimeM = nil endTimeD = nil end if self.periods[1] then -- future if startTimeY and datePrecedesDate(self.atDate[1], self.atDate[2], self.atDate[3], startTimeY, startTimeM, startTimeD) then return true end end if self.periods[2] then -- current if (startTimeY == nil or not datePrecedesDate(self.atDate[1], self.atDate[2], self.atDate[3], startTimeY, startTimeM, startTimeD)) and (endTimeY == nil or datePrecedesDate(self.atDate[1], self.atDate[2], self.atDate[3], endTimeY, endTimeM, endTimeD)) then return true end end if self.periods[3] then -- former if endTimeY and not datePrecedesDate(self.atDate[1], self.atDate[2], self.atDate[3], endTimeY, endTimeM, endTimeD) then return true end end return false end function Config:processFlag(flag) if not flag then return false end if flag == p.flags.linked then self.curState.linked = true return true elseif flag == p.flags.raw then self.curState.rawValue = true if self.curState == self.states[parameters.reference] then -- raw reference values end with periods and require a separator (other than none) self.separators["sep%r"][1] = {" "} end return true elseif flag == p.flags.short then self.curState.shortName = true return true elseif flag == p.flags.multilanguage then self.curState.anyLanguage = true return true elseif flag == p.flags.unit then self.curState.unitOnly = true return true elseif flag == p.flags.mdy then self.mdyDate = true return true elseif flag == p.flags.single then self.singleClaim = true return true elseif flag == p.flags.sourced then self.sourcedOnly = true return true elseif flag == p.flags.edit then self.editable = true return true elseif flag == p.flags.editAtEnd then self.editable = true self.editAtEnd = true return true elseif flag == p.flags.best or flag:match('^'..p.flags.preferred..'[+-]?$') or flag:match('^'..p.flags.normal..'[+-]?$') or flag:match('^'..p.flags.deprecated..'[+-]?$') then self:setRank(flag) return true elseif flag == p.flags.future or flag == p.flags.current or flag == p.flags.former then self:setPeriod(flag) return true elseif flag == "" then -- ignore empty flags and carry on return true else return false end end function Config:processFlagOrCommand(flag) local param = "" if not flag then return false end if flag == p.claimCommands.property or flag == p.claimCommands.properties then param = parameters.property elseif flag == p.claimCommands.qualifier or flag == p.claimCommands.qualifiers then self.states.qualifiersCount = self.states.qualifiersCount + 1 param = parameters.qualifier .. self.states.qualifiersCount self.separators["sep"..param] = {copyTable(defaultSeparators["sep%q\\d"])} elseif flag == p.claimCommands.reference or flag == p.claimCommands.references then param = parameters.reference else return self:processFlag(flag) end if self.states[param] then return false end -- create a new state for each command self.states[param] = State:new(self, param) -- use "%x" as the general parameter name self.states[param].parsedFormat = parseFormat(parameters.general) -- will be overwritten for param=="%p" -- set the separator self.states[param].separator = self.separators["sep"..param] -- will be nil for param=="%p", which will be set separately if flag == p.claimCommands.property or flag == p.claimCommands.qualifier or flag == p.claimCommands.reference then self.states[param].singleValue = true end self.curState = self.states[param] return true end function Config:processSeparators(args) local sep for i, v in pairs(self.separators) do if args[i] then sep = replaceSpecialChars(args[i]) if sep ~= "" then self.separators[i][1] = {sep} else self.separators[i][1] = nil end end end end function Config:setFormatAndSeparators(state, parsedFormat) state.parsedFormat = parsedFormat state.separator = self.separators["sep"] state.movSeparator = self.separators["sep"..parameters.separator] state.puncMark = self.separators["punc"] end -- determines if a claim has references by prefetching them from the claim using getReferences, -- which applies some filtering that determines if a reference is actually returned, -- and caches the references for later use function State:isSourced(claim) self.conf.prefetchedRefs = self:getReferences(claim) return (#self.conf.prefetchedRefs > 0) end function State:resetCaches() -- any prefetched references of the previous claim must not be used self.conf.prefetchedRefs = nil end function State:claimMatches(claim) local matches, rankPos -- first of all, reset any cached values used for the previous claim self:resetCaches() -- if a property value was given, check if it matches the claim's property value if self.conf.propertyValue then matches = self.conf:snakEqualsValue(claim.mainsnak, self.conf.propertyValue) else matches = true end -- if any qualifier values were given, check if each matches one of the claim's qualifier values for i, v in pairs(self.conf.qualifierIDsAndValues) do matches = (matches and self.conf:qualifierMatches(claim, i, v)) end -- check if the claim's rank and time period match rankPos = rankTable[claim.rank] or 4 matches = (matches and self.conf:rankMatches(rankPos) and self.conf:timeMatches(claim)) -- if only claims with references must be returned, check if this one has any if self.conf.sourcedOnly then matches = (matches and self:isSourced(claim)) -- prefetches and caches references end return matches, rankPos end function State:out() local result -- collection of arrays with value objects local valuesArray -- array with value objects local sep = nil -- value object local out = {} -- array with value objects local function walk(formatTable, result) local valuesArray = {} -- array with value objects for i, v in pairs(formatTable.req) do if not result[i] or not result[i][1] then -- we've got no result for a parameter that is required on this level, -- so skip this level (and its children) by returning an empty result return {} end end for _, v in ipairs(formatTable) do if v.param then valuesArray = mergeArrays(valuesArray, result[v.str]) elseif v.str ~= "" then valuesArray[#valuesArray + 1] = {v.str} end if v.child then valuesArray = mergeArrays(valuesArray, walk(v.child, result)) end end return valuesArray end -- iterate through the results from back to front, so that we know when to add separators for i = #self.results, 1, -1 do result = self.results[i] -- if there is already some output, then add the separators if #out > 0 then sep = self.separator[1] -- fixed separator result[parameters.separator] = {self.movSeparator[1]} -- movable separator else sep = nil result[parameters.separator] = {self.puncMark[1]} -- optional punctuation mark end valuesArray = walk(self.parsedFormat, result) if #valuesArray > 0 then if sep then valuesArray[#valuesArray + 1] = sep end out = mergeArrays(valuesArray, out) end end -- reset state before next iteration self.results = {} return out end -- level 1 hook function State:getProperty(claim) local value = {self:getValue(claim.mainsnak)} -- create one value object if #value > 0 then return {value} -- wrap the value object in an array and return it else return {} -- return empty array if there was no value end end -- level 1 hook function State:getQualifiers(claim, param) local qualifiers if claim.qualifiers then qualifiers = claim.qualifiers[self.conf.qualifierIDs[param]] end if qualifiers then -- iterate through claim's qualifier statements to collect their values; -- return array with multiple value objects return self.conf.states[param]:iterate(qualifiers, {[parameters.general] = hookNames[parameters.qualifier.."\\d"][2], count = 1}) -- pass qualifier state with level 2 hook else return {} -- return empty array end end -- level 2 hook function State:getQualifier(snak) local value = {self:getValue(snak)} -- create one value object if #value > 0 then return {value} -- wrap the value object in an array and return it else return {} -- return empty array if there was no value end end -- level 1 hook function State:getAllQualifiers(claim, param, result, hooks) local out = {} -- array with value objects local sep = self.conf.separators["sep"..parameters.qualifier][1] -- value object -- iterate through the output of the separate "qualifier(s)" commands for i = 1, self.conf.states.qualifiersCount do -- if a hook has not been called yet, call it now if not result[parameters.qualifier..i] then self:callHook(parameters.qualifier..i, hooks, claim, result) end -- if there is output for this particular "qualifier(s)" command, then add it if result[parameters.qualifier..i] and result[parameters.qualifier..i][1] then -- if there is already some output, then add the separator if #out > 0 and sep then out[#out + 1] = sep end out = mergeArrays(out, result[parameters.qualifier..i]) end end return out end -- level 1 hook function State:getReferences(claim) if self.conf.prefetchedRefs then -- return references that have been prefetched by isSourced return self.conf.prefetchedRefs end if claim.references then -- iterate through claim's reference statements to collect their values; -- return array with multiple value objects return self.conf.states[parameters.reference]:iterate(claim.references, {[parameters.general] = hookNames[parameters.reference][2], count = 1}) -- pass reference state with level 2 hook else return {} -- return empty array end end -- level 2 hook function State:getReference(statement) local citeParamMapping = i18n['cite']['param-mapping'] local citeConfig = i18n['cite']['config'] local citeTypes = i18n['cite']['output-types'] -- will hold rendered properties of the reference which are not directly from statement.snaks, -- Namely, is URL generated from an external ID. local additionalProcessedProperties = {} -- for each citation type, there will be an associative array that associates lists of rendered properties -- to citation-template parameters local candidateParams = {} -- like above, but only associates one rendered property to each parameter; if the above variable -- contains more strings for a parameter, the strings will be assigned to numbered params (e.g. "author1") local citeParams = {} local citeErrors = {} local referenceEmpty = true -- will be set to false if at least one parameter is left unremoved local version = 12 -- increment this each time the below logic is changed to avoid conflict errors if not statement.snaks then return {} end -- don't use bot-added references referencing Wikimedia projects or containing "inferred from" (such references are not usable on Wikipedia) if statement.snaks[aliasesP.importedFrom] or statement.snaks[aliasesP.wikimediaImportURL] or statement.snaks[aliasesP.inferredFrom] then return {} end -- don't include "type of reference" if statement.snaks[aliasesP.typeOfReference] then statement.snaks[aliasesP.typeOfReference] = nil end -- don't include "image" to prevent littering if statement.snaks[aliasesP.image] then statement.snaks[aliasesP.image] = nil end -- don't include "language" if it is equal to the local one if self:getReferenceDetail(statement.snaks, aliasesP.language) == self.conf.langName then statement.snaks[aliasesP.language] = nil end if statement.snaks[aliasesP.statedIn] and not statement.snaks[aliasesP.referenceURL] then -- "stated in" was given but "reference URL" was not. -- get "Wikidata property" properties from the item in "stated in" -- if any of the returned properties of the external-id datatype is in statement.snaks, generate a link from it and use the link in the reference -- find the "Wikidata property" properties in the item from "stated in" local wikidataPropertiesOfSource = mw.text.split(p._properties{p.flags.raw, aliasesP.wikidataProperty, [p.args.eid] = self.conf:getValue(statement.snaks[aliasesP.statedIn][1], true, false)}, ", ", true) for i, wikidataPropertyOfSource in pairs(wikidataPropertiesOfSource) do if statement.snaks[wikidataPropertyOfSource] and statement.snaks[wikidataPropertyOfSource][1].datatype == "external-id" then local tempLink = self:getReferenceDetail(statement.snaks, wikidataPropertyOfSource, false, true) -- not raw, linked if mw.ustring.match(tempLink, "^%[%Z- %Z+%]$") then -- getValue returned a URL in square brackets. -- the link is in wiki markup, so strip the square brackets and the display text -- gsub also returns another, discarted value, therefore the result is assigned to tempLink first tempLink = mw.ustring.gsub(tempLink, "^%[(%Z-) %Z+%]$", "%1") additionalProcessedProperties[aliasesP.referenceURL] = {tempLink} statement.snaks[wikidataPropertyOfSource] = nil break end end end end -- initialize candidateParams and citeParams for _, citeType in ipairs(citeTypes) do candidateParams[citeType] = {} citeParams[citeType] = {} end -- fill candidateParams for _, citeType in ipairs(citeTypes) do -- This will contain value--priority pairs for each param name. local candidateValuesAndPriorities = {} -- fill candidateValuesAndPriorities for refProperty in pairs(statement.snaks) do if citeErrors[citeType] then break end repeat -- just a simple wrapper to emulate "continue" -- set mappingKey and prefix local mappingKey local prefix = "" if statement.snaks[refProperty][1].datatype == 'external-id' then mappingKey = "external-id" prefix = self.conf:getLabel(refProperty) if prefix ~= "" then prefix = prefix .. " " end else mappingKey = refProperty end local paramName = citeParamMapping[citeType][mappingKey] -- skip properties with empty parameter name if paramName == "" then break -- skip this property for this value of citeType end -- handle unknown properties in the reference if not paramName then referenceEmpty = false local error_message = errorText("unknown-property-in-ref", refProperty) assert(error_message) -- Should not be nil citeErrors[citeType] = error_message break end -- set processedProperty local processedProperty local raw = false -- if the value is wanted raw if isValueInTable(paramName, citeConfig[citeType]["raw-value-params"] or {}) then raw = true end if isValueInTable(paramName, citeConfig[citeType]["numbered-params"] or {}) then -- Multiple values may be given. processedProperty = self:getReferenceDetails(statement.snaks, refProperty, raw, self.linked, true) -- anyLang = true else -- If multiple values are given, all but the first suitable one are discarted. processedProperty = {self:getReferenceDetail(statement.snaks, refProperty, raw, self.linked and (statement.snaks[refProperty][1].datatype ~= 'url'), true)} -- link = true/false, anyLang = true end if #processedProperty == 0 then break end referenceEmpty = false -- add an empty entry to candidateValuesAndPriorities, if there isn't one already if not candidateValuesAndPriorities[paramName] then candidateValuesAndPriorities[paramName] = {} end -- find the priority of refProperty local thisPropertyPriority = -1 local thisParamPrioritization = citeConfig[citeType]["prioritization"][paramName] if thisParamPrioritization then for i_priority, i_property in ipairs(thisParamPrioritization) do if i_property == refProperty then thisPropertyPriority = i_priority end end end for _, propertyValue in pairs(processedProperty) do table.insert( candidateValuesAndPriorities[paramName], {prefix .. propertyValue, thisPropertyPriority} ) end until true end -- fill candidateParams[citeType] if not citeErrors[citeType] then local compareValuePriorities = function(pair1, pair2) if pair1[2] == -1 and pair2[2] ~= -1 then return false end if pair1[2] ~= -1 and pair2[2] == -1 then return true end return pair1[2] < pair2[2] end -- fill candidateParams[citeType][paramName] for each used param for paramName, _ in pairs(candidateValuesAndPriorities) do table.sort(candidateValuesAndPriorities[paramName], compareValuePriorities) candidateParams[citeType][paramName] = {} for _, valuePriorityPair in ipairs(candidateValuesAndPriorities[paramName]) do table.insert(candidateParams[citeType][paramName], valuePriorityPair[1]) end end end end -- handle additional properties for refProperty in pairs(additionalProcessedProperties) do for _, citeType in ipairs(citeTypes) do repeat -- skip if there already have been errors if citeErrors[citeType] then break end local paramName = citeParamMapping[citeType][refProperty] -- handle unknown properties in the reference if not paramName then -- Skip this additional property, but do not cause an error. break end if paramName == "" then break end referenceEmpty = false if not candidateParams[citeType][paramName] then candidateParams[citeType][paramName] = {} end for _, propertyValue in pairs(additionalProcessedProperties[refProperty]) do table.insert(candidateParams[citeType][paramName], propertyValue) end until true end end -- fill citeParams for _, citeType in ipairs(citeTypes) do for paramName, paramValues in pairs(candidateParams[citeType]) do if #paramValues == 1 or not isValueInTable(paramName, citeConfig[citeType]["numbered-params"] or {}) then citeParams[citeType][paramName] = paramValues[1] else -- There is more than one value for this parameter - the values will -- go into separate numbered parameters (e.g. "author1", "author2") for paramNum, paramValue in pairs(paramValues) do citeParams[citeType][paramName .. paramNum] = paramValue end end end end -- handle missing mandatory parameters for the templates for _, citeType in ipairs(citeTypes) do for _, requiredCiteParam in pairs(citeConfig[citeType]["mandatory-params"] or {}) do if not citeParams[citeType][requiredCiteParam] then -- The required param is not present. if citeErrors[citeType] then -- Do not override the previous error, if it exists. break end local error_message = errorText("missing-mandatory-param", requiredCiteParam) assert(error_message) -- Should not be nil citeErrors[citeType] = error_message end end end local citeTypeToUse = nil -- choose the output template for _, citeType in ipairs(citeTypes) do if not citeErrors[citeType] then citeTypeToUse = citeType break end end -- set refContent local refContent = "" if citeTypeToUse then local templateToUse = citeConfig[citeTypeToUse]["template"] local paramsToUse = citeParams[citeTypeToUse] if not templateToUse or templateToUse == "" then throwError("no-such-reference-template", tostring(templateToUse), i18nPath, citeTypeToUse) end -- if this module is being substituted then build a regular template call, otherwise expand the template if mw.isSubsting() then for i, v in pairs(paramsToUse) do refContent = refContent .. "|" .. i .. "=" .. v end refContent = "{{" .. templateToUse .. refContent .. "}}" else xpcall( function () refContent = mw.getCurrentFrame():expandTemplate{title=templateToUse, args=paramsToUse} end, function () throwError("no-such-reference-template", templateToUse, i18nPath, citeTypeToUse) end ) end -- If the citation couldn't be displayed using any template, but is not empty (barring ignored propeties), throw an error. elseif not referenceEmpty then refContent = errorText("malformed-reference-header") for _, citeType in ipairs(citeTypes) do refContent = refContent .. errorText("template-failure-reason", citeConfig[citeType]["template"], citeErrors[citeType]) end refContent = refContent .. errorText("malformed-reference-footer") end -- wrap refContent local ref = {} if refContent ~= "" then ref = {refContent} if not self.rawValue then -- this should become a <ref> tag, so save the reference's hash for later ref.refHash = "wikidata-" .. statement.hash .. "-v" .. (tonumber(i18n['version']) + version) end return {ref} else return {} end end -- gets a detail of one particular type for a reference function State:getReferenceDetail(snaks, dType, raw, link, anyLang) local switchLang = anyLang local value = nil if not snaks[dType] then return nil end -- if anyLang, first try the local language and otherwise any language repeat for _, v in ipairs(snaks[dType]) do value = self.conf:getValue(v, raw, link, false, anyLang and not switchLang, false, true) -- noSpecial = true if value then break end end if value or not anyLang then break end switchLang = not switchLang until anyLang and switchLang return value end -- gets the details of one particular type for a reference function State:getReferenceDetails(snaks, dType, raw, link, anyLang) local values = {} if not snaks[dType] then return {} end for _, v in ipairs(snaks[dType]) do -- if nil is returned then it will not be added to the table values[#values + 1] = self.conf:getValue(v, raw, link, false, anyLang, false, true) -- noSpecial = true end return values end -- level 1 hook function State:getAlias(object) local value = object.value local title = nil if value and self.linked then if self.conf.entityID:sub(1,1) == "Q" then title = mw.wikibase.getSitelink(self.conf.entityID) elseif self.conf.entityID:sub(1,1) == "P" then title = "d:Property:" .. self.conf.entityID end if title then value = buildWikilink(title, value) end end value = {value} -- create one value object if #value > 0 then return {value} -- wrap the value object in an array and return it else return {} -- return empty array if there was no value end end -- level 1 hook function State:getBadge(value) value = self.conf:getLabel(value, self.rawValue, self.linked, self.shortName) if value == "" then value = nil end value = {value} -- create one value object if #value > 0 then return {value} -- wrap the value object in an array and return it else return {} -- return empty array if there was no value end end function State:callHook(param, hooks, statement, result) -- call a parameter's hook if it has been defined and if it has not been called before if not result[param] and hooks[param] then local valuesArray = self[hooks[param]](self, statement, param, result, hooks) -- array with value objects -- add to the result if #valuesArray > 0 then result[param] = valuesArray result.count = result.count + 1 else result[param] = {} -- an empty array to indicate that we've tried this hook already return true -- miss == true end end return false end -- iterate through claims, claim's qualifiers or claim's references to collect values function State:iterate(statements, hooks, matchHook) matchHook = matchHook or alwaysTrue local matches = false local rankPos = nil local result, gotRequired for _, v in ipairs(statements) do -- rankPos will be nil for non-claim statements (e.g. qualifiers, references, etc.) matches, rankPos = matchHook(self, v) if matches then result = {count = 0} -- collection of arrays with value objects local function walk(formatTable) local miss for i2, v2 in pairs(formatTable.req) do -- call a hook, adding its return value to the result miss = self:callHook(i2, hooks, v, result) if miss then -- we miss a required value for this level, so return false return false end if result.count == hooks.count then -- we're done if all hooks have been called; -- returning at this point breaks the loop return true end end for _, v2 in ipairs(formatTable) do if result.count == hooks.count then -- we're done if all hooks have been called; -- returning at this point prevents further childs from being processed return true end if v2.child then walk(v2.child) end end return true end gotRequired = walk(self.parsedFormat) -- only append the result if we got values for all required parameters on the root level if gotRequired then -- if we have a rankPos (only with matchHook() for complete claims), then update the foundRank if rankPos and self.conf.foundRank > rankPos then self.conf.foundRank = rankPos end -- append the result self.results[#self.results + 1] = result -- break if we only need a single value if self.singleValue then break end end end end return self:out() end local function getEntityId(arg, eid, page, allowOmitPropPrefix, globalSiteId) local id = nil local prop = nil if arg then if arg:sub(1,1) == ":" then page = arg eid = nil elseif arg:sub(1,1):upper() == "Q" or arg:sub(1,9):lower() == "property:" or allowOmitPropPrefix then eid = arg page = nil else prop = arg end end if eid then if eid:sub(1,9):lower() == "property:" then id = replaceAlias(mw.text.trim(eid:sub(10))) if id:sub(1,1):upper() ~= "P" then id = "" end else id = replaceAlias(eid) end elseif page then if page:sub(1,1) == ":" then page = mw.text.trim(page:sub(2)) end id = mw.wikibase.getEntityIdForTitle(page, globalSiteId) or "" end if not id then id = mw.wikibase.getEntityIdForCurrentPage() or "" end id = id:upper() if not mw.wikibase.isValidEntityId(id) then id = "" end return id, prop end local function nextArg(args) local arg = args[args.pointer] if arg then args.pointer = args.pointer + 1 return mw.text.trim(arg) else return nil end end local function claimCommand(args, funcName) local cfg = Config:new() cfg:processFlagOrCommand(funcName) -- process first command (== function name) local lastArg, parsedFormat, formatParams, claims, value local hooks = {count = 0} -- set the date if given; -- must come BEFORE processing the flags if args[p.args.date] then cfg.atDate = {parseDate(args[p.args.date])} cfg.periods = {false, true, false} -- change default time constraint to 'current' end -- process flags and commands repeat lastArg = nextArg(args) until not cfg:processFlagOrCommand(lastArg) -- get the entity ID from either the positional argument, the eid argument or the page argument cfg.entityID, cfg.propertyID = getEntityId(lastArg, args[p.args.eid], args[p.args.page], false, args[p.args.globalSiteId]) if cfg.entityID == "" then return "" -- we cannot continue without a valid entity ID end cfg.entity = mw.wikibase.getEntity(cfg.entityID) if not cfg.propertyID then cfg.propertyID = nextArg(args) end cfg.propertyID = replaceAlias(cfg.propertyID) if not cfg.entity or not cfg.propertyID then return "" -- we cannot continue without an entity or a property ID end cfg.propertyID = cfg.propertyID:upper() if not cfg.entity.claims or not cfg.entity.claims[cfg.propertyID] then return "" -- there is no use to continue without any claims end claims = cfg.entity.claims[cfg.propertyID] if cfg.states.qualifiersCount > 0 then -- do further processing if "qualifier(s)" command was given if #args - args.pointer + 1 > cfg.states.qualifiersCount then -- claim ID or literal value has been given cfg.propertyValue = nextArg(args) end for i = 1, cfg.states.qualifiersCount do -- check if given qualifier ID is an alias and add it cfg.qualifierIDs[parameters.qualifier..i] = replaceAlias(nextArg(args) or ""):upper() end elseif cfg.states[parameters.reference] then -- do further processing if "reference(s)" command was given cfg.propertyValue = nextArg(args) end -- check for special property value 'somevalue' or 'novalue' if cfg.propertyValue then cfg.propertyValue = replaceSpecialChars(cfg.propertyValue) if cfg.propertyValue ~= "" and mw.text.trim(cfg.propertyValue) == "" then cfg.propertyValue = " " -- single space represents 'somevalue', whereas empty string represents 'novalue' else cfg.propertyValue = mw.text.trim(cfg.propertyValue) end end -- parse the desired format, or choose an appropriate format if args["format"] then parsedFormat, formatParams = parseFormat(args["format"]) elseif cfg.states.qualifiersCount > 0 then -- "qualifier(s)" command given if cfg.states[parameters.property] then -- "propert(y|ies)" command given parsedFormat, formatParams = parseFormat(formats.propertyWithQualifier) else parsedFormat, formatParams = parseFormat(formats.qualifier) end elseif cfg.states[parameters.property] then -- "propert(y|ies)" command given parsedFormat, formatParams = parseFormat(formats.property) else -- "reference(s)" command given parsedFormat, formatParams = parseFormat(formats.reference) end -- if a "qualifier(s)" command and no "propert(y|ies)" command has been given, make the movable separator a semicolon if cfg.states.qualifiersCount > 0 and not cfg.states[parameters.property] then cfg.separators["sep"..parameters.separator][1] = {";"} end -- if only "reference(s)" has been given, set the default separator to none (except when raw) if cfg.states[parameters.reference] and not cfg.states[parameters.property] and cfg.states.qualifiersCount == 0 and not cfg.states[parameters.reference].rawValue then cfg.separators["sep"][1] = nil end -- if exactly one "qualifier(s)" command has been given, make "sep%q" point to "sep%q1" to make them equivalent if cfg.states.qualifiersCount == 1 then cfg.separators["sep"..parameters.qualifier] = cfg.separators["sep"..parameters.qualifier.."1"] end -- process overridden separator values; -- must come AFTER tweaking the default separators cfg:processSeparators(args) -- define the hooks that should be called (getProperty, getQualifiers, getReferences); -- only define a hook if both its command ("propert(y|ies)", "reference(s)", "qualifier(s)") and its parameter ("%p", "%r", "%q1", "%q2", "%q3") have been given for i, v in pairs(cfg.states) do -- e.g. 'formatParams["%q1"] or formatParams["%q"]' to define hook even if "%q1" was not defined to be able to build a complete value for "%q" if formatParams[i] or formatParams[i:sub(1, 2)] then hooks[i] = getHookName(i, 1) hooks.count = hooks.count + 1 end end -- the "%q" parameter is not attached to a state, but is a collection of the results of multiple states (attached to "%q1", "%q2", "%q3", ...); -- so if this parameter is given then this hook must be defined separately, but only if at least one "qualifier(s)" command has been given if formatParams[parameters.qualifier] and cfg.states.qualifiersCount > 0 then hooks[parameters.qualifier] = getHookName(parameters.qualifier, 1) hooks.count = hooks.count + 1 end -- create a state for "properties" if it doesn't exist yet, which will be used as a base configuration for each claim iteration; -- must come AFTER defining the hooks if not cfg.states[parameters.property] then cfg.states[parameters.property] = State:new(cfg, parameters.property) -- if the "single" flag has been given then this state should be equivalent to "property" (singular) if cfg.singleClaim then cfg.states[parameters.property].singleValue = true end end -- if the "sourced" flag has been given then create a state for "reference" if it doesn't exist yet, using default values, -- which must exist in order to be able to determine if a claim has any references; -- must come AFTER defining the hooks if cfg.sourcedOnly and not cfg.states[parameters.reference] then cfg:processFlagOrCommand(p.claimCommands.reference) -- use singular "reference" to minimize overhead end -- set the parsed format and the separators (and optional punctuation mark); -- must come AFTER creating the additonal states cfg:setFormatAndSeparators(cfg.states[parameters.property], parsedFormat) -- process qualifier matching values, analogous to cfg.propertyValue for i, v in pairs(args) do i = tostring(i) if i:match('^[Pp]%d+$') or aliasesP[i] then v = replaceSpecialChars(v) -- check for special qualifier value 'somevalue' if v ~= "" and mw.text.trim(v) == "" then v = " " -- single space represents 'somevalue' end cfg.qualifierIDsAndValues[replaceAlias(i):upper()] = v end end -- first sort the claims on rank to pre-define the order of output (preferred first, then normal, then deprecated) claims = sortOnRank(claims) -- then iterate through the claims to collect values value = cfg:concatValues(cfg.states[parameters.property]:iterate(claims, hooks, State.claimMatches)) -- pass property state with level 1 hooks and matchHook -- if desired, add a clickable icon that may be used to edit the returned values on Wikidata if cfg.editable and value ~= "" then value = value .. cfg:getEditIcon() end return value end local function generalCommand(args, funcName) local cfg = Config:new() cfg.curState = State:new(cfg) local lastArg local value = nil repeat lastArg = nextArg(args) until not cfg:processFlag(lastArg) -- get the entity ID from either the positional argument, the eid argument or the page argument cfg.entityID = getEntityId(lastArg, args[p.args.eid], args[p.args.page], true, args[p.args.globalSiteId]) if cfg.entityID == "" or not mw.wikibase.entityExists(cfg.entityID) then return "" -- we cannot continue without an entity end -- serve according to the given command if funcName == p.generalCommands.label then value = cfg:getLabel(cfg.entityID, cfg.curState.rawValue, cfg.curState.linked, cfg.curState.shortName) elseif funcName == p.generalCommands.title then cfg.inSitelinks = true if cfg.entityID:sub(1,1) == "Q" then value = mw.wikibase.getSitelink(cfg.entityID) end if cfg.curState.linked and value then value = buildWikilink(value) end elseif funcName == p.generalCommands.description then value = mw.wikibase.getDescription(cfg.entityID) else local parsedFormat, formatParams local hooks = {count = 0} cfg.entity = mw.wikibase.getEntity(cfg.entityID) if funcName == p.generalCommands.alias or funcName == p.generalCommands.badge then cfg.curState.singleValue = true end if funcName == p.generalCommands.alias or funcName == p.generalCommands.aliases then if not cfg.entity.aliases or not cfg.entity.aliases[cfg.langCode] then return "" -- there is no use to continue without any aliasses end local aliases = cfg.entity.aliases[cfg.langCode] -- parse the desired format, or parse the default aliases format if args["format"] then parsedFormat, formatParams = parseFormat(args["format"]) else parsedFormat, formatParams = parseFormat(formats.alias) end -- process overridden separator values; -- must come AFTER tweaking the default separators cfg:processSeparators(args) -- define the hook that should be called (getAlias); -- only define the hook if the parameter ("%a") has been given if formatParams[parameters.alias] then hooks[parameters.alias] = getHookName(parameters.alias, 1) hooks.count = hooks.count + 1 end -- set the parsed format and the separators (and optional punctuation mark) cfg:setFormatAndSeparators(cfg.curState, parsedFormat) -- iterate to collect values value = cfg:concatValues(cfg.curState:iterate(aliases, hooks)) elseif funcName == p.generalCommands.badge or funcName == p.generalCommands.badges then if not cfg.entity.sitelinks or not cfg.entity.sitelinks[cfg.siteID] or not cfg.entity.sitelinks[cfg.siteID].badges then return "" -- there is no use to continue without any badges end local badges = cfg.entity.sitelinks[cfg.siteID].badges cfg.inSitelinks = true -- parse the desired format, or parse the default aliases format if args["format"] then parsedFormat, formatParams = parseFormat(args["format"]) else parsedFormat, formatParams = parseFormat(formats.badge) end -- process overridden separator values; -- must come AFTER tweaking the default separators cfg:processSeparators(args) -- define the hook that should be called (getBadge); -- only define the hook if the parameter ("%b") has been given if formatParams[parameters.badge] then hooks[parameters.badge] = getHookName(parameters.badge, 1) hooks.count = hooks.count + 1 end -- set the parsed format and the separators (and optional punctuation mark) cfg:setFormatAndSeparators(cfg.curState, parsedFormat) -- iterate to collect values value = cfg:concatValues(cfg.curState:iterate(badges, hooks)) end end value = value or "" if cfg.editable and value ~= "" then -- if desired, add a clickable icon that may be used to edit the returned value on Wikidata value = value .. cfg:getEditIcon() end return value end -- modules that include this module should call the functions with an underscore prepended, e.g.: p._property(args) local function establishCommands(commandList, commandFunc) for _, commandName in pairs(commandList) do local function wikitextWrapper(frame) local args = copyTable(frame.args) args.pointer = 1 loadI18n(aliasesP, frame) return commandFunc(args, commandName) end p[commandName] = wikitextWrapper local function luaWrapper(args) args = copyTable(args) args.pointer = 1 loadI18n(aliasesP) return commandFunc(args, commandName) end p["_" .. commandName] = luaWrapper end end establishCommands(p.claimCommands, claimCommand) establishCommands(p.generalCommands, generalCommand) -- main function that is supposed to be used by wrapper templates function p.main(frame) if not mw.wikibase then return nil end local f, args loadI18n(aliasesP, frame) -- get the parent frame to take the arguments that were passed to the wrapper template frame = frame:getParent() or frame if not frame.args[1] then throwError("no-function-specified") end f = mw.text.trim(frame.args[1]) if f == "main" then throwError("main-called-twice") end assert(p["_"..f], errorText('no-such-function', f)) -- copy arguments from immutable to mutable table args = copyTable(frame.args) -- remove the function name from the list table.remove(args, 1) return p["_"..f](args) end return p j5a6l03tjwodgrvfnv3lb4x5up93wlv ಮಾಡ್ಯೂಲ್:Wd/i18n 828 4460 15565 2025-08-03T13:22:40Z w>A826 0 ೧ revisions imported from [[:en:Module:Wd/i18n]] 15565 Scribunto text/plain -- The values and functions in this submodule should be localized per wiki. local p = {} function p.init(aliasesP) p = { ["version"] = "8", -- increment this each time the below parameters are changed to avoid reference conflict errors ["errors"] = { ["unknown-data-type"] = "Unknown or unsupported datatype '%s'.", ["missing-required-parameter"] = "No required parameters defined, needing at least one", ["extra-required-parameter"] = "Parameter '%s' must be defined as optional", ["no-function-specified"] = "You must specify a function to call", -- equal to the standard module error message ["main-called-twice"] = 'The function "main" cannot be called twice', ["no-such-function"] = 'The function "%s" does not exist', -- equal to the standard module error message ["no-such-reference-template"] = 'Error: template "%s", which is set in %s as the output template for the citation-output type "%s", does not exist', -- Parts of the error message signalling a malformed reference. ["malformed-reference-header"] = "<span style=\"color:#dd3333\">\nError: Unable to display the reference from Wikidata properly. Technical details:\n", ["malformed-reference-footer"] = "See [[Module:wd/doc#References|the documentation]] for further details.\n</span>\n[[Category:Module:Wd reference errors]]", ["template-failure-reason"] = "* Reason for the failure of {{tl|%s}}: %s\n", ["missing-mandatory-param"] = 'The output template call would miss the mandatory parameter <code>%s</code>.', ["unknown-property-in-ref"] = 'The Wikidata reference contains the property {{property|%s}}, which is not assigned to any parameter of this template.' }, ["info"] = { ["edit-on-wikidata"] = "Edit this on Wikidata" }, ["numeric"] = { ["decimal-mark"] = ".", ["delimiter"] = "," }, ["datetime"] = { ["prefixes"] = { ["decade-period"] = "" }, ["suffixes"] = { ["decade-period"] = "s", ["millennium"] = " millennium", ["century"] = " century", ["million-years"] = " million years", ["billion-years"] = " billion years", ["year"] = " year", ["years"] = " years" }, ["julian-calendar"] = "Julian calendar", -- linked page title ["julian"] = "Julian", ["BCE"] = "BCE", ["CE"] = "CE", ["common-era"] = "Common Era" -- linked page title }, ["coord"] = { ["latitude-north"] = "N", ["latitude-south"] = "S", ["longitude-east"] = "E", ["longitude-west"] = "W", ["degrees"] = "°", ["minutes"] = "'", ["seconds"] = '"', ["separator"] = ", " }, ["values"] = { ["unknown"] = "unknown", ["none"] = "none" }, ["cite"] = { ["output-types"] = {"web", "q"}, -- In this order, the output types will be tried ["param-mapping"] = { ["web"] = { -- <= left side: all allowed reference properties for *web page sources* per https://www.wikidata.org/wiki/Help:Sources -- => right side: corresponding parameter names in (equivalent of) [[:en:Template:Cite web]] (if non-existent, keep empty i.e. "") [aliasesP.statedIn] = "website", [aliasesP.referenceURL] = "url", [aliasesP.publicationDate] = "date", [aliasesP.lastUpdate] = "date", [aliasesP.retrieved] = "access-date", [aliasesP.title] = "title", [aliasesP.subjectNamedAs] = "title", [aliasesP.archiveURL] = "archive-url", [aliasesP.archiveDate] = "archive-date", [aliasesP.language] = "language", [aliasesP.author] = "author", [aliasesP.authorNameString] = "author", [aliasesP.publisher] = "publisher", [aliasesP.quote] = "quote", [aliasesP.pages] = "pages", -- extra option [aliasesP.publishedIn] = "website", [aliasesP.sectionVerseOrParagraph] = "at" }, ["q"] = { -- <= left side: all allowed reference properties for *sources other than web pages* per https://www.wikidata.org/wiki/Help:Sources -- => right side: corresponding parameter names in (equivalent of) [[:en:Template:Cite Q]] (if non-existent, keep empty i.e. "") [aliasesP.statedIn] = "1", [aliasesP.pages] = "pages", [aliasesP.column] = "at", [aliasesP.chapter] = "chapter", [aliasesP.sectionVerseOrParagraph] = "section", ["external-id"] = "id", -- used for any type of database property ID [aliasesP.title] = "title", [aliasesP.publicationDate] = "date", [aliasesP.lastUpdate] = "date", [aliasesP.retrieved] = "access-date" } }, ["config"] = { -- supported fields: -- - template: name of the template used for output -- - numbered-params: citation params accepting an arbitrary number of values by numbering the params (e.g. author1, author2) -- - raw-value-params: params taking a raw value (which means the property is rendered with getValue with raw=true) -- - mandatory-params: params that are required be in the template call (after potentially appending numbers to params listed in numbered-params) -- - prioritization: table associating a list of properties, in the order in which they are preferred, to template parameters; -- properties not mentioned here have the lowest priority; -- prioritization of properties handled through additionalProcessedProperties is unsupported; -- no key of this table can be from numbered-params -- Leaving out the "template" field causes the output type to be ignored. ["web"] = { ["template"] = "Cite web", ["numbered-params"] = {"author"}, ["mandatory-params"] = {"url"}, ["prioritization"] = { ["date"] = {aliasesP.lastUpdate, aliasesP.publicationDate}, ["title"] = {aliasesP.title, aliasesP.subjectNamedAs} } }, ["q"] = { ["template"] = "Cite Q", ["raw-value-params"] = {"1"}, -- the first, unnamed parameter of CiteQ takes a QID, not the name of the item cited ["mandatory-params"] = {"1"}, ["prioritization"] = { ["date"] = {aliasesP.lastUpdate, aliasesP.publicationDate} } } } } } p.getOrdinalSuffix = function(num) if tostring(num):sub(-2,-2) == '1' then return "th" -- 10th, 11th, 12th, 13th, ... 19th end num = tostring(num):sub(-1) if num == '1' then return "st" elseif num == '2' then return "nd" elseif num == '3' then return "rd" else return "th" end end p.addDelimiters = function(n) local left, num, right = string.match(n, "^([^%d]*%d)(%d*)(.-)$") if left and num and right then return left .. (num:reverse():gsub("(%d%d%d)", "%1" .. p['numeric']['delimiter']):reverse()) .. right else return n end end return p end return p pgkxz3kqyoyu0zj2nmtkjkdr0ntnin5 15566 15565 2026-08-22T10:32:54Z A826 1864 ೧ revisions imported from [[:w:ಮಾಡ್ಯೂಲ್:Wd/i18n]] 15565 Scribunto text/plain -- The values and functions in this submodule should be localized per wiki. local p = {} function p.init(aliasesP) p = { ["version"] = "8", -- increment this each time the below parameters are changed to avoid reference conflict errors ["errors"] = { ["unknown-data-type"] = "Unknown or unsupported datatype '%s'.", ["missing-required-parameter"] = "No required parameters defined, needing at least one", ["extra-required-parameter"] = "Parameter '%s' must be defined as optional", ["no-function-specified"] = "You must specify a function to call", -- equal to the standard module error message ["main-called-twice"] = 'The function "main" cannot be called twice', ["no-such-function"] = 'The function "%s" does not exist', -- equal to the standard module error message ["no-such-reference-template"] = 'Error: template "%s", which is set in %s as the output template for the citation-output type "%s", does not exist', -- Parts of the error message signalling a malformed reference. ["malformed-reference-header"] = "<span style=\"color:#dd3333\">\nError: Unable to display the reference from Wikidata properly. Technical details:\n", ["malformed-reference-footer"] = "See [[Module:wd/doc#References|the documentation]] for further details.\n</span>\n[[Category:Module:Wd reference errors]]", ["template-failure-reason"] = "* Reason for the failure of {{tl|%s}}: %s\n", ["missing-mandatory-param"] = 'The output template call would miss the mandatory parameter <code>%s</code>.', ["unknown-property-in-ref"] = 'The Wikidata reference contains the property {{property|%s}}, which is not assigned to any parameter of this template.' }, ["info"] = { ["edit-on-wikidata"] = "Edit this on Wikidata" }, ["numeric"] = { ["decimal-mark"] = ".", ["delimiter"] = "," }, ["datetime"] = { ["prefixes"] = { ["decade-period"] = "" }, ["suffixes"] = { ["decade-period"] = "s", ["millennium"] = " millennium", ["century"] = " century", ["million-years"] = " million years", ["billion-years"] = " billion years", ["year"] = " year", ["years"] = " years" }, ["julian-calendar"] = "Julian calendar", -- linked page title ["julian"] = "Julian", ["BCE"] = "BCE", ["CE"] = "CE", ["common-era"] = "Common Era" -- linked page title }, ["coord"] = { ["latitude-north"] = "N", ["latitude-south"] = "S", ["longitude-east"] = "E", ["longitude-west"] = "W", ["degrees"] = "°", ["minutes"] = "'", ["seconds"] = '"', ["separator"] = ", " }, ["values"] = { ["unknown"] = "unknown", ["none"] = "none" }, ["cite"] = { ["output-types"] = {"web", "q"}, -- In this order, the output types will be tried ["param-mapping"] = { ["web"] = { -- <= left side: all allowed reference properties for *web page sources* per https://www.wikidata.org/wiki/Help:Sources -- => right side: corresponding parameter names in (equivalent of) [[:en:Template:Cite web]] (if non-existent, keep empty i.e. "") [aliasesP.statedIn] = "website", [aliasesP.referenceURL] = "url", [aliasesP.publicationDate] = "date", [aliasesP.lastUpdate] = "date", [aliasesP.retrieved] = "access-date", [aliasesP.title] = "title", [aliasesP.subjectNamedAs] = "title", [aliasesP.archiveURL] = "archive-url", [aliasesP.archiveDate] = "archive-date", [aliasesP.language] = "language", [aliasesP.author] = "author", [aliasesP.authorNameString] = "author", [aliasesP.publisher] = "publisher", [aliasesP.quote] = "quote", [aliasesP.pages] = "pages", -- extra option [aliasesP.publishedIn] = "website", [aliasesP.sectionVerseOrParagraph] = "at" }, ["q"] = { -- <= left side: all allowed reference properties for *sources other than web pages* per https://www.wikidata.org/wiki/Help:Sources -- => right side: corresponding parameter names in (equivalent of) [[:en:Template:Cite Q]] (if non-existent, keep empty i.e. "") [aliasesP.statedIn] = "1", [aliasesP.pages] = "pages", [aliasesP.column] = "at", [aliasesP.chapter] = "chapter", [aliasesP.sectionVerseOrParagraph] = "section", ["external-id"] = "id", -- used for any type of database property ID [aliasesP.title] = "title", [aliasesP.publicationDate] = "date", [aliasesP.lastUpdate] = "date", [aliasesP.retrieved] = "access-date" } }, ["config"] = { -- supported fields: -- - template: name of the template used for output -- - numbered-params: citation params accepting an arbitrary number of values by numbering the params (e.g. author1, author2) -- - raw-value-params: params taking a raw value (which means the property is rendered with getValue with raw=true) -- - mandatory-params: params that are required be in the template call (after potentially appending numbers to params listed in numbered-params) -- - prioritization: table associating a list of properties, in the order in which they are preferred, to template parameters; -- properties not mentioned here have the lowest priority; -- prioritization of properties handled through additionalProcessedProperties is unsupported; -- no key of this table can be from numbered-params -- Leaving out the "template" field causes the output type to be ignored. ["web"] = { ["template"] = "Cite web", ["numbered-params"] = {"author"}, ["mandatory-params"] = {"url"}, ["prioritization"] = { ["date"] = {aliasesP.lastUpdate, aliasesP.publicationDate}, ["title"] = {aliasesP.title, aliasesP.subjectNamedAs} } }, ["q"] = { ["template"] = "Cite Q", ["raw-value-params"] = {"1"}, -- the first, unnamed parameter of CiteQ takes a QID, not the name of the item cited ["mandatory-params"] = {"1"}, ["prioritization"] = { ["date"] = {aliasesP.lastUpdate, aliasesP.publicationDate} } } } } } p.getOrdinalSuffix = function(num) if tostring(num):sub(-2,-2) == '1' then return "th" -- 10th, 11th, 12th, 13th, ... 19th end num = tostring(num):sub(-1) if num == '1' then return "st" elseif num == '2' then return "nd" elseif num == '3' then return "rd" else return "th" end end p.addDelimiters = function(n) local left, num, right = string.match(n, "^([^%d]*%d)(%d*)(.-)$") if left and num and right then return left .. (num:reverse():gsub("(%d%d%d)", "%1" .. p['numeric']['delimiter']):reverse()) .. right else return n end end return p end return p pgkxz3kqyoyu0zj2nmtkjkdr0ntnin5 ಟೆಂಪ್ಲೇಟು:!- 10 4461 15573 2025-12-22T05:44:33Z w>A826 0 ೧ revisions imported from [[:d:Template:!-]] 15573 wikitext text/x-wiki |-<noinclude> {{Documentation|Template:!/doc}} </noinclude> n2jk3causxfd8p9d39w24erp2uwvmun 15574 15573 2026-08-22T10:32:55Z A826 1864 ೧ revisions imported from [[:w:ಟೆಂಪ್ಲೇಟು:!-]] 15573 wikitext text/x-wiki |-<noinclude> {{Documentation|Template:!/doc}} </noinclude> n2jk3causxfd8p9d39w24erp2uwvmun ಟೆಂಪ್ಲೇಟು:Strong 10 4462 15577 2024-10-31T15:47:34Z w>A826 0 ೧ ಬದಲಾವಣೆ 15577 wikitext text/x-wiki <strong {{#if:{{{role|}}}|role="{{{role}}}"}} {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}} {{#if:{{{title|}}}|title="{{{title}}}"}}>{{{1}}}</strong><noinclude> {{documentation}} <!-- Add cats and interwikis to the /doc subpage, not here! --> </noinclude> jhbv1h6fd9kjc1d4eovhzvnxrpqq09r 15578 15577 2026-08-22T10:32:56Z A826 1864 ೧ revisions imported from [[:w:ಟೆಂಪ್ಲೇಟು:Strong]] 15577 wikitext text/x-wiki <strong {{#if:{{{role|}}}|role="{{{role}}}"}} {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{id|}}}|id="{{{id}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}} {{#if:{{{title|}}}|title="{{{title}}}"}}>{{{1}}}</strong><noinclude> {{documentation}} <!-- Add cats and interwikis to the /doc subpage, not here! --> </noinclude> jhbv1h6fd9kjc1d4eovhzvnxrpqq09r ಟೆಂಪ್ಲೇಟು:Wikidata 10 4463 15579 2019-11-12T11:26:02Z w>Renamed user ijklofjfoifvonofqmoilk 0 ೧೭ revisions imported from [[:en:Template:Wikidata]] 15579 wikitext text/x-wiki <includeonly>{{safesubst:#invoke:Wd|main}}</includeonly><noinclude> {{Documentation}} </noinclude> aqnmh4azo4jle51xny4knl3b1hl9873 15580 15579 2026-08-22T10:32:56Z A826 1864 ೧ revisions imported from [[:w:ಟೆಂಪ್ಲೇಟು:Wikidata]] 15579 wikitext text/x-wiki <includeonly>{{safesubst:#invoke:Wd|main}}</includeonly><noinclude> {{Documentation}} </noinclude> aqnmh4azo4jle51xny4knl3b1hl9873 ಟೆಂಪ್ಲೇಟು:Wikidata property link 10 4464 15581 2025-03-05T08:44:44Z w>A826 0 ೧ revision imported from [[:en:Template:Wikidata_property_link]] 15581 wikitext text/x-wiki <includeonly>{{#switch:{{str left|{{uc:{{{id|}}}}}|1}} | N <!--none--> = {{#switch:{{str left|{{uc:{{{1|}}}}}|1}} | P = [[d:Special:EntityPage/{{uc:{{{1|}}}}}|{{wikidata|label|{{uc:{{{1|}}}}}}}]] | [[d:Special:EntityPage/P{{uc:{{{1|}}}}}|{{wikidata|label|P{{uc:{{{1|}}}}}}}]] }} | O <!--only--> = {{#switch:{{str left|{{uc:{{{1|}}}}}|1}} | P = [[d:Special:EntityPage/{{uc:{{{1|}}}}}|{{uc:{{{1|}}}}}]] | [[d:Special:EntityPage/P{{uc:{{{1|}}}}}|P{{uc:{{{1|}}}}}]] }} | F <!--first--> = {{#switch:{{str left|{{uc:{{{1|}}}}}|1}} | P = [[d:Special:EntityPage/{{uc:{{{1|}}}}}|{{uc:{{{1|}}}}}]]{{#if:{{wikidata|label|{{uc:{{{1|}}}}}}}|&#58; <small>{{wikidata|label|{{uc:{{{1|}}}}}}}</small>}} | [[d:Special:EntityPage/P{{uc:{{{1|}}}}}|P{{uc:{{{1|}}}}}]]{{#if:{{wikidata|label|P{{uc:{{{1|}}}}}}}|&#58; <small>{{wikidata|label|P{{uc:{{{1|}}}}}}}</small>}} }} | #default = {{#switch:{{str left|{{uc:{{{1|}}}}}|1}} | P = [[d:Special:EntityPage/{{uc:{{{1|}}}}}|{{wikidata|label|{{uc:{{{1|}}}}}}} <small>({{uc:{{{1|}}}}})</small>]] | [[d:Special:EntityPage/P{{uc:{{{1|}}}}}|{{wikidata|label|P{{uc:{{{1|}}}}}}} <small>(P{{uc:{{{1|}}}}})</small>]] }} }}</includeonly><noinclude>{{Documentation}}</noinclude> k8jv170qlggs0249fpe48ygwkpgfzbn 15582 15581 2026-08-22T10:32:56Z A826 1864 ೧ revisions imported from [[:w:ಟೆಂಪ್ಲೇಟು:Wikidata_property_link]] 15581 wikitext text/x-wiki <includeonly>{{#switch:{{str left|{{uc:{{{id|}}}}}|1}} | N <!--none--> = {{#switch:{{str left|{{uc:{{{1|}}}}}|1}} | P = [[d:Special:EntityPage/{{uc:{{{1|}}}}}|{{wikidata|label|{{uc:{{{1|}}}}}}}]] | [[d:Special:EntityPage/P{{uc:{{{1|}}}}}|{{wikidata|label|P{{uc:{{{1|}}}}}}}]] }} | O <!--only--> = {{#switch:{{str left|{{uc:{{{1|}}}}}|1}} | P = [[d:Special:EntityPage/{{uc:{{{1|}}}}}|{{uc:{{{1|}}}}}]] | [[d:Special:EntityPage/P{{uc:{{{1|}}}}}|P{{uc:{{{1|}}}}}]] }} | F <!--first--> = {{#switch:{{str left|{{uc:{{{1|}}}}}|1}} | P = [[d:Special:EntityPage/{{uc:{{{1|}}}}}|{{uc:{{{1|}}}}}]]{{#if:{{wikidata|label|{{uc:{{{1|}}}}}}}|&#58; <small>{{wikidata|label|{{uc:{{{1|}}}}}}}</small>}} | [[d:Special:EntityPage/P{{uc:{{{1|}}}}}|P{{uc:{{{1|}}}}}]]{{#if:{{wikidata|label|P{{uc:{{{1|}}}}}}}|&#58; <small>{{wikidata|label|P{{uc:{{{1|}}}}}}}</small>}} }} | #default = {{#switch:{{str left|{{uc:{{{1|}}}}}|1}} | P = [[d:Special:EntityPage/{{uc:{{{1|}}}}}|{{wikidata|label|{{uc:{{{1|}}}}}}} <small>({{uc:{{{1|}}}}})</small>]] | [[d:Special:EntityPage/P{{uc:{{{1|}}}}}|{{wikidata|label|P{{uc:{{{1|}}}}}}} <small>(P{{uc:{{{1|}}}}})</small>]] }} }}</includeonly><noinclude>{{Documentation}}</noinclude> k8jv170qlggs0249fpe48ygwkpgfzbn ಮಾಡ್ಯೂಲ್:Text 828 4465 15583 2025-07-10T03:38:57Z w>A826 0 ೧ ಬದಲಾವಣೆ 15583 Scribunto text/plain local yesNo = require("Module:Yesno") local Text = { serial = "2024-09-21", suite = "Text" } --[=[ Text utilities ]=] local function fiatQuote( apply, alien, advance ) -- Quote text -- Parameter: -- apply -- string, with text -- alien -- string, with language code -- advance -- number, with level 1 or 2 local r = apply and tostring(apply) or "" alien = alien or "en" advance = tonumber(advance) or 0 local suite local data = mw.loadData('Module:Text/data') local QuoteLang = data.QuoteLang local QuoteType = data.QuoteType local slang = alien:match( "^(%l+)-" ) suite = QuoteLang[alien] or slang and QuoteLang[slang] or QuoteLang["en"] if suite then local quotes = QuoteType[ suite ] if quotes then local space if quotes[ 3 ] then space = "&#160;" else space = "" end quotes = quotes[ advance ] if quotes then r = mw.ustring.format( "%s%s%s%s%s", mw.ustring.char( quotes[ 1 ] ), space, apply, space, mw.ustring.char( quotes[ 2 ] ) ) end else mw.log( "fiatQuote() " .. suite ) end end return r end -- fiatQuote() Text.char = function ( apply, again, accept ) -- Create string from codepoints -- Parameter: -- apply -- table (sequence) with numerical codepoints, or nil -- again -- number of repetitions, or nil -- accept -- true, if no error messages to be appended -- Returns: string local r = "" apply = type(apply) == "table" and apply or {} again = math.floor(tonumber(again) or 1) if again < 1 then return "" end local bad = { } local codes = { } for _, v in ipairs( apply ) do local n = tonumber(v) if not n or (n < 32 and n ~= 9 and n ~= 10) then table.insert(bad, tostring(v)) else table.insert(codes, math.floor(n)) end end if #bad > 0 then if not accept then r = tostring( mw.html.create( "span" ) :addClass( "error" ) :wikitext( "bad codepoints: " .. table.concat( bad, " " )) ) end return r end if #codes > 0 then r = mw.ustring.char( unpack( codes ) ) if again > 1 then r = r:rep(again) end end return r end -- Text.char() local function trimAndFormat(args, fmt) local result = {} if type(args) ~= 'table' then args = {args} end for _, v in ipairs(args) do v = mw.text.trim(tostring(v)) if v ~= "" then table.insert(result,fmt and mw.ustring.format(fmt, v) or v) end end return result end Text.concatParams = function ( args, apply, adapt ) -- Concat list items into one string -- Parameter: -- args -- table (sequence) with numKey=string -- apply -- string (optional); separator (default: "|") -- adapt -- string (optional); format including "%s" -- Returns: string local collect = { } return table.concat(trimAndFormat(args,adapt), apply or "|") end -- Text.concatParams() Text.containsCJK = function ( s ) -- Is any CJK code within? -- Parameter: -- s -- string -- Returns: true, if CJK detected s = s and tostring(s) or "" local patternCJK = mw.loadData('Module:Text/data').PatternCJK return mw.ustring.find( s, patternCJK ) ~= nil end -- Text.containsCJK() Text.removeDelimited = function (s, prefix, suffix) -- Remove all text in s delimited by prefix and suffix (inclusive) -- Arguments: -- s = string to process -- prefix = initial delimiter -- suffix = ending delimiter -- Returns: stripped string s = s and tostring(s) or "" prefix = prefix and tostring(prefix) or "" suffix = suffix and tostring(suffix) or "" local prefixLen = mw.ustring.len(prefix) local suffixLen = mw.ustring.len(suffix) if prefixLen == 0 or suffixLen == 0 then return s end local i = s:find(prefix, 1, true) local r = s local j while i do j = r:find(suffix, i + prefixLen) if j then r = r:sub(1, i - 1)..r:sub(j+suffixLen) else r = r:sub(1, i - 1) end i = r:find(prefix, 1, true) end return r end Text.getPlain = function ( adjust ) -- Remove wikisyntax from string, except templates -- Parameter: -- adjust -- string -- Returns: string local r = Text.removeDelimited(adjust,"<!--","-->") r = r:gsub( "(</?%l[^>]*>)", "" ) :gsub( "'''", "" ) :gsub( "''", "" ) :gsub( "&nbsp;", " " ) return r end -- Text.getPlain() Text.isLatinRange = function (s) -- Are characters expected to be latin or symbols within latin texts? -- Arguments: -- s = string to analyze -- Returns: true, if valid for latin only s = s and tostring(s) or "" --- ensure input is always string local PatternLatin = mw.loadData('Module:Text/data').PatternLatin return mw.ustring.match(s, PatternLatin) ~= nil end -- Text.isLatinRange() Text.isQuote = function ( s ) -- Is this character any quotation mark? -- Parameter: -- s = single character to analyze -- Returns: true, if s is quotation mark s = s and tostring(s) or "" if s == "" then return false end local SeekQuote = mw.loadData('Module:Text/data').SeekQuote return mw.ustring.find( SeekQuote, s, 1, true ) ~= nil end -- Text.isQuote() Text.listToText = function ( args, adapt ) -- Format list items similar to mw.text.listToText() -- Parameter: -- args -- table (sequence) with numKey=string -- adapt -- string (optional); format including "%s" -- Returns: string return mw.text.listToText(trimAndFormat(args, adapt)) end -- Text.listToText() Text.quote = function ( apply, alien, advance ) -- Quote text -- Parameter: -- apply -- string, with text -- alien -- string, with language code, or nil -- advance -- number, with level 1 or 2, or nil -- Returns: quoted string apply = apply and tostring(apply) or "" local mode, slang if type( alien ) == "string" then slang = mw.text.trim( alien ):lower() else slang = mw.title.getCurrentTitle().pageLanguage if not slang then -- TODO FIXME: Introduction expected 2017-04 slang = mw.language.getContentLanguage():getCode() end end if advance == 2 then mode = 2 else mode = 1 end return fiatQuote( mw.text.trim( apply ), slang, mode ) end -- Text.quote() Text.quoteUnquoted = function ( apply, alien, advance ) -- Quote text, if not yet quoted and not empty -- Parameter: -- apply -- string, with text -- alien -- string, with language code, or nil -- advance -- number, with level 1 or 2, or nil -- Returns: string; possibly quoted local r = mw.text.trim( apply and tostring(apply) or "" ) local s = mw.ustring.sub( r, 1, 1 ) if s ~= "" and not Text.isQuote( s, advance ) then s = mw.ustring.sub( r, -1, 1 ) if not Text.isQuote( s ) then r = Text.quote( r, alien, advance ) end end return r end -- Text.quoteUnquoted() Text.removeDiacritics = function ( adjust ) -- Remove all diacritics -- Parameter: -- adjust -- string -- Returns: string; all latin letters should be ASCII -- or basic greek or cyrillic or symbols etc. local cleanup, decomposed local PatternCombined = mw.loadData('Module:Text/data').PatternCombined decomposed = mw.ustring.toNFD( adjust and tostring(adjust) or "" ) cleanup = mw.ustring.gsub( decomposed, PatternCombined, "" ) return mw.ustring.toNFC( cleanup ) end -- Text.removeDiacritics() Text.sentenceTerminated = function ( analyse ) -- Is string terminated by dot, question or exclamation mark? -- Quotation, link termination and so on granted -- Parameter: -- analyse -- string -- Returns: true, if sentence terminated local r local PatternTerminated = mw.loadData('Module:Text/data').PatternTerminated if mw.ustring.find( analyse, PatternTerminated ) then r = true else r = false end return r end -- Text.sentenceTerminated() Text.ucfirstAll = function ( adjust) -- Capitalize all words -- Arguments: -- adjust = string to adjust -- Returns: string with all first letters in upper case adjust = adjust and tostring(adjust) or "" local r = mw.text.decode(adjust,true) local i = 1 local c, j, m m = (r ~= adjust) r = " "..r while i do i = mw.ustring.find( r, "%W%l", i ) if i then j = i + 1 c = mw.ustring.upper( mw.ustring.sub( r, j, j ) ) r = string.format( "%s%s%s", mw.ustring.sub( r, 1, i ), c, mw.ustring.sub( r, i + 2 ) ) i = j end end -- while i r = r:sub( 2 ) if m then r = mw.text.encode(r) end return r end -- Text.ucfirstAll() Text.uprightNonlatin = function ( adjust ) -- Ensure non-italics for non-latin text parts -- One single greek letter might be granted -- Precondition: -- adjust -- string -- Returns: string with non-latin parts enclosed in <span> local r local data = mw.loadData('Module:Text/data') local PatternLatin = data.PatternLatin local RangesLatin = data.RangesLatin local NumLatinRanges = data.NumLatinRanges if mw.ustring.match( adjust, PatternLatin ) then -- latin only, horizontal dashes, quotes r = adjust else local c local j = false local k = 1 local m = false local n = mw.ustring.len( adjust ) local span = "%s%s<span dir='auto' style='font-style:normal'>%s</span>" local flat = function ( a ) -- isLatin local range -- NumLatinRanges has to be precomputed because # does not work from loadData for i = 1, NumLatinRanges do range = RangesLatin[ i ] if a >= range[ 1 ] and a <= range[ 2 ] then return true end end -- for i end -- flat() local focus = function ( a ) -- char is not ambivalent local r = ( a > 64 ) if r then r = ( a < 8192 or a > 8212 ) else r = ( a == 38 or a == 60 ) -- '&' '<' end return r end -- focus() local form = function ( a ) return string.format( span, r, mw.ustring.sub( adjust, k, j - 1 ), mw.ustring.sub( adjust, j, a ) ) end -- form() r = "" for i = 1, n do c = mw.ustring.codepoint( adjust, i, i ) if focus( c ) then if flat( c ) then if j then if m then if i == m then -- single greek letter. j = false end m = false end if j then local nx = i - 1 local s = "" for ix = nx, 1, -1 do c = mw.ustring.sub( adjust, ix, ix ) if c == " " or c == "(" then nx = nx - 1 s = c .. s else break -- for ix end end -- for ix r = form( nx ) .. s j = false k = i end end elseif not j then j = i if c >= 880 and c <= 1023 then -- single greek letter? m = i + 1 else m = false end end elseif m then m = m + 1 end end -- for i if j and ( not m or m < n ) then r = form( n ) else r = r .. mw.ustring.sub( adjust, k ) end end return r end -- Text.uprightNonlatin() Text.test = function ( about ) local r if about == "quote" then data = mw.loadData('Module:Text/data') r = { } r.QuoteLang = data.QuoteLang r.QuoteType = data.QuoteType end return r end -- Text.test() -- Non Unicode-aware version of mw.text.split and mw.text.gsplit -- based on [[phab:diffusion/ELUA/browse/master/includes/Engines/LuaCommon/lualib/mw.text.lua]] -- These run up to 60 times faster than the Unicode-aware versions Text.split = function ( text, pattern, plain ) local ret = {} for m in Text.gsplit( text, pattern, plain ) do ret[#ret+1] = m end return ret end Text.gsplit = function ( text, pattern, plain ) local s, l = 1, string.len( text ) return function () if s then local e, n = string.find( text, pattern, s, plain ) local ret if not e then ret = string.sub( text, s ) s = nil elseif n < e then -- Empty separator! ret = string.sub( text, s, e ) if e < l then s = e + 1 else s = nil end else ret = e > s and string.sub( text, s, e - 1 ) or '' s = n + 1 end return ret end end, nil, nil end -- Export local p = { } for _, func in ipairs({'containsCJK','isLatinRange','isQuote','sentenceTerminated'}) do p[func] = function (frame) return Text[func]( frame.args[ 1 ] or "" ) and "1" or "" end end for _, func in ipairs({'getPlain','removeDiacritics','ucfirstAll','uprightNonlatin'}) do p[func] = function (frame) return Text[func]( frame.args[ 1 ] or "" ) end end function p.char( frame ) local params = frame:getParent().args local story = params[ 1 ] local codes, lenient, multiple if not story then params = frame.args story = params[ 1 ] end if story then local items = mw.text.split( mw.text.trim(story), "%s+" ) if #items > 0 then local j lenient = (yesNo(params.errors) == false) codes = { } multiple = tonumber( params[ "*" ] ) for _, v in ipairs( items ) do j = tonumber((v:sub( 1, 1 ) == "x" and "0" or "") .. v) table.insert( codes, j or v ) end end end return Text.char( codes, multiple, lenient ) end function p.concatParams( frame ) local args local template = frame.args.template if type( template ) == "string" then template = mw.text.trim( template ) template = ( template == "1" ) end if template then args = frame:getParent().args else args = frame.args end return Text.concatParams( args, frame.args.separator, frame.args.format ) end function p.listToFormat(frame) local lists = {} local pformat = frame.args["format"] local sep = frame.args["sep"] or ";" -- Parameter parsen: Listen for k, v in pairs(frame.args) do local knum = tonumber(k) if knum then lists[knum] = v end end -- Listen splitten local maxListLen = 0 for i = 1, #lists do lists[i] = mw.text.split(lists[i], sep) if #lists[i] > maxListLen then maxListLen = #lists[i] end end -- Ergebnisstring generieren local result = "" local result_line = "" for i = 1, maxListLen do result_line = pformat for j = 1, #lists do result_line = mw.ustring.gsub(result_line, "%%s", lists[j][i], 1) end result = result .. result_line end return result end function p.listToText( frame ) local args local template = frame.args.template if type( template ) == "string" then template = mw.text.trim( template ) template = ( template == "1" ) end if template then args = frame:getParent().args else args = frame.args end return Text.listToText( args, frame.args.format ) end function p.quote( frame ) local slang = frame.args[2] if type( slang ) == "string" then slang = mw.text.trim( slang ) if slang == "" then slang = false end end return Text.quote( frame.args[ 1 ] or "", slang, tonumber( frame.args[3] ) ) end function p.quoteUnquoted( frame ) local slang = frame.args[2] if type( slang ) == "string" then slang = mw.text.trim( slang ) if slang == "" then slang = false end end return Text.quoteUnquoted( frame.args[ 1 ] or "", slang, tonumber( frame.args[3] ) ) end function p.zip(frame) local lists = {} local seps = {} local defaultsep = frame.args["sep"] or "" local innersep = frame.args["isep"] or "" local outersep = frame.args["osep"] or "" -- Parameter parsen for k, v in pairs(frame.args) do local knum = tonumber(k) if knum then lists[knum] = v else if string.sub(k, 1, 3) == "sep" then local sepnum = tonumber(string.sub(k, 4)) if sepnum then seps[sepnum] = v end end end end -- sofern keine expliziten Separatoren angegeben sind, den Standardseparator verwenden for i = 1, math.max(#seps, #lists) do if not seps[i] then seps[i] = defaultsep end end -- Listen splitten local maxListLen = 0 for i = 1, #lists do lists[i] = mw.text.split(lists[i], seps[i]) if #lists[i] > maxListLen then maxListLen = #lists[i] end end local result = "" for i = 1, maxListLen do if i ~= 1 then result = result .. outersep end for j = 1, #lists do if j ~= 1 then result = result .. innersep end result = result .. (lists[j][i] or "") end end return result end function p.split(frame) local text = frame.args.text or frame.args[1] or '' local pattern = frame.args.pattern or frame.args[2] or '' local plain = yesNo(frame.args.plain or frame.args[3]) local index = tonumber(frame.args.index) or tonumber(frame.args[4]) or 1 local a = Text.split(text, pattern, plain) if index < 0 then index = #a + index + 1 end return a[index] end function p.failsafe() return Text.serial end p.Text = function () return Text end -- p.Text return p 651uzyv6p5vsoexbfr111b6ilkxeurw 15584 15583 2026-08-22T10:32:56Z A826 1864 ೧ revisions imported from [[:w:ಮಾಡ್ಯೂಲ್:Text]] 15583 Scribunto text/plain local yesNo = require("Module:Yesno") local Text = { serial = "2024-09-21", suite = "Text" } --[=[ Text utilities ]=] local function fiatQuote( apply, alien, advance ) -- Quote text -- Parameter: -- apply -- string, with text -- alien -- string, with language code -- advance -- number, with level 1 or 2 local r = apply and tostring(apply) or "" alien = alien or "en" advance = tonumber(advance) or 0 local suite local data = mw.loadData('Module:Text/data') local QuoteLang = data.QuoteLang local QuoteType = data.QuoteType local slang = alien:match( "^(%l+)-" ) suite = QuoteLang[alien] or slang and QuoteLang[slang] or QuoteLang["en"] if suite then local quotes = QuoteType[ suite ] if quotes then local space if quotes[ 3 ] then space = "&#160;" else space = "" end quotes = quotes[ advance ] if quotes then r = mw.ustring.format( "%s%s%s%s%s", mw.ustring.char( quotes[ 1 ] ), space, apply, space, mw.ustring.char( quotes[ 2 ] ) ) end else mw.log( "fiatQuote() " .. suite ) end end return r end -- fiatQuote() Text.char = function ( apply, again, accept ) -- Create string from codepoints -- Parameter: -- apply -- table (sequence) with numerical codepoints, or nil -- again -- number of repetitions, or nil -- accept -- true, if no error messages to be appended -- Returns: string local r = "" apply = type(apply) == "table" and apply or {} again = math.floor(tonumber(again) or 1) if again < 1 then return "" end local bad = { } local codes = { } for _, v in ipairs( apply ) do local n = tonumber(v) if not n or (n < 32 and n ~= 9 and n ~= 10) then table.insert(bad, tostring(v)) else table.insert(codes, math.floor(n)) end end if #bad > 0 then if not accept then r = tostring( mw.html.create( "span" ) :addClass( "error" ) :wikitext( "bad codepoints: " .. table.concat( bad, " " )) ) end return r end if #codes > 0 then r = mw.ustring.char( unpack( codes ) ) if again > 1 then r = r:rep(again) end end return r end -- Text.char() local function trimAndFormat(args, fmt) local result = {} if type(args) ~= 'table' then args = {args} end for _, v in ipairs(args) do v = mw.text.trim(tostring(v)) if v ~= "" then table.insert(result,fmt and mw.ustring.format(fmt, v) or v) end end return result end Text.concatParams = function ( args, apply, adapt ) -- Concat list items into one string -- Parameter: -- args -- table (sequence) with numKey=string -- apply -- string (optional); separator (default: "|") -- adapt -- string (optional); format including "%s" -- Returns: string local collect = { } return table.concat(trimAndFormat(args,adapt), apply or "|") end -- Text.concatParams() Text.containsCJK = function ( s ) -- Is any CJK code within? -- Parameter: -- s -- string -- Returns: true, if CJK detected s = s and tostring(s) or "" local patternCJK = mw.loadData('Module:Text/data').PatternCJK return mw.ustring.find( s, patternCJK ) ~= nil end -- Text.containsCJK() Text.removeDelimited = function (s, prefix, suffix) -- Remove all text in s delimited by prefix and suffix (inclusive) -- Arguments: -- s = string to process -- prefix = initial delimiter -- suffix = ending delimiter -- Returns: stripped string s = s and tostring(s) or "" prefix = prefix and tostring(prefix) or "" suffix = suffix and tostring(suffix) or "" local prefixLen = mw.ustring.len(prefix) local suffixLen = mw.ustring.len(suffix) if prefixLen == 0 or suffixLen == 0 then return s end local i = s:find(prefix, 1, true) local r = s local j while i do j = r:find(suffix, i + prefixLen) if j then r = r:sub(1, i - 1)..r:sub(j+suffixLen) else r = r:sub(1, i - 1) end i = r:find(prefix, 1, true) end return r end Text.getPlain = function ( adjust ) -- Remove wikisyntax from string, except templates -- Parameter: -- adjust -- string -- Returns: string local r = Text.removeDelimited(adjust,"<!--","-->") r = r:gsub( "(</?%l[^>]*>)", "" ) :gsub( "'''", "" ) :gsub( "''", "" ) :gsub( "&nbsp;", " " ) return r end -- Text.getPlain() Text.isLatinRange = function (s) -- Are characters expected to be latin or symbols within latin texts? -- Arguments: -- s = string to analyze -- Returns: true, if valid for latin only s = s and tostring(s) or "" --- ensure input is always string local PatternLatin = mw.loadData('Module:Text/data').PatternLatin return mw.ustring.match(s, PatternLatin) ~= nil end -- Text.isLatinRange() Text.isQuote = function ( s ) -- Is this character any quotation mark? -- Parameter: -- s = single character to analyze -- Returns: true, if s is quotation mark s = s and tostring(s) or "" if s == "" then return false end local SeekQuote = mw.loadData('Module:Text/data').SeekQuote return mw.ustring.find( SeekQuote, s, 1, true ) ~= nil end -- Text.isQuote() Text.listToText = function ( args, adapt ) -- Format list items similar to mw.text.listToText() -- Parameter: -- args -- table (sequence) with numKey=string -- adapt -- string (optional); format including "%s" -- Returns: string return mw.text.listToText(trimAndFormat(args, adapt)) end -- Text.listToText() Text.quote = function ( apply, alien, advance ) -- Quote text -- Parameter: -- apply -- string, with text -- alien -- string, with language code, or nil -- advance -- number, with level 1 or 2, or nil -- Returns: quoted string apply = apply and tostring(apply) or "" local mode, slang if type( alien ) == "string" then slang = mw.text.trim( alien ):lower() else slang = mw.title.getCurrentTitle().pageLanguage if not slang then -- TODO FIXME: Introduction expected 2017-04 slang = mw.language.getContentLanguage():getCode() end end if advance == 2 then mode = 2 else mode = 1 end return fiatQuote( mw.text.trim( apply ), slang, mode ) end -- Text.quote() Text.quoteUnquoted = function ( apply, alien, advance ) -- Quote text, if not yet quoted and not empty -- Parameter: -- apply -- string, with text -- alien -- string, with language code, or nil -- advance -- number, with level 1 or 2, or nil -- Returns: string; possibly quoted local r = mw.text.trim( apply and tostring(apply) or "" ) local s = mw.ustring.sub( r, 1, 1 ) if s ~= "" and not Text.isQuote( s, advance ) then s = mw.ustring.sub( r, -1, 1 ) if not Text.isQuote( s ) then r = Text.quote( r, alien, advance ) end end return r end -- Text.quoteUnquoted() Text.removeDiacritics = function ( adjust ) -- Remove all diacritics -- Parameter: -- adjust -- string -- Returns: string; all latin letters should be ASCII -- or basic greek or cyrillic or symbols etc. local cleanup, decomposed local PatternCombined = mw.loadData('Module:Text/data').PatternCombined decomposed = mw.ustring.toNFD( adjust and tostring(adjust) or "" ) cleanup = mw.ustring.gsub( decomposed, PatternCombined, "" ) return mw.ustring.toNFC( cleanup ) end -- Text.removeDiacritics() Text.sentenceTerminated = function ( analyse ) -- Is string terminated by dot, question or exclamation mark? -- Quotation, link termination and so on granted -- Parameter: -- analyse -- string -- Returns: true, if sentence terminated local r local PatternTerminated = mw.loadData('Module:Text/data').PatternTerminated if mw.ustring.find( analyse, PatternTerminated ) then r = true else r = false end return r end -- Text.sentenceTerminated() Text.ucfirstAll = function ( adjust) -- Capitalize all words -- Arguments: -- adjust = string to adjust -- Returns: string with all first letters in upper case adjust = adjust and tostring(adjust) or "" local r = mw.text.decode(adjust,true) local i = 1 local c, j, m m = (r ~= adjust) r = " "..r while i do i = mw.ustring.find( r, "%W%l", i ) if i then j = i + 1 c = mw.ustring.upper( mw.ustring.sub( r, j, j ) ) r = string.format( "%s%s%s", mw.ustring.sub( r, 1, i ), c, mw.ustring.sub( r, i + 2 ) ) i = j end end -- while i r = r:sub( 2 ) if m then r = mw.text.encode(r) end return r end -- Text.ucfirstAll() Text.uprightNonlatin = function ( adjust ) -- Ensure non-italics for non-latin text parts -- One single greek letter might be granted -- Precondition: -- adjust -- string -- Returns: string with non-latin parts enclosed in <span> local r local data = mw.loadData('Module:Text/data') local PatternLatin = data.PatternLatin local RangesLatin = data.RangesLatin local NumLatinRanges = data.NumLatinRanges if mw.ustring.match( adjust, PatternLatin ) then -- latin only, horizontal dashes, quotes r = adjust else local c local j = false local k = 1 local m = false local n = mw.ustring.len( adjust ) local span = "%s%s<span dir='auto' style='font-style:normal'>%s</span>" local flat = function ( a ) -- isLatin local range -- NumLatinRanges has to be precomputed because # does not work from loadData for i = 1, NumLatinRanges do range = RangesLatin[ i ] if a >= range[ 1 ] and a <= range[ 2 ] then return true end end -- for i end -- flat() local focus = function ( a ) -- char is not ambivalent local r = ( a > 64 ) if r then r = ( a < 8192 or a > 8212 ) else r = ( a == 38 or a == 60 ) -- '&' '<' end return r end -- focus() local form = function ( a ) return string.format( span, r, mw.ustring.sub( adjust, k, j - 1 ), mw.ustring.sub( adjust, j, a ) ) end -- form() r = "" for i = 1, n do c = mw.ustring.codepoint( adjust, i, i ) if focus( c ) then if flat( c ) then if j then if m then if i == m then -- single greek letter. j = false end m = false end if j then local nx = i - 1 local s = "" for ix = nx, 1, -1 do c = mw.ustring.sub( adjust, ix, ix ) if c == " " or c == "(" then nx = nx - 1 s = c .. s else break -- for ix end end -- for ix r = form( nx ) .. s j = false k = i end end elseif not j then j = i if c >= 880 and c <= 1023 then -- single greek letter? m = i + 1 else m = false end end elseif m then m = m + 1 end end -- for i if j and ( not m or m < n ) then r = form( n ) else r = r .. mw.ustring.sub( adjust, k ) end end return r end -- Text.uprightNonlatin() Text.test = function ( about ) local r if about == "quote" then data = mw.loadData('Module:Text/data') r = { } r.QuoteLang = data.QuoteLang r.QuoteType = data.QuoteType end return r end -- Text.test() -- Non Unicode-aware version of mw.text.split and mw.text.gsplit -- based on [[phab:diffusion/ELUA/browse/master/includes/Engines/LuaCommon/lualib/mw.text.lua]] -- These run up to 60 times faster than the Unicode-aware versions Text.split = function ( text, pattern, plain ) local ret = {} for m in Text.gsplit( text, pattern, plain ) do ret[#ret+1] = m end return ret end Text.gsplit = function ( text, pattern, plain ) local s, l = 1, string.len( text ) return function () if s then local e, n = string.find( text, pattern, s, plain ) local ret if not e then ret = string.sub( text, s ) s = nil elseif n < e then -- Empty separator! ret = string.sub( text, s, e ) if e < l then s = e + 1 else s = nil end else ret = e > s and string.sub( text, s, e - 1 ) or '' s = n + 1 end return ret end end, nil, nil end -- Export local p = { } for _, func in ipairs({'containsCJK','isLatinRange','isQuote','sentenceTerminated'}) do p[func] = function (frame) return Text[func]( frame.args[ 1 ] or "" ) and "1" or "" end end for _, func in ipairs({'getPlain','removeDiacritics','ucfirstAll','uprightNonlatin'}) do p[func] = function (frame) return Text[func]( frame.args[ 1 ] or "" ) end end function p.char( frame ) local params = frame:getParent().args local story = params[ 1 ] local codes, lenient, multiple if not story then params = frame.args story = params[ 1 ] end if story then local items = mw.text.split( mw.text.trim(story), "%s+" ) if #items > 0 then local j lenient = (yesNo(params.errors) == false) codes = { } multiple = tonumber( params[ "*" ] ) for _, v in ipairs( items ) do j = tonumber((v:sub( 1, 1 ) == "x" and "0" or "") .. v) table.insert( codes, j or v ) end end end return Text.char( codes, multiple, lenient ) end function p.concatParams( frame ) local args local template = frame.args.template if type( template ) == "string" then template = mw.text.trim( template ) template = ( template == "1" ) end if template then args = frame:getParent().args else args = frame.args end return Text.concatParams( args, frame.args.separator, frame.args.format ) end function p.listToFormat(frame) local lists = {} local pformat = frame.args["format"] local sep = frame.args["sep"] or ";" -- Parameter parsen: Listen for k, v in pairs(frame.args) do local knum = tonumber(k) if knum then lists[knum] = v end end -- Listen splitten local maxListLen = 0 for i = 1, #lists do lists[i] = mw.text.split(lists[i], sep) if #lists[i] > maxListLen then maxListLen = #lists[i] end end -- Ergebnisstring generieren local result = "" local result_line = "" for i = 1, maxListLen do result_line = pformat for j = 1, #lists do result_line = mw.ustring.gsub(result_line, "%%s", lists[j][i], 1) end result = result .. result_line end return result end function p.listToText( frame ) local args local template = frame.args.template if type( template ) == "string" then template = mw.text.trim( template ) template = ( template == "1" ) end if template then args = frame:getParent().args else args = frame.args end return Text.listToText( args, frame.args.format ) end function p.quote( frame ) local slang = frame.args[2] if type( slang ) == "string" then slang = mw.text.trim( slang ) if slang == "" then slang = false end end return Text.quote( frame.args[ 1 ] or "", slang, tonumber( frame.args[3] ) ) end function p.quoteUnquoted( frame ) local slang = frame.args[2] if type( slang ) == "string" then slang = mw.text.trim( slang ) if slang == "" then slang = false end end return Text.quoteUnquoted( frame.args[ 1 ] or "", slang, tonumber( frame.args[3] ) ) end function p.zip(frame) local lists = {} local seps = {} local defaultsep = frame.args["sep"] or "" local innersep = frame.args["isep"] or "" local outersep = frame.args["osep"] or "" -- Parameter parsen for k, v in pairs(frame.args) do local knum = tonumber(k) if knum then lists[knum] = v else if string.sub(k, 1, 3) == "sep" then local sepnum = tonumber(string.sub(k, 4)) if sepnum then seps[sepnum] = v end end end end -- sofern keine expliziten Separatoren angegeben sind, den Standardseparator verwenden for i = 1, math.max(#seps, #lists) do if not seps[i] then seps[i] = defaultsep end end -- Listen splitten local maxListLen = 0 for i = 1, #lists do lists[i] = mw.text.split(lists[i], seps[i]) if #lists[i] > maxListLen then maxListLen = #lists[i] end end local result = "" for i = 1, maxListLen do if i ~= 1 then result = result .. outersep end for j = 1, #lists do if j ~= 1 then result = result .. innersep end result = result .. (lists[j][i] or "") end end return result end function p.split(frame) local text = frame.args.text or frame.args[1] or '' local pattern = frame.args.pattern or frame.args[2] or '' local plain = yesNo(frame.args.plain or frame.args[3]) local index = tonumber(frame.args.index) or tonumber(frame.args[4]) or 1 local a = Text.split(text, pattern, plain) if index < 0 then index = #a + index + 1 end return a[index] end function p.failsafe() return Text.serial end p.Text = function () return Text end -- p.Text return p 651uzyv6p5vsoexbfr111b6ilkxeurw ಟೆಂಪ್ಲೇಟು:Terminate sentence 10 4466 15587 2024-10-31T15:47:34Z w>A826 0 ೧ ಬದಲಾವಣೆ 15587 wikitext text/x-wiki {{{1}}}{{#if:{{#invoke:text|sentenceTerminated|{{{1|}}}}}||{{{2|.}}}}}<noinclude>{{documentation}}</noinclude> qn47z9jj1gbam5odtqcnrnt6hqvwhtn 15588 15587 2026-08-22T10:32:56Z A826 1864 ೧ revisions imported from [[:w:ಟೆಂಪ್ಲೇಟು:Terminate_sentence]] 15587 wikitext text/x-wiki {{{1}}}{{#if:{{#invoke:text|sentenceTerminated|{{{1|}}}}}||{{{2|.}}}}}<noinclude>{{documentation}}</noinclude> qn47z9jj1gbam5odtqcnrnt6hqvwhtn ಮಾಡ್ಯೂಲ್:Fallback 828 4467 15589 2023-10-10T12:40:12Z w>A826 0 ೧ revision imported from [[:d:Module:Fallback]] 15589 Scribunto text/plain local p = {} -- List the full fallback chain from a language to default (usually English) function p.fblist(lang) local fbtable = mw.language.getFallbacksFor(lang) table.insert(fbtable, 1, lang) --[[ Take a translation from "Mediawiki:<Message-ID>/<language-code>" namespace or from a loaded i18 resource bundle in MediaWiki for its UI messages (also used by the "{{Int:<Message-ID>}}" parser function), before using the provided default value. Requires args.message = 'Message-ID', instead of args.message = 'actual translated message'. --]] table.insert(fbtable, 'message') table.insert(fbtable, 'default') return fbtable end --[==[ Return an error if there is not default and no English version, otherwise return the message in the most appropriate, plus the lang code as a second value. --]==] function p._langSwitch(args, lang) -- args: table of translations if not args.en and not args.default and not args.message and args.nocat ~= '1' then return error("langSwitch error: no default") end -- Get language (either stated one or user's default language). if not lang then return '<strong class="error">LangSwitch Error: no lang</strong>' -- must become proper error end -- Get the list of acceptable language (lang + those in lang's fallback chain) and check their content. for _, code in ipairs(p.fblist(lang)) do local msg = args[code] if msg then -- Trim the assigned message value before testing it. msg = mw.text.trim(msg) if msg ~= '' then if code == 'message' then -- If this is an UI message. See [[mw:Manual:Messages API]]. msg = mw.message.new(args.message):inLanguage(lang) --[==[ If this message name does not exist, converting it to a string would not return an actual message, but this name within curved angle brackets U+29FC/U+29FD '⧼/⧽', part of mathematical symbols). The UI message may also be disabled administratively if it causes problems. --]==] if msg:exists() and not msg:isDisabled() then --[==[FIXME: In which language is this message? This may be in some fallback language and not lang. Note that some UI messages may have placeholders like '%s' but there's no way to replace them here by actual values. --]==] return tostring(msg), lang end elseif msg == '~' then return nil, code else return msg, code end end end end return nil end --[==[ Version to be used from wikitext. --]==] function p.langSwitch(frame) local args = frame.args -- If no expected args provided than check parent template/module args. if not args.en and not args.default and not args.nocat then args = frame:getParent().args end local lang if args.lang and args.lang ~= '' then lang = args.lang args.lang = nil else -- Get user's chosen language. lang = frame:preprocess("{{Int:Lang}}") end --[==[ if args.zh ~= '' and args['zh-hans'] == '' and args['zh-hant'] == '' then else end --]==] local str, language = p._langSwitch(args, lang) return str -- Get the first value of the langSwitch, (the text) not the second (the language). end function p.fallbackpage(base, lang, formatting) local languages = p.fblist(lang) for i, lng in ipairs(languages) do if mw.title.new(base .. '/' .. lng).exists then if formatting == 'table' then return {base .. '/' .. lng, lng} -- Returns name of the page + name of the language. else return base .. '/' .. lng -- Returns only the page. end end end return base end --[==[ Logic for [[Template:Autotranslate]]. ]==] function p.autotranslate(frame) local args = frame.args if not args.lang or args.lang == '' then args.lang = frame:preprocess("{{Int:Lang}}") -- Get user's chosen language. end -- Find base page. local base = args.base if not base or base == '' then return '<strong class="error">Base page not provided for autotranslate</strong>' end if string.sub(base, 2, 9) ~= 'emplate:' then base = 'Template:' .. base -- Base provided without 'Template:' part. end -- Find base template language subpage. local page = p.fallbackpage(base, args.lang) -- if (not page and base ~= args.base) then -- Try the original args.base string. This case is only needed if base is not in template namespace. page = p.fallbackpage(args.base, args.lang) end if not page then return string.format('<strong class="error">no fallback page found for autotranslate (base=[[%s]], lang=%s)</strong>', args.base, args.lang) end -- Repack args in a standard table. local newargs = {} for field, value in pairs(args) do if field ~= 'base' then newargs[field] = value end end -- Transclude {{page |....}} with template arguments the same as the ones passed to {{autotranslate}} template. return frame:expandTemplate{ title = page, args = newargs } end --[==[ Translate data stored in a module. ]==] function p.translate(page, key, lang) if type(page) == 'string' then -- If the requested translation table is not yet loaded. page = require('Module:' .. page) end local val if page[key] then val = page[key] elseif page.keys and page.keys[key] then -- Key 'keys" is an index of all keys, including redirects, see [[Module:i18n/datatype]]. val = page.keys[key] end if not val then return '<' .. key .. '>' end return p._langSwitch(val, lang) end function p.translatelua(frame) local lang = frame.args.lang local page = require('Module:' .. mw.text.trim(frame.args[1])) -- Page should only contain a simple of translations. if not lang or mw.text.trim(lang) == '' then lang = frame:preprocess("{{Int:Lang}}") end if frame.args[2] then page = page[mw.text.trim(frame.args[2])] end return p._langSwitch(page, lang) end -- This test does not work ('Module:Fallback/tests/fallbacks' is missing) function p.runTests() local toFallbackTest = require('Module:Fallback/tests/fallbacks') local result = true mw.log('Testing fallback chains') for i, t in ipairs(toFallbackTest) do local fbtbl = table.concat(p.fblist(t.initial), ', ') local expected = table.concat(t.expected, ', ') local ret = (fbtbl == expected) mw.log(i, ret and 'passed' or 'FAILED', t.initial, (not ret) and ('FAILED\nis >>' .. fbtbl .. '<<\nbut should be >>' .. expected .. '<<\n') or '') result = result and ret end return result end --[==[ List all input arguments of the template that calls "{{#invoke:Fallback|showTemplateArguments}}" ]==] function p.showTemplateArguments(frame) local str = '' for name, value in pairs( frame:getParent().args ) do if str == '' then str = string.format('%s=%s', name, value) -- argument #1 else str = string.format('%s, %s=%s', str, name, value) -- the rest end end return str end return p kq13xuoypsd1pyeoa4kyap1puypg48b 15590 15589 2026-08-22T10:32:57Z A826 1864 ೧ revisions imported from [[:w:ಮಾಡ್ಯೂಲ್:Fallback]] 15589 Scribunto text/plain local p = {} -- List the full fallback chain from a language to default (usually English) function p.fblist(lang) local fbtable = mw.language.getFallbacksFor(lang) table.insert(fbtable, 1, lang) --[[ Take a translation from "Mediawiki:<Message-ID>/<language-code>" namespace or from a loaded i18 resource bundle in MediaWiki for its UI messages (also used by the "{{Int:<Message-ID>}}" parser function), before using the provided default value. Requires args.message = 'Message-ID', instead of args.message = 'actual translated message'. --]] table.insert(fbtable, 'message') table.insert(fbtable, 'default') return fbtable end --[==[ Return an error if there is not default and no English version, otherwise return the message in the most appropriate, plus the lang code as a second value. --]==] function p._langSwitch(args, lang) -- args: table of translations if not args.en and not args.default and not args.message and args.nocat ~= '1' then return error("langSwitch error: no default") end -- Get language (either stated one or user's default language). if not lang then return '<strong class="error">LangSwitch Error: no lang</strong>' -- must become proper error end -- Get the list of acceptable language (lang + those in lang's fallback chain) and check their content. for _, code in ipairs(p.fblist(lang)) do local msg = args[code] if msg then -- Trim the assigned message value before testing it. msg = mw.text.trim(msg) if msg ~= '' then if code == 'message' then -- If this is an UI message. See [[mw:Manual:Messages API]]. msg = mw.message.new(args.message):inLanguage(lang) --[==[ If this message name does not exist, converting it to a string would not return an actual message, but this name within curved angle brackets U+29FC/U+29FD '⧼/⧽', part of mathematical symbols). The UI message may also be disabled administratively if it causes problems. --]==] if msg:exists() and not msg:isDisabled() then --[==[FIXME: In which language is this message? This may be in some fallback language and not lang. Note that some UI messages may have placeholders like '%s' but there's no way to replace them here by actual values. --]==] return tostring(msg), lang end elseif msg == '~' then return nil, code else return msg, code end end end end return nil end --[==[ Version to be used from wikitext. --]==] function p.langSwitch(frame) local args = frame.args -- If no expected args provided than check parent template/module args. if not args.en and not args.default and not args.nocat then args = frame:getParent().args end local lang if args.lang and args.lang ~= '' then lang = args.lang args.lang = nil else -- Get user's chosen language. lang = frame:preprocess("{{Int:Lang}}") end --[==[ if args.zh ~= '' and args['zh-hans'] == '' and args['zh-hant'] == '' then else end --]==] local str, language = p._langSwitch(args, lang) return str -- Get the first value of the langSwitch, (the text) not the second (the language). end function p.fallbackpage(base, lang, formatting) local languages = p.fblist(lang) for i, lng in ipairs(languages) do if mw.title.new(base .. '/' .. lng).exists then if formatting == 'table' then return {base .. '/' .. lng, lng} -- Returns name of the page + name of the language. else return base .. '/' .. lng -- Returns only the page. end end end return base end --[==[ Logic for [[Template:Autotranslate]]. ]==] function p.autotranslate(frame) local args = frame.args if not args.lang or args.lang == '' then args.lang = frame:preprocess("{{Int:Lang}}") -- Get user's chosen language. end -- Find base page. local base = args.base if not base or base == '' then return '<strong class="error">Base page not provided for autotranslate</strong>' end if string.sub(base, 2, 9) ~= 'emplate:' then base = 'Template:' .. base -- Base provided without 'Template:' part. end -- Find base template language subpage. local page = p.fallbackpage(base, args.lang) -- if (not page and base ~= args.base) then -- Try the original args.base string. This case is only needed if base is not in template namespace. page = p.fallbackpage(args.base, args.lang) end if not page then return string.format('<strong class="error">no fallback page found for autotranslate (base=[[%s]], lang=%s)</strong>', args.base, args.lang) end -- Repack args in a standard table. local newargs = {} for field, value in pairs(args) do if field ~= 'base' then newargs[field] = value end end -- Transclude {{page |....}} with template arguments the same as the ones passed to {{autotranslate}} template. return frame:expandTemplate{ title = page, args = newargs } end --[==[ Translate data stored in a module. ]==] function p.translate(page, key, lang) if type(page) == 'string' then -- If the requested translation table is not yet loaded. page = require('Module:' .. page) end local val if page[key] then val = page[key] elseif page.keys and page.keys[key] then -- Key 'keys" is an index of all keys, including redirects, see [[Module:i18n/datatype]]. val = page.keys[key] end if not val then return '<' .. key .. '>' end return p._langSwitch(val, lang) end function p.translatelua(frame) local lang = frame.args.lang local page = require('Module:' .. mw.text.trim(frame.args[1])) -- Page should only contain a simple of translations. if not lang or mw.text.trim(lang) == '' then lang = frame:preprocess("{{Int:Lang}}") end if frame.args[2] then page = page[mw.text.trim(frame.args[2])] end return p._langSwitch(page, lang) end -- This test does not work ('Module:Fallback/tests/fallbacks' is missing) function p.runTests() local toFallbackTest = require('Module:Fallback/tests/fallbacks') local result = true mw.log('Testing fallback chains') for i, t in ipairs(toFallbackTest) do local fbtbl = table.concat(p.fblist(t.initial), ', ') local expected = table.concat(t.expected, ', ') local ret = (fbtbl == expected) mw.log(i, ret and 'passed' or 'FAILED', t.initial, (not ret) and ('FAILED\nis >>' .. fbtbl .. '<<\nbut should be >>' .. expected .. '<<\n') or '') result = result and ret end return result end --[==[ List all input arguments of the template that calls "{{#invoke:Fallback|showTemplateArguments}}" ]==] function p.showTemplateArguments(frame) local str = '' for name, value in pairs( frame:getParent().args ) do if str == '' then str = string.format('%s=%s', name, value) -- argument #1 else str = string.format('%s, %s=%s', str, name, value) -- the rest end end return str end return p kq13xuoypsd1pyeoa4kyap1puypg48b ಮಾಡ್ಯೂಲ್:Text/data 828 4468 15591 2026-02-10T16:49:18Z w>A826 0 ೧ ಬದಲಾವಣೆ 15591 Scribunto text/plain -- Data required by [[Module:Text]]. -- Either Lua string patterns (defined by codepoint) or information about quotes local data = {} local LEFT_SQUARE_BRACKET = 91 local RIGHT_SQUARE_BRACKET = 93 local HYPHEN = 45 data.PatternCJK = mw.ustring.char( LEFT_SQUARE_BRACKET, 4352, HYPHEN, 4607, 11904, HYPHEN, 42191, 43072, HYPHEN, 43135, 44032, HYPHEN, 55215, 63744, HYPHEN, 64255, 65072, HYPHEN, 65103, 65381, HYPHEN, 65500, 131072, HYPHEN, 196607, RIGHT_SQUARE_BRACKET ) data.PatternCombined = mw.ustring.char( LEFT_SQUARE_BRACKET, 0x0300, HYPHEN, 0x036F, 0x1AB0, HYPHEN, 0x1AFF, 0x1DC0, HYPHEN, 0x1DFF, 0xFE20, HYPHEN, 0xFE2F, RIGHT_SQUARE_BRACKET ) local RangesLatin = { { 7, 687 }, { 7531, 7578 }, { 7680, 7935 }, { 8194, 8250 } } local PatternLatin = "^[" for i = 1, #RangesLatin do local range = RangesLatin[ i ] PatternLatin = PatternLatin .. mw.ustring.char( range[ 1 ], HYPHEN, range[ 2 ] ) end PatternLatin = PatternLatin .. "]*$" data.RangesLatin = RangesLatin data.NumLatinRanges = #RangesLatin data.PatternLatin = PatternLatin data.PatternTerminated = mw.ustring.char( LEFT_SQUARE_BRACKET, 12290, 65281, 65294, 65311 ) .. "!%.%?…][\"'%]‹›«»‘’“”]*$" data.QuoteLang = { af = "bd", ar = "la", be = "labd", bg = "bd", ca = "la", cs = "bd", da = "bd", de = "bd", dsb = "bd", et = "bd", el = "lald", en = "ld", es = "la", eu = "la", -- fa = "la", fi = "rd", fr = "laSPC", ga = "ld", he = "ldla", hr = "bd", hsb = "bd", hu = "bd", hy = "labd", id = "rd", is = "bd", it = "ld", ja = "x300C", ka = "bd", ko = "ld", lt = "bd", lv = "bd", nl = "ld", nn = "la", no = "la", pl = "bdla", pt = "lald", ro = "bdla", ru = "labd", sk = "bd", sl = "bd", sq = "la", sr = "bx", sv = "rd", th = "ld", tr = "ld", uk = "la", zh = "ld", ["de-ch"] = "la", ["en-gb"] = "lsld", ["en-us"] = "ld", ["fr-ch"] = "la", ["it-ch"] = "la", ["pt-br"] = "ldla", ["zh-tw"] = "x300C", ["zh-cn"] = "ld" } data.QuoteType = { bd = { { 8222, 8220 }, { 8218, 8217 } }, bdla = { { 8222, 8220 }, { 171, 187 } }, bx = { { 8222, 8221 }, { 8218, 8217 } }, la = { { 171, 187 }, { 8249, 8250 } }, laSPC = { { 171, 187 }, { 8249, 8250 }, true }, labd = { { 171, 187 }, { 8222, 8220 } }, lald = { { 171, 187 }, { 8220, 8221 } }, ld = { { 8220, 8221 }, { 8216, 8217 } }, ldla = { { 8220, 8221 }, { 171, 187 } }, lsld = { { 8216, 8217 }, { 8220, 8221 } }, rd = { { 8221, 8221 }, { 8217, 8217 } }, x300C = { { 0x300C, 0x300D }, { 0x300E, 0x300F } } } data.SeekQuote = mw.ustring.char( 34, -- " 39, -- ' 171, -- laquo 187, -- raquo 8216, -- lsquo 8217, -- rsquo 8218, -- sbquo 8220, -- ldquo 8221, -- rdquo 8222, -- bdquo 8249, -- lsaquo 8250, -- rsaquo 0x300C, -- CJK 0x300D, -- CJK 0x300E, -- CJK 0x300F ) -- CJK return data 32zfplthqqurpuluwxl965oirtoogiz 15592 15591 2026-08-22T10:32:57Z A826 1864 ೧ revisions imported from [[:w:ಮಾಡ್ಯೂಲ್:Text/data]] 15591 Scribunto text/plain -- Data required by [[Module:Text]]. -- Either Lua string patterns (defined by codepoint) or information about quotes local data = {} local LEFT_SQUARE_BRACKET = 91 local RIGHT_SQUARE_BRACKET = 93 local HYPHEN = 45 data.PatternCJK = mw.ustring.char( LEFT_SQUARE_BRACKET, 4352, HYPHEN, 4607, 11904, HYPHEN, 42191, 43072, HYPHEN, 43135, 44032, HYPHEN, 55215, 63744, HYPHEN, 64255, 65072, HYPHEN, 65103, 65381, HYPHEN, 65500, 131072, HYPHEN, 196607, RIGHT_SQUARE_BRACKET ) data.PatternCombined = mw.ustring.char( LEFT_SQUARE_BRACKET, 0x0300, HYPHEN, 0x036F, 0x1AB0, HYPHEN, 0x1AFF, 0x1DC0, HYPHEN, 0x1DFF, 0xFE20, HYPHEN, 0xFE2F, RIGHT_SQUARE_BRACKET ) local RangesLatin = { { 7, 687 }, { 7531, 7578 }, { 7680, 7935 }, { 8194, 8250 } } local PatternLatin = "^[" for i = 1, #RangesLatin do local range = RangesLatin[ i ] PatternLatin = PatternLatin .. mw.ustring.char( range[ 1 ], HYPHEN, range[ 2 ] ) end PatternLatin = PatternLatin .. "]*$" data.RangesLatin = RangesLatin data.NumLatinRanges = #RangesLatin data.PatternLatin = PatternLatin data.PatternTerminated = mw.ustring.char( LEFT_SQUARE_BRACKET, 12290, 65281, 65294, 65311 ) .. "!%.%?…][\"'%]‹›«»‘’“”]*$" data.QuoteLang = { af = "bd", ar = "la", be = "labd", bg = "bd", ca = "la", cs = "bd", da = "bd", de = "bd", dsb = "bd", et = "bd", el = "lald", en = "ld", es = "la", eu = "la", -- fa = "la", fi = "rd", fr = "laSPC", ga = "ld", he = "ldla", hr = "bd", hsb = "bd", hu = "bd", hy = "labd", id = "rd", is = "bd", it = "ld", ja = "x300C", ka = "bd", ko = "ld", lt = "bd", lv = "bd", nl = "ld", nn = "la", no = "la", pl = "bdla", pt = "lald", ro = "bdla", ru = "labd", sk = "bd", sl = "bd", sq = "la", sr = "bx", sv = "rd", th = "ld", tr = "ld", uk = "la", zh = "ld", ["de-ch"] = "la", ["en-gb"] = "lsld", ["en-us"] = "ld", ["fr-ch"] = "la", ["it-ch"] = "la", ["pt-br"] = "ldla", ["zh-tw"] = "x300C", ["zh-cn"] = "ld" } data.QuoteType = { bd = { { 8222, 8220 }, { 8218, 8217 } }, bdla = { { 8222, 8220 }, { 171, 187 } }, bx = { { 8222, 8221 }, { 8218, 8217 } }, la = { { 171, 187 }, { 8249, 8250 } }, laSPC = { { 171, 187 }, { 8249, 8250 }, true }, labd = { { 171, 187 }, { 8222, 8220 } }, lald = { { 171, 187 }, { 8220, 8221 } }, ld = { { 8220, 8221 }, { 8216, 8217 } }, ldla = { { 8220, 8221 }, { 171, 187 } }, lsld = { { 8216, 8217 }, { 8220, 8221 } }, rd = { { 8221, 8221 }, { 8217, 8217 } }, x300C = { { 0x300C, 0x300D }, { 0x300E, 0x300F } } } data.SeekQuote = mw.ustring.char( 34, -- " 39, -- ' 171, -- laquo 187, -- raquo 8216, -- lsquo 8217, -- rsquo 8218, -- sbquo 8220, -- ldquo 8221, -- rdquo 8222, -- bdquo 8249, -- lsaquo 8250, -- rsaquo 0x300C, -- CJK 0x300D, -- CJK 0x300E, -- CJK 0x300F ) -- CJK return data 32zfplthqqurpuluwxl965oirtoogiz ಮಾಡ್ಯೂಲ್:Datatype 828 4469 15593 2025-12-22T05:44:33Z w>A826 0 ೧ revisions imported from [[:d:Module:Datatype]] 15593 Scribunto text/plain local p = {} local i18n = mw.loadData('Module:i18n/datatype') function p.resolveDatatype(datatype) return i18n.keys[string.lower(datatype)] end function p.display(datatype, lang) if not datatype or datatype == '' then return 'no datatype provided' end local fb = require 'Module:Fallback' datatype = p.resolveDatatype(datatype) or datatype local data = i18n[datatype] if not data then return datatype .. '-' .. fb._langSwitch(i18n.unrecognized, lang) end local text = mw.ustring.format('[[Special:MyLanguage/Help:Data_type#%s|%s]]', datatype, fb._langSwitch(data, lang)) local trailingtext = '' if data.planned then local linguistic = require 'Module:Linguistic' trailingtext = linguistic.inparentheses(fb._langSwitch(i18n.planned, lang), lang) end return text .. trailingtext end function p.showdatatype(frame) local datatype = frame.args[1] if not datatype or datatype == '' then return nil end datatype = string.lower(datatype) if string.sub(datatype, 1, 9) == 'property:' then local pid = string.sub(datatype, 11) datatype = mw.wikibase.getEntity('P' .. pid).datatype end local outputtype = frame.args[2] if outputtype == 'raw' then return datatype elseif outputtype == 'abbr' then if datatype == "wikibase-item" then datatype = "item" elseif datatype == "wikibase-property" then datatype = "prop" elseif datatype == "commonsMedia" then datatype = "commons" elseif datatype == "external-id" then datatype = "ext-id" end return datatype else local lang = frame.args.lang or frame:callParserFunction('int', 'lang') return p.display(datatype, lang) end end return p 3il03gxpiir3gyc60sci1y7tzweh0ek 15594 15593 2026-08-22T10:32:57Z A826 1864 ೧ revisions imported from [[:w:ಮಾಡ್ಯೂಲ್:Datatype]] 15593 Scribunto text/plain local p = {} local i18n = mw.loadData('Module:i18n/datatype') function p.resolveDatatype(datatype) return i18n.keys[string.lower(datatype)] end function p.display(datatype, lang) if not datatype or datatype == '' then return 'no datatype provided' end local fb = require 'Module:Fallback' datatype = p.resolveDatatype(datatype) or datatype local data = i18n[datatype] if not data then return datatype .. '-' .. fb._langSwitch(i18n.unrecognized, lang) end local text = mw.ustring.format('[[Special:MyLanguage/Help:Data_type#%s|%s]]', datatype, fb._langSwitch(data, lang)) local trailingtext = '' if data.planned then local linguistic = require 'Module:Linguistic' trailingtext = linguistic.inparentheses(fb._langSwitch(i18n.planned, lang), lang) end return text .. trailingtext end function p.showdatatype(frame) local datatype = frame.args[1] if not datatype or datatype == '' then return nil end datatype = string.lower(datatype) if string.sub(datatype, 1, 9) == 'property:' then local pid = string.sub(datatype, 11) datatype = mw.wikibase.getEntity('P' .. pid).datatype end local outputtype = frame.args[2] if outputtype == 'raw' then return datatype elseif outputtype == 'abbr' then if datatype == "wikibase-item" then datatype = "item" elseif datatype == "wikibase-property" then datatype = "prop" elseif datatype == "commonsMedia" then datatype = "commons" elseif datatype == "external-id" then datatype = "ext-id" end return datatype else local lang = frame.args.lang or frame:callParserFunction('int', 'lang') return p.display(datatype, lang) end end return p 3il03gxpiir3gyc60sci1y7tzweh0ek ಮಾಡ್ಯೂಲ್:I18n/datatype 828 4470 15595 2025-12-22T05:44:33Z w>A826 0 ೧ revisions imported from [[:d:Module:I18n/datatype]] 15595 Scribunto text/plain return { -- typical entry structure: -- message: the translatewiki message to use -- planned: set to true to say that the datatype is not yet available planned = { ar = 'غير متوفر حالياً', bg = 'все още недостъпен', bn = 'এখনো উপলব্ধ নয়', ca = 'encara no disponible', cs = 'zatím nedostupný', de = 'noch nicht verfügbar', el = 'μη διαθέσιμο ακόμη', en = 'not available yet', eo = 'ankoraŭ ne disponebla', es = 'disponible próximamente', fr = 'pas encore disponible', fy = 'noch net beskikber', he = 'לא זמין עדיין', hu = 'még nem elérhető', it = 'non ancora disponibile', ja = 'まだ利用できません', ko = '아직 사용할 수 없음', lt = 'dar nėra', mk = 'сè уште недостапно', nb = 'ikke tilgjengelig enda', nl = 'nog niet beschikbaar', nn = 'ikkje tilgjengeleg enno', pa = 'ਹਾਲੀਆ ਨਹੀਂ ਲੱਭਦਾ ਏ', pl = 'jeszcze nie dostępny', pnb = 'حالیہ نہیں لبھدا اے', pt = 'ainda não disponível', ['pt-br'] = 'ainda não disponível', ru = 'ещё не доступен', sl = 'ni še na voljo', sr = 'још није доступно', sv = 'inte tillgängligt ännu', uk = 'ще не доступно', ur = 'ابھی تک دستیاب نہیں', vi = 'chưa có sẵn', ['zh-hans'] = '尚不可用', ['zh-hant'] = '尚不可用', }, unrecognized = { ar = 'نوع البيانات غير سليم وغير موجود في ( [[Module:i18n/datatype]])', bg = 'невалиден тип на данните (няма в [[Module:i18n/datatype]])', bn = 'অকার্যকর উপাত্তের ধরণ ([[Module:i18n/datatype]]-এ নেই)', ca = 'tipus de dades invàlid (no disponible a [[Module:i18n/datatype]])', cs = 'neplatný datový typ (není v [[Module:i18n/datatype]])', de = 'unbekannter Datentyp (nicht in [[Module:i18n/datatype]])', el = 'αδόκιμος τύπος δεδομένων (δεν υπάρχει στο [[Module:i18n/datatype]]', en = 'invalid datatype (not in [[Module:i18n/datatype]])', eo = 'malvalida datumtipo (ne en [[Module:i18n/datatype]])', es = 'tipo de dato inválido (no disponible en [[Module:i18n/datatype]])', fr = 'type de donnée invalide (non reconnu par [[Module:I18n/datatype]])', fy = 'ûnjildich datatype (net yn [[Module:I18n/datatype]])', he = 'סוג נתונים שגוי (לא תחת [[Module:I18n/datatype]])', hu = 'hibás adattípus (nem szerepel a [[Module:i18n/datatype]] lapon)', it = 'tipo di data non è presente tra quelli disponibili ([[Module:I18n/datatype]])', ja = '不正なデータ型 ([[Module:I18n/datatype]]に無い)', ko = '잘못된 데이터 종류입니다 ([[Module:i18n/datatype]]에 들어있지 않음)', lt = 'neteisingas duomenų tipas (nėra [[Module:i18n/datatype]])', mk = 'неважечки податочен тип (не е во [[Module:i18n/datatype]])', nb = 'ugyldig datatype (finnes ikke i [[Module:I18n/datatype]])', nl = 'ongeldig datatype (niet in [[Module:I18n/datatype]])', nn = 'ugild datatype (ikkje i [[Module:i18n/datatype]])', pl = 'niewłaściwy typ danych (nie w [[Module:I18n/datatype]])', pt = 'tipo de dado inválido (não consta em [[Module:I18n/datatype]])', ['pt-br'] = 'tipo de dado inválido (não consta em [[Module:I18n/datatype]])', ru = 'неизвестный тип данных (нет в [[Module:I18n/datatype]])', sl = 'neveljaven podatkovni tip (ni v [[Module:i18n/datatype]])', sr = 'врста податка није наведена. ([[Module:I18n/datatype]])', sv = 'ogiltig datatyp (finns ej i [[Module:I18n/datatype]])', uk = 'невідомий тип даних (відсутній в [[Module:I18n/datatype]])', ur = 'غیر معتبر ڈیٹا ٹائپ (غیر موجود [[Module:i18n/datatype]])', vi = 'kiểu dữ liệu không hợp lệ (không có trong [[Module:i18n/datatype]])', ['zh-hans'] = '无效的数据类型(未于[[Module:i18n/datatype]])', ['zh-hant'] = '無效的資料形態 (不存在於[[Module:i18n/datatype]])', }, keys = { --table of redirects commonsMedia = 'commonsMedia', ['entity-schema'] = 'entity-schema', ['external-id'] = 'external-id', ['geo-shape'] = 'geo-shape', ['globe-coordinate'] = 'globe-coordinate', ['math'] = 'math', monolingualtext = 'monolingualtext', multilingualtext = 'multilingualtext', number = 'number', quantity = 'quantity', ['string'] = 'string', ['tabular-data'] = 'tabular-data', ['time'] = 'time', url = 'url', ['wikibase-item'] = 'wikibase-item', ['wikibase-property'] = 'wikibase-property', ['wikibase-lexeme'] = 'wikibase-lexeme', ['wikibase-form'] = 'wikibase-form', ['wikibase-sense'] = 'wikibase-sense', -- redirects ['commons file'] = 'commonsMedia', commonsfile = 'commonsMedia', commonsmedia = 'commonsMedia', coordinate = 'globe-coordinate', coordinates = 'globe-coordinate', count = 'number', date = 'time', datevalue = 'time', entityschema = 'entity-schema', entitySchema = 'entity-schema', Entityschema = 'entity-schema', ['ext-id'] = 'external-id', ['xid'] = 'external-id', ['externalid'] = 'external-id', ['external id'] = 'external-id', ['external identifier'] = 'external-id', ['identifier'] = 'external-id', ['id'] = 'external-id', form = 'wikibase-form', forms = 'wikibase-form', formula = 'math', ['geo-coordinate'] = 'globe-coordinate', ['geographic coordinate'] = 'globe-coordinate', ['geographic coordinates'] = 'globe-coordinate', geoshape = 'geo-shape', geoshapes = 'geo-shape', geoshapevalue = 'geo-shape', int = 'number', integer = 'number', iri = 'url', irivalue = 'url', item = 'wikibase-item', items = 'wikibase-item', ['mathematical expression'] = 'math', ['celestial'] = 'Celestial coordinates', ['celestial coordinates'] = 'Celestial coordinates', ['calculated'] = 'Calculated property', ['Calculated property'] = 'Calculated property', ['calculated property'] = 'Calculated property', ['Commons data'] = 'geo-shape', ['commons data'] = 'geo-shape', ['Commons-data'] = 'geo-shape', ['Commons-geoshape'] = 'geo-shape', ['Commons dataset'] = 'geo-shape', lexeme = 'wikibase-lexeme', lexemes = 'wikibase-lexeme', media = 'commonsMedia', mediavalue = 'commonsMedia', ['media file'] = 'commonsMedia', ['monolangtext'] = 'monolingualtext', ['monolingual string'] = 'monolingualtext', ['monolingual text'] = 'monolingualtext', ['monolingual-text'] = 'monolingualtext', ['monolingualtextvalue'] = 'monolingualtext', multilangtext = 'multilingualtext', ['multilingual string'] = 'multilingualtext', ['multilingual text'] = 'multilingualtext', ['multilingual-text'] = 'multilingualtext', ['multilingualtextvalue'] = 'multilingualtext', ['musical notation'] = 'musical-notation', ['musical-notation'] = 'musical-notation', notation = 'musical-notation', notes = 'musical-notation', ['number with units'] = 'quantity', numbers = 'number', ['positive integer'] = 'number', properties = 'wikibase-property', property = 'wikibase-property', propertyvalue = 'wikibase-property', quantity = 'quantity', quantityvalue = 'quantity', ['range of numbers'] = 'number', score = 'musical-notation', ['shape-expression'] = 'entity-schema', ['shape expression'] = 'entity-schema', ShEx = 'entity-schema', shex = 'entity-schema', sense = 'wikibase-sense', senses = 'wikibase-sense', stringvalue = 'string', tabular = 'tabular-data', tabulardata = 'tabular-data', ['tabular data'] = 'tabular-data', text = 'string', timevalue = 'time', uri = 'url', urivalue = 'url', urlvalue = 'url', value = 'number', wikibaseform = 'wikibase-form', wikibaseitem = 'wikibase-item', wikibaselexeme = 'wikibase-lexeme', wikibaseproperty = 'wikibase-property', wikibasesense = 'wikibase-sense', }, ['commonsMedia'] = { message = 'datatypes-type-commonsMedia', }, ['entity-schema'] = { message = 'datatypes-type-entity-schema', }, ['external-id'] = { message = 'datatypes-type-external-id', }, ['geo-shape'] = { message = 'datatypes-type-geo-shape', }, ['globe-coordinate'] = { message = 'datatypes-type-globe-coordinate', }, ['math'] = { message = 'datatypes-type-math', }, ['monolingualtext'] = { message = 'datatypes-type-monolingualtext', }, ['multilingualtext'] = { message = 'datatypes-type-multilingualtext', planned = true -- meaning not yet available }, ['musical-notation'] = { message = 'datatypes-type-musical-notation', }, ['Celestial coordinates'] = { message = 'celestial coordinates', planned = true }, ['Calculated property'] = { message = 'calculated property', planned = true }, ['number'] = { message = 'datatypes-type-number', planned = true }, ['quantity'] = { message = 'datatypes-type-quantity', }, ['string'] = { message = 'datatypes-type-string', }, ['tabular-data'] = { message = 'datatypes-type-tabular-data', }, ['time'] = { message = 'datatypes-type-time', }, ['url'] = { message = 'datatypes-type-url', }, ['wikibase-item'] = { message = 'datatypes-type-wikibase-item', -- => no need for local translation, translated through translatewiki }, ['wikibase-lexeme'] = { message = 'datatypes-type-wikibase-lexeme', }, ['wikibase-form'] = { message = 'datatypes-type-wikibase-form', }, ['wikibase-sense'] = { message = 'datatypes-type-wikibase-sense', }, ['wikibase-property'] = { message = 'datatypes-type-wikibase-property', }, } qe2h1gqtoh7bp5xeta12icn9g7oq3s2 15596 15595 2026-08-22T10:32:57Z A826 1864 ೧ revisions imported from [[:w:ಮಾಡ್ಯೂಲ್:I18n/datatype]] 15595 Scribunto text/plain return { -- typical entry structure: -- message: the translatewiki message to use -- planned: set to true to say that the datatype is not yet available planned = { ar = 'غير متوفر حالياً', bg = 'все още недостъпен', bn = 'এখনো উপলব্ধ নয়', ca = 'encara no disponible', cs = 'zatím nedostupný', de = 'noch nicht verfügbar', el = 'μη διαθέσιμο ακόμη', en = 'not available yet', eo = 'ankoraŭ ne disponebla', es = 'disponible próximamente', fr = 'pas encore disponible', fy = 'noch net beskikber', he = 'לא זמין עדיין', hu = 'még nem elérhető', it = 'non ancora disponibile', ja = 'まだ利用できません', ko = '아직 사용할 수 없음', lt = 'dar nėra', mk = 'сè уште недостапно', nb = 'ikke tilgjengelig enda', nl = 'nog niet beschikbaar', nn = 'ikkje tilgjengeleg enno', pa = 'ਹਾਲੀਆ ਨਹੀਂ ਲੱਭਦਾ ਏ', pl = 'jeszcze nie dostępny', pnb = 'حالیہ نہیں لبھدا اے', pt = 'ainda não disponível', ['pt-br'] = 'ainda não disponível', ru = 'ещё не доступен', sl = 'ni še na voljo', sr = 'још није доступно', sv = 'inte tillgängligt ännu', uk = 'ще не доступно', ur = 'ابھی تک دستیاب نہیں', vi = 'chưa có sẵn', ['zh-hans'] = '尚不可用', ['zh-hant'] = '尚不可用', }, unrecognized = { ar = 'نوع البيانات غير سليم وغير موجود في ( [[Module:i18n/datatype]])', bg = 'невалиден тип на данните (няма в [[Module:i18n/datatype]])', bn = 'অকার্যকর উপাত্তের ধরণ ([[Module:i18n/datatype]]-এ নেই)', ca = 'tipus de dades invàlid (no disponible a [[Module:i18n/datatype]])', cs = 'neplatný datový typ (není v [[Module:i18n/datatype]])', de = 'unbekannter Datentyp (nicht in [[Module:i18n/datatype]])', el = 'αδόκιμος τύπος δεδομένων (δεν υπάρχει στο [[Module:i18n/datatype]]', en = 'invalid datatype (not in [[Module:i18n/datatype]])', eo = 'malvalida datumtipo (ne en [[Module:i18n/datatype]])', es = 'tipo de dato inválido (no disponible en [[Module:i18n/datatype]])', fr = 'type de donnée invalide (non reconnu par [[Module:I18n/datatype]])', fy = 'ûnjildich datatype (net yn [[Module:I18n/datatype]])', he = 'סוג נתונים שגוי (לא תחת [[Module:I18n/datatype]])', hu = 'hibás adattípus (nem szerepel a [[Module:i18n/datatype]] lapon)', it = 'tipo di data non è presente tra quelli disponibili ([[Module:I18n/datatype]])', ja = '不正なデータ型 ([[Module:I18n/datatype]]に無い)', ko = '잘못된 데이터 종류입니다 ([[Module:i18n/datatype]]에 들어있지 않음)', lt = 'neteisingas duomenų tipas (nėra [[Module:i18n/datatype]])', mk = 'неважечки податочен тип (не е во [[Module:i18n/datatype]])', nb = 'ugyldig datatype (finnes ikke i [[Module:I18n/datatype]])', nl = 'ongeldig datatype (niet in [[Module:I18n/datatype]])', nn = 'ugild datatype (ikkje i [[Module:i18n/datatype]])', pl = 'niewłaściwy typ danych (nie w [[Module:I18n/datatype]])', pt = 'tipo de dado inválido (não consta em [[Module:I18n/datatype]])', ['pt-br'] = 'tipo de dado inválido (não consta em [[Module:I18n/datatype]])', ru = 'неизвестный тип данных (нет в [[Module:I18n/datatype]])', sl = 'neveljaven podatkovni tip (ni v [[Module:i18n/datatype]])', sr = 'врста податка није наведена. ([[Module:I18n/datatype]])', sv = 'ogiltig datatyp (finns ej i [[Module:I18n/datatype]])', uk = 'невідомий тип даних (відсутній в [[Module:I18n/datatype]])', ur = 'غیر معتبر ڈیٹا ٹائپ (غیر موجود [[Module:i18n/datatype]])', vi = 'kiểu dữ liệu không hợp lệ (không có trong [[Module:i18n/datatype]])', ['zh-hans'] = '无效的数据类型(未于[[Module:i18n/datatype]])', ['zh-hant'] = '無效的資料形態 (不存在於[[Module:i18n/datatype]])', }, keys = { --table of redirects commonsMedia = 'commonsMedia', ['entity-schema'] = 'entity-schema', ['external-id'] = 'external-id', ['geo-shape'] = 'geo-shape', ['globe-coordinate'] = 'globe-coordinate', ['math'] = 'math', monolingualtext = 'monolingualtext', multilingualtext = 'multilingualtext', number = 'number', quantity = 'quantity', ['string'] = 'string', ['tabular-data'] = 'tabular-data', ['time'] = 'time', url = 'url', ['wikibase-item'] = 'wikibase-item', ['wikibase-property'] = 'wikibase-property', ['wikibase-lexeme'] = 'wikibase-lexeme', ['wikibase-form'] = 'wikibase-form', ['wikibase-sense'] = 'wikibase-sense', -- redirects ['commons file'] = 'commonsMedia', commonsfile = 'commonsMedia', commonsmedia = 'commonsMedia', coordinate = 'globe-coordinate', coordinates = 'globe-coordinate', count = 'number', date = 'time', datevalue = 'time', entityschema = 'entity-schema', entitySchema = 'entity-schema', Entityschema = 'entity-schema', ['ext-id'] = 'external-id', ['xid'] = 'external-id', ['externalid'] = 'external-id', ['external id'] = 'external-id', ['external identifier'] = 'external-id', ['identifier'] = 'external-id', ['id'] = 'external-id', form = 'wikibase-form', forms = 'wikibase-form', formula = 'math', ['geo-coordinate'] = 'globe-coordinate', ['geographic coordinate'] = 'globe-coordinate', ['geographic coordinates'] = 'globe-coordinate', geoshape = 'geo-shape', geoshapes = 'geo-shape', geoshapevalue = 'geo-shape', int = 'number', integer = 'number', iri = 'url', irivalue = 'url', item = 'wikibase-item', items = 'wikibase-item', ['mathematical expression'] = 'math', ['celestial'] = 'Celestial coordinates', ['celestial coordinates'] = 'Celestial coordinates', ['calculated'] = 'Calculated property', ['Calculated property'] = 'Calculated property', ['calculated property'] = 'Calculated property', ['Commons data'] = 'geo-shape', ['commons data'] = 'geo-shape', ['Commons-data'] = 'geo-shape', ['Commons-geoshape'] = 'geo-shape', ['Commons dataset'] = 'geo-shape', lexeme = 'wikibase-lexeme', lexemes = 'wikibase-lexeme', media = 'commonsMedia', mediavalue = 'commonsMedia', ['media file'] = 'commonsMedia', ['monolangtext'] = 'monolingualtext', ['monolingual string'] = 'monolingualtext', ['monolingual text'] = 'monolingualtext', ['monolingual-text'] = 'monolingualtext', ['monolingualtextvalue'] = 'monolingualtext', multilangtext = 'multilingualtext', ['multilingual string'] = 'multilingualtext', ['multilingual text'] = 'multilingualtext', ['multilingual-text'] = 'multilingualtext', ['multilingualtextvalue'] = 'multilingualtext', ['musical notation'] = 'musical-notation', ['musical-notation'] = 'musical-notation', notation = 'musical-notation', notes = 'musical-notation', ['number with units'] = 'quantity', numbers = 'number', ['positive integer'] = 'number', properties = 'wikibase-property', property = 'wikibase-property', propertyvalue = 'wikibase-property', quantity = 'quantity', quantityvalue = 'quantity', ['range of numbers'] = 'number', score = 'musical-notation', ['shape-expression'] = 'entity-schema', ['shape expression'] = 'entity-schema', ShEx = 'entity-schema', shex = 'entity-schema', sense = 'wikibase-sense', senses = 'wikibase-sense', stringvalue = 'string', tabular = 'tabular-data', tabulardata = 'tabular-data', ['tabular data'] = 'tabular-data', text = 'string', timevalue = 'time', uri = 'url', urivalue = 'url', urlvalue = 'url', value = 'number', wikibaseform = 'wikibase-form', wikibaseitem = 'wikibase-item', wikibaselexeme = 'wikibase-lexeme', wikibaseproperty = 'wikibase-property', wikibasesense = 'wikibase-sense', }, ['commonsMedia'] = { message = 'datatypes-type-commonsMedia', }, ['entity-schema'] = { message = 'datatypes-type-entity-schema', }, ['external-id'] = { message = 'datatypes-type-external-id', }, ['geo-shape'] = { message = 'datatypes-type-geo-shape', }, ['globe-coordinate'] = { message = 'datatypes-type-globe-coordinate', }, ['math'] = { message = 'datatypes-type-math', }, ['monolingualtext'] = { message = 'datatypes-type-monolingualtext', }, ['multilingualtext'] = { message = 'datatypes-type-multilingualtext', planned = true -- meaning not yet available }, ['musical-notation'] = { message = 'datatypes-type-musical-notation', }, ['Celestial coordinates'] = { message = 'celestial coordinates', planned = true }, ['Calculated property'] = { message = 'calculated property', planned = true }, ['number'] = { message = 'datatypes-type-number', planned = true }, ['quantity'] = { message = 'datatypes-type-quantity', }, ['string'] = { message = 'datatypes-type-string', }, ['tabular-data'] = { message = 'datatypes-type-tabular-data', }, ['time'] = { message = 'datatypes-type-time', }, ['url'] = { message = 'datatypes-type-url', }, ['wikibase-item'] = { message = 'datatypes-type-wikibase-item', -- => no need for local translation, translated through translatewiki }, ['wikibase-lexeme'] = { message = 'datatypes-type-wikibase-lexeme', }, ['wikibase-form'] = { message = 'datatypes-type-wikibase-form', }, ['wikibase-sense'] = { message = 'datatypes-type-wikibase-sense', }, ['wikibase-property'] = { message = 'datatypes-type-wikibase-property', }, } qe2h1gqtoh7bp5xeta12icn9g7oq3s2 ಟೆಂಪ್ಲೇಟು:P 10 4471 15597 2025-12-22T09:33:53Z w>EmausBot 0 Fixing double redirect from [[ಟೆಂಪ್ಲೇಟು:Property]] to [[ಟೆಂಪ್ಲೇಟು:Wikidata property link]] 15597 wikitext text/x-wiki #REDIRECT [[ಟೆಂಪ್ಲೇಟು:Wikidata property link]] s6yd2baloozn6tr4ok47lpuxmhei3tl 15598 15597 2026-08-22T10:32:57Z A826 1864 ೧ revisions imported from [[:w:ಟೆಂಪ್ಲೇಟು:P]] 15597 wikitext text/x-wiki #REDIRECT [[ಟೆಂಪ್ಲೇಟು:Wikidata property link]] s6yd2baloozn6tr4ok47lpuxmhei3tl ಟೆಂಪ್ಲೇಟು:Datatype 10 4472 15599 2025-12-22T05:44:33Z w>A826 0 ೧ revisions imported from [[:d:Template:Datatype]] 15599 wikitext text/x-wiki {{#invoke:Datatype|showdatatype|{{{1|}}}|{{{2|}}}}}<noinclude>{{documentation}}</noinclude> 2syab35tmt6mxf1jlqmxvt8tuu14br2 15600 15599 2026-08-22T10:32:57Z A826 1864 ೧ revisions imported from [[:w:ಟೆಂಪ್ಲೇಟು:Datatype]] 15599 wikitext text/x-wiki {{#invoke:Datatype|showdatatype|{{{1|}}}|{{{2|}}}}}<noinclude>{{documentation}}</noinclude> 2syab35tmt6mxf1jlqmxvt8tuu14br2 ಟೆಂಪ್ಲೇಟು:Notice 10 4473 15601 2026-02-08T11:49:04Z w>A826 0 ೧ revisions imported from [[:en:Template:Notice]] 15601 wikitext text/x-wiki {{Mbox | name = Notice | demospace = {{{demospace|}}} | style = {{#if:{{{style|}}} |{{{style}}} }} | subst = <includeonly>{{subst:substcheck}}</includeonly> | type = notice | image = {{#if:{{{image|}}} |[[File:{{{image}}}|40px|Notice|alt={{{imagealt|}}}]]}} | small = {{{small|}}} | smallimage = {{#if:{{{image|}}} |[[File:{{{image}}}|30px|Notice|alt={{{imagealt|}}}]]}} | imageright = {{#if:{{{imageright|}}} |{{{imageright}}} |{{#if:{{{shortcut|{{{shortcut1|}}}}}} |{{Ombox/shortcut|{{{shortcut|{{{shortcut1|}}}}}}|{{{shortcut2|}}}|{{{shortcut3|}}}|{{{shortcut4|}}}|{{{shortcut5|}}}}}}} }} | textstyle = {{{textstyle|text-align: {{#if:{{{center|}}}|center|{{{align|left}}}}};}}} | text = {{#if:{{{header|{{{heading|{{{title|}}}}}}}}} |<div style="{{{headstyle|text-align: {{#if:{{{center|}}}|center|left}};}}}">'''{{{header|{{{heading|{{{title|}}}}}}}}}'''</div>}}<!-- -->{{{text|{{{content|{{{reason|{{{1}}}}}}}}}}}} }}{{Editnotice EXPECTUNUSEDTEMPLATE}}<noinclude> {{Documentation}} </noinclude> 4a8p8j4z9awirfyhaohw79cm3yf8esd 15602 15601 2026-08-22T11:00:58Z A826 1864 ೧ revisions imported from [[:w:ಟೆಂಪ್ಲೇಟು:Notice]] 15601 wikitext text/x-wiki {{Mbox | name = Notice | demospace = {{{demospace|}}} | style = {{#if:{{{style|}}} |{{{style}}} }} | subst = <includeonly>{{subst:substcheck}}</includeonly> | type = notice | image = {{#if:{{{image|}}} |[[File:{{{image}}}|40px|Notice|alt={{{imagealt|}}}]]}} | small = {{{small|}}} | smallimage = {{#if:{{{image|}}} |[[File:{{{image}}}|30px|Notice|alt={{{imagealt|}}}]]}} | imageright = {{#if:{{{imageright|}}} |{{{imageright}}} |{{#if:{{{shortcut|{{{shortcut1|}}}}}} |{{Ombox/shortcut|{{{shortcut|{{{shortcut1|}}}}}}|{{{shortcut2|}}}|{{{shortcut3|}}}|{{{shortcut4|}}}|{{{shortcut5|}}}}}}} }} | textstyle = {{{textstyle|text-align: {{#if:{{{center|}}}|center|{{{align|left}}}}};}}} | text = {{#if:{{{header|{{{heading|{{{title|}}}}}}}}} |<div style="{{{headstyle|text-align: {{#if:{{{center|}}}|center|left}};}}}">'''{{{header|{{{heading|{{{title|}}}}}}}}}'''</div>}}<!-- -->{{{text|{{{content|{{{reason|{{{1}}}}}}}}}}}} }}{{Editnotice EXPECTUNUSEDTEMPLATE}}<noinclude> {{Documentation}} </noinclude> 4a8p8j4z9awirfyhaohw79cm3yf8esd ಟೆಂಪ್ಲೇಟು:FULLROOTPAGENAME 10 4474 15603 2023-05-25T11:25:13Z w>A826 0 ೧ revision imported from [[:en:Template:FULLROOTPAGENAME]] 15603 wikitext text/x-wiki {{ safesubst:<noinclude/>#if: {{ safesubst:<noinclude/>Ns has subpages | {{ safesubst:<noinclude/>#if:{{{1|}}}|{{ safesubst:<noinclude/>NAMESPACE:{{{1}}}}}|{{ safesubst:<noinclude/>NAMESPACE}}}} }} | {{ safesubst:<noinclude/>#titleparts:{{ safesubst:<noinclude/>#if:{{{1|}}}|{{{1}}}|{{ safesubst:<noinclude/>FULLPAGENAME}}}}|1}} | {{ safesubst:<noinclude/>#if:{{{1|}}}|{{{1}}}|{{ safesubst:<noinclude/>FULLPAGENAME}}}} }}<noinclude> {{documentation}} </noinclude> tk494gglkhfogc40do2k58d4bbttx9o 15604 15603 2026-08-22T11:00:58Z A826 1864 ೧ revisions imported from [[:w:ಟೆಂಪ್ಲೇಟು:FULLROOTPAGENAME]] 15603 wikitext text/x-wiki {{ safesubst:<noinclude/>#if: {{ safesubst:<noinclude/>Ns has subpages | {{ safesubst:<noinclude/>#if:{{{1|}}}|{{ safesubst:<noinclude/>NAMESPACE:{{{1}}}}}|{{ safesubst:<noinclude/>NAMESPACE}}}} }} | {{ safesubst:<noinclude/>#titleparts:{{ safesubst:<noinclude/>#if:{{{1|}}}|{{{1}}}|{{ safesubst:<noinclude/>FULLPAGENAME}}}}|1}} | {{ safesubst:<noinclude/>#if:{{{1|}}}|{{{1}}}|{{ safesubst:<noinclude/>FULLPAGENAME}}}} }}<noinclude> {{documentation}} </noinclude> tk494gglkhfogc40do2k58d4bbttx9o ಟೆಂಪ್ಲೇಟು:Ns has subpages 10 4475 15605 2023-05-25T11:25:13Z w>A826 0 ೧ revision imported from [[:en:Template:Ns_has_subpages]] 15605 wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:Ns has subpages|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> 0pg457y46td6p53rdt8tyc76jeg9pa8 15606 15605 2026-08-22T11:00:59Z A826 1864 ೧ revisions imported from [[:w:ಟೆಂಪ್ಲೇಟು:Ns_has_subpages]] 15605 wikitext text/x-wiki {{<includeonly>safesubst:</includeonly>#invoke:Ns has subpages|main}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage and interwikis go on Wikidata. --> </noinclude> 0pg457y46td6p53rdt8tyc76jeg9pa8 ಮಾಡ್ಯೂಲ್:Category handler 828 4476 15607 2023-10-10T12:40:11Z w>A826 0 ೧ revision imported from [[:d:Module:Category_handler]] 15607 Scribunto text/plain -------------------------------------------------------------------------------- -- -- -- CATEGORY HANDLER -- -- -- -- This module implements the {{category handler}} template in Lua, -- -- with a few improvements: all namespaces and all namespace aliases -- -- are supported, and namespace names are detected automatically for -- -- the local wiki. This module requires [[Module:Namespace detect]] -- -- and [[Module:Yesno]] to be available on the local wiki. It can be -- -- configured for different wikis by altering the values in -- -- [[Module:Category handler/config]], and pages can be blacklisted -- -- from categorisation by using [[Module:Category handler/blacklist]]. -- -- -- -------------------------------------------------------------------------------- -- Load required modules local yesno = require('Module:Yesno') -- Lazily load things we don't always need local mShared, mappings local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function trimWhitespace(s, removeBlanks) if type(s) ~= 'string' then return s end s = s:match('^%s*(.-)%s*$') if removeBlanks then if s ~= '' then return s else return nil end else return s end end -------------------------------------------------------------------------------- -- CategoryHandler class -------------------------------------------------------------------------------- local CategoryHandler = {} CategoryHandler.__index = CategoryHandler function CategoryHandler.new(data, args) local obj = setmetatable({ _data = data, _args = args }, CategoryHandler) -- Set the title object do local pagename = obj:parameter('demopage') local success, titleObj if pagename then success, titleObj = pcall(mw.title.new, pagename) end if success and titleObj then obj.title = titleObj if titleObj == mw.title.getCurrentTitle() then obj._usesCurrentTitle = true end else obj.title = mw.title.getCurrentTitle() obj._usesCurrentTitle = true end end -- Set suppression parameter values for _, key in ipairs{'nocat', 'categories'} do local value = obj:parameter(key) value = trimWhitespace(value, true) obj['_' .. key] = yesno(value) end do local subpage = obj:parameter('subpage') local category2 = obj:parameter('category2') if type(subpage) == 'string' then subpage = mw.ustring.lower(subpage) end if type(category2) == 'string' then subpage = mw.ustring.lower(category2) end obj._subpage = trimWhitespace(subpage, true) obj._category2 = trimWhitespace(category2) -- don't remove blank values end return obj end function CategoryHandler:parameter(key) local parameterNames = self._data.parameters[key] local pntype = type(parameterNames) if pntype == 'string' or pntype == 'number' then return self._args[parameterNames] elseif pntype == 'table' then for _, name in ipairs(parameterNames) do local value = self._args[name] if value ~= nil then return value end end return nil else error(string.format( 'invalid config key "%s"', tostring(key) ), 2) end end function CategoryHandler:isSuppressedByArguments() return -- See if a category suppression argument has been set. self._nocat == true or self._categories == false or ( self._category2 and self._category2 ~= self._data.category2Yes and self._category2 ~= self._data.category2Negative ) -- Check whether we are on a subpage, and see if categories are -- suppressed based on our subpage status. or self._subpage == self._data.subpageNo and self.title.isSubpage or self._subpage == self._data.subpageOnly and not self.title.isSubpage end function CategoryHandler:shouldSkipBlacklistCheck() -- Check whether the category suppression arguments indicate we -- should skip the blacklist check. return self._nocat == false or self._categories == true or self._category2 == self._data.category2Yes end function CategoryHandler:matchesBlacklist() if self._usesCurrentTitle then return self._data.currentTitleMatchesBlacklist else mShared = mShared or require('Module:Category handler/shared') return mShared.matchesBlacklist( self.title.prefixedText, mw.loadData('Module:Category handler/blacklist') ) end end function CategoryHandler:isSuppressed() -- Find if categories are suppressed by either the arguments or by -- matching the blacklist. return self:isSuppressedByArguments() or not self:shouldSkipBlacklistCheck() and self:matchesBlacklist() end function CategoryHandler:getNamespaceParameters() if self._usesCurrentTitle then return self._data.currentTitleNamespaceParameters else if not mappings then mShared = mShared or require('Module:Category handler/shared') mappings = mShared.getParamMappings(true) -- gets mappings with mw.loadData end return mShared.getNamespaceParameters( self.title, mappings ) end end function CategoryHandler:namespaceParametersExist() -- Find whether any namespace parameters have been specified. -- We use the order "all" --> namespace params --> "other" as this is what -- the old template did. if self:parameter('all') then return true end if not mappings then mShared = mShared or require('Module:Category handler/shared') mappings = mShared.getParamMappings(true) -- gets mappings with mw.loadData end for ns, params in pairs(mappings) do for i, param in ipairs(params) do if self._args[param] then return true end end end if self:parameter('other') then return true end return false end function CategoryHandler:getCategories() local params = self:getNamespaceParameters() local nsCategory for i, param in ipairs(params) do local value = self._args[param] if value ~= nil then nsCategory = value break end end if nsCategory ~= nil or self:namespaceParametersExist() then -- Namespace parameters exist - advanced usage. if nsCategory == nil then nsCategory = self:parameter('other') end local ret = {self:parameter('all')} local numParam = tonumber(nsCategory) if numParam and numParam >= 1 and math.floor(numParam) == numParam then -- nsCategory is an integer ret[#ret + 1] = self._args[numParam] else ret[#ret + 1] = nsCategory end if #ret < 1 then return nil else return table.concat(ret) end elseif self._data.defaultNamespaces[self.title.namespace] then -- Namespace parameters don't exist, simple usage. return self._args[1] end return nil end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p = {} function p._exportClasses() -- Used for testing purposes. return { CategoryHandler = CategoryHandler } end function p._main(args, data) data = data or mw.loadData('Module:Category handler/data') local handler = CategoryHandler.new(data, args) if handler:isSuppressed() then return nil end return handler:getCategories() end function p.main(frame, data) data = data or mw.loadData('Module:Category handler/data') local args = require('Module:Arguments').getArgs(frame, { wrappers = data.wrappers, valueFunc = function (k, v) v = trimWhitespace(v) if type(k) == 'number' then if v ~= '' then return v else return nil end else return v end end }) return p._main(args, data) end return p letwavu3yvlayfzew66uuwixmwebq5b 15608 15607 2026-08-22T11:00:59Z A826 1864 ೧ revisions imported from [[:w:ಮಾಡ್ಯೂಲ್:Category_handler]] 15607 Scribunto text/plain -------------------------------------------------------------------------------- -- -- -- CATEGORY HANDLER -- -- -- -- This module implements the {{category handler}} template in Lua, -- -- with a few improvements: all namespaces and all namespace aliases -- -- are supported, and namespace names are detected automatically for -- -- the local wiki. This module requires [[Module:Namespace detect]] -- -- and [[Module:Yesno]] to be available on the local wiki. It can be -- -- configured for different wikis by altering the values in -- -- [[Module:Category handler/config]], and pages can be blacklisted -- -- from categorisation by using [[Module:Category handler/blacklist]]. -- -- -- -------------------------------------------------------------------------------- -- Load required modules local yesno = require('Module:Yesno') -- Lazily load things we don't always need local mShared, mappings local p = {} -------------------------------------------------------------------------------- -- Helper functions -------------------------------------------------------------------------------- local function trimWhitespace(s, removeBlanks) if type(s) ~= 'string' then return s end s = s:match('^%s*(.-)%s*$') if removeBlanks then if s ~= '' then return s else return nil end else return s end end -------------------------------------------------------------------------------- -- CategoryHandler class -------------------------------------------------------------------------------- local CategoryHandler = {} CategoryHandler.__index = CategoryHandler function CategoryHandler.new(data, args) local obj = setmetatable({ _data = data, _args = args }, CategoryHandler) -- Set the title object do local pagename = obj:parameter('demopage') local success, titleObj if pagename then success, titleObj = pcall(mw.title.new, pagename) end if success and titleObj then obj.title = titleObj if titleObj == mw.title.getCurrentTitle() then obj._usesCurrentTitle = true end else obj.title = mw.title.getCurrentTitle() obj._usesCurrentTitle = true end end -- Set suppression parameter values for _, key in ipairs{'nocat', 'categories'} do local value = obj:parameter(key) value = trimWhitespace(value, true) obj['_' .. key] = yesno(value) end do local subpage = obj:parameter('subpage') local category2 = obj:parameter('category2') if type(subpage) == 'string' then subpage = mw.ustring.lower(subpage) end if type(category2) == 'string' then subpage = mw.ustring.lower(category2) end obj._subpage = trimWhitespace(subpage, true) obj._category2 = trimWhitespace(category2) -- don't remove blank values end return obj end function CategoryHandler:parameter(key) local parameterNames = self._data.parameters[key] local pntype = type(parameterNames) if pntype == 'string' or pntype == 'number' then return self._args[parameterNames] elseif pntype == 'table' then for _, name in ipairs(parameterNames) do local value = self._args[name] if value ~= nil then return value end end return nil else error(string.format( 'invalid config key "%s"', tostring(key) ), 2) end end function CategoryHandler:isSuppressedByArguments() return -- See if a category suppression argument has been set. self._nocat == true or self._categories == false or ( self._category2 and self._category2 ~= self._data.category2Yes and self._category2 ~= self._data.category2Negative ) -- Check whether we are on a subpage, and see if categories are -- suppressed based on our subpage status. or self._subpage == self._data.subpageNo and self.title.isSubpage or self._subpage == self._data.subpageOnly and not self.title.isSubpage end function CategoryHandler:shouldSkipBlacklistCheck() -- Check whether the category suppression arguments indicate we -- should skip the blacklist check. return self._nocat == false or self._categories == true or self._category2 == self._data.category2Yes end function CategoryHandler:matchesBlacklist() if self._usesCurrentTitle then return self._data.currentTitleMatchesBlacklist else mShared = mShared or require('Module:Category handler/shared') return mShared.matchesBlacklist( self.title.prefixedText, mw.loadData('Module:Category handler/blacklist') ) end end function CategoryHandler:isSuppressed() -- Find if categories are suppressed by either the arguments or by -- matching the blacklist. return self:isSuppressedByArguments() or not self:shouldSkipBlacklistCheck() and self:matchesBlacklist() end function CategoryHandler:getNamespaceParameters() if self._usesCurrentTitle then return self._data.currentTitleNamespaceParameters else if not mappings then mShared = mShared or require('Module:Category handler/shared') mappings = mShared.getParamMappings(true) -- gets mappings with mw.loadData end return mShared.getNamespaceParameters( self.title, mappings ) end end function CategoryHandler:namespaceParametersExist() -- Find whether any namespace parameters have been specified. -- We use the order "all" --> namespace params --> "other" as this is what -- the old template did. if self:parameter('all') then return true end if not mappings then mShared = mShared or require('Module:Category handler/shared') mappings = mShared.getParamMappings(true) -- gets mappings with mw.loadData end for ns, params in pairs(mappings) do for i, param in ipairs(params) do if self._args[param] then return true end end end if self:parameter('other') then return true end return false end function CategoryHandler:getCategories() local params = self:getNamespaceParameters() local nsCategory for i, param in ipairs(params) do local value = self._args[param] if value ~= nil then nsCategory = value break end end if nsCategory ~= nil or self:namespaceParametersExist() then -- Namespace parameters exist - advanced usage. if nsCategory == nil then nsCategory = self:parameter('other') end local ret = {self:parameter('all')} local numParam = tonumber(nsCategory) if numParam and numParam >= 1 and math.floor(numParam) == numParam then -- nsCategory is an integer ret[#ret + 1] = self._args[numParam] else ret[#ret + 1] = nsCategory end if #ret < 1 then return nil else return table.concat(ret) end elseif self._data.defaultNamespaces[self.title.namespace] then -- Namespace parameters don't exist, simple usage. return self._args[1] end return nil end -------------------------------------------------------------------------------- -- Exports -------------------------------------------------------------------------------- local p = {} function p._exportClasses() -- Used for testing purposes. return { CategoryHandler = CategoryHandler } end function p._main(args, data) data = data or mw.loadData('Module:Category handler/data') local handler = CategoryHandler.new(data, args) if handler:isSuppressed() then return nil end return handler:getCategories() end function p.main(frame, data) data = data or mw.loadData('Module:Category handler/data') local args = require('Module:Arguments').getArgs(frame, { wrappers = data.wrappers, valueFunc = function (k, v) v = trimWhitespace(v) if type(k) == 'number' then if v ~= '' then return v else return nil end else return v end end }) return p._main(args, data) end return p letwavu3yvlayfzew66uuwixmwebq5b ಮಾಡ್ಯೂಲ್:Category handler/data 828 4477 15609 2023-10-10T12:40:13Z w>A826 0 ೧ revision imported from [[:d:Module:Category_handler/data]] 15609 Scribunto text/plain -- This module assembles data to be passed to [[Module:Category handler]] using -- mw.loadData. This includes the configuration data and whether the current -- page matches the title blacklist. local data = require('Module:Category handler/config') local mShared = require('Module:Category handler/shared') local blacklist = require('Module:Category handler/blacklist') local title = mw.title.getCurrentTitle() data.currentTitleMatchesBlacklist = mShared.matchesBlacklist( title.prefixedText, blacklist ) data.currentTitleNamespaceParameters = mShared.getNamespaceParameters( title, mShared.getParamMappings() ) return data k26mwixuaeijisfddb0sxkg82iux8v4 15610 15609 2026-08-22T11:00:59Z A826 1864 ೧ revisions imported from [[:w:ಮಾಡ್ಯೂಲ್:Category_handler/data]] 15609 Scribunto text/plain -- This module assembles data to be passed to [[Module:Category handler]] using -- mw.loadData. This includes the configuration data and whether the current -- page matches the title blacklist. local data = require('Module:Category handler/config') local mShared = require('Module:Category handler/shared') local blacklist = require('Module:Category handler/blacklist') local title = mw.title.getCurrentTitle() data.currentTitleMatchesBlacklist = mShared.matchesBlacklist( title.prefixedText, blacklist ) data.currentTitleNamespaceParameters = mShared.getNamespaceParameters( title, mShared.getParamMappings() ) return data k26mwixuaeijisfddb0sxkg82iux8v4 ಮಾಡ್ಯೂಲ್:Category handler/config 828 4478 15611 2023-10-10T12:40:13Z w>A826 0 ೧ revision imported from [[:d:Module:Category_handler/config]] 15611 Scribunto text/plain -------------------------------------------------------------------------------- -- [[Module:Category handler]] configuration data -- -- Language-specific parameter names and values can be set here. -- -- For blacklist config, see [[Module:Category handler/blacklist]]. -- -------------------------------------------------------------------------------- local cfg = {} -- Don't edit this line. -------------------------------------------------------------------------------- -- Start configuration data -- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Parameter names -- -- These configuration items specify custom parameter names. -- -- To add one extra name, you can use this format: -- -- -- -- foo = 'parameter name', -- -- -- -- To add multiple names, you can use this format: -- -- -- -- foo = {'parameter name 1', 'parameter name 2', 'parameter name 3'}, -- -------------------------------------------------------------------------------- cfg.parameters = { -- The nocat and categories parameter suppress -- categorisation. They are used with Module:Yesno, and work as follows: -- -- cfg.nocat: -- Result of yesno() Effect -- true Categorisation is suppressed -- false Categorisation is allowed, and -- the blacklist check is skipped -- nil Categorisation is allowed -- -- cfg.categories: -- Result of yesno() Effect -- true Categorisation is allowed, and -- the blacklist check is skipped -- false Categorisation is suppressed -- nil Categorisation is allowed nocat = 'nocat', categories = 'categories', -- The parameter name for the legacy "category2" parameter. This skips the -- blacklist if set to the cfg.category2Yes value, and suppresses -- categorisation if present but equal to anything other than -- cfg.category2Yes or cfg.category2Negative. category2 = 'category2', -- cfg.subpage is the parameter name to specify how to behave on subpages. subpage = 'subpage', -- The parameter for data to return in all namespaces. all = 'all', -- The parameter name for data to return if no data is specified for the -- namespace that is detected. other = 'other', -- The parameter name used to specify a page other than the current page; -- used for testing and demonstration. demopage = 'page', } -------------------------------------------------------------------------------- -- Parameter values -- -- These are set values that can be used with certain parameters. Only one -- -- value can be specified, like this: -- -- -- -- cfg.foo = 'value name' -- -- -------------------------------------------------------------------------------- -- The following settings are used with the cfg.category2 parameter. Setting -- cfg.category2 to cfg.category2Yes skips the blacklist, and if cfg.category2 -- is present but equal to anything other than cfg.category2Yes or -- cfg.category2Negative then it supresses cateogrisation. cfg.category2Yes = 'yes' cfg.category2Negative = '¬' -- The following settings are used with the cfg.subpage parameter. -- cfg.subpageNo is the value to specify to not categorise on subpages; -- cfg.subpageOnly is the value to specify to only categorise on subpages. cfg.subpageNo = 'no' cfg.subpageOnly = 'only' -------------------------------------------------------------------------------- -- Default namespaces -- -- This is a table of namespaces to categorise by default. The keys are the -- -- namespace numbers. -- -------------------------------------------------------------------------------- cfg.defaultNamespaces = { [ 0] = true, -- main [ 6] = true, -- file [ 12] = true, -- help [ 14] = true, -- category [100] = true, -- portal [108] = true, -- book } -------------------------------------------------------------------------------- -- Wrappers -- -- This is a wrapper template or a list of wrapper templates to be passed to -- -- [[Module:Arguments]]. -- -------------------------------------------------------------------------------- cfg.wrappers = 'Template:Category handler' -------------------------------------------------------------------------------- -- End configuration data -- -------------------------------------------------------------------------------- return cfg -- Don't edit this line. 6ga9hbq2pdwalsvx68i53dmbr421rq5 15612 15611 2026-08-22T11:00:59Z A826 1864 ೧ revisions imported from [[:w:ಮಾಡ್ಯೂಲ್:Category_handler/config]] 15611 Scribunto text/plain -------------------------------------------------------------------------------- -- [[Module:Category handler]] configuration data -- -- Language-specific parameter names and values can be set here. -- -- For blacklist config, see [[Module:Category handler/blacklist]]. -- -------------------------------------------------------------------------------- local cfg = {} -- Don't edit this line. -------------------------------------------------------------------------------- -- Start configuration data -- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -- Parameter names -- -- These configuration items specify custom parameter names. -- -- To add one extra name, you can use this format: -- -- -- -- foo = 'parameter name', -- -- -- -- To add multiple names, you can use this format: -- -- -- -- foo = {'parameter name 1', 'parameter name 2', 'parameter name 3'}, -- -------------------------------------------------------------------------------- cfg.parameters = { -- The nocat and categories parameter suppress -- categorisation. They are used with Module:Yesno, and work as follows: -- -- cfg.nocat: -- Result of yesno() Effect -- true Categorisation is suppressed -- false Categorisation is allowed, and -- the blacklist check is skipped -- nil Categorisation is allowed -- -- cfg.categories: -- Result of yesno() Effect -- true Categorisation is allowed, and -- the blacklist check is skipped -- false Categorisation is suppressed -- nil Categorisation is allowed nocat = 'nocat', categories = 'categories', -- The parameter name for the legacy "category2" parameter. This skips the -- blacklist if set to the cfg.category2Yes value, and suppresses -- categorisation if present but equal to anything other than -- cfg.category2Yes or cfg.category2Negative. category2 = 'category2', -- cfg.subpage is the parameter name to specify how to behave on subpages. subpage = 'subpage', -- The parameter for data to return in all namespaces. all = 'all', -- The parameter name for data to return if no data is specified for the -- namespace that is detected. other = 'other', -- The parameter name used to specify a page other than the current page; -- used for testing and demonstration. demopage = 'page', } -------------------------------------------------------------------------------- -- Parameter values -- -- These are set values that can be used with certain parameters. Only one -- -- value can be specified, like this: -- -- -- -- cfg.foo = 'value name' -- -- -------------------------------------------------------------------------------- -- The following settings are used with the cfg.category2 parameter. Setting -- cfg.category2 to cfg.category2Yes skips the blacklist, and if cfg.category2 -- is present but equal to anything other than cfg.category2Yes or -- cfg.category2Negative then it supresses cateogrisation. cfg.category2Yes = 'yes' cfg.category2Negative = '¬' -- The following settings are used with the cfg.subpage parameter. -- cfg.subpageNo is the value to specify to not categorise on subpages; -- cfg.subpageOnly is the value to specify to only categorise on subpages. cfg.subpageNo = 'no' cfg.subpageOnly = 'only' -------------------------------------------------------------------------------- -- Default namespaces -- -- This is a table of namespaces to categorise by default. The keys are the -- -- namespace numbers. -- -------------------------------------------------------------------------------- cfg.defaultNamespaces = { [ 0] = true, -- main [ 6] = true, -- file [ 12] = true, -- help [ 14] = true, -- category [100] = true, -- portal [108] = true, -- book } -------------------------------------------------------------------------------- -- Wrappers -- -- This is a wrapper template or a list of wrapper templates to be passed to -- -- [[Module:Arguments]]. -- -------------------------------------------------------------------------------- cfg.wrappers = 'Template:Category handler' -------------------------------------------------------------------------------- -- End configuration data -- -------------------------------------------------------------------------------- return cfg -- Don't edit this line. 6ga9hbq2pdwalsvx68i53dmbr421rq5 ಮಾಡ್ಯೂಲ್:Category handler/shared 828 4479 15613 2023-10-10T12:40:13Z w>A826 0 ೧ revision imported from [[:d:Module:Category_handler/shared]] 15613 Scribunto text/plain -- This module contains shared functions used by [[Module:Category handler]] -- and its submodules. local p = {} function p.matchesBlacklist(page, blacklist) for i, pattern in ipairs(blacklist) do local match = mw.ustring.match(page, pattern) if match then return true end end return false end function p.getParamMappings(useLoadData) local dataPage = 'Module:Namespace detect/data' if useLoadData then return mw.loadData(dataPage).mappings else return require(dataPage).mappings end end function p.getNamespaceParameters(titleObj, mappings) -- We don't use title.nsText for the namespace name because it adds -- underscores. local mappingsKey if titleObj.isTalkPage then mappingsKey = 'talk' else mappingsKey = mw.site.namespaces[titleObj.namespace].name end mappingsKey = mw.ustring.lower(mappingsKey) return mappings[mappingsKey] or {} end return p omlsnhudxz6juptvtxz7ns97jutbzc5 15614 15613 2026-08-22T11:00:59Z A826 1864 ೧ revisions imported from [[:w:ಮಾಡ್ಯೂಲ್:Category_handler/shared]] 15613 Scribunto text/plain -- This module contains shared functions used by [[Module:Category handler]] -- and its submodules. local p = {} function p.matchesBlacklist(page, blacklist) for i, pattern in ipairs(blacklist) do local match = mw.ustring.match(page, pattern) if match then return true end end return false end function p.getParamMappings(useLoadData) local dataPage = 'Module:Namespace detect/data' if useLoadData then return mw.loadData(dataPage).mappings else return require(dataPage).mappings end end function p.getNamespaceParameters(titleObj, mappings) -- We don't use title.nsText for the namespace name because it adds -- underscores. local mappingsKey if titleObj.isTalkPage then mappingsKey = 'talk' else mappingsKey = mw.site.namespaces[titleObj.namespace].name end mappingsKey = mw.ustring.lower(mappingsKey) return mappings[mappingsKey] or {} end return p omlsnhudxz6juptvtxz7ns97jutbzc5 ಮಾಡ್ಯೂಲ್:Category handler/blacklist 828 4480 15615 2023-10-10T12:40:14Z w>A826 0 ೧ revision imported from [[:d:Module:Category_handler/blacklist]] 15615 Scribunto text/plain -- This module contains the blacklist used by [[Module:Category handler]]. -- Pages that match Lua patterns in this list will not be categorised unless -- categorisation is explicitly requested. return { '^Main Page$', -- don't categorise the main page. -- Don't categorise the following pages or their subpages. -- "%f[/\0]" matches if the next character is "/" or the end of the string. '^Wikipedia:Cascade%-protected items%f[/\0]', '^User:UBX%f[/\0]', -- The userbox "template" space. '^User talk:UBX%f[/\0]', -- Don't categorise subpages of these pages, but allow -- categorisation of the base page. '^Wikipedia:Template index/.*$', -- Don't categorise archives. '/[aA]rchive', "^Wikipedia:Administrators' noticeboard/IncidentArchive%d+$", } fsv1drcay6t25e91hzhqxtyp7pckbpx 15616 15615 2026-08-22T11:00:59Z A826 1864 ೧ revisions imported from [[:w:ಮಾಡ್ಯೂಲ್:Category_handler/blacklist]] 15615 Scribunto text/plain -- This module contains the blacklist used by [[Module:Category handler]]. -- Pages that match Lua patterns in this list will not be categorised unless -- categorisation is explicitly requested. return { '^Main Page$', -- don't categorise the main page. -- Don't categorise the following pages or their subpages. -- "%f[/\0]" matches if the next character is "/" or the end of the string. '^Wikipedia:Cascade%-protected items%f[/\0]', '^User:UBX%f[/\0]', -- The userbox "template" space. '^User talk:UBX%f[/\0]', -- Don't categorise subpages of these pages, but allow -- categorisation of the base page. '^Wikipedia:Template index/.*$', -- Don't categorise archives. '/[aA]rchive', "^Wikipedia:Administrators' noticeboard/IncidentArchive%d+$", } fsv1drcay6t25e91hzhqxtyp7pckbpx ಮಾಡ್ಯೂಲ್:Namespace detect/data 828 4481 15617 2023-10-10T12:40:14Z w>A826 0 ೧ revision imported from [[:d:Module:Namespace_detect/data]] 15617 Scribunto text/plain -------------------------------------------------------------------------------- -- Namespace detect data -- -- This module holds data for [[Module:Namespace detect]] to be loaded per -- -- page, rather than per #invoke, for performance reasons. -- -------------------------------------------------------------------------------- local cfg = require('Module:Namespace detect/config') local function addKey(t, key, defaultKey) if key ~= defaultKey then t[#t + 1] = key end end -- Get a table of parameters to query for each default parameter name. -- This allows wikis to customise parameter names in the cfg table while -- ensuring that default parameter names will always work. The cfg table -- values can be added as a string, or as an array of strings. local defaultKeys = { 'main', 'talk', 'other', 'subjectns', 'demospace', 'demopage' } local argKeys = {} for i, defaultKey in ipairs(defaultKeys) do argKeys[defaultKey] = {defaultKey} end for defaultKey, t in pairs(argKeys) do local cfgValue = cfg[defaultKey] local cfgValueType = type(cfgValue) if cfgValueType == 'string' then addKey(t, cfgValue, defaultKey) elseif cfgValueType == 'table' then for i, key in ipairs(cfgValue) do addKey(t, key, defaultKey) end end cfg[defaultKey] = nil -- Free the cfg value as we don't need it any more. end local function getParamMappings() --[[ -- Returns a table of how parameter names map to namespace names. The keys -- are the actual namespace names, in lower case, and the values are the -- possible parameter names for that namespace, also in lower case. The -- table entries are structured like this: -- { -- [''] = {'main'}, -- ['wikipedia'] = {'wikipedia', 'project', 'wp'}, -- ... -- } --]] local mappings = {} local mainNsName = mw.site.subjectNamespaces[0].name mainNsName = mw.ustring.lower(mainNsName) mappings[mainNsName] = mw.clone(argKeys.main) mappings['talk'] = mw.clone(argKeys.talk) for nsid, ns in pairs(mw.site.subjectNamespaces) do if nsid ~= 0 then -- Exclude main namespace. local nsname = mw.ustring.lower(ns.name) local canonicalName = mw.ustring.lower(ns.canonicalName) mappings[nsname] = {nsname} if canonicalName ~= nsname then table.insert(mappings[nsname], canonicalName) end for _, alias in ipairs(ns.aliases) do table.insert(mappings[nsname], mw.ustring.lower(alias)) end end end return mappings end return { argKeys = argKeys, cfg = cfg, mappings = getParamMappings() } ojp6d3pc8mql5nufaqdg576c9so3479 15618 15617 2026-08-22T11:00:59Z A826 1864 ೧ revisions imported from [[:w:ಮಾಡ್ಯೂಲ್:Namespace_detect/data]] 15617 Scribunto text/plain -------------------------------------------------------------------------------- -- Namespace detect data -- -- This module holds data for [[Module:Namespace detect]] to be loaded per -- -- page, rather than per #invoke, for performance reasons. -- -------------------------------------------------------------------------------- local cfg = require('Module:Namespace detect/config') local function addKey(t, key, defaultKey) if key ~= defaultKey then t[#t + 1] = key end end -- Get a table of parameters to query for each default parameter name. -- This allows wikis to customise parameter names in the cfg table while -- ensuring that default parameter names will always work. The cfg table -- values can be added as a string, or as an array of strings. local defaultKeys = { 'main', 'talk', 'other', 'subjectns', 'demospace', 'demopage' } local argKeys = {} for i, defaultKey in ipairs(defaultKeys) do argKeys[defaultKey] = {defaultKey} end for defaultKey, t in pairs(argKeys) do local cfgValue = cfg[defaultKey] local cfgValueType = type(cfgValue) if cfgValueType == 'string' then addKey(t, cfgValue, defaultKey) elseif cfgValueType == 'table' then for i, key in ipairs(cfgValue) do addKey(t, key, defaultKey) end end cfg[defaultKey] = nil -- Free the cfg value as we don't need it any more. end local function getParamMappings() --[[ -- Returns a table of how parameter names map to namespace names. The keys -- are the actual namespace names, in lower case, and the values are the -- possible parameter names for that namespace, also in lower case. The -- table entries are structured like this: -- { -- [''] = {'main'}, -- ['wikipedia'] = {'wikipedia', 'project', 'wp'}, -- ... -- } --]] local mappings = {} local mainNsName = mw.site.subjectNamespaces[0].name mainNsName = mw.ustring.lower(mainNsName) mappings[mainNsName] = mw.clone(argKeys.main) mappings['talk'] = mw.clone(argKeys.talk) for nsid, ns in pairs(mw.site.subjectNamespaces) do if nsid ~= 0 then -- Exclude main namespace. local nsname = mw.ustring.lower(ns.name) local canonicalName = mw.ustring.lower(ns.canonicalName) mappings[nsname] = {nsname} if canonicalName ~= nsname then table.insert(mappings[nsname], canonicalName) end for _, alias in ipairs(ns.aliases) do table.insert(mappings[nsname], mw.ustring.lower(alias)) end end end return mappings end return { argKeys = argKeys, cfg = cfg, mappings = getParamMappings() } ojp6d3pc8mql5nufaqdg576c9so3479 ಮಾಡ್ಯೂಲ್:Namespace detect/config 828 4482 15619 2023-10-10T12:40:14Z w>A826 0 ೧ revision imported from [[:d:Module:Namespace_detect/config]] 15619 Scribunto text/plain -------------------------------------------------------------------------------- -- Namespace detect configuration data -- -- -- -- This module stores configuration data for Module:Namespace detect. Here -- -- you can localise the module to your wiki's language. -- -- -- -- To activate a configuration item, you need to uncomment it. This means -- -- that you need to remove the text "-- " at the start of the line. -- -------------------------------------------------------------------------------- local cfg = {} -- Don't edit this line. -------------------------------------------------------------------------------- -- Parameter names -- -- These configuration items specify custom parameter names. Values added -- -- here will work in addition to the default English parameter names. -- -- To add one extra name, you can use this format: -- -- -- -- cfg.foo = 'parameter name' -- -- -- -- To add multiple names, you can use this format: -- -- -- -- cfg.foo = {'parameter name 1', 'parameter name 2', 'parameter name 3'} -- -------------------------------------------------------------------------------- ---- This parameter displays content for the main namespace: -- cfg.main = 'main' ---- This parameter displays in talk namespaces: -- cfg.talk = 'talk' ---- This parameter displays content for "other" namespaces (namespaces for which ---- parameters have not been specified): -- cfg.other = 'other' ---- This parameter makes talk pages behave as though they are the corresponding ---- subject namespace. Note that this parameter is used with [[Module:Yesno]]. ---- Edit that module to change the default values of "yes", "no", etc. -- cfg.subjectns = 'subjectns' ---- This parameter sets a demonstration namespace: -- cfg.demospace = 'demospace' ---- This parameter sets a specific page to compare: cfg.demopage = 'page' -------------------------------------------------------------------------------- -- Table configuration -- -- These configuration items allow customisation of the "table" function, -- -- used to generate a table of possible parameters in the module -- -- documentation. -- -------------------------------------------------------------------------------- ---- The header for the namespace column in the wikitable containing the list of ---- possible subject-space parameters. -- cfg.wikitableNamespaceHeader = 'Namespace' ---- The header for the wikitable containing the list of possible subject-space ---- parameters. -- cfg.wikitableAliasesHeader = 'Aliases' -------------------------------------------------------------------------------- -- End of configuration data -- -------------------------------------------------------------------------------- return cfg -- Don't edit this line. 1o6ozz56i8q0xgyl6xa41n2v7kelhli 15620 15619 2026-08-22T11:00:59Z A826 1864 ೧ revisions imported from [[:w:ಮಾಡ್ಯೂಲ್:Namespace_detect/config]] 15619 Scribunto text/plain -------------------------------------------------------------------------------- -- Namespace detect configuration data -- -- -- -- This module stores configuration data for Module:Namespace detect. Here -- -- you can localise the module to your wiki's language. -- -- -- -- To activate a configuration item, you need to uncomment it. This means -- -- that you need to remove the text "-- " at the start of the line. -- -------------------------------------------------------------------------------- local cfg = {} -- Don't edit this line. -------------------------------------------------------------------------------- -- Parameter names -- -- These configuration items specify custom parameter names. Values added -- -- here will work in addition to the default English parameter names. -- -- To add one extra name, you can use this format: -- -- -- -- cfg.foo = 'parameter name' -- -- -- -- To add multiple names, you can use this format: -- -- -- -- cfg.foo = {'parameter name 1', 'parameter name 2', 'parameter name 3'} -- -------------------------------------------------------------------------------- ---- This parameter displays content for the main namespace: -- cfg.main = 'main' ---- This parameter displays in talk namespaces: -- cfg.talk = 'talk' ---- This parameter displays content for "other" namespaces (namespaces for which ---- parameters have not been specified): -- cfg.other = 'other' ---- This parameter makes talk pages behave as though they are the corresponding ---- subject namespace. Note that this parameter is used with [[Module:Yesno]]. ---- Edit that module to change the default values of "yes", "no", etc. -- cfg.subjectns = 'subjectns' ---- This parameter sets a demonstration namespace: -- cfg.demospace = 'demospace' ---- This parameter sets a specific page to compare: cfg.demopage = 'page' -------------------------------------------------------------------------------- -- Table configuration -- -- These configuration items allow customisation of the "table" function, -- -- used to generate a table of possible parameters in the module -- -- documentation. -- -------------------------------------------------------------------------------- ---- The header for the namespace column in the wikitable containing the list of ---- possible subject-space parameters. -- cfg.wikitableNamespaceHeader = 'Namespace' ---- The header for the wikitable containing the list of possible subject-space ---- parameters. -- cfg.wikitableAliasesHeader = 'Aliases' -------------------------------------------------------------------------------- -- End of configuration data -- -------------------------------------------------------------------------------- return cfg -- Don't edit this line. 1o6ozz56i8q0xgyl6xa41n2v7kelhli ಮಾಡ್ಯೂಲ್:Ns has subpages 828 4483 15621 2024-07-24T05:21:34Z w>A826 0 ೧ ಬದಲಾವಣೆ 15621 Scribunto text/plain -- This module implements [[Template:Ns has subpages]]. -- While the template is fairly simple, this information is made available to -- Lua directly, so using a module means that we don't have to update the -- template as new namespaces are added. local p = {} function p._main(ns, frame) -- Get the current namespace if we were not passed one. if not ns then ns = mw.title.getCurrentTitle().namespace end -- Look up the namespace table from mw.site.namespaces. This should work -- for a majority of cases. local nsTable = mw.site.namespaces[ns] -- Try using string matching to get the namespace from page names. -- Do a quick and dirty bad title check to try and make sure we do the same -- thing as {{NAMESPACE}} in most cases. if not nsTable and type(ns) == 'string' and not ns:find('[<>|%[%]{}]') then local nsStripped = ns:gsub('^[_%s]*:', '') nsStripped = nsStripped:gsub(':.*$', '') nsTable = mw.site.namespaces[nsStripped] end -- If we still have no match then try the {{NAMESPACE}} parser function, -- which should catch the remainder of cases. Don't use a mw.title object, -- as this would increment the expensive function count for each new page -- tested. if not nsTable then frame = frame or mw.getCurrentFrame() local nsProcessed = frame:callParserFunction('NAMESPACE', ns) nsTable = nsProcessed and mw.site.namespaces[nsProcessed] end return nsTable and nsTable.hasSubpages end function p.main(frame) local ns = frame:getParent().args[1] if ns then ns = ns:match('^%s*(.-)%s*$') -- trim whitespace ns = tonumber(ns) or ns end local hasSubpages = p._main(ns, frame) return hasSubpages and 'yes' or '' end return p qb0b1z2vff7kifnw21v205d791esbiz 15622 15621 2026-08-22T11:00:59Z A826 1864 ೧ revisions imported from [[:w:ಮಾಡ್ಯೂಲ್:Ns_has_subpages]] 15621 Scribunto text/plain -- This module implements [[Template:Ns has subpages]]. -- While the template is fairly simple, this information is made available to -- Lua directly, so using a module means that we don't have to update the -- template as new namespaces are added. local p = {} function p._main(ns, frame) -- Get the current namespace if we were not passed one. if not ns then ns = mw.title.getCurrentTitle().namespace end -- Look up the namespace table from mw.site.namespaces. This should work -- for a majority of cases. local nsTable = mw.site.namespaces[ns] -- Try using string matching to get the namespace from page names. -- Do a quick and dirty bad title check to try and make sure we do the same -- thing as {{NAMESPACE}} in most cases. if not nsTable and type(ns) == 'string' and not ns:find('[<>|%[%]{}]') then local nsStripped = ns:gsub('^[_%s]*:', '') nsStripped = nsStripped:gsub(':.*$', '') nsTable = mw.site.namespaces[nsStripped] end -- If we still have no match then try the {{NAMESPACE}} parser function, -- which should catch the remainder of cases. Don't use a mw.title object, -- as this would increment the expensive function count for each new page -- tested. if not nsTable then frame = frame or mw.getCurrentFrame() local nsProcessed = frame:callParserFunction('NAMESPACE', ns) nsTable = nsProcessed and mw.site.namespaces[nsProcessed] end return nsTable and nsTable.hasSubpages end function p.main(frame) local ns = frame:getParent().args[1] if ns then ns = ns:match('^%s*(.-)%s*$') -- trim whitespace ns = tonumber(ns) or ns end local hasSubpages = p._main(ns, frame) return hasSubpages and 'yes' or '' end return p qb0b1z2vff7kifnw21v205d791esbiz ಟೆಂಪ್ಲೇಟು:Notice/doc 10 4484 15629 2021-09-05T09:35:09Z w>MalnadachBot 0 Changed prefix Category: to ವರ್ಗ: 15629 wikitext text/x-wiki {{Documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> ==ಬಳಕೆ== ಇದು {{tl|notice}} ಸಂದೇಶದ ಬಾಕ್ಸ್. ಈ ಟೆಂಪ್ಲೇಟನ್ನು '''ತೀರಾ ಅವಶ್ಯವಿರುವ ಸಂದರ್ಭಗಳಲ್ಲಿ''', '''ಮುಖ್ಯ'''ವಾದ ಸಂದೇಶಕ್ಕಾಗಿ, ಬೇರೆ ಯಾವುದೇ ನಿರ್ದಿಷ್ಟ ಟೆಂಪ್ಲೇಟುಗಳನ್ನು ಬಳಸಿ ಹೇಳಲು ಸಾಧ್ಯವಿಲ್ಲದಿರುವಾಗ ಬಳಸಬಹುದು. ಬಹಳ ಮುಖ್ಯವಿಲ್ಲದ ಸಾಮಾನ್ಯ ಅಭಿಪ್ರಾಯ, ಅನಿಸಿಕೆಗಳನ್ನು ಆ ಲೇಖನದ ಚರ್ಚೆಪುಟದಲ್ಲಿ ಹಾಕಬಹುದು. ಈ ಸಂದೇಶ ಬಾಕ್ಸನ್ನು ಇತರ ಪುಟಗಳಲ್ಲೂ ಬಳಸಬಹುದು. ಉದಾಹರಣೆಗೆ ಚರ್ಚೆಪುಟದ ಶೀರ್ಷಿಕೆಯ ರೀತಿಯಲ್ಲಿ, ಯೋಜನಾಪುಟದಲ್ಲಿ ಉಪಶೀರ್ಷಿಕೆಯ ರೀತಿಯಲ್ಲಿ ಬಳಸಬಹುದು. There it can be used in a more relaxed way. ಯಾವ ಪುಟದಲ್ಲಿ ಇದನ್ನು ಬಳಸಲಾಗಿದೆ ಎಂಬ ಆಧಾರದ ಮೇಲೆ ಈ ಬಾಕ್ಸ್ ತಾನಾಗೇ ತನ್ನ ಶೈಲಿಯನ್ನು ಬದಲಾಯಿಸಿಕೊಳ್ಳುತ್ತದೆ. ಇದು ಸ್ಟಾಂಡರ್ಡೈಸ್ಡ್ ಬಾಕ್ಸ್ ಶೈಲಿಗಳನ್ನು ವಿವಿಧ ರೀತಿಯ ಪುಟಗಳಲ್ಲಿ ಬಳಸಿಕೊಳ್ಳುತ್ತದೆ. === ಲೇಖನಗಳು === ಮುಖ್ಯಪುಟಗಳಲ್ಲಿ ಈ ಕೆಳಗಿನ ರೀತಿ ಈ ಬಾಕ್ಸ್ ಕಾಣುತ್ತದೆ. ಕೋಡ್ ಉದಾಹರಣೆ ಇದು. <pre> {{notice|ಇಲ್ಲಿ ಸಂದೇಶ ಪಠ್ಯ ಬರೆಯಿರಿ.}} </pre> ಹೀಗೆ ಮೂಡುತ್ತದೆ: {{Notice|demospace=main|ಇಲ್ಲಿ ಸಂದೇಶ ಪಠ್ಯ ಬರೆಯಿರಿ.}} ಈ ರೀತಿ ಒಂದು ಐಚ್ಛಿಕ '''ಶೀರ್ಷಿಕೆ'''ಯನ್ನು ಸೇರಿಸಬಹುದು. <pre> {{notice|header=Header text|ಇಲ್ಲಿ ಸಂದೇಶ ಪಠ್ಯ ಬರೆಯಿರಿ.}} </pre> ಹೀಗೆ ಮೂಡುತ್ತದೆ: {{notice|demospace=main|header=Header text|ಇಲ್ಲಿ ಸಂದೇಶ ಪಠ್ಯ ಬರೆಯಿರಿ.}} ಈ ಬಾಕ್ಸ್ '''image''' parameter ಕೂಡ ಒಳಗೊಳ್ಳಬಹುದು, ಆದರೆ ಲೇಖನಗಳಲ್ಲಿ ಬಳಸುವಾಗ ಇದು ಸಮ್ಮತವಲ್ಲ. ಆ parameter ಬಳಕೆಯಾಗಿವ ಉದಾಹರಣೆಗಳನ್ನು ಕೆಳಗೆ ನೋಡಬಹುದು. === ಚರ್ಚೆಪುಟಗಳು=== ಚರ್ಚೆ ಪುಟಗಳಲ್ಲಿ ಈ ಬಾಕ್ಸ್ ಹೀಗೆ ಕಾಣುತ್ತದೆ. That is, pages that start with "ಚರ್ಚೆಪುಟ:", "ಸದಸ್ಯ:", "Image talk:"ಇತ್ಯಾದಿ. Here's the basic box again: <pre> {{notice|Include text here.}} </pre> ಹೀಗೆ ಮೂಡುತ್ತದೆ: {{notice|demospace=talk|ಇಲ್ಲಿ ಸಂದೇಶ ಪಠ್ಯ ಬರೆಯಿರಿ.}} The '''header''' parameter works on talk pages too. But there is one parameter that only works on talk pages, the '''small''' parameter. Like this: <pre> {{notice|small=yes|header=Header text|ಇಲ್ಲಿ ಸಂದೇಶ ಪಠ್ಯ ಬರೆಯಿರಿ.}} </pre> {{notice|demospace=talk|small=yes|header=Header text|ಇಲ್ಲಿ ಸಂದೇಶ ಪಠ್ಯ ಬರೆಯಿರಿ.}} As you can see, "small=yes" causes a smaller right floating box with a smaller image and smaller text size. <br clear=all> Let's try the '''image''' parameter too. Like this: <pre> {{notice|small=yes|image=Stop hand nuvola.svg |header=Header text|Include text here.}} </pre> {{notice|demospace=talk|small=yes|image=Stop hand nuvola.svg|header=Header text|ಇಲ್ಲಿ ಸಂದೇಶ ಪಠ್ಯ ಬರೆಯಿರಿ.}} <br clear=all> === ಚಿತ್ರ ಮತ್ತು ವರ್ಗಪುಟಗಳು === ಚಿತ್ರ ಪುಟಗಳಲ್ಲಿ ಈ ಬಾಕ್ಸ್ ಹೀಗೆ ಕಾಣುತ್ತದೆ. {{notice|demospace=image|ಇಲ್ಲಿ ಸಂದೇಶ ಪಠ್ಯ ಬರೆಯಿರಿ.}} ವರ್ಗ ಪುಟಗಳಲ್ಲಿ ಈ ಬಾಕ್ಸ್ ಹೀಗೆ ಕಾಣುತ್ತದೆ. {{notice|demospace=category|ಇಲ್ಲಿ ಸಂದೇಶ ಪಠ್ಯ ಬರೆಯಿರಿ.}} === ಇತರಪುಟಗಳು === ಉಳಿದ ಇನ್ನಿತರ ಪುಟಗಳಲ್ಲಿ ಈ ಬಾಕ್ಸ್ ಹೀಗೆ ಕಾಣುತ್ತದೆ. ಉದಾ: "ಸದಸ್ಯ:", "ವಿಕಿಪೀಡಿಯ:", "ಸಹಾಯಪುಟ:" ಇತ್ಯಾದಿ. <pre> {{notice|Include text here.}} </pre> ಹೀಗೆ ಮೂಡುತ್ತದೆ {{notice|ಇಲ್ಲಿ ಸಂದೇಶ ಪಠ್ಯ ಬರೆಯಿರಿ}} The box can also take an '''image''' parameter. Like this: <pre> {{notice|image=Stop hand nuvola.svg|ಇಲ್ಲಿ ಸಂದೇಶ ಪಠ್ಯ ಬರೆಯಿರಿ.}} </pre> ಹೀಗೆ ಮೂಡುತ್ತದೆ: {{notice|image=Stop hand nuvola.svg|ಇಲ್ಲಿ ಸಂದೇಶ ಪಠ್ಯ ಬರೆಯಿರಿ.}} '''header''' and '''image''' parameters ಒಟ್ಟಿಗೇ ಬಳಸಬಹುದು. === ಹೊರಕೊಂಡಿಗಳ ಬಳಕೆ=== ಬಹಳಷ್ಟು ಕಡೆ , ಯಾವುದೇ ತೊಂದರೆಗಳಿಲ್ಲದೇ ಹೊರಕೊಂಡಿಗಳನ್ನು ಟೆಂಪ್ಲೆಟಲ್ಲಿ ಬಳಸಿಕೊಳ್ಳಬಹುದು. ಆದರೆ '=' ಚಿನ್ಹೆಯನ್ನು ಹೊಂದಿರುವ ಕೊಂಡಿಗಳು ತೊಂದರೆಯಾಗಬಹುದು. ಏಕೆಂದರೆ '=' ಚಿನ್ಹೆಯ ಎಡಭಾಗದಲ್ಲಿರುವ ಎಲ್ಲವನ್ನೂ ಎಂದು ಪರಿಗಣಿಸುತ್ತದೆ. This is the suggested work-around: <pre> {{notice|1=Following this parameter, an equal sign in an external link will be read properly.}} </pre> == ಇವನ್ನೂ ನೋಡಿ == * {{tl|consensus}} – for topics based around reaching consensus * {{tl|warning}} – for important warnings * {{tl|caution}} – for messages indicating serious problems * {{tl|ambox}} – article message boxes of any type; there is comprehensive documentation of its different options <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox|| <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> [[ವರ್ಗ:Talk header templates|{{PAGENAME}}]] [[ವರ್ಗ:Notice and warning templates|{{PAGENAME}}]] [[ar:قالب:تبصرة]] [[ca:Plantilla:Avís]] [[cy:Nodyn:Hysbysiad]] [[et:Mall:Info]] [[el:Πρότυπο:Σημείωση]] [[es:Plantilla:Aviso]] [[ka:თარგი:შეტყობინება]] [[hu:Sablon:Comment]] [[ml:ഫലകം:Notice]] [[ja:Template:Notice]] [[pt:Predefinição:Notícia]] [[ru:Шаблон:Notice]] [[sl:Predloga:Obvestilo]] [[uk:Шаблон:Повідомлення]] [[ur:سانچہ:Notice]] [[vi:Tiêu bản:Hộp thông báo]] [[zh:Template:Notice]] [[zh-yue:Template:告示]] }}</includeonly> id4ph8l2gt1ojqpvzpxlup4cnl9e5su 15630 15629 2026-08-22T11:00:59Z A826 1864 ೧ revisions imported from [[:w:ಟೆಂಪ್ಲೇಟು:Notice/doc]] 15629 wikitext text/x-wiki {{Documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> ==ಬಳಕೆ== ಇದು {{tl|notice}} ಸಂದೇಶದ ಬಾಕ್ಸ್. ಈ ಟೆಂಪ್ಲೇಟನ್ನು '''ತೀರಾ ಅವಶ್ಯವಿರುವ ಸಂದರ್ಭಗಳಲ್ಲಿ''', '''ಮುಖ್ಯ'''ವಾದ ಸಂದೇಶಕ್ಕಾಗಿ, ಬೇರೆ ಯಾವುದೇ ನಿರ್ದಿಷ್ಟ ಟೆಂಪ್ಲೇಟುಗಳನ್ನು ಬಳಸಿ ಹೇಳಲು ಸಾಧ್ಯವಿಲ್ಲದಿರುವಾಗ ಬಳಸಬಹುದು. ಬಹಳ ಮುಖ್ಯವಿಲ್ಲದ ಸಾಮಾನ್ಯ ಅಭಿಪ್ರಾಯ, ಅನಿಸಿಕೆಗಳನ್ನು ಆ ಲೇಖನದ ಚರ್ಚೆಪುಟದಲ್ಲಿ ಹಾಕಬಹುದು. ಈ ಸಂದೇಶ ಬಾಕ್ಸನ್ನು ಇತರ ಪುಟಗಳಲ್ಲೂ ಬಳಸಬಹುದು. ಉದಾಹರಣೆಗೆ ಚರ್ಚೆಪುಟದ ಶೀರ್ಷಿಕೆಯ ರೀತಿಯಲ್ಲಿ, ಯೋಜನಾಪುಟದಲ್ಲಿ ಉಪಶೀರ್ಷಿಕೆಯ ರೀತಿಯಲ್ಲಿ ಬಳಸಬಹುದು. There it can be used in a more relaxed way. ಯಾವ ಪುಟದಲ್ಲಿ ಇದನ್ನು ಬಳಸಲಾಗಿದೆ ಎಂಬ ಆಧಾರದ ಮೇಲೆ ಈ ಬಾಕ್ಸ್ ತಾನಾಗೇ ತನ್ನ ಶೈಲಿಯನ್ನು ಬದಲಾಯಿಸಿಕೊಳ್ಳುತ್ತದೆ. ಇದು ಸ್ಟಾಂಡರ್ಡೈಸ್ಡ್ ಬಾಕ್ಸ್ ಶೈಲಿಗಳನ್ನು ವಿವಿಧ ರೀತಿಯ ಪುಟಗಳಲ್ಲಿ ಬಳಸಿಕೊಳ್ಳುತ್ತದೆ. === ಲೇಖನಗಳು === ಮುಖ್ಯಪುಟಗಳಲ್ಲಿ ಈ ಕೆಳಗಿನ ರೀತಿ ಈ ಬಾಕ್ಸ್ ಕಾಣುತ್ತದೆ. ಕೋಡ್ ಉದಾಹರಣೆ ಇದು. <pre> {{notice|ಇಲ್ಲಿ ಸಂದೇಶ ಪಠ್ಯ ಬರೆಯಿರಿ.}} </pre> ಹೀಗೆ ಮೂಡುತ್ತದೆ: {{Notice|demospace=main|ಇಲ್ಲಿ ಸಂದೇಶ ಪಠ್ಯ ಬರೆಯಿರಿ.}} ಈ ರೀತಿ ಒಂದು ಐಚ್ಛಿಕ '''ಶೀರ್ಷಿಕೆ'''ಯನ್ನು ಸೇರಿಸಬಹುದು. <pre> {{notice|header=Header text|ಇಲ್ಲಿ ಸಂದೇಶ ಪಠ್ಯ ಬರೆಯಿರಿ.}} </pre> ಹೀಗೆ ಮೂಡುತ್ತದೆ: {{notice|demospace=main|header=Header text|ಇಲ್ಲಿ ಸಂದೇಶ ಪಠ್ಯ ಬರೆಯಿರಿ.}} ಈ ಬಾಕ್ಸ್ '''image''' parameter ಕೂಡ ಒಳಗೊಳ್ಳಬಹುದು, ಆದರೆ ಲೇಖನಗಳಲ್ಲಿ ಬಳಸುವಾಗ ಇದು ಸಮ್ಮತವಲ್ಲ. ಆ parameter ಬಳಕೆಯಾಗಿವ ಉದಾಹರಣೆಗಳನ್ನು ಕೆಳಗೆ ನೋಡಬಹುದು. === ಚರ್ಚೆಪುಟಗಳು=== ಚರ್ಚೆ ಪುಟಗಳಲ್ಲಿ ಈ ಬಾಕ್ಸ್ ಹೀಗೆ ಕಾಣುತ್ತದೆ. That is, pages that start with "ಚರ್ಚೆಪುಟ:", "ಸದಸ್ಯ:", "Image talk:"ಇತ್ಯಾದಿ. Here's the basic box again: <pre> {{notice|Include text here.}} </pre> ಹೀಗೆ ಮೂಡುತ್ತದೆ: {{notice|demospace=talk|ಇಲ್ಲಿ ಸಂದೇಶ ಪಠ್ಯ ಬರೆಯಿರಿ.}} The '''header''' parameter works on talk pages too. But there is one parameter that only works on talk pages, the '''small''' parameter. Like this: <pre> {{notice|small=yes|header=Header text|ಇಲ್ಲಿ ಸಂದೇಶ ಪಠ್ಯ ಬರೆಯಿರಿ.}} </pre> {{notice|demospace=talk|small=yes|header=Header text|ಇಲ್ಲಿ ಸಂದೇಶ ಪಠ್ಯ ಬರೆಯಿರಿ.}} As you can see, "small=yes" causes a smaller right floating box with a smaller image and smaller text size. <br clear=all> Let's try the '''image''' parameter too. Like this: <pre> {{notice|small=yes|image=Stop hand nuvola.svg |header=Header text|Include text here.}} </pre> {{notice|demospace=talk|small=yes|image=Stop hand nuvola.svg|header=Header text|ಇಲ್ಲಿ ಸಂದೇಶ ಪಠ್ಯ ಬರೆಯಿರಿ.}} <br clear=all> === ಚಿತ್ರ ಮತ್ತು ವರ್ಗಪುಟಗಳು === ಚಿತ್ರ ಪುಟಗಳಲ್ಲಿ ಈ ಬಾಕ್ಸ್ ಹೀಗೆ ಕಾಣುತ್ತದೆ. {{notice|demospace=image|ಇಲ್ಲಿ ಸಂದೇಶ ಪಠ್ಯ ಬರೆಯಿರಿ.}} ವರ್ಗ ಪುಟಗಳಲ್ಲಿ ಈ ಬಾಕ್ಸ್ ಹೀಗೆ ಕಾಣುತ್ತದೆ. {{notice|demospace=category|ಇಲ್ಲಿ ಸಂದೇಶ ಪಠ್ಯ ಬರೆಯಿರಿ.}} === ಇತರಪುಟಗಳು === ಉಳಿದ ಇನ್ನಿತರ ಪುಟಗಳಲ್ಲಿ ಈ ಬಾಕ್ಸ್ ಹೀಗೆ ಕಾಣುತ್ತದೆ. ಉದಾ: "ಸದಸ್ಯ:", "ವಿಕಿಪೀಡಿಯ:", "ಸಹಾಯಪುಟ:" ಇತ್ಯಾದಿ. <pre> {{notice|Include text here.}} </pre> ಹೀಗೆ ಮೂಡುತ್ತದೆ {{notice|ಇಲ್ಲಿ ಸಂದೇಶ ಪಠ್ಯ ಬರೆಯಿರಿ}} The box can also take an '''image''' parameter. Like this: <pre> {{notice|image=Stop hand nuvola.svg|ಇಲ್ಲಿ ಸಂದೇಶ ಪಠ್ಯ ಬರೆಯಿರಿ.}} </pre> ಹೀಗೆ ಮೂಡುತ್ತದೆ: {{notice|image=Stop hand nuvola.svg|ಇಲ್ಲಿ ಸಂದೇಶ ಪಠ್ಯ ಬರೆಯಿರಿ.}} '''header''' and '''image''' parameters ಒಟ್ಟಿಗೇ ಬಳಸಬಹುದು. === ಹೊರಕೊಂಡಿಗಳ ಬಳಕೆ=== ಬಹಳಷ್ಟು ಕಡೆ , ಯಾವುದೇ ತೊಂದರೆಗಳಿಲ್ಲದೇ ಹೊರಕೊಂಡಿಗಳನ್ನು ಟೆಂಪ್ಲೆಟಲ್ಲಿ ಬಳಸಿಕೊಳ್ಳಬಹುದು. ಆದರೆ '=' ಚಿನ್ಹೆಯನ್ನು ಹೊಂದಿರುವ ಕೊಂಡಿಗಳು ತೊಂದರೆಯಾಗಬಹುದು. ಏಕೆಂದರೆ '=' ಚಿನ್ಹೆಯ ಎಡಭಾಗದಲ್ಲಿರುವ ಎಲ್ಲವನ್ನೂ ಎಂದು ಪರಿಗಣಿಸುತ್ತದೆ. This is the suggested work-around: <pre> {{notice|1=Following this parameter, an equal sign in an external link will be read properly.}} </pre> == ಇವನ್ನೂ ನೋಡಿ == * {{tl|consensus}} – for topics based around reaching consensus * {{tl|warning}} – for important warnings * {{tl|caution}} – for messages indicating serious problems * {{tl|ambox}} – article message boxes of any type; there is comprehensive documentation of its different options <includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox|| <!-- CATEGORIES AND INTERWIKIS HERE, THANKS --> [[ವರ್ಗ:Talk header templates|{{PAGENAME}}]] [[ವರ್ಗ:Notice and warning templates|{{PAGENAME}}]] [[ar:قالب:تبصرة]] [[ca:Plantilla:Avís]] [[cy:Nodyn:Hysbysiad]] [[et:Mall:Info]] [[el:Πρότυπο:Σημείωση]] [[es:Plantilla:Aviso]] [[ka:თარგი:შეტყობინება]] [[hu:Sablon:Comment]] [[ml:ഫലകം:Notice]] [[ja:Template:Notice]] [[pt:Predefinição:Notícia]] [[ru:Шаблон:Notice]] [[sl:Predloga:Obvestilo]] [[uk:Шаблон:Повідомлення]] [[ur:سانچہ:Notice]] [[vi:Tiêu bản:Hộp thông báo]] [[zh:Template:Notice]] [[zh-yue:Template:告示]] }}</includeonly> id4ph8l2gt1ojqpvzpxlup4cnl9e5su ಮಾಡ್ಯೂಲ್:Message box/ambox.css 828 4485 15631 2026-08-20T15:37:24Z w>A826 0 ೧ revisions imported from [[:en:Module:Message_box/ambox.css]] 15631 sanitized-css text/css /* {{pp|small=y}} */ .ambox { border: 1px solid #a2a9b1; /* @noflip */ border-left: 10px solid #36c; /* Default "notice" blue */ background-color: #fbfbfb; box-sizing: border-box; } /* Single border between stacked boxes. * category and TemplateStyles are wrapped in an "empty" span [[phab:T378906]] * [[phab:T200206]] may be relevant at a later date */ .ambox + .mw-empty-elt + .ambox, .ambox + .mw-empty-elt + .mw-empty-elt + .ambox, /* * and Template:Dated maintenance category. we can probably remove this flavor * when T200206 is fixed */ .ambox + .mw-empty-elt + .mw-empty-elt + .mw-empty-elt + .ambox { margin-top: -1px; } /* For the "small=left" option. */ /* must override .ambox + .ambox styles above */ html body.mediawiki .ambox.mbox-small-left { /* @noflip */ margin: 4px 1em 4px 0; overflow: hidden; width: 238px; border-collapse: collapse; font-size: 88%; line-height: 1.25em; } .ambox-speedy { /* @noflip */ border-left: 10px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .ambox-delete { /* @noflip */ border-left: 10px solid #b32424; /* Red */ } .ambox-content { /* @noflip */ border-left: 10px solid #f28500; /* Orange */ } .ambox-style { /* @noflip */ border-left: 10px solid #fc3; /* Yellow */ } .ambox-move { /* @noflip */ border-left: 10px solid #9932cc; /* Purple */ } .ambox-protection { /* @noflip */ border-left: 10px solid #a2a9b1; /* Gray-gold */ } .ambox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.5em; width: 100%; } .ambox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.5em; text-align: center; } .ambox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.5em 2px 0; text-align: center; } /* An empty narrow cell */ .ambox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .ambox .mbox-image-div { width: 52px; } @media (min-width: 720px) { .ambox { margin: 0 10%; /* 10% = Will not overlap with other elements */ } } @media print { body.ns-0 .ambox { display: none !important; } } idzaktajuuk2185o4mwkmbswy6znoaz 15632 15631 2026-08-22T11:00:59Z A826 1864 ೧ revisions imported from [[:w:ಮಾಡ್ಯೂಲ್:Message_box/ambox.css]] 15631 sanitized-css text/css /* {{pp|small=y}} */ .ambox { border: 1px solid #a2a9b1; /* @noflip */ border-left: 10px solid #36c; /* Default "notice" blue */ background-color: #fbfbfb; box-sizing: border-box; } /* Single border between stacked boxes. * category and TemplateStyles are wrapped in an "empty" span [[phab:T378906]] * [[phab:T200206]] may be relevant at a later date */ .ambox + .mw-empty-elt + .ambox, .ambox + .mw-empty-elt + .mw-empty-elt + .ambox, /* * and Template:Dated maintenance category. we can probably remove this flavor * when T200206 is fixed */ .ambox + .mw-empty-elt + .mw-empty-elt + .mw-empty-elt + .ambox { margin-top: -1px; } /* For the "small=left" option. */ /* must override .ambox + .ambox styles above */ html body.mediawiki .ambox.mbox-small-left { /* @noflip */ margin: 4px 1em 4px 0; overflow: hidden; width: 238px; border-collapse: collapse; font-size: 88%; line-height: 1.25em; } .ambox-speedy { /* @noflip */ border-left: 10px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .ambox-delete { /* @noflip */ border-left: 10px solid #b32424; /* Red */ } .ambox-content { /* @noflip */ border-left: 10px solid #f28500; /* Orange */ } .ambox-style { /* @noflip */ border-left: 10px solid #fc3; /* Yellow */ } .ambox-move { /* @noflip */ border-left: 10px solid #9932cc; /* Purple */ } .ambox-protection { /* @noflip */ border-left: 10px solid #a2a9b1; /* Gray-gold */ } .ambox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.5em; width: 100%; } .ambox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.5em; text-align: center; } .ambox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.5em 2px 0; text-align: center; } /* An empty narrow cell */ .ambox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .ambox .mbox-image-div { width: 52px; } @media (min-width: 720px) { .ambox { margin: 0 10%; /* 10% = Will not overlap with other elements */ } } @media print { body.ns-0 .ambox { display: none !important; } } idzaktajuuk2185o4mwkmbswy6znoaz ಮಾಡ್ಯೂಲ್:Message box/tmbox.css 828 4486 15633 2022-09-24T07:31:05Z w>A826 0 ೧ revision imported from [[:en:Module:Message_box/tmbox.css]] 15633 sanitized-css text/css /* {{pp|small=y}} */ .tmbox { margin: 4px 0; border-collapse: collapse; border: 1px solid #c0c090; /* Default "notice" gray-brown */ background-color: #f8eaba; box-sizing: border-box; } /* For the "small=yes" option. */ .tmbox.mbox-small { font-size: 88%; line-height: 1.25em; } .tmbox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .tmbox-delete { border: 2px solid #b32424; /* Red */ } .tmbox-content { border: 2px solid #f28500; /* Orange */ } .tmbox-style { border: 2px solid #fc3; /* Yellow */ } .tmbox-move { border: 2px solid #9932cc; /* Purple */ } .tmbox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .tmbox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .tmbox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .tmbox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .tmbox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .tmbox { margin: 4px 10%; } .tmbox.mbox-small { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin: 4px 0 4px 1em; width: 238px; } } repsn0utfco8z4dkb5nw3sm9fowmpms 15634 15633 2026-08-22T11:00:59Z A826 1864 ೧ revisions imported from [[:w:ಮಾಡ್ಯೂಲ್:Message_box/tmbox.css]] 15633 sanitized-css text/css /* {{pp|small=y}} */ .tmbox { margin: 4px 0; border-collapse: collapse; border: 1px solid #c0c090; /* Default "notice" gray-brown */ background-color: #f8eaba; box-sizing: border-box; } /* For the "small=yes" option. */ .tmbox.mbox-small { font-size: 88%; line-height: 1.25em; } .tmbox-speedy { border: 2px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .tmbox-delete { border: 2px solid #b32424; /* Red */ } .tmbox-content { border: 2px solid #f28500; /* Orange */ } .tmbox-style { border: 2px solid #fc3; /* Yellow */ } .tmbox-move { border: 2px solid #9932cc; /* Purple */ } .tmbox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .tmbox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .tmbox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .tmbox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .tmbox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .tmbox { margin: 4px 10%; } .tmbox.mbox-small { /* @noflip */ clear: right; /* @noflip */ float: right; /* @noflip */ margin: 4px 0 4px 1em; width: 238px; } } repsn0utfco8z4dkb5nw3sm9fowmpms ಮಾಡ್ಯೂಲ್:Message box/imbox.css 828 4487 15635 2025-04-04T10:43:36Z w>A826 0 ೧ revision imported from [[:en:Module:Message_box/imbox.css]] 15635 sanitized-css text/css /* {{pp|small=y}} */ .imbox { margin: 4px 0; border-collapse: collapse; border: 3px solid #36c; /* Default "notice" blue */ background-color: var(--background-color-interactive-subtle, #f8f9fa); box-sizing: border-box; } /* For imboxes inside imbox-text cells. */ .imbox .mbox-text .imbox { margin: 0 -0.5em; /* 0.9 - 0.5 = 0.4em left/right. */ /* TODO: Still needed? */ display: block; /* Fix for webkit to force 100% width. */ } .imbox-speedy { border: 3px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .imbox-delete { border: 3px solid #b32424; /* Red */ } .imbox-content { border: 3px solid #f28500; /* Orange */ } .imbox-style { border: 3px solid #fc3; /* Yellow */ } .imbox-move { border: 3px solid #9932cc; /* Purple */ } .imbox-protection { border: 3px solid #a2a9b1; /* Gray-gold */ } .imbox-license { border: 3px solid #88a; /* Dark gray */ } .imbox-featured { border: 3px solid #cba135; /* Brown-gold */ } .imbox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .imbox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .imbox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .imbox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .imbox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .imbox { margin: 4px 10%; } } @media screen { html.skin-theme-clientpref-night .imbox-speedy { background-color: #310402; /* Dark red, same hue/saturation as light */ } } @media screen and ( prefers-color-scheme: dark) { html.skin-theme-clientpref-os .imbox-speedy { background-color: #310402; /* Dark red, same hue/saturation as light */ } } lhzxw9ua9zfke7lwmibcxasqmeka8na 15636 15635 2026-08-22T11:00:59Z A826 1864 ೧ revisions imported from [[:w:ಮಾಡ್ಯೂಲ್:Message_box/imbox.css]] 15635 sanitized-css text/css /* {{pp|small=y}} */ .imbox { margin: 4px 0; border-collapse: collapse; border: 3px solid #36c; /* Default "notice" blue */ background-color: var(--background-color-interactive-subtle, #f8f9fa); box-sizing: border-box; } /* For imboxes inside imbox-text cells. */ .imbox .mbox-text .imbox { margin: 0 -0.5em; /* 0.9 - 0.5 = 0.4em left/right. */ /* TODO: Still needed? */ display: block; /* Fix for webkit to force 100% width. */ } .imbox-speedy { border: 3px solid #b32424; /* Red */ background-color: #fee7e6; /* Pink */ } .imbox-delete { border: 3px solid #b32424; /* Red */ } .imbox-content { border: 3px solid #f28500; /* Orange */ } .imbox-style { border: 3px solid #fc3; /* Yellow */ } .imbox-move { border: 3px solid #9932cc; /* Purple */ } .imbox-protection { border: 3px solid #a2a9b1; /* Gray-gold */ } .imbox-license { border: 3px solid #88a; /* Dark gray */ } .imbox-featured { border: 3px solid #cba135; /* Brown-gold */ } .imbox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .imbox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .imbox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .imbox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .imbox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .imbox { margin: 4px 10%; } } @media screen { html.skin-theme-clientpref-night .imbox-speedy { background-color: #310402; /* Dark red, same hue/saturation as light */ } } @media screen and ( prefers-color-scheme: dark) { html.skin-theme-clientpref-os .imbox-speedy { background-color: #310402; /* Dark red, same hue/saturation as light */ } } lhzxw9ua9zfke7lwmibcxasqmeka8na ಮಾಡ್ಯೂಲ್:Message box/cmbox.css 828 4488 15637 2024-08-03T21:05:46Z w>A826 0 ೧ ಬದಲಾವಣೆ 15637 sanitized-css text/css /* {{pp|small=y}} */ .cmbox { margin: 3px 0; border-collapse: collapse; border: 1px solid #a2a9b1; background-color: #dfe8ff; /* Default "notice" blue */ box-sizing: border-box; /* necessary when embedded in other templates like [[:Category:Pending_AfC_submissions]] */ color: var( --color-base ); } .cmbox-speedy { border: 4px solid #b32424; /* Red */ background-color: #ffdbdb; /* Pink */ } .cmbox-delete { background-color: #ffdbdb; /* Pink */ } .cmbox-content { background-color: #ffe7ce; /* Orange */ } .cmbox-style { background-color: #fff9db; /* Yellow */ } .cmbox-move { background-color: #e4d8ff; /* Purple */ } .cmbox-protection { background-color: #efefe1; /* Gray-gold */ } .cmbox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .cmbox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .cmbox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .cmbox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .cmbox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .cmbox { margin: 3px 10%; } } /* flipped lightness in hsl space except the main cmbox is the main page blue */ @media screen { html.skin-theme-clientpref-night .cmbox { background-color: #0d1a27; /* Default "notice" blue */ } html.skin-theme-clientpref-night .cmbox-speedy, html.skin-theme-clientpref-night .cmbox-delete { background-color: #300; /* Pink */ } html.skin-theme-clientpref-night .cmbox-content { background-color: #331a00; /* Orange */ } html.skin-theme-clientpref-night .cmbox-style { background-color: #332b00; /* Yellow */ } html.skin-theme-clientpref-night .cmbox-move { background-color: #08001a; /* Purple */ } html.skin-theme-clientpref-night .cmbox-protection { background-color: #212112; /* Gray-gold */ } } @media screen and ( prefers-color-scheme: dark) { html.skin-theme-clientpref-os .cmbox { background-color: #0d1a27; /* Default "notice" blue */ } html.skin-theme-clientpref-os .cmbox-speedy, html.skin-theme-clientpref-os .cmbox-delete { background-color: #300; /* Pink */ } html.skin-theme-clientpref-os .cmbox-content { background-color: #331a00; /* Orange */ } html.skin-theme-clientpref-os .cmbox-style { background-color: #332b00; /* Yellow */ } html.skin-theme-clientpref-os .cmbox-move { background-color: #08001a; /* Purple */ } html.skin-theme-clientpref-os .cmbox-protection { background-color: #212112; /* Gray-gold */ } } snmvw270a8vyawfa77mynj2tro48ce0 15638 15637 2026-08-22T11:00:59Z A826 1864 ೧ revisions imported from [[:w:ಮಾಡ್ಯೂಲ್:Message_box/cmbox.css]] 15637 sanitized-css text/css /* {{pp|small=y}} */ .cmbox { margin: 3px 0; border-collapse: collapse; border: 1px solid #a2a9b1; background-color: #dfe8ff; /* Default "notice" blue */ box-sizing: border-box; /* necessary when embedded in other templates like [[:Category:Pending_AfC_submissions]] */ color: var( --color-base ); } .cmbox-speedy { border: 4px solid #b32424; /* Red */ background-color: #ffdbdb; /* Pink */ } .cmbox-delete { background-color: #ffdbdb; /* Pink */ } .cmbox-content { background-color: #ffe7ce; /* Orange */ } .cmbox-style { background-color: #fff9db; /* Yellow */ } .cmbox-move { background-color: #e4d8ff; /* Purple */ } .cmbox-protection { background-color: #efefe1; /* Gray-gold */ } .cmbox .mbox-text { border: none; /* @noflip */ padding: 0.25em 0.9em; width: 100%; } .cmbox .mbox-image { border: none; /* @noflip */ padding: 2px 0 2px 0.9em; text-align: center; } .cmbox .mbox-imageright { border: none; /* @noflip */ padding: 2px 0.9em 2px 0; text-align: center; } /* An empty narrow cell */ .cmbox .mbox-empty-cell { border: none; padding: 0; width: 1px; } .cmbox .mbox-invalid-type { text-align: center; } @media (min-width: 720px) { .cmbox { margin: 3px 10%; } } /* flipped lightness in hsl space except the main cmbox is the main page blue */ @media screen { html.skin-theme-clientpref-night .cmbox { background-color: #0d1a27; /* Default "notice" blue */ } html.skin-theme-clientpref-night .cmbox-speedy, html.skin-theme-clientpref-night .cmbox-delete { background-color: #300; /* Pink */ } html.skin-theme-clientpref-night .cmbox-content { background-color: #331a00; /* Orange */ } html.skin-theme-clientpref-night .cmbox-style { background-color: #332b00; /* Yellow */ } html.skin-theme-clientpref-night .cmbox-move { background-color: #08001a; /* Purple */ } html.skin-theme-clientpref-night .cmbox-protection { background-color: #212112; /* Gray-gold */ } } @media screen and ( prefers-color-scheme: dark) { html.skin-theme-clientpref-os .cmbox { background-color: #0d1a27; /* Default "notice" blue */ } html.skin-theme-clientpref-os .cmbox-speedy, html.skin-theme-clientpref-os .cmbox-delete { background-color: #300; /* Pink */ } html.skin-theme-clientpref-os .cmbox-content { background-color: #331a00; /* Orange */ } html.skin-theme-clientpref-os .cmbox-style { background-color: #332b00; /* Yellow */ } html.skin-theme-clientpref-os .cmbox-move { background-color: #08001a; /* Purple */ } html.skin-theme-clientpref-os .cmbox-protection { background-color: #212112; /* Gray-gold */ } } snmvw270a8vyawfa77mynj2tro48ce0 ಟೆಂಪ್ಲೇಟು:Editnotice EXPECTUNUSEDTEMPLATE 10 4489 15639 2026-02-08T11:49:08Z w>A826 0 ೧ revisions imported from [[:en:Template:Editnotice_EXPECTUNUSEDTEMPLATE]] 15639 wikitext text/x-wiki {{#ifeq:Template:Editnotices|{{FULLROOTPAGENAME}}|__EXPECTUNUSEDTEMPLATE__}}<noinclude>{{documentation}}</noinclude> 1zwqf3zeqxnh21v7kbtjaygvxm2lqko 15640 15639 2026-08-22T11:00:59Z A826 1864 ೧ revisions imported from [[:w:ಟೆಂಪ್ಲೇಟು:Editnotice_EXPECTUNUSEDTEMPLATE]] 15639 wikitext text/x-wiki {{#ifeq:Template:Editnotices|{{FULLROOTPAGENAME}}|__EXPECTUNUSEDTEMPLATE__}}<noinclude>{{documentation}}</noinclude> 1zwqf3zeqxnh21v7kbtjaygvxm2lqko ಟೆಂಪ್ಲೇಟು:SheSaid menu 10 4490 15641 2026-04-21T11:17:57Z en>Codename Noreste 0 Protected "[[Template:SheSaid menu]]": Excessive [[WQ:VANDALISM|vandalism]] ([Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite)) 15641 wikitext text/x-wiki <div style="float:right; size:20%"> [[File:SheSaid 2025 Poster.png|300px|link=Wikiquote:SheSaid|alt=A graphic of several women, surrounded by information about the campaign]] *'''[[Wikiquote:SheSaid]]''' *[[Wikiquote:SheSaid/RedLists|RedLists]] and [[Wikiquote:SheSaid/Suggestions|Suggestions]] *[[Wikiquote:SheSaid/2020|2020]], [[Wikiquote:SheSaid/2021|2021]], [[Wikiquote:SheSaid/2022|2022]], [[Wikiquote:SheSaid/2023|2023]], [[Wikiquote:SheSaid/2024|2024]], [[Wikiquote:SheSaid/2025|2025]] *[[m:Wiki Loves Women/SheSaid|Global]] <small>[https://en.wikiquote.org/w/index.php?title=Template:SheSaid_menu&action=edit&action=edit edit this template]</small><noinclude>[[Category:SheSaid]]</noinclude> </div> h3x0h1w5vinfi9ry8d54fqhffr9338t 15642 15641 2026-08-22T11:02:01Z A826 1864 ೧ revisions imported from [[:en:Template:SheSaid_menu]] 15641 wikitext text/x-wiki <div style="float:right; size:20%"> [[File:SheSaid 2025 Poster.png|300px|link=Wikiquote:SheSaid|alt=A graphic of several women, surrounded by information about the campaign]] *'''[[Wikiquote:SheSaid]]''' *[[Wikiquote:SheSaid/RedLists|RedLists]] and [[Wikiquote:SheSaid/Suggestions|Suggestions]] *[[Wikiquote:SheSaid/2020|2020]], [[Wikiquote:SheSaid/2021|2021]], [[Wikiquote:SheSaid/2022|2022]], [[Wikiquote:SheSaid/2023|2023]], [[Wikiquote:SheSaid/2024|2024]], [[Wikiquote:SheSaid/2025|2025]] *[[m:Wiki Loves Women/SheSaid|Global]] <small>[https://en.wikiquote.org/w/index.php?title=Template:SheSaid_menu&action=edit&action=edit edit this template]</small><noinclude>[[Category:SheSaid]]</noinclude> </div> h3x0h1w5vinfi9ry8d54fqhffr9338t 15643 15642 2026-08-22T11:03:31Z A826 1864 15643 wikitext text/x-wiki <div style="float:right; size:20%"> [[File:SheSaid 2025 Poster.png|300px|link=Wikiquote:SheSaid|alt=A graphic of several women, surrounded by information about the campaign]] *'''[[q:wikiquote:SheSaid]]''' *[[q:wikiquote:SheSaid/RedLists|RedLists]] and [[q:wikiquote:SheSaid/Suggestions|Suggestions]] *[[q:wikiquote:SheSaid/2020|2020]], [[q:wikiquote:SheSaid/2021|2021]], [[q:wikiquote:SheSaid/2022|2022]], [[q:wikiquote:SheSaid/2023|2023]], [[q:wikiquote:SheSaid/2024|2024]], [[q:wikiquote:SheSaid/2025|2025]] *[[m:Wiki Loves Women/SheSaid|Global]] <small>[https://en.wikiquote.org/w/index.php?title=Template:SheSaid_menu&action=edit&action=edit edit this template]</small><noinclude>[[Category:SheSaid]]</noinclude> </div> 0982ttla1d6upepuie9aq6r1g6zpnwc 15648 15643 2026-08-22T11:31:22Z A826 1864 15648 wikitext text/x-wiki <div style="float:right; size:20%"> [[File:SheSaid 2025 Poster.png|300px|link=Project:ಅವಳ-ಮಾತು|alt=A graphic of several women, surrounded by information about the campaign]] *'''[[q:wikiquote:SheSaid]]''' *[[q:wikiquote:SheSaid/RedLists|RedLists]] and [[q:wikiquote:SheSaid/Suggestions|Suggestions]] *[[q:wikiquote:SheSaid/2020|2020]], [[q:wikiquote:SheSaid/2021|2021]], [[q:wikiquote:SheSaid/2022|2022]], [[q:wikiquote:SheSaid/2023|2023]], [[q:wikiquote:SheSaid/2024|2024]], [[q:wikiquote:SheSaid/2025|2025]] *[[m:Wiki Loves Women/SheSaid|Global]] <small>[https://en.wikiquote.org/w/index.php?title=Template:SheSaid_menu&action=edit&action=edit edit this template]</small><noinclude>[[Category:SheSaid]]</noinclude> </div> 4lpep37y6msufhcu2dtqt9v34f6yv1c 15649 15648 2026-08-22T11:38:00Z A826 1864 15649 wikitext text/x-wiki <div style="float:right; size:20%"> [[File:SheSaid 2025 Poster.png|300px|link=Project:ಅವಳ-ಮಾತು|alt=A graphic of several women, surrounded by information about the campaign]] *'''[[q:wikiquote:SheSaid]]''' *[[q:wikiquote:SheSaid/RedLists|RedLists]] and [[q:wikiquote:SheSaid/Suggestions|Suggestions]] *[[q:wikiquote:SheSaid/2020|2020]], [[q:wikiquote:SheSaid/2021|2021]], [[q:wikiquote:SheSaid/2022|2022]], [[q:wikiquote:SheSaid/2023|2023]], [[q:wikiquote:SheSaid/2024|2024]], [[q:wikiquote:SheSaid/2025|2025]] *[[m:Wiki Loves Women/SheSaid|Global]] <small>[https://en.wikiquote.org/w/index.php?title=Template:SheSaid_menu&action=edit&action=edit edit this template]</small><noinclude>[[Category:ಅವಳ ಮಾತು]]</noinclude> </div> debnkw39a3sub04e116iu8itnyx1bs5 ವಿಕಿಕೋಟ್:ಅವಳ-ಮಾತು 4 4491 15644 2026-08-22T11:05:29Z A826 1864 ಹೊಸ ಪುಟ: {{SheSaid menu}} == ಅಭಿಯಾನದ ಬಗ್ಗೆ == [[File:Official WLW Logo in Africa.svg|thumb|right|150px|[[m:Wiki Loves Women|ವಿಕಿ ಲವ್ಸ್ ವುಮೆನ್]] ಲಾಂಛನ]] '''#SheSaid''' ಅಭಿಯಾನವು [[m:Wiki Loves Women|ವಿಕಿ ಲವ್ಸ್ ವುಮೆನ್]] ಉಪಕ್ರಮದ ಭಾಗವಾಗಿದೆ. **ಅಕ್ಟೋಬರ್ ೨೦, ೨೦೨೦** ರಂದು ಪ್ರಾರಂಭವಾದ ಈ ಯೋ... 15644 wikitext text/x-wiki {{SheSaid menu}} == ಅಭಿಯಾನದ ಬಗ್ಗೆ == [[File:Official WLW Logo in Africa.svg|thumb|right|150px|[[m:Wiki Loves Women|ವಿಕಿ ಲವ್ಸ್ ವುಮೆನ್]] ಲಾಂಛನ]] '''#SheSaid''' ಅಭಿಯಾನವು [[m:Wiki Loves Women|ವಿಕಿ ಲವ್ಸ್ ವುಮೆನ್]] ಉಪಕ್ರಮದ ಭಾಗವಾಗಿದೆ. **ಅಕ್ಟೋಬರ್ ೨೦, ೨೦೨೦** ರಂದು ಪ್ರಾರಂಭವಾದ ಈ ಯೋಜನೆಯು ಮಹಿಳೆಯರ ಉಲ್ಲೇಖಗಳನ್ನು ಒಳಗೊಂಡ ವಿಕಿಕೋಟ್ ಲೇಖನಗಳನ್ನು ರಚಿಸಲು ಮತ್ತು ಸುಧಾರಿಸಲು ಪ್ರೋತ್ಸಾಹಿಸುವ ಮೂಲಕ ಪ್ರಮುಖ ಮಹಿಳೆಯರನ್ನು ಮತ್ತು ಅವರ ಧ್ವನಿಗಳನ್ನು ಆಚರಿಸುತ್ತದೆ. ಈ ಅಭಿಯಾನದ ಉದ್ದೇಶಗಳು: * [[ವಿಕಿಕೋಟ್]]ನಲ್ಲಿ ಗಮನಾರ್ಹ ಮಹಿಳೆಯರ ಗೋಚರತೆಯನ್ನು ಹೆಚ್ಚಿಸುವುದು * ಜಾಗತಿಕವಾಗಿ ಮಹಿಳೆಯರ ಧ್ವನಿಗಳನ್ನು ವರ್ಧಿಸುವುದು * ಬಹುಭಾಷೆಗಳಲ್ಲಿ ಭಾಗವಹಿಸುವಿಕೆಯನ್ನು ಪ್ರೇರೇಪಿಸುವುದು ಭಾಗವಹಿಸಲು, ಒಂದು ವಿಕಿಕೋಟ್ ಲೇಖನವನ್ನು ರಚಿಸಿ ಅಥವಾ ಸುಧಾರಿಸಿ ಮತ್ತು ನೀವು **ಪ್ರಕಟಿಸುವ** ಮೊದಲು ನಿಮ್ಮ ಸಂಪಾದನೆಯ ಸಾರಾಂಶದಲ್ಲಿ '''#SheSaid''' ಸೇರಿಸಿ. ಕೇಂದ್ರ ಸಮನ್ವಯ: [[m:Wiki Loves Women/SheSaid|ಮೆಟಾದಲ್ಲಿ ವಿಕಿ ಲವ್ಸ್ ವುಮೆನ್/ಶೀಸೇಡ್]]. '''೨೦೨೬ರ ಶೀಸೇಡ್ ಅಭಿಯಾನವು ಈಗ ಪ್ರಾರಂಭವಾಗಿದೆ!''' {{Notice|ನಿಮ್ಮನ್ನು ಕೊಡುಗೆದಾರರ ಪಟ್ಟಿಗೆ ಸೇರಿಸಲು ಯಾವುದೇ ಸಮಸ್ಯೆಗಳು ಎದುರಾದರೆ, ದಯವಿಟ್ಟು [[q:Wikiquote talk:SheSaid]] ಗೆ ಪೋಸ್ಟ್ ಮಾಡಿ. ಎಲ್ಲರೂ ಸ್ವಾಗತ ಮತ್ತು ಕೊಡುಗೆ ನೀಡಲು ಸ್ವಾಗತ!}} '''ಎಲ್ಲಾ ಭಾಷೆಗಳು:''' [[q:Wikiquote:SheSaid/2026|೨೦೨೬ರ ಫಲಿತಾಂಶಗಳನ್ನು ಇಲ್ಲಿ ವೀಕ್ಷಿಸಿ]] == ಸ್ಥಳೀಯ ವಿಕಿಕೋಟ್ ಪೋರ್ಟಲ್ಗಳು == ಈ ಅಭಿಯಾನವು ಬಹು ಭಾಷೆಗಳು ಮತ್ತು ಪ್ರದೇಶಗಳಲ್ಲಿ ನಡೆಯುತ್ತದೆ. ಕೆಳಗಿನ ನಿಮ್ಮ ಸ್ಥಳೀಯ ಆವೃತ್ತಿಯನ್ನು ಅನ್ವೇಷಿಸಿ: * [[q:ar:ويكي الاقتباس:قالت|ಅರೇಬಿಕ್]] * [[q:as:ৱিকিউদ্ধৃতি:আইদেউৰ বাণী|ಅಸ್ಸಾಮೀಸ್]] * [[q:bjn:Wikipapadah:SheSaid|ಬಂಜಾರ್]] * [[q:bn:উইকিউক্তি:নারীবাণী|ಬೆಂಗಾಲಿ]] * [[q:ca:Viquidites:SheSaid|ಕೆಟಲಾನ್]] * [[q:nl:Wikiquote:SheSaid|ಡಚ್]] * [[q:en:Wikiquote:SheSaid|ಇಂಗ್ಲೀಷ್]] * [[q:fat:Krataafa Tsitsir|ಫ್ಯಾಂಟೆ]] (ಇನ್ಕ್ಯುಬೇಟರ್) * [[q:fr:Wikiquote:SheSaid|ಫ್ರೆಂಚ್]] * [[q:de:Wikiquote:SheSaid|ಜರ್ಮನ್]] * [[q:guw:Wikihoyidọ:YọnnuDọ|ಗುಂಗ್ಬೆ]] * [[q:ha:Babban shafi|ಹೌಸಾ]] (ಇನ್ಕ್ಯುಬೇಟರ್) * [[q:ig:Wikikwotu:SheSaid/Redlists|ಇಗ್ಬೊ]] * [[q:it:Wikiquote:SheSaid|ಇಟಾಲಿಯನ್]] * [[q:sr:Викицитат:Кампања SheSaid 2025|ಸರ್ಬಿಯನ್]] * [[q:tn:Tsebe ya konokono|ಸೆಟ್ಸ್ವಾನಾ]] (ಇನ್ಕ್ಯುಬೇಟರ್) * [[q:si:Wikiquote:SheSaid|ಸ್ಲೋವೇನ್]] * [[q:es:Wikiquote:Wiki Loves Women/SheSaid/Ella dice|ಸ್ಪ್ಯಾನಿಷ್]] * [[q:sw:Wikiquote:SheSaid|ಸ್ವಾಹಿಲಿ]] * [[q:te:వికీవ్యాఖ్య:ఆమె చెప్పింది|ತೆಲುಗು]] * [[q:uk:Вікіцитати:Це сказала вона|ಉಕ್ರೇನಿಯನ್]] * [[q:uz:Vikiiqtibos:SheSaid|ಉಜ್ಬೆಕ್]] * [[q:pa:ਵਿਕੀਕਥਨ:SheSaid|ಪಂಜಾಬಿ]] (ಇನ್ಕ್ಯುಬೇಟರ್) * [[q:ml:Wikiquote:SheSaid|ಮಲಯಾಳಂ]] (ಕೇರಳ) * [[q:id:Wikikutip:SheSaid|ಇಂಡೋನೇಷಿಯನ್]] * [[q:sat:ᱣᱤᱠᱤᱠᱳᱴ:SheSaid|ಸಂತಾಲಿ]] (ಇನ್ಕ್ಯುಬೇಟರ್) == ಭಾಗವಹಿಸುವವರು == #SheSaid ೨೦೨೬ ಉಪಕ್ರಮದಲ್ಲಿ ಸೇರಿರುವ ಕೊಡುಗೆದಾರರ ಪಟ್ಟಿ ಕೆಳಗಿದೆ. <small>'''ಸಲಹೆ:''' <code># [[User:ನಿಮ್ಮಹೆಸರು]]</code> ಜೊತೆಗೆ ಪಟ್ಟಿಯ ಕೆಳಭಾಗದಲ್ಲಿ ನಿಮ್ಮ ಬಳಕೆದಾರಹೆಸರನ್ನು ಸೇರಿಸಿ. ನಿಮ್ಮನ್ನು ಸೇರಿಸಲು ಸಮಸ್ಯೆಗಳಿದ್ದರೆ, ದಯವಿಟ್ಟು [[Wikiquote:Administrators' noticeboard|ನಿರ್ವಾಹಕರಿಗೆ]] ತಿಳಿಸಿ.</small> <div style="column-count:4"> </div> --- == ಹೇಗೆ ಭಾಗವಹಿಸುವುದು == ನೀವು ಅನೇಕ ವಿಧಗಳಲ್ಲಿ ವಿಕಿಕೋಟ್ನಲ್ಲಿ ಮಹಿಳೆಯರ ಉಪಸ್ಥಿತಿಯನ್ನು ಬಲಪಡಿಸಲು ಸಹಾಯ ಮಾಡಬಹುದು. === ಲೇಖನಗಳನ್ನು ರಚಿಸಿ ಅಥವಾ ಸುಧಾರಿಸಿ === * ಗಮನಾರ್ಹ ಮಹಿಳೆಯರ ಬಗ್ಗೆ ಹೊಸ ವಿಕಿಕೋಟ್ ಪುಟಗಳನ್ನು ಪ್ರಾರಂಭಿಸಿ → [[q:Wikiquote:SheSaid/RedLists]] ಅಥವಾ [[q:Wikiquote:SheSaid/SheSaid Africa]] ನೋಡಿ * ಅಸ್ತಿತ್ವದಲ್ಲಿರುವ ಪುಟಗಳನ್ನು ವಿಸ್ತರಿಸಿ ಅಥವಾ ಮೂಲಗಳನ್ನು ಸೇರಿಸಿ → <nowiki>{{citation needed}}</nowiki> ಜೊತೆಗೆ ಉಲ್ಲೇಖಗಳನ್ನು ಸೇರಿಸಿ * ಮಹಿಳೆಯರಿಗೆ ಸಂಬಂಧಿಸಿದ ಪ್ರಮುಖ ವಿಷಯಗಳನ್ನು ಸುಧಾರಿಸಿ, ಉದಾಹರಣೆಗೆ: * [[q:Women]] * [[q:Gender bias on Wikipedia]] * [[q:Women and HIV/AIDS]] * [[q:Sexism]] === ಸಂಘಟಿಸಿ ಮತ್ತು ವರ್ಗೀಕರಿಸಿ === * ಮಹಿಳೆಯರನ್ನು ಸರಿಯಾದ ವರ್ಗಗಳಿಗೆ ಸೇರಿಸಿ, ಉದಾ. [[:Category:Women]] ಅಥವಾ [[:Category:Women by country]] * ಚಿಕ್ಕ ವರ್ಗಗಳನ್ನು ವಿಲೀನಗೊಳಿಸಿ; ಅಗತ್ಯವಿದ್ದರೆ ಮಾತ್ರ ಹೊಸದನ್ನು ರಚಿಸಿ * ಸಂಬಂಧಿತ ಪುಟಗಳಿಗೆ "ಇದನ್ನೂ ನೋಡಿ" ವಿಭಾಗಗಳನ್ನು ಸೇರಿಸಿ * [[w:wp:magic words|ಮ್ಯಾಜಿಕ್ ಪದಗಳನ್ನು]] ಬಳಸಿ '''DEFAULTSORT''' ಸೇರಿಸಿ === ಚಿತ್ರಗಳನ್ನು ಸೇರಿಸಿ ಅಥವಾ ಸುಧಾರಿಸಿ === * ಮಹಿಳೆಯರ ಫೋಟೋಗಳನ್ನು ಸೇರಿಸಿ ([[Wikiquote:Image use policy]] ಅನುಸರಿಸಿ) * [[Wikiquote:SheSaid#Articles_in_need_of_a_photo|ಫೋಟೋ ಅಗತ್ಯವಿರುವ ಲೇಖನಗಳು]] ನೋಡಿ === ಅಭಿಯಾನವನ್ನು ಪ್ರಚಾರ ಮಾಡಿ === * #SheSaid ಪೋಸ್ಟ್ಕಾರ್ಡ್ಗಳು ಅಥವಾ ಬುಕ್ಮಾರ್ಕ್ಗಳನ್ನು ಹಂಚಿಕೊಳ್ಳಿ (ಕೆಳಗೆ ನೋಡಿ) * #SheSaid ಹ್ಯಾಶ್ಟ್ಯಾಗ್ ಬಳಸಿ ಸಾಮಾಜಿಕ ಮಾಧ್ಯಮದಲ್ಲಿ ಇತರರನ್ನು ಆಹ್ವಾನಿಸಿ == ಟ್ರ್ಯಾಕಿಂಗ್ ಮತ್ತು ಅಂಕಿಅಂಶಗಳು == ನೀವು ಲೈವ್ ಕ್ವಾರಿ ಪ್ರಶ್ನೆಗಳ ಮೂಲಕ ಅಭಿಯಾನದ ಪ್ರಗತಿಯನ್ನು ಟ್ರ್ಯಾಕ್ ಮಾಡಬಹುದು: * [https://quarry.wmcloud.org/query/97166 ಹೊಸ #SheSaid ಲೇಖನಗಳು (೨೦೨೫)] * [https://quarry.wmcloud.org/query/97167 ಸುಧಾರಿತ #SheSaid ಲೇಖನಗಳು (೨೦೨೫)] * [https://quarry.wmcloud.org/query/97168 ಹೊಸ ಲೇಖನಗಳು (ಕಳೆದ ಎರಡು ವಾರಗಳು)] ಎಲ್ಲಾ ಹೊಸ ಪುಟಗಳನ್ನು ನೋಡಿ: [https://kn.wikiquote.org/wiki/Special:NewPages Special:NewPages] --- == ೨೦೨೫ರಲ್ಲಿ ರಚಿಸಲಾದ ಅಥವಾ ಸುಧಾರಿಸಲಾದ ಲೇಖನಗಳು == [https://meta.wikimedia.org/wiki/Wiki_Loves_Women/SheSaid/Resources_and_Tools ಸಂಪೂರ್ಣ ಸಂಪನ್ಮೂಲಗಳು ಮತ್ತು ಉಪಕರಣಗಳನ್ನು] ಮತ್ತು ೨೦೨೫ರಲ್ಲಿ ರಚಿಸಲಾದ ಮತ್ತು ಸುಧಾರಿಸಲಾದ ಲೇಖನಗಳ [[Wikiquote:SheSaid/2025|ಹೆಚ್ಚು ಸಮಗ್ರ ಪಟ್ಟಿಯನ್ನು]] ಪ್ರವೇಶಿಸಿ. <small>ಕೆಳಗೆ ೨೦೨೫ರಲ್ಲಿ ರಚಿಸಲಾದ ಅಥವಾ ಸುಧಾರಿಸಲಾದ ಪುಟಗಳ ಉದಾಹರಣೆಗಳಿವೆ.</small> <div class="mw-collapsible mw-collapsed"> === ಹೊಸ ಲೇಖನಗಳು === <div style="column-count:5"> #[[ಆಡಾ ಎನ್ಡುಕಾ ಒಯೋಮ್]] #[[ಏಂಜೆಲಾ ಅರೆಂಡ್ಟ್ಸ್]] #[[ಆನ್-ಮೇರಿ ಇಮಾಫಿಡನ್]] #[[ಬಾನು ಮುಷ್ತಾಕ್]] #[[ಬೊಜೋಮಾ ಸೇಂಟ್ ಜಾನ್]] #[[ಕ್ರಿಸ್ಟೀನ್ ಅಮೊಕೊ-ನುಆಮಾ]] #[[ಈವಾ ಎಸ್ಟ್ರಾಡಾ ಕಲಾವ್]] #[[ಫುಂಕೆ ಒಪೆಕೆ]] #[[ಗ್ಲಾಡಿಸ್ ವೆಸ್ಟ್]] #[[ಕಿಂಬರ್ಲಿ ಬ್ರಯಾಂಟ್ (ತಂತ್ರಜ್ಞ)]] #[[ಲೀನಾ ನಾಯರ್]] #[[ಮಾರಿಯಾ ಕಲಾವ್ ಕಟಿಗ್ಬಾಕ್]] #[[ಎನ್ಗೋಜಿ ಒಕೊಂಜೊ-ಇವಿಯಾಲಾ]] #[[ಸಾಂಡಾ ಒಜಿಯಾಂಬೊ]] #[[ಸಾರಾ ಬಾಮೆ]] #[[ಟಿಮ್ನಿಟ್ ಗೆಬ್ರು]] #[[ವಿಲ್ಮಾ ಸಾಂಟೋಸ್]] #[[ವಾಂಗಾರಿ ಮಾತಾಯ್]] #[[ಜಿಲ್ಲಾ ಬಿಂಗ್-ಥಾರ್ನ್]] </div> </div> <div class="mw-collapsible mw-collapsed"> === ಸುಧಾರಿತ ಲೇಖನಗಳು === <div style="column-count:5"> #[[ಬೆಲ್ ಹುಕ್ಸ್]] #[[ಹ್ಯಾರಿಯೆಟ್ ಟಬ್ಮನ್]] #[[ಮಿಚೆಲ್ ಒಬಾಮಾ]] #[[ಮಾರ್ಗರೆಟ್ ಥ್ಯಾಚರ್]] #[[ಮಿಯಾಜಾ ಅಶೆನಾಫಿ]] #[[ಸಾಹ್ಲೆ-ವರ್ಕ್ ಜೆವ್ಡೆ]] #[[ಯೆವಾಂಡೆ ಅಕಿನೋಲಾ]] #[[ವರ್ಜೀನಿಯಾ ವೂಲ್ಫ್]] #[[ಮ್ಯಾಡಮ್ ಸಿ. ಜೆ. ವಾಕರ್]] #[[ಸ್ಟೆಲ್ಲಾ ಮ್ವಾಂಗಿ]] #[[ಗ್ಯಾಂಬೊ ಸವಾಬಾ]] #[[ಗ್ರೇಸ್ ಒನ್ಯಾಂಗೊ]] #[[ಗ್ಲೋರಿಯಾ ಮಕಾಪಗಲ್-ಅರೊಯೊ]] </div> </div> --- == ಅಭಿಯಾನವನ್ನು ಹಂಚಿಕೊಳ್ಳಿ == === ಪೋಸ್ಟ್ಕಾರ್ಡ್ಗಳು === ಭಾಗವಹಿಸುವಿಕೆಯನ್ನು ಪ್ರೋತ್ಸಾಹಿಸಲು #SheSaid ಪೋಸ್ಟ್ಕಾರ್ಡ್ಗಳನ್ನು ಹಂಚಿಕೊಳ್ಳಿ. <gallery mode="packed-hover" heights="140"> File:SheSaid 2025 Postcards 01.png|ಅಮೀನಾ ಸ್ಬೌಯಿ File:SheSaid 2025 Postcards 02.png|ವಾಂಗಾರಿ ಮಾತಾಯ್ File:SheSaid 2025 Postcards 03.png|ಹೋಡಾ ಖಾಮೋಶ್ File:SheSaid 2025 Postcards 05.png|ಬಿ ಕಿಡುಡೆ </gallery> === ಬುಕ್ಮಾರ್ಕ್ಗಳು === ಅಭಿಯಾನವನ್ನು ಪ್ರಚಾರ ಮಾಡಲು ಮುದ್ರಿಸಬಹುದಾದ ಬುಕ್ಮಾರ್ಕ್ಗಳು. <gallery mode="packed-hover" heights="250"> File:SheSaid 2025 bookmark featuring Amina Sboui.png|ಅಮೀನಾ ಸ್ಬೌಯಿ File:SheSaid 2025 bookmark featuring Hoda Khamosh.png|ಹೋಡಾ ಖಾಮೋಶ್ File:SheSaid 2025 bookmark featuring Lolo Arziki.png|ಲೋಲೋ ಅರ್ಜಿಕಿ File:SheSaid 2025 bookmark featuring Wangari Maathai.png|ವಾಂಗಾರಿ ಮಾತಾಯ್ File:SheSaid 2025 bookmark featuring Bi Kidude.png|ಬಿ ಕಿಡುಡೆ </gallery> ನಿಮ್ಮದೇ ಆದದನ್ನು ರಚಿಸಲು ಸಹಾಯಕ್ಕಾಗಿ, [[m:User:Afek91]] ಅನ್ನು ಸಂಪರ್ಕಿಸಿ. --- == ಪ್ರಭಾವ == ೨೦೨೦ರಲ್ಲಿ ಪ್ರಾರಂಭವಾದಾಗಿನಿಂದ, '''#SheSaid''': * ೨೫ ಕ್ಕೂ ಹೆಚ್ಚು ಭಾಷೆಗಳಲ್ಲಿ ಭಾಗವಹಿಸುವಿಕೆಯನ್ನು ಪ್ರೇರೇಪಿಸಿದೆ * ಮಹಿಳೆಯರ ಬಗ್ಗೆ ೩,೦೦೦ ಕ್ಕೂ ಹೆಚ್ಚು ವಿಕಿಕೋಟ್ ಲೇಖನಗಳನ್ನು ರಚಿಸಿದೆ ಅಥವಾ ಸುಧಾರಿಸಿದೆ * ಜಾಗತಿಕವಾಗಿ ನೂರಾರು ಕೊಡುಗೆದಾರರನ್ನು ತೊಡಗಿಸಿಕೊಂಡಿದೆ --- == ಪ್ರಶ್ನೆಗಳೇ? == ಸಹಾಯ, ಪ್ರತಿಕ್ರಿಯೆ, ಅಥವಾ ಸಲಹೆಗಳಿಗಾಗಿ [[q:Wikiquote talk:SheSaid|ಚರ್ಚಾ ಪುಟವನ್ನು]] ಬಳಸಿ. ಹೊಸ ಚರ್ಚಾವನ್ನು ಪ್ರಾರಂಭಿಸಲು ಮೇಲ್ಭಾಗದಲ್ಲಿ '''Add topic''' ಕ್ಲಿಕ್ ಮಾಡಿ. [[Category:ಅವಳ_ಮಾತು| ]] baonh8x2bkklc4vryq7mtyapkx3hm5j 15645 15644 2026-08-22T11:15:07Z A826 1864 Cleaned up using [[WP:AutoEd|AutoEd]] 15645 wikitext text/x-wiki {{SheSaid menu}} == ಅಭಿಯಾನದ ಬಗ್ಗೆ == [[File:Official WLW Logo in Africa.svg|thumb|right|150px|[[m:Wiki Loves Women|ವಿಕಿ ಲವ್ಸ್ ವುಮೆನ್]] ಲಾಂಛನ]] '''#SheSaid''' ಅಭಿಯಾನವು [[m:Wiki Loves Women|ವಿಕಿ ಲವ್ಸ್ ವುಮೆನ್]] ಉಪಕ್ರಮದ ಭಾಗವಾಗಿದೆ. '''ಅಕ್ಟೋಬರ್ ೨೦, ೨೦೨೦''' ರಂದು ಪ್ರಾರಂಭವಾದ ಈ ಯೋಜನೆಯು ಮಹಿಳೆಯರ ಉಲ್ಲೇಖಗಳನ್ನು ಒಳಗೊಂಡ ವಿಕಿಕೋಟ್ ಲೇಖನಗಳನ್ನು ರಚಿಸಲು ಮತ್ತು ಸುಧಾರಿಸಲು ಪ್ರೋತ್ಸಾಹಿಸುವ ಮೂಲಕ ಪ್ರಮುಖ ಮಹಿಳೆಯರನ್ನು ಮತ್ತು ಅವರ ಧ್ವನಿಗಳನ್ನು ಆಚರಿಸುತ್ತದೆ. ಈ ಅಭಿಯಾನದ ಉದ್ದೇಶಗಳು: * ವಿಕಿಕೋಟ್ ನಲ್ಲಿ ಗಮನಾರ್ಹ ಮಹಿಳೆಯರ ಗೋಚರತೆಯನ್ನು ಹೆಚ್ಚಿಸುವುದು * ಜಾಗತಿಕವಾಗಿ ಮಹಿಳೆಯರ ಧ್ವನಿಗಳನ್ನು ವರ್ಧಿಸುವುದು * ಬಹುಭಾಷೆಗಳಲ್ಲಿ ಭಾಗವಹಿಸುವಿಕೆಯನ್ನು ಪ್ರೇರೇಪಿಸುವುದು ಭಾಗವಹಿಸಲು, ಒಂದು ವಿಕಿಕೋಟ್ ಲೇಖನವನ್ನು ರಚಿಸಿ ಅಥವಾ ಸುಧಾರಿಸಿ ಮತ್ತು ನೀವು '''ಪ್ರಕಟಿಸುವ''' ಮೊದಲು ನಿಮ್ಮ ಸಂಪಾದನೆಯ ಸಾರಾಂಶದಲ್ಲಿ '''#SheSaid''' ಸೇರಿಸಿ. ಕೇಂದ್ರ ಸಮನ್ವಯ: [[m:Wiki Loves Women/SheSaid|ಮೆಟಾದಲ್ಲಿ ವಿಕಿ ಲವ್ಸ್ ವುಮೆನ್/ಶೀಸೇಡ್]]. '''೨೦೨೬ರ ಶೀಸೇಡ್ ಅಭಿಯಾನವು ಈಗ ಪ್ರಾರಂಭವಾಗಿದೆ!''' {{Notice|ನಿಮ್ಮನ್ನು ಕೊಡುಗೆದಾರರ ಪಟ್ಟಿಗೆ ಸೇರಿಸಲು ಯಾವುದೇ ಸಮಸ್ಯೆಗಳು ಎದುರಾದರೆ, ದಯವಿಟ್ಟು [[q:Wikiquote talk:SheSaid]] ಗೆ ಪೋಸ್ಟ್ ಮಾಡಿ. ಎಲ್ಲರೂ ಸ್ವಾಗತ ಮತ್ತು ಕೊಡುಗೆ ನೀಡಲು ಸ್ವಾಗತ!}} '''ಎಲ್ಲಾ ಭಾಷೆಗಳು:''' [[q:Wikiquote:SheSaid/2026|೨೦೨೬ರ ಫಲಿತಾಂಶಗಳನ್ನು ಇಲ್ಲಿ ವೀಕ್ಷಿಸಿ]] == ಸ್ಥಳೀಯ ವಿಕಿಕೋಟ್ ಪೋರ್ಟಲ್ಗಳು == ಈ ಅಭಿಯಾನವು ಬಹು ಭಾಷೆಗಳು ಮತ್ತು ಪ್ರದೇಶಗಳಲ್ಲಿ ನಡೆಯುತ್ತದೆ. ಕೆಳಗಿನ ನಿಮ್ಮ ಸ್ಥಳೀಯ ಆವೃತ್ತಿಯನ್ನು ಅನ್ವೇಷಿಸಿ: * [[q:ar:ويكي الاقتباس:قالت|ಅರೇಬಿಕ್]] * [[q:as:ৱিকিউদ্ধৃতি:আইদেউৰ বাণী|ಅಸ್ಸಾಮೀಸ್]] * [[q:bjn:Wikipapadah:SheSaid|ಬಂಜಾರ್]] * [[q:bn:উইকিউক্তি:নারীবাণী|ಬೆಂಗಾಲಿ]] * [[q:ca:Viquidites:SheSaid|ಕೆಟಲಾನ್]] * [[q:nl:Wikiquote:SheSaid|ಡಚ್]] * [[q:en:Wikiquote:SheSaid|ಇಂಗ್ಲೀಷ್]] * [[q:fat:Krataafa Tsitsir|ಫ್ಯಾಂಟೆ]] (ಇನ್ಕ್ಯುಬೇಟರ್) * [[q:fr:Wikiquote:SheSaid|ಫ್ರೆಂಚ್]] * [[q:de:Wikiquote:SheSaid|ಜರ್ಮನ್]] * [[q:guw:Wikihoyidọ:YọnnuDọ|ಗುಂಗ್ಬೆ]] * [[q:ha:Babban shafi|ಹೌಸಾ]] (ಇನ್ಕ್ಯುಬೇಟರ್) * [[q:ig:Wikikwotu:SheSaid/Redlists|ಇಗ್ಬೊ]] * [[q:it:Wikiquote:SheSaid|ಇಟಾಲಿಯನ್]] * [[q:sr:Викицитат:Кампања SheSaid 2025|ಸರ್ಬಿಯನ್]] * [[q:tn:Tsebe ya konokono|ಸೆಟ್ಸ್ವಾನಾ]] (ಇನ್ಕ್ಯುಬೇಟರ್) * [[q:si:Wikiquote:SheSaid|ಸ್ಲೋವೇನ್]] * [[q:es:Wikiquote:Wiki Loves Women/SheSaid/Ella dice|ಸ್ಪ್ಯಾನಿಷ್]] * [[q:sw:Wikiquote:SheSaid|ಸ್ವಾಹಿಲಿ]] * [[q:te:వికీవ్యాఖ్య:ఆమె చెప్పింది|ತೆಲುಗು]] * [[q:uk:Вікіцитати:Це сказала вона|ಉಕ್ರೇನಿಯನ್]] * [[q:uz:Vikiiqtibos:SheSaid|ಉಜ್ಬೆಕ್]] * [[q:pa:ਵਿਕੀਕਥਨ:SheSaid|ಪಂಜಾಬಿ]] (ಇನ್ಕ್ಯುಬೇಟರ್) * [[q:ml:Wikiquote:SheSaid|ಮಲಯಾಳಂ]] (ಕೇರಳ) * [[q:id:Wikikutip:SheSaid|ಇಂಡೋನೇಷಿಯನ್]] * [[q:sat:ᱣᱤᱠᱤᱠᱳᱴ:SheSaid|ಸಂತಾಲಿ]] (ಇನ್ಕ್ಯುಬೇಟರ್) == ಭಾಗವಹಿಸುವವರು == #SheSaid ೨೦೨೬ ಉಪಕ್ರಮದಲ್ಲಿ ಸೇರಿರುವ ಕೊಡುಗೆದಾರರ ಪಟ್ಟಿ ಕೆಳಗಿದೆ. <small>'''ಸಲಹೆ:''' <code># [[User:ನಿಮ್ಮಹೆಸರು]]</code> ಜೊತೆಗೆ ಪಟ್ಟಿಯ ಕೆಳಭಾಗದಲ್ಲಿ ನಿಮ್ಮ ಬಳಕೆದಾರಹೆಸರನ್ನು ಸೇರಿಸಿ. ನಿಮ್ಮನ್ನು ಸೇರಿಸಲು ಸಮಸ್ಯೆಗಳಿದ್ದರೆ, ದಯವಿಟ್ಟು [[q:Administrators' noticeboard|ನಿರ್ವಾಹಕರಿಗೆ]] ತಿಳಿಸಿ.</small> <div style="column-count:4"> </div> == ಹೇಗೆ ಭಾಗವಹಿಸುವುದು == ನೀವು ಅನೇಕ ವಿಧಗಳಲ್ಲಿ ವಿಕಿಕೋಟ್ನಲ್ಲಿ ಮಹಿಳೆಯರ ಉಪಸ್ಥಿತಿಯನ್ನು ಬಲಪಡಿಸಲು ಸಹಾಯ ಮಾಡಬಹುದು. === ಲೇಖನಗಳನ್ನು ರಚಿಸಿ ಅಥವಾ ಸುಧಾರಿಸಿ === * ಗಮನಾರ್ಹ ಮಹಿಳೆಯರ ಬಗ್ಗೆ ಹೊಸ ವಿಕಿಕೋಟ್ ಪುಟಗಳನ್ನು ಪ್ರಾರಂಭಿಸಿ **→ [[q:Wikiquote:SheSaid/RedLists]] ಅಥವಾ [[q:Wikiquote:SheSaid/SheSaid Africa]] ನೋಡಿ * ಅಸ್ತಿತ್ವದಲ್ಲಿರುವ ಪುಟಗಳನ್ನು ವಿಸ್ತರಿಸಿ ಅಥವಾ ಮೂಲಗಳನ್ನು ಸೇರಿಸಿ **→ <nowiki>{{citation needed}}</nowiki> ಜೊತೆಗೆ ಉಲ್ಲೇಖಗಳನ್ನು ಸೇರಿಸಿ * ಮಹಿಳೆಯರಿಗೆ ಸಂಬಂಧಿಸಿದ ಪ್ರಮುಖ ವಿಷಯಗಳನ್ನು ಸುಧಾರಿಸಿ, ಉದಾಹರಣೆಗೆ: ** [[q:Women]] ** [[q:Gender bias on Wikipedia]] ** [[q:Women and HIV/AIDS]] ** [[q:Sexism]] === ಸಂಘಟಿಸಿ ಮತ್ತು ವರ್ಗೀಕರಿಸಿ === * ಮಹಿಳೆಯರನ್ನು ಸರಿಯಾದ ವರ್ಗಗಳಿಗೆ ಸೇರಿಸಿ, ಉದಾ. [[:ವರ್ಗ:ಮಹಿಳೆಯರು]] ಅಥವಾ [[:ವರ್ಗ:ದೇಶವಾರು ಮಹಿಳೆಯರು]] * ಚಿಕ್ಕ ವರ್ಗಗಳನ್ನು ವಿಲೀನಗೊಳಿಸಿ; ಅಗತ್ಯವಿದ್ದರೆ ಮಾತ್ರ ಹೊಸದನ್ನು ರಚಿಸಿ * ಸಂಬಂಧಿತ ಪುಟಗಳಿಗೆ "ಇದನ್ನೂ ನೋಡಿ" ವಿಭಾಗಗಳನ್ನು ಸೇರಿಸಿ * [[w:wp:magic words|ಮ್ಯಾಜಿಕ್ ಪದಗಳನ್ನು]] ಬಳಸಿ '''DEFAULTSORT''' ಸೇರಿಸಿ === ಚಿತ್ರಗಳನ್ನು ಸೇರಿಸಿ ಅಥವಾ ಸುಧಾರಿಸಿ === * ಮಹಿಳೆಯರ ಫೋಟೋಗಳನ್ನು ಸೇರಿಸಿ ([[q:Image use policy]] ಅನುಸರಿಸಿ) * [[q:SheSaid#Articles in need of a photo|ಫೋಟೋ ಅಗತ್ಯವಿರುವ ಲೇಖನಗಳು]] ನೋಡಿ === ಅಭಿಯಾನವನ್ನು ಪ್ರಚಾರ ಮಾಡಿ === * #SheSaid ಪೋಸ್ಟ್ಕಾರ್ಡ್ಗಳು ಅಥವಾ ಬುಕ್ಮಾರ್ಕ್ಗಳನ್ನು ಹಂಚಿಕೊಳ್ಳಿ (ಕೆಳಗೆ ನೋಡಿ) * #SheSaid ಹ್ಯಾಶ್ಟ್ಯಾಗ್ ಬಳಸಿ ಸಾಮಾಜಿಕ ಮಾಧ್ಯಮದಲ್ಲಿ ಇತರರನ್ನು ಆಹ್ವಾನಿಸಿ == ಟ್ರ್ಯಾಕಿಂಗ್ ಮತ್ತು ಅಂಕಿಅಂಶಗಳು == ನೀವು ಲೈವ್ ಕ್ವಾರಿ ಪ್ರಶ್ನೆಗಳ ಮೂಲಕ ಅಭಿಯಾನದ ಪ್ರಗತಿಯನ್ನು ಟ್ರ್ಯಾಕ್ ಮಾಡಬಹುದು: * [https://quarry.wmcloud.org/query/97166 ಹೊಸ #SheSaid ಲೇಖನಗಳು (೨೦೨೫)] * [https://quarry.wmcloud.org/query/97167 ಸುಧಾರಿತ #SheSaid ಲೇಖನಗಳು (೨೦೨೫)] * [https://quarry.wmcloud.org/query/97168 ಹೊಸ ಲೇಖನಗಳು (ಕಳೆದ ಎರಡು ವಾರಗಳು)] ಎಲ್ಲಾ ಹೊಸ ಪುಟಗಳನ್ನು ನೋಡಿ: [https://kn.wikiquote.org/wiki/Special:NewPages Special:NewPages] == ೨೦೨೫ರಲ್ಲಿ ರಚಿಸಲಾದ ಅಥವಾ ಸುಧಾರಿಸಲಾದ ಲೇಖನಗಳು == [https://meta.wikimedia.org/wiki/Wiki_Loves_Women/SheSaid/Resources_and_Tools ಸಂಪೂರ್ಣ ಸಂಪನ್ಮೂಲಗಳು ಮತ್ತು ಉಪಕರಣಗಳನ್ನು] ಮತ್ತು ೨೦೨೫ರಲ್ಲಿ ರಚಿಸಲಾದ ಮತ್ತು ಸುಧಾರಿಸಲಾದ ಲೇಖನಗಳ [[q:SheSaid/2025|ಹೆಚ್ಚು ಸಮಗ್ರ ಪಟ್ಟಿಯನ್ನು]] ಪ್ರವೇಶಿಸಿ. <small>ಕೆಳಗೆ ೨೦೨೫ರಲ್ಲಿ ರಚಿಸಲಾದ ಅಥವಾ ಸುಧಾರಿಸಲಾದ ಪುಟಗಳ ಉದಾಹರಣೆಗಳಿವೆ.</small> <div class="mw-collapsible mw-collapsed"> === ಹೊಸ ಲೇಖನಗಳು === <div style="column-count:5"> # [[ಆಡಾ ಎನ್ಡುಕಾ ಒಯೋಮ್]] # [[ಏಂಜೆಲಾ ಅರೆಂಡ್ಟ್ಸ್]] # [[ಆನ್-ಮೇರಿ ಇಮಾಫಿಡನ್]] # [[ಬಾನು ಮುಷ್ತಾಕ್]] # [[ಬೊಜೋಮಾ ಸೇಂಟ್ ಜಾನ್]] # [[ಕ್ರಿಸ್ಟೀನ್ ಅಮೊಕೊ-ನುಆಮಾ]] # [[ಈವಾ ಎಸ್ಟ್ರಾಡಾ ಕಲಾವ್]] # [[ಫುಂಕೆ ಒಪೆಕೆ]] # [[ಗ್ಲಾಡಿಸ್ ವೆಸ್ಟ್]] # [[ಕಿಂಬರ್ಲಿ ಬ್ರಯಾಂಟ್ (ತಂತ್ರಜ್ಞ)]] # [[ಲೀನಾ ನಾಯರ್]] # [[ಮಾರಿಯಾ ಕಲಾವ್ ಕಟಿಗ್ಬಾಕ್]] # [[ಎನ್ಗೋಜಿ ಒಕೊಂಜೊ-ಇವಿಯಾಲಾ]] # [[ಸಾಂಡಾ ಒಜಿಯಾಂಬೊ]] # [[ಸಾರಾ ಬಾಮೆ]] # [[ಟಿಮ್ನಿಟ್ ಗೆಬ್ರು]] # [[ವಿಲ್ಮಾ ಸಾಂಟೋಸ್]] # [[ವಾಂಗಾರಿ ಮಾತಾಯ್]] # [[ಜಿಲ್ಲಾ ಬಿಂಗ್-ಥಾರ್ನ್]] </div> </div> <div class="mw-collapsible mw-collapsed"> === ಸುಧಾರಿತ ಲೇಖನಗಳು === <div style="column-count:5"> # [[ಬೆಲ್ ಹುಕ್ಸ್]] # [[ಹ್ಯಾರಿಯೆಟ್ ಟಬ್ಮನ್]] # [[ಮಿಚೆಲ್ ಒಬಾಮಾ]] # [[ಮಾರ್ಗರೆಟ್ ಥ್ಯಾಚರ್]] # [[ಮಿಯಾಜಾ ಅಶೆನಾಫಿ]] # [[ಸಾಹ್ಲೆ-ವರ್ಕ್ ಜೆವ್ಡೆ]] # [[ಯೆವಾಂಡೆ ಅಕಿನೋಲಾ]] # [[ವರ್ಜೀನಿಯಾ ವೂಲ್ಫ್]] # [[ಮ್ಯಾಡಮ್ ಸಿ. ಜೆ. ವಾಕರ್]] # [[ಸ್ಟೆಲ್ಲಾ ಮ್ವಾಂಗಿ]] # [[ಗ್ಯಾಂಬೊ ಸವಾಬಾ]] # [[ಗ್ರೇಸ್ ಒನ್ಯಾಂಗೊ]] # [[ಗ್ಲೋರಿಯಾ ಮಕಾಪಗಲ್-ಅರೊಯೊ]] </div> </div> == ಅಭಿಯಾನವನ್ನು ಹಂಚಿಕೊಳ್ಳಿ == === ಪೋಸ್ಟ್ಕಾರ್ಡ್ಗಳು === ಭಾಗವಹಿಸುವಿಕೆಯನ್ನು ಪ್ರೋತ್ಸಾಹಿಸಲು #SheSaid ಪೋಸ್ಟ್ಕಾರ್ಡ್ಗಳನ್ನು ಹಂಚಿಕೊಳ್ಳಿ. <gallery mode="packed-hover" heights="140"> File:SheSaid 2025 Postcards 01.png|ಅಮೀನಾ ಸ್ಬೌಯಿ File:SheSaid 2025 Postcards 02.png|ವಾಂಗಾರಿ ಮಾತಾಯ್ File:SheSaid 2025 Postcards 03.png|ಹೋಡಾ ಖಾಮೋಶ್ File:SheSaid 2025 Postcards 05.png|ಬಿ ಕಿಡುಡೆ </gallery> === ಬುಕ್ಮಾರ್ಕ್ಗಳು === ಅಭಿಯಾನವನ್ನು ಪ್ರಚಾರ ಮಾಡಲು ಮುದ್ರಿಸಬಹುದಾದ ಬುಕ್ಮಾರ್ಕ್ಗಳು. <gallery mode="packed-hover" heights="250"> File:SheSaid 2025 bookmark featuring Amina Sboui.png|ಅಮೀನಾ ಸ್ಬೌಯಿ File:SheSaid 2025 bookmark featuring Hoda Khamosh.png|ಹೋಡಾ ಖಾಮೋಶ್ File:SheSaid 2025 bookmark featuring Lolo Arziki.png|ಲೋಲೋ ಅರ್ಜಿಕಿ File:SheSaid 2025 bookmark featuring Wangari Maathai.png|ವಾಂಗಾರಿ ಮಾತಾಯ್ File:SheSaid 2025 bookmark featuring Bi Kidude.png|ಬಿ ಕಿಡುಡೆ </gallery> ನಿಮ್ಮದೇ ಆದದನ್ನು ರಚಿಸಲು ಸಹಾಯಕ್ಕಾಗಿ, [[m:User:Afek91]] ಅನ್ನು ಸಂಪರ್ಕಿಸಿ. == ಪ್ರಭಾವ == ೨೦೨೦ರಲ್ಲಿ ಪ್ರಾರಂಭವಾದಾಗಿನಿಂದ, '''#SheSaid''': * ೨೫ ಕ್ಕೂ ಹೆಚ್ಚು ಭಾಷೆಗಳಲ್ಲಿ ಭಾಗವಹಿಸುವಿಕೆಯನ್ನು ಪ್ರೇರೇಪಿಸಿದೆ * ಮಹಿಳೆಯರ ಬಗ್ಗೆ ೩,೦೦೦ ಕ್ಕೂ ಹೆಚ್ಚು ವಿಕಿಕೋಟ್ ಲೇಖನಗಳನ್ನು ರಚಿಸಿದೆ ಅಥವಾ ಸುಧಾರಿಸಿದೆ * ಜಾಗತಿಕವಾಗಿ ನೂರಾರು ಕೊಡುಗೆದಾರರನ್ನು ತೊಡಗಿಸಿಕೊಂಡಿದೆ == ಪ್ರಶ್ನೆಗಳೇ? == ಸಹಾಯ, ಪ್ರತಿಕ್ರಿಯೆ, ಅಥವಾ ಸಲಹೆಗಳಿಗಾಗಿ [[q:Wikiquote talk:SheSaid|ಚರ್ಚಾ ಪುಟವನ್ನು]] ಬಳಸಿ. ಹೊಸ ಚರ್ಚಾವನ್ನು ಪ್ರಾರಂಭಿಸಲು ಮೇಲ್ಭಾಗದಲ್ಲಿ '''Add topic''' ಕ್ಲಿಕ್ ಮಾಡಿ. [[Category:ಅವಳ ಮಾತು| ]] lekqmemmv7vb22tjs8l1rnygdzeku55 15646 15645 2026-08-22T11:18:56Z A826 1864 /* ಭಾಗವಹಿಸುವವರು */ 15646 wikitext text/x-wiki {{SheSaid menu}} == ಅಭಿಯಾನದ ಬಗ್ಗೆ == [[File:Official WLW Logo in Africa.svg|thumb|right|150px|[[m:Wiki Loves Women|ವಿಕಿ ಲವ್ಸ್ ವುಮೆನ್]] ಲಾಂಛನ]] '''#SheSaid''' ಅಭಿಯಾನವು [[m:Wiki Loves Women|ವಿಕಿ ಲವ್ಸ್ ವುಮೆನ್]] ಉಪಕ್ರಮದ ಭಾಗವಾಗಿದೆ. '''ಅಕ್ಟೋಬರ್ ೨೦, ೨೦೨೦''' ರಂದು ಪ್ರಾರಂಭವಾದ ಈ ಯೋಜನೆಯು ಮಹಿಳೆಯರ ಉಲ್ಲೇಖಗಳನ್ನು ಒಳಗೊಂಡ ವಿಕಿಕೋಟ್ ಲೇಖನಗಳನ್ನು ರಚಿಸಲು ಮತ್ತು ಸುಧಾರಿಸಲು ಪ್ರೋತ್ಸಾಹಿಸುವ ಮೂಲಕ ಪ್ರಮುಖ ಮಹಿಳೆಯರನ್ನು ಮತ್ತು ಅವರ ಧ್ವನಿಗಳನ್ನು ಆಚರಿಸುತ್ತದೆ. ಈ ಅಭಿಯಾನದ ಉದ್ದೇಶಗಳು: * ವಿಕಿಕೋಟ್ ನಲ್ಲಿ ಗಮನಾರ್ಹ ಮಹಿಳೆಯರ ಗೋಚರತೆಯನ್ನು ಹೆಚ್ಚಿಸುವುದು * ಜಾಗತಿಕವಾಗಿ ಮಹಿಳೆಯರ ಧ್ವನಿಗಳನ್ನು ವರ್ಧಿಸುವುದು * ಬಹುಭಾಷೆಗಳಲ್ಲಿ ಭಾಗವಹಿಸುವಿಕೆಯನ್ನು ಪ್ರೇರೇಪಿಸುವುದು ಭಾಗವಹಿಸಲು, ಒಂದು ವಿಕಿಕೋಟ್ ಲೇಖನವನ್ನು ರಚಿಸಿ ಅಥವಾ ಸುಧಾರಿಸಿ ಮತ್ತು ನೀವು '''ಪ್ರಕಟಿಸುವ''' ಮೊದಲು ನಿಮ್ಮ ಸಂಪಾದನೆಯ ಸಾರಾಂಶದಲ್ಲಿ '''#SheSaid''' ಸೇರಿಸಿ. ಕೇಂದ್ರ ಸಮನ್ವಯ: [[m:Wiki Loves Women/SheSaid|ಮೆಟಾದಲ್ಲಿ ವಿಕಿ ಲವ್ಸ್ ವುಮೆನ್/ಶೀಸೇಡ್]]. '''೨೦೨೬ರ ಶೀಸೇಡ್ ಅಭಿಯಾನವು ಈಗ ಪ್ರಾರಂಭವಾಗಿದೆ!''' {{Notice|ನಿಮ್ಮನ್ನು ಕೊಡುಗೆದಾರರ ಪಟ್ಟಿಗೆ ಸೇರಿಸಲು ಯಾವುದೇ ಸಮಸ್ಯೆಗಳು ಎದುರಾದರೆ, ದಯವಿಟ್ಟು [[q:Wikiquote talk:SheSaid]] ಗೆ ಪೋಸ್ಟ್ ಮಾಡಿ. ಎಲ್ಲರೂ ಸ್ವಾಗತ ಮತ್ತು ಕೊಡುಗೆ ನೀಡಲು ಸ್ವಾಗತ!}} '''ಎಲ್ಲಾ ಭಾಷೆಗಳು:''' [[q:Wikiquote:SheSaid/2026|೨೦೨೬ರ ಫಲಿತಾಂಶಗಳನ್ನು ಇಲ್ಲಿ ವೀಕ್ಷಿಸಿ]] == ಸ್ಥಳೀಯ ವಿಕಿಕೋಟ್ ಪೋರ್ಟಲ್ಗಳು == ಈ ಅಭಿಯಾನವು ಬಹು ಭಾಷೆಗಳು ಮತ್ತು ಪ್ರದೇಶಗಳಲ್ಲಿ ನಡೆಯುತ್ತದೆ. ಕೆಳಗಿನ ನಿಮ್ಮ ಸ್ಥಳೀಯ ಆವೃತ್ತಿಯನ್ನು ಅನ್ವೇಷಿಸಿ: * [[q:ar:ويكي الاقتباس:قالت|ಅರೇಬಿಕ್]] * [[q:as:ৱিকিউদ্ধৃতি:আইদেউৰ বাণী|ಅಸ್ಸಾಮೀಸ್]] * [[q:bjn:Wikipapadah:SheSaid|ಬಂಜಾರ್]] * [[q:bn:উইকিউক্তি:নারীবাণী|ಬೆಂಗಾಲಿ]] * [[q:ca:Viquidites:SheSaid|ಕೆಟಲಾನ್]] * [[q:nl:Wikiquote:SheSaid|ಡಚ್]] * [[q:en:Wikiquote:SheSaid|ಇಂಗ್ಲೀಷ್]] * [[q:fat:Krataafa Tsitsir|ಫ್ಯಾಂಟೆ]] (ಇನ್ಕ್ಯುಬೇಟರ್) * [[q:fr:Wikiquote:SheSaid|ಫ್ರೆಂಚ್]] * [[q:de:Wikiquote:SheSaid|ಜರ್ಮನ್]] * [[q:guw:Wikihoyidọ:YọnnuDọ|ಗುಂಗ್ಬೆ]] * [[q:ha:Babban shafi|ಹೌಸಾ]] (ಇನ್ಕ್ಯುಬೇಟರ್) * [[q:ig:Wikikwotu:SheSaid/Redlists|ಇಗ್ಬೊ]] * [[q:it:Wikiquote:SheSaid|ಇಟಾಲಿಯನ್]] * [[q:sr:Викицитат:Кампања SheSaid 2025|ಸರ್ಬಿಯನ್]] * [[q:tn:Tsebe ya konokono|ಸೆಟ್ಸ್ವಾನಾ]] (ಇನ್ಕ್ಯುಬೇಟರ್) * [[q:si:Wikiquote:SheSaid|ಸ್ಲೋವೇನ್]] * [[q:es:Wikiquote:Wiki Loves Women/SheSaid/Ella dice|ಸ್ಪ್ಯಾನಿಷ್]] * [[q:sw:Wikiquote:SheSaid|ಸ್ವಾಹಿಲಿ]] * [[q:te:వికీవ్యాఖ్య:ఆమె చెప్పింది|ತೆಲುಗು]] * [[q:uk:Вікіцитати:Це сказала вона|ಉಕ್ರೇನಿಯನ್]] * [[q:uz:Vikiiqtibos:SheSaid|ಉಜ್ಬೆಕ್]] * [[q:pa:ਵਿਕੀਕਥਨ:SheSaid|ಪಂಜಾಬಿ]] (ಇನ್ಕ್ಯುಬೇಟರ್) * [[q:ml:Wikiquote:SheSaid|ಮಲಯಾಳಂ]] (ಕೇರಳ) * [[q:id:Wikikutip:SheSaid|ಇಂಡೋನೇಷಿಯನ್]] * [[q:sat:ᱣᱤᱠᱤᱠᱳᱴ:SheSaid|ಸಂತಾಲಿ]] (ಇನ್ಕ್ಯುಬೇಟರ್) == ಭಾಗವಹಿಸುವವರು == - #SheSaid ೨೦೨೬ ದಲ್ಲಿ ಸೇರಿರುವ ಕೊಡುಗೆದಾರರ ಪಟ್ಟಿ ಕೆಳಗಿದೆ. <small>'''ಸಲಹೆ:''' <code># [[User:ನಿಮ್ಮಹೆಸರು]]</code> ಜೊತೆಗೆ ಪಟ್ಟಿಯ ಕೆಳಭಾಗದಲ್ಲಿ ನಿಮ್ಮ ಬಳಕೆದಾರಹೆಸರನ್ನು ಸೇರಿಸಿ. ನಿಮ್ಮನ್ನು ಸೇರಿಸಲು ಸಮಸ್ಯೆಗಳಿದ್ದರೆ, ದಯವಿಟ್ಟು [[q:Administrators' noticeboard|ನಿರ್ವಾಹಕರಿಗೆ]] ತಿಳಿಸಿ.</small> <div style="column-count:4"> </div> == ಹೇಗೆ ಭಾಗವಹಿಸುವುದು == ನೀವು ಅನೇಕ ವಿಧಗಳಲ್ಲಿ ವಿಕಿಕೋಟ್ನಲ್ಲಿ ಮಹಿಳೆಯರ ಉಪಸ್ಥಿತಿಯನ್ನು ಬಲಪಡಿಸಲು ಸಹಾಯ ಮಾಡಬಹುದು. === ಲೇಖನಗಳನ್ನು ರಚಿಸಿ ಅಥವಾ ಸುಧಾರಿಸಿ === * ಗಮನಾರ್ಹ ಮಹಿಳೆಯರ ಬಗ್ಗೆ ಹೊಸ ವಿಕಿಕೋಟ್ ಪುಟಗಳನ್ನು ಪ್ರಾರಂಭಿಸಿ **→ [[q:Wikiquote:SheSaid/RedLists]] ಅಥವಾ [[q:Wikiquote:SheSaid/SheSaid Africa]] ನೋಡಿ * ಅಸ್ತಿತ್ವದಲ್ಲಿರುವ ಪುಟಗಳನ್ನು ವಿಸ್ತರಿಸಿ ಅಥವಾ ಮೂಲಗಳನ್ನು ಸೇರಿಸಿ **→ <nowiki>{{citation needed}}</nowiki> ಜೊತೆಗೆ ಉಲ್ಲೇಖಗಳನ್ನು ಸೇರಿಸಿ * ಮಹಿಳೆಯರಿಗೆ ಸಂಬಂಧಿಸಿದ ಪ್ರಮುಖ ವಿಷಯಗಳನ್ನು ಸುಧಾರಿಸಿ, ಉದಾಹರಣೆಗೆ: ** [[q:Women]] ** [[q:Gender bias on Wikipedia]] ** [[q:Women and HIV/AIDS]] ** [[q:Sexism]] === ಸಂಘಟಿಸಿ ಮತ್ತು ವರ್ಗೀಕರಿಸಿ === * ಮಹಿಳೆಯರನ್ನು ಸರಿಯಾದ ವರ್ಗಗಳಿಗೆ ಸೇರಿಸಿ, ಉದಾ. [[:ವರ್ಗ:ಮಹಿಳೆಯರು]] ಅಥವಾ [[:ವರ್ಗ:ದೇಶವಾರು ಮಹಿಳೆಯರು]] * ಚಿಕ್ಕ ವರ್ಗಗಳನ್ನು ವಿಲೀನಗೊಳಿಸಿ; ಅಗತ್ಯವಿದ್ದರೆ ಮಾತ್ರ ಹೊಸದನ್ನು ರಚಿಸಿ * ಸಂಬಂಧಿತ ಪುಟಗಳಿಗೆ "ಇದನ್ನೂ ನೋಡಿ" ವಿಭಾಗಗಳನ್ನು ಸೇರಿಸಿ * [[w:wp:magic words|ಮ್ಯಾಜಿಕ್ ಪದಗಳನ್ನು]] ಬಳಸಿ '''DEFAULTSORT''' ಸೇರಿಸಿ === ಚಿತ್ರಗಳನ್ನು ಸೇರಿಸಿ ಅಥವಾ ಸುಧಾರಿಸಿ === * ಮಹಿಳೆಯರ ಫೋಟೋಗಳನ್ನು ಸೇರಿಸಿ ([[q:Image use policy]] ಅನುಸರಿಸಿ) * [[q:SheSaid#Articles in need of a photo|ಫೋಟೋ ಅಗತ್ಯವಿರುವ ಲೇಖನಗಳು]] ನೋಡಿ === ಅಭಿಯಾನವನ್ನು ಪ್ರಚಾರ ಮಾಡಿ === * #SheSaid ಪೋಸ್ಟ್ಕಾರ್ಡ್ಗಳು ಅಥವಾ ಬುಕ್ಮಾರ್ಕ್ಗಳನ್ನು ಹಂಚಿಕೊಳ್ಳಿ (ಕೆಳಗೆ ನೋಡಿ) * #SheSaid ಹ್ಯಾಶ್ಟ್ಯಾಗ್ ಬಳಸಿ ಸಾಮಾಜಿಕ ಮಾಧ್ಯಮದಲ್ಲಿ ಇತರರನ್ನು ಆಹ್ವಾನಿಸಿ == ಟ್ರ್ಯಾಕಿಂಗ್ ಮತ್ತು ಅಂಕಿಅಂಶಗಳು == ನೀವು ಲೈವ್ ಕ್ವಾರಿ ಪ್ರಶ್ನೆಗಳ ಮೂಲಕ ಅಭಿಯಾನದ ಪ್ರಗತಿಯನ್ನು ಟ್ರ್ಯಾಕ್ ಮಾಡಬಹುದು: * [https://quarry.wmcloud.org/query/97166 ಹೊಸ #SheSaid ಲೇಖನಗಳು (೨೦೨೫)] * [https://quarry.wmcloud.org/query/97167 ಸುಧಾರಿತ #SheSaid ಲೇಖನಗಳು (೨೦೨೫)] * [https://quarry.wmcloud.org/query/97168 ಹೊಸ ಲೇಖನಗಳು (ಕಳೆದ ಎರಡು ವಾರಗಳು)] ಎಲ್ಲಾ ಹೊಸ ಪುಟಗಳನ್ನು ನೋಡಿ: [https://kn.wikiquote.org/wiki/Special:NewPages Special:NewPages] == ೨೦೨೫ರಲ್ಲಿ ರಚಿಸಲಾದ ಅಥವಾ ಸುಧಾರಿಸಲಾದ ಲೇಖನಗಳು == [https://meta.wikimedia.org/wiki/Wiki_Loves_Women/SheSaid/Resources_and_Tools ಸಂಪೂರ್ಣ ಸಂಪನ್ಮೂಲಗಳು ಮತ್ತು ಉಪಕರಣಗಳನ್ನು] ಮತ್ತು ೨೦೨೫ರಲ್ಲಿ ರಚಿಸಲಾದ ಮತ್ತು ಸುಧಾರಿಸಲಾದ ಲೇಖನಗಳ [[q:SheSaid/2025|ಹೆಚ್ಚು ಸಮಗ್ರ ಪಟ್ಟಿಯನ್ನು]] ಪ್ರವೇಶಿಸಿ. <small>ಕೆಳಗೆ ೨೦೨೫ರಲ್ಲಿ ರಚಿಸಲಾದ ಅಥವಾ ಸುಧಾರಿಸಲಾದ ಪುಟಗಳ ಉದಾಹರಣೆಗಳಿವೆ.</small> <div class="mw-collapsible mw-collapsed"> === ಹೊಸ ಲೇಖನಗಳು === <div style="column-count:5"> # [[ಆಡಾ ಎನ್ಡುಕಾ ಒಯೋಮ್]] # [[ಏಂಜೆಲಾ ಅರೆಂಡ್ಟ್ಸ್]] # [[ಆನ್-ಮೇರಿ ಇಮಾಫಿಡನ್]] # [[ಬಾನು ಮುಷ್ತಾಕ್]] # [[ಬೊಜೋಮಾ ಸೇಂಟ್ ಜಾನ್]] # [[ಕ್ರಿಸ್ಟೀನ್ ಅಮೊಕೊ-ನುಆಮಾ]] # [[ಈವಾ ಎಸ್ಟ್ರಾಡಾ ಕಲಾವ್]] # [[ಫುಂಕೆ ಒಪೆಕೆ]] # [[ಗ್ಲಾಡಿಸ್ ವೆಸ್ಟ್]] # [[ಕಿಂಬರ್ಲಿ ಬ್ರಯಾಂಟ್ (ತಂತ್ರಜ್ಞ)]] # [[ಲೀನಾ ನಾಯರ್]] # [[ಮಾರಿಯಾ ಕಲಾವ್ ಕಟಿಗ್ಬಾಕ್]] # [[ಎನ್ಗೋಜಿ ಒಕೊಂಜೊ-ಇವಿಯಾಲಾ]] # [[ಸಾಂಡಾ ಒಜಿಯಾಂಬೊ]] # [[ಸಾರಾ ಬಾಮೆ]] # [[ಟಿಮ್ನಿಟ್ ಗೆಬ್ರು]] # [[ವಿಲ್ಮಾ ಸಾಂಟೋಸ್]] # [[ವಾಂಗಾರಿ ಮಾತಾಯ್]] # [[ಜಿಲ್ಲಾ ಬಿಂಗ್-ಥಾರ್ನ್]] </div> </div> <div class="mw-collapsible mw-collapsed"> === ಸುಧಾರಿತ ಲೇಖನಗಳು === <div style="column-count:5"> # [[ಬೆಲ್ ಹುಕ್ಸ್]] # [[ಹ್ಯಾರಿಯೆಟ್ ಟಬ್ಮನ್]] # [[ಮಿಚೆಲ್ ಒಬಾಮಾ]] # [[ಮಾರ್ಗರೆಟ್ ಥ್ಯಾಚರ್]] # [[ಮಿಯಾಜಾ ಅಶೆನಾಫಿ]] # [[ಸಾಹ್ಲೆ-ವರ್ಕ್ ಜೆವ್ಡೆ]] # [[ಯೆವಾಂಡೆ ಅಕಿನೋಲಾ]] # [[ವರ್ಜೀನಿಯಾ ವೂಲ್ಫ್]] # [[ಮ್ಯಾಡಮ್ ಸಿ. ಜೆ. ವಾಕರ್]] # [[ಸ್ಟೆಲ್ಲಾ ಮ್ವಾಂಗಿ]] # [[ಗ್ಯಾಂಬೊ ಸವಾಬಾ]] # [[ಗ್ರೇಸ್ ಒನ್ಯಾಂಗೊ]] # [[ಗ್ಲೋರಿಯಾ ಮಕಾಪಗಲ್-ಅರೊಯೊ]] </div> </div> == ಅಭಿಯಾನವನ್ನು ಹಂಚಿಕೊಳ್ಳಿ == === ಪೋಸ್ಟ್ಕಾರ್ಡ್ಗಳು === ಭಾಗವಹಿಸುವಿಕೆಯನ್ನು ಪ್ರೋತ್ಸಾಹಿಸಲು #SheSaid ಪೋಸ್ಟ್ಕಾರ್ಡ್ಗಳನ್ನು ಹಂಚಿಕೊಳ್ಳಿ. <gallery mode="packed-hover" heights="140"> File:SheSaid 2025 Postcards 01.png|ಅಮೀನಾ ಸ್ಬೌಯಿ File:SheSaid 2025 Postcards 02.png|ವಾಂಗಾರಿ ಮಾತಾಯ್ File:SheSaid 2025 Postcards 03.png|ಹೋಡಾ ಖಾಮೋಶ್ File:SheSaid 2025 Postcards 05.png|ಬಿ ಕಿಡುಡೆ </gallery> === ಬುಕ್ಮಾರ್ಕ್ಗಳು === ಅಭಿಯಾನವನ್ನು ಪ್ರಚಾರ ಮಾಡಲು ಮುದ್ರಿಸಬಹುದಾದ ಬುಕ್ಮಾರ್ಕ್ಗಳು. <gallery mode="packed-hover" heights="250"> File:SheSaid 2025 bookmark featuring Amina Sboui.png|ಅಮೀನಾ ಸ್ಬೌಯಿ File:SheSaid 2025 bookmark featuring Hoda Khamosh.png|ಹೋಡಾ ಖಾಮೋಶ್ File:SheSaid 2025 bookmark featuring Lolo Arziki.png|ಲೋಲೋ ಅರ್ಜಿಕಿ File:SheSaid 2025 bookmark featuring Wangari Maathai.png|ವಾಂಗಾರಿ ಮಾತಾಯ್ File:SheSaid 2025 bookmark featuring Bi Kidude.png|ಬಿ ಕಿಡುಡೆ </gallery> ನಿಮ್ಮದೇ ಆದದನ್ನು ರಚಿಸಲು ಸಹಾಯಕ್ಕಾಗಿ, [[m:User:Afek91]] ಅನ್ನು ಸಂಪರ್ಕಿಸಿ. == ಪ್ರಭಾವ == ೨೦೨೦ರಲ್ಲಿ ಪ್ರಾರಂಭವಾದಾಗಿನಿಂದ, '''#SheSaid''': * ೨೫ ಕ್ಕೂ ಹೆಚ್ಚು ಭಾಷೆಗಳಲ್ಲಿ ಭಾಗವಹಿಸುವಿಕೆಯನ್ನು ಪ್ರೇರೇಪಿಸಿದೆ * ಮಹಿಳೆಯರ ಬಗ್ಗೆ ೩,೦೦೦ ಕ್ಕೂ ಹೆಚ್ಚು ವಿಕಿಕೋಟ್ ಲೇಖನಗಳನ್ನು ರಚಿಸಿದೆ ಅಥವಾ ಸುಧಾರಿಸಿದೆ * ಜಾಗತಿಕವಾಗಿ ನೂರಾರು ಕೊಡುಗೆದಾರರನ್ನು ತೊಡಗಿಸಿಕೊಂಡಿದೆ == ಪ್ರಶ್ನೆಗಳೇ? == ಸಹಾಯ, ಪ್ರತಿಕ್ರಿಯೆ, ಅಥವಾ ಸಲಹೆಗಳಿಗಾಗಿ [[q:Wikiquote talk:SheSaid|ಚರ್ಚಾ ಪುಟವನ್ನು]] ಬಳಸಿ. ಹೊಸ ಚರ್ಚಾವನ್ನು ಪ್ರಾರಂಭಿಸಲು ಮೇಲ್ಭಾಗದಲ್ಲಿ '''Add topic''' ಕ್ಲಿಕ್ ಮಾಡಿ. [[Category:ಅವಳ ಮಾತು| ]] c15u2063yydj61k28qykozd3p7pvf26 15647 15646 2026-08-22T11:19:20Z A826 1864 A826 moved page [[ವಿಕಿಕೋಟ್:ಅವಳ ಮಾತು]] to [[ವಿಕಿಕೋಟ್:ಅವಳ-ಮಾತು]] without leaving a redirect 15646 wikitext text/x-wiki {{SheSaid menu}} == ಅಭಿಯಾನದ ಬಗ್ಗೆ == [[File:Official WLW Logo in Africa.svg|thumb|right|150px|[[m:Wiki Loves Women|ವಿಕಿ ಲವ್ಸ್ ವುಮೆನ್]] ಲಾಂಛನ]] '''#SheSaid''' ಅಭಿಯಾನವು [[m:Wiki Loves Women|ವಿಕಿ ಲವ್ಸ್ ವುಮೆನ್]] ಉಪಕ್ರಮದ ಭಾಗವಾಗಿದೆ. '''ಅಕ್ಟೋಬರ್ ೨೦, ೨೦೨೦''' ರಂದು ಪ್ರಾರಂಭವಾದ ಈ ಯೋಜನೆಯು ಮಹಿಳೆಯರ ಉಲ್ಲೇಖಗಳನ್ನು ಒಳಗೊಂಡ ವಿಕಿಕೋಟ್ ಲೇಖನಗಳನ್ನು ರಚಿಸಲು ಮತ್ತು ಸುಧಾರಿಸಲು ಪ್ರೋತ್ಸಾಹಿಸುವ ಮೂಲಕ ಪ್ರಮುಖ ಮಹಿಳೆಯರನ್ನು ಮತ್ತು ಅವರ ಧ್ವನಿಗಳನ್ನು ಆಚರಿಸುತ್ತದೆ. ಈ ಅಭಿಯಾನದ ಉದ್ದೇಶಗಳು: * ವಿಕಿಕೋಟ್ ನಲ್ಲಿ ಗಮನಾರ್ಹ ಮಹಿಳೆಯರ ಗೋಚರತೆಯನ್ನು ಹೆಚ್ಚಿಸುವುದು * ಜಾಗತಿಕವಾಗಿ ಮಹಿಳೆಯರ ಧ್ವನಿಗಳನ್ನು ವರ್ಧಿಸುವುದು * ಬಹುಭಾಷೆಗಳಲ್ಲಿ ಭಾಗವಹಿಸುವಿಕೆಯನ್ನು ಪ್ರೇರೇಪಿಸುವುದು ಭಾಗವಹಿಸಲು, ಒಂದು ವಿಕಿಕೋಟ್ ಲೇಖನವನ್ನು ರಚಿಸಿ ಅಥವಾ ಸುಧಾರಿಸಿ ಮತ್ತು ನೀವು '''ಪ್ರಕಟಿಸುವ''' ಮೊದಲು ನಿಮ್ಮ ಸಂಪಾದನೆಯ ಸಾರಾಂಶದಲ್ಲಿ '''#SheSaid''' ಸೇರಿಸಿ. ಕೇಂದ್ರ ಸಮನ್ವಯ: [[m:Wiki Loves Women/SheSaid|ಮೆಟಾದಲ್ಲಿ ವಿಕಿ ಲವ್ಸ್ ವುಮೆನ್/ಶೀಸೇಡ್]]. '''೨೦೨೬ರ ಶೀಸೇಡ್ ಅಭಿಯಾನವು ಈಗ ಪ್ರಾರಂಭವಾಗಿದೆ!''' {{Notice|ನಿಮ್ಮನ್ನು ಕೊಡುಗೆದಾರರ ಪಟ್ಟಿಗೆ ಸೇರಿಸಲು ಯಾವುದೇ ಸಮಸ್ಯೆಗಳು ಎದುರಾದರೆ, ದಯವಿಟ್ಟು [[q:Wikiquote talk:SheSaid]] ಗೆ ಪೋಸ್ಟ್ ಮಾಡಿ. ಎಲ್ಲರೂ ಸ್ವಾಗತ ಮತ್ತು ಕೊಡುಗೆ ನೀಡಲು ಸ್ವಾಗತ!}} '''ಎಲ್ಲಾ ಭಾಷೆಗಳು:''' [[q:Wikiquote:SheSaid/2026|೨೦೨೬ರ ಫಲಿತಾಂಶಗಳನ್ನು ಇಲ್ಲಿ ವೀಕ್ಷಿಸಿ]] == ಸ್ಥಳೀಯ ವಿಕಿಕೋಟ್ ಪೋರ್ಟಲ್ಗಳು == ಈ ಅಭಿಯಾನವು ಬಹು ಭಾಷೆಗಳು ಮತ್ತು ಪ್ರದೇಶಗಳಲ್ಲಿ ನಡೆಯುತ್ತದೆ. ಕೆಳಗಿನ ನಿಮ್ಮ ಸ್ಥಳೀಯ ಆವೃತ್ತಿಯನ್ನು ಅನ್ವೇಷಿಸಿ: * [[q:ar:ويكي الاقتباس:قالت|ಅರೇಬಿಕ್]] * [[q:as:ৱিকিউদ্ধৃতি:আইদেউৰ বাণী|ಅಸ್ಸಾಮೀಸ್]] * [[q:bjn:Wikipapadah:SheSaid|ಬಂಜಾರ್]] * [[q:bn:উইকিউক্তি:নারীবাণী|ಬೆಂಗಾಲಿ]] * [[q:ca:Viquidites:SheSaid|ಕೆಟಲಾನ್]] * [[q:nl:Wikiquote:SheSaid|ಡಚ್]] * [[q:en:Wikiquote:SheSaid|ಇಂಗ್ಲೀಷ್]] * [[q:fat:Krataafa Tsitsir|ಫ್ಯಾಂಟೆ]] (ಇನ್ಕ್ಯುಬೇಟರ್) * [[q:fr:Wikiquote:SheSaid|ಫ್ರೆಂಚ್]] * [[q:de:Wikiquote:SheSaid|ಜರ್ಮನ್]] * [[q:guw:Wikihoyidọ:YọnnuDọ|ಗುಂಗ್ಬೆ]] * [[q:ha:Babban shafi|ಹೌಸಾ]] (ಇನ್ಕ್ಯುಬೇಟರ್) * [[q:ig:Wikikwotu:SheSaid/Redlists|ಇಗ್ಬೊ]] * [[q:it:Wikiquote:SheSaid|ಇಟಾಲಿಯನ್]] * [[q:sr:Викицитат:Кампања SheSaid 2025|ಸರ್ಬಿಯನ್]] * [[q:tn:Tsebe ya konokono|ಸೆಟ್ಸ್ವಾನಾ]] (ಇನ್ಕ್ಯುಬೇಟರ್) * [[q:si:Wikiquote:SheSaid|ಸ್ಲೋವೇನ್]] * [[q:es:Wikiquote:Wiki Loves Women/SheSaid/Ella dice|ಸ್ಪ್ಯಾನಿಷ್]] * [[q:sw:Wikiquote:SheSaid|ಸ್ವಾಹಿಲಿ]] * [[q:te:వికీవ్యాఖ్య:ఆమె చెప్పింది|ತೆಲುಗು]] * [[q:uk:Вікіцитати:Це сказала вона|ಉಕ್ರೇನಿಯನ್]] * [[q:uz:Vikiiqtibos:SheSaid|ಉಜ್ಬೆಕ್]] * [[q:pa:ਵਿਕੀਕਥਨ:SheSaid|ಪಂಜಾಬಿ]] (ಇನ್ಕ್ಯುಬೇಟರ್) * [[q:ml:Wikiquote:SheSaid|ಮಲಯಾಳಂ]] (ಕೇರಳ) * [[q:id:Wikikutip:SheSaid|ಇಂಡೋನೇಷಿಯನ್]] * [[q:sat:ᱣᱤᱠᱤᱠᱳᱴ:SheSaid|ಸಂತಾಲಿ]] (ಇನ್ಕ್ಯುಬೇಟರ್) == ಭಾಗವಹಿಸುವವರು == - #SheSaid ೨೦೨೬ ದಲ್ಲಿ ಸೇರಿರುವ ಕೊಡುಗೆದಾರರ ಪಟ್ಟಿ ಕೆಳಗಿದೆ. <small>'''ಸಲಹೆ:''' <code># [[User:ನಿಮ್ಮಹೆಸರು]]</code> ಜೊತೆಗೆ ಪಟ್ಟಿಯ ಕೆಳಭಾಗದಲ್ಲಿ ನಿಮ್ಮ ಬಳಕೆದಾರಹೆಸರನ್ನು ಸೇರಿಸಿ. ನಿಮ್ಮನ್ನು ಸೇರಿಸಲು ಸಮಸ್ಯೆಗಳಿದ್ದರೆ, ದಯವಿಟ್ಟು [[q:Administrators' noticeboard|ನಿರ್ವಾಹಕರಿಗೆ]] ತಿಳಿಸಿ.</small> <div style="column-count:4"> </div> == ಹೇಗೆ ಭಾಗವಹಿಸುವುದು == ನೀವು ಅನೇಕ ವಿಧಗಳಲ್ಲಿ ವಿಕಿಕೋಟ್ನಲ್ಲಿ ಮಹಿಳೆಯರ ಉಪಸ್ಥಿತಿಯನ್ನು ಬಲಪಡಿಸಲು ಸಹಾಯ ಮಾಡಬಹುದು. === ಲೇಖನಗಳನ್ನು ರಚಿಸಿ ಅಥವಾ ಸುಧಾರಿಸಿ === * ಗಮನಾರ್ಹ ಮಹಿಳೆಯರ ಬಗ್ಗೆ ಹೊಸ ವಿಕಿಕೋಟ್ ಪುಟಗಳನ್ನು ಪ್ರಾರಂಭಿಸಿ **→ [[q:Wikiquote:SheSaid/RedLists]] ಅಥವಾ [[q:Wikiquote:SheSaid/SheSaid Africa]] ನೋಡಿ * ಅಸ್ತಿತ್ವದಲ್ಲಿರುವ ಪುಟಗಳನ್ನು ವಿಸ್ತರಿಸಿ ಅಥವಾ ಮೂಲಗಳನ್ನು ಸೇರಿಸಿ **→ <nowiki>{{citation needed}}</nowiki> ಜೊತೆಗೆ ಉಲ್ಲೇಖಗಳನ್ನು ಸೇರಿಸಿ * ಮಹಿಳೆಯರಿಗೆ ಸಂಬಂಧಿಸಿದ ಪ್ರಮುಖ ವಿಷಯಗಳನ್ನು ಸುಧಾರಿಸಿ, ಉದಾಹರಣೆಗೆ: ** [[q:Women]] ** [[q:Gender bias on Wikipedia]] ** [[q:Women and HIV/AIDS]] ** [[q:Sexism]] === ಸಂಘಟಿಸಿ ಮತ್ತು ವರ್ಗೀಕರಿಸಿ === * ಮಹಿಳೆಯರನ್ನು ಸರಿಯಾದ ವರ್ಗಗಳಿಗೆ ಸೇರಿಸಿ, ಉದಾ. [[:ವರ್ಗ:ಮಹಿಳೆಯರು]] ಅಥವಾ [[:ವರ್ಗ:ದೇಶವಾರು ಮಹಿಳೆಯರು]] * ಚಿಕ್ಕ ವರ್ಗಗಳನ್ನು ವಿಲೀನಗೊಳಿಸಿ; ಅಗತ್ಯವಿದ್ದರೆ ಮಾತ್ರ ಹೊಸದನ್ನು ರಚಿಸಿ * ಸಂಬಂಧಿತ ಪುಟಗಳಿಗೆ "ಇದನ್ನೂ ನೋಡಿ" ವಿಭಾಗಗಳನ್ನು ಸೇರಿಸಿ * [[w:wp:magic words|ಮ್ಯಾಜಿಕ್ ಪದಗಳನ್ನು]] ಬಳಸಿ '''DEFAULTSORT''' ಸೇರಿಸಿ === ಚಿತ್ರಗಳನ್ನು ಸೇರಿಸಿ ಅಥವಾ ಸುಧಾರಿಸಿ === * ಮಹಿಳೆಯರ ಫೋಟೋಗಳನ್ನು ಸೇರಿಸಿ ([[q:Image use policy]] ಅನುಸರಿಸಿ) * [[q:SheSaid#Articles in need of a photo|ಫೋಟೋ ಅಗತ್ಯವಿರುವ ಲೇಖನಗಳು]] ನೋಡಿ === ಅಭಿಯಾನವನ್ನು ಪ್ರಚಾರ ಮಾಡಿ === * #SheSaid ಪೋಸ್ಟ್ಕಾರ್ಡ್ಗಳು ಅಥವಾ ಬುಕ್ಮಾರ್ಕ್ಗಳನ್ನು ಹಂಚಿಕೊಳ್ಳಿ (ಕೆಳಗೆ ನೋಡಿ) * #SheSaid ಹ್ಯಾಶ್ಟ್ಯಾಗ್ ಬಳಸಿ ಸಾಮಾಜಿಕ ಮಾಧ್ಯಮದಲ್ಲಿ ಇತರರನ್ನು ಆಹ್ವಾನಿಸಿ == ಟ್ರ್ಯಾಕಿಂಗ್ ಮತ್ತು ಅಂಕಿಅಂಶಗಳು == ನೀವು ಲೈವ್ ಕ್ವಾರಿ ಪ್ರಶ್ನೆಗಳ ಮೂಲಕ ಅಭಿಯಾನದ ಪ್ರಗತಿಯನ್ನು ಟ್ರ್ಯಾಕ್ ಮಾಡಬಹುದು: * [https://quarry.wmcloud.org/query/97166 ಹೊಸ #SheSaid ಲೇಖನಗಳು (೨೦೨೫)] * [https://quarry.wmcloud.org/query/97167 ಸುಧಾರಿತ #SheSaid ಲೇಖನಗಳು (೨೦೨೫)] * [https://quarry.wmcloud.org/query/97168 ಹೊಸ ಲೇಖನಗಳು (ಕಳೆದ ಎರಡು ವಾರಗಳು)] ಎಲ್ಲಾ ಹೊಸ ಪುಟಗಳನ್ನು ನೋಡಿ: [https://kn.wikiquote.org/wiki/Special:NewPages Special:NewPages] == ೨೦೨೫ರಲ್ಲಿ ರಚಿಸಲಾದ ಅಥವಾ ಸುಧಾರಿಸಲಾದ ಲೇಖನಗಳು == [https://meta.wikimedia.org/wiki/Wiki_Loves_Women/SheSaid/Resources_and_Tools ಸಂಪೂರ್ಣ ಸಂಪನ್ಮೂಲಗಳು ಮತ್ತು ಉಪಕರಣಗಳನ್ನು] ಮತ್ತು ೨೦೨೫ರಲ್ಲಿ ರಚಿಸಲಾದ ಮತ್ತು ಸುಧಾರಿಸಲಾದ ಲೇಖನಗಳ [[q:SheSaid/2025|ಹೆಚ್ಚು ಸಮಗ್ರ ಪಟ್ಟಿಯನ್ನು]] ಪ್ರವೇಶಿಸಿ. <small>ಕೆಳಗೆ ೨೦೨೫ರಲ್ಲಿ ರಚಿಸಲಾದ ಅಥವಾ ಸುಧಾರಿಸಲಾದ ಪುಟಗಳ ಉದಾಹರಣೆಗಳಿವೆ.</small> <div class="mw-collapsible mw-collapsed"> === ಹೊಸ ಲೇಖನಗಳು === <div style="column-count:5"> # [[ಆಡಾ ಎನ್ಡುಕಾ ಒಯೋಮ್]] # [[ಏಂಜೆಲಾ ಅರೆಂಡ್ಟ್ಸ್]] # [[ಆನ್-ಮೇರಿ ಇಮಾಫಿಡನ್]] # [[ಬಾನು ಮುಷ್ತಾಕ್]] # [[ಬೊಜೋಮಾ ಸೇಂಟ್ ಜಾನ್]] # [[ಕ್ರಿಸ್ಟೀನ್ ಅಮೊಕೊ-ನುಆಮಾ]] # [[ಈವಾ ಎಸ್ಟ್ರಾಡಾ ಕಲಾವ್]] # [[ಫುಂಕೆ ಒಪೆಕೆ]] # [[ಗ್ಲಾಡಿಸ್ ವೆಸ್ಟ್]] # [[ಕಿಂಬರ್ಲಿ ಬ್ರಯಾಂಟ್ (ತಂತ್ರಜ್ಞ)]] # [[ಲೀನಾ ನಾಯರ್]] # [[ಮಾರಿಯಾ ಕಲಾವ್ ಕಟಿಗ್ಬಾಕ್]] # [[ಎನ್ಗೋಜಿ ಒಕೊಂಜೊ-ಇವಿಯಾಲಾ]] # [[ಸಾಂಡಾ ಒಜಿಯಾಂಬೊ]] # [[ಸಾರಾ ಬಾಮೆ]] # [[ಟಿಮ್ನಿಟ್ ಗೆಬ್ರು]] # [[ವಿಲ್ಮಾ ಸಾಂಟೋಸ್]] # [[ವಾಂಗಾರಿ ಮಾತಾಯ್]] # [[ಜಿಲ್ಲಾ ಬಿಂಗ್-ಥಾರ್ನ್]] </div> </div> <div class="mw-collapsible mw-collapsed"> === ಸುಧಾರಿತ ಲೇಖನಗಳು === <div style="column-count:5"> # [[ಬೆಲ್ ಹುಕ್ಸ್]] # [[ಹ್ಯಾರಿಯೆಟ್ ಟಬ್ಮನ್]] # [[ಮಿಚೆಲ್ ಒಬಾಮಾ]] # [[ಮಾರ್ಗರೆಟ್ ಥ್ಯಾಚರ್]] # [[ಮಿಯಾಜಾ ಅಶೆನಾಫಿ]] # [[ಸಾಹ್ಲೆ-ವರ್ಕ್ ಜೆವ್ಡೆ]] # [[ಯೆವಾಂಡೆ ಅಕಿನೋಲಾ]] # [[ವರ್ಜೀನಿಯಾ ವೂಲ್ಫ್]] # [[ಮ್ಯಾಡಮ್ ಸಿ. ಜೆ. ವಾಕರ್]] # [[ಸ್ಟೆಲ್ಲಾ ಮ್ವಾಂಗಿ]] # [[ಗ್ಯಾಂಬೊ ಸವಾಬಾ]] # [[ಗ್ರೇಸ್ ಒನ್ಯಾಂಗೊ]] # [[ಗ್ಲೋರಿಯಾ ಮಕಾಪಗಲ್-ಅರೊಯೊ]] </div> </div> == ಅಭಿಯಾನವನ್ನು ಹಂಚಿಕೊಳ್ಳಿ == === ಪೋಸ್ಟ್ಕಾರ್ಡ್ಗಳು === ಭಾಗವಹಿಸುವಿಕೆಯನ್ನು ಪ್ರೋತ್ಸಾಹಿಸಲು #SheSaid ಪೋಸ್ಟ್ಕಾರ್ಡ್ಗಳನ್ನು ಹಂಚಿಕೊಳ್ಳಿ. <gallery mode="packed-hover" heights="140"> File:SheSaid 2025 Postcards 01.png|ಅಮೀನಾ ಸ್ಬೌಯಿ File:SheSaid 2025 Postcards 02.png|ವಾಂಗಾರಿ ಮಾತಾಯ್ File:SheSaid 2025 Postcards 03.png|ಹೋಡಾ ಖಾಮೋಶ್ File:SheSaid 2025 Postcards 05.png|ಬಿ ಕಿಡುಡೆ </gallery> === ಬುಕ್ಮಾರ್ಕ್ಗಳು === ಅಭಿಯಾನವನ್ನು ಪ್ರಚಾರ ಮಾಡಲು ಮುದ್ರಿಸಬಹುದಾದ ಬುಕ್ಮಾರ್ಕ್ಗಳು. <gallery mode="packed-hover" heights="250"> File:SheSaid 2025 bookmark featuring Amina Sboui.png|ಅಮೀನಾ ಸ್ಬೌಯಿ File:SheSaid 2025 bookmark featuring Hoda Khamosh.png|ಹೋಡಾ ಖಾಮೋಶ್ File:SheSaid 2025 bookmark featuring Lolo Arziki.png|ಲೋಲೋ ಅರ್ಜಿಕಿ File:SheSaid 2025 bookmark featuring Wangari Maathai.png|ವಾಂಗಾರಿ ಮಾತಾಯ್ File:SheSaid 2025 bookmark featuring Bi Kidude.png|ಬಿ ಕಿಡುಡೆ </gallery> ನಿಮ್ಮದೇ ಆದದನ್ನು ರಚಿಸಲು ಸಹಾಯಕ್ಕಾಗಿ, [[m:User:Afek91]] ಅನ್ನು ಸಂಪರ್ಕಿಸಿ. == ಪ್ರಭಾವ == ೨೦೨೦ರಲ್ಲಿ ಪ್ರಾರಂಭವಾದಾಗಿನಿಂದ, '''#SheSaid''': * ೨೫ ಕ್ಕೂ ಹೆಚ್ಚು ಭಾಷೆಗಳಲ್ಲಿ ಭಾಗವಹಿಸುವಿಕೆಯನ್ನು ಪ್ರೇರೇಪಿಸಿದೆ * ಮಹಿಳೆಯರ ಬಗ್ಗೆ ೩,೦೦೦ ಕ್ಕೂ ಹೆಚ್ಚು ವಿಕಿಕೋಟ್ ಲೇಖನಗಳನ್ನು ರಚಿಸಿದೆ ಅಥವಾ ಸುಧಾರಿಸಿದೆ * ಜಾಗತಿಕವಾಗಿ ನೂರಾರು ಕೊಡುಗೆದಾರರನ್ನು ತೊಡಗಿಸಿಕೊಂಡಿದೆ == ಪ್ರಶ್ನೆಗಳೇ? == ಸಹಾಯ, ಪ್ರತಿಕ್ರಿಯೆ, ಅಥವಾ ಸಲಹೆಗಳಿಗಾಗಿ [[q:Wikiquote talk:SheSaid|ಚರ್ಚಾ ಪುಟವನ್ನು]] ಬಳಸಿ. ಹೊಸ ಚರ್ಚಾವನ್ನು ಪ್ರಾರಂಭಿಸಲು ಮೇಲ್ಭಾಗದಲ್ಲಿ '''Add topic''' ಕ್ಲಿಕ್ ಮಾಡಿ. [[Category:ಅವಳ ಮಾತು| ]] c15u2063yydj61k28qykozd3p7pvf26 ವರ್ಗ:ಅವಳ ಮಾತು 14 4492 15650 2026-08-22T11:38:16Z A826 1864 Created blank page 15650 wikitext text/x-wiki phoiac9h4m842xq45sp7s6u21eteeq1