Files
sure/test/lib
Juan José Mata 051197137c Fix Polish translation template error (and increase testing/fix other locales as well) (#734)
* Add Polish locale support for money formatting

The Money::Formatting module handles locale-specific currency formatting
for French, German, Spanish, Italian, and Portuguese (Brazil), but was
missing support for Polish locale. This caused formatting issues when
users with Polish locale viewed account valuations.

- Add Polish locale handling to locale_options method
- Polish formatting uses: space as thousands delimiter, comma as
  decimal separator, symbol after number ("%n %u" format)
- Add test coverage for Polish locale formatting

* Add locale support for all supported locales in Money::Formatting

Extend the Money::Formatting module to handle all locales from
SUPPORTED_LOCALES to prevent template errors when users select
different languages.

Added locale-specific formatting for:
- Turkish (tr): dot delimiter, comma separator, symbol after number
- Norwegian Bokmål (nb): space delimiter, comma separator, symbol after
- Catalan (ca): dot delimiter, comma separator, symbol after number
- Romanian (ro): dot delimiter, comma separator, symbol after number
- Dutch (nl): dot delimiter, comma separator, symbol before number

Also improved Dutch handling to work with all currencies (not just EUR).

Added comprehensive tests for:
- All newly supported locales
- Chinese (zh-CN, zh-TW) which use default English-style formatting
- A test that verifies all SUPPORTED_LOCALES can format without errors

* Fix broken money formatting tests

- Fix Chinese Traditional locale test: TWD currency uses "TW$" symbol
  (prefixed with first 2 chars of ISO code to distinguish from USD)
- Fix all supported locales test: replace assert_nothing_raised (which
  doesn't accept message argument in Minitest) with explicit assertions

* Refactor Money::Formatting to consolidate locale patterns

Group locales by their formatting patterns into constants to reduce
repetition and make it easier to add new locales:

- EUROPEAN_SYMBOL_AFTER: de, es, it, tr, ca, ro
  (dot delimiter, comma separator, symbol after)
- SPACE_DELIMITER_SYMBOL_AFTER: pl, nb
  (space delimiter, comma separator, symbol after)
- EUROPEAN_SYMBOL_BEFORE: nl, pt-BR
  (dot delimiter, comma separator, symbol before)

French locale remains separate due to its unique non-breaking space usage.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-01-22 14:27:12 +01:00
..