Skip to content

#1 PDF Application on GitHub that lets you edit PDFs on any device anywhere

Rename viewer Toggle Bookmarks control to Table of Contents (#6599)

Matt Van Horn1bb5a12cb3f1
diff --git a/frontend/editor/public/locales/en-GB/translation.toml b/frontend/editor/public/locales/en-GB/translation.toml
index 6ba65ffd44..ac8abb5e80 100644
--- a/frontend/editor/public/locales/en-GB/translation.toml
+++ b/frontend/editor/public/locales/en-GB/translation.toml
@@ -13519,7 +13519,7 @@ showFewerTools = "Collapse toolbar"
showToolbar = "Show toolbar"
toggleAnnotations = "Toggle Annotations Visibility"
toggleAttachments = "Toggle Attachments"
-toggleBookmarks = "Toggle Bookmarks"
+toggleBookmarks = "Bookmarks (Table of Contents)"
toggleComments = "Comments"
toggleLayers = "Toggle Layers"
toggleSidebar = "Toggle Sidebar"
diff --git a/frontend/editor/public/locales/en-US/translation.toml b/frontend/editor/public/locales/en-US/translation.toml
index d12bd5b757..8e091964e4 100644
--- a/frontend/editor/public/locales/en-US/translation.toml
+++ b/frontend/editor/public/locales/en-US/translation.toml
@@ -13661,7 +13661,7 @@ showFewerTools = "Collapse toolbar"
showToolbar = "Show toolbar"
toggleAnnotations = "Toggle Annotations Visibility"
toggleAttachments = "Toggle Attachments"
-toggleBookmarks = "Toggle Bookmarks"
+toggleBookmarks = "Bookmarks (Table of Contents)"
toggleComments = "Comments"
toggleLayers = "Toggle Layers"
toggleSidebar = "Toggle Sidebar"
diff --git a/frontend/editor/src/core/components/viewer/useViewerWorkbenchBarButtons.tsx b/frontend/editor/src/core/components/viewer/useViewerWorkbenchBarButtons.tsx
index 31f8c0c88e..8acfff9fe7 100644
--- a/frontend/editor/src/core/components/viewer/useViewerWorkbenchBarButtons.tsx
+++ b/frontend/editor/src/core/components/viewer/useViewerWorkbenchBarButtons.tsx
@@ -110,7 +110,10 @@ export function useViewerWorkbenchBarButtons(
const rotateLeftLabel = t("workbenchBar.rotateLeft", "Rotate Left");
const rotateRightLabel = t("workbenchBar.rotateRight", "Rotate Right");
const sidebarLabel = t("workbenchBar.toggleSidebar", "Toggle Sidebar");
- const bookmarkLabel = t("workbenchBar.toggleBookmarks", "Toggle Bookmarks");
+ const bookmarkLabel = t(
+ "workbenchBar.toggleBookmarks",
+ "Bookmarks (Table of Contents)",
+ );
const attachmentLabel = t(
"workbenchBar.toggleAttachments",
"Toggle Attachments",
diff --git a/frontend/editor/src/core/tests/live/viewer-sidebar-add-buttons.spec.ts b/frontend/editor/src/core/tests/live/viewer-sidebar-add-buttons.spec.ts
index a2e2c9c7e3..12f3acfb29 100644
--- a/frontend/editor/src/core/tests/live/viewer-sidebar-add-buttons.spec.ts
+++ b/frontend/editor/src/core/tests/live/viewer-sidebar-add-buttons.spec.ts
@@ -139,7 +139,7 @@ test.describe("Viewer sidebar add buttons - real PDF round-trip", () => {
const viewerUrl = page.url();
await page
- .getByRole("button", { name: /Toggle Bookmarks/i })
+ .getByRole("button", { name: /Bookmarks \(Table of Contents\)/i })
.first()
.click();
diff --git a/frontend/editor/src/core/tests/stubbed/viewer-sidebar-add-buttons.spec.ts b/frontend/editor/src/core/tests/stubbed/viewer-sidebar-add-buttons.spec.ts
index f0da928122..1c1e46db09 100644
--- a/frontend/editor/src/core/tests/stubbed/viewer-sidebar-add-buttons.spec.ts
+++ b/frontend/editor/src/core/tests/stubbed/viewer-sidebar-add-buttons.spec.ts
@@ -69,7 +69,7 @@ test.describe("Viewer sidebar: Add attachment / Add bookmark buttons", () => {
const initialUrl = page.url();
await page
- .getByRole("button", { name: /Toggle Bookmarks/i })
+ .getByRole("button", { name: /Bookmarks \(Table of Contents\)/i })
.first()
.click();
@@ -133,7 +133,7 @@ test.describe("Viewer sidebar: Add attachment / Add bookmark buttons", () => {
const viewerUrl = page.url();
await page
- .getByRole("button", { name: /Toggle Bookmarks/i })
+ .getByRole("button", { name: /Bookmarks \(Table of Contents\)/i })
.first()
.click();
await page.getByRole("button", { name: /^Add bookmark$/i }).click();
@@ -180,7 +180,7 @@ test.describe("Viewer sidebar: Add attachment / Add bookmark buttons", () => {
// Bookmark sidebar
await page
- .getByRole("button", { name: /Toggle Bookmarks/i })
+ .getByRole("button", { name: /Bookmarks \(Table of Contents\)/i })
.first()
.click();
await closeViaButton(/Close bookmarks sidebar/i);