From 3d87496b90b9e38a126823fedd87b2e936da1850 Mon Sep 17 00:00:00 2001 From: Bartek Waresiak Date: Thu, 11 Jan 2024 15:54:50 +0100 Subject: [PATCH] Update to use correct text on iOS 14 --- .../Sources/SyncUI/Resources/en.lproj/Localizable.strings | 3 --- .../SyncUI/Sources/SyncUI/Views/Internal/UserText.swift | 1 - LocalPackages/SyncUI/Sources/SyncUI/Views/PasteCodeView.swift | 3 ++- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/LocalPackages/SyncUI/Sources/SyncUI/Resources/en.lproj/Localizable.strings b/LocalPackages/SyncUI/Sources/SyncUI/Resources/en.lproj/Localizable.strings index 4b864482a4..734189b9b3 100644 --- a/LocalPackages/SyncUI/Sources/SyncUI/Resources/en.lproj/Localizable.strings +++ b/LocalPackages/SyncUI/Sources/SyncUI/Resources/en.lproj/Localizable.strings @@ -76,9 +76,6 @@ /* Options - Fetch Favicons Title */ "fetch.favicons.option.title" = "Auto-Download Icons"; -/* Manually Enter Code View - Instruction with sync menu path and view text code menu item inserted */ -"manually.enter.code.instruction" = "Go to Settings > Sync & Backup > Sync With Another Device and select Sync Menu Path in the DuckDuckGo App on another synced device and paste the code here to sync this device."; - /* Manually Enter Code View - Instruction with sync menu path and view text code menu item inserted */ "manually.enter.code.instruction.attributed" = "Go to %1$@ and select %2$@ in the DuckDuckGo App on another synced device and paste the code here to sync this device."; diff --git a/LocalPackages/SyncUI/Sources/SyncUI/Views/Internal/UserText.swift b/LocalPackages/SyncUI/Sources/SyncUI/Views/Internal/UserText.swift index c8a4f443c4..250e1b5eb9 100644 --- a/LocalPackages/SyncUI/Sources/SyncUI/Views/Internal/UserText.swift +++ b/LocalPackages/SyncUI/Sources/SyncUI/Views/Internal/UserText.swift @@ -114,7 +114,6 @@ struct UserText { let localized = NSLocalizedString("manually.enter.code.instruction.attributed", bundle: Bundle.module, value: "Go to %@ and select %@ in the DuckDuckGo App on another synced device and paste the code here to sync this device.", comment: "Manually Enter Code View - Instruction with sync menu path and view text code menu item inserted") return String(format: localized, syncMenuPath, menuItem) } - static let manuallyEnterCodeInstruction = NSLocalizedString("manually.enter.code.instruction", bundle: Bundle.module, value: "Go to Settings > Sync & Backup > Sync With Another Device and select Sync Menu Path in the DuckDuckGo App on another synced device and paste the code here to sync this device.", comment: "Manually Enter Code View - Instruction with sync menu path and view text code menu item inserted") static let syncMenuPath = NSLocalizedString("sync.menu.path", bundle: Bundle.module, value: "Settings > Sync & Backup > Sync With Another Device", comment: "Sync Menu Path") static let viewTextCodeMenuItem = NSLocalizedString("view.text.code.menu.item", bundle: Bundle.module, value: "View Text Code", comment: "View Text Code menu item") diff --git a/LocalPackages/SyncUI/Sources/SyncUI/Views/PasteCodeView.swift b/LocalPackages/SyncUI/Sources/SyncUI/Views/PasteCodeView.swift index 903c0046fb..45e9f92719 100644 --- a/LocalPackages/SyncUI/Sources/SyncUI/Views/PasteCodeView.swift +++ b/LocalPackages/SyncUI/Sources/SyncUI/Views/PasteCodeView.swift @@ -84,7 +84,8 @@ public struct PasteCodeView: View { .foregroundColor(.white.opacity(0.6)) .padding() } else { - Text(UserText.manuallyEnterCodeInstruction) + Text(UserText.manuallyEnterCodeInstructionAttributed(syncMenuPath: UserText.syncMenuPath, + menuItem: UserText.viewTextCodeMenuItem)) .lineLimit(nil) .multilineTextAlignment(.center) .foregroundColor(.white.opacity(0.6))