Update translations

This commit is contained in:
James Brunton 2025-09-08 17:44:17 +01:00
parent 545aea2a46
commit 7627708fb0
6 changed files with 70 additions and 8 deletions

View File

@ -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",

View File

@ -27,7 +27,7 @@ const RedactAdvancedSettings = ({ parameters, onParameterChange, disabled = fals
{/* Box Padding */}
<Stack gap="sm">
<Text size="sm" fw={500}>{t('redact.auto.paddingLabel', 'Box Padding')}</Text>
<Text size="sm" fw={500}>{t('redact.auto.customPaddingLabel', 'Custom Extra Padding')}</Text>
<NumberInput
value={parameters.customPadding}
onChange={(value) => onParameterChange('customPadding', typeof value === 'number' ? value : 0.1)}

View File

@ -14,7 +14,7 @@ export default function RedactModeSelector({ mode, onModeChange, disabled }: Red
return (
<Stack gap="sm">
<Text size="sm" fw={600}>
{t('redact.modeSelector.title', 'Redaction Mode')}
{t('redact.modeSelector.mode', 'Mode')}
</Text>
<div style={{ display: 'flex', gap: '4px' }}>

View File

@ -32,6 +32,10 @@ export default function WordsToRedactInput({ wordsToRedact, onWordsChange, disab
return (
<Stack gap="sm">
<Text size="sm" fw={500}>
{t('redact.auto.wordsToRedact.title', 'Words to Redact')}
</Text>
{/* Current words */}
{wordsToRedact.map((word, index) => (
<Group key={index} justify="space-between" style={{

View File

@ -62,7 +62,7 @@ export const useRedactAdvancedTips = (): TooltipContent => {
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")
]
},

View File

@ -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,