開啟主選單

求真百科

變更

模块:Hatnote

增加 80 位元組, 7 年前
根据讨论支持跨语言链接
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
checkType('_formatLink', 1, link, 'string')
checkType('_formatLink', 2, display, 'string', true)
 
-- Don't change anything for interlanguage links.
if link:match('<span class="ilh-') then
return link
end
-- Remove the initial colon for links where it was specified manually.
checkType('_hatnote', 2, options, 'table', true)
options = options or {}
local classes = {'hatnote', 'navigation-not-searchable'}
local extraclasses = options.extraclasses
local selfref = options.selfref