Skip to content

Commit

Permalink
Merge pull request #364 from jermdavis/master
Browse files Browse the repository at this point in the history
Adding "campuses" as plural of "campus"
  • Loading branch information
MehdiK committed Dec 21, 2014
2 parents 37bce0e + c9a3bab commit d5b6587
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions release_notes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
###In Development

- [#364](https://github.com/MehdiK/Humanizer/pull/364): Adding "campuses" as plural of "campus"

[Commits](https://github.com/MehdiK/Humanizer/compare/v1.32.0...master)

Expand Down
2 changes: 2 additions & 0 deletions src/Humanizer.Tests/InflectorTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -248,6 +248,8 @@ public IEnumerator<object[]> GetEnumerator()
yield return new object[] {"fungus", "fungi"};

yield return new object[] {"wave","waves"};

yield return new object[] {"campus", "campuses"};
}

IEnumerator IEnumerable.GetEnumerator()
Expand Down
2 changes: 2 additions & 0 deletions src/Humanizer/InflectorExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ static InflectorExtensions()
AddPlural("([m|l])ouse$", "$1ice");
AddPlural("^(ox)$", "$1en");
AddPlural("(quiz)$", "$1zes");
AddPlural("(campus)$", "$1es");

AddSingular("s$", "");
AddSingular("(n)ews$", "$1ews");
Expand All @@ -95,6 +96,7 @@ static InflectorExtensions()
AddSingular("(vert|ind)ices$", "$1ex");
AddSingular("(matr)ices$", "$1ix");
AddSingular("(quiz)zes$", "$1");
AddSingular("(campus)es$", "$1");

AddIrregular("person", "people");
AddIrregular("man", "men");
Expand Down

0 comments on commit d5b6587

Please sign in to comment.