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/+my-account/my-account-ownership/my-account-accept-ownership | |
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/+my-account/my-account-ownership/my-account-accept-ownership')
-rw-r--r-- | client/src/app/+my-account/my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component.ts | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/client/src/app/+my-account/my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component.ts b/client/src/app/+my-account/my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component.ts index 0e62b5ca5..3bfffe2da 100644 --- a/client/src/app/+my-account/my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component.ts +++ b/client/src/app/+my-account/my-account-ownership/my-account-accept-ownership/my-account-accept-ownership.component.ts | |||
@@ -3,7 +3,6 @@ import { AuthService, Notifier } from '@app/core' | |||
3 | import { FormReactive, FormValidatorService, VideoAcceptOwnershipValidatorsService } from '@app/shared/shared-forms' | 3 | import { FormReactive, FormValidatorService, VideoAcceptOwnershipValidatorsService } from '@app/shared/shared-forms' |
4 | import { VideoChannelService, VideoOwnershipService } from '@app/shared/shared-main' | 4 | import { VideoChannelService, VideoOwnershipService } from '@app/shared/shared-main' |
5 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' | 5 | import { NgbModal } from '@ng-bootstrap/ng-bootstrap' |
6 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
7 | import { VideoChangeOwnership, VideoChannel } from '@shared/models' | 6 | import { VideoChangeOwnership, VideoChannel } from '@shared/models' |
8 | 7 | ||
9 | @Component({ | 8 | @Component({ |
@@ -29,9 +28,8 @@ export class MyAccountAcceptOwnershipComponent extends FormReactive implements O | |||
29 | private notifier: Notifier, | 28 | private notifier: Notifier, |
30 | private authService: AuthService, | 29 | private authService: AuthService, |
31 | private videoChannelService: VideoChannelService, | 30 | private videoChannelService: VideoChannelService, |
32 | private modalService: NgbModal, | 31 | private modalService: NgbModal |
33 | private i18n: I18n | 32 | ) { |
34 | ) { | ||
35 | super() | 33 | super() |
36 | } | 34 | } |
37 | 35 | ||
@@ -63,7 +61,7 @@ export class MyAccountAcceptOwnershipComponent extends FormReactive implements O | |||
63 | .acceptOwnership(videoChangeOwnership.id, { channelId: channel }) | 61 | .acceptOwnership(videoChangeOwnership.id, { channelId: channel }) |
64 | .subscribe( | 62 | .subscribe( |
65 | () => { | 63 | () => { |
66 | this.notifier.success(this.i18n('Ownership accepted')) | 64 | this.notifier.success($localize`Ownership accepted`) |
67 | if (this.accepted) this.accepted.emit() | 65 | if (this.accepted) this.accepted.emit() |
68 | this.videoChangeOwnership = undefined | 66 | this.videoChangeOwnership = undefined |
69 | }, | 67 | }, |