Template:Pluralizer: Difference between revisions

From IdleOn MMO Wiki
(Created page with "<includeonly>{{#vardefine:last1|{{#sub:{{{1|}}}|-1}}}}{{#vardefine:2ndlast|{{#sub:{{{1|}}}|-2|-1}}}}{{#vardefine:last2|{{#var:2ndlast}}{{#var:last1}}}}{{#if:{{#switch:{{#var:last2}}|ss|sh|ch|fe|ff|us|is|on=Double|}}|<!-- If a double character match was triggered --> {{#ifeq:{{#var:last2}}|ss|{{{1|}}}es| {{#ifeq:{{#var:last2}}|sh|{{{1|}}}es| {{#ifeq:{{#var:last2}}|ch|{{{1|}}}es| {{#ifeq:{{#var:last2}}|fe|{{#sub:{{{1|}}}|0|-2}}ves| {{#ifeq:{{#var:last2}}|ff|{{#sub:{{{1|}}}...")
 
mNo edit summary
Line 11: Line 11:
|<!-- Otherwise: -->
|<!-- Otherwise: -->
{{#ifeq:{{#var:last1}}|s|{{#sub:{{{1|}}}|0|-1}}es|
{{#ifeq:{{#var:last1}}|s|{{#sub:{{{1|}}}|0|-1}}es|
{{#ifeq:{{#var:last1}}|x|{{#sub:{{{1|}}}|0|-1}}es|
{{#ifeq:{{#var:last1}}|x|{{{1|}}}es|
{{#ifeq:{{#var:last1}}|z|{{#sub:{{{1|}}}|0|-1}}es|
{{#ifeq:{{#var:last1}}|z|{{#sub:{{{1|}}}|0|-1}}es|
{{#ifeq:{{#var:last1}}|f|{{#sub:{{{1|}}}|0|-1}}ves|
{{#ifeq:{{#var:last1}}|f|{{#sub:{{{1|}}}|0|-1}}ves|

Revision as of 04:59, 11 February 2023

This template is used to get the plural form of most words barring a few exceptions using the following rules:

  • To make regular nouns plural, add –s to the end.
  • If the singular noun ends in –s, –ss, –sh, –ch, –x, or –z, add -es to the end to make it plural.
  • If the noun ends with –f or –fe, the f or –fe are often changed to –ve before adding the –s to form the plural version.
  • If a singular noun ends in –y and the letter before the –y is a consonant, change the ending to –ies to make the noun plural.
  • If the singular noun ends in –y and the letter before the –y is a vowel, simply add an –s to make it plural.
  • If the singular noun ends in –o, add –es to make it plural.
  • If the singular noun ends in –us, the plural ending is frequently –i.
  • If the singular noun ends in –is, the plural ending is frequently –es.
  • If the singular noun ends in –on, the plural ending is –a.

Note: This template doesn't check if a word is already in Plural form so Classes would be returned as Classees.