Skip to content

feat: localization of features/ark - #1627

Merged
ethicnology merged 2 commits into
SatoshiPortal:developfrom
gluneau:localization/core-ark
Dec 8, 2025
Merged

feat: localization of features/ark#1627
ethicnology merged 2 commits into
SatoshiPortal:developfrom
gluneau:localization/core-ark

Conversation

@gluneau

@gluneau gluneau commented Dec 5, 2025

Copy link
Copy Markdown
Contributor

Summary

  • Localize the features/ark UI components by replacing hardcoded strings with context.loc calls
  • Add 13 new ARB keys to all language files (en, fr, es)

Changes

Dart Files Modified (5 files)

  • send_success_page.dart - success title and message
  • collaborative_redeem_bottom_sheet.dart - title, switch label, buttons
  • ark_balance_detail_widget.dart - balance breakdown labels
  • ark_tx_widget.dart - transaction type labels and pending status
  • ark_transaction_details_page.dart - details page title, labels, status

New ARB Keys Added (13 keys)

Key English French Spanish
arkSendSuccessTitle Send Successful Envoi réussi Envío exitoso
arkSendSuccessMessage Your Ark transaction was successful! Votre transaction Ark a été effectuée avec succès ! ¡Tu transacción Ark fue exitosa!
arkBoardingUnconfirmed Boarding Unconfirmed Embarquement non confirmé Embarque sin confirmar
arkBoardingConfirmed Boarding Confirmed Embarquement confirmé Embarque confirmado
arkPreconfirmed Preconfirmed Préconfirmé Preconfirmado
arkSettled Settled Réglé Liquidado
arkAvailable Available Disponible Disponible
arkNoBalanceData No balance data available Aucune donnée de solde disponible No hay datos de saldo disponibles
arkTxPending Pending En attente Pendiente
arkTxBoarding Boarding Embarquement Embarque
arkTxSettlement Settlement Règlement Liquidación
arkTxPayment Payment Paiement Pago
arkSatsUnit sats sats sats

Pattern Used

Refactored ArkTransactionTypeExtension to use toTranslated(context) method for proper localization access:

extension ArkTransactionTypeExtension on ArkTransactionType {
  String toTranslated(BuildContext context) {
    switch (this) {
      case ArkTransactionType.boarding:
        return context.loc.arkTxBoarding;
      // ...
    }
  }
}

Testing

  • validate_localizations.py - passed (2587 keys in sync)
  • fvm flutter gen-l10n - completed successfully
  • fvm flutter analyze lib/features/ark --fatal-warnings --fatal-infos - no issues found

Notes

  • Many ark ARB keys already existed (used existing keys where applicable)
  • New keys were placed after existing ark keys around line 4930 in ARB files
  • The lib/core/ark/ module contains only domain logic with no user-facing strings

Replace hardcoded strings with localized context.loc calls in:
- send_success_page.dart: success title and message
- collaborative_redeem_bottom_sheet.dart: title, switch label, buttons
- ark_balance_detail_widget.dart: balance breakdown labels
- ark_tx_widget.dart: transaction type labels and pending status
- ark_transaction_details_page.dart: details page title, labels, status

Add 13 new ARB keys to all language files (en, fr, es):
- arkSendSuccessTitle, arkSendSuccessMessage
- arkBoardingUnconfirmed, arkBoardingConfirmed
- arkPreconfirmed, arkSettled, arkAvailable
- arkNoBalanceData, arkTxPending
- arkTxBoarding, arkTxSettlement, arkTxPayment
- arkSatsUnit

Refactor ArkTransactionTypeExtension to use toTranslated(context)
method for proper localization access.
@ethicnology ethicnology self-assigned this Dec 5, 2025
@ethicnology

Copy link
Copy Markdown
Member

localization need to be rebased

@ethicnology

Copy link
Copy Markdown
Member

#740

@ethicnology
ethicnology merged commit 1a31c96 into SatoshiPortal:develop Dec 8, 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