Modul:Detect singular: Unterschied zwischen den Versionen
if no inputs given, return blank
(protect against bad data types) |
(if no inputs given, return blank) |
||
Zeile 83: | Zeile 83: | ||
pluralForm = '[['..link..'|'..pluralForm..']]' | pluralForm = '[['..link..'|'..pluralForm..']]' | ||
end | end | ||
if args[2] then | |||
return pluralForm | |||
end | |||
local detect = p._main(args) | |||
if detect == nil then | |||
return "" -- return blank on complete failure | |||
end | |||
return detect and singularForm or pluralForm | |||
end | end | ||