-- EN vitrin: TR metin kopyasını temizle (yapı + localized path kalır; panelden doldurulur)
USE faunamix;

SET @has_page_locale = (
  SELECT COUNT(*) FROM information_schema.COLUMNS
  WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'site_pages' AND COLUMN_NAME = 'locale'
);

SET @sql = IF(
  @has_page_locale > 0,
  "UPDATE site_pages
   SET title = '', short_title = '', excerpt = '', body_html = '',
       meta_title = '', meta_description = '', meta_keywords = ''
   WHERE locale = 'en'",
  'SELECT 1'
);
PREPARE stmt FROM @sql;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;

SET @nav_loc = (
  SELECT COUNT(*) FROM information_schema.COLUMNS
  WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'nav_menu_items' AND COLUMN_NAME = 'locale'
);
SET @sql = IF(
  @nav_loc > 0,
  "UPDATE nav_menu_items SET title = '' WHERE locale = 'en'",
  'SELECT 1'
);
PREPARE stmt FROM @sql;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;

SET @footer_loc = (
  SELECT COUNT(*) FROM information_schema.COLUMNS
  WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'footer_menu_items' AND COLUMN_NAME = 'locale'
);
SET @sql = IF(
  @footer_loc > 0,
  "UPDATE footer_menu_items SET title = '' WHERE locale = 'en'",
  'SELECT 1'
);
PREPARE stmt FROM @sql;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;

SET @hero_loc = (
  SELECT COUNT(*) FROM information_schema.COLUMNS
  WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = 'home_hero_slides' AND COLUMN_NAME = 'locale'
);
SET @sql = IF(
  @hero_loc > 0,
  "UPDATE home_hero_slides
   SET baslik_1 = '', baslik_2 = '', baslik_3 = '', baslik_4 = '', alt_text = ''
   WHERE locale = 'en'",
  'SELECT 1'
);
PREPARE stmt FROM @sql;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
