Skip to content

Commit 42f6c6b

Browse files
committed
Issue 4854: Order Details titles in title case
Titles should be title cased, not sentence cased. This change fixes the casing, to make it consistent with the rest of the titles on the Order Details screen
1 parent 6966ca1 commit 42f6c6b

File tree

2 files changed

+13
-8
lines changed

2 files changed

+13
-8
lines changed

Gemfile.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ GEM
236236
memoist (0.16.2)
237237
mini_magick (4.11.0)
238238
mini_mime (1.1.1)
239+
mini_portile2 (2.6.1)
239240
minitest (5.14.4)
240241
molinillo (0.6.6)
241242
multi_json (1.15.0)
@@ -244,6 +245,9 @@ GEM
244245
nap (1.1.0)
245246
naturally (2.2.1)
246247
netrc (0.11.0)
248+
nokogiri (1.12.2)
249+
mini_portile2 (~> 2.6.1)
250+
racc (~> 1.4)
247251
nokogiri (1.12.2-x86_64-darwin)
248252
racc (~> 1.4)
249253
octokit (4.21.0)
@@ -328,6 +332,7 @@ GEM
328332
xctest_list (1.2.1)
329333

330334
PLATFORMS
335+
-darwin-20
331336
x86_64-darwin-19
332337
x86_64-darwin-20
333338

WooCommerce/Classes/ViewModels/Order Details/OrderDetailsDataSource.swift

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -781,15 +781,9 @@ private extension OrderDetailsDataSource {
781781
private func configureShippingAddress(cell: CustomerInfoTableViewCell) {
782782
let shippingAddress = order.shippingAddress
783783

784-
cell.title = NSLocalizedString("Shipping details",
785-
comment: "Shipping title for customer info cell")
784+
cell.title = Title.shippingAddress
786785
cell.name = shippingAddress?.fullNameWithCompany
787-
cell.address = shippingAddress?.formattedPostalAddress ??
788-
NSLocalizedString(
789-
"No address specified.",
790-
comment: "Order details > customer info > shipping details. " +
791-
"This is where the address would normally display."
792-
)
786+
cell.address = shippingAddress?.formattedPostalAddress ?? Title.shippingAddressEmptyAction
793787

794788
cell.onEditTapped = orderEditingEnabled ? { [weak self] in
795789
self?.onCellAction?(.editShippingAddress, nil)
@@ -1221,6 +1215,8 @@ extension OrderDetailsDataSource {
12211215
static let refundedProducts = NSLocalizedString("Refunded Products", comment: "Section title")
12221216
static let tracking = NSLocalizedString("Tracking", comment: "Order tracking section title")
12231217
static let customerNote = NSLocalizedString("Customer Provided Note", comment: "Customer note section title")
1218+
static let shippingAddress = NSLocalizedString("Shipping Details",
1219+
comment: "Shipping title for customer info cell")
12241220
static let information = NSLocalizedString("Customer", comment: "Customer info section title")
12251221
static let payment = NSLocalizedString("Payment", comment: "Payment section title")
12261222
static let notes = NSLocalizedString("Order Notes", comment: "Order notes section title")
@@ -1242,6 +1238,10 @@ extension OrderDetailsDataSource {
12421238
NSLocalizedString("Don’t know how to print from your mobile device?",
12431239
comment: "Title of button in order details > shipping label that shows the instructions on how to print " +
12441240
"a shipping label on the mobile device.")
1241+
static let shippingAddressEmptyAction =
1242+
NSLocalizedString("No address specified.",
1243+
comment: "Order details > customer info > shipping details. " +
1244+
"This is where the address would normally display.")
12451245
}
12461246

12471247
enum Footer {

0 commit comments

Comments
 (0)