X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-abuse-list%2Fmoderation-comment-modal.component.ts;h=876aeea8a7eecb75471d97e4946733ef53aaa6ba;hb=7706b3703aeb2bea686b12089959b963a7dd89f4;hp=ecb7966bfc636f784dedf7f93a109876a164d27a;hpb=94148c9028829b5576a5dcbfba2c7fb9cf6443d3;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts b/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts index ecb7966bf..876aeea8a 100644 --- a/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts +++ b/client/src/app/shared/shared-abuse-list/moderation-comment-modal.component.ts @@ -1,11 +1,11 @@ import { Component, EventEmitter, OnInit, Output, ViewChild } from '@angular/core' import { Notifier } from '@app/core' -import { FormReactive, FormValidatorService, AbuseValidatorsService } from '@app/shared/shared-forms' +import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' import { AbuseService } from '@app/shared/shared-moderation' import { NgbModal } from '@ng-bootstrap/ng-bootstrap' import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' -import { I18n } from '@ngx-translate/i18n-polyfill' import { AdminAbuse } from '@shared/models' +import { ABUSE_MODERATION_COMMENT_VALIDATOR } from '../form-validators/abuse-validators' @Component({ selector: 'my-moderation-comment-modal', @@ -23,16 +23,14 @@ export class ModerationCommentModalComponent extends FormReactive implements OnI protected formValidatorService: FormValidatorService, private modalService: NgbModal, private notifier: Notifier, - private abuseService: AbuseService, - private abuseValidatorsService: AbuseValidatorsService, - private i18n: I18n + private abuseService: AbuseService ) { super() } ngOnInit () { this.buildForm({ - moderationComment: this.abuseValidatorsService.ABUSE_MODERATION_COMMENT + moderationComment: ABUSE_MODERATION_COMMENT_VALIDATOR }) } @@ -57,7 +55,7 @@ export class ModerationCommentModalComponent extends FormReactive implements OnI this.abuseService.updateAbuse(this.abuseToComment, { moderationComment }) .subscribe( () => { - this.notifier.success(this.i18n('Comment updated.')) + this.notifier.success($localize`Comment updated.`) this.commentUpdated.emit(moderationComment) this.hide()