- revisions (a work's Divan text, summary, status, author/reviewer/publisher, the text it started from) and revision_events (who did what, with comments): the review thread and the moderation log. - API (api/src/moderation.ts): what a moderator may do on a work, queue, drafts (one open draft per person and work), save, submit, approve, return/reject (reason required), publish; history; log. Rules come from the IAM grants: L2 drafts, an L1 covering the work reviews, an admin publishes; L1 drafts go to the admin, admin drafts publish directly. Publishing numbers the version, writes it to divan-data (owned.ts) and updates the site; a draft based on an older version is refused (409). - Line diff (api/src/diff.ts) against the text a draft started from. - Site: ترمیم کریں / تاریخچہ on works, /mod (queue, activity log), /mod/rev/<id> (editor with the Urdu keyboard and Roman typing, diff, preview, actions, timeline), /mod/work/<id> (versions). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
10 lines
705 B
TypeScript
10 lines
705 B
TypeScript
// Urdu labels for moderation (api/src/moderation.ts)
|
|
export const STATUS: Record<string, string> = {
|
|
draft: 'مسودہ', submitted: 'جائزے کا منتظر', approved: 'منظور شدہ، اشاعت کا منتظر', published: 'شائع شدہ', returned: 'واپس بھیجا گیا', rejected: 'مسترد',
|
|
};
|
|
export const EVENT: Record<string, string> = {
|
|
created: 'مسودہ بنایا', saved: 'محفوظ کیا', submitted: 'جائزے کے لیے بھیجا', approved: 'منظور کیا', returned: 'واپس بھیجا',
|
|
rejected: 'مسترد کیا', published: 'شائع کیا',
|
|
};
|
|
export const when = (d: string) => new Date(d).toISOString().slice(0, 16).replace('T', ' ');
|