diff --git a/release_notes.md b/release_notes.md index 8ecfc7543..bd3b4af56 100644 --- a/release_notes.md +++ b/release_notes.md @@ -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) diff --git a/src/Humanizer.Tests/InflectorTests.cs b/src/Humanizer.Tests/InflectorTests.cs index cfbfbaf03..723d95767 100644 --- a/src/Humanizer.Tests/InflectorTests.cs +++ b/src/Humanizer.Tests/InflectorTests.cs @@ -248,6 +248,8 @@ public IEnumerator GetEnumerator() yield return new object[] {"fungus", "fungi"}; yield return new object[] {"wave","waves"}; + + yield return new object[] {"campus", "campuses"}; } IEnumerator IEnumerable.GetEnumerator() diff --git a/src/Humanizer/InflectorExtensions.cs b/src/Humanizer/InflectorExtensions.cs index c15dbc16d..e0ea8bde6 100644 --- a/src/Humanizer/InflectorExtensions.cs +++ b/src/Humanizer/InflectorExtensions.cs @@ -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"); @@ -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");