From d9c30cd23aade4e30b35c4b7981036d70f89f3a0 Mon Sep 17 00:00:00 2001 From: Nicoleta Panaghiu Date: Tue, 30 Jan 2024 16:33:35 +0200 Subject: [PATCH] RED-8167: fixed rectangle redaction label in edit dialog. --- .../edit-redaction-dialog.component.html | 4 ++-- .../edit-redaction-dialog.component.ts | 5 +++++ .../red-ui/src/app/translations/redact-text-translations.ts | 6 ++++++ apps/red-ui/src/assets/i18n/redact/de.json | 3 ++- apps/red-ui/src/assets/i18n/redact/en.json | 3 ++- 5 files changed, 17 insertions(+), 4 deletions(-) diff --git a/apps/red-ui/src/app/modules/file-preview/dialogs/edit-redaction-dialog/edit-redaction-dialog.component.html b/apps/red-ui/src/app/modules/file-preview/dialogs/edit-redaction-dialog/edit-redaction-dialog.component.html index b40d96105..6c29e14db 100644 --- a/apps/red-ui/src/app/modules/file-preview/dialogs/edit-redaction-dialog/edit-redaction-dialog.component.html +++ b/apps/red-ui/src/app/modules/file-preview/dialogs/edit-redaction-dialog/edit-redaction-dialog.component.html @@ -8,8 +8,8 @@
- -
+ +
1; } + get label() { + return this.allRectangles ? 'customRectangle' : this.isImported ? 'imported' : 'redactedText'; + } + async ngOnInit() { this.#setTypes(); const data = await firstValueFrom(this._justificationsService.loadAll(this.#dossier.dossierTemplateId)); diff --git a/apps/red-ui/src/app/translations/redact-text-translations.ts b/apps/red-ui/src/app/translations/redact-text-translations.ts index 9542168a0..0af1bf886 100644 --- a/apps/red-ui/src/app/translations/redact-text-translations.ts +++ b/apps/red-ui/src/app/translations/redact-text-translations.ts @@ -31,3 +31,9 @@ export const editRedactionTranslations: Record<'onlyHere' | 'inDossier', DialogO extraOptionLabel: _('edit-redaction.dialog.content.options.in-dossier.extraOptionLabel'), }, } as const; + +export const editRedactionLabelsTranslations = { + redactedText: _('edit-redaction.dialog.content.redacted-text'), + customRectangle: _('edit-redaction.dialog.content.custom-rectangle'), + imported: _('edit-redaction.dialog.content.imported'), +}; diff --git a/apps/red-ui/src/assets/i18n/redact/de.json b/apps/red-ui/src/assets/i18n/redact/de.json index 75f6088fd..1ddcd8b9d 100644 --- a/apps/red-ui/src/assets/i18n/redact/de.json +++ b/apps/red-ui/src/assets/i18n/redact/de.json @@ -1198,6 +1198,7 @@ "comment": "Comment", "comment-placeholder": "Add remarks or mentions...", "imported": "Imported Redaction", + "custom-rectangle": "Custom Rectangle", "legal-basis": "Legal basis", "options": { "in-dossier": { @@ -2467,4 +2468,4 @@ } }, "yesterday": "Gestern" -} \ No newline at end of file +} diff --git a/apps/red-ui/src/assets/i18n/redact/en.json b/apps/red-ui/src/assets/i18n/redact/en.json index c1b326d71..8b9efd316 100644 --- a/apps/red-ui/src/assets/i18n/redact/en.json +++ b/apps/red-ui/src/assets/i18n/redact/en.json @@ -1212,6 +1212,7 @@ "reason": "Reason", "redacted-text": "Annotated text", "imported": "Imported Redaction", + "custom-rectangle": "Custom Rectangle", "section": "Paragraph / location", "type": "Type", "unchanged": "Unchanged" @@ -2467,4 +2468,4 @@ } }, "yesterday": "Yesterday" -} \ No newline at end of file +}