From 8b584d789cd169e67fa7a69a672f781858207ebc Mon Sep 17 00:00:00 2001 From: Valentin Mihai Date: Wed, 3 Aug 2022 13:55:04 +0300 Subject: [PATCH] RED-4859 - Convert earmarks dialog text wrong --- .../highlight-action-dialog.component.ts | 9 +++-- .../translations/highlights-translations.ts | 22 ++++++++++- apps/red-ui/src/assets/i18n/de.json | 33 +++++++++++----- apps/red-ui/src/assets/i18n/en.json | 38 +++++++++++-------- libs/common-ui | 2 +- 5 files changed, 72 insertions(+), 32 deletions(-) diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/highlight-action-dialog/highlight-action-dialog.component.ts b/apps/red-ui/src/app/modules/file-preview/dialogs/highlight-action-dialog/highlight-action-dialog.component.ts index 2e2b631eb..b00f94437 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/highlight-action-dialog/highlight-action-dialog.component.ts +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/highlight-action-dialog/highlight-action-dialog.component.ts @@ -24,17 +24,18 @@ export interface HighlightActionData { }) export class HighlightActionDialogComponent extends BaseDialogComponent { readonly translations = highlightsTranslations; + readonly #operation = this.data.operation; readonly options: DetailsRadioOption[] = [ { - label: _('highlight-action-dialog.form.options.this-page.label'), + label: highlightsTranslations[this.#operation].options[TextHighlightOperationPages.THIS_PAGE].label, value: TextHighlightOperationPages.THIS_PAGE, - description: _('highlight-action-dialog.form.options.this-page.description'), + description: highlightsTranslations[this.#operation].options[TextHighlightOperationPages.THIS_PAGE].description, }, { - label: _('highlight-action-dialog.form.options.all-pages.label'), + label: highlightsTranslations[this.#operation].options[TextHighlightOperationPages.ALL_PAGES].label, value: TextHighlightOperationPages.ALL_PAGES, - description: _('highlight-action-dialog.form.options.all-pages.description'), + description: highlightsTranslations[this.#operation].options[TextHighlightOperationPages.ALL_PAGES].description, }, ]; diff --git a/apps/red-ui/src/app/translations/highlights-translations.ts b/apps/red-ui/src/app/translations/highlights-translations.ts index 4b52df343..730de49dc 100644 --- a/apps/red-ui/src/app/translations/highlights-translations.ts +++ b/apps/red-ui/src/app/translations/highlights-translations.ts @@ -7,13 +7,31 @@ export const highlightsTranslations = { details: _('highlight-action-dialog.convert.details'), save: _('highlight-action-dialog.convert.save'), confirmation: _('highlight-action-dialog.convert.confirmation'), + options: { + [TextHighlightOperationPages.ALL_PAGES]: { + description: _('highlight-action-dialog.convert.options.all-pages.description'), + label: _('highlight-action-dialog.convert.options.all-pages.label'), + }, + [TextHighlightOperationPages.THIS_PAGE]: { + description: _('highlight-action-dialog.convert.options.this-page.description'), + label: _('highlight-action-dialog.convert.options.this-page.label'), + }, + }, }, [TextHighlightOperation.REMOVE]: { title: _('highlight-action-dialog.remove.title'), details: _('highlight-action-dialog.remove.details'), save: _('highlight-action-dialog.remove.save'), confirmation: _('highlight-action-dialog.remove.confirmation'), + options: { + [TextHighlightOperationPages.ALL_PAGES]: { + description: _('highlight-action-dialog.remove.options.all-pages.description'), + label: _('highlight-action-dialog.remove.options.all-pages.label'), + }, + [TextHighlightOperationPages.THIS_PAGE]: { + description: _('highlight-action-dialog.remove.options.this-page.description'), + label: _('highlight-action-dialog.remove.options.this-page.label'), + }, + }, }, - [TextHighlightOperationPages.ALL_PAGES]: _('highlight-action-dialog.all-pages'), - [TextHighlightOperationPages.THIS_PAGE]: _('highlight-action-dialog.this-page'), } as const; diff --git a/apps/red-ui/src/assets/i18n/de.json b/apps/red-ui/src/assets/i18n/de.json index 3f5de4650..ec230a7f4 100644 --- a/apps/red-ui/src/assets/i18n/de.json +++ b/apps/red-ui/src/assets/i18n/de.json @@ -1394,6 +1394,11 @@ "under-review": "In Review", "unprocessed": "Unbearbeitet" }, + "file-upload": { + "type": { + "csv": "" + } + }, "filter-menu": { "filter-options": "Filteroptionen", "filter-types": "Filter", @@ -1491,17 +1496,9 @@ "actions": { "cancel": "" }, - "all-pages": "", "convert": { "confirmation": "", "details": "", - "save": "", - "title": "" - }, - "form": { - "color": { - "label": "" - }, "options": { "all-pages": { "description": "", @@ -1511,16 +1508,32 @@ "description": "", "label": "" } + }, + "save": "", + "title": "" + }, + "form": { + "color": { + "label": "" } }, "remove": { "confirmation": "", "details": "", + "options": { + "all-pages": { + "description": "", + "label": "" + }, + "this-page": { + "description": "", + "label": "" + } + }, "save": "", "title": "" }, - "success": "", - "this-page": "" + "success": "" }, "highlights": "", "image-category": { diff --git a/apps/red-ui/src/assets/i18n/en.json b/apps/red-ui/src/assets/i18n/en.json index 951c06ddd..eee926eb0 100644 --- a/apps/red-ui/src/assets/i18n/en.json +++ b/apps/red-ui/src/assets/i18n/en.json @@ -1394,6 +1394,11 @@ "under-review": "Under Review", "unprocessed": "Unprocessed" }, + "file-upload": { + "type": { + "csv": "File attributes were imported successfully from uploaded CSV file." + } + }, "filter-menu": { "filter-options": "Filter options", "filter-types": "Filter", @@ -1491,17 +1496,30 @@ "actions": { "cancel": "Cancel" }, - "all-pages": "For all pages in this document", "convert": { "confirmation": "The {count} selected {count, plural, one{earmark} other{earmarks}} will be converted", "details": "All earmarks from the document will be converted to Imported Redactions, using the color set up in the Default Colors section of the app.", + "options": { + "all-pages": { + "description": "The earmarks in the selected HEX color will be converted on all pages of the document.", + "label": "Convert on all pages" + }, + "this-page": { + "description": "The earmarks in the selected HEX color will be converted only on the current page in view.", + "label": "Convert only on this page" + } + }, "save": "Convert Earmarks", "title": "Convert earmarks to imported redactions" }, "form": { "color": { "label": "Earmark HEX Color" - }, + } + }, + "remove": { + "confirmation": "The {count} selected {count, plural, one{earmark} other{earmarks}} will be removed from the document", + "details": "Removing earmarks from the document will delete all the rectangles and leave a white background behind the highlighted text.", "options": { "all-pages": { "description": "The earmarks in the selected HEX color will be removed on all pages of the document.", @@ -1511,16 +1529,11 @@ "description": "The earmarks in the selected HEX color will be removed only on the current page in view.", "label": "Remove only on this page" } - } - }, - "remove": { - "confirmation": "The {count} selected {count, plural, one{earmark} other{earmarks}} will be removed from the document", - "details": "Removing earmarks from the document will delete all the rectangles and leave a white background behind the highlighted text.", + }, "save": "Remove Earmarks", "title": "Remove earmarks" }, - "success": "{operation, select, convert{Converting earmarks in progress...} delete{Successfully removed earmarks!} other{}} ", - "this-page": "Only for this page" + "success": "{operation, select, convert{Converting earmarks in progress...} delete{Successfully removed earmarks!} other{}} " }, "highlights": "{color} - {length} {length, plural, one{earmark} other{earmarks}}", "image-category": { @@ -2132,10 +2145,5 @@ "select": "Select" } }, - "yesterday": "Yesterday", - "file-upload": { - "type": { - "csv": "File attributes were imported successfully from uploaded CSV file." - } - } + "yesterday": "Yesterday" } diff --git a/libs/common-ui b/libs/common-ui index c17ba13b4..7d5537309 160000 --- a/libs/common-ui +++ b/libs/common-ui @@ -1 +1 @@ -Subproject commit c17ba13b4f87d3ff3d77936c262c0532c2c52eb0 +Subproject commit 7d55373093eeb3301487998fd6a34487d8fc5101