-- =====================================================================
-- Kapitano Logistic integration - the CUSTOMER chooses wrapping
--
-- Screen texts only (English and Arabic); no table changes. The checkbox at checkout, the
-- message when wrapping is asked for but not on offer, and the read-only line on the admin
-- order page.
--
-- Safe to run more than once. Afterwards: php artisan cache:clear
-- =====================================================================

SET NAMES utf8mb4;

INSERT INTO `translations` (`lang`, `lang_key`, `lang_value`, `created_at`, `updated_at`)
SELECT v.lang, v.k, v.val, NOW(), NOW() FROM (
  SELECT 'en' lang, 'wrapping_is_not_available_for_this_order' k, 'Wrapping is not available for this order' val
  UNION ALL SELECT 'ar', 'wrapping_is_not_available_for_this_order', 'التغليف غير متاح لهذا الطلب'
  UNION ALL SELECT 'en', 'customer_asked_for_wrapping', 'Customer asked for wrapping'
  UNION ALL SELECT 'ar', 'customer_asked_for_wrapping', 'طلب الزبون التغليف'
  UNION ALL SELECT 'en', 'the_customer_chooses_wrapping_at_checkout_the_wrapping_place_is_set_by_the_store_in_its_logistic_portal_settings', 'The customer chooses wrapping at checkout. The wrapping place is set by the store in its Logistic portal (Settings).'
  UNION ALL SELECT 'ar', 'the_customer_chooses_wrapping_at_checkout_the_wrapping_place_is_set_by_the_store_in_its_logistic_portal_settings', 'يختار الزبون التغليف عند إتمام الطلب. ويحدد المتجر مكان التغليف من إعدادات بوابته في لوجستك.'
) v
WHERE NOT EXISTS (SELECT 1 FROM `translations` t WHERE t.lang = v.lang AND t.lang_key = v.k);
