跳至內容

「模組:Hatnote」:修訂間差異

Nekokon留言 | 貢獻
受保護 "模組:Hatnote"([編輯=僅允許管理員](無限期))
Nekokon留言 | 貢獻
無編輯摘要
 
第87行: 第87行:
local helpText
local helpText
if helpLink then
if helpLink then
helpText = '([[' .. helpLink .. '|帮助]])'
helpText = '([[' .. helpLink .. '|幫助]])'
else
else
helpText = ''
helpText = ''
第116行: 第116行:
checkType('disambiguate', 1, page, 'string')
checkType('disambiguate', 1, page, 'string')
checkType('disambiguate', 2, disambiguator, 'string', true)
checkType('disambiguate', 2, disambiguator, 'string', true)
disambiguator = disambiguator or '消歧义'
disambiguator = disambiguator or '消歧義'
return string.format('%s (%s)', page, disambiguator)
return string.format('%s (%s)', page, disambiguator)
end
end


--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
-- Format link 格式化链接
-- Format link 格式化鏈接
--
--
-- Makes a wikilink from the given link and display values. Links are escaped
-- Makes a wikilink from the given link and display values. Links are escaped
第135行: 第135行:
if not link then
if not link then
return p.makeWikitextError(
return p.makeWikitextError(
'link参数缺失',
'link參數缺失',
'Template:Format hatnote link#错误',
'Template:Format hatnote link#錯誤',
args.category
args.category
)
)
第197行: 第197行:
if not s then
if not s then
return p.makeWikitextError(
return p.makeWikitextError(
'text参数缺失',
'text參數缺失',
'Template:Hatnote#错误',
'Template:Hatnote#錯誤',
args.category
args.category
)
)