From 0aceb2f441062d04689ca08735cfe9d645094737 Mon Sep 17 00:00:00 2001 From: Arseni Date: Fri, 6 Mar 2026 18:05:04 +0300 Subject: [PATCH] added missed loc instead of hardcode --- .../dashboard/balance/source_actions.dart | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/frontend/pweb/lib/controllers/dashboard/balance/source_actions.dart b/frontend/pweb/lib/controllers/dashboard/balance/source_actions.dart index c055e5c6..a2df9f83 100644 --- a/frontend/pweb/lib/controllers/dashboard/balance/source_actions.dart +++ b/frontend/pweb/lib/controllers/dashboard/balance/source_actions.dart @@ -1,6 +1,7 @@ import 'package:flutter/material.dart'; import 'package:go_router/go_router.dart'; + import 'package:provider/provider.dart'; import 'package:pshared/controllers/payment/source.dart'; @@ -8,6 +9,8 @@ import 'package:pshared/models/payment/type.dart'; import 'package:pweb/app/router/payout_routes.dart'; +import 'package:pweb/generated/i18n/app_localizations.dart'; + class BalanceActionButtonState { final String label; @@ -41,19 +44,20 @@ class BalanceSourceActionsController { required String walletRef, required VoidCallback onAddFunds, }) { + final l10n = AppLocalizations.of(context)!; return BalanceActionsState( topLeading: BalanceActionButtonState( - label: 'Operation History', + label: l10n.operationfryTitle, icon: Icons.history_rounded, onPressed: () => _openWalletOperationHistory(context, walletRef), ), topTrailing: BalanceActionButtonState( - label: 'Send Payout', + label: l10n.send, icon: Icons.send_rounded, onPressed: () => _sendWalletPayout(context, walletRef), ), bottom: BalanceActionButtonState( - label: 'Wallet Details / Add Funds', + label: '${l10n.details} / ${l10n.addFunds}', icon: Icons.account_balance_wallet_rounded, onPressed: onAddFunds, ), @@ -66,19 +70,20 @@ class BalanceSourceActionsController { required VoidCallback onAddFunds, required VoidCallback onWalletDetails, }) { + final l10n = AppLocalizations.of(context)!; return BalanceActionsState( topLeading: BalanceActionButtonState( - label: 'Operation History / Wallet Details', + label: '${l10n.operationfryTitle} / ${l10n.details}', icon: Icons.receipt_long_rounded, onPressed: onWalletDetails, ), topTrailing: BalanceActionButtonState( - label: 'Send Payout', + label: l10n.send, icon: Icons.send_rounded, onPressed: () => _sendLedgerPayout(context, ledgerAccountRef), ), bottom: BalanceActionButtonState( - label: 'Add Funds', + label: l10n.addFunds, icon: Icons.add_card_rounded, onPressed: onAddFunds, ),