Module:College color/sandbox: Difference between revisions

Content deleted Content added
use mw.text.listToText
bring the abstraction up
Line 397:
colornames[1] = ucfirst(colornames[1])
end
if (#colornames == 1) then
res = colornames[1]mw.text.listToText(
elseif (# colornames == 2) then,
', ',
res = colornames[1] .. ' and ' .. colornames[2]
elseif ( #colornames >== 2) thenand ' and ' or ', and '
)
res = mw.text.listToText( colornames, ', ', ', and ' )
end
 
if (colors['cite']) then