From c47ad7e7c64b87ec5e3a57833f0e7c0aa2c8d954 Mon Sep 17 00:00:00 2001 From: Olivier Halligon Date: Wed, 16 Nov 2022 13:12:13 +0100 Subject: [PATCH 1/2] Fix localization issue with NSLocalizedString not using literals Because the `value` parameter of those two `NSLocalizedString` entries was not a literal, it wasn't extracted properly by `genstrings` into the `Localizable.strings` file, and led to the original / English copy exported to GlotPress to be the same as the semantic key instead of being the value. --- .../MigrationHeaderConfiguration.swift | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/WordPress/Jetpack/Classes/ViewRelated/WordPress-to-Jetpack Migration/Common/Views/Configuration/MigrationHeaderConfiguration.swift b/WordPress/Jetpack/Classes/ViewRelated/WordPress-to-Jetpack Migration/Common/Views/Configuration/MigrationHeaderConfiguration.swift index e0949caa9b16..7212b7592964 100644 --- a/WordPress/Jetpack/Classes/ViewRelated/WordPress-to-Jetpack Migration/Common/Views/Configuration/MigrationHeaderConfiguration.swift +++ b/WordPress/Jetpack/Classes/ViewRelated/WordPress-to-Jetpack Migration/Common/Views/Configuration/MigrationHeaderConfiguration.swift @@ -101,14 +101,18 @@ private extension MigrationHeaderConfiguration { comment: "Secondary description in the migration notifications screen") static func welcomeSecondaryDescription(plural: Bool) -> String { - let siteWord = plural ? "sites" : "site" - let value = "We found your \(siteWord). Continue to transfer all your data and sign in to Jetpack automatically." if plural { - let comment = "The plural form of the secondary description in the migration welcome screen" - return NSLocalizedString("migration.welcome.secondaryDescription.plural", value: value, comment: comment) + return NSLocalizedString( + "migration.welcome.secondaryDescription.plural", + value: "We found your sites. Continue to transfer all your data and sign in to Jetpack automatically.", + comment: "The plural form of the secondary description in the migration welcome screen" + ) } else { - let comment = "The singular form of the secondary description in the migration welcome screen" - return NSLocalizedString("migration.welcome.secondaryDescription.singular", value: value, comment: comment) + return NSLocalizedString( + "migration.welcome.secondaryDescription.singular", + value: "We found your site. Continue to transfer all your data and sign in to Jetpack automatically.", + comment: "The singular form of the secondary description in the migration welcome screen" + ) } } } From 9249225f6b683311fb096033e2a82293e8241dfa Mon Sep 17 00:00:00 2001 From: Olivier Halligon Date: Wed, 16 Nov 2022 13:12:32 +0100 Subject: [PATCH 2/2] Update strings for localization --- WordPress/Resources/en.lproj/Localizable.strings | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/WordPress/Resources/en.lproj/Localizable.strings b/WordPress/Resources/en.lproj/Localizable.strings index 0532e031752d..e1635a7f3cbe 100644 --- a/WordPress/Resources/en.lproj/Localizable.strings +++ b/WordPress/Resources/en.lproj/Localizable.strings @@ -4818,11 +4818,11 @@ /* The primary description in the migration welcome screen */ "migration.welcome.primaryDescription" = "It looks like you’re switching from the WordPress app."; -/* No comment provided by engineer. */ -"migration.welcome.secondaryDescription.plural" = "migration.welcome.secondaryDescription.plural"; +/* The plural form of the secondary description in the migration welcome screen */ +"migration.welcome.secondaryDescription.plural" = "We found your sites. Continue to transfer all your data and sign in to Jetpack automatically."; -/* No comment provided by engineer. */ -"migration.welcome.secondaryDescription.singular" = "migration.welcome.secondaryDescription.singular"; +/* The singular form of the secondary description in the migration welcome screen */ +"migration.welcome.secondaryDescription.singular" = "We found your site. Continue to transfer all your data and sign in to Jetpack automatically."; /* The title in the migration welcome screen */ "migration.welcome.title" = "Welcome to Jetpack!";