BackendStrings.php
1 year ago
FrontendStrings.php
1 year ago
LiteBackendStrings.php
3 weeks ago
LiteFrontendStrings.php
3 weeks ago
NotificationsStrings.php
2 months ago
LiteFrontendStrings.php
315 lines
| 1 | <?php |
| 2 | |
| 3 | namespace AmeliaBooking\Infrastructure\WP\Translations; |
| 4 | |
| 5 | use AmeliaBooking\Domain\Services\Settings\SettingsService; |
| 6 | use AmeliaBooking\Infrastructure\WP\SettingsService\SettingsStorage; |
| 7 | |
| 8 | /** |
| 9 | * @phpcs:disable |
| 10 | */ |
| 11 | class LiteFrontendStrings |
| 12 | { |
| 13 | private static ?SettingsService $settings = null; |
| 14 | |
| 15 | /** |
| 16 | * @return array|mixed |
| 17 | */ |
| 18 | public static function getLabelsFromSettings() |
| 19 | { |
| 20 | if (!self::$settings) { |
| 21 | self::$settings = new SettingsService(new SettingsStorage()); |
| 22 | } |
| 23 | |
| 24 | if (self::$settings->getSetting('labels', 'enabled') === true) { |
| 25 | $labels = self::$settings->getCategorySettings('labels'); |
| 26 | unset($labels['enabled']); |
| 27 | |
| 28 | return $labels; |
| 29 | } |
| 30 | |
| 31 | return []; |
| 32 | } |
| 33 | |
| 34 | /** |
| 35 | * Return all strings for frontend |
| 36 | */ |
| 37 | public static function getAllStrings(): array |
| 38 | { |
| 39 | return array_merge( |
| 40 | self::getCommonStrings(), |
| 41 | self::getBookingStrings(), |
| 42 | self::getBookableStrings(), |
| 43 | self::getCatalogStrings(), |
| 44 | self::getSearchStrings(), |
| 45 | self::getLabelsFromSettings(), |
| 46 | self::getEventStrings(), |
| 47 | self::getCabinetStrings() |
| 48 | ); |
| 49 | } |
| 50 | |
| 51 | /** |
| 52 | * Returns the array for the bookable strings |
| 53 | */ |
| 54 | public static function getBookableStrings(): array |
| 55 | { |
| 56 | return []; |
| 57 | } |
| 58 | |
| 59 | /** |
| 60 | * Returns the array of the common frontend strings |
| 61 | */ |
| 62 | public static function getCommonStrings(): array |
| 63 | { |
| 64 | return [ |
| 65 | 'add_to_calendar' => __('Add to Calendar', 'ameliabooking'), |
| 66 | 'amount' => __('Amount', 'ameliabooking'), |
| 67 | 'and' => __('and', 'ameliabooking'), |
| 68 | 'all_services' => __('All Services', 'ameliabooking'), |
| 69 | 'all_locations' => __('All Locations', 'ameliabooking'), |
| 70 | 'no_services_employees' => __('It seems like there are no employees or services created, or no employees are assigned to the service, at this moment.'), |
| 71 | 'add_services_employees' => __('If you are the admin of this page, see how to'), |
| 72 | 'add_services_url' => __('Add services'), |
| 73 | 'add_employees_url' => __('employees.'), |
| 74 | 'back' => __('Back', 'ameliabooking'), |
| 75 | 'base_price_colon' => __('Base Price:', 'ameliabooking'), |
| 76 | 'booking_canceled' => __('Your booking has been canceled.', 'ameliabooking'), |
| 77 | 'booking_completed_approved' => __('Thank you! Your booking is completed.', 'ameliabooking'), |
| 78 | 'bookings_limit_reached' => __('Maximum bookings reached', 'ameliabooking'), |
| 79 | 'cancel' => __('Cancel', 'ameliabooking'), |
| 80 | 'canceled' => __('Canceled', 'ameliabooking'), |
| 81 | 'capacity_colon' => __('Capacity:', 'ameliabooking'), |
| 82 | 'closed' => __('Closed', 'ameliabooking'), |
| 83 | 'content_mode_tooltip' => __('Don\'t use Text mode option if you already have HTML code in the description, since once this option is enabled the existing HTML tags could be lost.', 'ameliabooking'), |
| 84 | 'created_on' => __('Created on', 'ameliabooking'), |
| 85 | 'enable_google_meet' => __('Enable Google Meet', 'ameliabooking'), |
| 86 | 'enable_microsoft_teams' => __('Enable Microsoft Teams', 'ameliabooking'), |
| 87 | 'full' => __('Full', 'ameliabooking'), |
| 88 | 'upcoming' => __('Upcoming', 'ameliabooking'), |
| 89 | 'confirm' => __('Confirm', 'ameliabooking'), |
| 90 | 'congratulations' => __('Congratulations', 'ameliabooking'), |
| 91 | 'customer_already_booked_app' => __('You have already booked this appointment', 'ameliabooking'), |
| 92 | 'customer_already_booked_ev' => __('You have already booked this event', 'ameliabooking'), |
| 93 | 'date_colon' => __('Date:', 'ameliabooking'), |
| 94 | 'duration_colon' => __('Duration:', 'ameliabooking'), |
| 95 | 'email_colon' => __('Email:', 'ameliabooking'), |
| 96 | 'email_exist_error' => __('Email already exists with different name. Please check your name.', 'ameliabooking'), |
| 97 | 'email_required' => __('Email field is required', 'ameliabooking'), |
| 98 | 'employee_limit_reached' => __('Employee daily appointment limit has been reached. Please choose another date or employee.', 'ameliabooking'), |
| 99 | 'enter_email_warning' => __('Please enter email', 'ameliabooking'), |
| 100 | 'enter_first_name_warning' => __('Please enter first name', 'ameliabooking'), |
| 101 | 'enter_last_name_warning' => __('Please enter last name', 'ameliabooking'), |
| 102 | 'enter_phone_warning' => __('Please enter phone number', 'ameliabooking'), |
| 103 | 'enter_valid_email_warning' => __('Please enter a valid email address', 'ameliabooking'), |
| 104 | 'enter_valid_phone_warning' => __('Please enter a valid phone number.', 'ameliabooking'), // Used in Redesign | Updated |
| 105 | 'event_info' => __('Event Info', 'ameliabooking'), |
| 106 | 'finish_appointment' => __('Finish', 'ameliabooking'), |
| 107 | 'first_name_colon' => __('First Name:', 'ameliabooking'), |
| 108 | 'h' => __('h', 'ameliabooking'), |
| 109 | 'last_name_colon' => __('Last Name:', 'ameliabooking'), |
| 110 | 'licence_start_description' => __('Available from Starter license', 'ameliabooking'), |
| 111 | 'licence_basic_description' => __('Available from Standard license', 'ameliabooking'), |
| 112 | 'licence_pro_description' => __('Available from Pro license', 'ameliabooking'), |
| 113 | 'licence_dev_description' => __('Available in Elite licence', 'ameliabooking'), |
| 114 | 'licence_button_text' => __('Upgrade', 'ameliabooking'), |
| 115 | 'min' => __('min', 'ameliabooking'), |
| 116 | 'no_results_found' => __('No results found...', 'ameliabooking'), |
| 117 | 'on_site' => __('On-site', 'ameliabooking'), |
| 118 | 'payment_btn_on_site' => __('On-Site', 'ameliabooking'), |
| 119 | 'oops' => __('Oops...'), |
| 120 | 'payment_btn_square' => __('Square', 'ameliabooking'), |
| 121 | 'open' => __('Open', 'ameliabooking'), |
| 122 | 'opens_in_new_tab' => __('opens in new tab', 'ameliabooking'), |
| 123 | 'on_line' => __('Online', 'ameliabooking'), |
| 124 | 'pay_pal' => __('PayPal', 'ameliabooking'), |
| 125 | 'previous_step' => __('Previous step', 'ameliabooking'), |
| 126 | 'loading' => __('Loading', 'ameliabooking'), |
| 127 | 'loading_header' => __('Loading header', 'ameliabooking'), |
| 128 | 'phone_colon' => __('Phone:', 'ameliabooking'), |
| 129 | 'phone_exist_error' => __('Phone already exists with different name. Please check your name.', 'ameliabooking'), |
| 130 | 'price_colon' => __('Price:', 'ameliabooking'), |
| 131 | 'service' => __('service', 'ameliabooking'), |
| 132 | 'show' => __('Show', 'ameliabooking'), |
| 133 | 'select_calendar' => __('Select Calendar', 'ameliabooking'), |
| 134 | 'services_lower' => __('services', 'ameliabooking'), |
| 135 | 'square' => __('Square', 'ameliabooking'), |
| 136 | 'time_colon' => __('Local Time:', 'ameliabooking'), |
| 137 | 'time_slot_unavailable' => __('Time slot is unavailable', 'ameliabooking'), |
| 138 | 'total_cost_colon' => __('Total Cost:', 'ameliabooking'), |
| 139 | 'total_number_of_persons' => __('Total Number of People:', 'ameliabooking'), |
| 140 | 'view' => __('View', 'ameliabooking'), |
| 141 | 'select' => __('Select', 'ameliabooking'), |
| 142 | 'free' => __('Free', 'ameliabooking'), |
| 143 | 'error_use_diff_email_or_phone' => __('Please use a different email or phone number to complete the booking.', 'ameliabooking'), |
| 144 | 'image' => __('Image', 'ameliabooking'), |
| 145 | 'image_navigation' => __('Image navigation', 'ameliabooking'), |
| 146 | 'next_image' => __('Next image', 'ameliabooking'), |
| 147 | 'previous_image' => __('Previous image', 'ameliabooking'), |
| 148 | 'of' => __('of', 'ameliabooking'), |
| 149 | 'people_waiting' => __('people waiting', 'ameliabooking'), |
| 150 | 'person_waiting' => __('person waiting', 'ameliabooking'), |
| 151 | 'minimum' => __('Minimum', 'ameliabooking'), |
| 152 | 'maximum' => __('Maximum', 'ameliabooking'), |
| 153 | ]; |
| 154 | } |
| 155 | |
| 156 | /** |
| 157 | * Returns the array of the frontend strings for the search shortcode |
| 158 | */ |
| 159 | public static function getSearchStrings(): array |
| 160 | { |
| 161 | return []; |
| 162 | } |
| 163 | |
| 164 | /** |
| 165 | * Returns the array of the frontend strings for the booking shortcode |
| 166 | */ |
| 167 | public static function getBookingStrings(): array |
| 168 | { |
| 169 | return [ |
| 170 | 'continue' => __('Continue', 'ameliabooking'), |
| 171 | 'email_address_colon' => __('Email Address', 'ameliabooking'), |
| 172 | 'get_in_touch' => __('Get in Touch', 'ameliabooking'), |
| 173 | 'ivyforms_validation_failed' => __('IvyForms validation failed.', 'ameliabooking'), |
| 174 | 'collapse_menu' => __('Collapse menu', 'ameliabooking'), |
| 175 | 'payment_onsite_sentence' => __('The payment will be done on-site.', 'ameliabooking'), |
| 176 | 'payment_or_pay_with_card' => __('Or pay with card', 'ameliabooking'), |
| 177 | 'phone_number_colon' => __('Phone Number', 'ameliabooking'), |
| 178 | 'pick_date_and_time_colon' => __('Pick date & time:', 'ameliabooking'), |
| 179 | 'please_select' => __('Please select', 'ameliabooking'), |
| 180 | 'summary' => __('Summary', 'ameliabooking'), |
| 181 | 'total_amount_colon' => __('Total Amount:', 'ameliabooking'), |
| 182 | 'your_name_colon' => __('Your Name', 'ameliabooking'), |
| 183 | |
| 184 | 'service_selection' => __('Service Selection', 'ameliabooking'), |
| 185 | 'employee_selection' => __('Employee Selection', 'ameliabooking'), |
| 186 | 'location_selection' => __('Location Selection', 'ameliabooking'), |
| 187 | 'service_colon' => __('Service', 'ameliabooking'), |
| 188 | 'please_select_service' => __('Please select service', 'ameliabooking'), |
| 189 | 'dropdown_category_heading' => __('Category', 'ameliabooking'), |
| 190 | 'dropdown_items_heading' => __('Service', 'ameliabooking'), |
| 191 | 'date_time' => __('Date & Time', 'ameliabooking'), |
| 192 | 'info_step' => __('Your Information', 'ameliabooking'), |
| 193 | 'enter_first_name' => __('Enter first name', 'ameliabooking'), |
| 194 | 'enter_last_name' => __('Enter last name', 'ameliabooking'), |
| 195 | 'enter_email' => __('Enter email', 'ameliabooking'), |
| 196 | 'enter_phone' => __('Enter phone', 'ameliabooking'), |
| 197 | 'payment_step' => __('Payments', 'ameliabooking'), |
| 198 | 'summary_services' => __('Services', 'ameliabooking'), |
| 199 | 'summary_person' => __('person', 'ameliabooking'), |
| 200 | 'summary_persons' => __('people', 'ameliabooking'), |
| 201 | 'summary_event' => __('Event', 'ameliabooking'), |
| 202 | 'appointment_id' => __('Appointment ID', 'ameliabooking'), |
| 203 | 'event_id' => __('Event ID', 'ameliabooking'), |
| 204 | 'congrats_payment' => __('Payment', 'ameliabooking'), |
| 205 | 'congrats_date' => __('Date', 'ameliabooking'), |
| 206 | 'congrats_time' => __('Local Time', 'ameliabooking'), |
| 207 | 'congrats_service' => __('Service', 'ameliabooking'), |
| 208 | 'congrats_employee' => __('Employee', 'ameliabooking'), |
| 209 | 'show_more' => __('Show more', 'ameliabooking'), |
| 210 | 'show_less' => __('Show less', 'ameliabooking'), |
| 211 | 'disable_popup_blocker' => __('Popup Blocker is enabled! To add your appointment to your calendar, please allow popups and add this site to your exception list.', 'ameliabooking'), |
| 212 | 'full_amount_consent' => __('I want to pay full amount', 'ameliabooking'), |
| 213 | 'learn_more' => __('Learn More', 'ameliabooking'), |
| 214 | 'view_in_package' => __('View in Package', 'ameliabooking'), |
| 215 | 'service_information' => __('Service information', 'ameliabooking'), |
| 216 | 'payment_wc_mollie_sentence' => __('You will be redirected to the payment checkout.', 'ameliabooking'), |
| 217 | 'payment_button' => __('payment button', 'ameliabooking'), |
| 218 | 'total_tax_colon' => __('VAT', 'ameliabooking'), |
| 219 | 'incl_tax' => __('Incl. VAT', 'ameliabooking'), |
| 220 | 'recurring_unavailable_slots' => __('Unavailable Time Slots', 'ameliabooking'), |
| 221 | 'recurring_chose_date' => __('Choose Date and Time', 'ameliabooking'), |
| 222 | 'recurring_delete' => __('Delete', 'ameliabooking'), |
| 223 | 'recurring_slots_selected' => __('All slots are selected', 'ameliabooking'), |
| 224 | ]; |
| 225 | } |
| 226 | |
| 227 | /** |
| 228 | * Returns the array of the frontend strings for the event shortcode |
| 229 | */ |
| 230 | public static function getEventStrings(): array |
| 231 | { |
| 232 | return [ |
| 233 | 'event_book_event' => __('Book event', 'ameliabooking'), |
| 234 | 'event_book' => __('Book this event', 'ameliabooking'), |
| 235 | 'event_capacity' => __('Capacity:', 'ameliabooking'), |
| 236 | 'event_filters' => __('Filters', 'ameliabooking'), |
| 237 | 'event_start' => __('Event Starts', 'ameliabooking'), |
| 238 | 'event_end' => __('Event Ends', 'ameliabooking'), |
| 239 | 'event_at' => __('at', 'ameliabooking'), |
| 240 | 'event_close' => __('Close', 'ameliabooking'), |
| 241 | 'event_congrats' => __('Congratulations', 'ameliabooking'), |
| 242 | 'event_payment' => __('Payment', 'ameliabooking'), |
| 243 | 'event_customer_info' => __('Your Information', 'ameliabooking'), |
| 244 | 'event_about_list' => __('About Event', 'ameliabooking'), |
| 245 | 'events_available' => __('Events Available', 'ameliabooking'), |
| 246 | 'event_available' => __('Event Available', 'ameliabooking'), |
| 247 | 'event_search' => __('Search for Events', 'ameliabooking'), |
| 248 | 'event_slot_left' => __('slot left', 'ameliabooking'), |
| 249 | 'event_slots_left' => __('slots left', 'ameliabooking'), |
| 250 | 'event_learn_more' => __('Learn more', 'ameliabooking'), |
| 251 | 'event_read_more' => __('Read more', 'ameliabooking'), |
| 252 | 'event_timetable' => __('Timetable', 'ameliabooking'), |
| 253 | 'event_type' => __('Event type', 'ameliabooking'), |
| 254 | 'event_page' => __('Page', 'ameliabooking'), |
| 255 | 'gallery' => __('Gallery', 'ameliabooking'), |
| 256 | 'event_bringing' => __('How many attendees do you want to book event for?', 'ameliabooking'), |
| 257 | 'bringing_anyone' => __('Bringing anyone with you?', 'ameliabooking'), |
| 258 | 'loading_event_information' => __('Loading event information', 'ameliabooking'), |
| 259 | 'events' => __('Events', 'ameliabooking'), |
| 260 | 'events_pagination' => __('Events pagination', 'ameliabooking'), |
| 261 | 'event_booking' => __('Event booking', 'ameliabooking'), |
| 262 | 'event_image_gallery' => __('Event image gallery', 'ameliabooking'), |
| 263 | 'event_tickets_context' => __('Select the number of tickets that you want to book for each ticket type', 'ameliabooking'), |
| 264 | 'event_tickets_left' => __('tickets left', 'ameliabooking'), |
| 265 | 'event_ticket_left' => __('ticket left', 'ameliabooking'), |
| 266 | 'event_show_less' => __('Show less', 'ameliabooking'), |
| 267 | 'event_show_more' => __('Show more', 'ameliabooking'), |
| 268 | 'event_location' => __('Event Location', 'ameliabooking'), |
| 269 | 'no_events' => __('No results found...', 'ameliabooking'), |
| 270 | 'date_picker_placeholder' => __('Date Picker', 'ameliabooking'), |
| 271 | ]; |
| 272 | } |
| 273 | |
| 274 | /** |
| 275 | * Returns the array of the frontend strings for the catalog shortcode |
| 276 | */ |
| 277 | public static function getCatalogStrings(): array |
| 278 | { |
| 279 | return [ |
| 280 | 'categories' => __('Categories', 'ameliabooking'), |
| 281 | 'category_colon' => __('Category:', 'ameliabooking'), |
| 282 | 'description' => __('Description', 'ameliabooking'), |
| 283 | 'info' => __('Info', 'ameliabooking'), |
| 284 | 'view_more' => __('View More', 'ameliabooking'), |
| 285 | 'view_all' => __('View All', 'ameliabooking'), |
| 286 | 'filter_input' => __('Search', 'ameliabooking'), |
| 287 | 'book_now' => __('Book Now', 'ameliabooking'), |
| 288 | 'about_service' => __('About Service', 'ameliabooking'), |
| 289 | 'view_all_photos' => __('View all photos', 'ameliabooking'), |
| 290 | 'back_btn' => __('Go Back', 'ameliabooking'), |
| 291 | 'heading_service' => __('Service', 'ameliabooking'), |
| 292 | 'heading_services' => __('Services', 'ameliabooking'), |
| 293 | 'no_search_data' => __('No results', 'ameliabooking'), |
| 294 | 'filter_all' => __('All', 'ameliabooking'), |
| 295 | ]; |
| 296 | } |
| 297 | |
| 298 | /** |
| 299 | * Returns the array of the frontend strings for the event shortcode |
| 300 | */ |
| 301 | public static function getCabinetStrings(): array |
| 302 | { |
| 303 | return [ |
| 304 | 'available' => __('Available', 'ameliabooking'), |
| 305 | 'booking_cancel_exception' => __('Booking can\'t be canceled', 'ameliabooking'), |
| 306 | 'generate_payment_links' => __('Generate payment links', 'ameliabooking'), |
| 307 | 'generate_payment_links_tooltip' => __('Check this box to generate a payment link.<br> To include it in the notification, add the payment link placeholder.', 'ameliabooking'), |
| 308 | 'no_results' => __('There are no results...', 'ameliabooking'), |
| 309 | 'select_customer' => __('Select Customer', 'ameliabooking'), |
| 310 | 'select_service' => __('Select Service', 'ameliabooking'), |
| 311 | 'subtotal' => __('Subtotal', 'ameliabooking'), |
| 312 | ]; |
| 313 | } |
| 314 | } |
| 315 |