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",