Skip to content

Commit c47ad7e

Browse files
committed
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.
1 parent e47325f commit c47ad7e

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

WordPress/Jetpack/Classes/ViewRelated/WordPress-to-Jetpack Migration/Common/Views/Configuration/MigrationHeaderConfiguration.swift

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,14 +101,18 @@ private extension MigrationHeaderConfiguration {
101101
comment: "Secondary description in the migration notifications screen")
102102

103103
static func welcomeSecondaryDescription(plural: Bool) -> String {
104-
let siteWord = plural ? "sites" : "site"
105-
let value = "We found your \(siteWord). Continue to transfer all your data and sign in to Jetpack automatically."
106104
if plural {
107-
let comment = "The plural form of the secondary description in the migration welcome screen"
108-
return NSLocalizedString("migration.welcome.secondaryDescription.plural", value: value, comment: comment)
105+
return NSLocalizedString(
106+
"migration.welcome.secondaryDescription.plural",
107+
value: "We found your sites. Continue to transfer all your data and sign in to Jetpack automatically.",
108+
comment: "The plural form of the secondary description in the migration welcome screen"
109+
)
109110
} else {
110-
let comment = "The singular form of the secondary description in the migration welcome screen"
111-
return NSLocalizedString("migration.welcome.secondaryDescription.singular", value: value, comment: comment)
111+
return NSLocalizedString(
112+
"migration.welcome.secondaryDescription.singular",
113+
value: "We found your site. Continue to transfer all your data and sign in to Jetpack automatically.",
114+
comment: "The singular form of the secondary description in the migration welcome screen"
115+
)
112116
}
113117
}
114118
}

0 commit comments

Comments
 (0)