Browse Source

l10n: extract strings

Neeraj Gupta 2 years ago
parent
commit
0f07fba944
4 changed files with 364 additions and 129 deletions
  1. 122 80
      lib/generated/intl/messages_en.dart
  2. 170 0
      lib/generated/l10n.dart
  3. 18 1
      lib/l10n/intl_en.arb
  4. 54 48
      lib/services/user_service.dart

+ 122 - 80
lib/generated/intl/messages_en.dart

@@ -57,111 +57,113 @@ class MessageLookup extends MessageLookupByLibrary {
   static String m11(count, storageSaved) =>
       "Your have cleaned up ${Intl.plural(count, one: '${count} duplicate file', other: '${count} duplicate files')}, saving (${storageSaved}!)";
 
-  static String m12(email) =>
+  static String m12(newEmail) => "Email changed to ${newEmail}";
+
+  static String m13(email) =>
       "${email} does not have an ente account.\n\nSend them an invite to share photos.";
 
-  static String m13(count, formattedNumber) =>
+  static String m14(count, formattedNumber) =>
       "${Intl.plural(count, one: '1 file', other: '${formattedNumber} files')} on this device have been backed up safely";
 
-  static String m14(count, formattedNumber) =>
+  static String m15(count, formattedNumber) =>
       "${Intl.plural(count, one: '1 file', other: '${formattedNumber} files')} in this album has been backed up safely";
 
-  static String m15(storageAmountInGB) =>
+  static String m16(storageAmountInGB) =>
       "${storageAmountInGB} GB each time someone signs up for a paid plan and applies your code";
 
-  static String m16(endDate) => "Free trial valid till ${endDate}";
+  static String m17(endDate) => "Free trial valid till ${endDate}";
 
-  static String m17(count) =>
+  static String m18(count) =>
       "You can still access ${Intl.plural(count, one: 'it', other: 'them')} on ente as long as you have an active subscription";
 
-  static String m18(sizeInMBorGB) => "Free up ${sizeInMBorGB}";
+  static String m19(sizeInMBorGB) => "Free up ${sizeInMBorGB}";
 
-  static String m19(count, formattedSize) =>
+  static String m20(count, formattedSize) =>
       "${Intl.plural(count, one: 'It can be deleted from the device to free up ${formattedSize}', other: 'They can be deleted from the device to free up ${formattedSize}')}";
 
-  static String m20(count) =>
+  static String m21(count) =>
       "${Intl.plural(count, one: '${count} item', other: '${count} items')}";
 
-  static String m21(count) => "${count} selected";
+  static String m22(count) => "${count} selected";
 
-  static String m22(expiryTime) => "Link will expire on ${expiryTime}";
+  static String m23(expiryTime) => "Link will expire on ${expiryTime}";
 
-  static String m23(maxValue) =>
+  static String m24(maxValue) =>
       "When set to the maximum (${maxValue}), the device limit will be relaxed to allow for temporary spikes of large number of viewers.";
 
-  static String m24(count) =>
+  static String m25(count) =>
       "${Intl.plural(count, zero: 'no memories', one: '${count} memory', other: '${count} memories')}";
 
-  static String m25(count) =>
+  static String m26(count) =>
       "${Intl.plural(count, one: 'Move item', other: 'Move items')}";
 
-  static String m26(albumName) => "Moved successfully to ${albumName}";
+  static String m27(albumName) => "Moved successfully to ${albumName}";
 
-  static String m27(passwordStrengthValue) =>
+  static String m28(passwordStrengthValue) =>
       "Password strength: ${passwordStrengthValue}";
 
-  static String m28(providerName) =>
+  static String m29(providerName) =>
       "Please talk to ${providerName} support if you were charged";
 
-  static String m29(reason) =>
+  static String m30(reason) =>
       "Unfortunately your payment failed due to ${reason}";
 
-  static String m30(storeName) => "Rate us on ${storeName}";
+  static String m31(storeName) => "Rate us on ${storeName}";
 
-  static String m31(storageInGB) =>
+  static String m32(storageInGB) =>
       "3. Both of you get ${storageInGB} GB* free";
 
-  static String m32(userEmail) =>
+  static String m33(userEmail) =>
       "${userEmail} will be removed from this shared album\n\nAny photos added by them will also be removed from the album";
 
-  static String m33(endDate) => "Renews on ${endDate}";
+  static String m34(endDate) => "Renews on ${endDate}";
 
-  static String m34(count) => "${count} selected";
+  static String m35(count) => "${count} selected";
 
-  static String m35(count, yourCount) =>
+  static String m36(count, yourCount) =>
       "${count} selected (${yourCount} yours)";
 
-  static String m36(verificationID) =>
+  static String m37(verificationID) =>
       "Here\'s my verification ID: ${verificationID} for ente.io.";
 
-  static String m37(verificationID) =>
+  static String m38(verificationID) =>
       "Hey, can you confirm that this is your ente.io verification ID: ${verificationID}";
 
-  static String m38(referralCode, referralStorageInGB) =>
+  static String m39(referralCode, referralStorageInGB) =>
       "ente referral code: ${referralCode} \n\nApply it in Settings → General → Referrals to get ${referralStorageInGB} GB free after you signup for a paid plan\n\nhttps://ente.io";
 
-  static String m39(numberOfPeople) =>
+  static String m40(numberOfPeople) =>
       "${Intl.plural(numberOfPeople, zero: 'Share with specific people', one: 'Shared with 1 person', other: 'Shared with ${numberOfPeople} people')}";
 
-  static String m40(emailIDs) => "Shared with ${emailIDs}";
+  static String m41(emailIDs) => "Shared with ${emailIDs}";
 
-  static String m41(fileType) =>
+  static String m42(fileType) =>
       "This ${fileType} will be deleted from your device.";
 
-  static String m42(fileType) =>
+  static String m43(fileType) =>
       "This ${fileType} is in both ente and your device.";
 
-  static String m43(fileType) => "This ${fileType} will be deleted from ente.";
+  static String m44(fileType) => "This ${fileType} will be deleted from ente.";
 
-  static String m44(storageAmountInGB) => "${storageAmountInGB} GB";
+  static String m45(storageAmountInGB) => "${storageAmountInGB} GB";
 
-  static String m45(id) =>
+  static String m46(id) =>
       "Your ${id} is already linked to another ente account.\nIf you would like to use your ${id} with this account, please contact our support\'\'";
 
-  static String m46(endDate) =>
+  static String m47(endDate) =>
       "Your subscription will be cancelled on ${endDate}";
 
-  static String m47(storageAmountInGB) =>
+  static String m48(storageAmountInGB) =>
       "They also get ${storageAmountInGB} GB";
 
-  static String m48(email) => "This is ${email}\'s Verification ID";
+  static String m49(email) => "This is ${email}\'s Verification ID";
 
-  static String m49(email) => "Verify ${email}";
+  static String m50(email) => "Verify ${email}";
 
-  static String m50(count) =>
+  static String m51(count) =>
       "${Intl.plural(count, one: '${count} year ago', other: '${count} years ago')}";
 
-  static String m51(storageSaved) =>
+  static String m52(storageSaved) =>
       "You have successfully freed up ${storageSaved}!";
 
   final messages = _notInlinedMessages(_notInlinedMessages);
@@ -262,6 +264,13 @@ class MessageLookup extends MessageLookupByLibrary {
             "Please authenticate to view your memories"),
         "authToViewYourRecoveryKey": MessageLookupByLibrary.simpleMessage(
             "Please authenticate to view your recovery key"),
+        "authenticating":
+            MessageLookupByLibrary.simpleMessage("Authenticating..."),
+        "authenticationFailedPleaseTryAgain":
+            MessageLookupByLibrary.simpleMessage(
+                "Authentication failed, please try again"),
+        "authenticationSuccessful":
+            MessageLookupByLibrary.simpleMessage("Authentication successful!"),
         "available": MessageLookupByLibrary.simpleMessage("Available"),
         "backedUpFolders":
             MessageLookupByLibrary.simpleMessage("Backed up folders"),
@@ -449,6 +458,9 @@ class MessageLookup extends MessageLookupByLibrary {
         "disableLinkMessage": m9,
         "disableTwofactor":
             MessageLookupByLibrary.simpleMessage("Disable two-factor"),
+        "disablingTwofactorAuthentication":
+            MessageLookupByLibrary.simpleMessage(
+                "Disabling two-factor authentication..."),
         "discord": MessageLookupByLibrary.simpleMessage("Discord"),
         "doThisLater": MessageLookupByLibrary.simpleMessage("Do this later"),
         "done": MessageLookupByLibrary.simpleMessage("Done"),
@@ -462,7 +474,8 @@ class MessageLookup extends MessageLookupByLibrary {
         "duplicateFileCountWithStorageSaved": m11,
         "eligible": MessageLookupByLibrary.simpleMessage("eligible"),
         "email": MessageLookupByLibrary.simpleMessage("Email"),
-        "emailNoEnteAccount": m12,
+        "emailChangedTo": m12,
+        "emailNoEnteAccount": m13,
         "encryption": MessageLookupByLibrary.simpleMessage("Encryption"),
         "encryptionKeys":
             MessageLookupByLibrary.simpleMessage("Encryption keys"),
@@ -529,25 +542,25 @@ class MessageLookup extends MessageLookupByLibrary {
         "feedback": MessageLookupByLibrary.simpleMessage("Feedback"),
         "fileSavedToGallery":
             MessageLookupByLibrary.simpleMessage("File saved to gallery"),
-        "filesBackedUpFromDevice": m13,
-        "filesBackedUpInAlbum": m14,
+        "filesBackedUpFromDevice": m14,
+        "filesBackedUpInAlbum": m15,
         "forYourMemories":
             MessageLookupByLibrary.simpleMessage("for your memories"),
         "forgotPassword":
             MessageLookupByLibrary.simpleMessage("Forgot password"),
         "freeStorageClaimed":
             MessageLookupByLibrary.simpleMessage("Free storage claimed"),
-        "freeStorageOnReferralSuccess": m15,
+        "freeStorageOnReferralSuccess": m16,
         "freeStorageUsable":
             MessageLookupByLibrary.simpleMessage("Free storage usable"),
         "freeTrial": MessageLookupByLibrary.simpleMessage("Free trial"),
-        "freeTrialValidTill": m16,
-        "freeUpAccessPostDelete": m17,
-        "freeUpAmount": m18,
+        "freeTrialValidTill": m17,
+        "freeUpAccessPostDelete": m18,
+        "freeUpAmount": m19,
         "freeUpDeviceSpace":
             MessageLookupByLibrary.simpleMessage("Free up device space"),
         "freeUpSpace": MessageLookupByLibrary.simpleMessage("Free up space"),
-        "freeUpSpaceSaving": m19,
+        "freeUpSpaceSaving": m20,
         "fromYourRegisteredEmailAddress": MessageLookupByLibrary.simpleMessage(
             "from your registered email address."),
         "general": MessageLookupByLibrary.simpleMessage("General"),
@@ -562,8 +575,11 @@ class MessageLookup extends MessageLookupByLibrary {
         "ignoredFolderUploadReason": MessageLookupByLibrary.simpleMessage(
             "Some files in this album are ignored from upload because they had previously been deleted from ente."),
         "importing": MessageLookupByLibrary.simpleMessage("Importing...."),
+        "incorrectCode": MessageLookupByLibrary.simpleMessage("Incorrect code"),
         "incorrectPasswordTitle":
             MessageLookupByLibrary.simpleMessage("Incorrect password"),
+        "incorrectRecoveryKey":
+            MessageLookupByLibrary.simpleMessage("Incorrect recovery key"),
         "incorrectRecoveryKeyBody": MessageLookupByLibrary.simpleMessage(
             "The recovery key you entered is incorrect"),
         "incorrectRecoveryKeyTitle":
@@ -581,8 +597,8 @@ class MessageLookup extends MessageLookupByLibrary {
         "inviteToEnte": MessageLookupByLibrary.simpleMessage("Invite to ente"),
         "inviteYourFriends":
             MessageLookupByLibrary.simpleMessage("Invite your friends"),
-        "itemCount": m20,
-        "itemSelectedCount": m21,
+        "itemCount": m21,
+        "itemSelectedCount": m22,
         "itemsShowTheNumberOfDaysRemainingBeforePermanentDeletion":
             MessageLookupByLibrary.simpleMessage(
                 "Items show the number of days remaining before permanent deletion"),
@@ -603,7 +619,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "linkDeviceLimit": MessageLookupByLibrary.simpleMessage("Device limit"),
         "linkEnabled": MessageLookupByLibrary.simpleMessage("Enabled"),
         "linkExpired": MessageLookupByLibrary.simpleMessage("Expired"),
-        "linkExpiresOn": m22,
+        "linkExpiresOn": m23,
         "linkExpiry": MessageLookupByLibrary.simpleMessage("Link expiry"),
         "linkHasExpired":
             MessageLookupByLibrary.simpleMessage("Link has expired"),
@@ -631,16 +647,16 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("Manage subscription"),
         "mastodon": MessageLookupByLibrary.simpleMessage("Mastodon"),
         "matrix": MessageLookupByLibrary.simpleMessage("Matrix"),
-        "maxDeviceLimitSpikeHandling": m23,
-        "memoryCount": m24,
+        "maxDeviceLimitSpikeHandling": m24,
+        "memoryCount": m25,
         "merchandise": MessageLookupByLibrary.simpleMessage("Merchandise"),
         "mobileWebDesktop":
             MessageLookupByLibrary.simpleMessage("Mobile, Web, Desktop"),
         "moderateStrength": MessageLookupByLibrary.simpleMessage("Moderate"),
         "monthly": MessageLookupByLibrary.simpleMessage("Monthly"),
-        "moveItem": m25,
+        "moveItem": m26,
         "moveToAlbum": MessageLookupByLibrary.simpleMessage("Move to album"),
-        "movedSuccessfullyTo": m26,
+        "movedSuccessfullyTo": m27,
         "movedToTrash": MessageLookupByLibrary.simpleMessage("Moved to trash"),
         "movingFilesToAlbum":
             MessageLookupByLibrary.simpleMessage("Moving files to album..."),
@@ -685,12 +701,12 @@ class MessageLookup extends MessageLookupByLibrary {
         "passwordChangedSuccessfully": MessageLookupByLibrary.simpleMessage(
             "Password changed successfully"),
         "passwordLock": MessageLookupByLibrary.simpleMessage("Password lock"),
-        "passwordStrength": m27,
+        "passwordStrength": m28,
         "paymentDetails":
             MessageLookupByLibrary.simpleMessage("Payment details"),
         "paymentFailed": MessageLookupByLibrary.simpleMessage("Payment failed"),
-        "paymentFailedTalkToProvider": m28,
-        "paymentFailedWithReason": m29,
+        "paymentFailedTalkToProvider": m29,
+        "paymentFailedWithReason": m30,
         "peopleUsingYourCode":
             MessageLookupByLibrary.simpleMessage("People using your code"),
         "permanentlyDelete":
@@ -706,6 +722,9 @@ class MessageLookup extends MessageLookupByLibrary {
         "pleaseContactSupportAndWeWillBeHappyToHelp":
             MessageLookupByLibrary.simpleMessage(
                 "Please contact support@ente.io and we will be happy to help!"),
+        "pleaseContactSupportIfTheProblemPersists":
+            MessageLookupByLibrary.simpleMessage(
+                "Please contact support if the problem persists"),
         "pleaseGrantPermissions":
             MessageLookupByLibrary.simpleMessage("Please grant permissions"),
         "pleaseLoginAgain":
@@ -714,6 +733,9 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("Please send an email to"),
         "pleaseTryAgain":
             MessageLookupByLibrary.simpleMessage("Please try again"),
+        "pleaseVerifyTheCodeYouHaveEntered":
+            MessageLookupByLibrary.simpleMessage(
+                "Please verify the code you have entered"),
         "pleaseWait": MessageLookupByLibrary.simpleMessage("Please wait..."),
         "pleaseWaitDeletingAlbum":
             MessageLookupByLibrary.simpleMessage("Please wait, deleting album"),
@@ -738,7 +760,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "raiseTicket": MessageLookupByLibrary.simpleMessage("Raise ticket"),
         "rateTheApp": MessageLookupByLibrary.simpleMessage("Rate the app"),
         "rateUs": MessageLookupByLibrary.simpleMessage("Rate us"),
-        "rateUsOnStore": m30,
+        "rateUsOnStore": m31,
         "recover": MessageLookupByLibrary.simpleMessage("Recover"),
         "recoverAccount":
             MessageLookupByLibrary.simpleMessage("Recover account"),
@@ -769,7 +791,7 @@ class MessageLookup extends MessageLookupByLibrary {
             "1. Give this code to your friends"),
         "referralStep2": MessageLookupByLibrary.simpleMessage(
             "2. They sign up for a paid plan"),
-        "referralStep3": m31,
+        "referralStep3": m32,
         "referrals": MessageLookupByLibrary.simpleMessage("Referrals"),
         "referralsAreCurrentlyPaused": MessageLookupByLibrary.simpleMessage(
             "Referrals are currently paused"),
@@ -789,7 +811,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "removeLink": MessageLookupByLibrary.simpleMessage("Remove link"),
         "removeParticipant":
             MessageLookupByLibrary.simpleMessage("Remove participant"),
-        "removeParticipantBody": m32,
+        "removeParticipantBody": m33,
         "removePublicLink":
             MessageLookupByLibrary.simpleMessage("Remove public link"),
         "removeShareItemsWarning": MessageLookupByLibrary.simpleMessage(
@@ -802,7 +824,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "renameAlbum": MessageLookupByLibrary.simpleMessage("Rename album"),
         "renewSubscription":
             MessageLookupByLibrary.simpleMessage("Renew subscription"),
-        "renewsOn": m33,
+        "renewsOn": m34,
         "reportABug": MessageLookupByLibrary.simpleMessage("Report a bug"),
         "reportBug": MessageLookupByLibrary.simpleMessage("Report bug"),
         "resendEmail": MessageLookupByLibrary.simpleMessage("Resend email"),
@@ -844,8 +866,8 @@ class MessageLookup extends MessageLookupByLibrary {
         "selectedFoldersWillBeEncryptedAndBackedUp":
             MessageLookupByLibrary.simpleMessage(
                 "Selected folders will be encrypted and backed up"),
-        "selectedPhotos": m34,
-        "selectedPhotosWithYours": m35,
+        "selectedPhotos": m35,
+        "selectedPhotosWithYours": m36,
         "send": MessageLookupByLibrary.simpleMessage("Send"),
         "sendEmail": MessageLookupByLibrary.simpleMessage("Send email"),
         "sendInvite": MessageLookupByLibrary.simpleMessage("Send invite"),
@@ -864,29 +886,29 @@ class MessageLookup extends MessageLookupByLibrary {
         "shareAnAlbumNow":
             MessageLookupByLibrary.simpleMessage("Share an album now"),
         "shareLink": MessageLookupByLibrary.simpleMessage("Share link"),
-        "shareMyVerificationID": m36,
+        "shareMyVerificationID": m37,
         "shareOnlyWithThePeopleYouWant": MessageLookupByLibrary.simpleMessage(
             "Share only with the people you want"),
-        "shareTextConfirmOthersVerificationID": m37,
+        "shareTextConfirmOthersVerificationID": m38,
         "shareTextRecommendUsingEnte": MessageLookupByLibrary.simpleMessage(
             "Download ente so we can easily share original quality photos and videos\n\nhttps://ente.io/#download"),
-        "shareTextReferralCode": m38,
+        "shareTextReferralCode": m39,
         "shareWithNonenteUsers":
             MessageLookupByLibrary.simpleMessage("Share with non-ente users"),
-        "shareWithPeopleSectionTitle": m39,
+        "shareWithPeopleSectionTitle": m40,
         "shareYourFirstAlbum":
             MessageLookupByLibrary.simpleMessage("Share your first album"),
         "sharedAlbumSectionDescription": MessageLookupByLibrary.simpleMessage(
             "Create shared and collaborative albums with other ente users, including users on free plans."),
         "sharedByMe": MessageLookupByLibrary.simpleMessage("Shared by me"),
-        "sharedWith": m40,
+        "sharedWith": m41,
         "sharedWithMe": MessageLookupByLibrary.simpleMessage("Shared with me"),
         "sharing": MessageLookupByLibrary.simpleMessage("Sharing..."),
-        "singleFileDeleteFromDevice": m41,
+        "singleFileDeleteFromDevice": m42,
         "singleFileDeleteHighlight": MessageLookupByLibrary.simpleMessage(
             "It will be deleted from all albums."),
-        "singleFileInBothLocalAndRemote": m42,
-        "singleFileInRemoteOnly": m43,
+        "singleFileInBothLocalAndRemote": m43,
+        "singleFileInRemoteOnly": m44,
         "skip": MessageLookupByLibrary.simpleMessage("Skip"),
         "social": MessageLookupByLibrary.simpleMessage("Social"),
         "someoneSharingAlbumsWithYouShouldSeeTheSameId":
@@ -903,17 +925,20 @@ class MessageLookup extends MessageLookupByLibrary {
         "sorryCouldNotRemoveFromFavorites":
             MessageLookupByLibrary.simpleMessage(
                 "Sorry, could not remove from favorites!"),
+        "sorryTheCodeYouveEnteredIsIncorrect":
+            MessageLookupByLibrary.simpleMessage(
+                "Sorry, the code you\'ve entered is incorrect"),
         "sorryWeCouldNotGenerateSecureKeysOnThisDevicennplease":
             MessageLookupByLibrary.simpleMessage(
                 "Sorry, we could not generate secure keys on this device.\n\nplease sign up from a different device."),
         "sparkleSuccess": MessageLookupByLibrary.simpleMessage("✨ Success"),
         "startBackup": MessageLookupByLibrary.simpleMessage("Start backup"),
-        "storageInGB": m44,
+        "storageInGB": m45,
         "storageLimitExceeded":
             MessageLookupByLibrary.simpleMessage("Storage limit exceeded"),
         "strongStrength": MessageLookupByLibrary.simpleMessage("Strong"),
-        "subAlreadyLinkedErrMessage": m45,
-        "subWillBeCancelledOn": m46,
+        "subAlreadyLinkedErrMessage": m46,
+        "subWillBeCancelledOn": m47,
         "subscribe": MessageLookupByLibrary.simpleMessage("Subscribe"),
         "subscribeToEnableSharing": MessageLookupByLibrary.simpleMessage(
             "Looks like your subscription has expired. Please subscribe to enable sharing."),
@@ -940,8 +965,11 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage("Thank you for subscribing!"),
         "theDownloadCouldNotBeCompleted": MessageLookupByLibrary.simpleMessage(
             "The download could not be completed"),
+        "theRecoveryKeyYouEnteredIsIncorrect":
+            MessageLookupByLibrary.simpleMessage(
+                "The recovery key you entered is incorrect"),
         "theme": MessageLookupByLibrary.simpleMessage("Theme"),
-        "theyAlsoGetXGb": m47,
+        "theyAlsoGetXGb": m48,
         "thisAlbumAlreadyHDACollaborativeLink":
             MessageLookupByLibrary.simpleMessage(
                 "This album already has a collaborative link"),
@@ -949,9 +977,11 @@ class MessageLookup extends MessageLookupByLibrary {
             MessageLookupByLibrary.simpleMessage(
                 "This can be used to recover your account if you lose your second factor"),
         "thisDevice": MessageLookupByLibrary.simpleMessage("This device"),
+        "thisEmailIsAlreadyInUse": MessageLookupByLibrary.simpleMessage(
+            "This email is already in use"),
         "thisImageHasNoExifData":
             MessageLookupByLibrary.simpleMessage("This image has no exif data"),
-        "thisIsPersonVerificationId": m48,
+        "thisIsPersonVerificationId": m49,
         "thisIsYourVerificationId": MessageLookupByLibrary.simpleMessage(
             "This is your Verification ID"),
         "thisWillLogYouOutOfTheFollowingDevice":
@@ -972,8 +1002,14 @@ class MessageLookup extends MessageLookupByLibrary {
         "twoMonthsFreeOnYearlyPlans": MessageLookupByLibrary.simpleMessage(
             "2 months free on yearly plans"),
         "twofactor": MessageLookupByLibrary.simpleMessage("Two-factor"),
+        "twofactorAuthenticationHasBeenDisabled":
+            MessageLookupByLibrary.simpleMessage(
+                "Two-factor authentication has been disabled"),
         "twofactorAuthenticationPageTitle":
             MessageLookupByLibrary.simpleMessage("Two-factor authentication"),
+        "twofactorAuthenticationSuccessfullyReset":
+            MessageLookupByLibrary.simpleMessage(
+                "Two-factor authentication successfully reset"),
         "twofactorSetup":
             MessageLookupByLibrary.simpleMessage("Two-factor setup"),
         "unarchive": MessageLookupByLibrary.simpleMessage("Unarchive"),
@@ -1002,13 +1038,17 @@ class MessageLookup extends MessageLookupByLibrary {
                 "Use public links for people not on ente"),
         "useRecoveryKey":
             MessageLookupByLibrary.simpleMessage("Use recovery key"),
+        "verificationFailedPleaseTryAgain":
+            MessageLookupByLibrary.simpleMessage(
+                "Verification failed, please try again"),
         "verificationId":
             MessageLookupByLibrary.simpleMessage("Verification ID"),
         "verify": MessageLookupByLibrary.simpleMessage("Verify"),
         "verifyEmail": MessageLookupByLibrary.simpleMessage("Verify email"),
-        "verifyEmailID": m49,
+        "verifyEmailID": m50,
         "verifyPassword":
             MessageLookupByLibrary.simpleMessage("Verify password"),
+        "verifying": MessageLookupByLibrary.simpleMessage("Verifying..."),
         "verifyingRecoveryKey":
             MessageLookupByLibrary.simpleMessage("Verifying recovery key..."),
         "videoSmallCase": MessageLookupByLibrary.simpleMessage("video"),
@@ -1031,7 +1071,7 @@ class MessageLookup extends MessageLookupByLibrary {
         "weveSentAMailTo":
             MessageLookupByLibrary.simpleMessage("We\'ve sent a mail to"),
         "yearly": MessageLookupByLibrary.simpleMessage("Yearly"),
-        "yearsAgo": m50,
+        "yearsAgo": m51,
         "yes": MessageLookupByLibrary.simpleMessage("Yes"),
         "yesCancel": MessageLookupByLibrary.simpleMessage("Yes, cancel"),
         "yesConvertToViewer":
@@ -1059,7 +1099,7 @@ class MessageLookup extends MessageLookupByLibrary {
             "You cannot share with yourself"),
         "youDontHaveAnyArchivedItems": MessageLookupByLibrary.simpleMessage(
             "You don\'t have any archived items."),
-        "youHaveSuccessfullyFreedUp": m51,
+        "youHaveSuccessfullyFreedUp": m52,
         "yourAccountHasBeenDeleted": MessageLookupByLibrary.simpleMessage(
             "Your account has been deleted"),
         "yourPlanWasSuccessfullyDowngraded":
@@ -1077,6 +1117,8 @@ class MessageLookup extends MessageLookupByLibrary {
         "yourSubscriptionWasUpdatedSuccessfully":
             MessageLookupByLibrary.simpleMessage(
                 "Your subscription was updated successfully"),
+        "yourVerificationCodeHasExpired": MessageLookupByLibrary.simpleMessage(
+            "Your verification code has expired"),
         "youveNoDuplicateFilesThatCanBeCleared":
             MessageLookupByLibrary.simpleMessage(
                 "You\'ve no duplicate files that can be cleared"),

+ 170 - 0
lib/generated/l10n.dart

@@ -5851,6 +5851,176 @@ class S {
       args: [sizeInMBorGB],
     );
   }
+
+  /// `This email is already in use`
+  String get thisEmailIsAlreadyInUse {
+    return Intl.message(
+      'This email is already in use',
+      name: 'thisEmailIsAlreadyInUse',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Incorrect code`
+  String get incorrectCode {
+    return Intl.message(
+      'Incorrect code',
+      name: 'incorrectCode',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Authentication failed, please try again`
+  String get authenticationFailedPleaseTryAgain {
+    return Intl.message(
+      'Authentication failed, please try again',
+      name: 'authenticationFailedPleaseTryAgain',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Verification failed, please try again`
+  String get verificationFailedPleaseTryAgain {
+    return Intl.message(
+      'Verification failed, please try again',
+      name: 'verificationFailedPleaseTryAgain',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Authenticating...`
+  String get authenticating {
+    return Intl.message(
+      'Authenticating...',
+      name: 'authenticating',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Authentication successful!`
+  String get authenticationSuccessful {
+    return Intl.message(
+      'Authentication successful!',
+      name: 'authenticationSuccessful',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Incorrect recovery key`
+  String get incorrectRecoveryKey {
+    return Intl.message(
+      'Incorrect recovery key',
+      name: 'incorrectRecoveryKey',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `The recovery key you entered is incorrect`
+  String get theRecoveryKeyYouEnteredIsIncorrect {
+    return Intl.message(
+      'The recovery key you entered is incorrect',
+      name: 'theRecoveryKeyYouEnteredIsIncorrect',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Two-factor authentication successfully reset`
+  String get twofactorAuthenticationSuccessfullyReset {
+    return Intl.message(
+      'Two-factor authentication successfully reset',
+      name: 'twofactorAuthenticationSuccessfullyReset',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Please verify the code you have entered`
+  String get pleaseVerifyTheCodeYouHaveEntered {
+    return Intl.message(
+      'Please verify the code you have entered',
+      name: 'pleaseVerifyTheCodeYouHaveEntered',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Please contact support if the problem persists`
+  String get pleaseContactSupportIfTheProblemPersists {
+    return Intl.message(
+      'Please contact support if the problem persists',
+      name: 'pleaseContactSupportIfTheProblemPersists',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Two-factor authentication has been disabled`
+  String get twofactorAuthenticationHasBeenDisabled {
+    return Intl.message(
+      'Two-factor authentication has been disabled',
+      name: 'twofactorAuthenticationHasBeenDisabled',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Sorry, the code you've entered is incorrect`
+  String get sorryTheCodeYouveEnteredIsIncorrect {
+    return Intl.message(
+      'Sorry, the code you\'ve entered is incorrect',
+      name: 'sorryTheCodeYouveEnteredIsIncorrect',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Your verification code has expired`
+  String get yourVerificationCodeHasExpired {
+    return Intl.message(
+      'Your verification code has expired',
+      name: 'yourVerificationCodeHasExpired',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Email changed to {newEmail}`
+  String emailChangedTo(Object newEmail) {
+    return Intl.message(
+      'Email changed to $newEmail',
+      name: 'emailChangedTo',
+      desc: '',
+      args: [newEmail],
+    );
+  }
+
+  /// `Verifying...`
+  String get verifying {
+    return Intl.message(
+      'Verifying...',
+      name: 'verifying',
+      desc: '',
+      args: [],
+    );
+  }
+
+  /// `Disabling two-factor authentication...`
+  String get disablingTwofactorAuthentication {
+    return Intl.message(
+      'Disabling two-factor authentication...',
+      name: 'disablingTwofactorAuthentication',
+      desc: '',
+      args: [],
+    );
+  }
 }
 
 class AppLocalizationDelegate extends LocalizationsDelegate<S> {

+ 18 - 1
lib/l10n/intl_en.arb

@@ -843,5 +843,22 @@
       }
     }
   },
-  "freeUpAmount": "Free up {sizeInMBorGB}"
+  "freeUpAmount": "Free up {sizeInMBorGB}",
+  "thisEmailIsAlreadyInUse": "This email is already in use",
+  "incorrectCode": "Incorrect code",
+  "authenticationFailedPleaseTryAgain": "Authentication failed, please try again",
+  "verificationFailedPleaseTryAgain": "Verification failed, please try again",
+  "authenticating": "Authenticating...",
+  "authenticationSuccessful": "Authentication successful!",
+  "incorrectRecoveryKey": "Incorrect recovery key",
+  "theRecoveryKeyYouEnteredIsIncorrect": "The recovery key you entered is incorrect",
+  "twofactorAuthenticationSuccessfullyReset": "Two-factor authentication successfully reset",
+  "pleaseVerifyTheCodeYouHaveEntered": "Please verify the code you have entered",
+  "pleaseContactSupportIfTheProblemPersists": "Please contact support if the problem persists",
+  "twofactorAuthenticationHasBeenDisabled": "Two-factor authentication has been disabled",
+  "sorryTheCodeYouveEnteredIsIncorrect": "Sorry, the code you've entered is incorrect",
+  "yourVerificationCodeHasExpired": "Your verification code has expired",
+  "emailChangedTo": "Email changed to {newEmail}",
+  "verifying": "Verifying...",
+  "disablingTwofactorAuthentication": "Disabling two-factor authentication..."
 }

+ 54 - 48
lib/services/user_service.dart

@@ -12,6 +12,7 @@ import 'package:photos/core/network/network.dart';
 import 'package:photos/db/public_keys_db.dart';
 import 'package:photos/events/two_factor_status_change_event.dart';
 import 'package:photos/events/user_details_changed_event.dart';
+import "package:photos/generated/l10n.dart";
 import 'package:photos/models/delete_account.dart';
 import 'package:photos/models/key_attributes.dart';
 import 'package:photos/models/key_gen_result.dart';
@@ -70,7 +71,7 @@ class UserService {
     bool isChangeEmail = false,
     bool isCreateAccountScreen = false,
   }) async {
-    final dialog = createProgressDialog(context, "Please wait...");
+    final dialog = createProgressDialog(context, S.of(context).pleaseWait);
     await dialog.show();
     try {
       final response = await _dio.post(
@@ -102,8 +103,8 @@ class UserService {
         unawaited(
           showErrorDialog(
             context,
-            "Oops",
-            "This email is already in use",
+            S.of(context).oops,
+            S.of(context).thisEmailIsAlreadyInUse,
           ),
         );
       } else {
@@ -282,7 +283,7 @@ class UserService {
   }
 
   Future<void> verifyEmail(BuildContext context, String ott) async {
-    final dialog = createProgressDialog(context, "Please wait...");
+    final dialog = createProgressDialog(context, S.of(context).pleaseWait);
     await dialog.show();
     try {
       final response = await _dio.post(
@@ -325,21 +326,22 @@ class UserService {
       if (e.response != null && e.response!.statusCode == 410) {
         await showErrorDialog(
           context,
-          "Oops",
-          "Your verification code has expired",
+          S.of(context).oops,
+          S.of(context).yourVerificationCodeHasExpired,
         );
         Navigator.of(context).pop();
       } else {
         showErrorDialog(
           context,
-          "Incorrect code",
-          "Sorry, the code you've entered is incorrect",
+          S.of(context).incorrectCode,
+          S.of(context).sorryTheCodeYouveEnteredIsIncorrect,
         );
       }
     } catch (e) {
       await dialog.hide();
       _logger.severe(e);
-      showErrorDialog(context, "Oops", "Verification failed, please try again");
+      showErrorDialog(context, S.of(context).oops,
+          S.of(context).verificationFailedPleaseTryAgain);
     }
   }
 
@@ -353,7 +355,7 @@ class UserService {
     String email,
     String ott,
   ) async {
-    final dialog = createProgressDialog(context, "Please wait...");
+    final dialog = createProgressDialog(context, S.of(context).pleaseWait);
     await dialog.show();
     try {
       final response = await _enteDio.post(
@@ -365,28 +367,31 @@ class UserService {
       );
       await dialog.hide();
       if (response.statusCode == 200) {
-        showShortToast(context, "Email changed to " + email);
+        showShortToast(context, S.of(context).emailChangedTo(email));
         await setEmail(email);
         Navigator.of(context).popUntil((route) => route.isFirst);
         Bus.instance.fire(UserDetailsChangedEvent());
         return;
       }
-      showErrorDialog(context, "Oops", "Verification failed, please try again");
+      showErrorDialog(context, S.of(context).oops,
+          S.of(context).verificationFailedPleaseTryAgain);
     } on DioError catch (e) {
       await dialog.hide();
       if (e.response != null && e.response!.statusCode == 403) {
-        showErrorDialog(context, "Oops", "This email is already in use");
+        showErrorDialog(
+            context, S.of(context).oops, S.of(context).thisEmailIsAlreadyInUse);
       } else {
         showErrorDialog(
           context,
-          "Incorrect code",
-          "Authentication failed, please try again",
+          S.of(context).incorrectCode,
+          S.of(context).authenticationFailedPleaseTryAgain,
         );
       }
     } catch (e) {
       await dialog.hide();
       _logger.severe(e);
-      showErrorDialog(context, "Oops", "Verification failed, please try again");
+      showErrorDialog(context, S.of(context).oops,
+          S.of(context).verificationFailedPleaseTryAgain);
     }
   }
 
@@ -453,7 +458,7 @@ class UserService {
     String sessionID,
     String code,
   ) async {
-    final dialog = createProgressDialog(context, "Authenticating...");
+    final dialog = createProgressDialog(context, S.of(context).authenticating);
     await dialog.show();
     try {
       final response = await _dio.post(
@@ -465,7 +470,7 @@ class UserService {
       );
       await dialog.hide();
       if (response.statusCode == 200) {
-        showShortToast(context, "Authentication successful!");
+        showShortToast(context, S.of(context).authenticationSuccessful);
         await _saveConfiguration(response);
         Navigator.of(context).pushAndRemoveUntil(
           MaterialPageRoute(
@@ -492,8 +497,8 @@ class UserService {
       } else {
         showErrorDialog(
           context,
-          "Incorrect code",
-          "Authentication failed, please try again",
+          S.of(context).incorrectCode,
+          S.of(context).authenticationFailedPleaseTryAgain,
         );
       }
     } catch (e) {
@@ -501,14 +506,14 @@ class UserService {
       _logger.severe(e);
       showErrorDialog(
         context,
-        "Oops",
-        "Authentication failed, please try again",
+        S.of(context).oops,
+        S.of(context).authenticationFailedPleaseTryAgain,
       );
     }
   }
 
   Future<void> recoverTwoFactor(BuildContext context, String sessionID) async {
-    final dialog = createProgressDialog(context, "Please wait...");
+    final dialog = createProgressDialog(context, S.of(context).pleaseWait);
     await dialog.show();
     try {
       final response = await _dio.get(
@@ -534,7 +539,7 @@ class UserService {
     } on DioError catch (e) {
       _logger.severe(e);
       if (e.response != null && e.response!.statusCode == 404) {
-        showToast(context, "Session expired");
+        showToast(context, S.of(context).sessionExpired);
         Navigator.of(context).pushAndRemoveUntil(
           MaterialPageRoute(
             builder: (BuildContext context) {
@@ -546,16 +551,16 @@ class UserService {
       } else {
         showErrorDialog(
           context,
-          "Oops",
-          "Something went wrong, please try again",
+          S.of(context).oops,
+          S.of(context).somethingWentWrongPleaseTryAgain,
         );
       }
     } catch (e) {
       _logger.severe(e);
       showErrorDialog(
         context,
-        "Oops",
-        "Something went wrong, please try again",
+        S.of(context).oops,
+        S.of(context).somethingWentWrongPleaseTryAgain,
       );
     } finally {
       await dialog.hide();
@@ -569,7 +574,7 @@ class UserService {
     String encryptedSecret,
     String secretDecryptionNonce,
   ) async {
-    final dialog = createProgressDialog(context, "Please wait...");
+    final dialog = createProgressDialog(context, S.of(context).pleaseWait);
     await dialog.show();
     String secret;
     try {
@@ -592,8 +597,8 @@ class UserService {
       await dialog.hide();
       await showErrorDialog(
         context,
-        "Incorrect recovery key",
-        "The recovery key you entered is incorrect",
+        S.of(context).incorrectRecoveryKey,
+        S.of(context).theRecoveryKeyYouEnteredIsIncorrect,
       );
       return;
     }
@@ -606,7 +611,8 @@ class UserService {
         },
       );
       if (response.statusCode == 200) {
-        showShortToast(context, "Two-factor authentication successfully reset");
+        showShortToast(
+            context, S.of(context).twofactorAuthenticationSuccessfullyReset);
         await _saveConfiguration(response);
         Navigator.of(context).pushAndRemoveUntil(
           MaterialPageRoute(
@@ -632,16 +638,16 @@ class UserService {
       } else {
         showErrorDialog(
           context,
-          "Oops",
-          "Something went wrong, please try again",
+          S.of(context).oops,
+          S.of(context).somethingWentWrongPleaseTryAgain,
         );
       }
     } catch (e) {
       _logger.severe(e);
       showErrorDialog(
         context,
-        "Oops",
-        "Something went wrong, please try again",
+        S.of(context).oops,
+        S.of(context).somethingWentWrongPleaseTryAgain,
       );
     } finally {
       await dialog.hide();
@@ -649,7 +655,7 @@ class UserService {
   }
 
   Future<void> setupTwoFactor(BuildContext context, Completer completer) async {
-    final dialog = createProgressDialog(context, "Please wait...");
+    final dialog = createProgressDialog(context, S.of(context).pleaseWait);
     await dialog.show();
     try {
       final response = await _enteDio.post("/users/two-factor/setup");
@@ -684,7 +690,7 @@ class UserService {
       showGenericErrorDialog(context: context);
       return false;
     }
-    final dialog = createProgressDialog(context, "Verifying...");
+    final dialog = createProgressDialog(context, S.of(context).verifying);
     await dialog.show();
     final encryptionResult =
         CryptoUtil.encryptSync(CryptoUtil.base642bin(secret), recoveryKey);
@@ -710,24 +716,24 @@ class UserService {
         if (e.response != null && e.response!.statusCode == 401) {
           showErrorDialog(
             context,
-            "Incorrect code",
-            "Please verify the code you have entered",
+            S.of(context).incorrectCode,
+            S.of(context).pleaseVerifyTheCodeYouHaveEntered,
           );
           return false;
         }
       }
       showErrorDialog(
         context,
-        "Something went wrong",
-        "Please contact support if the problem persists",
+        S.of(context).somethingWentWrong,
+        S.of(context).pleaseContactSupportIfTheProblemPersists,
       );
     }
     return false;
   }
 
   Future<void> disableTwoFactor(BuildContext context) async {
-    final dialog =
-        createProgressDialog(context, "Disabling two-factor authentication...");
+    final dialog = createProgressDialog(
+        context, S.of(context).disablingTwofactorAuthentication);
     await dialog.show();
     try {
       await _enteDio.post(
@@ -738,7 +744,7 @@ class UserService {
       unawaited(
         showShortToast(
           context,
-          "Two-factor authentication has been disabled",
+          S.of(context).twofactorAuthenticationHasBeenDisabled,
         ),
       );
     } catch (e) {
@@ -746,8 +752,8 @@ class UserService {
       _logger.severe("Failed to disabled 2FA", e);
       await showErrorDialog(
         context,
-        "Something went wrong",
-        "Please contact support if the problem persists",
+        S.of(context).somethingWentWrong,
+        S.of(context).pleaseContactSupportIfTheProblemPersists,
       );
     }
   }
@@ -767,7 +773,7 @@ class UserService {
     final String? encryptedRecoveryKey =
         _config.getKeyAttributes()!.recoveryKeyEncryptedWithMasterKey;
     if (encryptedRecoveryKey == null || encryptedRecoveryKey.isEmpty) {
-      final dialog = createProgressDialog(context, "Please wait...");
+      final dialog = createProgressDialog(context, S.of(context).pleaseWait);
       await dialog.show();
       try {
         final keyAttributes = await _config.createNewRecoveryKey();