Task #741: تغيير اسم التطبيق إلى «المراسم والعلاقات العامة»

- 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.
This commit is contained in:
Replit Agent
2026-07-09 10:04:39 +00:00
parent 93f0fae94b
commit 5dab20a526
4 changed files with 25 additions and 4 deletions
+21
View File
@@ -135,6 +135,27 @@ async function main(): Promise<void> {
);
}
// 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(() => {});