Skip to content

Commit be2b0c3

Browse files
authored
fix(ui_localizations, ui_auth): add missing labels (#87)
1 parent e13a6b1 commit be2b0c3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2100
-44
lines changed

packages/firebase_ui_auth/lib/src/screens/email_verification_screen.dart

+5-9
Original file line numberDiff line numberDiff line change
@@ -167,15 +167,11 @@ class __EmailVerificationScreenContentState
167167
mainAxisAlignment: MainAxisAlignment.center,
168168
crossAxisAlignment: CrossAxisAlignment.stretch,
169169
children: [
170-
const Align(
171-
child: Title(text: 'Verify your email'),
170+
Align(
171+
child: Title(text: l.verifyEmailTitle),
172172
),
173173
const SizedBox(height: 32),
174-
const Text(
175-
'A verification email has been sent to your email address. '
176-
'Please check your email and click on the link to verify '
177-
'your email address.',
178-
),
174+
Text(l.verificationEmailSentText),
179175
const SizedBox(height: 32),
180176
if (state == EmailVerificationState.pending)
181177
const Center(child: LoadingIndicator(size: 32, borderWidth: 2))
@@ -193,13 +189,13 @@ class __EmailVerificationScreenContentState
193189
const Center(child: LoadingIndicator(size: 32, borderWidth: 2)),
194190
if (state == EmailVerificationState.unverified) ...[
195191
Text(
196-
"We couldn't verify your email address. ",
192+
l.verificationFailedText,
197193
textAlign: TextAlign.center,
198194
style: TextStyle(color: Theme.of(context).colorScheme.error),
199195
),
200196
const SizedBox(height: 16),
201197
UniversalButton(
202-
text: 'Resend verification email',
198+
text: l.resendVerificationEmailButtonLabel,
203199
onPressed: () {
204200
controller.sendVerificationEmail(
205201
Theme.of(context).platform,

packages/firebase_ui_auth/lib/src/screens/profile_screen.dart

+11-11
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,8 @@ class _EmailVerificationBadgeState extends State<_EmailVerificationBadge> {
356356
return const SizedBox.shrink();
357357
}
358358

359+
final l = FirebaseUILocalizations.labelsOf(context);
360+
359361
return Padding(
360362
padding: const EdgeInsets.only(top: 16),
361363
child: Column(
@@ -374,15 +376,13 @@ class _EmailVerificationBadgeState extends State<_EmailVerificationBadge> {
374376
Subtitle(
375377
text: state == EmailVerificationState.sent ||
376378
state == EmailVerificationState.pending
377-
? 'Verification email sent'
378-
: 'Email is not verified',
379+
? l.verificationEmailSentTextShort
380+
: l.emailIsNotVerifiedText,
379381
fontWeight: FontWeight.bold,
380382
),
381383
if (state == EmailVerificationState.pending) ...[
382384
const SizedBox(height: 8),
383-
const Text(
384-
'Please check your email and click the link to verify your email address.',
385-
),
385+
Text(l.checkEmailHintText),
386386
]
387387
],
388388
),
@@ -393,10 +393,10 @@ class _EmailVerificationBadgeState extends State<_EmailVerificationBadge> {
393393
// ignore: prefer_const_constructors
394394
Row(
395395
mainAxisAlignment: MainAxisAlignment.center,
396-
children: const [
397-
LoadingIndicator(size: 16, borderWidth: 0.5),
398-
SizedBox(width: 16),
399-
Text('Waiting for email verification'),
396+
children: [
397+
const LoadingIndicator(size: 16, borderWidth: 0.5),
398+
const SizedBox(width: 16),
399+
Text(l.waitingForEmailVerificationText),
400400
],
401401
)
402402
else
@@ -409,7 +409,7 @@ class _EmailVerificationBadgeState extends State<_EmailVerificationBadge> {
409409
variant: ButtonVariant.text,
410410
materialColor: Theme.of(context).colorScheme.error,
411411
cupertinoColor: CupertinoColors.destructiveRed,
412-
text: 'Dismiss',
412+
text: l.dismissButtonLabel,
413413
onPressed: () {
414414
setState(service.dismiss);
415415
},
@@ -428,7 +428,7 @@ class _EmailVerificationBadgeState extends State<_EmailVerificationBadge> {
428428
else
429429
UniversalButton(
430430
variant: ButtonVariant.text,
431-
text: 'Ok',
431+
text: l.okButtonLabel,
432432
onPressed: () {
433433
setState(service.dismiss);
434434
},

packages/firebase_ui_auth/lib/src/widgets/phone_input.dart

+3-1
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,8 @@ class PhoneInputState extends State<PhoneInput> {
189189
}
190190

191191
void _showCountryPicker(BuildContext context) {
192+
final l = FirebaseUILocalizations.labelsOf(context);
193+
192194
showCupertinoModalPopup(
193195
context: context,
194196
builder: (context) {
@@ -221,7 +223,7 @@ class PhoneInputState extends State<PhoneInput> {
221223
),
222224
),
223225
CupertinoButton(
224-
child: const Text('Done'),
226+
child: Text(l.doneButtonLabel),
225227
onPressed: () => Navigator.pop(context),
226228
),
227229
],

packages/firebase_ui_localizations/lib/l10n/firebase_ui_ar.arb

+56-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"@@locale": "ar",
3-
"@@last_modified": "2023-08-31T15:49:19.840754",
3+
"@@last_modified": "2023-09-01T13:12:06.522803",
44
"accessDisabledErrorText": "تم إيقاف إذن الوصول إلى هذا الحساب مؤقتًا.",
55
"@accessDisabledErrorText": {
66
"description": "Used as an error message when account is blocked and user tries to perform some actions with the account (e.g. unlinking a credential).",
@@ -428,5 +428,60 @@
428428
"@uploadButtonText": {
429429
"description": "UploadButton label",
430430
"placeholders": {}
431+
},
432+
"verifyEmailTitle": "Verify your email",
433+
"@verifyEmailTitle": {
434+
"description": "EmailVerificationScreen title",
435+
"placeholders": {}
436+
},
437+
"verificationEmailSentText": "A verification email has been sent to your email address. Please check your email and click on the link to verify your email address.",
438+
"@verificationEmailSentText": {
439+
"description": "Hint text indicating that verification email has been sent",
440+
"placeholders": {}
441+
},
442+
"verificationFailedText": "We couldn't verify your email address. ",
443+
"@verificationFailedText": {
444+
"description": "Message indicating that something went wrong during email verification",
445+
"placeholders": {}
446+
},
447+
"resendVerificationEmailButtonLabel": "Resend verification email",
448+
"@resendVerificationEmailButtonLabel": {
449+
"description": "Button label that suggests to resend verification email",
450+
"placeholders": {}
451+
},
452+
"verificationEmailSentTextShort": "Verification email sent",
453+
"@verificationEmailSentTextShort": {
454+
"description": "Short version of the hint text indicating that verification email has been sent",
455+
"placeholders": {}
456+
},
457+
"emailIsNotVerifiedText": "Email is not verified",
458+
"@emailIsNotVerifiedText": {
459+
"description": "Message indicating that email is not verified",
460+
"placeholders": {}
461+
},
462+
"waitingForEmailVerificationText": "Waiting for email verification",
463+
"@waitingForEmailVerificationText": {
464+
"description": "Message indicating that email is being verified",
465+
"placeholders": {}
466+
},
467+
"dismissButtonLabel": "Dismiss",
468+
"@dismiss": {
469+
"description": "Dissmiss button label",
470+
"placeholders": {}
471+
},
472+
"okButtonLabel": "OK",
473+
"@okButtonLabel": {
474+
"description": "OK button label",
475+
"placeholders": {}
476+
},
477+
"checkEmailHintText": "Please check your email and click the link to verify your email address.",
478+
"@checkEmailHintText": {
479+
"description": "Hint text prompting the user to check email for verification link",
480+
"placeholders": {}
481+
},
482+
"doneButtonLabel": "Done",
483+
"@doneButtonLabel": {
484+
"description": "Done button label",
485+
"placeholders": {}
431486
}
432487
}

packages/firebase_ui_localizations/lib/l10n/firebase_ui_de.arb

+56-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"@@locale": "de",
3-
"@@last_modified": "2023-08-31T15:49:19.835367",
3+
"@@last_modified": "2023-09-01T13:12:06.516313",
44
"accessDisabledErrorText": "Der Zugriff auf dieses Konto wurde vorübergehend gesperrt",
55
"@accessDisabledErrorText": {
66
"description": "Used as an error message when account is blocked and user tries to perform some actions with the account (e.g. unlinking a credential).",
@@ -428,5 +428,60 @@
428428
"@uploadButtonText": {
429429
"description": "UploadButton label",
430430
"placeholders": {}
431+
},
432+
"verifyEmailTitle": "Verify your email",
433+
"@verifyEmailTitle": {
434+
"description": "EmailVerificationScreen title",
435+
"placeholders": {}
436+
},
437+
"verificationEmailSentText": "A verification email has been sent to your email address. Please check your email and click on the link to verify your email address.",
438+
"@verificationEmailSentText": {
439+
"description": "Hint text indicating that verification email has been sent",
440+
"placeholders": {}
441+
},
442+
"verificationFailedText": "We couldn't verify your email address. ",
443+
"@verificationFailedText": {
444+
"description": "Message indicating that something went wrong during email verification",
445+
"placeholders": {}
446+
},
447+
"resendVerificationEmailButtonLabel": "Resend verification email",
448+
"@resendVerificationEmailButtonLabel": {
449+
"description": "Button label that suggests to resend verification email",
450+
"placeholders": {}
451+
},
452+
"verificationEmailSentTextShort": "Verification email sent",
453+
"@verificationEmailSentTextShort": {
454+
"description": "Short version of the hint text indicating that verification email has been sent",
455+
"placeholders": {}
456+
},
457+
"emailIsNotVerifiedText": "Email is not verified",
458+
"@emailIsNotVerifiedText": {
459+
"description": "Message indicating that email is not verified",
460+
"placeholders": {}
461+
},
462+
"waitingForEmailVerificationText": "Waiting for email verification",
463+
"@waitingForEmailVerificationText": {
464+
"description": "Message indicating that email is being verified",
465+
"placeholders": {}
466+
},
467+
"dismissButtonLabel": "Dismiss",
468+
"@dismiss": {
469+
"description": "Dissmiss button label",
470+
"placeholders": {}
471+
},
472+
"okButtonLabel": "OK",
473+
"@okButtonLabel": {
474+
"description": "OK button label",
475+
"placeholders": {}
476+
},
477+
"checkEmailHintText": "Please check your email and click the link to verify your email address.",
478+
"@checkEmailHintText": {
479+
"description": "Hint text prompting the user to check email for verification link",
480+
"placeholders": {}
481+
},
482+
"doneButtonLabel": "Done",
483+
"@doneButtonLabel": {
484+
"description": "Done button label",
485+
"placeholders": {}
431486
}
432487
}

packages/firebase_ui_localizations/lib/l10n/firebase_ui_en.arb

+56-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"@@locale": "en",
3-
"@@last_modified": "2023-08-31T15:49:19.843264",
3+
"@@last_modified": "2023-09-01T13:12:06.523448",
44
"accessDisabledErrorText": "Access to this account has been temporarily disabled",
55
"@accessDisabledErrorText": {
66
"description": "Used as an error message when account is blocked and user tries to perform some actions with the account (e.g. unlinking a credential).",
@@ -428,5 +428,60 @@
428428
"@uploadButtonText": {
429429
"description": "UploadButton label",
430430
"placeholders": {}
431+
},
432+
"verifyEmailTitle": "Verify your email",
433+
"@verifyEmailTitle": {
434+
"description": "EmailVerificationScreen title",
435+
"placeholders": {}
436+
},
437+
"verificationEmailSentText": "A verification email has been sent to your email address. Please check your email and click on the link to verify your email address.",
438+
"@verificationEmailSentText": {
439+
"description": "Hint text indicating that verification email has been sent",
440+
"placeholders": {}
441+
},
442+
"verificationFailedText": "We couldn't verify your email address. ",
443+
"@verificationFailedText": {
444+
"description": "Message indicating that something went wrong during email verification",
445+
"placeholders": {}
446+
},
447+
"resendVerificationEmailButtonLabel": "Resend verification email",
448+
"@resendVerificationEmailButtonLabel": {
449+
"description": "Button label that suggests to resend verification email",
450+
"placeholders": {}
451+
},
452+
"verificationEmailSentTextShort": "Verification email sent",
453+
"@verificationEmailSentTextShort": {
454+
"description": "Short version of the hint text indicating that verification email has been sent",
455+
"placeholders": {}
456+
},
457+
"emailIsNotVerifiedText": "Email is not verified",
458+
"@emailIsNotVerifiedText": {
459+
"description": "Message indicating that email is not verified",
460+
"placeholders": {}
461+
},
462+
"waitingForEmailVerificationText": "Waiting for email verification",
463+
"@waitingForEmailVerificationText": {
464+
"description": "Message indicating that email is being verified",
465+
"placeholders": {}
466+
},
467+
"dismissButtonLabel": "Dismiss",
468+
"@dismiss": {
469+
"description": "Dissmiss button label",
470+
"placeholders": {}
471+
},
472+
"okButtonLabel": "OK",
473+
"@okButtonLabel": {
474+
"description": "OK button label",
475+
"placeholders": {}
476+
},
477+
"checkEmailHintText": "Please check your email and click the link to verify your email address.",
478+
"@checkEmailHintText": {
479+
"description": "Hint text prompting the user to check email for verification link",
480+
"placeholders": {}
481+
},
482+
"doneButtonLabel": "Done",
483+
"@doneButtonLabel": {
484+
"description": "Done button label",
485+
"placeholders": {}
431486
}
432487
}

packages/firebase_ui_localizations/lib/l10n/firebase_ui_es.arb

+56-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"@@locale": "es",
3-
"@@last_modified": "2023-08-31T15:49:19.812582",
3+
"@@last_modified": "2023-09-01T13:12:06.492378",
44
"accessDisabledErrorText": "Se ha inhabilitado temporalmente al acceso a esta cuenta",
55
"@accessDisabledErrorText": {
66
"description": "Used as an error message when account is blocked and user tries to perform some actions with the account (e.g. unlinking a credential).",
@@ -428,5 +428,60 @@
428428
"@uploadButtonText": {
429429
"description": "UploadButton label",
430430
"placeholders": {}
431+
},
432+
"verifyEmailTitle": "Verify your email",
433+
"@verifyEmailTitle": {
434+
"description": "EmailVerificationScreen title",
435+
"placeholders": {}
436+
},
437+
"verificationEmailSentText": "A verification email has been sent to your email address. Please check your email and click on the link to verify your email address.",
438+
"@verificationEmailSentText": {
439+
"description": "Hint text indicating that verification email has been sent",
440+
"placeholders": {}
441+
},
442+
"verificationFailedText": "We couldn't verify your email address. ",
443+
"@verificationFailedText": {
444+
"description": "Message indicating that something went wrong during email verification",
445+
"placeholders": {}
446+
},
447+
"resendVerificationEmailButtonLabel": "Resend verification email",
448+
"@resendVerificationEmailButtonLabel": {
449+
"description": "Button label that suggests to resend verification email",
450+
"placeholders": {}
451+
},
452+
"verificationEmailSentTextShort": "Verification email sent",
453+
"@verificationEmailSentTextShort": {
454+
"description": "Short version of the hint text indicating that verification email has been sent",
455+
"placeholders": {}
456+
},
457+
"emailIsNotVerifiedText": "Email is not verified",
458+
"@emailIsNotVerifiedText": {
459+
"description": "Message indicating that email is not verified",
460+
"placeholders": {}
461+
},
462+
"waitingForEmailVerificationText": "Waiting for email verification",
463+
"@waitingForEmailVerificationText": {
464+
"description": "Message indicating that email is being verified",
465+
"placeholders": {}
466+
},
467+
"dismissButtonLabel": "Dismiss",
468+
"@dismiss": {
469+
"description": "Dissmiss button label",
470+
"placeholders": {}
471+
},
472+
"okButtonLabel": "OK",
473+
"@okButtonLabel": {
474+
"description": "OK button label",
475+
"placeholders": {}
476+
},
477+
"checkEmailHintText": "Please check your email and click the link to verify your email address.",
478+
"@checkEmailHintText": {
479+
"description": "Hint text prompting the user to check email for verification link",
480+
"placeholders": {}
481+
},
482+
"doneButtonLabel": "Done",
483+
"@doneButtonLabel": {
484+
"description": "Done button label",
485+
"placeholders": {}
431486
}
432487
}

0 commit comments

Comments
 (0)