「模組:Hatnote」:修訂間差異
出自Reko Wiki
小 受保護 "模組:Hatnote"([編輯=僅允許管理員](無限期)) |
小無編輯摘要 |
||
第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參數缺失', | ||
'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參數缺失', | ||
'Template:Hatnote# | 'Template:Hatnote#錯誤', | ||
args.category | args.category | ||
) | ) |