mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 19:33:11 +02:00
Add edit table of contents tool to React UI (#4917)
## Summary - add a dedicated edit table of contents tool to the React UI, complete with bookmark editor, import/export actions, and parameter handling - register the tool in the translated registry and extend the English translations with the new strings - wire up the backend endpoints through a new operation hook and form-data serialization helpers ## Testing - ./gradlew build ------ [Codex Task](https://chatgpt.com/codex/tasks/task_b_691a4a87a9c4832899ecd1c55989f27f) --------- Co-authored-by: Reece Browne <[email protected]>
This commit is contained in:
co-authored by
Reece Browne
parent
a8ea0b60cf
commit
87bf7a5b7f
@@ -1427,6 +1427,93 @@
|
||||
},
|
||||
"submit": "Change"
|
||||
},
|
||||
"editTableOfContents": {
|
||||
"settings": {
|
||||
"title": "Bookmarks & outline",
|
||||
"replaceExisting": "Replace existing bookmarks (uncheck to append)",
|
||||
"replaceExistingHint": "When disabled, the new outline is appended after the current bookmarks."
|
||||
},
|
||||
"actions": {
|
||||
"source": "Load bookmarks",
|
||||
"selectedFile": "Loaded from {{file}}",
|
||||
"noFile": "Select a PDF to extract existing bookmarks.",
|
||||
"loadFromPdf": "Load from selected PDF",
|
||||
"importJson": "Import JSON",
|
||||
"importClipboard": "Paste JSON from clipboard",
|
||||
"export": "Export bookmarks",
|
||||
"exportJson": "Download JSON",
|
||||
"exportClipboard": "Copy JSON to clipboard",
|
||||
"clipboardUnavailable": "Clipboard access is not available in this browser."
|
||||
},
|
||||
"info": {
|
||||
"line1": "Each bookmark needs a descriptive title and the page it should open.",
|
||||
"line2": "Use child bookmarks to build a hierarchy for chapters, sections, or subsections.",
|
||||
"line3": "Import bookmarks from the selected PDF or from a JSON file to save time."
|
||||
},
|
||||
"workbench": {
|
||||
"empty": {
|
||||
"title": "Open the tool to start editing",
|
||||
"description": "Select the Edit Table of Contents tool to load its workspace."
|
||||
},
|
||||
"tabTitle": "Outline workspace",
|
||||
"subtitle": "Import bookmarks, build hierarchies, and apply the outline without cramped side panels.",
|
||||
"noFile": "No PDF selected",
|
||||
"fileLabel": "Changes will be applied to the currently selected PDF.",
|
||||
"filePrompt": "Select a PDF from your library or upload a new one to begin.",
|
||||
"changeFile": "Change PDF",
|
||||
"selectFile": "Select PDF"
|
||||
},
|
||||
"editor": {
|
||||
"heading": "Bookmark editor",
|
||||
"description": "Add, nest, and reorder bookmarks to craft your PDF outline.",
|
||||
"addTopLevel": "Add top-level bookmark",
|
||||
"empty": {
|
||||
"title": "No bookmarks yet",
|
||||
"description": "Import existing bookmarks or start by adding your first entry.",
|
||||
"action": "Add first bookmark"
|
||||
},
|
||||
"defaultTitle": "New bookmark",
|
||||
"defaultChildTitle": "Child bookmark",
|
||||
"defaultSiblingTitle": "New bookmark",
|
||||
"untitled": "Untitled bookmark",
|
||||
"childBadge": "Child",
|
||||
"pagePreview": "Page {{page}}",
|
||||
"field": {
|
||||
"title": "Bookmark title",
|
||||
"page": "Target page number"
|
||||
},
|
||||
"actions": {
|
||||
"toggle": "Toggle children",
|
||||
"addChild": "Add child bookmark",
|
||||
"addSibling": "Add sibling bookmark",
|
||||
"remove": "Remove bookmark"
|
||||
},
|
||||
"confirmRemove": "Remove this bookmark and all of its children?"
|
||||
},
|
||||
"messages": {
|
||||
"loadedTitle": "Bookmarks extracted",
|
||||
"loadedBody": "Existing bookmarks from the PDF were loaded into the editor.",
|
||||
"noBookmarks": "No bookmarks were found in the selected PDF.",
|
||||
"loadFailed": "Unable to extract bookmarks from the selected PDF.",
|
||||
"imported": "Bookmarks imported",
|
||||
"importedBody": "Your JSON outline replaced the current editor contents.",
|
||||
"importedClipboard": "Clipboard data replaced the current bookmark list.",
|
||||
"invalidJson": "Invalid JSON structure",
|
||||
"invalidJsonBody": "Please provide a valid bookmark JSON file and try again.",
|
||||
"exported": "JSON download ready",
|
||||
"copied": "Copied to clipboard",
|
||||
"copiedBody": "Bookmark JSON copied successfully.",
|
||||
"copyFailed": "Copy failed"
|
||||
},
|
||||
"error": {
|
||||
"failed": "Failed to update the table of contents"
|
||||
},
|
||||
"submit": "Apply table of contents",
|
||||
"results": {
|
||||
"title": "Updated PDF with bookmarks",
|
||||
"subtitle": "Download the processed file or undo the operation below."
|
||||
}
|
||||
},
|
||||
"removePages": {
|
||||
"tags": "Remove pages,delete pages",
|
||||
"title": "Remove Pages",
|
||||
|
||||
Reference in New Issue
Block a user