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-abuse-list/abuse-message-modal.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-abuse-list/abuse-message-modal.component.ts')
-rw-r--r-- | client/src/app/shared/shared-abuse-list/abuse-message-modal.component.ts | 10 |
1 files changed, 4 insertions, 6 deletions
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..0c3c8ff48 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,9 +1,8 @@ | |||
1 | import { Component, ElementRef, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core' | 1 | import { Component, EventEmitter, Input, OnInit, Output, ViewChild } from '@angular/core' |
2 | import { AuthService, Notifier, HtmlRendererService } from '@app/core' | 2 | import { AuthService, HtmlRendererService, Notifier } from '@app/core' |
3 | import { AbuseValidatorsService, FormReactive, FormValidatorService } from '@app/shared/shared-forms' | 3 | import { AbuseValidatorsService, FormReactive, FormValidatorService } from '@app/shared/shared-forms' |
4 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 4 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
5 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' | 5 | import { NgbModalRef } from '@ng-bootstrap/ng-bootstrap/modal/modal-ref' |
6 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
7 | import { AbuseMessage, UserAbuse } from '@shared/models' | 6 | import { AbuseMessage, UserAbuse } from '@shared/models' |
8 | import { AbuseService } from '../shared-moderation' | 7 | import { AbuseService } from '../shared-moderation' |
9 | 8 | ||
@@ -31,7 +30,6 @@ export class AbuseMessageModalComponent extends FormReactive implements OnInit { | |||
31 | protected formValidatorService: FormValidatorService, | 30 | protected formValidatorService: FormValidatorService, |
32 | private abuseValidatorsService: AbuseValidatorsService, | 31 | private abuseValidatorsService: AbuseValidatorsService, |
33 | private modalService: NgbModal, | 32 | private modalService: NgbModal, |
34 | private i18n: I18n, | ||
35 | private htmlRenderer: HtmlRendererService, | 33 | private htmlRenderer: HtmlRendererService, |
36 | private auth: AuthService, | 34 | private auth: AuthService, |
37 | private notifier: Notifier, | 35 | private notifier: Notifier, |
@@ -99,10 +97,10 @@ export class AbuseMessageModalComponent extends FormReactive implements OnInit { | |||
99 | 97 | ||
100 | getPlaceholderMessage () { | 98 | getPlaceholderMessage () { |
101 | if (this.isAdminView) { | 99 | if (this.isAdminView) { |
102 | return this.i18n('Add a message to communicate with the reporter') | 100 | return $localize`Add a message to communicate with the reporter` |
103 | } | 101 | } |
104 | 102 | ||
105 | return this.i18n('Add a message to communicate with the moderation team') | 103 | return $localize`Add a message to communicate with the moderation team` |
106 | } | 104 | } |
107 | 105 | ||
108 | private loadMessages () { | 106 | private loadMessages () { |