Skip to content

Commit 9c41e59

Browse files
committed
feat(localization): add resend verification code button label
- Add new localization strings for both Arabic and English - Implement placeholder for seconds in cooldown period - Update existing localization files for both languages
1 parent 83e68f0 commit 9c41e59

File tree

5 files changed

+35
-1
lines changed

5 files changed

+35
-1
lines changed

lib/l10n/app_localizations.dart

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,12 @@ abstract class AppLocalizations {
158158
/// **'Send Code'**
159159
String get requestCodeSendCodeButton;
160160

161+
/// Button label for resending the verification code after a cooldown
162+
///
163+
/// In en, this message translates to:
164+
/// **'Resend in {seconds}s'**
165+
String requestCodeResendButtonCooldown(int seconds);
166+
161167
/// Title for the email code verification page
162168
///
163169
/// In en, this message translates to:

lib/l10n/app_localizations_ar.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ class AppLocalizationsAr extends AppLocalizations {
4242
@override
4343
String get requestCodeSendCodeButton => 'إرسال الرمز';
4444

45+
@override
46+
String requestCodeResendButtonCooldown(int seconds) {
47+
return 'إعادة الإرسال في $seconds ثانية';
48+
}
49+
4550
@override
4651
String get emailCodeSentPageTitle => 'التحقق من الرمز';
4752

lib/l10n/app_localizations_en.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,11 @@ class AppLocalizationsEn extends AppLocalizations {
4141
@override
4242
String get requestCodeSendCodeButton => 'Send Code';
4343

44+
@override
45+
String requestCodeResendButtonCooldown(int seconds) {
46+
return 'Resend in ${seconds}s';
47+
}
48+
4449
@override
4550
String get emailCodeSentPageTitle => 'Verify Code';
4651

lib/l10n/arb/app_ar.arb

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@
3939
"@requestCodeSendCodeButton": {
4040
"description": "تسمية زر إرسال رمز التحقق"
4141
},
42+
"requestCodeResendButtonCooldown": "إعادة الإرسال في {seconds} ثانية",
43+
"@requestCodeResendButtonCooldown": {
44+
"description": "تسمية زر إعادة إرسال رمز التحقق بعد فترة تهدئة",
45+
"placeholders": {
46+
"seconds": {
47+
"type": "int"
48+
}
49+
}
50+
},
4251
"emailCodeSentPageTitle": "التحقق من الرمز",
4352
"@emailCodeSentPageTitle": {
4453
"description": "عنوان صفحة التحقق من رمز البريد الإلكتروني"
@@ -1067,4 +1076,4 @@
10671076
"@feedActionTypeEnableNotifications": {
10681077
"description": "نوع إجراء الموجز لتفعيل الإشعارات"
10691078
}
1070-
}
1079+
}

lib/l10n/arb/app_en.arb

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,15 @@
3939
"@requestCodeSendCodeButton": {
4040
"description": "Button label for sending the verification code"
4141
},
42+
"requestCodeResendButtonCooldown": "Resend in {seconds}s",
43+
"@requestCodeResendButtonCooldown": {
44+
"description": "Button label for resending the verification code after a cooldown",
45+
"placeholders": {
46+
"seconds": {
47+
"type": "int"
48+
}
49+
}
50+
},
4251
"emailCodeSentPageTitle": "Verify Code",
4352
"@emailCodeSentPageTitle": {
4453
"description": "Title for the email code verification page"

0 commit comments

Comments
 (0)