-- =====================================================================
-- BELTUR - Erisilebilirlik (WCAG 2.2 A) icerik duzeltmeleri
-- Uretim tarihi: 2026-12-03 10:46
--
-- NASIL UYGULANIR
--   phpMyAdmin > beltur veritabani > Iceri Aktar (Import) ile bu dosyayi yukleyin
--   ya da: mysql -u KULLANICI -p beltur < beltur-a11y.sql
--   Metni SQL kutusuna yapistirmayin: satir sonlari degisirse bazi eslesmeler bulunamaz.
--
-- GUVENLIK
--   * Tum degisiklikler tek islem (transaction) icindedir.
--   * Her UPDATE yalnizca beklenen eski metin satirda varsa calisir. Icerik
--     degismisse satir atlanir (veri bozulmaz). Dosyayi tekrar calistirmak guvenlidir.
--   * Yalnizca UPDATE vardir: satir eklenmez, silinmez.
--   * Sondaki SELECT sorgulari sonucu gosterir: her satirda 'ok' gorunmelidir.
-- =====================================================================

SET NAMES utf8mb4;
START TRANSACTION;

-- 1. Ana sayfa slider gorseli (homeslider id 86): bos alt metinleri doldur (WCAG 1.1.1)
UPDATE `homeslider` SET `alt` = 'Beltur Kafe mekânları, kahvaltı tabağı, latte, pasta ve içecek fotoğraflarından oluşan kolaj'
 WHERE `id` = 86 AND `imgdesktop` = 'homeslider/November2026/image-desktop-web-3-3.png' AND (`alt` IS NULL OR `alt` = '');
UPDATE `homeslider` SET `alten` = 'Collage of Beltur Kafe venues, a breakfast plate, a latte, cake and drinks'
 WHERE `id` = 86 AND `imgdesktop` = 'homeslider/November2026/image-desktop-web-3-3.png' AND (`alten` IS NULL OR `alten` = '');

-- 2. Sayfa basliklari sayfayi anlatsin (WCAG 2.4.2)
UPDATE `langgroup` SET `metatitle` = 'BELTUR - Muhteşem Lezzetler, Muhteşem Lokasyonlar' WHERE `slug` = '/' AND `metatitle` = 'Muhteşem Lezzetler, Muhteşem Lokasyonlar';
UPDATE `langgroup` SET `metatitle` = 'BELTUR - Sürdürülebilirlik' WHERE `slug` = 'surdurulebilirlik' AND `metatitle` = 'Beltur Büyükada - Eşsiz Bir Tatil Deneyimi...';
UPDATE `langgroup` SET `metatitle` = 'BELTUR - Politikalar' WHERE `slug` = 'politikalar' AND `metatitle` = 'Otel Büyükada Resort & SPA Beltur - Eşsiz Bir Tatil Deneyimi...';
UPDATE `translations` SET `value` = 'BELTUR - Sustainability'
 WHERE `table_name` = 'langgroup' AND `column_name` = 'metatitle' AND `locale` = 'en'
   AND `foreign_key` = (SELECT `id` FROM `langgroup` WHERE `slug` = 'surdurulebilirlik')
   AND `value` = 'Beltur Buyukada - A Brand New Living Space';

-- 3. Aydinlatma metni tablosu: sutun basliklari <th>, ekran okuyucu icin tablo adi (aria-label) (WCAG 1.3.1)
UPDATE `lang` SET `textval` = REPLACE(REPLACE(REPLACE(`textval`, '<table style="border: 1px solid #ccc; width: 100%;" border="1" cellspacing="0" cellpadding="5">', '<table aria-label="Kişisel veri kategorileri ve ilgili kişi grupları" style="border: 1px solid #ccc; width: 100%;" border="1" cellspacing="0" cellpadding="5">'), '<td valign="middle" width="177"><strong>Kişisel Veri Kategorisi</strong></td>', '<th scope="col" valign="middle" width="177"><strong>Kişisel Veri Kategorisi</strong></th>'), '<td valign="middle" width="270"><strong>İlgili Kişi Grubu</strong></td>', '<th scope="col" valign="middle" width="270"><strong>İlgili Kişi Grubu</strong></th>')
 WHERE `key` = 'aydinlatmametni.aydinlatma-metni1-icerik' AND LOCATE('<td valign="middle" width="177"><strong>Kişisel Veri Kategorisi</strong></td>', `textval`) > 0;
UPDATE `translations` SET `value` = REPLACE(REPLACE(REPLACE(`value`, '<table style="border: 1px solid #ccc; width: 100%;" border="1" cellspacing="0" cellpadding="5">', '<table aria-label="Kişisel veri kategorileri ve ilgili kişi grupları" style="border: 1px solid #ccc; width: 100%;" border="1" cellspacing="0" cellpadding="5">'), '<td valign="middle" width="177"><strong>Kişisel Veri Kategorisi</strong></td>', '<th scope="col" valign="middle" width="177"><strong>Kişisel Veri Kategorisi</strong></th>'), '<td valign="middle" width="270"><strong>İlgili Kişi Grubu</strong></td>', '<th scope="col" valign="middle" width="270"><strong>İlgili Kişi Grubu</strong></th>')
 WHERE `table_name` = 'lang' AND `column_name` = 'textval' AND `locale` = 'en'
   AND `foreign_key` = (SELECT `id` FROM `lang` WHERE `key` = 'aydinlatmametni.aydinlatma-metni1-icerik')
   AND LOCATE('<td valign="middle" width="177"><strong>Kişisel Veri Kategorisi</strong></td>', `value`) > 0;

-- 4. Cerez politikasi: iki tabloya ekran okuyucu basligi, sutun ve satir basliklari (WCAG 1.3.1)
--    Ikinci tablodaki hizmet adlari satir basligi olur; gorunum ayni kalsin diye kalin yazilmaz.
UPDATE `lang` SET `textval` = REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(INSERT(INSERT(`textval`, LOCATE('<table>', `textval`, LOCATE('<table>', `textval`) + 1) + 7, 0, '<caption class="sr-only">Hizmet sağlayıcıların çerez tercih (devre dışı bırakma) sayfaları</caption>'), LOCATE('<table>', `textval`) + 7, 0, '<caption class="sr-only">Analiz ve performans çerezleri ve açıklamaları</caption>'), '<td>Adobe Analytics</td>', '<th scope="row" style="font-weight: normal;">Adobe Analytics</th>'), '<td>AOL</td>', '<th scope="row" style="font-weight: normal;">AOL</th>'), '<td>Google Adwords</td>', '<th scope="row" style="font-weight: normal;">Google Adwords</th>'), '<td>Google Analytics</td>', '<th scope="row" style="font-weight: normal;">Google Analytics</th>'), '<td>Google Chrome</td>', '<th scope="row" style="font-weight: normal;">Google Chrome</th>'), '<td>Internet Explorer</td>', '<th scope="row" style="font-weight: normal;">Internet Explorer</th>'), '<td>Mozilla Firefox</td>', '<th scope="row" style="font-weight: normal;">Mozilla Firefox</th>'), '<td>Opera</td>', '<th scope="row" style="font-weight: normal;">Opera</th>'), '<td>Safari</td>', '<th scope="row" style="font-weight: normal;">Safari</th>'), '<th class="blackcolor">ÇEREZ</th>', '<th class="blackcolor" scope="col">ÇEREZ</th>'), '<th class="blackcolor">AÇIKLAMA</th>', '<th class="blackcolor" scope="col">AÇIKLAMA</th>')
 WHERE `key` = 'cerezpolitikasi.icerik' AND LOCATE('<caption', `textval`) = 0 AND LOCATE('<th class="blackcolor">ÇEREZ</th>', `textval`) > 0 AND (LENGTH(`textval`) - LENGTH(REPLACE(`textval`, '<table>', ''))) = 14;
UPDATE `translations` SET `value` = REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(INSERT(INSERT(`value`, LOCATE('<table>', `value`, LOCATE('<table>', `value`) + 1) + 7, 0, '<caption class="sr-only">Hizmet sağlayıcıların çerez tercih (devre dışı bırakma) sayfaları</caption>'), LOCATE('<table>', `value`) + 7, 0, '<caption class="sr-only">Analiz ve performans çerezleri ve açıklamaları</caption>'), '<td>Adobe Analytics</td>', '<th scope="row" style="font-weight: normal;">Adobe Analytics</th>'), '<td>AOL</td>', '<th scope="row" style="font-weight: normal;">AOL</th>'), '<td>Google Adwords</td>', '<th scope="row" style="font-weight: normal;">Google Adwords</th>'), '<td>Google Analytics</td>', '<th scope="row" style="font-weight: normal;">Google Analytics</th>'), '<td>Google Chrome</td>', '<th scope="row" style="font-weight: normal;">Google Chrome</th>'), '<td>Internet Explorer</td>', '<th scope="row" style="font-weight: normal;">Internet Explorer</th>'), '<td>Mozilla Firefox</td>', '<th scope="row" style="font-weight: normal;">Mozilla Firefox</th>'), '<td>Opera</td>', '<th scope="row" style="font-weight: normal;">Opera</th>'), '<td>Safari</td>', '<th scope="row" style="font-weight: normal;">Safari</th>'), '<th class="blackcolor">ÇEREZ</th>', '<th class="blackcolor" scope="col">ÇEREZ</th>'), '<th class="blackcolor">AÇIKLAMA</th>', '<th class="blackcolor" scope="col">AÇIKLAMA</th>')
 WHERE `table_name` = 'lang' AND `column_name` = 'textval' AND `locale` = 'en'
   AND `foreign_key` = (SELECT `id` FROM `lang` WHERE `key` = 'cerezpolitikasi.icerik')
   AND LOCATE('<caption', `value`) = 0 AND LOCATE('<th class="blackcolor">ÇEREZ</th>', `value`) > 0 AND (LENGTH(`value`) - LENGTH(REPLACE(`value`, '<table>', ''))) = 14;

-- 5. Mekan kapasite tablolari: sutun basliklari <th>, ekran okuyucu icin tablo adi (aria-label) (WCAG 1.3.1)
--    Ingilizce sayfalar (translations) ve yayinda olmayan 19, 20 numarali mekanlarin Turkce tablolari.
--    Basliklar kalin yazilmaz, gorunum ayni kalir.
UPDATE `translations` SET `value` = REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(`value`, '<td style="width: 348.875px;" height="30">
<div align="left">ROOM ve HALL TYPE</div>
</td>', '<th scope="col" style="font-weight: normal; width: 348.875px;" height="30">
<div align="left">ROOM ve HALL TYPE</div>
</th>'), '<td style="width: 159.875px;">
<div align="center">U TABLE LAYOUT</div>
</td>', '<th scope="col" style="font-weight: normal; width: 159.875px;">
<div align="center">U TABLE LAYOUT</div>
</th>'), '<td style="width: 303px;">
<div align="center"><span style="background-color: transparent;">AMPHITHEATRE</span> LAYOUT</div>
</td>', '<th scope="col" style="font-weight: normal; width: 303px;">
<div align="center"><span style="background-color: transparent;">AMPHITHEATRE</span> LAYOUT</div>
</th>'), '<td style="width: 269.087px;">
<div align="center">INVITATION LAYOUT</div>
</td>', '<th scope="col" style="font-weight: normal; width: 269.087px;">
<div align="center">INVITATION LAYOUT</div>
</th>'), '<table class="table" style="color: #ffffff; font-size: 12px; word-break: initial; width: 1346px; height: 209px;" border="0" cellspacing="" cellpadding="3">', '<table aria-label="Room and hall capacities by seating layout" class="table" style="color: #ffffff; font-size: 12px; word-break: initial; width: 1346px; height: 209px;" border="0" cellspacing="" cellpadding="3">')
 WHERE `table_name` = 'place' AND `column_name` = 'capacity' AND `locale` = 'en' AND `foreign_key` = 3
   AND LOCATE('<td style="width: 348.875px;" height="30">
<div align="left">ROOM ve HALL TYPE</div>
</td>', `value`) > 0;
UPDATE `translations` SET `value` = REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(`value`, '<td style="width: 241.712px;" height="30">
<div align="left">ROOM ve HALL TYPE</div>
</td>', '<th scope="col" style="font-weight: normal; width: 241.712px;" height="30">
<div align="left">ROOM ve HALL TYPE</div>
</th>'), '<td style="width: 115.338px;">
<div align="center">LENGTH</div>
</td>', '<th scope="col" style="font-weight: normal; width: 115.338px;">
<div align="center">LENGTH</div>
</th>'), '<td style="width: 112.325px;">
<div align="center">WIDTH</div>
</td>', '<th scope="col" style="font-weight: normal; width: 112.325px;">
<div align="center">WIDTH</div>
</th>'), '<td style="width: 132.387px;">
<div align="center">HEIGHT</div>
</td>', '<th scope="col" style="font-weight: normal; width: 132.387px;">
<div align="center">HEIGHT</div>
</th>'), '<td style="width: 85.25px;">
<div align="center">AREA</div>
</td>', '<th scope="col" style="font-weight: normal; width: 85.25px;">
<div align="center">AREA</div>
</th>'), '<td style="width: 107.312px;">
<div align="center">U TABLE LAYOUT</div>
</td>', '<th scope="col" style="font-weight: normal; width: 107.312px;">
<div align="center">U TABLE LAYOUT</div>
</th>'), '<td style="width: 200.587px;">
<div align="center"><span style="background-color: transparent;">AMPHITHEATRE</span> LAYOUT</div>
</td>', '<th scope="col" style="font-weight: normal; width: 200.587px;">
<div align="center"><span style="background-color: transparent;">AMPHITHEATRE</span> LAYOUT</div>
</th>'), '<td style="width: 178.575px;">
<div align="center">INVITATION LAYOUT</div>
</td>', '<th scope="col" style="font-weight: normal; width: 178.575px;">
<div align="center">INVITATION LAYOUT</div>
</th>'), '<table class="table" style="color: #ffffff; font-size: 12px; word-break: initial; width: 1350px;" border="0" cellspacing="" cellpadding="3">', '<table aria-label="Room and hall capacities by seating layout" class="table" style="color: #ffffff; font-size: 12px; word-break: initial; width: 1350px;" border="0" cellspacing="" cellpadding="3">')
 WHERE `table_name` = 'place' AND `column_name` = 'capacity' AND `locale` = 'en' AND `foreign_key` = 6
   AND LOCATE('<td style="width: 241.712px;" height="30">
<div align="left">ROOM ve HALL TYPE</div>
</td>', `value`) > 0;
UPDATE `translations` SET `value` = REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(`value`, '<td style="width: 241.712px;" height="30">
<div align="left">ROOM ve HALL TYPE</div>
</td>', '<th scope="col" style="font-weight: normal; width: 241.712px;" height="30">
<div align="left">ROOM ve HALL TYPE</div>
</th>'), '<td style="width: 115.338px;">
<div align="center">LENGTH</div>
</td>', '<th scope="col" style="font-weight: normal; width: 115.338px;">
<div align="center">LENGTH</div>
</th>'), '<td style="width: 112.325px;">
<div align="center">WIDTH</div>
</td>', '<th scope="col" style="font-weight: normal; width: 112.325px;">
<div align="center">WIDTH</div>
</th>'), '<td style="width: 132.387px;">
<div align="center">HEIGHT</div>
</td>', '<th scope="col" style="font-weight: normal; width: 132.387px;">
<div align="center">HEIGHT</div>
</th>'), '<td style="width: 85.25px;">
<div align="center">AREA</div>
</td>', '<th scope="col" style="font-weight: normal; width: 85.25px;">
<div align="center">AREA</div>
</th>'), '<td style="width: 107.312px;">
<div align="center">U TABLE LAYOUT</div>
</td>', '<th scope="col" style="font-weight: normal; width: 107.312px;">
<div align="center">U TABLE LAYOUT</div>
</th>'), '<td style="width: 200.587px;">
<div align="center"><span style="background-color: transparent;">AMPHITHEATRE </span>LAYOUT</div>
</td>', '<th scope="col" style="font-weight: normal; width: 200.587px;">
<div align="center"><span style="background-color: transparent;">AMPHITHEATRE </span>LAYOUT</div>
</th>'), '<td style="width: 178.575px;">
<div align="center">INVITATION LAYOUT</div>
</td>', '<th scope="col" style="font-weight: normal; width: 178.575px;">
<div align="center">INVITATION LAYOUT</div>
</th>'), '<table class="table" style="color: #ffffff; font-size: 12px; word-break: initial; width: 1350px; height: 96px;" border="0" cellspacing="" cellpadding="3">', '<table aria-label="Room and hall capacities by seating layout" class="table" style="color: #ffffff; font-size: 12px; word-break: initial; width: 1350px; height: 96px;" border="0" cellspacing="" cellpadding="3">')
 WHERE `table_name` = 'place' AND `column_name` = 'capacity' AND `locale` = 'en' AND `foreign_key` = 12
   AND LOCATE('<td style="width: 241.712px;" height="30">
<div align="left">ROOM ve HALL TYPE</div>
</td>', `value`) > 0;
UPDATE `translations` SET `value` = REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(`value`, '<td style="width: 295.6px; height: 32px;" height="30">
<div align="left">ROOM ve HALL TYPE</div>
</td>', '<th scope="col" style="font-weight: normal; width: 295.6px; height: 32px;" height="30">
<div align="left">ROOM ve HALL TYPE</div>
</th>'), '<td style="width: 133.5px; height: 32px;">
<div align="center">U TABLE LAYOUT</div>
</td>', '<th scope="col" style="font-weight: normal; width: 133.5px; height: 32px;">
<div align="center">U TABLE LAYOUT</div>
</th>'), '<td style="width: 235.15px; height: 32px;">
<div align="center"><span style="background-color: #878ba9;">COCTAIL LAYOUT</span></div>
</td>', '<th scope="col" style="font-weight: normal; width: 235.15px; height: 32px;">
<div align="center"><span style="background-color: #878ba9;">COCTAIL LAYOUT</span></div>
</th>'), '<td style="width: 245.8px; height: 32px;">
<div align="center"><span style="background-color: transparent;">AMPHITHEATRE</span> LAYOUT</div>
</td>', '<th scope="col" style="font-weight: normal; width: 245.8px; height: 32px;">
<div align="center"><span style="background-color: transparent;">AMPHITHEATRE</span> LAYOUT</div>
</th>'), '<td style="width: 220.15px; height: 32px;">
<div align="center">INVITATION LAYOUT</div>
</td>', '<th scope="col" style="font-weight: normal; width: 220.15px; height: 32px;">
<div align="center">INVITATION LAYOUT</div>
</th>'), '<table class="table" style="color: #ffffff; font-size: 12px; word-break: initial; width: 1640px; height: 160px;" border="0" cellspacing="" cellpadding="3">', '<table aria-label="Room and hall capacities by seating layout" class="table" style="color: #ffffff; font-size: 12px; word-break: initial; width: 1640px; height: 160px;" border="0" cellspacing="" cellpadding="3">')
 WHERE `table_name` = 'place' AND `column_name` = 'capacity' AND `locale` = 'en' AND `foreign_key` = 17
   AND LOCATE('<td style="width: 295.6px; height: 32px;" height="30">
<div align="left">ROOM ve HALL TYPE</div>
</td>', `value`) > 0;
UPDATE `translations` SET `value` = REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(`value`, '<td style="width: 322.4px; height: 32px;" height="30">
<div align="left">ROOM ve HALL TYPE</div>
</td>', '<th scope="col" style="font-weight: normal; width: 322.4px; height: 32px;" height="30">
<div align="left">ROOM ve HALL TYPE</div>
</th>'), '<td style="width: 139.575px; height: 32px;">
<div align="center">I TABLE LAYOUT</div>
</td>', '<th scope="col" style="font-weight: normal; width: 139.575px; height: 32px;">
<div align="center">I TABLE LAYOUT</div>
</th>'), '<td style="width: 143.7px; height: 32px;">
<div align="center">U TABLE LAYOUT</div>
</td>', '<th scope="col" style="font-weight: normal; width: 143.7px; height: 32px;">
<div align="center">U TABLE LAYOUT</div>
</th>'), '<td style="width: 267.538px; height: 32px;">
<div align="center"><span style="background-color: transparent;">AMPHITHEATRE</span> LAYOUT</div>
</td>', '<th scope="col" style="font-weight: normal; width: 267.538px; height: 32px;">
<div align="center"><span style="background-color: transparent;">AMPHITHEATRE</span> LAYOUT</div>
</th>'), '<td style="width: 239.238px; height: 32px;">
<div align="center">INVITATION LAYOUT</div>
</td>', '<th scope="col" style="font-weight: normal; width: 239.238px; height: 32px;">
<div align="center">INVITATION LAYOUT</div>
</th>'), '<table class="table" style="color: #ffffff; font-size: 12px; word-break: initial; width: 1500px; height: 160px;" border="0" cellspacing="" cellpadding="3">', '<table aria-label="Room and hall capacities by seating layout" class="table" style="color: #ffffff; font-size: 12px; word-break: initial; width: 1500px; height: 160px;" border="0" cellspacing="" cellpadding="3">')
 WHERE `table_name` = 'place' AND `column_name` = 'capacity' AND `locale` = 'en' AND `foreign_key` = 18
   AND LOCATE('<td style="width: 322.4px; height: 32px;" height="30">
<div align="left">ROOM ve HALL TYPE</div>
</td>', `value`) > 0;
UPDATE `translations` SET `value` = REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(`value`, '<td style="width: 360.525px; height: 32px;" height="30">
<div align="left">ROOM ve HALL TYPE</div>
</td>', '<th scope="col" style="font-weight: normal; width: 360.525px; height: 32px;" height="30">
<div align="left">ROOM ve HALL TYPE</div>
</th>'), '<td style="width: 158.95px; height: 32px;">
<div align="center">U TABLE LAYOUT</div>
</td>', '<th scope="col" style="font-weight: normal; width: 158.95px; height: 32px;">
<div align="center">U TABLE LAYOUT</div>
</th>'), '<td style="width: 298.525px; height: 32px;">
<div align="center"><span style="background-color: transparent;">AMPHITHEATRE</span> LAYOUT</div>
</td>', '<th scope="col" style="font-weight: normal; width: 298.525px; height: 32px;">
<div align="center"><span style="background-color: transparent;">AMPHITHEATRE</span> LAYOUT</div>
</th>'), '<td style="width: 266.013px; height: 32px;">
<div align="center">INVITATION LAYOUT</div>
</td>', '<th scope="col" style="font-weight: normal; width: 266.013px; height: 32px;">
<div align="center">INVITATION LAYOUT</div>
</th>'), '<table class="table" style="color: #ffffff; font-size: 12px; word-break: initial; width: 1345px; height: 96px;" border="0" cellspacing="" cellpadding="3">', '<table aria-label="Room and hall capacities by seating layout" class="table" style="color: #ffffff; font-size: 12px; word-break: initial; width: 1345px; height: 96px;" border="0" cellspacing="" cellpadding="3">')
 WHERE `table_name` = 'place' AND `column_name` = 'capacity' AND `locale` = 'en' AND `foreign_key` = 19
   AND LOCATE('<td style="width: 360.525px; height: 32px;" height="30">
<div align="left">ROOM ve HALL TYPE</div>
</td>', `value`) > 0;
UPDATE `place` SET `capacity` = REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(`capacity`, '<td style="width: 360.525px; height: 32px;" height="30">
<div align="left">ODA ve SALON TİPİ</div>
</td>', '<th scope="col" style="font-weight: normal; width: 360.525px; height: 32px;" height="30">
<div align="left">ODA ve SALON TİPİ</div>
</th>'), '<td style="width: 158.95px; height: 32px;">
<div align="center">U MASA</div>
</td>', '<th scope="col" style="font-weight: normal; width: 158.95px; height: 32px;">
<div align="center">U MASA</div>
</th>'), '<td style="width: 298.525px; height: 32px;">
<div align="center">TİYATRO DÜZENİ</div>
</td>', '<th scope="col" style="font-weight: normal; width: 298.525px; height: 32px;">
<div align="center">TİYATRO DÜZENİ</div>
</th>'), '<td style="width: 266.013px; height: 32px;">
<div align="center">DAVET DÜZENİ</div>
</td>', '<th scope="col" style="font-weight: normal; width: 266.013px; height: 32px;">
<div align="center">DAVET DÜZENİ</div>
</th>'), '<table class="table" style="color: #ffffff; font-size: 12px; word-break: initial; width: 1345px; height: 128px;" border="0" cellspacing="" cellpadding="3">', '<table aria-label="Oturma düzenine göre oda ve salon kapasiteleri" class="table" style="color: #ffffff; font-size: 12px; word-break: initial; width: 1345px; height: 128px;" border="0" cellspacing="" cellpadding="3">')
 WHERE `id` = 19 AND LOCATE('<td style="width: 360.525px; height: 32px;" height="30">
<div align="left">ODA ve SALON TİPİ</div>
</td>', `capacity`) > 0;
UPDATE `translations` SET `value` = REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(`value`, '<td style="width: 359.612px; height: 32px;" height="30">
<div align="left">ROOM ve HALL TYPE</div>
</td>', '<th scope="col" style="font-weight: normal; width: 359.612px; height: 32px;" height="30">
<div align="left">ROOM ve HALL TYPE</div>
</th>'), '<td style="width: 158.9px; height: 32px;">
<div align="center">U TABLE LAYOUT</div>
</td>', '<th scope="col" style="font-weight: normal; width: 158.9px; height: 32px;">
<div align="center">U TABLE LAYOUT</div>
</th>'), '<td style="width: 298.05px; height: 32px;">
<div align="center"><span style="background-color: transparent;">AMPHITHEATRE</span> LAYOUT</div>
</td>', '<th scope="col" style="font-weight: normal; width: 298.05px; height: 32px;">
<div align="center"><span style="background-color: transparent;">AMPHITHEATRE</span> LAYOUT</div>
</th>'), '<td style="width: 265.675px; height: 32px;">
<div align="center">INVITATION LAYOUT</div>
</td>', '<th scope="col" style="font-weight: normal; width: 265.675px; height: 32px;">
<div align="center">INVITATION LAYOUT</div>
</th>'), '<table class="table" style="color: #ffffff; font-size: 12px; word-break: initial; width: 1343px; height: 107px;" border="0" cellspacing="" cellpadding="3">', '<table aria-label="Room and hall capacities by seating layout" class="table" style="color: #ffffff; font-size: 12px; word-break: initial; width: 1343px; height: 107px;" border="0" cellspacing="" cellpadding="3">')
 WHERE `table_name` = 'place' AND `column_name` = 'capacity' AND `locale` = 'en' AND `foreign_key` = 20
   AND LOCATE('<td style="width: 359.612px; height: 32px;" height="30">
<div align="left">ROOM ve HALL TYPE</div>
</td>', `value`) > 0;
UPDATE `place` SET `capacity` = REPLACE(REPLACE(REPLACE(REPLACE(REPLACE(`capacity`, '<td style="width: 359.612px; height: 32px;" height="30">
<div align="left">ODA ve SALON TİPİ</div>
</td>', '<th scope="col" style="font-weight: normal; width: 359.612px; height: 32px;" height="30">
<div align="left">ODA ve SALON TİPİ</div>
</th>'), '<td style="width: 158.9px; height: 32px;">
<div align="center">U MASA</div>
</td>', '<th scope="col" style="font-weight: normal; width: 158.9px; height: 32px;">
<div align="center">U MASA</div>
</th>'), '<td style="width: 298.05px; height: 32px;">
<div align="center">TİYATRO DÜZENİ</div>
</td>', '<th scope="col" style="font-weight: normal; width: 298.05px; height: 32px;">
<div align="center">TİYATRO DÜZENİ</div>
</th>'), '<td style="width: 265.675px; height: 32px;">
<div align="center">DAVET DÜZENİ</div>
</td>', '<th scope="col" style="font-weight: normal; width: 265.675px; height: 32px;">
<div align="center">DAVET DÜZENİ</div>
</th>'), '<table class="table" style="color: #ffffff; font-size: 12px; word-break: initial; width: 1343px; height: 107px;" border="0" cellspacing="" cellpadding="3">', '<table aria-label="Oturma düzenine göre oda ve salon kapasiteleri" class="table" style="color: #ffffff; font-size: 12px; word-break: initial; width: 1343px; height: 107px;" border="0" cellspacing="" cellpadding="3">')
 WHERE `id` = 20 AND LOCATE('<td style="width: 359.612px; height: 32px;" height="30">
<div align="left">ODA ve SALON TİPİ</div>
</td>', `capacity`) > 0;

-- 6. Gizlilik politikasi: son baslik (h2) alt basliklardan (h4) sonra geliyordu; sira duzeltildi (WCAG 1.3.1)
--    as-h2 sinifi eski gorunumu korur.
UPDATE `lang` SET `textval` = REPLACE(`textval`, '<h2 class="p-0 m-0 mb-2 fontsize20">"Veri sahibi Başvuru Formu" nu aşağıdan indirebilirsiniz.</h2>', '<h4 class="as-h2 p-0 m-0 mb-2 fontsize20">"Veri sahibi Başvuru Formu" nu aşağıdan indirebilirsiniz.</h4>')
 WHERE `key` = 'gizlilikpolitikasi.icerik' AND LOCATE('<h2 class="p-0 m-0 mb-2 fontsize20">"Veri sahibi Başvuru Formu" nu aşağıdan indirebilirsiniz.</h2>', `textval`) > 0;
UPDATE `translations` SET `value` = REPLACE(`value`, '<h2 class="p-0 m-0 mb-2 fontsize20">"Veri sahibi Başvuru Formu" nu aşağıdan indirebilirsiniz.</h2>', '<h4 class="as-h2 p-0 m-0 mb-2 fontsize20">"Veri sahibi Başvuru Formu" nu aşağıdan indirebilirsiniz.</h4>')
 WHERE `table_name` = 'lang' AND `column_name` = 'textval' AND `locale` = 'en'
   AND `foreign_key` = (SELECT `id` FROM `lang` WHERE `key` = 'gizlilikpolitikasi.icerik')
   AND LOCATE('<h2 class="p-0 m-0 mb-2 fontsize20">"Veri sahibi Başvuru Formu" nu aşağıdan indirebilirsiniz.</h2>', `value`) > 0;

-- 7. Kalin yazilar anlamli etiketle: <b> yerine <strong> (WCAG 1.3.1). Gorunum ayni (ikisi de font-weight: 600).
--    Nitelikli <b ...> iceren satirlara (kayan yazi animasyonu) dokunulmaz.
UPDATE `lang` SET `textval` = REPLACE(REPLACE(`textval`, '<b>', '<strong>'), '</b>', '</strong>') WHERE LOCATE('<b>', `textval`) > 0 AND `textval` NOT REGEXP '<b[[:space:]]';
UPDATE `langgroup` SET `content` = REPLACE(REPLACE(`content`, '<b>', '<strong>'), '</b>', '</strong>') WHERE LOCATE('<b>', `content`) > 0 AND `content` NOT REGEXP '<b[[:space:]]';
UPDATE `langgroup` SET `contenthtml` = REPLACE(REPLACE(`contenthtml`, '<b>', '<strong>'), '</b>', '</strong>') WHERE LOCATE('<b>', `contenthtml`) > 0 AND `contenthtml` NOT REGEXP '<b[[:space:]]';
UPDATE `news` SET `explanation` = REPLACE(REPLACE(`explanation`, '<b>', '<strong>'), '</b>', '</strong>') WHERE LOCATE('<b>', `explanation`) > 0 AND `explanation` NOT REGEXP '<b[[:space:]]';
UPDATE `blog` SET `explanation` = REPLACE(REPLACE(`explanation`, '<b>', '<strong>'), '</b>', '</strong>') WHERE LOCATE('<b>', `explanation`) > 0 AND `explanation` NOT REGEXP '<b[[:space:]]';
UPDATE `translations` SET `value` = REPLACE(REPLACE(`value`, '<b>', '<strong>'), '</b>', '</strong>')
 WHERE `table_name` IN ('lang', 'langgroup', 'news', 'blog') AND LOCATE('<b>', `value`) > 0 AND `value` NOT REGEXP '<b[[:space:]]';

COMMIT;

-- =====================================================================
-- KONTROL: her satirda sonuc 'ok' olmali
-- =====================================================================
SELECT '1 slider alt (TR/EN)' AS kontrol, IF(COUNT(*) = 1, 'ok', 'KONTROL EDIN') AS sonuc FROM `homeslider` WHERE `id` = 86 AND `alt` <> '' AND `alten` <> ''
UNION ALL SELECT '2 sayfa basliklari', IF(COUNT(*) = 3, 'ok', 'KONTROL EDIN') FROM `langgroup` WHERE (`slug` = '/' AND `metatitle` LIKE 'BELTUR - %') OR (`slug` = 'surdurulebilirlik' AND `metatitle` = 'BELTUR - Sürdürülebilirlik') OR (`slug` = 'politikalar' AND `metatitle` = 'BELTUR - Politikalar')
UNION ALL SELECT '3 aydinlatma tablosu', IF(COUNT(*) = 1, 'ok', 'KONTROL EDIN') FROM `lang` WHERE `key` = 'aydinlatmametni.aydinlatma-metni1-icerik' AND LOCATE('aria-label="Kişisel veri', `textval`) > 0 AND LOCATE('<th scope="col"', `textval`) > 0
UNION ALL SELECT '4 cerez tablolari', IF(COUNT(*) = 1, 'ok', 'KONTROL EDIN') FROM `lang` WHERE `key` = 'cerezpolitikasi.icerik' AND (LENGTH(`textval`) - LENGTH(REPLACE(`textval`, '<caption', ''))) = 16 AND LOCATE('<th scope="row"', `textval`) > 0
UNION ALL SELECT '5 kapasite tablolari (EN)', IF(COUNT(*) = 7, 'ok', 'KONTROL EDIN') FROM `translations` WHERE `table_name` = 'place' AND `column_name` = 'capacity' AND `locale` = 'en' AND `foreign_key` IN (3, 6, 12, 17, 18, 19, 20) AND LOCATE('<table aria-label=', `value`) > 0 AND LOCATE('<th scope="col"', `value`) > 0
UNION ALL SELECT '6 gizlilik basliklari', IF(COUNT(*) = 1, 'ok', 'KONTROL EDIN') FROM `lang` WHERE `key` = 'gizlilikpolitikasi.icerik' AND LOCATE('<h4 class="as-h2', `textval`) > 0 AND LOCATE('<h2 ', `textval`) = 0
UNION ALL SELECT '7 kalan <b> (nitelikli olanlar haric)', IF(COUNT(*) = 0, 'ok', 'KONTROL EDIN') FROM `lang` WHERE LOCATE('<b>', `textval`) > 0 AND `textval` NOT REGEXP '<b[[:space:]]';
