From 7151371ec5f92a8bbf3e47a7392ebb62aa634316 Mon Sep 17 00:00:00 2001 From: Timo Date: Tue, 15 Dec 2020 11:17:57 +0200 Subject: [PATCH] remove only here --- apps/red-ui/src/app/dialogs/dialog.service.ts | 18 ++++++++---------- .../annotation-actions.component.ts | 2 +- apps/red-ui/src/assets/i18n/de.json | 15 +++++++++++---- apps/red-ui/src/assets/i18n/en.json | 3 +++ tools/auto-i18n/translateCache-de.txt | 8 ++++++++ 5 files changed, 31 insertions(+), 15 deletions(-) diff --git a/apps/red-ui/src/app/dialogs/dialog.service.ts b/apps/red-ui/src/app/dialogs/dialog.service.ts index b95f6f3b4..c5d4f3bb2 100644 --- a/apps/red-ui/src/app/dialogs/dialog.service.ts +++ b/apps/red-ui/src/app/dialogs/dialog.service.ts @@ -1,14 +1,7 @@ import { Injectable } from '@angular/core'; import { FileDetailsDialogComponent } from './file-details-dialog/file-details-dialog.component'; import { MatDialog, MatDialogRef } from '@angular/material/dialog'; -import { - FileStatus, - FileManagementControllerService, - ManualRedactionControllerService, - Project, - TypeValue, - DictionaryControllerService -} from '@redaction/red-ui-http'; +import { DictionaryControllerService, FileManagementControllerService, FileStatus, ManualRedactionControllerService, TypeValue } from '@redaction/red-ui-http'; import { ConfirmationDialogComponent, ConfirmationDialogInput } from './confirmation-dialog/confirmation-dialog.component'; import { NotificationService, NotificationType } from '../notification/notification.service'; import { TranslateService } from '@ngx-translate/core'; @@ -149,12 +142,17 @@ export class DialogService { return ref; } - public openRemoveFromDictionaryDialog($event: MouseEvent, annotation: AnnotationWrapper, cb?: Function): MatDialogRef { + public openRemoveFromDictionaryDialog( + $event: MouseEvent, + annotation: AnnotationWrapper, + removeFromDictionary: boolean, + cb?: Function + ): MatDialogRef { $event.stopPropagation(); const ref = this._dialog.open(ConfirmationDialogComponent, { ...dialogConfig, data: new ConfirmationDialogInput({ - question: 'confirmation-dialog.remove-from-dictionary.question', + question: removeFromDictionary ? 'confirmation-dialog.remove-from-dictionary.question' : 'confirmation-dialog.remove-only-here.question', translateParams: { entry: annotation.value, dictionary: annotation.dictionary } }) }); diff --git a/apps/red-ui/src/app/screens/file/annotation-actions/annotation-actions.component.ts b/apps/red-ui/src/app/screens/file/annotation-actions/annotation-actions.component.ts index 0fb865b73..d439ee6a6 100644 --- a/apps/red-ui/src/app/screens/file/annotation-actions/annotation-actions.component.ts +++ b/apps/red-ui/src/app/screens/file/annotation-actions/annotation-actions.component.ts @@ -79,7 +79,7 @@ export class AnnotationActionsComponent implements OnInit { } suggestRemoveAnnotation($event: MouseEvent, annotation: AnnotationWrapper, removeFromDictionary: boolean) { - this._dialogService.openRemoveFromDictionaryDialog($event, annotation, () => { + this._dialogService.openRemoveFromDictionaryDialog($event, annotation, removeFromDictionary, () => { this._processObsAndEmit(this._manualAnnotationService.removeOrSuggestRemoveAnnotation(annotation, removeFromDictionary)); }); } diff --git a/apps/red-ui/src/assets/i18n/de.json b/apps/red-ui/src/assets/i18n/de.json index 7ad8da077..9bc9b81c5 100644 --- a/apps/red-ui/src/assets/i18n/de.json +++ b/apps/red-ui/src/assets/i18n/de.json @@ -22,7 +22,7 @@ }, "top-bar": { "navigation-items": { - "projects": "Projekte", + "projects": "Aktive Projekte", "back-to-projects": "Zurück zu den Projekten", "my-account": { "children": { @@ -62,9 +62,14 @@ "charts": { "projects": "Projekte", "total-documents": "Gesamtdokument (e)" } }, "add-edit-dialog": { - "header-new": "Neues Projekt", + "header-new": "Projekt erstellen", "header-edit": "Projekt bearbeiten", - "form": { "description": "Beschreibung", "name": "Name", "due-date": "Geburtstermin", "template": "Projektvorlage" }, + "form": { + "name": { "label": "Projektname", "placeholder": "Name eingeben" }, + "description": { "label": "Beschreibung", "placeholder": "Beschreibung eingeben" }, + "due-date": "Geburtstermin", + "template": "Projektvorlage" + }, "actions": { "save": "speichern", "save-and-add-members": "Team speichern und bearbeiten" } }, "header": "Projekte", @@ -226,6 +231,7 @@ "remove-from-dict": "Genehmigen und aus dem Wörterbuch entfernen", "only-here": "Nur hier genehmigen" }, + "accept-recommendation": { "label": "Empfehlung annehmen" }, "suggest-remove-annotation": "Entfernen oder vorschlagen, diesen Eintrag zu entfernen", "reject-suggestion": "Vorschlag ablehnen", "remove-annotation": { @@ -338,7 +344,8 @@ }, "confirmation-dialog": { "delete-file": { "title": "Löschung bestätigen", "question": "Möchten Sie fortfahren?" }, - "remove-from-dictionary": { "question": "Möchten Sie {{entry}} wirklich aus dem {{dictionary}} Wörterbuch entfernen?" } + "remove-from-dictionary": { "question": "Möchten Sie {{entry}} wirklich aus dem {{dictionary}} Wörterbuch entfernen?" }, + "remove-only-here": { "question": "Möchten Sie {{entry}} nur hier entfernen?" } }, "add-edit-dictionary": { "title": { "edit": "Bearbeiten Sie das {{name}} Wörterbuch", "new": "Wörterbuch erstellen" }, diff --git a/apps/red-ui/src/assets/i18n/en.json b/apps/red-ui/src/assets/i18n/en.json index 30592aebb..33d1e5183 100644 --- a/apps/red-ui/src/assets/i18n/en.json +++ b/apps/red-ui/src/assets/i18n/en.json @@ -501,6 +501,9 @@ }, "remove-from-dictionary": { "question": "Are you sure you want to remove {{entry}} from the {{dictionary}} dictionary?" + }, + "remove-only-here": { + "question": "Are you sure you want to remove {{entry}} only here?" } }, "add-edit-dictionary": { diff --git a/tools/auto-i18n/translateCache-de.txt b/tools/auto-i18n/translateCache-de.txt index fde19be8e..7a04829b6 100644 --- a/tools/auto-i18n/translateCache-de.txt +++ b/tools/auto-i18n/translateCache-de.txt @@ -422,3 +422,11 @@ Mark as read|als gelesen markieren Mark as unread|als ungelesen markieren Rule Editor|Regeleditor Watermark|Wasserzeichen +Active Projects|Aktive Projekte +Create Project|Projekt erstellen +Project Name|Projektname +Enter Description|Beschreibung eingeben +Accept Recommendation|Empfehlung annehmen +No members yet. +Select from the list below.|Noch keine Mitglieder. Wählen Sie aus der folgenden Liste. +Are you sure you want to remove {{entry}} only here?|Möchten Sie {{entry}} nur hier entfernen?