dorfteich/packages/shared/i18n/en/editor.json
Claude Opus 4.8 fa7ae033b5
All checks were successful
CD / Build and push images (push) Successful in 2m58s
CI / Lint, typecheck, test (push) Successful in 1m55s
CI / Auth e2e pack (push) Successful in 2m25s
CI / Build container images (push) Has been skipped
CD / Deploy to Test (push) Successful in 9s
CD / Smoke tests against Test (push) Successful in 1m12s
CD / Promote to Int (push) Successful in 11s
Add permission-revocation handling for live and offline sessions (#39)
Revoking write access must terminate live sessions and let a user with
pending offline edits export them rather than lose them silently.

Backend (generic, reused by M5 grants #53):
- packages/shared: POND_ACCESS_CHANGED_CHANNEL, the LISTEN/NOTIFY channel
  shared by api and collab.
- api: PondAccessNotifier emits pg_notify(pond_access_changed, pondId) on
  a permission-relevant change; the single generic seam for revocation.
  Wired into pond soft-delete as the interim trigger (see==modify until
  #53).
- collab: a dedicated-connection LISTEN listener (LISTEN is connection-
  bound, not pooled) that, on a notification, closes every open connection
  to the pond's open pages. Clients then reconnect and the api re-issues a
  token reflecting current access (downgrade to ro, or 403/404). Reconnects
  and re-LISTENs if its connection drops.

Frontend:
- use-collab-provider: a refused token (403/404) on (re)connect sets
  accessRevoked and stops the reconnect loop; exposes discardLocal.
- AccessRevokedDialog: keeps local content visible and offers Markdown
  copy/download (derived from the live editor doc, so offline edits are
  included) and an explicit discard that clears IndexedDB. de+en strings.

Tests: collab DB-backed integration test proves a direct NOTIFY closes a
live session within seconds (AC1) and leaves unrelated ponds untouched;
listener unit tests; api test asserts soft-delete fires the notifier;
web test for the export Markdown derivation.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PGdhRiwU1WRL4XxJfZYipY
2026-07-09 07:01:46 +02:00

112 lines
3.5 KiB
JSON

{
"title": {
"placeholder": "Untitled page"
},
"mode": {
"edit": "Edit",
"view": "Read",
"toggleToEdit": "Switch to edit mode",
"toggleToView": "Switch to read mode"
},
"connection": {
"connecting": "Connecting …",
"connected": "Live",
"reconnecting": "Reconnecting …",
"offline": "Offline — your changes will sync when you reconnect"
},
"readOnly": {
"notice": "You have read-only access to this page, so you can't edit it."
},
"tooLarge": {
"notice": "This page has reached its maximum size, so your latest change wasn't saved. Please remove some content."
},
"presence": {
"label": "{{count}} people on this page",
"viewer": "{{name}} (read-only)"
},
"offline": {
"localOnly": "This page has changes saved only on this device. They'll sync automatically when you're back online."
},
"accessRevoked": {
"title": "Your edit permission was removed",
"description": "You can no longer edit this page. Your unsaved changes are still on this device — export them before you leave, as they won't be saved to the server.",
"copy": "Copy as Markdown",
"copied": "Copied!",
"copyFailed": "Copy failed",
"download": "Download as Markdown",
"discard": "Discard my changes",
"discardConfirm": "Discard the changes saved on this device? This cannot be undone."
},
"toolbar": {
"paragraph": "Paragraph",
"heading1": "Heading 1",
"heading2": "Heading 2",
"heading3": "Heading 3",
"heading4": "Heading 4",
"bold": "Bold",
"italic": "Italic",
"code": "Inline code",
"strikethrough": "Strikethrough",
"bulletList": "Bullet list",
"orderedList": "Numbered list",
"taskList": "Task list",
"blockquote": "Quote",
"codeBlock": "Code block",
"horizontalRule": "Horizontal rule",
"image": "Insert image",
"undo": "Undo",
"redo": "Redo",
"link": {
"add": "Add link",
"edit": "Edit URL",
"remove": "Remove link",
"openNewTab": "Open in new tab",
"urlLabel": "Link URL",
"apply": "Apply",
"cancel": "Cancel",
"invalidProtocol": "This link type is not allowed."
},
"table": {
"insert": "Insert table",
"addColumnBefore": "Add column before",
"addColumnAfter": "Add column after",
"deleteColumn": "Delete column",
"addRowBefore": "Add row before",
"addRowAfter": "Add row after",
"deleteRow": "Delete row",
"toggleHeaderRow": "Toggle header row",
"deleteTable": "Delete table"
}
},
"image": {
"uploading": "Uploading image …",
"uploadFailed": "Image upload failed",
"altLabel": "Alt text",
"widthLabel": "Image width",
"width": {
"small": "Small",
"medium": "Medium",
"full": "Full"
}
},
"page": {
"copyMarkdown": "Copy as Markdown",
"markdownCopied": "Copied!",
"markdownCopyFailed": "Copy failed",
"downloadMarkdown": "Download as Markdown",
"delete": "Move to trash",
"deleteConfirm": "Move this page to the trash? You can restore it from the pond's trash view."
},
"trash": {
"link": "Trash",
"title": "Trash — {{pond}}",
"empty": "The trash is empty.",
"deletedAt": "Deleted {{date}}",
"restore": "Restore",
"purge": "Delete forever",
"purgeConfirm": "Permanently delete this page and its files? This cannot be undone.",
"pageTrashedHint": "This page has been moved to the trash.",
"restoreLink": "View in trash"
}
}