Skip to content

Commit

Permalink
🌐 (AccountKit): Add email verification related localization
Browse files Browse the repository at this point in the history
  • Loading branch information
macteuts authored and ladislas committed Feb 7, 2024
1 parent 70a4edb commit 06cc66a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
18 changes: 18 additions & 0 deletions Modules/AccountKit/Resources/Localizable.xcstrings
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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")
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down

0 comments on commit 06cc66a

Please sign in to comment.