From 750312c59ed9e2df7096e2688803896ac4661c03 Mon Sep 17 00:00:00 2001 From: Nicoleta Panaghiu Date: Wed, 25 Sep 2024 14:54:14 +0300 Subject: [PATCH] RED-9486: fixed naming of images in remove dialog. --- .../file-preview/utils/dialog-options.ts | 12 +++++++++++- apps/red-ui/src/assets/i18n/redact/en.json | 18 +++++++++--------- 2 files changed, 20 insertions(+), 10 deletions(-) diff --git a/apps/red-ui/src/app/modules/file-preview/utils/dialog-options.ts b/apps/red-ui/src/app/modules/file-preview/utils/dialog-options.ts index 35dd23be6..00cbf3ce6 100644 --- a/apps/red-ui/src/app/modules/file-preview/utils/dialog-options.ts +++ b/apps/red-ui/src/app/modules/file-preview/utils/dialog-options.ts @@ -163,6 +163,7 @@ export const getRemoveRedactionOptions = ( descriptionParams: { value: redactions[0].value, type: redactions[0].HINT ? 'hint' : redactions[0].typeLabel, + isImage: redactions[0].isImage ? 'image' : redactions[0].typeLabel, }, icon: PIN_ICON, value: RemoveRedactionOptions.ONLY_HERE, @@ -171,6 +172,9 @@ export const getRemoveRedactionOptions = ( options.push({ label: removeRedactionTranslations.IN_DOCUMENT.label, description: removeRedactionTranslations.IN_DOCUMENT.description, + descriptionParams: { + isImage: redactions[0].isImage ? 'image' : redactions[0].typeLabel, + }, icon: DOCUMENT_ICON, value: RemoveRedactionOptions.IN_DOCUMENT, }); @@ -179,7 +183,11 @@ export const getRemoveRedactionOptions = ( options.push({ label: isBulk ? translations.IN_DOSSIER.labelBulk : translations.IN_DOSSIER.label, description: isBulk ? translations.IN_DOSSIER.descriptionBulk : translations.IN_DOSSIER.description, - descriptionParams: { value: redactions[0].value, type: redactions[0].HINT ? 'hint' : redactions[0].typeLabel }, + descriptionParams: { + value: redactions[0].value, + type: redactions[0].HINT ? 'hint' : redactions[0].typeLabel, + isImage: redactions[0].isImage ? 'image' : redactions[0].typeLabel, + }, icon: FOLDER_ICON, value: RemoveRedactionOptions.IN_DOSSIER, extraOption: !isDocumine @@ -200,6 +208,7 @@ export const getRemoveRedactionOptions = ( value: redactions[0].value, type: redactions[0].typeLabel, context: falsePositiveContext[0], + isImage: redactions[0].isImage ? 'image' : redactions[0].typeLabel, }, icon: FOLDER_ICON, value: RemoveRedactionOptions.DO_NOT_RECOMMEND, @@ -219,6 +228,7 @@ export const getRemoveRedactionOptions = ( value: redactions[0].value, type: redactions[0].typeLabel, context: falsePositiveContext[0], + isImage: redactions[0].isImage ? 'image' : redactions[0].typeLabel, }, icon: REMOVE_FROM_DICT_ICON, value: RemoveRedactionOptions.FALSE_POSITIVE, diff --git a/apps/red-ui/src/assets/i18n/redact/en.json b/apps/red-ui/src/assets/i18n/redact/en.json index cd5b0a83b..c8c292c19 100644 --- a/apps/red-ui/src/assets/i18n/redact/en.json +++ b/apps/red-ui/src/assets/i18n/redact/en.json @@ -2149,32 +2149,32 @@ "comment-placeholder": "Add remarks or notes...", "options": { "do-not-recommend": { - "description": "Do not recommend the selected term in any document of this dossier.", - "description-bulk": "Do not recommend the selected terms in any document of this dossier.", + "description": "Do not recommend the selected {isImage, select, image{image} other{term}} in any document of this dossier.", + "description-bulk": "Do not recommend the selected {isImage, select, image{images} other{terms}} in any document of this dossier.", "extraOptionLabel": "Apply to all active and future dossiers", "label": "Remove from dossier" }, "false-positive": { - "description": "Mark this redaction as a false-positive. The term will not be redacted in this dossier if it occurs in the same context.", - "description-bulk": "Mark these redactions as false-positives. The terms will not be redacted in this dossier if they occur in the same context.", + "description": "Mark this redaction as a false-positive. The {isImage, select, image{image} other{term}} will not be redacted in this dossier if it occurs in the same context.", + "description-bulk": "Mark these redactions as false-positives. The {isImage, select, image{images} other{terms}} will not be redacted in this dossier if they occur in the same context.", "extraOptionDescription": "Dossier template access is required to reverse this action. As a regular user you can only reverse it for this dossier.", "extraOptionLabel": "Apply to all active and future dossiers", "label": "Remove from dossier in this context" }, "in-document": { - "description": "Do not auto-redact the selected term in any pages of this document.", + "description": "Do not auto-redact the selected {isImage, select, image{image} other{term}} in any pages of this document.", "label": "Remove from document" }, "in-dossier": { - "description": "Do not {type, select, hint{annotate} other{auto-redact}} the selected term in any document of this dossier.", - "description-bulk": "Do not {type, select, hint{annotate} other{auto-redact}} the selected terms in this dossier.", + "description": "Do not {type, select, hint{annotate} other{auto-redact}} the selected {isImage, select, image{image} other{term}} in any document of this dossier.", + "description-bulk": "Do not {type, select, hint{annotate} other{auto-redact}} the selected {isImage, select, image{images} other{terms}} in this dossier.", "extraOptionLabel": "Apply to all active and future dossiers", "label": "Remove from dossier", "label-bulk": "Remove from dossier" }, "only-here": { - "description": "Do not {type, select, hint{annotate} other{redact}} the term at this position in the current document.", - "description-bulk": "Do not {type, select, hint{annotate} other{redact}} the selected terms at this position in the current document.", + "description": "Do not {type, select, hint{annotate} other{redact}} the {isImage, select, image{image} other{term}} at this position in the current document.", + "description-bulk": "Do not {type, select, hint{annotate} other{redact}} the selected {isImage, select, image{images} other{terms}} at this position in the current document.", "label": "Remove here" } }