求真百科歡迎當事人提供第一手真實資料,洗刷冤屈,終結網路霸凌。

變更

前往: 導覽搜尋

模块:Hatnote

增加 165 位元組, 4 年前
导入1个版本
local helpText
if helpLink then
helpText = ' ([[' .. helpLink .. '|help帮助]])'
else
helpText = ''
local category
if not title.isTalkPage and yesno(addTrackingCategory) ~= false then
category = 'Hatnote templates with errors有错误的顶注模板'
category = string.format(
'[[%s:%s]]',
end
return string.format(
'<strong class="error">Error: 错误:%s%s.</strong>%s',
msg,
helpText,
checkType('disambiguate', 1, page, 'string')
checkType('disambiguate', 2, disambiguator, 'string', true)
disambiguator = disambiguator or 'disambiguation消歧义'
return string.format('%s (%s)', page, disambiguator)
end
--------------------------------------------------------------------------------
-- Format link格式化链接
--
-- Makes a wikilink from the given link and display values. Links are escaped
if not link then
return p.makeWikitextError(
'no link specified参数缺失', 'Template:Format hatnote link#Errors错误',
args.category
)
end
return p._formatLink(link, display)
end
checkType('_formatLink', 1, link, 'string')
checkType('_formatLink', 2, display, 'string', true)
-- ignore transwiki link
if link:match('<span class="ilh-') then
return link
end
-- Remove the initial colon for links where it was specified manually.
end
-- Find the display value.
if not display then
local page, section = link:match('^(.-)#(.*)$')
--------------------------------------------------------------------------------
-- Hatnote顶注
--
-- Produces standard hatnote text. Implements the {{hatnote}} template.
-- 产生标准顶注文字。实现{{hatnote}}模板
--------------------------------------------------------------------------------
if not s then
return p.makeWikitextError(
'no text specified参数缺失', 'Template:Hatnote#Errors错误',
args.category
)
行政員使用者查核員拒收員巡檢員管理員、water、waterc、waterh、waterm、waterp、waters、watert、waterv、waterw、waterz
10,317
次編輯