diff --git a/frontend/public/locales/en-GB/translation.json b/frontend/public/locales/en-GB/translation.json index ad0fe8aa6..d6f229959 100644 --- a/frontend/public/locales/en-GB/translation.json +++ b/frontend/public/locales/en-GB/translation.json @@ -1587,7 +1587,8 @@ "failed": "An error occurred while redacting the PDF." }, "modeSelector": { - "title": "Redaction Mode", + "title": "Redaction Method", + "mode": "Mode", "automatic": "Automatic", "automaticDesc": "Redact text based on search terms", "manual": "Manual", @@ -1596,7 +1597,10 @@ }, "auto": { "header": "Auto Redact", - "settings": "Redaction Settings", + "settings": { + "title": "Redaction Settings", + "advancedTitle": "Advanced" + }, "colorLabel": "Box Colour", "wordsToRedact": { "title": "Words to Redact", @@ -1609,6 +1613,60 @@ "customPaddingLabel": "Custom Extra Padding", "convertPDFToImageLabel": "Convert PDF to PDF-Image" }, + "tooltip": { + "mode": { + "header": { + "title": "Redaction Method" + }, + "automatic": { + "title": "Automatic Redaction", + "text": "Automatically finds and redacts specified text throughout the document. Perfect for removing consistent sensitive information like names, SSNs, or confidential markers." + }, + "manual": { + "title": "Manual Redaction", + "text": "Click and drag to manually select specific areas to redact. Gives you precise control over what gets redacted. (Coming soon)" + } + }, + "words": { + "header": { + "title": "Words to Redact" + }, + "description": { + "title": "Text Matching", + "text": "Enter words or phrases to find and redact in your document. Each word will be searched for separately." + }, + "bullet1": "Add one word at a time", + "bullet2": "Press Enter or click 'Add Another' to add", + "bullet3": "Click × to remove words", + "examples": { + "title": "Common Examples", + "text": "Typical words to redact include: 'Confidential', 'SSN:', phone numbers, email addresses, or specific names." + } + }, + "advanced": { + "header": { + "title": "Advanced Redaction Settings" + }, + "color": { + "title": "Box Color & Padding", + "text": "Customize the appearance of redaction boxes. Black is standard, but you can choose any color. Padding adds extra space around the found text." + }, + "regex": { + "title": "Use Regex", + "text": "Enable regular expressions for advanced pattern matching. Useful for finding phone numbers, emails, or complex patterns.", + "bullet1": "Example: \\d{4}-\\d{2}-\\d{2} to match any dates in YYYY-MM-DD format", + "bullet2": "Use with caution - test thoroughly" + }, + "wholeWord": { + "title": "Whole Word Search", + "text": "Only match complete words, not partial matches. 'John' won't match 'Johnson' when enabled." + }, + "convert": { + "title": "Convert to PDF-Image", + "text": "Converts the PDF to an image-based PDF after redaction. This ensures text behind redaction boxes is completely removed and unrecoverable." + } + } + }, "manual": { "header": "Manual Redaction", "textBasedRedaction": "Text based Redaction", diff --git a/frontend/src/components/tools/redact/RedactAdvancedSettings.tsx b/frontend/src/components/tools/redact/RedactAdvancedSettings.tsx index 7a68b3d5d..b9099c6db 100644 --- a/frontend/src/components/tools/redact/RedactAdvancedSettings.tsx +++ b/frontend/src/components/tools/redact/RedactAdvancedSettings.tsx @@ -27,7 +27,7 @@ const RedactAdvancedSettings = ({ parameters, onParameterChange, disabled = fals {/* Box Padding */} - {t('redact.auto.paddingLabel', 'Box Padding')} + {t('redact.auto.customPaddingLabel', 'Custom Extra Padding')} onParameterChange('customPadding', typeof value === 'number' ? value : 0.1)} diff --git a/frontend/src/components/tools/redact/RedactModeSelector.tsx b/frontend/src/components/tools/redact/RedactModeSelector.tsx index b8981986c..03e872ad5 100644 --- a/frontend/src/components/tools/redact/RedactModeSelector.tsx +++ b/frontend/src/components/tools/redact/RedactModeSelector.tsx @@ -14,7 +14,7 @@ export default function RedactModeSelector({ mode, onModeChange, disabled }: Red return ( - {t('redact.modeSelector.title', 'Redaction Mode')} + {t('redact.modeSelector.mode', 'Mode')}
diff --git a/frontend/src/components/tools/redact/WordsToRedactInput.tsx b/frontend/src/components/tools/redact/WordsToRedactInput.tsx index 623192ba3..e574c4819 100644 --- a/frontend/src/components/tools/redact/WordsToRedactInput.tsx +++ b/frontend/src/components/tools/redact/WordsToRedactInput.tsx @@ -32,6 +32,10 @@ export default function WordsToRedactInput({ wordsToRedact, onWordsChange, disab return ( + + {t('redact.auto.wordsToRedact.title', 'Words to Redact')} + + {/* Current words */} {wordsToRedact.map((word, index) => ( { title: t("redact.tooltip.advanced.regex.title", "Use Regex"), description: t("redact.tooltip.advanced.regex.text", "Enable regular expressions for advanced pattern matching. Useful for finding phone numbers, emails, or complex patterns."), bullets: [ - t("redact.tooltip.advanced.regex.bullet1", "Example: \\d{3}-\\d{3}-\\d{4} for phone numbers"), + t("redact.tooltip.advanced.regex.bullet1", "Example: \\d{4}-\\d{2}-\\d{2} to match any dates in YYYY-MM-DD format"), t("redact.tooltip.advanced.regex.bullet2", "Use with caution - test thoroughly") ] }, diff --git a/frontend/src/tools/Redact.tsx b/frontend/src/tools/Redact.tsx index 03f36dc66..3c15938b7 100644 --- a/frontend/src/tools/Redact.tsx +++ b/frontend/src/tools/Redact.tsx @@ -47,7 +47,7 @@ const Redact = (props: BaseToolProps) => { const steps = [ // Method selection step (always present) { - title: t("redact.steps.method", "Method"), + title: t("redact.modeSelector.title", "Redaction Method"), isCollapsed: getActualCollapsedState(methodCollapsed), onCollapsedClick: () => base.settingsCollapsed ? base.handleSettingsReset() : setMethodCollapsed(!methodCollapsed), tooltip: modeTips, @@ -65,7 +65,7 @@ const Redact = (props: BaseToolProps) => { if (base.params.parameters.mode === 'automatic') { steps.push( { - title: t("redact.steps.words", "Words to Redact"), + title: t("redact.auto.settings.title", "Redaction Settings"), isCollapsed: getActualCollapsedState(wordsCollapsed), onCollapsedClick: () => base.settingsCollapsed ? base.handleSettingsReset() : setWordsCollapsed(!wordsCollapsed), tooltip: wordsTips, @@ -76,7 +76,7 @@ const Redact = (props: BaseToolProps) => { />, }, { - title: t("redact.steps.advanced", "Advanced Settings"), + title: t("redact.auto.settings.advancedTitle", "Advanced Settings"), isCollapsed: getActualCollapsedState(advancedCollapsed), onCollapsedClick: () => base.settingsCollapsed ? base.handleSettingsReset() : setAdvancedCollapsed(!advancedCollapsed), tooltip: advancedTips,