get_month( $key ) : gmdate( 'F', mktime( 0, 0, 0, $m, 1 ) ); $genitive[] = $wp_locale && ! empty( $wp_locale->month_genitive[ $key ] ) ? $wp_locale->month_genitive[ $key ] : end( $months ); } // Monday-first initials. $days = []; foreach ( [ 1, 2, 3, 4, 5, 6, 0 ] as $d ) { $days[] = $wp_locale ? $wp_locale->get_weekday_abbrev( $wp_locale->get_weekday( $d ) ) : ''; } $strings = [ // 1.x keys (kept for layouts written against 1.x). 'selectService' => __( 'Select a service:', 'vizyt' ), 'next' => __( 'Next', 'vizyt' ), 'back' => __( 'Back', 'vizyt' ), 'book' => __( 'Book', 'vizyt' ), 'select' => __( 'Select →', 'vizyt' ), 'prevMonth' => __( 'Previous month', 'vizyt' ), 'nextMonth' => __( 'Next month', 'vizyt' ), 'firstName' => __( 'First name', 'vizyt' ), 'phone' => __( 'Phone', 'vizyt' ), 'email' => _x( 'Email', 'booking form field', 'vizyt' ), 'comment' => __( 'Comment', 'vizyt' ), /* translators: 1: date, 2: time */ 'dateAt' => __( '%1$s at %2$s', 'vizyt' ), 'noSlots' => __( 'No available slots.', 'vizyt' ), 'confirmed' => __( 'Your booking is confirmed!', 'vizyt' ), 'service' => __( 'Service:', 'vizyt' ), 'date' => __( 'Date:', 'vizyt' ), 'staff' => __( 'Staff:', 'vizyt' ), 'minutes' => __( 'min', 'vizyt' ), 'errServices' => __( 'Failed to load services.', 'vizyt' ), 'errNetwork' => __( 'Network error.', 'vizyt' ), 'errNoStaff' => __( 'No staff available.', 'vizyt' ), 'errAvailability' => __( 'Failed to load availability.', 'vizyt' ), 'errSlotTaken' => __( 'This slot is no longer available. Please choose another.', 'vizyt' ), /* translators: %s: server message */ 'errGeneric' => __( 'Error: %s', 'vizyt' ), 'errTryAgain' => __( 'please try again.', 'vizyt' ), 'errRequired' => __( 'Please fill in all required fields.', 'vizyt' ), 'errEmail' => __( 'Please enter a valid email address.', 'vizyt' ), /* translators: %s: comma-separated field names */ 'errFillIn' => __( 'Please fill in: %s', 'vizyt' ), // Stepper. /* translators: 1: current step number, 2: number of steps */ 'stepOf' => __( 'Step %1$s of %2$s', 'vizyt' ), /* translators: %s: name of the next step, lowercase (e.g. "date and time") */ 'nextStep' => __( 'Next: %s', 'vizyt' ), 'almostDone' => __( 'Almost done', 'vizyt' ), 'stepService' => _x( 'service', 'booking step, lowercase', 'vizyt' ), 'stepStaff' => _x( 'specialist', 'booking step, lowercase', 'vizyt' ), 'stepDateTime' => _x( 'date and time', 'booking step, lowercase', 'vizyt' ), 'stepDetails' => _x( 'your details', 'booking step, lowercase', 'vizyt' ), 'stepReview' => _x( 'review', 'booking step, lowercase', 'vizyt' ), // Step titles. 'titleService' => __( 'Choose a service', 'vizyt' ), 'chooseStaff' => __( 'Choose a specialist', 'vizyt' ), 'titleDate' => __( 'Choose a date', 'vizyt' ), 'titleTime' => __( 'Choose a time', 'vizyt' ), 'titleDetails' => __( 'Your details', 'vizyt' ), 'titleReview' => __( 'Review your booking', 'vizyt' ), // Service and specialist steps. 'allCategories' => __( 'All', 'vizyt' ), 'change' => __( 'Change', 'vizyt' ), 'anyStaff' => __( 'Any available specialist', 'vizyt' ), 'anyStaffHint' => __( 'We will show the earliest free time', 'vizyt' ), 'anyStaffShort' => __( 'Any specialist', 'vizyt' ), /* translators: %s: specialist name */ 'onlyOneStaff' => __( 'Only %s provides this service, so the specialist step was skipped.', 'vizyt' ), // Date and time. 'hasFreeTime' => __( 'free time available', 'vizyt' ), 'today' => _x( 'today', 'calendar legend', 'vizyt' ), 'prevDay' => __( 'Previous day', 'vizyt' ), 'nextDay' => __( 'Next day', 'vizyt' ), 'morning' => __( 'Morning', 'vizyt' ), 'afternoon' => __( 'Afternoon', 'vizyt' ), 'evening' => __( 'Evening', 'vizyt' ), /* translators: 1: time, 2: specialist name */ 'slotWithStaff' => __( '%1$s — with %2$s', 'vizyt' ), 'noSlotsDay' => __( 'No free time on this day', 'vizyt' ), 'nearestSlot' => __( 'Nearest free time:', 'vizyt' ), 'noSlotsWindow' => __( 'No free time in the coming days. Please call us or try again later.', 'vizyt' ), // Details. 'optional' => __( 'optional', 'vizyt' ), 'commentPlaceholder' => __( 'Wishes for your visit', 'vizyt' ), 'errName' => __( 'Please enter your name', 'vizyt' ), 'errPhone' => __( 'Enter a number so the salon can contact you', 'vizyt' ), 'errEmailRequired' => __( 'Enter your email to receive the confirmation', 'vizyt' ), 'errFieldRequired' => __( 'This field is required', 'vizyt' ), // Review and success. 'reviewService' => __( 'Service', 'vizyt' ), 'reviewStaff' => __( 'Specialist', 'vizyt' ), 'reviewWhen' => __( 'When', 'vizyt' ), 'reviewWhere' => __( 'Where', 'vizyt' ), 'payAtSalon' => __( 'To pay at the salon', 'vizyt' ), 'cancelNote' => __( 'You can cancel or reschedule using the link in the confirmation email.', 'vizyt' ), 'bookedTitle' => __( 'You are booked', 'vizyt' ), /* translators: %s: customer email address */ 'bookedText' => __( 'We sent the confirmation to %s. We will remind you a day before the visit.', 'vizyt' ), 'addToCalendar' => __( 'Add to calendar', 'vizyt' ), 'bookAgain' => __( 'Book again', 'vizyt' ), // States. 'loadingServices' => __( 'Loading services…', 'vizyt' ), 'loadingStaff' => __( 'Loading specialists…', 'vizyt' ), 'loadingSlots' => __( 'Loading free time…', 'vizyt' ), 'errLoadServices' => __( 'Could not load services', 'vizyt' ), 'errLoadStaff' => __( 'Could not load specialists', 'vizyt' ), 'errLoadSlots' => __( 'Could not load free time', 'vizyt' ), 'errSubmit' => __( 'Could not send your booking', 'vizyt' ), 'errOffline' => __( 'Looks like the connection dropped. Check it and try again.', 'vizyt' ), 'retry' => __( 'Try again', 'vizyt' ), /* translators: %s: salon phone number */ 'orCall' => __( 'Or call: %s', 'vizyt' ), /* translators: %s: time, e.g. 15:30 */ 'slotTakenTitle' => __( '%s was just taken', 'vizyt' ), 'slotTakenText' => __( 'While you were filling in the form, someone else chose this time. Your details are saved — pick another time.', 'vizyt' ), 'sameDayFree' => __( 'Free the same day', 'vizyt' ), /* translators: %s: time, e.g. 16:00 */ 'bookAt' => __( 'Book for %s', 'vizyt' ), 'otherDay' => __( 'Choose another day', 'vizyt' ), 'noMoreSameDay' => __( 'No more free time that day.', 'vizyt' ), 'errStaffService' => __( 'This specialist does not provide the selected service.', 'vizyt' ), 'unavailable' => __( 'Booking is currently unavailable.', 'vizyt' ), // 1.6 reschedule mode (Manage booking page). 'titleNewDate' => __( 'Choose a new date', 'vizyt' ), /* translators: %s: date and time of the booking now, e.g. "Tue, 6 Oct, 15:30" */ 'currentTime' => __( 'Your booking now: %s', 'vizyt' ), 'reschedAnyHint' => __( 'Other specialists who provide this service', 'vizyt' ), 'reviewWas' => __( 'Was', 'vizyt' ), 'reviewNewTime' => __( 'New time', 'vizyt' ), 'titleReschedReview' => __( 'Check the new time', 'vizyt' ), 'confirmNewTime' => __( 'Confirm new time', 'vizyt' ), 'rescheduledTitle' => __( 'Your booking was moved', 'vizyt' ), 'rescheduledText' => __( 'We sent the new time to your email.', 'vizyt' ), 'backToBooking' => __( 'Back to my booking', 'vizyt' ), 'errReschedule' => __( 'Could not move your booking', 'vizyt' ), 'currentSlot' => __( 'Your current time', 'vizyt' ), 'errSameTime' => __( 'This is the time of your booking now. Choose another time.', 'vizyt' ), /* translators: %s: name of the booking's specialist */ 'onlyWithStaff' => __( 'Only with %s', 'vizyt' ), ]; return [ 'locale' => str_replace( '_', '-', determine_locale() ), 'strings' => apply_filters( 'vizyt_widget_strings', $strings ), 'months' => $months, 'monthsGenitive' => $genitive, 'weekdays' => $days, ]; } }