Skip to content

fix(ui_localizations, ui_auth): add missing labels #87

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -167,15 +167,11 @@ class __EmailVerificationScreenContentState
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
const Align(
child: Title(text: 'Verify your email'),
Align(
child: Title(text: l.verifyEmailTitle),
),
const SizedBox(height: 32),
const Text(
'A verification email has been sent to your email address. '
'Please check your email and click on the link to verify '
'your email address.',
),
Text(l.verificationEmailSentText),
const SizedBox(height: 32),
if (state == EmailVerificationState.pending)
const Center(child: LoadingIndicator(size: 32, borderWidth: 2))
Expand All @@ -193,13 +189,13 @@ class __EmailVerificationScreenContentState
const Center(child: LoadingIndicator(size: 32, borderWidth: 2)),
if (state == EmailVerificationState.unverified) ...[
Text(
"We couldn't verify your email address. ",
l.verificationFailedText,
textAlign: TextAlign.center,
style: TextStyle(color: Theme.of(context).colorScheme.error),
),
const SizedBox(height: 16),
UniversalButton(
text: 'Resend verification email',
text: l.resendVerificationEmailButtonLabel,
onPressed: () {
controller.sendVerificationEmail(
Theme.of(context).platform,
Expand Down
22 changes: 11 additions & 11 deletions packages/firebase_ui_auth/lib/src/screens/profile_screen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,8 @@ class _EmailVerificationBadgeState extends State<_EmailVerificationBadge> {
return const SizedBox.shrink();
}

final l = FirebaseUILocalizations.labelsOf(context);

return Padding(
padding: const EdgeInsets.only(top: 16),
child: Column(
Expand All @@ -374,15 +376,13 @@ class _EmailVerificationBadgeState extends State<_EmailVerificationBadge> {
Subtitle(
text: state == EmailVerificationState.sent ||
state == EmailVerificationState.pending
? 'Verification email sent'
: 'Email is not verified',
? l.verificationEmailSentTextShort
: l.emailIsNotVerifiedText,
fontWeight: FontWeight.bold,
),
if (state == EmailVerificationState.pending) ...[
const SizedBox(height: 8),
const Text(
'Please check your email and click the link to verify your email address.',
),
Text(l.checkEmailHintText),
]
],
),
Expand All @@ -393,10 +393,10 @@ class _EmailVerificationBadgeState extends State<_EmailVerificationBadge> {
// ignore: prefer_const_constructors
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: const [
LoadingIndicator(size: 16, borderWidth: 0.5),
SizedBox(width: 16),
Text('Waiting for email verification'),
children: [
const LoadingIndicator(size: 16, borderWidth: 0.5),
const SizedBox(width: 16),
Text(l.waitingForEmailVerificationText),
],
)
else
Expand All @@ -409,7 +409,7 @@ class _EmailVerificationBadgeState extends State<_EmailVerificationBadge> {
variant: ButtonVariant.text,
materialColor: Theme.of(context).colorScheme.error,
cupertinoColor: CupertinoColors.destructiveRed,
text: 'Dismiss',
text: l.dismissButtonLabel,
onPressed: () {
setState(service.dismiss);
},
Expand All @@ -428,7 +428,7 @@ class _EmailVerificationBadgeState extends State<_EmailVerificationBadge> {
else
UniversalButton(
variant: ButtonVariant.text,
text: 'Ok',
text: l.okButtonLabel,
onPressed: () {
setState(service.dismiss);
},
Expand Down
4 changes: 3 additions & 1 deletion packages/firebase_ui_auth/lib/src/widgets/phone_input.dart
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ class PhoneInputState extends State<PhoneInput> {
}

void _showCountryPicker(BuildContext context) {
final l = FirebaseUILocalizations.labelsOf(context);

showCupertinoModalPopup(
context: context,
builder: (context) {
Expand Down Expand Up @@ -221,7 +223,7 @@ class PhoneInputState extends State<PhoneInput> {
),
),
CupertinoButton(
child: const Text('Done'),
child: Text(l.doneButtonLabel),
onPressed: () => Navigator.pop(context),
),
],
Expand Down
57 changes: 56 additions & 1 deletion packages/firebase_ui_localizations/lib/l10n/firebase_ui_ar.arb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"@@locale": "ar",
"@@last_modified": "2023-08-31T15:49:19.840754",
"@@last_modified": "2023-09-01T13:12:06.522803",
"accessDisabledErrorText": "تم إيقاف إذن الوصول إلى هذا الحساب مؤقتًا.",
"@accessDisabledErrorText": {
"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).",
Expand Down Expand Up @@ -428,5 +428,60 @@
"@uploadButtonText": {
"description": "UploadButton label",
"placeholders": {}
},
"verifyEmailTitle": "Verify your email",
"@verifyEmailTitle": {
"description": "EmailVerificationScreen title",
"placeholders": {}
},
"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.",
"@verificationEmailSentText": {
"description": "Hint text indicating that verification email has been sent",
"placeholders": {}
},
"verificationFailedText": "We couldn't verify your email address. ",
"@verificationFailedText": {
"description": "Message indicating that something went wrong during email verification",
"placeholders": {}
},
"resendVerificationEmailButtonLabel": "Resend verification email",
"@resendVerificationEmailButtonLabel": {
"description": "Button label that suggests to resend verification email",
"placeholders": {}
},
"verificationEmailSentTextShort": "Verification email sent",
"@verificationEmailSentTextShort": {
"description": "Short version of the hint text indicating that verification email has been sent",
"placeholders": {}
},
"emailIsNotVerifiedText": "Email is not verified",
"@emailIsNotVerifiedText": {
"description": "Message indicating that email is not verified",
"placeholders": {}
},
"waitingForEmailVerificationText": "Waiting for email verification",
"@waitingForEmailVerificationText": {
"description": "Message indicating that email is being verified",
"placeholders": {}
},
"dismissButtonLabel": "Dismiss",
"@dismiss": {
"description": "Dissmiss button label",
"placeholders": {}
},
"okButtonLabel": "OK",
"@okButtonLabel": {
"description": "OK button label",
"placeholders": {}
},
"checkEmailHintText": "Please check your email and click the link to verify your email address.",
"@checkEmailHintText": {
"description": "Hint text prompting the user to check email for verification link",
"placeholders": {}
},
"doneButtonLabel": "Done",
"@doneButtonLabel": {
"description": "Done button label",
"placeholders": {}
}
}
57 changes: 56 additions & 1 deletion packages/firebase_ui_localizations/lib/l10n/firebase_ui_de.arb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"@@locale": "de",
"@@last_modified": "2023-08-31T15:49:19.835367",
"@@last_modified": "2023-09-01T13:12:06.516313",
"accessDisabledErrorText": "Der Zugriff auf dieses Konto wurde vorübergehend gesperrt",
"@accessDisabledErrorText": {
"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).",
Expand Down Expand Up @@ -428,5 +428,60 @@
"@uploadButtonText": {
"description": "UploadButton label",
"placeholders": {}
},
"verifyEmailTitle": "Verify your email",
"@verifyEmailTitle": {
"description": "EmailVerificationScreen title",
"placeholders": {}
},
"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.",
"@verificationEmailSentText": {
"description": "Hint text indicating that verification email has been sent",
"placeholders": {}
},
"verificationFailedText": "We couldn't verify your email address. ",
"@verificationFailedText": {
"description": "Message indicating that something went wrong during email verification",
"placeholders": {}
},
"resendVerificationEmailButtonLabel": "Resend verification email",
"@resendVerificationEmailButtonLabel": {
"description": "Button label that suggests to resend verification email",
"placeholders": {}
},
"verificationEmailSentTextShort": "Verification email sent",
"@verificationEmailSentTextShort": {
"description": "Short version of the hint text indicating that verification email has been sent",
"placeholders": {}
},
"emailIsNotVerifiedText": "Email is not verified",
"@emailIsNotVerifiedText": {
"description": "Message indicating that email is not verified",
"placeholders": {}
},
"waitingForEmailVerificationText": "Waiting for email verification",
"@waitingForEmailVerificationText": {
"description": "Message indicating that email is being verified",
"placeholders": {}
},
"dismissButtonLabel": "Dismiss",
"@dismiss": {
"description": "Dissmiss button label",
"placeholders": {}
},
"okButtonLabel": "OK",
"@okButtonLabel": {
"description": "OK button label",
"placeholders": {}
},
"checkEmailHintText": "Please check your email and click the link to verify your email address.",
"@checkEmailHintText": {
"description": "Hint text prompting the user to check email for verification link",
"placeholders": {}
},
"doneButtonLabel": "Done",
"@doneButtonLabel": {
"description": "Done button label",
"placeholders": {}
}
}
57 changes: 56 additions & 1 deletion packages/firebase_ui_localizations/lib/l10n/firebase_ui_en.arb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"@@locale": "en",
"@@last_modified": "2023-08-31T15:49:19.843264",
"@@last_modified": "2023-09-01T13:12:06.523448",
"accessDisabledErrorText": "Access to this account has been temporarily disabled",
"@accessDisabledErrorText": {
"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).",
Expand Down Expand Up @@ -428,5 +428,60 @@
"@uploadButtonText": {
"description": "UploadButton label",
"placeholders": {}
},
"verifyEmailTitle": "Verify your email",
"@verifyEmailTitle": {
"description": "EmailVerificationScreen title",
"placeholders": {}
},
"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.",
"@verificationEmailSentText": {
"description": "Hint text indicating that verification email has been sent",
"placeholders": {}
},
"verificationFailedText": "We couldn't verify your email address. ",
"@verificationFailedText": {
"description": "Message indicating that something went wrong during email verification",
"placeholders": {}
},
"resendVerificationEmailButtonLabel": "Resend verification email",
"@resendVerificationEmailButtonLabel": {
"description": "Button label that suggests to resend verification email",
"placeholders": {}
},
"verificationEmailSentTextShort": "Verification email sent",
"@verificationEmailSentTextShort": {
"description": "Short version of the hint text indicating that verification email has been sent",
"placeholders": {}
},
"emailIsNotVerifiedText": "Email is not verified",
"@emailIsNotVerifiedText": {
"description": "Message indicating that email is not verified",
"placeholders": {}
},
"waitingForEmailVerificationText": "Waiting for email verification",
"@waitingForEmailVerificationText": {
"description": "Message indicating that email is being verified",
"placeholders": {}
},
"dismissButtonLabel": "Dismiss",
"@dismiss": {
"description": "Dissmiss button label",
"placeholders": {}
},
"okButtonLabel": "OK",
"@okButtonLabel": {
"description": "OK button label",
"placeholders": {}
},
"checkEmailHintText": "Please check your email and click the link to verify your email address.",
"@checkEmailHintText": {
"description": "Hint text prompting the user to check email for verification link",
"placeholders": {}
},
"doneButtonLabel": "Done",
"@doneButtonLabel": {
"description": "Done button label",
"placeholders": {}
}
}
57 changes: 56 additions & 1 deletion packages/firebase_ui_localizations/lib/l10n/firebase_ui_es.arb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"@@locale": "es",
"@@last_modified": "2023-08-31T15:49:19.812582",
"@@last_modified": "2023-09-01T13:12:06.492378",
"accessDisabledErrorText": "Se ha inhabilitado temporalmente al acceso a esta cuenta",
"@accessDisabledErrorText": {
"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).",
Expand Down Expand Up @@ -428,5 +428,60 @@
"@uploadButtonText": {
"description": "UploadButton label",
"placeholders": {}
},
"verifyEmailTitle": "Verify your email",
"@verifyEmailTitle": {
"description": "EmailVerificationScreen title",
"placeholders": {}
},
"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.",
"@verificationEmailSentText": {
"description": "Hint text indicating that verification email has been sent",
"placeholders": {}
},
"verificationFailedText": "We couldn't verify your email address. ",
"@verificationFailedText": {
"description": "Message indicating that something went wrong during email verification",
"placeholders": {}
},
"resendVerificationEmailButtonLabel": "Resend verification email",
"@resendVerificationEmailButtonLabel": {
"description": "Button label that suggests to resend verification email",
"placeholders": {}
},
"verificationEmailSentTextShort": "Verification email sent",
"@verificationEmailSentTextShort": {
"description": "Short version of the hint text indicating that verification email has been sent",
"placeholders": {}
},
"emailIsNotVerifiedText": "Email is not verified",
"@emailIsNotVerifiedText": {
"description": "Message indicating that email is not verified",
"placeholders": {}
},
"waitingForEmailVerificationText": "Waiting for email verification",
"@waitingForEmailVerificationText": {
"description": "Message indicating that email is being verified",
"placeholders": {}
},
"dismissButtonLabel": "Dismiss",
"@dismiss": {
"description": "Dissmiss button label",
"placeholders": {}
},
"okButtonLabel": "OK",
"@okButtonLabel": {
"description": "OK button label",
"placeholders": {}
},
"checkEmailHintText": "Please check your email and click the link to verify your email address.",
"@checkEmailHintText": {
"description": "Hint text prompting the user to check email for verification link",
"placeholders": {}
},
"doneButtonLabel": "Done",
"@doneButtonLabel": {
"description": "Done button label",
"placeholders": {}
}
}
Loading