Skip to content

Commit 33ee78b

Browse files
authored
Merge release/23.7 into trunk (#16385)
2 parents 9e196ea + 23d538f commit 33ee78b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+2287
-193
lines changed

WooCommerce/Classes/ViewRelated/Dashboard/DashboardView.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ struct DashboardView: View {
2525
/// Set externally in the hosting controller.
2626
var onboardingTaskTapped: ((Site, StoreOnboardingTask) -> Void)?
2727
/// Set externally in the hosting controller.
28-
var viewAllOnboardingTasksTapped: ((Site) -> Void)?
28+
var viewAllOnboardingTasksTapped: ((Site, [StoreOnboardingTaskViewModel]) -> Void)?
2929

3030
/// Set externally in the hosting controller.
3131
var showAllBlazeCampaignsTapped: (() -> Void)?
@@ -215,9 +215,9 @@ private extension DashboardView {
215215
onTaskTapped: { task in
216216
guard let currentSite else { return }
217217
onboardingTaskTapped?(currentSite, task)
218-
}, onViewAllTapped: {
218+
}, onViewAllTapped: { tasks in
219219
guard let currentSite else { return }
220-
viewAllOnboardingTasksTapped?(currentSite)
220+
viewAllOnboardingTasksTapped?(currentSite, tasks)
221221
})
222222
case .blaze:
223223
BlazeCampaignDashboardView(viewModel: viewModel.blazeCampaignDashboardViewModel,

WooCommerce/Classes/ViewRelated/Dashboard/DashboardViewHostingController.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,11 @@ private extension DashboardViewHostingController {
175175
storeOnboardingCoordinator?.start(task: task)
176176
}
177177

178-
rootView.viewAllOnboardingTasksTapped = { [weak self] site in
178+
rootView.viewAllOnboardingTasksTapped = { [weak self] site, tasks in
179179
guard let self else { return }
180180
ServiceLocator.analytics.track(event: .DynamicDashboard.dashboardCardInteracted(type: .onboarding))
181181
updateStoreOnboardingCoordinatorIfNeeded(with: site)
182-
storeOnboardingCoordinator?.start()
182+
storeOnboardingCoordinator?.start(tasks: tasks)
183183
}
184184
}
185185

WooCommerce/Classes/ViewRelated/Dashboard/Onboarding/StoreOnboardingCoordinator.swift

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import struct Yosemite.Site
55
import struct Yosemite.StoreOnboardingTask
66

77
/// Coordinates navigation for store onboarding.
8-
final class StoreOnboardingCoordinator: Coordinator {
8+
final class StoreOnboardingCoordinator {
99
typealias TaskType = StoreOnboardingTask.TaskType
1010

1111
let navigationController: UINavigationController
@@ -31,11 +31,15 @@ final class StoreOnboardingCoordinator: Coordinator {
3131
}
3232

3333
/// Navigates to the fullscreen store onboarding view.
34-
func start() {
34+
func start(tasks: [StoreOnboardingTaskViewModel]) {
3535
Task { @MainActor in
36+
let viewModel = StoreOnboardingViewModel(
37+
siteID: site.siteID,
38+
isExpanded: true,
39+
taskViewModels: tasks
40+
)
3641
let onboardingNavigationController = UINavigationController()
37-
let onboardingViewController = StoreOnboardingViewHostingController(viewModel: .init(siteID: site.siteID,
38-
isExpanded: true),
42+
let onboardingViewController = StoreOnboardingViewHostingController(viewModel: viewModel,
3943
navigationController: onboardingNavigationController,
4044
site: site)
4145
onboardingNavigationController.pushViewController(onboardingViewController, animated: false)

WooCommerce/Classes/ViewRelated/Dashboard/Onboarding/StoreOnboardingView.swift

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ final class StoreOnboardingViewHostingController: SelfSizingHostingController<St
4242
}
4343

4444
if !viewModel.isExpanded {
45-
rootView.viewAllTapped = { [weak self] in
45+
rootView.viewAllTapped = { [weak self] tasks in
4646
guard let self else { return }
47-
self.coordinator.start()
47+
self.coordinator.start(tasks: tasks)
4848
}
4949
}
5050
}
@@ -93,13 +93,13 @@ struct StoreOnboardingView: View {
9393
/// Set externally in the hosting controller.
9494
var taskTapped: ((StoreOnboardingTask) -> Void)?
9595
/// Set externally in the hosting controller.
96-
var viewAllTapped: (() -> Void)?
96+
var viewAllTapped: (([StoreOnboardingTaskViewModel]) -> Void)?
9797

9898
@ObservedObject private var viewModel: StoreOnboardingViewModel
9999

100100
init(viewModel: StoreOnboardingViewModel,
101101
onTaskTapped: ((StoreOnboardingTask) -> Void)? = nil,
102-
onViewAllTapped: (() -> Void)? = nil) {
102+
onViewAllTapped: (([StoreOnboardingTaskViewModel]) -> Void)? = nil) {
103103
self.viewModel = viewModel
104104
self.taskTapped = onTaskTapped
105105
self.viewAllTapped = onViewAllTapped
@@ -159,7 +159,9 @@ struct StoreOnboardingView: View {
159159
.padding(.leading, Layout.padding)
160160

161161
// View all button
162-
viewAllButton(action: viewAllTapped, text: String(format: Localization.viewAll, viewModel.taskViewModels.count))
162+
viewAllButton(action: {
163+
viewAllTapped?(viewModel.taskViewModels)
164+
}, text: String(format: Localization.viewAll, viewModel.taskViewModels.count))
163165
.renderedIf(viewModel.shouldShowViewAllButton)
164166
.padding(.horizontal, Layout.padding)
165167
}

WooCommerce/Classes/ViewRelated/Dashboard/Onboarding/StoreOnboardingViewModel.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ class StoreOnboardingViewModel: ObservableObject {
8383
/// - defaults: UserDefaults for storing when all onboarding tasks are completed
8484
init(siteID: Int64,
8585
isExpanded: Bool,
86+
taskViewModels: [StoreOnboardingTaskViewModel] = [],
8687
stores: StoresManager = ServiceLocator.stores,
8788
defaults: UserDefaults = .standard,
8889
analytics: Analytics = ServiceLocator.analytics,
@@ -94,6 +95,7 @@ class StoreOnboardingViewModel: ObservableObject {
9495
self.defaults = defaults
9596
self.analytics = analytics
9697
self.waitingTimeTracker = waitingTimeTracker
98+
self.taskViewModels = taskViewModels
9799

98100
$noTasksAvailableForDisplay
99101
.combineLatest(defaults.publisher(for: \.completedAllStoreOnboardingTasks))
@@ -117,7 +119,11 @@ class StoreOnboardingViewModel: ObservableObject {
117119
}
118120

119121
analytics.track(event: .DynamicDashboard.cardLoadingStarted(type: .onboarding))
120-
update(state: .loading)
122+
if taskViewModels.isEmpty {
123+
update(state: .loading)
124+
} else {
125+
update(state: .loaded(rows: taskViewModels))
126+
}
121127

122128
let tasks: [StoreOnboardingTaskViewModel]
123129
var syncingError: Error?

WooCommerce/Resources/ar.lproj/Localizable.strings

Lines changed: 64 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Translation-Revision-Date: 2025-11-03 19:54:06+0000 */
1+
/* Translation-Revision-Date: 2025-11-17 16:54:04+0000 */
22
/* Plural-Forms: nplurals=6; plural=n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5; */
33
/* Generator: GlotPress/2.4.0-alpha */
44
/* Language: ar */
@@ -797,7 +797,13 @@ which should be translated separately and considered part of this sentence. */
797797
"BookingAttendanceStatus.booked" = "اكتمل الحجز";
798798

799799
/* Title for 'Cancelled' booking attendance status. */
800-
"BookingAttendanceStatus.cancelled" = "اكتمل الإلغاء";
800+
"BookingAttendanceStatus.canceled" = "مُلغى";
801+
802+
/* Title for 'Checked In' booking attendance status. */
803+
"BookingAttendanceStatus.checkedIn" = "نجح تسجيل الحضور";
804+
805+
/* Title for 'No Show' booking attendance status. */
806+
"BookingAttendanceStatus.noShow" = "عدم الحضور";
801807

802808
/* Title for 'Unknown' booking attendance status. */
803809
"BookingAttendanceStatus.unknown" = "غير معروف";
@@ -830,26 +836,38 @@ which should be translated separately and considered part of this sentence. */
830836
"BookingDetailsView.attendance.headerTitle" = "الحضور";
831837

832838
/* Content of error presented when updating the attendance status of a Booking fails. It reads: Unable to change status of Booking #{Booking number}. Parameters: %1$d - Booking number */
833-
"BookingDetailsView.attendanceStatus.updateFailed.message" = "يتعذر تغيير حالة حضور الحجز رقم ⁦%1$d⁩";
839+
"BookingDetailsView.attendanceStatus.failureMessage." = "يتعذر تغيير حالة حضور الحجز رقم⁦%1$d⁩.";
840+
841+
/* Add a booking note section in booking details view. */
842+
"BookingDetailsView.bookingNote.addNoteRow.title" = "إضافة ملحوظة";
834843

835-
/* Add a note row title in booking notes section in booking details view. */
836-
"BookingDetailsView.bookingNotes.addANoteRow.title" = "إضافة ملاحظة";
844+
/* Footer text for the `Booking note` section in the booking details screen. */
845+
"BookingDetailsView.bookingNote.footerText" = "هذه ملحوظة خاصة. لن نشاركها مع العميل.";
837846

838-
/* Header title for the 'Booking notes' section in the booking details screen. */
839-
"BookingDetailsView.bookingNotes.headerTitle" = "ملاحظات الحجز";
847+
/* Header title for the 'Booking note' section in the booking details screen. */
848+
"BookingDetailsView.bookingNote.headerTitle" = "ملحوظة الحجز";
849+
850+
/* Title of navigation bar when editing a booking note. */
851+
"BookingDetailsView.bookingNote.navbar.title" = "ملحوظة الحجز";
840852

841853
/* Cancel button title for the booking cancellation confirmation alert. */
842854
"BookingDetailsView.cancelation.alert.cancelAction" = "لا، الاحتفاظ بالحجز";
843855

844856
/* Confirm button title for the booking cancellation confirmation alert. */
845857
"BookingDetailsView.cancelation.alert.confirmAction" = "نعم، إلغاء الحجز";
846858

859+
/* Generic message for the booking cancellation confirmation alert. */
860+
"BookingDetailsView.cancelation.alert.genericMessage" = "هل أنت متأكد من رغبتك في إلغاء هذا الحجز؟";
861+
847862
/* Message for the booking cancellation confirmation alert. %1$@ is customer name, %2$@ is product name, %3$@ is booking date. */
848863
"BookingDetailsView.cancelation.alert.message" = "لن يتمكن %1$@ من حضور \"%2$@\" في %3$@ بعد الآن.";
849864

850865
/* Title for the booking cancellation confirmation alert. */
851866
"BookingDetailsView.cancelation.alert.title" = "إلغاء الحجز";
852867

868+
/* Content of error presented when cancelling a Booking fails. It reads: Unable to cancel Booking #{Booking number}. Parameters: %1$d - Booking number */
869+
"BookingDetailsView.cancellation.failureMessage" = "يتعذر إلغاء الحجز رقم⁦%1$d⁩.";
870+
853871
/* Billing address row title in customer section in booking details view. */
854872
"BookingDetailsView.customer.billingAddress.title" = "عنوان الفوترة";
855873

@@ -865,6 +883,9 @@ which should be translated separately and considered part of this sentence. */
865883
/* 'Status' row title in attendance section in booking details view. */
866884
"BookingDetailsView.customer.status.title" = "الحالة";
867885

886+
/* Content of error presented when cancelling a Booking fails. It reads: Unable to mark Booking #{Booking number} as paid. Parameters: %1$d - Booking number */
887+
"BookingDetailsView.markAsPaid.failureMessage" = "يتعذر وضع علامة على الحجز رقم⁦%1$d⁩ على أنه مدفوع.";
888+
868889
/* Booking Details screen nav bar title. %1$d is a placeholder for the booking ID. */
869890
"BookingDetailsView.navTitle" = "الحجز رقم ⁦%1$d⁩";
870891

@@ -883,9 +904,6 @@ which should be translated separately and considered part of this sentence. */
883904
/* Header title for the 'Payment' section in the booking details screen. */
884905
"BookingDetailsView.payment.headerTitle" = "الدفع";
885906

886-
/* Title for 'Issue refund' button in payment section in booking details view. */
887-
"BookingDetailsView.payment.issueRefund.title" = "نشر مبلغ الاسترداد";
888-
889907
/* Title for 'Mark as paid' button in payment section in booking details view. */
890908
"BookingDetailsView.payment.markAsPaid.title" = "وضع علامة كـ \"مدفوع\"";
891909

@@ -3555,6 +3573,18 @@ If your translation of that term also happens to contains a hyphen, please be su
35553573
/* Trash Action Spoken hint */
35563574
"Moves the comment to Trash" = "ينقل التعليق إلى سلة المهملات";
35573575

3576+
/* Cancel button title for the discard changes confirmation dialog in the multiline text editor. */
3577+
"MultilineEditableTextDetailView.discardChanges.alert.cancelAction" = "إلغاء";
3578+
3579+
/* Destructive action button title to discard changes in the multiline text editor. */
3580+
"MultilineEditableTextDetailView.discardChanges.alert.discardAction" = "تجاهل التغييرات";
3581+
3582+
/* Title for the confirmation dialog when the user attempts to discard changes in the multiline text editor. */
3583+
"MultilineEditableTextDetailView.discardChanges.alert.title" = "هل أنت متأكد من رغبتك في تجاهل هذه التغييرات؟";
3584+
3585+
/* Navigation bar button title used to save changes and close the multiline text editor. */
3586+
"MultilineEditableTextDetailView.doneButton.title" = "تم";
3587+
35583588
/* Title of multiple stores as part of Jetpack benefits. */
35593589
"Multiple Stores" = "متاجر متعددة";
35603590

@@ -4569,6 +4599,9 @@ If your translation of that term also happens to contains a hyphen, please be su
45694599
/* Description of the subscription conditions for a subscription product, with signup fees but no trial.Reads as: '$25.00 signup'. */
45704600
"ProductRowViewModel.formattedProductSubscriptionConditionsWithoutTrial" = "التسجيل في %1$@";
45714601

4602+
/* Bookable product type label interpretation as Service. Presented in product type picker in filters. */
4603+
"ProductType.service" = "الخدمة";
4604+
45724605
/* Display label for the composite product's component option type
45734606
Product section title if there is more than one product.
45744607
Product section title in Review Order screen if there is more than one product.
@@ -7470,6 +7503,9 @@ If your translation of that term also happens to contains a hyphen, please be su
74707503
/* Label displayed on audio media items. */
74717504
"audio" = "صوت";
74727505

7506+
/* Button to dismiss a web view */
7507+
"authenticatableWebView.done" = "تم";
7508+
74737509
/* Title for the link for site creation guide. */
74747510
"authenticationConstants.siteCreationGuideButtonTitle" = "هل تريد بدء متجر جديد؟";
74757511

@@ -8410,9 +8446,27 @@ If your translation of that term also happens to contains a hyphen, please be su
84108446
/* Title of the booking list view */
84118447
"bookingListView.view.title" = "الحجوزات";
84128448

8449+
/* Status of a paid booking */
8450+
"bookingPaymentStatus.title.paid" = "مدفوع";
8451+
8452+
/* Status of a refunded booking */
8453+
"bookingPaymentStatus.title.refunded" = "نجح استرداد المبلغ";
8454+
8455+
/* Status of a booking with unexpected payment status */
8456+
"bookingPaymentStatus.title.unknown" = "غير معروف";
8457+
8458+
/* Status of an unpaid booking */
8459+
"bookingPaymentStatus.title.unpaid" = "غير مدفوعة";
8460+
8461+
/* Message on the empty search result view of the booking service/event selector view */
8462+
"bookingServiceEventSelectorView.emptySearchDescription" = "حاول ضبط مصطلح البحث الخاص بك لرؤية مزيد من النتائج";
8463+
84138464
/* Text on the empty view of the booking service/event selector view */
84148465
"bookingServiceEventSelectorView.noMembersFound" = "تعذر العثور على خدمة أو حدث";
84158466

8467+
/* Prompt in the search bar of the booking service/event selector view */
8468+
"bookingServiceEventSelectorView.searchPrompt" = "البحث عن الخدمة \/ الحدث";
8469+
84168470
/* Title of the booking service/event selector view */
84178471
"bookingServiceEventSelectorView.title" = "الخدمة \/ الحدث";
84188472

0 commit comments

Comments
 (0)