Skip to content

Commit

Permalink
Merge pull request #1211 from anyproto/ios-2661-update-texts-on-save-…
Browse files Browse the repository at this point in the history
…your-recovery-phrase-screen

iOS-2661 Update onboarding key screen
  • Loading branch information
joe-pusya authored Apr 15, 2024
2 parents cf79f16 + 0ee1a7e commit 9c533ee
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 60 deletions.
67 changes: 29 additions & 38 deletions Anytype/Generated/Strings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,6 @@ internal enum Loc {
internal static let lock = Loc.tr("Localizable", "Lock", fallback: "Lock")
/// Log out
internal static let logOut = Loc.tr("Localizable", "Log out", fallback: "Log out")
/// Log In
internal static let login = Loc.tr("Localizable", "Login", fallback: "Log In")
/// Logout and clear data
internal static let logoutAndClearData = Loc.tr("Localizable", "Logout and clear data", fallback: "Logout and clear data")
/// Media
Expand Down Expand Up @@ -521,8 +519,6 @@ internal enum Loc {
internal static let shared = Loc.tr("Localizable", "Shared", fallback: "Shared")
/// Show types
internal static let showTypes = Loc.tr("Localizable", "Show types", fallback: "Show types")
/// Sign up
internal static let signUp = Loc.tr("Localizable", "Sign up", fallback: "Sign up")
/// Sky
internal static let sky = Loc.tr("Localizable", "Sky", fallback: "Sky")
/// Sky background
Expand Down Expand Up @@ -757,10 +753,11 @@ internal enum Loc {
}
}
internal enum Key {
/// It’s a novel way of authentication that gives you full ownership over your account and data.
internal static let description = Loc.tr("Localizable", "Auth.JoinFlow.Key.Description", fallback: "It’s a novel way of authentication that gives you full ownership over your account and data.")
/// Save your Recovery Phrase
internal static let title = Loc.tr("Localizable", "Auth.JoinFlow.Key.Title", fallback: "Save your Recovery Phrase")
/// It gives you full ownership over your vault.
/// It can not be recovered.
internal static let description = Loc.tr("Localizable", "Auth.JoinFlow.Key.Description", fallback: "It gives you full ownership over your vault.\nIt can not be recovered.")
/// This is your Key
internal static let title = Loc.tr("Localizable", "Auth.JoinFlow.Key.Title", fallback: "This is your Key")
internal enum Button {
internal enum Copy {
/// Copy to clipboard
Expand All @@ -775,50 +772,46 @@ internal enum Loc {
internal static let title = Loc.tr("Localizable", "Auth.JoinFlow.Key.Button.Later.Title", fallback: "Skip")
}
internal enum Saved {
/// Go to the app
internal static let title = Loc.tr("Localizable", "Auth.JoinFlow.Key.Button.Saved.Title", fallback: "Go to the app")
/// Enter my Vault
internal static let title = Loc.tr("Localizable", "Auth.JoinFlow.Key.Button.Saved.Title", fallback: "Enter my Vault")
}
internal enum Show {
/// Show Recovery Phrase
internal static let title = Loc.tr("Localizable", "Auth.JoinFlow.Key.Button.Show.Title", fallback: "Show Recovery Phrase")
/// Show my Key
internal static let title = Loc.tr("Localizable", "Auth.JoinFlow.Key.Button.Show.Title", fallback: "Show my Key")
}
internal enum Tip {
/// You can find Recovery Phrase later in Anytype settings
internal static let title = Loc.tr("Localizable", "Auth.JoinFlow.Key.Button.Tip.Title", fallback: "You can find Recovery Phrase later in Anytype settings")
/// You can find this key later in Anytype settings
internal static let title = Loc.tr("Localizable", "Auth.JoinFlow.Key.Button.Tip.Title", fallback: "You can find this key later in Anytype settings")
}
}
internal enum ReadMore {
/// What is Recovery Phrase?
internal static let title = Loc.tr("Localizable", "Auth.JoinFlow.Key.ReadMore.Title", fallback: "What is Recovery Phrase?")
/// What is the Key?
internal static let title = Loc.tr("Localizable", "Auth.JoinFlow.Key.ReadMore.Title", fallback: "What is the Key?")
internal enum Instruction {
/// How to save my phrase?
internal static let title = Loc.tr("Localizable", "Auth.JoinFlow.Key.ReadMore.Instruction.Title", fallback: "How to save my phrase?")
/// How to save my key?
internal static let title = Loc.tr("Localizable", "Auth.JoinFlow.Key.ReadMore.Instruction.Title", fallback: "How to save my key?")
internal enum Option1 {
/// The easiest way to store your Recovery Phrase is to save it in your password manager.
internal static let title = Loc.tr("Localizable", "Auth.JoinFlow.Key.ReadMore.Instruction.Option1.Title", fallback: "The easiest way to store your Recovery Phrase is to save it in your password manager.")
/// The easiest way to store your key is to save it in your password manager.
internal static let title = Loc.tr("Localizable", "Auth.JoinFlow.Key.ReadMore.Instruction.Option1.Title", fallback: "The easiest way to store your key is to save it in your password manager.")
}
internal enum Option2 {
/// The most secure way is to write it down on paper and keep it offline, in a safe and secure place.
internal static let title = Loc.tr("Localizable", "Auth.JoinFlow.Key.ReadMore.Instruction.Option2.Title", fallback: "The most secure way is to write it down on paper and keep it offline, in a safe and secure place.")
}
}
internal enum Option1 {
/// Recovery Phrase is a random combination of 12 words from which your account is magically generated on this device.
internal static let title = Loc.tr("Localizable", "Auth.JoinFlow.Key.ReadMore.Option1.Title", fallback: "Recovery Phrase is a random combination of 12 words from which your account is magically generated on this device.")
/// It is represented by a recovery phrase – 12 random words from which your vault is magically generated on this device.
internal static let title = Loc.tr("Localizable", "Auth.JoinFlow.Key.ReadMore.Option1.Title", fallback: "It is represented by a recovery phrase – 12 random words from which your vault is magically generated on this device.")
}
internal enum Option2 {
/// Whomever knows Recovery Phrase, owns the account. **At this moment, you are the only person in the world who knows it.**
internal static let title = Loc.tr("Localizable", "Auth.JoinFlow.Key.ReadMore.Option2.Title", fallback: "Whomever knows Recovery Phrase, owns the account. **At this moment, you are the only person in the world who knows it.**")
/// Who knows combination of these words – owns the vault. **Now, you are the only person in the world knows it.**
internal static let title = Loc.tr("Localizable", "Auth.JoinFlow.Key.ReadMore.Option2.Title", fallback: "Who knows combination of these words – owns the vault. **Now, you are the only person in the world knows it.**")
}
internal enum Option3 {
/// That's why it's essential to keep Recovery Phrase safe. As the sole owner, nobody can help you if it's lost.
internal static let title = Loc.tr("Localizable", "Auth.JoinFlow.Key.ReadMore.Option3.Title", fallback: "That's why it's essential to keep Recovery Phrase safe. As the sole owner, nobody can help you if it's lost.")
/// All computational resources on Earth are not enough to break in. If you lose it, it cannot be recovered. So, store it somewhere safe!
internal static let title = Loc.tr("Localizable", "Auth.JoinFlow.Key.ReadMore.Option3.Title", fallback: "All computational resources on Earth are not enough to break in. If you lose it, it cannot be recovered. So, store it somewhere safe!")
}
}
internal enum TextField {
/// Type your recovery phrase
internal static let placeholder = Loc.tr("Localizable", "Auth.JoinFlow.Key.TextField.Placeholder", fallback: "Type your recovery phrase")
}
}
internal enum Setting {
internal enum Space {
Expand All @@ -841,10 +834,8 @@ internal enum Loc {
/// OR
internal static let or = Loc.tr("Localizable", "Auth.LoginFlow.Or", fallback: "OR")
internal enum Enter {
internal enum Button {
/// Login
internal static let title = Loc.tr("Localizable", "Auth.LoginFlow.Enter.Button.Title", fallback: "Login")
}
/// Enter my Vault
internal static let title = Loc.tr("Localizable", "Auth.LoginFlow.Enter.Title", fallback: "Enter my Vault")
}
internal enum Entering {
internal enum Void {
Expand All @@ -853,8 +844,8 @@ internal enum Loc {
}
}
internal enum Textfield {
/// Type your recovery phrase
internal static let placeholder = Loc.tr("Localizable", "Auth.LoginFlow.Textfield.Placeholder", fallback: "Type your recovery phrase")
/// Type your key
internal static let placeholder = Loc.tr("Localizable", "Auth.LoginFlow.Textfield.Placeholder", fallback: "Type your key")
}
internal enum Use {
internal enum Keychain {
Expand Down Expand Up @@ -2666,8 +2657,8 @@ internal enum Loc {
internal enum Wallet {
internal enum Recovery {
internal enum Error {
/// Invalid recovery phrase
internal static let description = Loc.tr("Localizable", "Wallet.Recovery.Error.description", fallback: "Invalid recovery phrase")
/// Invalid Key
internal static let description = Loc.tr("Localizable", "Wallet.Recovery.Error.description", fallback: "Invalid Key")
}
}
}
Expand Down
33 changes: 15 additions & 18 deletions Anytype/Resources/Strings/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,6 @@
"Keychain.SeedPhrasePlaceholder" = "witch collapse practice feed shame open despair creek road again ice least lake tree young address brain despair";

// Auth
"Sign up" = "Sign up";
"Login" = "Log In";
"Create" = "Create";
"Scan QR code" = "Scan QR code";
"Auth.CameraPermissionTitle" = "Please allow access";
Expand All @@ -237,28 +235,27 @@
"Error creating wallet" = "Error creating wallet";
"Error select account" = "Error select account";
"Error wallet recover account" = "Error wallet recover account";
"Wallet.Recovery.Error.description" = "Invalid recovery phrase";
"Wallet.Recovery.Error.description" = "Invalid Key";

"Search for language" = "Search for language";

// Auth - Join flow

"Auth.JoinFlow.Key.Title" = "Save your Recovery Phrase";
"Auth.JoinFlow.Key.Description" = "It’s a novel way of authentication that gives you full ownership over your account and data.";
"Auth.JoinFlow.Key.TextField.Placeholder" = "Type your recovery phrase";
"Auth.JoinFlow.Key.Button.Show.Title" = "Show Recovery Phrase";
"Auth.JoinFlow.Key.Button.Saved.Title" = "Go to the app";
"Auth.JoinFlow.Key.Title" = "This is your Key";
"Auth.JoinFlow.Key.Description" = "It gives you full ownership over your vault.\nIt can not be recovered.";
"Auth.JoinFlow.Key.Button.Show.Title" = "Show my Key";
"Auth.JoinFlow.Key.Button.Saved.Title" = "Enter my Vault";
"Auth.JoinFlow.Key.Button.Later.Title" = "Skip";
"Auth.JoinFlow.Key.Button.Copy.Title" = "Copy to clipboard";
"Auth.JoinFlow.Key.Button.Info.Title" = "Read more";
"Auth.JoinFlow.Key.Button.Tip.Title" = "You can find Recovery Phrase later in Anytype settings";

"Auth.JoinFlow.Key.ReadMore.Title" = "What is Recovery Phrase?";
"Auth.JoinFlow.Key.ReadMore.Option1.Title" = "Recovery Phrase is a random combination of 12 words from which your account is magically generated on this device.";
"Auth.JoinFlow.Key.ReadMore.Option2.Title" = "Whomever knows Recovery Phrase, owns the account. **At this moment, you are the only person in the world who knows it.**";
"Auth.JoinFlow.Key.ReadMore.Option3.Title" = "That's why it's essential to keep Recovery Phrase safe. As the sole owner, nobody can help you if it's lost.";
"Auth.JoinFlow.Key.ReadMore.Instruction.Title" = "How to save my phrase?";
"Auth.JoinFlow.Key.ReadMore.Instruction.Option1.Title" = "The easiest way to store your Recovery Phrase is to save it in your password manager.";
"Auth.JoinFlow.Key.Button.Tip.Title" = "You can find this key later in Anytype settings";

"Auth.JoinFlow.Key.ReadMore.Title" = "What is the Key?";
"Auth.JoinFlow.Key.ReadMore.Option1.Title" = "It is represented by a recovery phrase – 12 random words from which your vault is magically generated on this device.";
"Auth.JoinFlow.Key.ReadMore.Option2.Title" = "Who knows combination of these words – owns the vault. **Now, you are the only person in the world knows it.**";
"Auth.JoinFlow.Key.ReadMore.Option3.Title" = "All computational resources on Earth are not enough to break in. If you lose it, it cannot be recovered. So, store it somewhere safe!";
"Auth.JoinFlow.Key.ReadMore.Instruction.Title" = "How to save my key?";
"Auth.JoinFlow.Key.ReadMore.Instruction.Option1.Title" = "The easiest way to store your key is to save it in your password manager.";
"Auth.JoinFlow.Key.ReadMore.Instruction.Option2.Title" = "The most secure way is to write it down on paper and keep it offline, in a safe and secure place.";

"Auth.JoinFlow.Soul.Title" = "Set your name";
Expand All @@ -272,8 +269,8 @@
// Auth - Login flow
"Auth.LoginFlow.Use.Keychain.Title" = "Use keychain";
"Auth.LoginFlow.Or" = "OR";
"Auth.LoginFlow.Textfield.Placeholder" = "Type your recovery phrase";
"Auth.LoginFlow.Enter.Button.Title" = "Login";
"Auth.LoginFlow.Textfield.Placeholder" = "Type your key";
"Auth.LoginFlow.Enter.Title" = "Enter my Vault";
"Auth.LoginFlow.Entering.Void.Title" = "Entering the Void";

// Object settings
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ struct KeyPhraseMoreInfoView: View {
.foregroundColor(.Auth.inputText)
}
.frame(width: 56, height: 56)
AnytypeText(description, style: .bodyRegular)
AnytypeText(description, style: .bodyRegular, enableMarkdown: true)
.foregroundColor(.Auth.inputText)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ struct KeyPhraseView: View {

AnytypeText(
Loc.Auth.JoinFlow.Key.description,
style: .calloutRegular
style: .bodyRegular
)
.foregroundColor(.Auth.body)
.multilineTextAlignment(.center)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ struct LoginView: View {
var body: some View {
content
.navigationBarBackButtonHidden(true)
.navigationTitle(Loc.login)
.navigationTitle(Loc.Auth.LoginFlow.Enter.title)
.navigationBarTitleDisplayMode(.inline)
.background(TransparentBackground())
.padding(.horizontal, 16)
Expand Down Expand Up @@ -67,7 +67,7 @@ struct LoginView: View {
private var buttonsBlock : some View {
VStack(spacing: 12) {
StandardButton(
Loc.Auth.LoginFlow.Enter.Button.title,
Loc.Auth.LoginFlow.Enter.title,
inProgress: model.loadingRoute.isLoginInProgress,
style: .primaryLarge,
action: {
Expand Down

0 comments on commit 9c533ee

Please sign in to comment.