10,317
次編輯
變更
小
导入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">错误:%s%s.。</strong>%s',
msg,
helpText,
--------------------------------------------------------------------------------
-- 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)
-- Don't change anything for interlanguage links.ignore transwiki link
if link:match('<span class="ilh-') then
return link
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
)
checkType('_hatnote', 2, options, 'table', true)
options = options or {}
local classes = {'hatnote', 'navigation-not-searchable'}
local extraclasses = options.extraclasses
local selfref = options.selfref