diff --git a/Localization/StringsConvertor/input/Base.lproj/app.json b/Localization/StringsConvertor/input/Base.lproj/app.json index 718cb6e81..23180ac89 100644 --- a/Localization/StringsConvertor/input/Base.lproj/app.json +++ b/Localization/StringsConvertor/input/Base.lproj/app.json @@ -383,8 +383,7 @@ }, "confirm_email": { "title": "One last thing.", - "subtitle": "Tap the link we emailed to you to verify your account.", - "tap_the_link_we_emailed_to_you_to_verify_your_account": "Tap the link we emailed to you to verify your account", + "tap_the_link_we_emailed_to_you_to_verify_your_account": "Tap the link we sent you to verify %@. We’ll wait right here.", "button": { "open_email_app": "Open Email App", "resend": "Resend" diff --git a/Localization/app.json b/Localization/app.json index 100562a0a..8d4f1b592 100644 --- a/Localization/app.json +++ b/Localization/app.json @@ -393,9 +393,8 @@ } }, "confirm_email": { - "title": "One last thing.", - "subtitle": "Tap the link we emailed to you to verify your account.", - "tap_the_link_we_emailed_to_you_to_verify_your_account": "Tap the link we emailed to you to verify your account", + "title": "Check Your Inbox", + "tap_the_link_we_emailed_to_you_to_verify_your_account": "Tap the link we sent you to verify %@. We’ll wait right here.", "button": { "open_email_app": "Open Email App", "resend": "Resend" diff --git a/Mastodon/Scene/Onboarding/ConfirmEmail/MastodonConfirmEmailViewController.swift b/Mastodon/Scene/Onboarding/ConfirmEmail/MastodonConfirmEmailViewController.swift index 71a1aeb02..561d98310 100644 --- a/Mastodon/Scene/Onboarding/ConfirmEmail/MastodonConfirmEmailViewController.swift +++ b/Mastodon/Scene/Onboarding/ConfirmEmail/MastodonConfirmEmailViewController.swift @@ -26,19 +26,10 @@ final class MastodonConfirmEmailViewController: UIViewController, NeedsDependenc let stackView = UIStackView() - let largeTitleLabel: UILabel = { - let label = UILabel() - label.font = UIFontMetrics(forTextStyle: .largeTitle).scaledFont(for: UIFont.systemFont(ofSize: 34, weight: .bold)) - label.textColor = .label - label.text = L10n.Scene.ConfirmEmail.title - return label - }() - private(set) lazy var subtitleLabel: UILabel = { let label = UILabel() - label.font = UIFontMetrics(forTextStyle: .title1).scaledFont(for: UIFont.systemFont(ofSize: 20)) - label.textColor = .secondaryLabel - label.text = L10n.Scene.ConfirmEmail.tapTheLinkWeEmailedToYouToVerifyYourAccount + label.font = UIFontMetrics(forTextStyle: .body).scaledFont(for: UIFont.systemFont(ofSize: 17)) + label.textColor = .label label.numberOfLines = 0 return label }() @@ -57,10 +48,6 @@ final class MastodonConfirmEmailViewController: UIViewController, NeedsDependenc return navigationActionView }() - deinit { - os_log(.info, log: .debug, "%{public}s[%{public}ld], %{public}s", ((#file as NSString).lastPathComponent), #line, #function) - } - } extension MastodonConfirmEmailViewController { @@ -68,16 +55,16 @@ extension MastodonConfirmEmailViewController { override func viewDidLoad() { setupOnboardingAppearance() - configureTitleLabel() configureMargin() + subtitleLabel.text = L10n.Scene.ConfirmEmail.tapTheLinkWeEmailedToYouToVerifyYourAccount(viewModel.email) + // stackView stackView.axis = .vertical stackView.distribution = .fill stackView.spacing = 10 stackView.layoutMargins = UIEdgeInsets(top: 10, left: 0, bottom: 23, right: 0) stackView.isLayoutMarginsRelativeArrangement = true - stackView.addArrangedSubview(largeTitleLabel) stackView.addArrangedSubview(subtitleLabel) stackView.addArrangedSubview(emailImageView) emailImageView.setContentHuggingPriority(.defaultLow, for: .vertical) @@ -140,31 +127,19 @@ extension MastodonConfirmEmailViewController { navigationActionView.nextButton.setTitle(L10n.Scene.ConfirmEmail.Button.openEmailApp, for: .normal) navigationActionView.nextButton.addTarget(self, action: #selector(MastodonConfirmEmailViewController.openEmailButtonPressed(_:)), for: .touchUpInside) + + title = L10n.Scene.ConfirmEmail.title } override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { super.traitCollectionDidChange(previousTraitCollection) - configureTitleLabel() configureMargin() } } extension MastodonConfirmEmailViewController { - private func configureTitleLabel() { - switch traitCollection.horizontalSizeClass { - case .regular: - navigationItem.largeTitleDisplayMode = .always - navigationItem.title = L10n.Scene.ConfirmEmail.title.replacingOccurrences(of: "\n", with: " ") - largeTitleLabel.isHidden = true - default: - navigationItem.largeTitleDisplayMode = .never - navigationItem.title = nil - largeTitleLabel.isHidden = false - } - } - private func configureMargin() { switch traitCollection.horizontalSizeClass { case .regular: diff --git a/MastodonSDK/Sources/MastodonLocalization/Generated/Strings.swift b/MastodonSDK/Sources/MastodonLocalization/Generated/Strings.swift index d9323db45..54169e31b 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Generated/Strings.swift +++ b/MastodonSDK/Sources/MastodonLocalization/Generated/Strings.swift @@ -620,12 +620,12 @@ public enum L10n { } } public enum ConfirmEmail { - /// Tap the link we emailed to you to verify your account. - public static let subtitle = L10n.tr("Localizable", "Scene.ConfirmEmail.Subtitle", fallback: "Tap the link we emailed to you to verify your account.") - /// Tap the link we emailed to you to verify your account - public static let tapTheLinkWeEmailedToYouToVerifyYourAccount = L10n.tr("Localizable", "Scene.ConfirmEmail.TapTheLinkWeEmailedToYouToVerifyYourAccount", fallback: "Tap the link we emailed to you to verify your account") - /// One last thing. - public static let title = L10n.tr("Localizable", "Scene.ConfirmEmail.Title", fallback: "One last thing.") + /// Tap the link we sent you to verify %@. We'll wait right here. + public static func tapTheLinkWeEmailedToYouToVerifyYourAccount(_ p1: Any) -> String { + return L10n.tr("Localizable", "Scene.ConfirmEmail.TapTheLinkWeEmailedToYouToVerifyYourAccount", String(describing: p1), fallback: "Tap the link we sent you to verify %@. We'll wait right here.") + } + /// Check Your Inbox + public static let title = L10n.tr("Localizable", "Scene.ConfirmEmail.Title", fallback: "Check Your Inbox") public enum Button { /// Open Email App public static let openEmailApp = L10n.tr("Localizable", "Scene.ConfirmEmail.Button.OpenEmailApp", fallback: "Open Email App") diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/Base.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/Base.lproj/Localizable.strings index 9ba832e19..220de5807 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/Base.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/Base.lproj/Localizable.strings @@ -233,9 +233,8 @@ uploaded to Mastodon."; "Scene.ConfirmEmail.OpenEmailApp.Mail" = "Mail"; "Scene.ConfirmEmail.OpenEmailApp.OpenEmailClient" = "Open Email Client"; "Scene.ConfirmEmail.OpenEmailApp.Title" = "Check your inbox."; -"Scene.ConfirmEmail.Subtitle" = "Tap the link we emailed to you to verify your account."; -"Scene.ConfirmEmail.TapTheLinkWeEmailedToYouToVerifyYourAccount" = "Tap the link we emailed to you to verify your account"; -"Scene.ConfirmEmail.Title" = "One last thing."; +"Scene.ConfirmEmail.TapTheLinkWeEmailedToYouToVerifyYourAccount" = "Tap the link we sent you to verify %@. We'll wait right here."; +"Scene.ConfirmEmail.Title" = "Check Your Inbox"; "Scene.Discovery.Intro" = "These are the posts gaining traction in your corner of Mastodon."; "Scene.Discovery.Tabs.Community" = "Community"; "Scene.Discovery.Tabs.ForYou" = "For You"; diff --git a/MastodonSDK/Sources/MastodonLocalization/Resources/en.lproj/Localizable.strings b/MastodonSDK/Sources/MastodonLocalization/Resources/en.lproj/Localizable.strings index 57113f6e3..42186cb5b 100644 --- a/MastodonSDK/Sources/MastodonLocalization/Resources/en.lproj/Localizable.strings +++ b/MastodonSDK/Sources/MastodonLocalization/Resources/en.lproj/Localizable.strings @@ -228,8 +228,8 @@ uploaded to Mastodon."; "Scene.ConfirmEmail.OpenEmailApp.OpenEmailClient" = "Open Email Client"; "Scene.ConfirmEmail.OpenEmailApp.Title" = "Check your inbox."; "Scene.ConfirmEmail.Subtitle" = "Tap the link we emailed to you to verify your account."; -"Scene.ConfirmEmail.TapTheLinkWeEmailedToYouToVerifyYourAccount" = "Tap the link we emailed to you to verify your account"; -"Scene.ConfirmEmail.Title" = "One last thing."; +"Scene.ConfirmEmail.TapTheLinkWeEmailedToYouToVerifyYourAccount" = "Tap the link we sent you to verify %@. We'll wait right here."; +"Scene.ConfirmEmail.Title" = "Check Your Inbox"; "Scene.Discovery.Intro" = "These are the posts gaining traction in your corner of Mastodon."; "Scene.Discovery.Tabs.Community" = "Community"; "Scene.Discovery.Tabs.ForYou" = "For You";