diff --git a/src/app/components/shared/_dialogs/topic-cloud-administration/topic-cloud-administration.component.ts b/src/app/components/shared/_dialogs/topic-cloud-administration/topic-cloud-administration.component.ts index 9757c3dd48bcbad9a12712dfa06639e87993cbbb..f703bf7ffb1eec01fbc66dc563cf1df428108ed6 100644 --- a/src/app/components/shared/_dialogs/topic-cloud-administration/topic-cloud-administration.component.ts +++ b/src/app/components/shared/_dialogs/topic-cloud-administration/topic-cloud-administration.component.ts @@ -197,7 +197,7 @@ export class TopicCloudAdministrationComponent implements OnInit, OnDestroy { keywords = comment.keywordsFromSpacy; keywords.splice(keywords.indexOf(key.keyword, 0), 1); changes.set('keywordsFromSpacy', JSON.stringify(keywords)); - this.updateComment(comment, changes); + this.updateComment(comment, changes, 'keyword-delete'); }); if (this.keywords.length === 0) { @@ -209,14 +209,14 @@ export class TopicCloudAdministrationComponent implements OnInit, OnDestroy { } } - updateComment(updatedComment: Comment, changes: TSMap<string, any>){ + updateComment(updatedComment: Comment, changes: TSMap<string, any>, messageTranslate: string){ this.commentService.patchComment(updatedComment, changes).subscribe(_ => { - this.translateService.get('topic-cloud.changes-successful').subscribe(msg => { + this.translateService.get('topic-cloud-dialog.' + messageTranslate).subscribe(msg => { this.notificationService.show(msg); }); }, error => { - this.translateService.get('topic-cloud.changes-gone-wrong').subscribe(msg => { + this.translateService.get('topic-cloud-dialog.changes-gone-wrong').subscribe(msg => { this.notificationService.show(msg); }); }); @@ -248,7 +248,7 @@ export class TopicCloudAdministrationComponent implements OnInit, OnDestroy { } } changes.set('keywordsFromSpacy', JSON.stringify(keywords)); - this.updateComment(comment, changes); + this.updateComment(comment, changes, 'keyword-edit'); }); } @@ -288,8 +288,8 @@ export class TopicCloudAdministrationComponent implements OnInit, OnDestroy { mergeKeywords(key1: Keyword, key2: Keyword) { if (key1 !== undefined && key2 !== undefined){ - key1.comments.map(question => { - key2.comments.push(question); + key1.comments.map(comment => { + key2.comments.push(comment); }); this.deleteKeyword(key1); } diff --git a/src/assets/i18n/participant/de.json b/src/assets/i18n/participant/de.json index 38e15dac7460deeeeeb0223520ef9774bed14f5b..ee93d69a1ec4a037da2b8912077bd4f5b015beb1 100644 --- a/src/assets/i18n/participant/de.json +++ b/src/assets/i18n/participant/de.json @@ -263,7 +263,11 @@ "show-blacklist": "Zeige Blackliste", "hide-blacklist": "Verberge Blackliste", "show-profanity-list": "Zeige Schimpfwortliste", - "hide-profanity-list": "Verberge Schimpfwortliste" + "hide-profanity-list": "Verberge Schimpfwortliste", + "keyword-delete": "Stichwort gelöscht", + "keyword-edit": "Stichwort umbenannt", + "keywords-merge": "Stichwörter zusammengefügt", + "changes-gone-wrong": "etwas ist schiefgelaufen" }, "topic-cloud-confirm-dialog": { "cancel": "Abbrechen", diff --git a/src/assets/i18n/participant/en.json b/src/assets/i18n/participant/en.json index 4e481147a7f80aa5276cdb9fba94fd701642b0c0..29ed8cf0b79b2c3d094f443c0d0c6950ad736ac8 100644 --- a/src/assets/i18n/participant/en.json +++ b/src/assets/i18n/participant/en.json @@ -268,7 +268,11 @@ "show-blacklist": "Show blacklist", "hide-blacklist": "Hide blacklist", "show-profanity-list": "Show profanity list", - "hide-profanity-list": "Hide profanity list" + "hide-profanity-list": "Hide profanity list", + "keyword-delete": "keyword deleted", + "keyword-edit": "keyword renamed", + "keywords-merge": "keywords merged", + "changes-gone-wrong": "somthing gone wrong" }, "topic-cloud-confirm-dialog":{ "cancel": "Cancel",