Skip to content

feat(i18n): implement localized number formatting for fashion financing amounts (#17) - #22

Open
maxx-GENIUS wants to merge 3 commits into
Stellar-Threads:mainfrom
maxx-GENIUS:feat/issue-17-localized-number-formatting
Open

maxx-GENIUS wants to merge 3 commits into
Stellar-Threads:mainfrom
maxx-GENIUS:feat/issue-17-localized-number-formatting

Conversation

@maxx-GENIUS

Copy link
Copy Markdown

Summary

Resolves #17 by implementing locale-aware numeric and crypto currency formatting across the Production Financing interface, backed by an isolated unit test suite.

Key Changes

  • Formatting Utilities (src/lib/format.ts): Added formatLocaleNumber and formatCryptoAmount wrapping Intl.NumberFormat with configurable precision and locale fallbacks.
  • Production Financing Integration (src/components/financing/ProductionFinancingSection.tsx): Integrated locale formatting into contribution math and proposal display values.
  • Unit Test Suite (src/__tests__/format.test.ts): Verified thousands separators, decimal precision, regional locales (e.g., German period separators), comma-separated strings, and null/undefined handling.

Verification

  • Tested with Vitest across all test cases.
  • Zero conflicts with base branch main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement localized number formatting for fashion financing amounts

1 participant