Skip to content

Commit c055aa8

Browse files
Apply suggestion from @Copilot
Co-authored-by: Copilot <[email protected]>
1 parent 537638e commit c055aa8

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Humanizer/Localisation/NumberToWords/CatalanNumberToWordsConverter.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,8 @@ private string GetOrdinalTens(int number, GrammaticalGender gender)
181181
{
182182
var tensDec = tens[dec];
183183
if (dec == 3 || dec == 6 || dec == 7 || dec == 8 || dec == 9)
184-
tensDec = tensDec.Substring(0, tensDec.Length - 1); //
184+
// Remove the trailing 'a' from the tens word before adding the ordinal suffix (e.g., "trenta" -> "trentè")
185+
tensDec = tensDec.Substring(0, tensDec.Length - 1);
185186

186187
return tensDec + ordSuf;
187188
}

0 commit comments

Comments
 (0)