Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix 'Metadata' being pluralized to 'Metadatas' #1135

Merged
merged 1 commit into from Oct 27, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 7 additions & 3 deletions src/Humanizer.Tests.Shared/InflectorTests.cs
Expand Up @@ -23,6 +23,7 @@

using System.Collections;
using System.Collections.Generic;

using Xunit;

namespace Humanizer.Tests
Expand Down Expand Up @@ -203,8 +204,8 @@ public IEnumerator<object[]> GetEnumerator()
yield return new object[] { "chairman", "chairmen" };
yield return new object[] { "human", "humans" };
yield return new object[] { "personnel", "personnel" };
yield return new object[] { "staff", "staff" };
yield return new object[] { "training", "training" };
yield return new object[] { "staff", "staff" };
yield return new object[] { "training", "training" };

yield return new object[] { "basis", "bases" };
yield return new object[] { "diagnosis", "diagnoses" };
Expand Down Expand Up @@ -363,13 +364,16 @@ public IEnumerator<object[]> GetEnumerator()
yield return new object[] { "rookie", "rookies" };
yield return new object[] { "roomie", "roomies" };
yield return new object[] { "smoothie", "smoothies" };

//Issue #789
yield return new object[] { "cache", "caches" };

//Issue #975, added by Alex Boutin
yield return new object[] { "ex", "exes" };
yield return new object[] { "", "" };

//Issue 1132
yield return new object[] { "metadata", "metadata" };
}

IEnumerator IEnumerable.GetEnumerator()
Expand Down
3 changes: 3 additions & 0 deletions src/Humanizer/Inflections/Vocabularies.cs
Expand Up @@ -143,6 +143,9 @@ private static Vocabulary BuildDefault()
_default.AddUncountable("means");
_default.AddUncountable("mail");

//Fix 1132
_default.AddUncountable("metadata");

return _default;
}
}
Expand Down