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/modal/confirm.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/modal/confirm.component.ts')
-rw-r--r-- | client/src/app/modal/confirm.component.ts | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/client/src/app/modal/confirm.component.ts b/client/src/app/modal/confirm.component.ts index 2c7ef46c4..457dd1f3f 100644 --- a/client/src/app/modal/confirm.component.ts +++ b/client/src/app/modal/confirm.component.ts | |||
@@ -3,7 +3,6 @@ import { ConfirmService } from '@app/core/confirm/confirm.service' | |||
3 | import { POP_STATE_MODAL_DISMISS } from '@app/helpers' | 3 | import { POP_STATE_MODAL_DISMISS } from '@app/helpers' |
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 | 6 | ||
8 | @Component({ | 7 | @Component({ |
9 | selector: 'my-confirm', | 8 | selector: 'my-confirm', |
@@ -25,8 +24,7 @@ export class ConfirmComponent implements OnInit { | |||
25 | 24 | ||
26 | constructor ( | 25 | constructor ( |
27 | private modalService: NgbModal, | 26 | private modalService: NgbModal, |
28 | private confirmService: ConfirmService, | 27 | private confirmService: ConfirmService |
29 | private i18n: I18n | ||
30 | ) { } | 28 | ) { } |
31 | 29 | ||
32 | ngOnInit () { | 30 | ngOnInit () { |
@@ -38,7 +36,7 @@ export class ConfirmComponent implements OnInit { | |||
38 | this.inputLabel = inputLabel | 36 | this.inputLabel = inputLabel |
39 | this.expectedInputValue = expectedInputValue | 37 | this.expectedInputValue = expectedInputValue |
40 | 38 | ||
41 | this.confirmButtonText = confirmButtonText || this.i18n('Confirm') | 39 | this.confirmButtonText = confirmButtonText || $localize`Confirm` |
42 | 40 | ||
43 | this.showModal() | 41 | this.showModal() |
44 | } | 42 | } |