diff --git a/Signal/src/ViewControllers/Registration/OnboardingAccountDetailsViewController.swift b/Signal/src/ViewControllers/Registration/OnboardingAccountDetailsViewController.swift index ad8022dbf..f96794967 100644 --- a/Signal/src/ViewControllers/Registration/OnboardingAccountDetailsViewController.swift +++ b/Signal/src/ViewControllers/Registration/OnboardingAccountDetailsViewController.swift @@ -31,7 +31,7 @@ final class OnboardingAccountDetailsViewController : OnboardingBaseViewControlle let titleLabel = self.createTitleLabel(text: NSLocalizedString("Create Your Loki Messenger Account", comment: "")) titleLabel.accessibilityIdentifier = "onboarding.accountDetailsStep.titleLabel" let topSpacer = UIView.vStretchingSpacer() - let displayNameLabel = createExplanationLabel(text: NSLocalizedString("Enter a name that will be shown to all your contacts", comment: "")) + let displayNameLabel = createExplanationLabel(text: NSLocalizedString("Enter a name to be shown to your contacts", comment: "")) displayNameLabel.accessibilityIdentifier = "onboarding.accountDetailsStep.displayNameLabel" let passwordLabel = createExplanationLabel(text: NSLocalizedString("Type an optional password for added security", comment: "")) passwordLabel.accessibilityIdentifier = "onboarding.accountDetailsStep.passwordLabel" diff --git a/Signal/src/ViewControllers/Registration/OnboardingPermissionsViewController.swift b/Signal/src/ViewControllers/Registration/OnboardingPermissionsViewController.swift index 653984346..b7ce02af4 100644 --- a/Signal/src/ViewControllers/Registration/OnboardingPermissionsViewController.swift +++ b/Signal/src/ViewControllers/Registration/OnboardingPermissionsViewController.swift @@ -19,7 +19,7 @@ public class OnboardingPermissionsViewController: OnboardingBaseViewController { target: self, action: #selector(skipWasPressed)) - let titleLabel = self.createTitleLabel(text: NSLocalizedString("ONBOARDING_PERMISSIONS_TITLE", comment: "Title of the 'onboarding permissions' view.")) + let titleLabel = self.createTitleLabel(text: NSLocalizedString("Loki Messenger can let you know when you get a message (and who it is from)", comment: "")) titleLabel.accessibilityIdentifier = "onboarding.permissions." + "titleLabel" let explanationLabel = self.createExplanationLabel(text: NSLocalizedString("ONBOARDING_PERMISSIONS_EXPLANATION", diff --git a/Signal/src/ViewControllers/Registration/OnboardingPublicKeyViewController.swift b/Signal/src/ViewControllers/Registration/OnboardingPublicKeyViewController.swift index 5cc07f436..95f48464a 100644 --- a/Signal/src/ViewControllers/Registration/OnboardingPublicKeyViewController.swift +++ b/Signal/src/ViewControllers/Registration/OnboardingPublicKeyViewController.swift @@ -28,7 +28,7 @@ final class OnboardingPublicKeyViewController : OnboardingBaseViewController { let titleLabel = createTitleLabel(text: NSLocalizedString("Create Your Loki Messenger Account", comment: "")) titleLabel.accessibilityIdentifier = "onboarding.publicKeyStep.titleLabel" let topSpacer = UIView.vStretchingSpacer() - let explanationLabel = createExplanationLabel(text: NSLocalizedString("Please save the seed below in a safe location. They can be used to restore your account if you lose access or migrate to a new device.", comment: "")) + let explanationLabel = createExplanationLabel(text: NSLocalizedString("Please save the seed below in a safe location. It can be used to restore your account if you lose access, or to migrate to a new device.", comment: "")) explanationLabel.accessibilityIdentifier = "onboarding.publicKeyStep.explanationLabel" let bottomSpacer = UIView.vStretchingSpacer() let registerButton = button(title: NSLocalizedString("Register", comment: ""), selector: #selector(register)) diff --git a/Signal/translations/en.lproj/Localizable.strings b/Signal/translations/en.lproj/Localizable.strings index 45c0b21fe..2c768028f 100644 --- a/Signal/translations/en.lproj/Localizable.strings +++ b/Signal/translations/en.lproj/Localizable.strings @@ -2545,10 +2545,11 @@ // -- Loki -- +"Loki Messenger can let you know when you get a message (and who it is from)" = "Loki Messenger can let you know when you get a message (and who it is from)"; "Create Your Loki Messenger Account" = "Create Your Loki Messenger Account"; -"Enter a name that will be shown to all your contacts" = "Enter a name that will be shown to all your contacts"; +"Enter a name to be shown to your contacts" = "Enter a name to be shown to your contacts"; "Display Name (Optional)" = "Display Name (Optional)"; "Type an optional password for added security" = "Type an optional password for added security"; "Password (Optional)" = "Password (Optional)"; -"Please save the seed below in a safe location. They can be used to restore your account if you lose access or migrate to a new device." = "Please save the seed below in a safe location. They can be used to restore your account if you lose access or migrate to a new device."; +"Please save the seed below in a safe location. It can be used to restore your account if you lose access, or to migrate to a new device." = "Please save the seed below in a safe location. It can be used to restore your account if you lose access, or to migrate to a new device."; "Register" = "Register"; diff --git a/SignalServiceKit/src/Contacts/PhoneNumber.m b/SignalServiceKit/src/Contacts/PhoneNumber.m index b234f6c97..40bac6222 100644 --- a/SignalServiceKit/src/Contacts/PhoneNumber.m +++ b/SignalServiceKit/src/Contacts/PhoneNumber.m @@ -89,12 +89,17 @@ static NSString *const RPDefaultsKeyPhoneNumberCanonical = @"RPDefaultsKeyPhoneN } + (nullable PhoneNumber *)phoneNumberFromE164:(NSString *)text { - OWSAssertDebug(text != nil); - OWSAssertDebug([text hasPrefix:COUNTRY_CODE_PREFIX]); - PhoneNumber *number = [PhoneNumber phoneNumberFromText:text andRegion:@"ZZ"]; - - OWSAssertDebug(number != nil); - return number; + NSString *e164 = text; + PhoneNumber *result = [[PhoneNumber alloc] initWithPhoneNumber:[NBPhoneNumber new] e164:e164]; + return result; + // Original code: + // ======== +// OWSAssertDebug(text != nil); +// OWSAssertDebug([text hasPrefix:COUNTRY_CODE_PREFIX]); +// PhoneNumber *number = [PhoneNumber phoneNumberFromText:text andRegion:@"ZZ"]; +// OWSAssertDebug(number != nil); +// return number; + // ======== } + (NSString *)bestEffortFormatPartialUserSpecifiedTextToLookLikeAPhoneNumber:(NSString *)input {