Skip to content

Commit

Permalink
Improved captions
Browse files Browse the repository at this point in the history
  • Loading branch information
sven-n committed Sep 9, 2024
1 parent 6495fdf commit 90e4477
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/Web/AdminPanel/CaptionHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ public static class CaptionHelper
public static string SeparateWords(string input)
{
return WordSeparatorRegex.Replace(input, "$1 $2")
.Replace(" Definition", "s");
.Replace(" Definitions", "s", StringComparison.InvariantCulture)
.Replace(" Definition", "s", StringComparison.InvariantCulture);
}

/// <summary>
Expand All @@ -50,7 +51,9 @@ public static string GetTypeCaption(Type type)
public static string GetPluralizedTypeCaption(Type type)
{
var result = GetTypeCaption(type);
return result.Replace(" Definition", "s", StringComparison.InvariantCulture);
return result
.Replace(" Definitions", "s", StringComparison.InvariantCulture)
.Replace(" Definition", "s", StringComparison.InvariantCulture);
}

/// <summary>
Expand Down

0 comments on commit 90e4477

Please sign in to comment.