mirror of
https://github.com/arsvendg/Stirling-PDF.git
synced 2026-07-16 11:23:10 +02:00
Add tooltips to advanced section in OCR and add missing translations (#4295)
# Description of Changes Add tooltips to advanced section in OCR and add missing translations
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
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.")
|
||||
}
|
||||
]
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user