localized Beneficiary delete

This commit is contained in:
2025-11-17 15:24:58 +05:30
parent 66b2e71140
commit 547f534037
4 changed files with 143 additions and 11 deletions

View File

@@ -22,7 +22,7 @@ class BeneficiaryDetailsScreen extends StatelessWidget {
_showSuccessDialog(context);
} catch (e) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(content: Text('Failed to delete beneficiary: $e')),
SnackBar(content: Text('${AppLocalizations.of(context).failedToDeleteBeneficiary} : $e')),
);
}
}
@@ -32,11 +32,11 @@ class BeneficiaryDetailsScreen extends StatelessWidget {
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: const Text('Success'),
content: const Text('Beneficiary deleted successfully.'),
title: Text(AppLocalizations.of(context).success),
content: Text(AppLocalizations.of(context).beneficiaryDeletedSuccessfully),
actions: <Widget>[
TextButton(
child: const Text('OK'),
child: Text(AppLocalizations.of(context).ok),
onPressed: () {
Navigator.of(context).popUntil((route) => route.isFirst);
},
@@ -52,18 +52,18 @@ class BeneficiaryDetailsScreen extends StatelessWidget {
context: context,
builder: (BuildContext context) {
return AlertDialog(
title: const Text('Delete Beneficiary'),
title: Text(AppLocalizations.of(context).deleteBeneficiary),
content:
const Text('Are you sure you want to delete this beneficiary?'),
Text(AppLocalizations.of(context).areYouSureYouWantToDeleteThisBeneficiary),
actions: <Widget>[
TextButton(
child: const Text('Cancel'),
child: Text(AppLocalizations.of(context).cancel),
onPressed: () {
Navigator.of(context).pop();
},
),
TextButton(
child: const Text('Delete'),
child: Text(AppLocalizations.of(context).delete),
onPressed: () {
_deleteBeneficiary(context);
},