Wikipedia
zawiki
https://za.wikipedia.org/wiki/Yiebdaeuz
MediaWiki 1.47.0-wmf.5
first-letter
媒体
特殊
讨论
用户
用户讨论
Wikipedia
Wikipedia讨论
文件
文件讨论
MediaWiki
MediaWiki讨论
模板
模板讨论
帮助
帮助讨论
分类
分类讨论
TimedText
TimedText talk
模块
模块讨论
Event
Event talk
Sawcuengh
0
8469
43009
41753
2026-06-08T01:54:09Z
内存溢出的猫
7954
Yinhmeh
43009
wikitext
text/x-wiki
<div style= "vertical-align: top; background: #ffffff; padding: .5em;font-family: 'Linux Libertine',Georgia,Times,serif;" id="MainPageBox1" id="mf-fa">'''Sawcuengh''' dwg [[saw]] [[Bouxcuengh]]. Sawcuengh dwg saw gyoebyaem,yungh [[lahdingh cihmeh]] guh cihmeh hingzsik,yungh Vahcuengh fanghyenz haihbaek guh goekdaej,aeu yaem [[Vahcuengh Vujmingz]] guh biucinj,dwg yinzminz cwngfuj youq [[1956 nienz]] caux ok,[[1957 nienz]] ginggvaq bihcinj youq dieg [[Bouxcuengh]] doihengz sawjyungh cunj dahit saujsu minzcuz vwnzsw ndeu.Sawcuengh gungh miz 26 chi-meh, 22 aen singmeh, 108 aen yaemmeh caeuq 8 aen diuhloih.</div>
[[文件:Universal Declaration of Human Rights Zhuang Sawndip.png|thumb|450px|center]]
==Yinhmeh==
{|class="wikitable" style="text-align:center;clear:{{{clear|both}}};margin:0.2em auto;width:{{{width|100%}}};border-collapse:collapse;"
|-
!colspan="11" style="background:#efefef"|Yinhmeh
|-
|'''a'''<br/> /{{IPA|[[IPA a|aː]]}}/
|
|'''e'''<br/> /{{IPA|[[IPA e|eː]]}}/
|'''i'''<br/> /{{IPA|[[IPA i|iː]]}}/
|
|'''o'''<br/> /{{IPA|[[IPA o|oː]]}}/
|
|'''u'''<br/> /{{IPA|[[IPA u|uː]]}}/
|
|'''w'''<br/> /{{IPA|[[IPA ɯ|ɯː]]}}/
|
|-
|'''ai'''<br/> /{{IPA|aːi}}/
|'''ae'''<br/> /{{IPA|ai}}/
|'''ei'''<br/> /{{IPA|ei}}/
|
|
|'''oi'''<br/> /{{IPA|oːi}}/
|
|'''ui'''<br/> /{{IPA|uːi}}/
|
|'''wi'''<br/> /{{IPA|ɯːi}}/
|
|-
|'''au'''<br/> /{{IPA|aːu}}/
|'''aeu'''<br/> /{{IPA|au}}/
|'''eu'''<br/> /{{IPA|eːu}}/
|'''iu'''<br/> /{{IPA|iːu}}/
|
|'''ou'''<br/> /{{IPA|ou}}/
|
|
|
|
|
|-
|'''aw'''<br/> /{{IPA|aɯ}}/
|
|
|
|
|
|
|
|
|
|
|-
|'''am'''<br/> /{{IPA|aːm}}/
|'''aem'''<br/> /{{IPA|am}}/
|'''em'''<br/> /{{IPA|eːm}}/
|'''iem'''<br/> /{{IPA|iːm}}/
|'''im'''<br/> /{{IPA|im}}/
|'''om'''<br/> /{{IPA|oːm}}/
|'''oem'''<br/> /{{IPA|om}}/
|'''uem'''<br/> /{{IPA|uːm}}/
|'''um'''<br/> /{{IPA|um}}/
|
|
|-
|'''an'''<br/> /{{IPA|aːn}}/
|'''aen'''<br/> /{{IPA|an}}/
|'''en'''<br/> /{{IPA|eːn}}/
|'''ien'''<br/> /{{IPA|iːn}}/
|'''in'''<br/> /{{IPA|in}}/
|'''on'''<br/> /{{IPA|oːn}}/
|'''oen'''<br/> /{{IPA|on}}/
|'''uen'''<br/> /{{IPA|uːn}}/
|'''un'''<br/> /{{IPA|un}}/
|'''wen'''<br/> /{{IPA|ɯːn}}/
|'''wn'''<br/> /{{IPA|ɯn}}/
|-
|'''ang'''<br/> /{{IPA|aːŋ}}/
|'''aeng'''<br/> /{{IPA|aŋ}}/
|'''eng''' /{{IPA|eːŋ}}/
|'''ieng'''<br/> /{{IPA|iːŋ}}/
|'''ing'''<br/> /{{IPA|iŋ}}/
|'''ong'''<br/> /{{IPA|oːŋ}}/
|'''oeng'''<br/> /{{IPA|oŋ}}/
|'''ueng'''<br/> /{{IPA|uːŋ}}/
|'''ung'''<br/> /{{IPA|uŋ}}/
|
|'''wng'''<br/> /{{IPA|ɯn}}/
|-
|'''ap'''<br/> /{{IPA|aːp̚}}/
|'''aep'''<br/> /{{IPA|ap̚}}/
|'''ep'''<br/> /{{IPA|eːp̚}}/
|'''iep'''<br/> /{{IPA|iːp̚}}/
|'''ip'''<br/> /{{IPA|ip̚}}/
|'''op'''<br/> /{{IPA|oːp̚}}/
|'''oep'''<br/> /{{IPA|op̚}}/
|'''uep'''<br/> /{{IPA|uːp̚}}/
|'''up'''<br/> /{{IPA|up̚}}/
|
|
|-
|'''at'''<br/> /{{IPA|aːt̚}}/
|'''aet'''<br/> /{{IPA|at̚}}/
|'''et'''<br/> /{{IPA|eːt̚}}/
|'''iet'''<br/> /{{IPA|iːt̚}}/
|'''it'''<br/> /{{IPA|it̚}}/
|'''ot'''<br/> /{{IPA|oːt̚}}/
|'''oet'''<br/> /{{IPA|ot̚}}/
|'''uet'''<br/> /{{IPA|uːt̚}}/
|'''ut'''<br/> /{{IPA|ut̚}}/
|'''wet'''<br/> /{{IPA|ɯːt̚}}/
|'''wt'''<br/> /{{IPA|ɯt̚}}/
|-
|'''ak'''<br/> /{{IPA|aːk̚}}/
|'''aek'''<br/> /{{IPA|ak̚}}/
|'''ek'''<br/> /{{IPA|eːk̚}}/
|'''iek'''<br/> /{{IPA|iːk̚}}/
|'''ik'''<br/> /{{IPA|ik̚}}/
|'''ok'''<br/> /{{IPA|oːk̚}}/
|'''oek'''<br/> /{{IPA|ok̚}}/
|'''uek'''<br/> /{{IPA|uːk̚}}/
|'''uk'''<br/> /{{IPA|uk̚}}/
|
|'''wk'''<br/> /{{IPA|ɯk̚}}/
|-
|'''ab'''<br/> /{{IPA|aːp̚}}/
|'''aeb'''<br/> /{{IPA|ap̚}}/
|'''eb'''<br/> /{{IPA|eːp̚}}/
|'''ieb'''<br/> /{{IPA|iːp̚}}/
|'''ib'''<br/> /{{IPA|ip̚}}/
|'''ob'''<br/> /{{IPA|oːp̚}}/
|'''oeb'''<br/> /{{IPA|op̚}}/
|'''ueb'''<br/> /{{IPA|uːp̚}}/
|'''ub'''<br/> /{{IPA|up̚}}/
|
|
|-
|'''ad'''<br/> /{{IPA|aːt̚}}/
|'''aed'''<br/> /{{IPA|at̚}}/
|'''ed'''<br/> /{{IPA|eːt̚}}/
|'''ied'''<br/> /{{IPA|iːt̚}}/
|'''id'''<br/> /{{IPA|it̚}}/
|'''od'''<br/> /{{IPA|oːt̚}}/
|'''oed'''<br/> /{{IPA|ot̚}}/
|'''ued'''<br/> /{{IPA|uːt̚}}/
|'''ud'''<br/> /{{IPA|ut̚}}/
|'''wed'''<br/> /{{IPA|ɯːt̚}}/
|'''wd'''<br/> /{{IPA|ɯt̚}}/
|-
|'''ag'''<br/> /{{IPA|aːk̚}}/
|'''aeg'''<br/> /{{IPA|ak̚}}/
|'''eg'''<br/> /{{IPA|eːk̚}}/
|'''ieg'''<br/> /{{IPA|iːk̚}}/
|'''ig'''<br/> /{{IPA|ik̚}}/
|'''og'''<br/> /{{IPA|oːk̚}}/
|'''oeg'''<br/> /{{IPA|ok̚}}/
|'''ueg'''<br/> /{{IPA|uːk̚}}/
|'''ug'''<br/> /{{IPA|uk̚}}/
|
|'''wg'''<br/> /{{IPA|ɯk̚}}/
|-
|}
==Singdiuh==
<div style= "vertical-align: top; background: #ffffff; padding: .5em;font-family: 'Linux Libertine',Georgia,Times,serif;" id="MainPageBox1" id="mf-fa">
Sawcuengh caijyungh bouhfaenh byauhdiufaz daeuj sij singdiuh. Sojmiz gij cih byauhdiu haenx cij sij bonjdiuh, mbouj sij bienqdiuh.
壮文采用部分标调的方法标写声调。所有标调的字一律只标本音(调),不标变调。
Sawcuengh miz 8 aen singdiuh. Youq 8 aen singdiuh neix ndawde, miz 6 aen suhswngdiu caeuq 2 aen swzswnghdiu.
壮文有8个声调。 在这8个声调中,有6个舒声调和2个塞声调。
6 aen suhswnghdiu ndawde, cawz daih'it diuh mbouj sij singdiuh fuzhau, gij singdiuh wnq faenbiek sawjyungh z、j、x、q、h 5 aen cihmeh neix daeuj sij.
6个舒声调,除第一调不标写声调符号外,其余各调分别用z、j、x、q、h五个字母来标写。
2 aen swzswnghdiu, faenbied caijyungh gauhyinhcuj p、t、k caeuq dihyinhcuj b、d、g song dauq yinveij daeuj byaujsi.
2个塞声调,分别采用高音组p、t、k和低音组b、d、g两套韵尾来表示。
Sawcuengh singdiuh fuzhau sij youq satbyai yinhcez, lumjnaeuz "naz" aen cihmeh doeksat haenx "z" byaujsi singdiuh fuzhau.
壮文的声调符号写在音节的末尾,如“naz(水田)”的最后一个字母“z”表示声调符号。
</div>
=={{外部链接}}==
* [http://unicode.org/charts/PDF/U0180.pdf ''Unicode Latin Extended-B code chart'']<!-- specifies the Unicode characters to be used for the Zhuang special letters-->
* [http://www.omniglot.com/writing/zhuang.htm ''Zhuang language & alphabet'']<!--, Omniglot -->
* [https://web.archive.org/web/20080917005422/http://iea.cass.cn/mzwz/42.htm ''Introduction to sawndip'']<!--, mentions both ancient and modern usages, at the Chinese Academy of Social Science in Beijing-->
* [http://www.linguapax.org/congres04/pdf/prosser.pdf ''The prospects for the long-term survival of Non-Han minority languages in the south of China'']
<!--Categories-->
{{DEFAULTSORT:Cuengh, saw}}
[[分类:Cihsaw|C]]
<!--Interwikis-->
[[en:Zhuang languages#Writing systems]]
ga1i26j7k5y1jpc83nxeswc3ez32twu
模板:Infobox Language/terminological
10
14820
43006
2026-06-07T15:23:09Z
内存溢出的猫
7954
创建页面,内容为“ | style="vertical-align: top; padding-left: 0.5em;"|<tt>{{{1|—}}} (T)</tt><noinclude> [[模板:Language terminological]] </noinclude>”
43006
wikitext
text/x-wiki
| style="vertical-align: top; padding-left: 0.5em;"|<tt>{{{1|—}}} (T)</tt><noinclude>
[[模板:Language terminological]]
</noinclude>
bhz9i8pgw09p3agn082c73zt3pl9slf
模板:Infobox Language/official
10
14821
43007
2026-06-07T15:23:37Z
内存溢出的猫
7954
创建页面,内容为“ |- ! colspan="3" style="text-align: center; color: {{{1}}}; background-color: {{{2}}};"|Official status |- | style="padding-left: 0.5em;" |Official language of: | colspan="2" style="padding-left: 0.5em;"|{{{3|''none''}}} |- | style="padding-left: 0.5em;" |[[List of language regulators|Regulated by]]: | colspan="2" style="padding-left: 0.5em;"|{{{4|''none''}}}”
43007
wikitext
text/x-wiki
|-
! colspan="3" style="text-align: center; color: {{{1}}}; background-color: {{{2}}};"|Official status
|-
| style="padding-left: 0.5em;" |Official language of:
| colspan="2" style="padding-left: 0.5em;"|{{{3|''none''}}}
|-
| style="padding-left: 0.5em;" |[[List of language regulators|Regulated by]]:
| colspan="2" style="padding-left: 0.5em;"|{{{4|''none''}}}
dnkwbyxhln8osuxwwcmtcqpw7not6ut
Gyaudoeng Ngaenzhangz
0
14822
43008
2026-06-07T15:42:21Z
内存溢出的猫
7954
创建页面,内容为“{{databox}} '''Gyaudoeng Ngaenzhangz''' (BOCOM) dwg aen [[ngaenzhangz]] [[Cungguek daluz]] lizsij ceiq gaeuq, Cingh [[Gvanghci]] sam cib seiq nienz laeb.”
43008
wikitext
text/x-wiki
{{databox}}
'''Gyaudoeng Ngaenzhangz''' (BOCOM) dwg aen [[ngaenzhangz]] [[Cungguek daluz]] lizsij ceiq gaeuq, Cingh [[Gvanghci]] sam cib seiq nienz laeb.
laibwizmxprjipkfxuwlbh6p0vlkyp6
模板:Hoiz
10
14823
43010
2026-06-08T01:58:32Z
内存溢出的猫
7954
创建页面,内容为“<includeonly>{{Check talk wp}}{{tmbox | type=notice | image=[[File:WP-TranslationProject TwoFlags.svg|50px|link=]] | text= 本{{Pagetype}}{{#if:{{{insertversion|}}}|的[{{fullurle:{{PAGENAMEE}}|oldid={{{insertversion}}}}} 版本{{{insertversion}}}]中,}} hoiz daj {{#if:{{{source1_1|}}}{{{source2_1|}}}{{{source3_1|}}}{{{source4_1|}}}{{{source5_1|}}}| : {{#if: {{{source1_1|{{{1|}}}}}} | * {{Translated page/a|1={{{source1_1|{{{1|}}}}}}|2={{{source1_2|{{{2|}}}}…”
43010
wikitext
text/x-wiki
<includeonly>{{Check talk wp}}{{tmbox
| type=notice
| image=[[File:WP-TranslationProject TwoFlags.svg|50px|link=]]
| text= 本{{Pagetype}}{{#if:{{{insertversion|}}}|的[{{fullurle:{{PAGENAMEE}}|oldid={{{insertversion}}}}} 版本{{{insertversion}}}]中,}} hoiz daj {{#if:{{{source1_1|}}}{{{source2_1|}}}{{{source3_1|}}}{{{source4_1|}}}{{{source5_1|}}}| :
{{#if: {{{source1_1|{{{1|}}}}}} | * {{Translated page/a|1={{{source1_1|{{{1|}}}}}}|2={{{source1_2|{{{2|}}}}}}|3={{{source1_3|{{{3|}}}}}}|version={{{source1_version|{{{version|}}}}}}}} }}
{{#if: {{{source2_1|}}} | * {{Translated page/a|1={{{source2_1|}}}|2={{{source2_2|}}}|3={{{source2_3|}}}|version={{{source2_version|}}}}} }}
{{#if: {{{source3_1|}}} | * {{Translated page/a|1={{{source3_1|}}}|2={{{source3_2|}}}|3={{{source3_3|}}}|version={{{source3_version|}}}}} }}
{{#if: {{{source4_1|}}} | * {{Translated page/a|1={{{source4_1|}}}|2={{{source4_2|}}}|3={{{source4_3|}}}|version={{{source4_version|}}}}} }}
{{#if: {{{source5_1|}}} | * {{Translated page/a|1={{{source5_1|}}}|2={{{source5_2|}}}|3={{{source5_3|}}}|version={{{source5_version|}}}}} }} | {{Translated page/a|1={{{1|}}}|2={{{2|}}}|version={{{version|}}}}}。{{{3|}}}<!-- 这里没有用/a子模板调用参数3是对的 -->}}
}}</includeonly><noinclude>{{documentation}}</noinclude>
hgf7j1vnjxx4gdox0is5wf5id8by5ju
Tmbox
0
14824
43011
2026-06-08T01:59:16Z
内存溢出的猫
7954
创建页面,内容为“<!-- <templatestyles src="Tmbox/style.css" /> -->{{#invoke:Message box|tmbox}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude>”
43011
wikitext
text/x-wiki
<!-- <templatestyles src="Tmbox/style.css" /> -->{{#invoke:Message box|tmbox}}<noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
</noinclude>
rq3lbhsb6ms17p2z3hs20vqs91q0aek
模块:Message box
828
14825
43012
2026-06-08T02:00:02Z
内存溢出的猫
7954
创建页面,内容为“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 -----------------------------------------------------------------…”
43012
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
-- 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)
)
-- 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
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
-- 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)
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#%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
-- Set the below row.
self.below = cfg.below and args.below
-- 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|link=|alt=]]', self.typeImage
or 'Information icon4.svg', imageSize)
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: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: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
: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()
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)
109haa8fa6erok27r4amq7gmehofivo
模块:Message box/configuration
828
14826
43013
2026-06-08T02:01:22Z
内存溢出的猫
7954
创建页面,内容为“-------------------------------------------------------------------------------- -- Message box configuration -- -- -- -- This module contains configuration data for [[Module:Message box]]. -- -------------------------------------------------------------------------------- return { -- Global styles applying to all *mboxes ['@glob…”
43013
Scribunto
text/plain
--------------------------------------------------------------------------------
-- Message box configuration --
-- --
-- This module contains configuration data for [[Module:Message box]]. --
--------------------------------------------------------------------------------
return {
-- Global styles applying to all *mboxes
['@global'] = {
templatestyles = 'Module:Message box/mbox.css'
},
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.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'},
usePlainlinksParam = true,
allowId = true,
imageEmptyCell = true,
imageCheckBlank = true,
imageSmallSize = '20x20px',
imageCellDiv = true,
useCollapsibleTextFields = true,
imageRightNone = true,
sectionDefault = '條目',
allowMainspaceCategories = true,
templateCategory = '條目訊息模板',
templateCategoryRequireName = true,
templateErrorCategory = '缺少參數的條目訊息模板',
templateErrorParamsToCheck = {'issue', 'fix', 'subst'},
templatestyles = 'Template:Ambox/style.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.svg'
},
notice = {
class = 'cmbox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'cmbox'},
usePlainlinksParam = true,
imageEmptyCell = true,
templatestyles = 'Template:Cmbox/style.css'
},
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,
allowId = true,
classes = {'fmbox'},
usePlainlinksParam = true,
imageEmptyCell = false,
imageRightNone = false,
templatestyles = 'Template:Fmbox/style.css'
},
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.svg'
},
license = {
class = 'imbox-license licensetpl',
image = 'Imbox-license.svg'
},
featured = {
class = 'imbox-featured',
image = 'Cscr-featured.svg'
},
notice = {
class = 'imbox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'imbox'},
usePlainlinksParam = true,
imageEmptyCell = true,
below = true,
templateCategory = '檔案訊息模板',
templatestyles = 'Template:Imbox/style.css'
},
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.svg'
},
notice = {
class = 'ombox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'ombox'},
usePlainlinksParam = true,
allowSmall = true,
imageEmptyCell = true,
imageRightNone = true,
templatestyles = 'Template:Ombox/style.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.svg'
},
notice = {
class = 'tmbox-notice',
image = 'Information icon4.svg'
}
},
default = 'notice',
showInvalidTypeError = true,
classes = {'tmbox'},
usePlainlinksParam = true,
allowId = true,
allowSmall = true,
imageRightNone = true,
imageEmptyCell = true,
imageEmptyCellStyle = true,
templateCategory = '討論訊息模板',
templatestyles = 'Template:Tmbox/style.css'
}
}
n6vt35dgc1v504n2uxnlqzgl8mh763q
模板:Tmbox
10
14827
43014
2026-06-08T02:02:33Z
内存溢出的猫
7954
创建页面,内容为“<!-- <templatestyles src="Tmbox/style.css" /> -->{{#invoke:Message box|tmbox}}<noinclude> {{documentation}} <!-- Categories go on the /doc subpage, and interwikis go on Wikidata. --> </noinclude>”
43014
wikitext
text/x-wiki
<!-- <templatestyles src="Tmbox/style.css" /> -->{{#invoke:Message box|tmbox}}<noinclude>
{{documentation}}
<!-- Categories go on the /doc subpage, and interwikis go on Wikidata. -->
</noinclude>
rq3lbhsb6ms17p2z3hs20vqs91q0aek
模板:Tmbox/style.css
10
14828
43015
2026-06-08T02:03:13Z
内存溢出的猫
7954
创建页面,内容为“.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 sol…”
43015
sanitized-css
text/css
.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;
}
}
@media screen {
html.skin-theme-clientpref-night .tmbox {
background-color: #2e2505; /* Dark brown, same hue/saturation as light */
}
html.skin-theme-clientpref-night .tmbox-speedy {
background-color: #310402; /* Dark red, same hue/saturation as light */
}
}
@media screen and ( prefers-color-scheme: dark) {
html.skin-theme-clientpref-os .tmbox {
background-color: #2e2505; /* Dark brown, same hue/saturation as light */
}
html.skin-theme-clientpref-os .tmbox-speedy {
background-color: #310402; /* Dark red, same hue/saturation as light */
}
}
/** T367463 */
body.skin--responsive table.tmbox img {
max-width: none !important;
}
56hhdhk66btxrol909widxvwk2c68ai
讨论:Sawcuengh
1
14829
43016
2026-06-08T02:03:26Z
内存溢出的猫
7954
创建页面,内容为“{{hoiz|zh|新壮文}}”
43016
wikitext
text/x-wiki
{{hoiz|zh|新壮文}}
srt5m53vm2huylm48arj38quegdmhtf
模板:Pagetype
10
14830
43017
2026-06-08T02:04:23Z
内存溢出的猫
7954
创建页面,内容为“{{<includeonly>safesubst:</includeonly>#invoke:pagetype|main}}<noinclude> {{documentation}} </noinclude>”
43017
wikitext
text/x-wiki
{{<includeonly>safesubst:</includeonly>#invoke:pagetype|main}}<noinclude>
{{documentation}}
</noinclude>
68zxiyq4iiy48fmmivonz3uwdgjl14x
43018
43017
2026-06-08T02:05:58Z
内存溢出的猫
7954
内存溢出的猫移动页面[[Templaet:pagetype]]至[[模板:Pagetype]]:标题有错别字
43017
wikitext
text/x-wiki
{{<includeonly>safesubst:</includeonly>#invoke:pagetype|main}}<noinclude>
{{documentation}}
</noinclude>
68zxiyq4iiy48fmmivonz3uwdgjl14x
Templaet:pagetype
0
14831
43019
2026-06-08T02:05:58Z
内存溢出的猫
7954
内存溢出的猫移动页面[[Templaet:pagetype]]至[[模板:Pagetype]]:标题有错别字
43019
wikitext
text/x-wiki
#重定向 [[模板:Pagetype]]
mnl3vyy2oo0l5zszq8vtl6f4a56j7z8
模板:Check talk wp
10
14832
43020
2026-06-08T02:06:32Z
内存溢出的猫
7954
创建页面,内容为“{{category handler | talk = <!--Don't show on talk pages--> | wikipedia = <!--Don't show in Wikipedia space--> | template = <!--Don't show on templates--> | other = <div class{{=}}"center">'''此處的[[Help:模板|模板]]應該放置在[[Help:討論頁|討論頁]]:[[{{TALKPAGENAME}}]]。'''</div>[[Category:未正確放置討論頁模板的頁面]]<!-- [[Category:Pages with misplaced templates]] --> | nocat = {{{nocat|}}} <!--So "nocat=true" w…”
43020
wikitext
text/x-wiki
{{category handler
| talk = <!--Don't show on talk pages-->
| wikipedia = <!--Don't show in Wikipedia space-->
| template = <!--Don't show on templates-->
| other = <div class{{=}}"center">'''此處的[[Help:模板|模板]]應該放置在[[Help:討論頁|討論頁]]:[[{{TALKPAGENAME}}]]。'''</div>[[Category:未正確放置討論頁模板的頁面]]<!-- [[Category:Pages with misplaced templates]] -->
| nocat = {{{nocat|}}} <!--So "nocat=true" works-->
| page = {{{page|}}} <!--For testing-->
}}{{#ifeq:{{NAMESPACE}}|Template|[[Category:檢查討論命名空間的模板|{{PAGENAME}}]]}}<noinclude>
{{documentation}}
<!-- Add categories and interwikis to the /doc subpage, not here! -->
</noinclude>
h55dyqf0xu1s1sxku14cb7odehrrpm9
模块:Pagetype
828
14833
43021
2026-06-08T02:08:52Z
内存溢出的猫
7954
创建页面,内容为“-------------------------------------------------------------------------------- -- -- -- PAGETYPE -- -- -- -- This is a meta-module intended to replace {{pagetype}} and similar -- -- templates. It automatically detects namespaces,…”
43021
Scribunto
text/plain
--------------------------------------------------------------------------------
-- --
-- PAGETYPE --
-- --
-- This is a meta-module intended to replace {{pagetype}} and similar --
-- templates. It automatically detects namespaces, and allows for a --
-- great deal of customisation. It can easily be ported to other --
-- wikis by changing the values in the [[Module:Pagetype/config]]. --
-- --
--------------------------------------------------------------------------------
-- Load config.
local cfg = mw.loadData('Module:Pagetype/config')
-- Load required modules.
local getArgs = require('Module:Arguments').getArgs
local yesno = require('Module:Yesno')
local nsDetectModule = require('Module:Namespace detect')
local nsDetect = nsDetectModule._main
local getParamMappings = nsDetectModule.getParamMappings
local getPageObject = nsDetectModule.getPageObject
local p = {}
local function shallowCopy(t)
-- Makes a shallow copy of a table.
local ret = {}
for k, v in pairs(t) do
ret[k] = v
end
return ret
end
local function checkPagetypeInput(namespace, val)
-- Checks to see whether we need the default value for the given namespace,
-- and if so gets it from the pagetypes table.
-- The yesno function returns true/false for "yes", "no", etc., and returns
-- val for other input.
local ret = yesno(val, val)
if ret and type(ret) ~= 'string' then
ret = cfg.pagetypes[namespace]
end
return ret
end
local function getPagetypeFromClass(class, param, aliasTable, default)
-- Gets the pagetype from a class specified from the first positional
-- parameter.
param = yesno(param, param)
if param ~= false then -- No check if specifically disallowed.
for _, alias in ipairs(aliasTable) do
if class == alias then
if type(param) == 'string' then
return param
else
return default
end
end
end
end
end
local function getNsDetectValue(args)
-- Builds the arguments to pass to [[Module:Namespace detect]] and returns
-- the result.
-- Get the default values.
local ndArgs = {}
local defaultns = args[cfg.defaultns]
if defaultns == cfg.defaultnsAll then
ndArgs = shallowCopy(cfg.pagetypes)
else
local defaultnsArray
if defaultns == cfg.defaultnsExtended then
defaultnsArray = cfg.extendedNamespaces
elseif defaultns == cfg.defaultnsNone then
defaultnsArray = {}
else
defaultnsArray = cfg.defaultNamespaces
end
for _, namespace in ipairs(defaultnsArray) do
ndArgs[namespace] = cfg.pagetypes[namespace]
end
end
--[[
-- Add custom values passed in from the arguments. These overwrite the
-- defaults. The possible argument names are fetched from
-- Module:Namespace detect automatically in case new namespaces are
-- added. Although we accept namespace aliases as parameters, we only pass
-- the local namespace name as a parameter to Module:Namespace detect.
-- This means that the "image" parameter can overwrite defaults for the
-- File: namespace, which wouldn't work if we passed the parameters through
-- separately.
--]]
local mappings = getParamMappings()
for ns, paramAliases in pairs(mappings) do
-- Copy the aliases table, as # doesn't work with tables returned from
-- mw.loadData.
paramAliases = shallowCopy(paramAliases)
local paramName = paramAliases[1]
-- Iterate backwards along the array so that any values for the local
-- namespace names overwrite those for namespace aliases.
for i = #paramAliases, 1, -1 do
local paramAlias = paramAliases[i]
local ndArg = checkPagetypeInput(paramAlias, args[paramAlias])
if ndArg == false then
-- If any arguments are false, convert them to nil to protect
-- against breakage by future changes to
-- [[Module:Namespace detect]].
ndArgs[paramName] = nil
elseif ndArg then
ndArgs[paramName] = ndArg
end
end
end
-- Check for disambiguation-class and N/A-class pages in mainspace.
if ndArgs.main then
local class = args[1]
if type(class) == 'string' then
-- Put in lower case so e.g. "Dab" and "dab" will both match.
class = mw.ustring.lower(class)
end
local dab = getPagetypeFromClass(
class,
args[cfg.dab],
cfg.dabAliases,
cfg.dabDefault
)
if dab then
ndArgs.main = dab
else
local na = getPagetypeFromClass(
class,
args[cfg.na],
cfg.naAliases,
cfg.naDefault
)
if na then
ndArgs.main = na
end
end
end
-- If there is no talk value specified, use the corresponding subject
-- namespace for talk pages.
if not ndArgs.talk then
ndArgs.subjectns = true
end
-- Add the fallback value. This can also be customised, but it cannot be
-- disabled.
local other = args[cfg.other]
-- We will ignore true/false/nil results from yesno here, but using it
-- anyway for consistency.
other = yesno(other, other)
if type(other) == 'string' then
ndArgs.other = other
else
ndArgs.other = cfg.otherDefault
end
-- Allow custom page values.
ndArgs.page = args.page
return nsDetect(ndArgs)
end
local function detectRedirects(args)
local redirect = args[cfg.redirect]
-- The yesno function returns true/false for "yes", "no", etc., and returns
-- redirect for other input.
redirect = yesno(redirect, redirect)
if redirect == false then
-- Detect redirects unless they have been explicitly disallowed with
-- "redirect=no" or similar.
return
end
local pageObject = getPageObject(args.page)
-- If we are using subject namespaces elsewhere, do so here as well.
if pageObject
and not yesno(args.talk, true)
and args[cfg.defaultns] ~= cfg.defaultnsAll
then
pageObject = getPageObject(
pageObject.subjectNsText .. ':' .. pageObject.text
)
end
-- Allow custom values for redirects.
if pageObject and pageObject.isRedirect then
if type(redirect) == 'string' then
return redirect
else
return cfg.redirectDefault
end
end
end
function p._main(args)
local redirect = detectRedirects(args)
if redirect then
return redirect
else
return getNsDetectValue(args)
end
end
function p.main(frame)
local args = getArgs(frame)
return p._main(args)
end
return p
65n2x8d3e0bj8psj6ice6t49v06rva0
模块:Pagetype/config
828
14834
43022
2026-06-08T02:09:42Z
内存溢出的猫
7954
创建页面,内容为“-------------------------------------------------------------------------------- -- Module:Pagetype configuration data -- -- This page holds localisation and configuration data for Module:Pagetype. -- -------------------------------------------------------------------------------- local cfg = {} -- Don't edit this line. -------------------------------------------------------------------------------- --…”
43022
Scribunto
text/plain
--------------------------------------------------------------------------------
-- Module:Pagetype configuration data --
-- This page holds localisation and configuration data for Module:Pagetype. --
--------------------------------------------------------------------------------
local cfg = {} -- Don't edit this line.
--------------------------------------------------------------------------------
-- Start configuration data --
--------------------------------------------------------------------------------
-- This table holds the values to use for "main=true", "user=true", etc. Keys to
-- this table should be namespace parameters that can be used with
-- [[Module:Namespace detect]].
cfg.pagetypes = {
['main'] = '條目',
['user'] = '用戶頁',
['project'] = '維基百科',
['wikipedia'] = '維基百科',
['wp'] = '維基百科',
['file'] = '-{zh-cn:文件; zh-tw:檔案;}-',
['image'] = '-{zh-cn:文件; zh-tw:檔案;}-',
['mediawiki'] = 'MediaWiki',
['template'] = '模板',
['help'] = '幫助',
['category'] = '分類',
['portal'] = '主題',
['wikiproject'] = '維基專題',
['wpj'] = '維基專題',
['pj'] = '維基專題',
['book'] = '圖書',
['draft'] = '草稿',
['education program'] = '教育課程',
['timedtext'] = '字幕',
['module'] = '-{zh-cn:模块; zh-tw:模組;}-',
['topic'] = '話題',
['talk'] = '討論頁',
['special'] = '特殊頁面',
['media'] = '檔案'
}
-- This table holds the names of the namespaces to be looked up from
-- cfg.pagetypes by default.
cfg.defaultNamespaces = {
'main',
'file',
'template',
'category',
'module',
'book'
}
-- This table holds the names of the namespaces to be looked up from
-- cfg.pagetypes if cfg.defaultnsExtended is set.
cfg.extendedNamespaces = {
'main',
'user',
'project',
'file',
'mediawiki',
'template',
'category',
'help',
'portal',
'wikiproject',
'module',
'book',
'draft'
}
-- The parameter name to set which default namespace values to be looked up from
-- cfg.pagetypes.
cfg.defaultns = 'defaultns'
-- The value of cfg.defaultns to set all namespaces, including talk.
cfg.defaultnsAll = 'all'
-- The value of cfg.defaultns to set the namespaces listed in
-- cfg.extendedNamespaces
cfg.defaultnsExtended = 'extended'
-- The value of cfg.defaultns to set no default namespaces.
cfg.defaultnsNone = 'none'
-- The parameter name to use for disambiguation pages page.
cfg.dab = 'dab'
-- This table holds the different possible aliases for disambiguation-class
-- pages. These should be lower-case.
cfg.dabAliases = {
'disambiguation',
'disambig',
'disamb',
'dab',
'消歧义',
'消歧義'
}
-- The default value for disambiguation pages.
cfg.dabDefault = '页面'
-- The parameter name to use for N/A-class page.
cfg.na = 'na'
-- This table holds the different possible aliases for N/A-class pages. These
-- should be lower-case.
cfg.naAliases = {'na', 'n/a','非条目','非條目'}
-- The default value for N/A-class pages.
cfg.naDefault = '页面'
-- The parameter name to use for redirects.
cfg.redirect = 'redirect'
-- The default value to use for redirects.
cfg.redirectDefault = '重定向'
-- The parameter name for undefined namespaces.
cfg.other = 'other'
-- The value used if the module detects an undefined namespace.
cfg.otherDefault = '页面'
--------------------------------------------------------------------------------
-- End configuration data --
--------------------------------------------------------------------------------
return cfg -- Don't edit this line
dghyb2z7vqbd7g3wbpowx8bu1xrnyws