Skip to content

Commit ea70a12

Browse files
committed
Interpolate the QR code dismiss string at runtime to ensure consistency
1 parent 5f16297 commit ea70a12

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

WordPress/Classes/ViewRelated/QR Login/View Controllers/QRLoginVerifyAuthorizationViewController.swift

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -201,16 +201,17 @@ extension QRLoginVerifyAuthorizationViewController {
201201
value: "You're logged in!",
202202
comment: "Title for the success view when the user has successfully logged in"
203203
)
204-
static let subtitle = NSLocalizedString(
204+
private static let subtitleFormat = NSLocalizedString(
205205
"qrLoginVerifyAuthorization.completedInstructions.subtitle",
206-
value: "Tap dismiss and head back to your web browser to continue.",
207-
comment: "Subtitle instructing the user to tap the dismiss button to leave the log in flow"
206+
value: "Tap '%@' and head back to your web browser to continue.",
207+
comment: "Subtitle instructing the user to tap the dismiss button to leave the log in flow. %@ is a placeholder for the dismiss button name."
208208
)
209209
static let confirmButton = NSLocalizedString(
210210
"qrLoginVerifyAuthorization.completedInstructions.dismiss",
211211
value: "Dismiss",
212212
comment: "Button label that dismisses the qr log in flow and returns the user back to the previous screen"
213213
)
214+
static let subtitle = String(format: subtitleFormat, Self.confirmButton)
214215
}
215216

216217
enum noConnection {

0 commit comments

Comments
 (0)