X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=client%2Fsrc%2Fapp%2Fshared%2Fshared-abuse-list%2Fabuse-message-modal.component.ts;h=9abb4c094e21fe93151dc3cf976bf6895964d374;hb=7a4ea932461f228ae44a173ddcd48ffb088aa023;hp=6686d91f4ea3de8c0794956cc54fd2604c2d6fc2;hpb=d573926e9b94fb19c8f51c53f71fc853182e1761;p=github%2FChocobozzz%2FPeerTube.git diff --git a/client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts b/client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts index 6686d91f4..9abb4c094 100644 --- a/client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts +++ b/client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts @@ -1,10 +1,10 @@ -import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core' -import { AuthService, Notifier, HtmlRendererService } from '@app/core' -import { AbuseValidatorsService, FormReactive, FormValidatorService } from '@app/shared/shared-forms' +import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core' +import { AuthService, HtmlRendererService, Notifier } from '@app/core' +import { FormReactive, FormValidatorService } from '@app/shared/shared-forms' 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 { AbuseMessage, UserAbuse } from '@shared/models' +import { ABUSE_MESSAGE_VALIDATOR } from '../form-validators/abuse-validators' import { AbuseService } from '../shared-moderation' @Component({ @@ -29,9 +29,7 @@ export class AbuseMessageModalComponent extends FormReactive implements OnInit { constructor ( protected formValidatorService: FormValidatorService, - private abuseValidatorsService: AbuseValidatorsService, private modalService: NgbModal, - private i18n: I18n, private htmlRenderer: HtmlRendererService, private auth: AuthService, private notifier: Notifier, @@ -42,7 +40,7 @@ export class AbuseMessageModalComponent extends FormReactive implements OnInit { ngOnInit () { this.buildForm({ - message: this.abuseValidatorsService.ABUSE_MESSAGE + message: ABUSE_MESSAGE_VALIDATOR }) } @@ -99,10 +97,10 @@ export class AbuseMessageModalComponent extends FormReactive implements OnInit { getPlaceholderMessage () { if (this.isAdminView) { - return this.i18n('Add a message to communicate with the reporter') + return $localize`Add a message to communicate with the reporter` } - return this.i18n('Add a message to communicate with the moderation team') + return $localize`Add a message to communicate with the moderation team` } private loadMessages () {