8,756
edits
m (account for pluralizations ending in 's') |
(if word end in 'y', make it end in 'ies' unless possessive) |
||
Line 12: | Line 12: | ||
elseif (string.sub(prefix, -1) == 's') then | elseif (string.sub(prefix, -1) == 's') then | ||
return (htmlString .. apostrophe) --return unmodified (ends with 's', like 'boots', so we shouldn't append another 's') | return (htmlString .. apostrophe) --return unmodified (ends with 's', like 'boots', so we shouldn't append another 's') | ||
elseif (string.sub(prefix, -1) == 'y') and apostrophe == '' then | |||
return (string.sub(prefix, 1, -1) .. 'ies' .. postfix) | |||
else | else | ||
return (prefix .. apostrophe .. 's' .. postfix) | return (prefix .. apostrophe .. 's' .. postfix) |