diff --git a/secant/Features/BackupFlow/Views/RecoveryPhraseBackupValidationView.swift b/secant/Features/BackupFlow/Views/RecoveryPhraseBackupValidationView.swift index 00391f5..b2617c3 100644 --- a/secant/Features/BackupFlow/Views/RecoveryPhraseBackupValidationView.swift +++ b/secant/Features/BackupFlow/Views/RecoveryPhraseBackupValidationView.swift @@ -61,7 +61,7 @@ struct RecoveryPhraseBackupValidationView: View { .applyScreenBackground() .scrollableWhenScaledUp() .navigationBarTitleDisplayMode(.inline) - .navigationTitle(Text("Verify Your Backup")) + .navigationTitle(Text("recoveryPhraseBackupValidation.title")) } } @@ -70,7 +70,7 @@ struct RecoveryPhraseBackupValidationView: View { if viewStore.isComplete { completeHeader(for: viewStore.state) } else { - Text("Drag the words below to match your backed-up copy.") + Text("recoveryPhraseBackupValidation.description") .bodyText() } @@ -81,10 +81,10 @@ struct RecoveryPhraseBackupValidationView: View { @ViewBuilder func completeHeader(for state: RecoveryPhraseValidationState) -> some View { if state.isValid { - Text("Congratulations! You validated your secret recovery phrase.") + Text("recoveryPhraseBackupValidation.successResult") .bodyText() } else { - Text("Your placed words did not match your secret recovery phrase") + Text("recoveryPhraseBackupValidation.failedResult") .bodyText() } } diff --git a/secant/Features/BackupFlow/Views/RecoveryPhraseDisplayView.swift b/secant/Features/BackupFlow/Views/RecoveryPhraseDisplayView.swift index 8210b66..40b4413 100644 --- a/secant/Features/BackupFlow/Views/RecoveryPhraseDisplayView.swift +++ b/secant/Features/BackupFlow/Views/RecoveryPhraseDisplayView.swift @@ -17,15 +17,15 @@ struct RecoveryPhraseDisplayView: View { VStack(alignment: .center, spacing: 0) { if let groups = viewStore.phrase?.toGroups() { VStack(spacing: 20) { - Text("Your Secret Recovery Phrase") + Text("recoveryPhraseDisplay.title") .titleText() .multilineTextAlignment(.center) VStack(alignment: .center, spacing: 4) { - Text("The following 24 words represent your funds and the security used to protect them.") + Text("recoveryPhraseDisplay.description") .bodyText() - Text("Back them up now! There will be a test.") + Text("recoveryPhraseDisplay.backItUp") .bodyText() } } @@ -44,7 +44,7 @@ struct RecoveryPhraseDisplayView: View { VStack { Button( action: { viewStore.send(.finishedPressed) }, - label: { Text("Finished!") } + label: { Text("recoveryPhraseDisplay.button.finished") } ) .activeButtonStyle .frame(height: 60) @@ -54,7 +54,7 @@ struct RecoveryPhraseDisplayView: View { viewStore.send(.copyToBufferPressed) }, label: { - Text("Copy To Buffer") + Text("recoveryPhraseDisplay.button.copyToBuffer") .bodyText() } ) @@ -62,7 +62,7 @@ struct RecoveryPhraseDisplayView: View { } .padding() } else { - Text("Oops no words") + Text("recoveryPhraseDisplay.noWords") } } } diff --git a/secant/Features/BackupFlow/Views/ValidationFailedView.swift b/secant/Features/BackupFlow/Views/ValidationFailedView.swift index 1d1bb2f..25b6a5c 100644 --- a/secant/Features/BackupFlow/Views/ValidationFailedView.swift +++ b/secant/Features/BackupFlow/Views/ValidationFailedView.swift @@ -16,7 +16,7 @@ struct ValidationFailedView: View { GeometryReader { proxy in VStack { VStack(alignment: .center, spacing: 20) { - Text("Ouch, sorry, no.") + Text("validationFailed.title") .font(.custom(FontFamily.Rubik.regular.name, size: 30)) .fixedSize(horizontal: false, vertical: true) } @@ -36,18 +36,18 @@ struct ValidationFailedView: View { VStack(alignment: .center, spacing: 40) { VStack(alignment: .center, spacing: 20) { - Text("Your placed words did not match your secret recovery phrase.") + Text("validationFailed.description") .bodyText() .fixedSize(horizontal: false, vertical: true) - Text("Remember, you can't recover your funds if you lose (or incorrectly save) these 24 words.") + Text("validationFailed.incorrectBackupDescription") .bodyText() .fixedSize(horizontal: false, vertical: true) } Button( action: { viewStore.send(.reset) }, - label: { Text("I'm ready to try again") } + label: { Text("validationFailed.button.tryAgain") } ) .activeButtonStyle .frame(height: 60) diff --git a/secant/Features/BackupFlow/Views/ValidationSucceededView.swift b/secant/Features/BackupFlow/Views/ValidationSucceededView.swift index a53450a..2bd3873 100644 --- a/secant/Features/BackupFlow/Views/ValidationSucceededView.swift +++ b/secant/Features/BackupFlow/Views/ValidationSucceededView.swift @@ -19,10 +19,10 @@ struct ValidationSucceededView: View { GeometryReader { proxy in VStack { VStack(spacing: 20) { - Text("Success!") + Text("validationSuccess.title") .font(.custom(FontFamily.Rubik.regular.name, size: 36)) - Text("Place that backup somewhere safe and venture forth in security.") + Text("validationSuccess.description") .bodyText() .multilineTextAlignment(.center) .lineSpacing(2) @@ -52,7 +52,7 @@ struct ValidationSucceededView: View { viewStore.send(.proceedToHome, animation: .easeIn(duration: 1)) }, label: { - Text("Take me to my wallet!") + Text("validationSuccess.button.goToWallet") .fixedSize(horizontal: false, vertical: true) } ) @@ -71,7 +71,7 @@ struct ValidationSucceededView: View { ) }, label: { - Text("Show me my phrase again") + Text("validationSuccess.button.phraseAgain") .fixedSize(horizontal: false, vertical: true) } ) diff --git a/secant/Features/Onboarding/OnboardingStore.swift b/secant/Features/Onboarding/OnboardingStore.swift index 4329d45..bac66dd 100644 --- a/secant/Features/Onboarding/OnboardingStore.swift +++ b/secant/Features/Onboarding/OnboardingStore.swift @@ -19,8 +19,8 @@ struct OnboardingState: Equatable { struct Step: Equatable, Identifiable { let id: UUID - let title: String - let description: String + let title: LocalizedStringKey + let description: LocalizedStringKey let background: Image let badge: Badge } diff --git a/secant/Features/Onboarding/Views/Onboarding.swift b/secant/Features/Onboarding/Views/Onboarding.swift index d5eae5e..b81cf50 100644 --- a/secant/Features/Onboarding/Views/Onboarding.swift +++ b/secant/Features/Onboarding/Views/Onboarding.swift @@ -53,35 +53,34 @@ struct OnboardingView: View { } } -// swiftlint:disable line_length extension OnboardingState { static let onboardingSteps = IdentifiedArray( uniqueElements: [ Step( id: UUID(), - title: "Shielded by Default", - description: "Tired of worrying about which wallet you used last? US TOO! Now you don't have to, as all funds will automatically be moved to your shielded wallet (and migrated for you).", + title: "onboarding.step1.title", + description: "onboarding.step1.description", background: Asset.Assets.Backgrounds.callout1.image, badge: .shield ), Step( id: UUID(), - title: "Unified Addresses", - description: "Tired of worrying about which wallet you used last? US TOO! Now you don't have to, as all funds will automatically be moved to your shielded wallet (and migrated for you).", + title: "onboarding.step2.title", + description: "onboarding.step2.description", background: Asset.Assets.Backgrounds.callout2.image, badge: .person ), Step( id: UUID(), - title: "And so much more...", - description: "Faster reverse syncing (yes it's a thing). Liberated Payments, Social Payments, Address Books, in-line ZEC requests, wrapped Bitcoin, fractionalize NFTs, you providing liquidity for anything you want, getting that Defi, and going to Mexico.", + title: "onboarding.step3.title", + description: "onboarding.step3.description", background: Asset.Assets.Backgrounds.callout3.image, badge: .list ), Step( id: UUID(), - title: "Ready for the Future", - description: "Lets get you set up!", + title: "onboarding.step4.title", + description: "onboarding.step4.description", background: Asset.Assets.Backgrounds.callout4.image, badge: .shield ) diff --git a/secant/Features/Welcome/WelcomeView.swift b/secant/Features/Welcome/WelcomeView.swift index fad8bee..26c1182 100644 --- a/secant/Features/Welcome/WelcomeView.swift +++ b/secant/Features/Welcome/WelcomeView.swift @@ -23,10 +23,10 @@ struct WelcomeView: View { ) VStack { - Text("Welcome!") + Text("welcomeScreen.title") .titleText() - Text("Just Loading, one sec") + Text("welcomeScreen.subtitle") .captionText() } } diff --git a/secant/Localizable.strings b/secant/Localizable.strings new file mode 100644 index 0000000..d5e6406 --- /dev/null +++ b/secant/Localizable.strings @@ -0,0 +1,48 @@ +// MARK: - Welcome Screen +"welcomeScreen.title" = "Welcome!"; +"welcomeScreen.subtitle" = "Just Loading, one sec"; + +// MARK: - Onboarding Flow +"onboarding.step1.title" = "Shielded by Default"; +"onboarding.step1.description" = "Tired of worrying about which wallet you used last? US TOO! Now you don't have to, as all funds will automatically be moved to your shielded wallet (and migrated for you)."; + +"onboarding.step2.title" = "Unified Addresses"; +"onboarding.step2.description" = "Tired of worrying about which wallet you used last? US TOO! Now you don't have to, as all funds will automatically be moved to your shielded wallet (and migrated for you)."; + +"onboarding.step3.title" = "And so much more..."; +"onboarding.step3.description" = "Faster reverse syncing (yes it's a thing). Liberated Payments, Social Payments, Address Books, in-line ZEC requests, wrapped Bitcoin, fractionalize NFTs, you providing liquidity for anything you want, getting that Defi, and going to Mexico."; + +"onboarding.step4.title" = "Ready for the Future"; +"onboarding.step4.description" = "Lets get you set up!"; + +"onboarding.button.newWallet" = "Create New Wallet"; +"onboarding.button.importWallet" = "Import an Existing Wallet"; + +// MARK: - Secret Recovery Phrase Display +"recoveryPhraseDisplay.title" = "Your Secret Recovery Phrase"; +"recoveryPhraseDisplay.description" = "The following 24 words represent your funds and the security used to protect them."; +"recoveryPhraseDisplay.backItUp" = "Back them up now! There will be a test."; +"recoveryPhraseDisplay.button.finished" = "Finished!"; +"recoveryPhraseDisplay.button.copyToBuffer" = "Copy To Buffer"; +"recoveryPhraseDisplay.noWords" = "Oops no words"; + +// MARK: - Recovery Phrase Backup Validation & Success/Failed +"recoveryPhraseBackupValidation.title" = "Verify Your Backup"; +"recoveryPhraseBackupValidation.description" = "Drag the words below to match your backed-up copy."; +"recoveryPhraseBackupValidation.successResult" = "Congratulations! You validated your secret recovery phrase."; +"recoveryPhraseBackupValidation.failedResult" = "Your placed words did not match your secret recovery phrase"; + +"validationSuccess.title" = "Success!"; +"validationSuccess.description" = "Place that backup somewhere safe and venture forth in security."; +"validationSuccess.button.goToWallet" = "Take me to my wallet!"; +"validationSuccess.button.phraseAgain" = "Show me my phrase again"; + +"validationFailed.title" = "Ouch, sorry, no."; +"validationFailed.description" = "Your placed words did not match your secret recovery phrase."; +"validationFailed.incorrectBackupDescription" = "Remember, you can't recover your funds if you lose (or incorrectly save) these 24 words."; +"validationFailed.button.tryAgain" = "I'm ready to try again"; + +// MARK: - Common & Shared +"Back" = "Back"; +"Skip" = "Skip"; +"Next" = "Next"; diff --git a/secant/Screens/Onboarding/OnboardingFooterView.swift b/secant/Screens/Onboarding/OnboardingFooterView.swift index 6ea92d1..c3e9d71 100644 --- a/secant/Screens/Onboarding/OnboardingFooterView.swift +++ b/secant/Screens/Onboarding/OnboardingFooterView.swift @@ -18,7 +18,7 @@ struct OnboardingFooterView: View { Spacer() if viewStore.isFinalStep { - Button("Create New Wallet") { + Button("onboarding.button.newWallet") { withAnimation(.easeInOut(duration: animationDuration)) { viewStore.send(.createNewWallet) } @@ -26,7 +26,7 @@ struct OnboardingFooterView: View { .activeButtonStyle .onboardingFooterButtonLayout() - Button("Import an Existing Wallet") { + Button("onboarding.button.importWallet") { withAnimation(.easeInOut(duration: animationDuration)) { viewStore.send(.importExistingWallet) }