From 71b44d174c20ecd485ce41e7acb0b38a8939e93a Mon Sep 17 00:00:00 2001 From: Simon Cropp Date: Thu, 22 Feb 2024 21:20:28 +1100 Subject: [PATCH] remove redundant parameter --- .../BulgarianNumberToWordsConverter.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Humanizer/Localisation/NumberToWords/BulgarianNumberToWordsConverter.cs b/src/Humanizer/Localisation/NumberToWords/BulgarianNumberToWordsConverter.cs index 8e4951b08..3d5b090d7 100644 --- a/src/Humanizer/Localisation/NumberToWords/BulgarianNumberToWordsConverter.cs +++ b/src/Humanizer/Localisation/NumberToWords/BulgarianNumberToWordsConverter.cs @@ -35,9 +35,9 @@ class BulgarianNumberToWordsConverter : GenderedNumberToWordsConverter ]; public override string Convert(long input, GrammaticalGender gender, bool addAnd = true) => - Convert(input, gender, false); + InnerConvert(input, gender, false); - static string Convert(long input, GrammaticalGender gender, bool isOrdinal, bool addAnd = true) + static string InnerConvert(long input, GrammaticalGender gender, bool isOrdinal) { if (input is > int.MaxValue or < int.MinValue) { @@ -61,20 +61,20 @@ static string Convert(long input, GrammaticalGender gender, bool isOrdinal, bool if (input / 1000000000 > 0) { - parts.Add(input < 2000000000 ? "един милиард" : Convert(input / 1000000000, gender, false) + " милиарда"); + parts.Add(input < 2000000000 ? "един милиард" : InnerConvert(input / 1000000000, gender, false) + " милиарда"); if (isOrdinal) - lastOrdinalSubstitution = Convert(input / 1000000000, gender, false) + " милиард" + + lastOrdinalSubstitution = InnerConvert(input / 1000000000, gender, false) + " милиард" + GetEndingForGender(gender, input); input %= 1000000000; } if (input / 1000000 > 0) { - parts.Add(input < 2000000 ? "един милион" : Convert(input / 1000000, gender, false) + " милиона"); + parts.Add(input < 2000000 ? "един милион" : InnerConvert(input / 1000000, gender, false) + " милиона"); if (isOrdinal) - lastOrdinalSubstitution = Convert(input / 1000000, gender, false) + " милион" + + lastOrdinalSubstitution = InnerConvert(input / 1000000, gender, false) + " милион" + GetEndingForGender(gender, input); input %= 1000000; @@ -86,11 +86,11 @@ static string Convert(long input, GrammaticalGender gender, bool isOrdinal, bool parts.Add("хиляда"); else { - parts.Add(Convert(input / 1000, gender, false) + " хиляди"); + parts.Add(InnerConvert(input / 1000, gender, false) + " хиляди"); } if (isOrdinal) - lastOrdinalSubstitution = Convert(input / 1000, gender, false) + " хиляд" + + lastOrdinalSubstitution = InnerConvert(input / 1000, gender, false) + " хиляд" + GetEndingForGender(gender, input); input %= 1000; @@ -136,7 +136,7 @@ static string Convert(long input, GrammaticalGender gender, bool isOrdinal, bool } public override string ConvertToOrdinal(int input, GrammaticalGender gender) => - Convert(input, gender, true); + InnerConvert(input, gender, true); static string GetEndingForGender(GrammaticalGender gender, long input) {