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">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
)