Skip to content

Commit

Permalink
Remove hard coded "Neues Password wird an die Zentrale geschickt..." …
Browse files Browse the repository at this point in the history
…from change password page
  • Loading branch information
nilsreichardt committed Jan 10, 2025
1 parent b9d4def commit 11edeaf
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/lib/settings/src/subpages/my_profile/change_password.dart
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import 'package:sharezone_common/api_errors.dart';
import 'package:sharezone_localizations/sharezone_localizations.dart';
import 'package:sharezone_widgets/sharezone_widgets.dart';

const snackBarText = "Neues Password wird an die Zentrale geschickt...";
const changeType = ChangeType.password;

class ChangePasswordPage extends StatelessWidget {
Expand Down Expand Up @@ -61,7 +60,11 @@ class _ChangePasswordFAB extends StatelessWidget {
Widget build(BuildContext context) {
return SafeArea(
child: FloatingActionButton(
onPressed: () async => submit(context, snackBarText, changeType),
onPressed: () async => submit(
context,
context.l10n.changePasswordPageLoadingSnackbarText,
changeType,
),
tooltip: context.l10n.commonActionsSave,
child: const Icon(Icons.check),
),
Expand Down
4 changes: 4 additions & 0 deletions lib/sharezone_localizations/l10n/app_de.arb
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@
"@changePasswordPageResetCurrentPasswordEmailSentConfirmation": {
"description": "The confirmation text that an email for resetting the password has been sent"
},
"changePasswordPageLoadingSnackbarText": "Neues Password wird an die Zentrale geschickt...",
"@changePasswordPageLoadingSnackbarText": {
"description": "A text for the SnackBar widget when the user presses the change password button"
},
"@_CHANGE_EMAIL_ADDRESS_PAGE": {},
"changeEmailAddressPageTitle": "E-Mail ändern",
"changeEmailAddressPageCurrentEmailTextfieldLabel": "Aktuell",
Expand Down
1 change: 1 addition & 0 deletions lib/sharezone_localizations/l10n/app_en.arb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
"changePasswordPageResetCurrentPasswordDialogContent": "Should we send you an email to reset your password?",
"changePasswordPageResetCurrentPasswordLoading": "Preparing to send email...",
"changePasswordPageResetCurrentPasswordEmailSentConfirmation": "We've sent you an email to reset your password.",
"changePasswordPageLoadingSnackbarText": "New password is sent to the head office...",
"changeEmailAddressPageTitle": "Change Email",
"changeEmailAddressPageCurrentEmailTextfieldLabel": "Current",
"changeEmailAddressPageNewEmailTextfieldLabel": "New",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,12 @@ abstract class SharezoneLocalizations {
/// **'Wir haben eine E-Mail zum Zurücksetzen deines Passworts verschickt.'**
String get changePasswordPageResetCurrentPasswordEmailSentConfirmation;

/// A text for the SnackBar widget when the user presses the change password button
///
/// In de, this message translates to:
/// **'Neues Password wird an die Zentrale geschickt...'**
String get changePasswordPageLoadingSnackbarText;

/// No description provided for @changeEmailAddressPageTitle.
///
/// In de, this message translates to:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ class SharezoneLocalizationsDe extends SharezoneLocalizations {
String get changePasswordPageResetCurrentPasswordEmailSentConfirmation =>
'Wir haben eine E-Mail zum Zurücksetzen deines Passworts verschickt.';

@override
String get changePasswordPageLoadingSnackbarText =>
'Neues Password wird an die Zentrale geschickt...';

@override
String get changeEmailAddressPageTitle => 'E-Mail ändern';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,10 @@ class SharezoneLocalizationsEn extends SharezoneLocalizations {
String get changePasswordPageResetCurrentPasswordEmailSentConfirmation =>
'We\'ve sent you an email to reset your password.';

@override
String get changePasswordPageLoadingSnackbarText =>
'New password is sent to the head office...';

@override
String get changeEmailAddressPageTitle => 'Change Email';

Expand Down

0 comments on commit 11edeaf

Please sign in to comment.