@@ -23,13 +23,53 @@ extension BookingDetailsViewModel {
2323 ] . joined ( separator: " - " )
2424
2525 rows = [
26- Row ( title: " Date " , value: appointmentDate) ,
27- Row ( title: " Time " , value: appointmentTimeFrame) ,
28- Row ( title: " Service " , value: " Women's Haircut " ) ,
29- Row ( title: " Quantity " , value: " 1 " ) ,
30- Row ( title: " Duration " , value: String ( durationMinutes) ) ,
31- Row ( title: " Cost " , value: booking. cost)
26+ Row ( title: Localization . appointmentDetailsDateRowTitle , value: appointmentDate) ,
27+ Row ( title: Localization . appointmentDetailsTimeRowTitle , value: appointmentTimeFrame) ,
28+ Row ( title: Localization . appointmentDetailsServiceTitle , value: " Women's Haircut " ) ,
29+ Row ( title: Localization . appointmentDetailsQuantityTitle , value: " 1 " ) ,
30+ Row ( title: Localization . appointmentDetailsDurationTitle , value: String ( durationMinutes) ) ,
31+ Row ( title: Localization . appointmentDetailsCostTitle , value: booking. cost)
3232 ]
3333 }
3434 }
3535}
36+
37+ private extension BookingDetailsViewModel . AppointmentDetailsContent {
38+ enum Localization {
39+ static let appointmentDetailsDateRowTitle = NSLocalizedString (
40+ " BookingDetailsView.appointmentDetails.dateRow.title " ,
41+ value: " Date " ,
42+ comment: " Date row title in appointment details section in booking details view. "
43+ )
44+
45+ static let appointmentDetailsTimeRowTitle = NSLocalizedString (
46+ " BookingDetailsView.appointmentDetails.timeRow.title " ,
47+ value: " Time " ,
48+ comment: " Time row title in appointment details section in booking details view. "
49+ )
50+
51+ static let appointmentDetailsServiceTitle = NSLocalizedString (
52+ " BookingDetailsView.appointmentDetails.serviceRow.title " ,
53+ value: " Service " ,
54+ comment: " Service name row title in appointment details section in booking details view. "
55+ )
56+
57+ static let appointmentDetailsQuantityTitle = NSLocalizedString (
58+ " BookingDetailsView.appointmentDetails.quantityRow.title " ,
59+ value: " Quantity " ,
60+ comment: " Quantity row title in appointment details section in booking details view. "
61+ )
62+
63+ static let appointmentDetailsDurationTitle = NSLocalizedString (
64+ " BookingDetailsView.appointmentDetails.durationRow.title " ,
65+ value: " Duration " ,
66+ comment: " Duration row title in appointment details section in booking details view. "
67+ )
68+
69+ static let appointmentDetailsCostTitle = NSLocalizedString (
70+ " BookingDetailsView.appointmentDetails.costRow.title " ,
71+ value: " Cost " ,
72+ comment: " Cost row title in appointment details section in booking details view. "
73+ )
74+ }
75+ }
0 commit comments