mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2025-08-26 14:19:24 +00:00

# Description of Changes Add tooltips to advanced section in OCR and add missing translations
35 lines
1.8 KiB
TypeScript
35 lines
1.8 KiB
TypeScript
import { useTranslation } from 'react-i18next';
|
|
import { TooltipContent } from '../../types/tips';
|
|
|
|
export const useAdvancedOCRTips = (): TooltipContent => {
|
|
const { t } = useTranslation();
|
|
|
|
return {
|
|
header: {
|
|
title: t("ocr.tooltip.advanced.header.title", "Advanced OCR Processing"),
|
|
},
|
|
tips: [
|
|
{
|
|
title: t("ocr.tooltip.advanced.compatibility.title", "Compatibility Mode"),
|
|
description: t("ocr.tooltip.advanced.compatibility.text", "Uses OCR 'sandwich PDF' mode: results in larger files, but more reliable with certain languages and older PDF software. By default we use hOCR for smaller, modern PDFs.")
|
|
},
|
|
{
|
|
title: t("ocr.tooltip.advanced.sidecar.title", "Create Text File"),
|
|
description: t("ocr.tooltip.advanced.sidecar.text", "Generates a separate .txt file alongside the PDF containing all extracted text content for easy access and processing.")
|
|
},
|
|
{
|
|
title: t("ocr.tooltip.advanced.deskew.title", "Deskew Pages"),
|
|
description: t("ocr.tooltip.advanced.deskew.text", "Automatically corrects skewed or tilted pages to improve OCR accuracy. Useful for scanned documents that weren't perfectly aligned.")
|
|
},
|
|
{
|
|
title: t("ocr.tooltip.advanced.clean.title", "Clean Input File"),
|
|
description: t("ocr.tooltip.advanced.clean.text", "Preprocesses the input by removing noise, enhancing contrast, and optimising the image for better OCR recognition before processing.")
|
|
},
|
|
{
|
|
title: t("ocr.tooltip.advanced.cleanFinal.title", "Clean Final Output"),
|
|
description: t("ocr.tooltip.advanced.cleanFinal.text", "Post-processes the final PDF by removing OCR artefacts and optimising the text layer for better readability and smaller file size.")
|
|
}
|
|
]
|
|
};
|
|
};
|