aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2020-08-12 10:40:04 +0200
committerChocobozzz <me@florianbigard.com>2020-08-14 10:28:30 +0200
commit66357162f8e1227495f09bd4f68446aad7071c6d (patch)
tree7d4429506deb512b2fe1d0267f38a28cda20af55 /client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.ts
parent8c360747995e17eb5520e22fc3d7bd4c3d26eeee (diff)
downloadPeerTube-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-videos/video-change-ownership/video-change-ownership.component.ts')
-rw-r--r--client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.ts8
1 files changed, 3 insertions, 5 deletions
diff --git a/client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.ts b/client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.ts
index 18e716a09..edd691694 100644
--- a/client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.ts
+++ b/client/src/app/+my-account/my-account-videos/video-change-ownership/video-change-ownership.component.ts
@@ -3,7 +3,6 @@ import { Notifier, UserService } from '@app/core'
3import { FormReactive, FormValidatorService, VideoChangeOwnershipValidatorsService } from '@app/shared/shared-forms' 3import { FormReactive, FormValidatorService, VideoChangeOwnershipValidatorsService } from '@app/shared/shared-forms'
4import { Video, VideoOwnershipService } from '@app/shared/shared-main' 4import { Video, VideoOwnershipService } from '@app/shared/shared-main'
5import { NgbModal } from '@ng-bootstrap/ng-bootstrap' 5import { NgbModal } from '@ng-bootstrap/ng-bootstrap'
6import { I18n } from '@ngx-translate/i18n-polyfill'
7 6
8@Component({ 7@Component({
9 selector: 'my-video-change-ownership', 8 selector: 'my-video-change-ownership',
@@ -25,9 +24,8 @@ export class VideoChangeOwnershipComponent extends FormReactive implements OnIni
25 private videoOwnershipService: VideoOwnershipService, 24 private videoOwnershipService: VideoOwnershipService,
26 private notifier: Notifier, 25 private notifier: Notifier,
27 private userService: UserService, 26 private userService: UserService,
28 private modalService: NgbModal, 27 private modalService: NgbModal
29 private i18n: I18n 28 ) {
30 ) {
31 super() 29 super()
32 } 30 }
33 31
@@ -63,7 +61,7 @@ export class VideoChangeOwnershipComponent extends FormReactive implements OnIni
63 this.videoOwnershipService 61 this.videoOwnershipService
64 .changeOwnership(this.video.id, username) 62 .changeOwnership(this.video.id, username)
65 .subscribe( 63 .subscribe(
66 () => this.notifier.success(this.i18n('Ownership change request sent.')), 64 () => this.notifier.success($localize`Ownership change request sent.`),
67 65
68 err => this.notifier.error(err.message) 66 err => this.notifier.error(err.message)
69 ) 67 )