Skip to content

Commit 56ca8c3

Browse files
authored
[Woo POS][Barcodes] Minor copy updates (#15973)
2 parents fe2f5ac + e85b607 commit 56ca8c3

File tree

4 files changed

+22
-10
lines changed

4 files changed

+22
-10
lines changed

WooCommerce/Classes/POS/Presentation/Barcode Scanner Setup/PointOfSaleBarcodeScannerSetupModels.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,11 +29,11 @@ enum PointOfSaleBarcodeScannerType {
2929
var analyticsName: String {
3030
switch self {
3131
case .starBSH20B:
32-
return "Star_BSH_20B"
32+
return "star_bsh_20b"
3333
case .tera12002D:
34-
return "Tera_1200_2D"
34+
return "tera_1200_2d"
3535
case .netum1228BC:
36-
return "Netum_1228BC"
36+
return "netum_1228bc"
3737
case .other:
3838
return "other"
3939
}

WooCommerce/Classes/POS/Presentation/Barcode Scanner Setup/PointOfSaleBarcodeScannerSetupStepViews.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ private extension PointOfSaleBarcodeScannerSetupCompleteView {
196196
comment: "Title shown when scanner setup is successfully completed"
197197
)
198198
static let instruction = NSLocalizedString(
199-
"pos.barcodeScannerSetup.complete.instruction",
200-
value: "You are ready to start scanning products. \nRead more about barcode and QR code scanner support.",
201-
comment: "Message shown when scanner setup is complete, with additional information link"
199+
"pos.barcodeScannerSetup.complete.instruction.2",
200+
value: "You are ready to start scanning products. Next time you need to connect your scanner, just turn it on and it will reconnect automatically.",
201+
comment: "Message shown when scanner setup is complete"
202202
)
203203
}
204204
}

WooCommerce/Classes/POS/Presentation/POSFloatingControlView.swift

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,13 @@ struct POSFloatingControlView: View {
6363
ServiceLocator.analytics.track(.pointOfSaleBarcodeScanningMenuItemTapped)
6464
} label: {
6565
Label(
66-
title: { Text(Localization.barcodeScanning) },
66+
title: {
67+
if ServiceLocator.featureFlagService.isFeatureFlagEnabled(.pointOfSaleBarcodeScanningi2) {
68+
Text(Localization.barcodeScanningSetup)
69+
} else {
70+
Text(Localization.barcodeScanning)
71+
}
72+
},
6773
icon: { Image(systemName: "barcode.viewfinder") })
6874
}
6975
}
@@ -173,6 +179,12 @@ private extension POSFloatingControlView {
173179
value: "Barcode scanning",
174180
comment: "The title of the menu button to view barcode scanner documentation, shown in a popover menu."
175181
)
182+
183+
static let barcodeScanningSetup = NSLocalizedString(
184+
"pointOfSale.floatingButtons.barcodeScanningSetup.button.title",
185+
value: "Initial barcode scanner setup",
186+
comment: "The title of the menu button to start a barcode scanner setup flow."
187+
)
176188
}
177189
}
178190

WooCommerce/WooCommerceTests/POS/Presentation/Barcode Scanner Setup/PointOfSaleBarcodeScannerSetupFlowManagerTests.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ struct PointOfSaleBarcodeScannerSetupFlowManagerTests {
2020
// Then it tracks the scanner selected event
2121
let event = mockAnalytics.events.first
2222
#expect(event?.eventName == WooAnalyticsStat.pointOfSaleBarcodeScannerSetupScannerSelected.rawValue)
23-
#expect(event?.properties["scanner"] as? String == "Star_BSH_20B")
23+
#expect(event?.properties["scanner"] as? String == PointOfSaleBarcodeScannerType.starBSH20B.analyticsName)
2424
}
2525

2626
@available(iOS 17.0, *)
@@ -42,7 +42,7 @@ struct PointOfSaleBarcodeScannerSetupFlowManagerTests {
4242
// Then it tracks the dismissal event
4343
let event = mockAnalytics.events.first
4444
#expect(event?.eventName == WooAnalyticsStat.pointOfSaleBarcodeScannerSetupDismissed.rawValue)
45-
#expect(event?.properties["scanner"] as? String == "Star_BSH_20B")
45+
#expect(event?.properties["scanner"] as? String == PointOfSaleBarcodeScannerType.starBSH20B.analyticsName)
4646
#expect(event?.properties["step"] as? String == "setup_barcode_hid")
4747
}
4848

@@ -84,7 +84,7 @@ struct PointOfSaleBarcodeScannerSetupFlowManagerTests {
8484
// Then it tracks the scanner connected event
8585
let event = mockAnalytics.events.first
8686
#expect(event?.eventName == WooAnalyticsStat.pointOfSaleBarcodeScannerSetupScannerConnected.rawValue)
87-
#expect(event?.properties["scanner"] as? String == "Netum_1228BC")
87+
#expect(event?.properties["scanner"] as? String == PointOfSaleBarcodeScannerType.netum1228BC.analyticsName)
8888
}
8989

9090
@available(iOS 17.0, *)

0 commit comments

Comments
 (0)