Skip to content

feat: localization of core/swaps - #1643

Merged
ethicnology merged 1 commit into
SatoshiPortal:developfrom
gluneau:localization/core-swaps
Dec 9, 2025
Merged

feat: localization of core/swaps#1643
ethicnology merged 1 commit into
SatoshiPortal:developfrom
gluneau:localization/core-swaps

Conversation

@gluneau

@gluneau gluneau commented Dec 8, 2025

Copy link
Copy Markdown
Contributor

Summary

Localize core/swaps module with 38 new translation keys for swap status display names, swap actions, and status messages.

Changes:

  • Convert SwapStatus.displayName getter to method with BuildContext parameter
  • Convert Swap.swapAction getter to method with BuildContext parameter
  • Convert SwapStatusMessage.getDisplayMessage() to method with BuildContext parameter
  • Convert WalletTransactionStatus.displayName getter to method with BuildContext parameter
  • Add 38 new ARB keys across all 3 language files (en, fr, es)
  • Update transaction UI to use the new localized methods

New ARB Keys (38 total):

Prefix Description Count
coreSwapsStatus* Swap status display names (Pending, In Progress, Completed, Expired, Failed) 5
coreSwapsAction* Swap action labels (Claim, Close, Refund) 3
coreSwapsLnReceive* Lightning receive swap status messages 8
coreSwapsLnSend* Lightning send swap status messages 10
coreSwapsChain* Chain swap status messages 10
coreWalletTransactionStatus* Wallet transaction status display names 2

Files Modified:

  • lib/core/swaps/domain/entity/swap.dart - Localized status/action/message methods
  • lib/core/wallet/domain/entities/wallet_transaction.dart - Localized status displayName
  • lib/features/transactions/ui/screens/transaction_details_screen.dart - Updated swapAction call
  • lib/features/transactions/ui/widgets/transaction_details_table.dart - Updated displayName/getDisplayMessage calls
  • localization/app_en.arb - 38 new English keys
  • localization/app_fr.arb - 38 new French translations
  • localization/app_es.arb - 38 new Spanish translations

Test Plan

  • Run fvm flutter analyze --fatal-warnings --fatal-infos - passes
  • Run python3 linux/validate_localizations.py - passes

Notes

  • Pattern follows the established displayName(context) pattern used in vault_provider.dart
  • The toTranslated() pattern is specifically for error classes, not entity enums

Localize swap status display names, swap actions, and status messages:
- Convert SwapStatus.displayName getter to method with context
- Convert Swap.swapAction getter to method with context
- Convert SwapStatusMessage.getDisplayMessage to method with context
- Convert WalletTransactionStatus.displayName getter to method with context
- Add 38 ARB keys (coreSwaps*, coreWalletTransaction*)
- Update transaction UI to use localized methods
@ethicnology ethicnology self-assigned this Dec 9, 2025
@ethicnology

Copy link
Copy Markdown
Member

#740

@ethicnology
ethicnology merged commit a06d7c1 into SatoshiPortal:develop Dec 9, 2025
1 check passed
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.

2 participants