Skip to content

Commit c718c34

Browse files
Escape Hatch: Adjusts Copy (#5103)
Task/Issue URL: https://app.asana.com/1/137249556945/project/1208671677432066/task/1215138723190551?focus=true Tech Design URL: CC: ### Description This PR adjusts few Escape Hatch Actions Strings: - `Burn Tab` is now `Delete Tab` - `Fire Confirmation` now accounts for the Duck.ai scenario, and renders a matching Copy
1 parent 772d659 commit c718c34

31 files changed

Lines changed: 90 additions & 88 deletions

iOS/DuckDuckGo/EscapeHatchModel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ extension EscapeHatchModel {
179179
/// Everything else defaults to close.
180180
var primarySwipeAction: SwipeAction {
181181
isFireTab
182-
? SwipeAction(label: UserText.escapeHatchMenuBurnTab, perform: onBurnTabImmediately)
182+
? SwipeAction(label: UserText.escapeHatchMenuDeleteTab, perform: onBurnTabImmediately)
183183
: SwipeAction(label: UserText.escapeHatchMenuCloseTab, perform: onCloseTab)
184184
}
185185
}

iOS/DuckDuckGo/Fire/ScopedFireConfirmationViewModel.swift

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ final class ScopedFireConfirmationViewModel: ObservableObject {
131131
case .contextualChat:
132132
return true
133133
case .singleTab:
134-
return false
134+
return tabViewModel?.tab.isAITab == true
135135
case .duckAIOnboarding, .default:
136136
return isRefinementsEnabled && tabViewModel?.tab.isAITab == true
137137
}
@@ -169,10 +169,10 @@ final class ScopedFireConfirmationViewModel: ObservableObject {
169169
return []
170170
case .singleTab:
171171
// Single "Delete Tab" button burning only the target tab
172-
let isDuckAI = tabViewModel?.tab.isAITab == true
173-
let options: FireRequest.Options = isDuckAI ? [.aiChats, .tabs] : [.all]
172+
let title = isSingleChatConfirmation ? UserText.scopedFireConfirmationDeleteThisChatButton : UserText.scopedFireConfirmationDeleteTabButton
173+
let options: FireRequest.Options = isSingleChatConfirmation ? [.aiChats, .tabs] : [.all]
174174

175-
return [FireConfirmationButton(title: UserText.scopedFireConfirmationDeleteTabButton,
175+
return [FireConfirmationButton(title: title,
176176
style: .primary,
177177
action: { burnTab(tabViewModel: tabViewModel, options: options, source: source, onConfirm: onConfirm) },
178178
accessibilityIdentifier: AccessibilityIdentifiers.thisTab)]
@@ -246,7 +246,9 @@ final class ScopedFireConfirmationViewModel: ObservableObject {
246246
case .contextualChat, .duckAIOnboarding:
247247
return UserText.contextualChatDeleteConfirmationTitle
248248
case .singleTab:
249-
return UserText.scopedFireConfirmationAlertSingleTabTitle
249+
return isSingleChatConfirmation
250+
? UserText.contextualChatDeleteConfirmationTitle
251+
: UserText.scopedFireConfirmationAlertSingleTabTitle
250252
case .default:
251253
if isSingleChatConfirmation {
252254
return UserText.contextualChatDeleteConfirmationTitle

iOS/DuckDuckGo/ReturnToTabCard.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ struct ReturnToTabCard: View {
137137
)
138138
if model.isFireTab {
139139
MenuActionButton(
140-
text: UserText.escapeHatchMenuBurnTab,
140+
text: UserText.escapeHatchMenuDeleteTab,
141141
icon: DesignSystemImages.Glyphs.Size16.fire,
142142
role: .destructive,
143143
action: model.onBurnTabImmediately
@@ -150,7 +150,7 @@ struct ReturnToTabCard: View {
150150
action: model.onCloseTab
151151
)
152152
MenuActionButton(
153-
text: UserText.escapeHatchMenuBurnTab,
153+
text: UserText.escapeHatchMenuDeleteTab,
154154
icon: DesignSystemImages.Glyphs.Size16.fire,
155155
role: .destructive,
156156
action: { model.onBurnTabWithConfirmation(menuFrameInWindow) }

iOS/DuckDuckGo/UserText.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1624,7 +1624,7 @@ public struct UserText {
16241624
public static let escapeHatchMoreButtonAccessibilityLabel = NSLocalizedString("escapeHatch.moreButton.accessibility.label", value: "More options", comment: "Accessibility label for the more options button on the escape hatch card")
16251625
public static let escapeHatchMenuReturnToTab = NSLocalizedString("escapeHatch.menu.returnToTab", value: "Return to Tab", comment: "Menu item that returns the user to the open tab from the escape hatch card")
16261626
public static let escapeHatchMenuCloseTab = NSLocalizedString("escapeHatch.menu.closeTab", value: "Close Tab", comment: "Menu item that closes the open tab referenced by the escape hatch card")
1627-
public static let escapeHatchMenuBurnTab = NSLocalizedString("escapeHatch.menu.burnTab", value: "Burn Tab", comment: "Menu item that burns (closes and clears data for) the tab referenced by the escape hatch card")
1627+
public static let escapeHatchMenuDeleteTab = NSLocalizedString("escapeHatch.menu.deleteTab", value: "Delete Tab", comment: "Menu item that deletes (closes and clears data for) the tab referenced by the escape hatch card")
16281628
public static let escapeHatchTabSwitcherPrivateTabsLabel = NSLocalizedString("escapeHatch.tabSwitcher.privateTabs.label", value: "Private Tabs", comment: "Label shown next to the tab count when the escape hatch's tab switcher pill is in its expanded form")
16291629

16301630
// Subscription Section

iOS/DuckDuckGo/bg.lproj/Localizable.strings

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2003,12 +2003,12 @@
20032003
/* Title shown on the escape hatch card when the target is a fire tab */
20042004
"escapeHatch.fireTab.title" = "Последно използван раздел Fire";
20052005

2006-
/* Menu item that burns (closes and clears data for) the tab referenced by the escape hatch card */
2007-
"escapeHatch.menu.burnTab" = "Изгаряне на раздела";
2008-
20092006
/* Menu item that closes the open tab referenced by the escape hatch card */
20102007
"escapeHatch.menu.closeTab" = "Затваряне на раздела";
20112008

2009+
/* Menu item that deletes (closes and clears data for) the tab referenced by the escape hatch card */
2010+
"escapeHatch.menu.deleteTab" = "Изтриване на раздел";
2011+
20122012
/* Menu item that returns the user to the open tab from the escape hatch card */
20132013
"escapeHatch.menu.returnToTab" = "Връщане към раздела";
20142014

iOS/DuckDuckGo/cs.lproj/Localizable.strings

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2003,12 +2003,12 @@
20032003
/* Title shown on the escape hatch card when the target is a fire tab */
20042004
"escapeHatch.fireTab.title" = "Naposledy použitá karta Fire";
20052005

2006-
/* Menu item that burns (closes and clears data for) the tab referenced by the escape hatch card */
2007-
"escapeHatch.menu.burnTab" = "Smazat kartu";
2008-
20092006
/* Menu item that closes the open tab referenced by the escape hatch card */
20102007
"escapeHatch.menu.closeTab" = "Zavřít kartu";
20112008

2009+
/* Menu item that deletes (closes and clears data for) the tab referenced by the escape hatch card */
2010+
"escapeHatch.menu.deleteTab" = "Smazat kartu";
2011+
20122012
/* Menu item that returns the user to the open tab from the escape hatch card */
20132013
"escapeHatch.menu.returnToTab" = "Zpět na kartu";
20142014

iOS/DuckDuckGo/da.lproj/Localizable.strings

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2003,12 +2003,12 @@
20032003
/* Title shown on the escape hatch card when the target is a fire tab */
20042004
"escapeHatch.fireTab.title" = "Sidst brugte Fire-fane";
20052005

2006-
/* Menu item that burns (closes and clears data for) the tab referenced by the escape hatch card */
2007-
"escapeHatch.menu.burnTab" = "Brænd fane";
2008-
20092006
/* Menu item that closes the open tab referenced by the escape hatch card */
20102007
"escapeHatch.menu.closeTab" = "Luk fane";
20112008

2009+
/* Menu item that deletes (closes and clears data for) the tab referenced by the escape hatch card */
2010+
"escapeHatch.menu.deleteTab" = "Slet fane";
2011+
20122012
/* Menu item that returns the user to the open tab from the escape hatch card */
20132013
"escapeHatch.menu.returnToTab" = "Gå tilbage til fanen";
20142014

iOS/DuckDuckGo/de.lproj/Localizable.strings

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2003,12 +2003,12 @@
20032003
/* Title shown on the escape hatch card when the target is a fire tab */
20042004
"escapeHatch.fireTab.title" = "Zuletzt verwendeter Fire-Tab";
20052005

2006-
/* Menu item that burns (closes and clears data for) the tab referenced by the escape hatch card */
2007-
"escapeHatch.menu.burnTab" = "Tab löschen";
2008-
20092006
/* Menu item that closes the open tab referenced by the escape hatch card */
20102007
"escapeHatch.menu.closeTab" = "Tab schließen";
20112008

2009+
/* Menu item that deletes (closes and clears data for) the tab referenced by the escape hatch card */
2010+
"escapeHatch.menu.deleteTab" = "Tab löschen";
2011+
20122012
/* Menu item that returns the user to the open tab from the escape hatch card */
20132013
"escapeHatch.menu.returnToTab" = "Zurück zum Tab";
20142014

iOS/DuckDuckGo/el.lproj/Localizable.strings

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2003,12 +2003,12 @@
20032003
/* Title shown on the escape hatch card when the target is a fire tab */
20042004
"escapeHatch.fireTab.title" = "Τελευταία χρήση καρτέλας Fire";
20052005

2006-
/* Menu item that burns (closes and clears data for) the tab referenced by the escape hatch card */
2007-
"escapeHatch.menu.burnTab" = "Κάψιμο καρτέλας";
2008-
20092006
/* Menu item that closes the open tab referenced by the escape hatch card */
20102007
"escapeHatch.menu.closeTab" = "Κλείσιμο καρτέλας";
20112008

2009+
/* Menu item that deletes (closes and clears data for) the tab referenced by the escape hatch card */
2010+
"escapeHatch.menu.deleteTab" = "Διαγραφή καρτέλας";
2011+
20122012
/* Menu item that returns the user to the open tab from the escape hatch card */
20132013
"escapeHatch.menu.returnToTab" = "Επιστροφή στην καρτέλα";
20142014

iOS/DuckDuckGo/en.lproj/Localizable.strings

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1942,12 +1942,12 @@
19421942
/* Title shown on the escape hatch card when the target is a fire tab */
19431943
"escapeHatch.fireTab.title" = "Last used Fire Tab";
19441944

1945-
/* Menu item that burns (closes and clears data for) the tab referenced by the escape hatch card */
1946-
"escapeHatch.menu.burnTab" = "Burn Tab";
1947-
19481945
/* Menu item that closes the open tab referenced by the escape hatch card */
19491946
"escapeHatch.menu.closeTab" = "Close Tab";
19501947

1948+
/* Menu item that deletes (closes and clears data for) the tab referenced by the escape hatch card */
1949+
"escapeHatch.menu.deleteTab" = "Delete Tab";
1950+
19511951
/* Menu item that returns the user to the open tab from the escape hatch card */
19521952
"escapeHatch.menu.returnToTab" = "Return to Tab";
19531953

0 commit comments

Comments
 (0)