From feba136044298c3eb9d33181563e0a79789fe172 Mon Sep 17 00:00:00 2001 From: Anthony Stirling <77850077+Frooodle@users.noreply.github.com.> Date: Wed, 20 Aug 2025 14:57:58 +0100 Subject: [PATCH] fix translations --- frontend/public/locales/en-GB/translation.json | 10 ---------- frontend/public/locales/en-US/translation.json | 10 ---------- .../hooks/tools/autoRename/useAutoRenameOperation.ts | 2 +- frontend/src/tools/AutoRename.tsx | 8 ++++---- 4 files changed, 5 insertions(+), 25 deletions(-) diff --git a/frontend/public/locales/en-GB/translation.json b/frontend/public/locales/en-GB/translation.json index e9a536532..cd499c11d 100644 --- a/frontend/public/locales/en-GB/translation.json +++ b/frontend/public/locales/en-GB/translation.json @@ -1316,17 +1316,7 @@ "tags": "auto-detect,header-based,organize,relabel", "title": "Auto Rename", "header": "Auto Rename PDF", - "submit": "Auto Rename" - }, - "autoRename": { - "title": "Auto Rename PDF File", - "description": "This tool will automatically rename PDF files based on their content. It analyses the document to find the most suitable title from the text.", "submit": "Auto Rename", - "settings": { - "title": "Auto-Rename Settings", - "useFirstTextAsFallback": "Use first text as fallback", - "useFirstTextAsFallbackDesc": "If no suitable title is found, use the first text in the document" - }, "files": { "placeholder": "Select a PDF file in the main view to get started" }, diff --git a/frontend/public/locales/en-US/translation.json b/frontend/public/locales/en-US/translation.json index f6db6a843..c95cd568a 100644 --- a/frontend/public/locales/en-US/translation.json +++ b/frontend/public/locales/en-US/translation.json @@ -1043,17 +1043,7 @@ "tags": "auto-detect,header-based,organize,relabel", "title": "Auto Rename", "header": "Auto Rename PDF", - "submit": "Auto Rename" - }, - "autoRename": { - "title": "Auto Rename PDF File", - "description": "This tool will automatically rename PDF files based on their content. It analyzes the document to find the most suitable title from the text.", "submit": "Auto Rename", - "settings": { - "title": "Auto-Rename Settings", - "useFirstTextAsFallback": "Use first text as fallback", - "useFirstTextAsFallbackDesc": "If no suitable title is found, use the first text in the document" - }, "files": { "placeholder": "Select a PDF file in the main view to get started" }, diff --git a/frontend/src/hooks/tools/autoRename/useAutoRenameOperation.ts b/frontend/src/hooks/tools/autoRename/useAutoRenameOperation.ts index ded3da8d5..a8910af84 100644 --- a/frontend/src/hooks/tools/autoRename/useAutoRenameOperation.ts +++ b/frontend/src/hooks/tools/autoRename/useAutoRenameOperation.ts @@ -20,6 +20,6 @@ export const useAutoRenameOperation = () => { filePrefix: '', // Not used when preserveBackendFilename is true multiFileEndpoint: false, preserveBackendFilename: true, // Use filename from backend response headers - getErrorMessage: createStandardErrorHandler(t('autoRename.error.failed', 'An error occurred while auto-renaming the PDF.')) + getErrorMessage: createStandardErrorHandler(t('auto-rename.error.failed', 'An error occurred while auto-renaming the PDF.')) }); }; \ No newline at end of file diff --git a/frontend/src/tools/AutoRename.tsx b/frontend/src/tools/AutoRename.tsx index 473b672df..3a60e4d73 100644 --- a/frontend/src/tools/AutoRename.tsx +++ b/frontend/src/tools/AutoRename.tsx @@ -34,7 +34,7 @@ const AutoRename = ({ onPreviewFile, onComplete, onError }: BaseToolProps) => { } } catch (error) { if (onError) { - onError(error instanceof Error ? error.message : t("autoRename.error.failed", "Auto-rename operation failed")); + onError(error instanceof Error ? error.message : t("auto-rename.error.failed", "Auto-rename operation failed")); } } }; @@ -58,11 +58,11 @@ const AutoRename = ({ onPreviewFile, onComplete, onError }: BaseToolProps) => { files: { selectedFiles, isCollapsed: hasFiles || hasResults, - placeholder: t("autoRename.files.placeholder", "Select a PDF file in the main view to get started"), + placeholder: t("auto-rename.files.placeholder", "Select a PDF file in the main view to get started"), }, steps: [], executeButton: { - text: t("autoRename.submit", "Auto-Rename"), + text: t("auto-rename.submit", "Auto Rename"), isVisible: !hasResults, loadingText: t("loading"), onClick: handleAutoRename, @@ -71,7 +71,7 @@ const AutoRename = ({ onPreviewFile, onComplete, onError }: BaseToolProps) => { review: { isVisible: hasResults, operation: autoRenameOperation, - title: t("autoRename.results.title", "Auto-Rename Results"), + title: t("auto-rename.results.title", "Auto-Rename Results"), onFileClick: handleThumbnailClick, }, });