diff --git a/Modules/AccountKit/Resources/Localizable.xcstrings b/Modules/AccountKit/Resources/Localizable.xcstrings index 4252307c12..74c3852585 100644 --- a/Modules/AccountKit/Resources/Localizable.xcstrings +++ b/Modules/AccountKit/Resources/Localizable.xcstrings @@ -74,6 +74,24 @@ } } }, + "accountkit.auth_manager_view_model.unverified_email_notification": { + "comment": "Unverified email notification message", + "extractionState": "extracted_with_value", + "localizations": { + "en": { + "stringUnit": { + "state": "new", + "value": "Your email hasn't been verified yet. Please verify your email to avoid losing your data." + } + }, + "fr": { + "stringUnit": { + "state": "translated", + "value": "Vous n'avez pas confirm\u00e9 votre email. Veuillez le v\u00e9rifier afin d'\u00e9viter de perdre vos donn\u00e9es." + } + } + } + }, "accountkit.auth_manager_view_model.verification_email_success_notification": { "comment": "Verification email success notification message", "extractionState": "extracted_with_value", diff --git a/Modules/AccountKit/Sources/Authentication/AuthManagerViewModel+l10n.swift b/Modules/AccountKit/Sources/Authentication/AuthManagerViewModel+l10n.swift index bd82e626ee..9ca871c582 100644 --- a/Modules/AccountKit/Sources/Authentication/AuthManagerViewModel+l10n.swift +++ b/Modules/AccountKit/Sources/Authentication/AuthManagerViewModel+l10n.swift @@ -9,6 +9,8 @@ import LocalizationKit extension l10n { enum AuthManagerViewModel { static let successfulEmailVerification = LocalizedString("accountkit.auth_manager_view_model.verification_email_success_notification", value: "Verification email sent. Please check your inbox.", comment: "Verification email success notification message") + + static let unverifiedEmailNotification = LocalizedString("accountkit.auth_manager_view_model.unverified_email_notification", value: "Your email hasn't been verified yet. Please verify your email to avoid losing your data.", comment: "Unverified email notification message") } } diff --git a/Modules/AccountKit/Sources/Authentication/AuthManagerViewModel.swift b/Modules/AccountKit/Sources/Authentication/AuthManagerViewModel.swift index 1f69cac78f..3e514e1976 100644 --- a/Modules/AccountKit/Sources/Authentication/AuthManagerViewModel.swift +++ b/Modules/AccountKit/Sources/Authentication/AuthManagerViewModel.swift @@ -71,7 +71,7 @@ public class AuthManagerViewModel: ObservableObject { self.notificationMessage = String(l10n.AuthManagerViewModel.successfulEmailVerification.characters) self.showNotificationAlert = true } else if !self.userEmailIsVerified { - self.actionRequestMessage = "Your email hasn't been verified yet. Please verify your email to avoid losing your data." + self.actionRequestMessage = String(l10n.AuthManagerViewModel.unverifiedEmailNotification.characters) self.showactionRequestAlert = true } case .loggedOut: @@ -83,7 +83,10 @@ public class AuthManagerViewModel: ObservableObject { private func resetState() { self.userIsSigningUp = false + self.userEmailIsVerified = false self.errorMessage = "" + self.actionRequestMessage = "" + self.showactionRequestAlert = false self.showErrorAlert = false self.notificationMessage = "" self.showNotificationAlert = false