Modul:Hatnote list: Unterschied zwischen den Versionen
Moved form of for-see statement into options
(Removed behaviour of terminating list at empty page parameter; inconsistent with behaviour elsewhere) |
(Moved form of for-see statement into options) |
||
| Zeile 48: | Zeile 48: | ||
options = options or {} | options = options or {} | ||
local defaultOptions = { | local defaultOptions = { | ||
disambiguator = ' (disambiguation)', | |||
forseeForm = 'For %s, see %s.', | |||
title = mw.title.getCurrentTitle().text, | title = mw.title.getCurrentTitle().text, | ||
otherText = 'other uses' | otherText = 'other uses' | ||
} | } | ||
| Zeile 102: | Zeile 103: | ||
local useStr = v.use | local useStr = v.use | ||
local seeStr = p.andList(mHatnote.formatPages(unpack(v.see))) | local seeStr = p.andList(mHatnote.formatPages(unpack(v.see))) | ||
table.insert(strList, string.format( | table.insert(strList, string.format(options.forseeForm, useStr, seeStr)) | ||
end | end | ||
return mw.text.listToText(strList, ' ', ' ') | return mw.text.listToText(strList, ' ', ' ') | ||