Template:Pluralizer: Difference between revisions

From IdleOn MMO Wiki
mNo edit summary
mNo edit summary
 
(10 intermediate revisions by 3 users not shown)
Line 1: Line 1:
<includeonly>{{#switch:{{{1|}}}|Fish|Pants=
<includeonly>{{#switch:{{{1|}}}|Shoes|Fish|Pants|Refinery Salts={{{1|}}}|Fisticuff|Anvil Expansion|Exp Balloon|Reset Potion={{{1|}}}s
|{{#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|}}|<!--
|{{#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 -->
If a double character match was triggered -->
Line 19: Line 19:
{{#ifeq:{{#var:last1}}|o|{{{1|}}}es|
{{#ifeq:{{#var:last1}}|o|{{{1|}}}es|
{{{1|}}}s}}}}}}}}}}}}
{{{1|}}}s}}}}}}}}}}}}
}}</includeonly><noinclude>This template is used to get the plural form of most words barring a few exceptions using the following rules:
}}}}</includeonly><noinclude>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.
* 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 singular noun ends in –s, –ss, –sh, –ch, –x, or –z, add -es to the end to make it plural.

Latest revision as of 04:16, 31 August 2024

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.