File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
WooCommerce/Classes/ViewRelated/Orders/Order Details/Order Summary Section Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -40,7 +40,8 @@ struct SummaryTableViewCellViewModel {
4040 ///
4141 var billedPersonName : String {
4242 if let billingAddress = billingAddress {
43- return " \( billingAddress. firstName) \( billingAddress. lastName) "
43+ return Localization . billedPerson ( firstName: billingAddress. firstName,
44+ lastName: billingAddress. lastName)
4445 } else {
4546 return " "
4647 }
@@ -186,3 +187,17 @@ private extension SummaryTableViewCell {
186187 comment: " Accessibility hint for the button to update the order status " )
187188 }
188189}
190+
191+ /// MARK: - Localization
192+
193+ private extension SummaryTableViewCellViewModel {
194+ enum Localization {
195+ static func billedPerson( firstName: String , lastName: String ) -> String {
196+ let format = NSLocalizedString ( " %1$@ %2$@ " , comment: " In Order Details, "
197+ + " the pattern to show the billed person's full name. For example, “John Doe”. "
198+ + " The %1$@ is the first name. The %2$@ is the last name. " )
199+
200+ return String . localizedStringWithFormat ( format, firstName, lastName)
201+ }
202+ }
203+ }
You can’t perform that action at this time.
0 commit comments