From 309c9635154e5220de72065b1faaea5213b35b31 Mon Sep 17 00:00:00 2001 From: maksim Date: Fri, 27 Jun 2025 17:56:22 +0300 Subject: [PATCH] =?UTF-8?q?Task=206991=20|=20=D0=B8=D1=81=D0=BF=D1=80?= =?UTF-8?q?=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=D0=B0=20=D0=BB=D0=BE=D0=B3=D0=B8?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BF=D0=B5=D1=80=D0=B5=D0=B2=D0=BE=D0=B4=D0=BE?= =?UTF-8?q?=D0=B2=20=D0=B8=20=D0=B2=D0=BE=D0=B2=D0=BE=D0=B4=D0=B0=20=D0=BE?= =?UTF-8?q?=D1=88=D0=B8=D0=B1=D0=BE=D0=BA=20=D0=B2=20=D1=87=D0=B5=D0=BA?= =?UTF-8?q?=D0=B0=D1=83=D1=82=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../global-functions/multilang-functions.php | 27 +- .../components/checkout/assets/js/script.js | 249 +++++++++--------- 2 files changed, 143 insertions(+), 133 deletions(-) diff --git a/wp-content/themes/cosmopet/global-functions/multilang-functions.php b/wp-content/themes/cosmopet/global-functions/multilang-functions.php index 77772b5..0b2301d 100644 --- a/wp-content/themes/cosmopet/global-functions/multilang-functions.php +++ b/wp-content/themes/cosmopet/global-functions/multilang-functions.php @@ -1780,15 +1780,38 @@ add_action('wp_head', function () { 'en' => [ 'name_required' => 'The name is required.', 'email_invalid' => 'Email is incorrect.', - 'phone_invalid' => 'The phone number is incorrect.' + 'phone_invalid' => 'The phone number is incorrect.', + 'error_coupon_empty' => 'Please enter the coupon code.', + 'error_coupon_invalid' => 'Error! The coupon code is invalid or does not exist.', + 'error_generic' => 'An error occurred. Please try again.', + 'shipping_method_error' => 'No pickup point selected for delivery.', + 'shipping_address_error' => 'Delivery address not provided', + 'email_taken_error' => 'This email is already registered. Please log in or provide a different email.', + 'phone_number_error' => 'Incorrect phone number entered.', + 'shipping_method_missing' => 'No delivery method selected. Please check your address or contact the site administration for help.', + 'change_address' => 'Change address', + 'shipping_updated' => 'Shipping methods will be updated during checkout.', + 'coupon_applied' => 'Coupon applied: ' ], 'ru' => [ 'name_required' => 'Поле имени обязательно для заполнения.', 'email_invalid' => 'Введите корректный email.', - 'phone_invalid' => 'Введите корректный номер телефона.' + 'phone_invalid' => 'Введите корректный номер телефона.', + 'error_coupon_empty' => 'Пожалуйста, введите код купона.', + 'error_coupon_invalid' => 'Ошибка! Промокод введен неверно или не существует.', + 'error_generic' => 'Произошла ошибка. Попробуйте ещё раз.', + 'shipping_method_error' => 'Не выбран ПВЗ для доставки заказа.', + 'shipping_address_error' => 'Не указан адрес доставки', + 'email_taken_error' => 'Этот email уже зарегистрирован. Войдите в свой аккаунт или укажите другой E-mail.', + 'phone_number_error' => 'Неправильно введен номер', + 'shipping_method_missing' => 'Не выбран метод доставки. Пожалуйста перепроверьте ваш адрес или обратитесь за помощью к администрации сайта.', + 'change_address' => 'Изменить адрес', + 'shipping_updated' => 'Методы доставки будут обновлены в процессе оформления заказа.', + 'coupon_applied' => 'Применен промокод: ' ] ]; + $current_translations = $translations[$lang] ?? $translations['en']; ?>