diff options
author | Chocobozzz <me@florianbigard.com> | 2020-08-12 10:40:04 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-08-14 10:28:30 +0200 |
commit | 66357162f8e1227495f09bd4f68446aad7071c6d (patch) | |
tree | 7d4429506deb512b2fe1d0267f38a28cda20af55 /client/src/app/shared/shared-moderation/report-modals/comment-report.component.ts | |
parent | 8c360747995e17eb5520e22fc3d7bd4c3d26eeee (diff) | |
download | PeerTube-66357162f8e1227495f09bd4f68446aad7071c6d.tar.gz PeerTube-66357162f8e1227495f09bd4f68446aad7071c6d.tar.zst PeerTube-66357162f8e1227495f09bd4f68446aad7071c6d.zip |
Migrate to $localize
* Remove i18n polyfill to translate things in components
* Reduce bundle sizes
* Improve runtime perf
* Reduce a lot the time to make a full client build
* Reduce client build complexity
* We don't need a service to translate things anymore (so we will be able to translate title pages etc)
Unfortunately we may loose some translations in the migration process.
I'll put a message on weblate to notify translators
Diffstat (limited to 'client/src/app/shared/shared-moderation/report-modals/comment-report.component.ts')
-rw-r--r-- | client/src/app/shared/shared-moderation/report-modals/comment-report.component.ts | 8 |
1 files changed, 3 insertions, 5 deletions
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 | ||