diff options
Diffstat (limited to 'client/src/app/shared/shared-moderation/report-modals')
3 files changed, 9 insertions, 15 deletions
diff --git a/client/src/app/shared/shared-moderation/report-modals/account-report.component.ts b/client/src/app/shared/shared-moderation/report-modals/account-report.component.ts index 08dbe9538..8ab2fe940 100644 --- a/client/src/app/shared/shared-moderation/report-modals/account-report.component.ts +++ b/client/src/app/shared/shared-moderation/report-modals/account-report.component.ts | |||
@@ -5,7 +5,6 @@ import { AbuseValidatorsService, FormReactive, FormValidatorService } from '@app | |||
5 | import { Account } from '@app/shared/shared-main' | 5 | import { Account } from '@app/shared/shared-main' |
6 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 6 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
7 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' | 7 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' |
8 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
9 | import { abusePredefinedReasonsMap } from '@shared/core-utils/abuse' | 8 | import { abusePredefinedReasonsMap } from '@shared/core-utils/abuse' |
10 | import { AbusePredefinedReasonsString } from '@shared/models' | 9 | import { AbusePredefinedReasonsString } from '@shared/models' |
11 | import { AbuseService } from '../abuse.service' | 10 | import { AbuseService } from '../abuse.service' |
@@ -31,8 +30,7 @@ export class AccountReportComponent extends FormReactive implements OnInit { | |||
31 | private modalService: NgbModal, | 30 | private modalService: NgbModal, |
32 | private abuseValidatorsService: AbuseValidatorsService, | 31 | private abuseValidatorsService: AbuseValidatorsService, |
33 | private abuseService: AbuseService, | 32 | private abuseService: AbuseService, |
34 | private notifier: Notifier, | 33 | private notifier: Notifier |
35 | private i18n: I18n | ||
36 | ) { | 34 | ) { |
37 | super() | 35 | super() |
38 | } | 36 | } |
@@ -50,7 +48,7 @@ export class AccountReportComponent extends FormReactive implements OnInit { | |||
50 | } | 48 | } |
51 | 49 | ||
52 | ngOnInit () { | 50 | ngOnInit () { |
53 | this.modalTitle = this.i18n('Report {{displayName}}', { displayName: this.account.displayName }) | 51 | this.modalTitle = $localize`Report ${this.account.displayName}` |
54 | 52 | ||
55 | this.buildForm({ | 53 | this.buildForm({ |
56 | reason: this.abuseValidatorsService.ABUSE_REASON, | 54 | reason: this.abuseValidatorsService.ABUSE_REASON, |
@@ -81,7 +79,7 @@ export class AccountReportComponent extends FormReactive implements OnInit { | |||
81 | } | 79 | } |
82 | }).subscribe( | 80 | }).subscribe( |
83 | () => { | 81 | () => { |
84 | this.notifier.success(this.i18n('Account reported.')) | 82 | this.notifier.success($localize`Account reported.`) |
85 | this.hide() | 83 | this.hide() |
86 | }, | 84 | }, |
87 | 85 | ||
diff --git a/client/src/app/shared/shared-moderation/report-modals/comment-report.component.ts b/client/src/app/shared/shared-moderation/report-modals/comment-report.component.ts index 2769874d9..d75f4d717 100644 --- a/client/src/app/shared/shared-moderation/report-modals/comment-report.component.ts +++ b/client/src/app/shared/shared-moderation/report-modals/comment-report.component.ts | |||
@@ -5,7 +5,6 @@ import { AbuseValidatorsService, FormReactive, FormValidatorService } from '@app | |||
5 | import { VideoComment } from '@app/shared/shared-video-comment' | 5 | import { VideoComment } from '@app/shared/shared-video-comment' |
6 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 6 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
7 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' | 7 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' |
8 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
9 | import { abusePredefinedReasonsMap } from '@shared/core-utils/abuse' | 8 | import { abusePredefinedReasonsMap } from '@shared/core-utils/abuse' |
10 | import { AbusePredefinedReasonsString } from '@shared/models' | 9 | import { AbusePredefinedReasonsString } from '@shared/models' |
11 | import { AbuseService } from '../abuse.service' | 10 | import { AbuseService } from '../abuse.service' |
@@ -31,8 +30,7 @@ export class CommentReportComponent extends FormReactive implements OnInit { | |||
31 | private modalService: NgbModal, | 30 | private modalService: NgbModal, |
32 | private abuseValidatorsService: AbuseValidatorsService, | 31 | private abuseValidatorsService: AbuseValidatorsService, |
33 | private abuseService: AbuseService, | 32 | private abuseService: AbuseService, |
34 | private notifier: Notifier, | 33 | private notifier: Notifier |
35 | private i18n: I18n | ||
36 | ) { | 34 | ) { |
37 | super() | 35 | super() |
38 | } | 36 | } |
@@ -50,7 +48,7 @@ export class CommentReportComponent extends FormReactive implements OnInit { | |||
50 | } | 48 | } |
51 | 49 | ||
52 | ngOnInit () { | 50 | ngOnInit () { |
53 | this.modalTitle = this.i18n('Report comment') | 51 | this.modalTitle = $localize`Report comment` |
54 | 52 | ||
55 | this.buildForm({ | 53 | this.buildForm({ |
56 | reason: this.abuseValidatorsService.ABUSE_REASON, | 54 | reason: this.abuseValidatorsService.ABUSE_REASON, |
@@ -81,7 +79,7 @@ export class CommentReportComponent extends FormReactive implements OnInit { | |||
81 | } | 79 | } |
82 | }).subscribe( | 80 | }).subscribe( |
83 | () => { | 81 | () => { |
84 | this.notifier.success(this.i18n('Comment reported.')) | 82 | this.notifier.success($localize`Comment reported.`) |
85 | this.hide() | 83 | this.hide() |
86 | }, | 84 | }, |
87 | 85 | ||
diff --git a/client/src/app/shared/shared-moderation/report-modals/video-report.component.ts b/client/src/app/shared/shared-moderation/report-modals/video-report.component.ts index 794dd54bb..edff6d325 100644 --- a/client/src/app/shared/shared-moderation/report-modals/video-report.component.ts +++ b/client/src/app/shared/shared-moderation/report-modals/video-report.component.ts | |||
@@ -1,12 +1,11 @@ | |||
1 | import { mapValues, pickBy } from 'lodash-es' | 1 | import { mapValues, pickBy } from 'lodash-es' |
2 | import { buildVideoOrPlaylistEmbed, buildVideoLink } from 'src/assets/player/utils' | 2 | import { buildVideoLink, buildVideoOrPlaylistEmbed } from 'src/assets/player/utils' |
3 | import { Component, Input, OnInit, ViewChild } from '@angular/core' | 3 | import { Component, Input, OnInit, ViewChild } from '@angular/core' |
4 | import { DomSanitizer, SafeHtml } from '@angular/platform-browser' | 4 | import { DomSanitizer, SafeHtml } from '@angular/platform-browser' |
5 | import { Notifier } from '@app/core' | 5 | import { Notifier } from '@app/core' |
6 | import { AbuseValidatorsService, FormReactive, FormValidatorService } from '@app/shared/shared-forms' | 6 | import { AbuseValidatorsService, FormReactive, FormValidatorService } from '@app/shared/shared-forms' |
7 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 7 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
8 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' | 8 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' |
9 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
10 | import { abusePredefinedReasonsMap } from '@shared/core-utils/abuse' | 9 | import { abusePredefinedReasonsMap } from '@shared/core-utils/abuse' |
11 | import { AbusePredefinedReasonsString } from '@shared/models' | 10 | import { AbusePredefinedReasonsString } from '@shared/models' |
12 | import { Video } from '../../shared-main' | 11 | import { Video } from '../../shared-main' |
@@ -34,8 +33,7 @@ export class VideoReportComponent extends FormReactive implements OnInit { | |||
34 | private abuseValidatorsService: AbuseValidatorsService, | 33 | private abuseValidatorsService: AbuseValidatorsService, |
35 | private abuseService: AbuseService, | 34 | private abuseService: AbuseService, |
36 | private notifier: Notifier, | 35 | private notifier: Notifier, |
37 | private sanitizer: DomSanitizer, | 36 | private sanitizer: DomSanitizer |
38 | private i18n: I18n | ||
39 | ) { | 37 | ) { |
40 | super() | 38 | super() |
41 | } | 39 | } |
@@ -109,7 +107,7 @@ export class VideoReportComponent extends FormReactive implements OnInit { | |||
109 | } | 107 | } |
110 | }).subscribe( | 108 | }).subscribe( |
111 | () => { | 109 | () => { |
112 | this.notifier.success(this.i18n('Video reported.')) | 110 | this.notifier.success($localize`Video reported.`) |
113 | this.hide() | 111 | this.hide() |
114 | }, | 112 | }, |
115 | 113 | ||