wordpress-mobile / WordPress-iOS

WordPress for iOS - Official repository
http://ios.wordpress.org/
GNU General Public License v2.0
3.68k stars 1.11k forks source link

Add WordPress.com wording to 2FA workflow #23634

Closed mrpolanco closed 1 week ago

mrpolanco commented 1 week ago

Fixes #21875

Added clarity to the verification code view that the code is for WordPress.com:

Before-After - iPhone 16 Pro - 2024-09-27 at 14 58 20-side

Localization strings edited, and added to missing language (Czech).

To test:

Regression Notes

  1. Potential unintended areas of impact

  2. What I did to test those areas of impact (or what existing automated tests I relied on)

  3. What automated tests I added (or what prevented me from doing so) None

PR submission checklist:

Testing checklist:

kean commented 1 week ago

Hey, thanks for addressing it, @mrpolanco.

For localization, developers usually add a key with a default localization (English) and let the translators update it for other languages. I would suggest the following changes:

private enum Strings {
    static let details = NSLocalizedString(key: "twoFactorAuthorization.details", value: "Please enter the verification code from your authentication app for your WordPress.com account.", comment: "The details label in the two-factor authorization screen. Note: it has to mention that it's for a WordPress.com account")
}

You can use the comment to clarify how it is used and what it should contain. See other files for reference.

mrpolanco commented 1 week ago

Hi @kean ! Thank you for the feedback. I undid the localizable.string changes and submitted the change only to NSLocalizedString(), as indicated. But I fear I may have updated it incorrectly - my apologies. Please let me know if I can correct on my end.

mrpolanco commented 1 week ago

New PR here @kean : https://github.com/wordpress-mobile/WordPress-iOS/pull/23645