remove only here

This commit is contained in:
Timo 2020-12-15 11:17:57 +02:00
parent dd53e652fe
commit 7151371ec5
5 changed files with 31 additions and 15 deletions

View File

@ -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<ConfirmationDialogComponent> {
public openRemoveFromDictionaryDialog(
$event: MouseEvent,
annotation: AnnotationWrapper,
removeFromDictionary: boolean,
cb?: Function
): MatDialogRef<ConfirmationDialogComponent> {
$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 }
})
});

View File

@ -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));
});
}

View File

@ -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 <b>{{entry}} wirklich</b> aus dem <b>{{dictionary}}</b> Wörterbuch entfernen?" }
"remove-from-dictionary": { "question": "Möchten Sie <b>{{entry}} wirklich</b> aus dem <b>{{dictionary}}</b> Wörterbuch entfernen?" },
"remove-only-here": { "question": "Möchten Sie <b>{{entry}}</b> nur hier entfernen?" }
},
"add-edit-dictionary": {
"title": { "edit": "Bearbeiten Sie das {{name}} Wörterbuch", "new": "Wörterbuch erstellen" },

View File

@ -501,6 +501,9 @@
},
"remove-from-dictionary": {
"question": "Are you sure you want to remove <b>{{entry}}</b> from the <b>{{dictionary}}</b> dictionary?"
},
"remove-only-here": {
"question": "Are you sure you want to remove <b>{{entry}}</b> only here?"
}
},
"add-edit-dictionary": {

View File

@ -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 <b>{{entry}}</b> only here?|Möchten Sie <b>{{entry}}</b> nur hier entfernen?