Skip to content

Commit ab45fd8

Browse files
committed
Add localization for shipment label
1 parent 6e96052 commit ab45fd8

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

WooCommerce/Classes/ViewRelated/Orders/Order Details/Shipping Labels/WooShipping Create Shipping Labels/WooShipping Split Shipments/WooShippingSplitShipmentsViewModel.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ final class WooShippingSplitShipmentsViewModel: ObservableObject {
3131

3232
var topTabItems: [TopTabItem<EmptyView>] {
3333
shipments.enumerated().map { (index, item) in
34-
TopTabItem(name: "Shipment \(index + 1)", content: { EmptyView() })
34+
TopTabItem(name: String.localizedStringWithFormat(Localization.shipmentFormat, index + 1),
35+
content: { EmptyView() })
3536
}
3637
}
3738

@@ -184,5 +185,10 @@ private extension WooShippingSplitShipmentsViewModel {
184185
static let itemsCountPluralFormat = NSLocalizedString("wooShipping.createLabels.splitShipment.items.count",
185186
value: "%1$@ items",
186187
comment: "Label for plural items to ship during shipping label creation. Reads like: '3 items'")
188+
static let shipmentFormat = NSLocalizedString(
189+
"wooShipping.createLabels.splitShipment.shipmentFormat",
190+
value: "Shipment %1$d",
191+
comment: "Label for a shipment during shipping label creation. The placeholder is the index of the shipment. Reads like: 'Shipment 1'"
192+
)
187193
}
188194
}

0 commit comments

Comments
 (0)