Merge branch '174_app_localization' into 165_wallet_import_screen

This commit is contained in:
Lukas Korba 2022-03-01 09:17:03 +01:00
commit dfca94677d
9 changed files with 80 additions and 33 deletions

View File

@ -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()
}
}

View File

@ -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")
}
}
}

View File

@ -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)

View File

@ -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)
}
)

View File

@ -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
}

View File

@ -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
)

View File

@ -23,10 +23,10 @@ struct WelcomeView: View {
)
VStack {
Text("Welcome!")
Text("welcomeScreen.title")
.titleText()
Text("Just Loading, one sec")
Text("welcomeScreen.subtitle")
.captionText()
}
}

View File

@ -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";

View File

@ -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)
}