Skip to content

Commit

Permalink
localisation
Browse files Browse the repository at this point in the history
  • Loading branch information
Merculiar committed Nov 26, 2024
1 parent 5298db3 commit 2841ee3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ import 'package:flutter/material.dart';
import 'package:kyc_client_dart/kyc_client_dart.dart';

import '../../../../../ui/colors.dart';
import '../../../l10n/l10n.dart';
import 'kyc_status_icon.dart';

class KycStatusWidget extends StatelessWidget {
const KycStatusWidget(
this.status, {
super.key,
});
const KycStatusWidget(this.status, {super.key});

final ValidationStatus status;

Expand All @@ -19,17 +17,17 @@ class KycStatusWidget extends StatelessWidget {
switch (status) {
case ValidationStatus.approved:
backgroundColor = CpColors.greenColor;
statusText = 'Verified';
statusText = context.l10n.verified;
case ValidationStatus.pending:
backgroundColor = CpColors.yellowColor;
statusText = 'Pending';
statusText = context.l10n.pending;
case ValidationStatus.unspecified:
case ValidationStatus.unverified:
backgroundColor = CpColors.greyColor;
statusText = 'Not Verified';
statusText = context.l10n.notVerified;
case ValidationStatus.rejected:
backgroundColor = CpColors.alertRedColor;
statusText = 'Error';
statusText = context.l10n.error;
}

return Row(
Expand Down
6 changes: 5 additions & 1 deletion packages/espressocash_app/lib/l10n/intl_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -976,6 +976,8 @@
"@bankAccountInfoCorrectText": {},
"verified": "Verified",
"@verified": {},
"notVerified": "Not Verified",
"@notVerified": {},
"pendingApproval": "*Pending* approval",
"@pendingApproval": {},
"verificationFailed": "Verification failed",
Expand Down Expand Up @@ -1029,5 +1031,7 @@
"invalidPhone": "Invalid phone",
"@invalidPhone": {},
"failedToSendVerificationCode": "Failed to send verification code",
"@failedToSendVerificationCode": {}
"@failedToSendVerificationCode": {},
"error": "Error",
"@error": {}
}

0 comments on commit 2841ee3

Please sign in to comment.