* 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>
* fix: Locale-aware currency formatting
Add locale-specific formatting for money display:
- French (fr): symbol after number with non-breaking space (1 000,12 €)
- German (de): symbol after number (1.000,12 €)
- Spanish (es): symbol after number (1.000,12 €)
- Italian (it): symbol after number (1.000,12 €)
- Portuguese-Brazil (pt-BR): symbol before with space (R$ 1.000,12)
This follows international conventions where most European languages
place the currency symbol after the number, unlike English.
* fix: Address CodeRabbit review comments
- Use non-breaking spaces (NBSP) for French locale formatting
- Add nil guard in locale_options to prevent NoMethodError
- Add test coverage for Portuguese (Brazil) locale
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Since the very first 0.1.0-alpha.1 release, we've been moving quickly to add new features to the Maybe app. In doing so, some parts of the codebase have become outdated, unnecessary, or overly-complex as a natural result of this feature prioritization.
Now that "core" Maybe is complete, we're moving into a second phase of development where we'll be working hard to improve the accuracy of existing features and build additional features on top of "core". This PR is a quick overhaul of the existing codebase aimed to:
- Establish the brand new and simplified dashboard view (pictured above)
- Establish and move towards the conventions introduced in Cursor rules and project design overview #1788
- Consolidate layouts and improve the performance of layout queries
- Organize the core models of the Maybe domain (i.e. Account::Entry, Account::Transaction, etc.) and break out specific traits of each model into dedicated concerns for better readability
- Remove stale / dead code from codebase
- Remove overly complex code paths in favor of simpler ones
* Add step method to currency
* Change amount placeholder and step, when currency select change
* Lint
* Add test with auth
* Extract request to specific service
* Support all currencies, handle outside DB
* Remove currencies from seed
* Fix account balance namespace
* Set default currency on authentication
* Cache currency instances
* Implement multi-currency syncs with tests
* Series fallback, passing tests
* Fix conflicts
* Make value group concrete class that works with currency values
* Fix migration conflict
* Update tests to expect multi-currency results
* Update account list to use group method
* Namespace updates
* Fetch unknown exchange rates from API
* Fix date range bug
* Ensure demo data works without external API
* Enforce cascades only at DB level