Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
1.6 KiB
TypeScript
Raw Normal View History

Feature/v2/tooltips (#4112) # Description of Changes - added tooltips to ocr and compress - added the tooltip component which can be used either directly, or through the toolstep component --- ## Checklist ### General - [ ] I have read the [Contribution Guidelines](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/CONTRIBUTING.md) - [ ] I have read the [Stirling-PDF Developer Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md) (if applicable) - [ ] I have read the [How to add new languages to Stirling-PDF](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md) (if applicable) - [ ] I have performed a self-review of my own code - [ ] My changes generate no new warnings ### Documentation - [ ] I have updated relevant docs on [Stirling-PDF's doc repo](https://github.com/Stirling-Tools/Stirling-Tools.github.io/blob/main/docs/) (if functionality has heavily changed) - [ ] I have read the section [Add New Translation Tags](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/HowToAddNewLanguage.md#add-new-translation-tags) (for new translation tags only) ### UI Changes (if applicable) - [ ] Screenshots or videos demonstrating the UI changes are attached (e.g., as comments or direct attachments in the PR) ### Testing (if applicable) - [ ] I have tested my changes locally. Refer to the [Testing Guide](https://github.com/Stirling-Tools/Stirling-PDF/blob/main/devGuide/DeveloperGuide.md#6-testing) for more details.
2025-08-08 12:09:41 +01:00
import { useTranslation } from 'react-i18next';
import { TooltipContent } from '../../types/tips';
export const OcrTips = (): TooltipContent => {
const { t } = useTranslation();
return {
header: {
title: t("ocr.tooltip.header.title", "OCR Settings Overview"),
},
tips: [
{
title: t("ocr.tooltip.mode.title", "OCR Mode"),
description: t("ocr.tooltip.mode.text", "Optical Character Recognition (OCR) helps you turn scanned or screenshotted pages into text you can search, copy, or highlight."),
bullets: [
t("ocr.tooltip.mode.bullet1", "Auto skips pages that already contain text layers."),
t("ocr.tooltip.mode.bullet2", "Force re-OCRs every page and replaces all the text."),
t("ocr.tooltip.mode.bullet3", "Strict halts if any selectable text is found.")
]
},
{
title: t("ocr.tooltip.languages.title", "Languages"),
description: t("ocr.tooltip.languages.text", "Improve OCR accuracy by specifying the expected languages. Choose one or more languages to guide detection.")
},
{
title: t("ocr.tooltip.output.title", "Output"),
description: t("ocr.tooltip.output.text", "Decide how you want the text output formatted:"),
bullets: [
t("ocr.tooltip.output.bullet1", "Searchable PDF embeds text behind the original image."),
t("ocr.tooltip.output.bullet2", "HOCR XML returns a structured machine-readable file."),
t("ocr.tooltip.output.bullet3", "Plain-text sidecar creates a separate .txt file with raw content.")
]
}
]
};
};