Template:Pluralizer: Difference between revisions
From IdleOn MMO Wiki
Kiokurashi (talk | contribs) (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|}}}...") |
Kiokurashi (talk | contribs) mNo edit summary |
||
(12 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<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|}}|<!-- | <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|}}|<!-- | |||
If a double character match was triggered --> | If a double character match was triggered --> | ||
{{#ifeq:{{#var:last2}}|ss|{{{1|}}}es| | {{#ifeq:{{#var:last2}}|ss|{{{1|}}}es| | ||
Line 11: | Line 12: | ||
|<!-- Otherwise: --> | |<!-- Otherwise: --> | ||
{{#ifeq:{{#var:last1}}|s|{{#sub:{{{1|}}}|0|-1}}es| | {{#ifeq:{{#var:last1}}|s|{{#sub:{{{1|}}}|0|-1}}es| | ||
{{#ifeq:{{#var:last1}}|x| | {{#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| | ||
Line 18: | 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.