fix(money): use the en-IE locale key when formatting euros

Merged
KE
21d ago
+11-1

The EUR punctuation override in Money::Formatting was keyed as :en_IE, but the Irish English locale in this app is en-IE (config/locales/defaults/en-IE.yml and the language picker).

Euro's own defaults use European grouping (1.234,50). The :en override already switches that to 1,234.50. Because the Irish key never matched, Money.new(1234.5, "EUR").format in en-IE kept the European punctuation instead of the English grouping used in the locale file.

This updates the comparison to :"en-IE" and keeps :en_IE as well. A test asserts that euros in en-IE format as €1,234.50.


Summary by cubic

Fixes euro formatting in Irish English (en-IE) so amounts use English grouping (€1,234.50) instead of the currency's European punctuation (1.234,50).

The EUR override previously matched only :en_IE, which never fired; it now accepts both :"en-IE" and :en_IE.

Summary by CodeRabbit

  • Bug Fixes
    • EUR amounts formatted with the en-IE locale now use comma grouping and a period decimal separator.