diff --git a/frontend/components/Domain/Recipe/RecipeActionMenu.vue b/frontend/components/Domain/Recipe/RecipeActionMenu.vue index 81a91f9441c..8a3eb754d57 100644 --- a/frontend/components/Domain/Recipe/RecipeActionMenu.vue +++ b/frontend/components/Domain/Recipe/RecipeActionMenu.vue @@ -156,7 +156,7 @@ export default defineComponent({ if (props.showOcrButton) { editorButtons.splice(2, 0, { - text: "OCR editor", + text: i18n.t("ocr-editor.ocr-editor"), icon: $globals.icons.eye, event: OCR_EVENT, color: "accent", diff --git a/frontend/lang/messages/en-US.json b/frontend/lang/messages/en-US.json index 430ab90a7a5..3bf59e50679 100644 --- a/frontend/lang/messages/en-US.json +++ b/frontend/lang/messages/en-US.json @@ -625,5 +625,35 @@ "default-30-days": "Default 30 Days", "expires-at": "Expires At", "recipe-link-copied-message": "Recipe link copied to clipboard" + }, + "ocr-editor": { + "ocr-editor": "Ocr editor", + "selection-mode": "Selection mode", + "pan-and-zoom-picture": "Pan and zoom picture", + "split-text": "Split text", + "preserve-line-breaks": "Preserve original line breaks", + "split-by-block": "Split by text block", + "flatten": "Flatten regardless of original formating", + "help": "Click here for help on how to use this feature!", + "help-dialog": { + "selection-mode": "Selection Mode (default)", + "selection-mode-desc": "The selection mode is the main mode that can be used to enter data:", + "selection-mode-steps": { + "draw" :"Draw a rectangle on the text you want to select.", + "click": "Click on any field on the right and then click back on the rectangle above the image.", + "result": "The selected text will appear inside the previously selected field." + }, + "pan-and-zoom-mode": "Pan and Zoom Mode", + "pan-and-zoom-desc": "Select pan and zoom by clicking the icon. This mode allows to zoom inside the image and move around to make using big images easier.", + "split-text-mode": "Split Text modes", + "split-modes": { + "line-mode": "Line mode (default)", + "line-mode-desc": "In line mode, the text will be propagated by keeping the original line breaks. This mode is useful when using bulk add on a list of ingredients where one ingredient is one line.", + "block-mode": "Block mode", + "block-mode-desc": "In block mode, the text will be split in blocks. This mode is useful when bulk adding instructions that are usually written in paragraphs.", + "flat-mode": "Flat mode", + "flat-mode-desc": "In flat mode, the text will be added to the selected recipe field with no line breaks." + } + } } } diff --git a/frontend/pages/recipe/_slug/ocr-editor.vue b/frontend/pages/recipe/_slug/ocr-editor.vue index 7443cef7c9c..98500b09cf7 100644 --- a/frontend/pages/recipe/_slug/ocr-editor.vue +++ b/frontend/pages/recipe/_slug/ocr-editor.vue @@ -25,7 +25,7 @@ - Selection mode + {{ $t("ocr-editor.selection-mode") }} - Pan and zoom picture + {{ $t("ocr-editor.pan-and-zoom-picture") }} - Split text + {{ $t("ocr-editor.split-text") }} - Preserve original line breaks + {{ $t("ocr-editor.preserve-line-breaks") }} - Split by text block + {{ $t("ocr-editor.split-by-block") }} - Flatten regardless of original formating + {{ $t("ocr-editor.flatten") }} @@ -103,7 +103,7 @@ {{ $globals.icons.help }} - Click here for help on how to use this feature! + {{ $t("ocr-editor.help") }} Mouse modes

- {{ $globals.icons.selectMode }} Selection Mode (default) + {{ $globals.icons.selectMode }} {{ $t("ocr-editor.help-dialog.selection-mode") }}

-

The selection mode is the main mode that can be used to enter data:

+

{{ $t("ocr-editor.help-dialog.selection-mode") }}

    -
  1. Draw a rectangle on the text you want to select.
  2. -
  3. Click on any field on the right and then click back on the rectangle above the image.
  4. -
  5. The selected text will appear inside the previously selected field.
  6. +
  7. {{ $t("ocr-editor.help-dialog.selection-mode-steps.draw") }}
  8. +
  9. {{ $t("ocr-editor.help-dialog.selection-mode-steps.click") }}
  10. +
  11. {{ $t("ocr-editor.help-dialog.selection-mode-steps.result") }}

- {{ $globals.icons.panAndZoom }} Pan and Zoom Mode + {{ $globals.icons.panAndZoom }} {{ $t("ocr-editor.help-dialog.pan-and-zoom-mode") }}

- Select pan and zoom by clicking the icon. This mode allows to zoom inside the image and move around to make - using big images easier. -

Split Text modes

+{{ $t("ocr-editor.help-dialog.pan-and-zoom-desc") }} +

{{ $t("ocr-editor.help-dialog.split-text-mode") }}

- {{ $globals.icons.preserveLines }} Line mode (default) + {{ $globals.icons.preserveLines }} {{ $t("ocr-editor.help-dialog.split-modes.line-mode") }}

- In line mode, the text will be propagated by keeping the original line breaks. This mode is useful when - using bulk add on a list of ingredients where one ingredient is one line. +{{ $t("ocr-editor.help-dialog.split-modes.line-mode-desc") }}

- {{ $globals.icons.preserveBlocks }} Block mode + {{ $globals.icons.preserveBlocks }} {{ $t("ocr-editor.help-dialog.split-modes.block-mode") }}

- In block mode, the text will be split in blocks. This mode is useful when bulk adding instructions that are - usually written in paragraphs. +{{ $t("ocr-editor.help-dialog.split-modes.block-mode-desc") }}

- {{ $globals.icons.flatten }} Flat mode + {{ $globals.icons.flatten }} {{ $t("ocr-editor.help-dialog.split-modes.flat-mode") }}

-

In flat mode, the text will be added to the selected recipe field with no line breaks.

+

{{ $t("ocr-editor.help-dialog.split-modes.flat-mode-desc") }}