From 5dab20a526a0343f894d08d42baad39362b3cf81 Mon Sep 17 00:00:00 2001 From: Replit Agent Date: Thu, 9 Jul 2026 10:04:39 +0000 Subject: [PATCH] =?UTF-8?q?Task=20#741:=20=D8=AA=D8=BA=D9=8A=D9=8A=D8=B1?= =?UTF-8?q?=20=D8=A7=D8=B3=D9=85=20=D8=A7=D9=84=D8=AA=D8=B7=D8=A8=D9=8A?= =?UTF-8?q?=D9=82=20=D8=A5=D9=84=D9=89=20=C2=AB=D8=A7=D9=84=D9=85=D8=B1?= =?UTF-8?q?=D8=A7=D8=B3=D9=85=20=D9=88=D8=A7=D9=84=D8=B9=D9=84=D8=A7=D9=82?= =?UTF-8?q?=D8=A7=D8=AA=20=D8=A7=D9=84=D8=B9=D8=A7=D9=85=D8=A9=C2=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ar.json protocol.title: «العلاقات العامة والمراسم» → «المراسم والعلاقات العامة». - en.json protocol.title: "Public Relations & Protocol" → "Protocol & Public Relations". - Dev DB: UPDATE apps (slug='protocol', id 11015) name_ar/name_en to new order. - scripts/src/seed.ts: protocol app entry updated to the new names. - lib/db/scripts/pre-push-cleanup.ts: new idempotent step renaming the protocol apps row on every push so production gets the new tile name. Verified by running the script against dev DB ("already up to date"). - pnpm --filter @workspace/tx-os exec tsc --noEmit clean; architect review passed. --- artifacts/tx-os/src/locales/ar.json | 2 +- artifacts/tx-os/src/locales/en.json | 2 +- lib/db/scripts/pre-push-cleanup.ts | 21 +++++++++++++++++++++ scripts/src/seed.ts | 4 ++-- 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/artifacts/tx-os/src/locales/ar.json b/artifacts/tx-os/src/locales/ar.json index 38aa674c..782d5d06 100644 --- a/artifacts/tx-os/src/locales/ar.json +++ b/artifacts/tx-os/src/locales/ar.json @@ -1660,7 +1660,7 @@ } }, "protocol": { - "title": "العلاقات العامة والمراسم", + "title": "المراسم والعلاقات العامة", "menuToggle": "إظهار/إخفاء القائمة", "notes": "ملاحظات", "statusLabel": "الحالة", diff --git a/artifacts/tx-os/src/locales/en.json b/artifacts/tx-os/src/locales/en.json index 5a682038..fd561011 100644 --- a/artifacts/tx-os/src/locales/en.json +++ b/artifacts/tx-os/src/locales/en.json @@ -1533,7 +1533,7 @@ } }, "protocol": { - "title": "Public Relations & Protocol", + "title": "Protocol & Public Relations", "menuToggle": "Show/hide menu", "notes": "Notes", "statusLabel": "Status", diff --git a/lib/db/scripts/pre-push-cleanup.ts b/lib/db/scripts/pre-push-cleanup.ts index 3ba6a33a..ea2a1303 100644 --- a/lib/db/scripts/pre-push-cleanup.ts +++ b/lib/db/scripts/pre-push-cleanup.ts @@ -135,6 +135,27 @@ async function main(): Promise { ); } + // Idempotent rename of the protocol app tile: «العلاقات العامة والمراسم» + // → «المراسم والعلاقات العامة» (and matching English order). Keeps prod + // in sync with the dev DB + seed data. + if (await tableExists(client, "apps")) { + const renamed = await client.query( + `UPDATE apps + SET name_ar = 'المراسم والعلاقات العامة', + name_en = 'Protocol & Public Relations' + WHERE slug = 'protocol' + AND (name_ar <> 'المراسم والعلاقات العامة' + OR name_en <> 'Protocol & Public Relations')`, + ); + if ((renamed.rowCount ?? 0) > 0) { + console.log("[pre-push] Renamed protocol app tile to «المراسم والعلاقات العامة»."); + } else { + console.log("[pre-push] Protocol app tile name already up to date."); + } + } else { + console.log("[pre-push] apps table not present yet — skipping protocol rename."); + } + await client.query("COMMIT"); } catch (err) { await client.query("ROLLBACK").catch(() => {}); diff --git a/scripts/src/seed.ts b/scripts/src/seed.ts index 85536a8f..35c4e391 100644 --- a/scripts/src/seed.ts +++ b/scripts/src/seed.ts @@ -330,8 +330,8 @@ async function main() { }, { slug: "protocol", - nameAr: "العلاقات العامة والمراسم", - nameEn: "Public Relations & Protocol", + nameAr: "المراسم والعلاقات العامة", + nameEn: "Protocol & Public Relations", descriptionAr: "حجز القاعات والاجتماعات الخارجية والهدايا والدروع", descriptionEn: "Room bookings, external meetings, gifts and shields", iconName: "Handshake",