aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-update.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-video-channels/my-account-video-channel-update.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-video-channels/my-account-video-channel-update.component.ts')
-rw-r--r--client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-update.component.ts10
1 files changed, 3 insertions, 7 deletions
diff --git a/client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-update.component.ts b/client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-update.component.ts
index 489c437ea..485521dcc 100644
--- a/client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-update.component.ts
+++ b/client/src/app/+my-account/+my-account-video-channels/my-account-video-channel-update.component.ts
@@ -4,7 +4,6 @@ import { ActivatedRoute, Router } from '@angular/router'
4import { AuthService, Notifier, ServerService } from '@app/core' 4import { AuthService, Notifier, ServerService } from '@app/core'
5import { FormValidatorService, VideoChannelValidatorsService } from '@app/shared/shared-forms' 5import { FormValidatorService, VideoChannelValidatorsService } from '@app/shared/shared-forms'
6import { VideoChannel, VideoChannelService } from '@app/shared/shared-main' 6import { VideoChannel, VideoChannelService } from '@app/shared/shared-main'
7import { I18n } from '@ngx-translate/i18n-polyfill'
8import { ServerConfig, VideoChannelUpdate } from '@shared/models' 7import { ServerConfig, VideoChannelUpdate } from '@shared/models'
9import { MyAccountVideoChannelEdit } from './my-account-video-channel-edit' 8import { MyAccountVideoChannelEdit } from './my-account-video-channel-edit'
10 9
@@ -29,7 +28,6 @@ export class MyAccountVideoChannelUpdateComponent extends MyAccountVideoChannelE
29 private router: Router, 28 private router: Router,
30 private route: ActivatedRoute, 29 private route: ActivatedRoute,
31 private videoChannelService: VideoChannelService, 30 private videoChannelService: VideoChannelService,
32 private i18n: I18n,
33 private serverService: ServerService 31 private serverService: ServerService
34 ) { 32 ) {
35 super() 33 super()
@@ -87,9 +85,7 @@ export class MyAccountVideoChannelUpdateComponent extends MyAccountVideoChannelE
87 () => { 85 () => {
88 this.authService.refreshUserInformation() 86 this.authService.refreshUserInformation()
89 87
90 this.notifier.success( 88 this.notifier.success($localize`Video channel ${videoChannelUpdate.displayName} updated.`)
91 this.i18n('Video channel {{videoChannelName}} updated.', { videoChannelName: videoChannelUpdate.displayName })
92 )
93 89
94 this.router.navigate([ '/my-account', 'video-channels' ]) 90 this.router.navigate([ '/my-account', 'video-channels' ])
95 }, 91 },
@@ -102,7 +98,7 @@ export class MyAccountVideoChannelUpdateComponent extends MyAccountVideoChannelE
102 this.videoChannelService.changeVideoChannelAvatar(this.videoChannelToUpdate.name, formData) 98 this.videoChannelService.changeVideoChannelAvatar(this.videoChannelToUpdate.name, formData)
103 .subscribe( 99 .subscribe(
104 data => { 100 data => {
105 this.notifier.success(this.i18n('Avatar changed.')) 101 this.notifier.success($localize`Avatar changed.`)
106 102
107 this.videoChannelToUpdate.updateAvatar(data.avatar) 103 this.videoChannelToUpdate.updateAvatar(data.avatar)
108 }, 104 },
@@ -124,7 +120,7 @@ export class MyAccountVideoChannelUpdateComponent extends MyAccountVideoChannelE
124 } 120 }
125 121
126 getFormButtonTitle () { 122 getFormButtonTitle () {
127 return this.i18n('Update') 123 return $localize`Update`
128 } 124 }
129 125
130 isBulkUpdateVideosDisplayed () { 126 isBulkUpdateVideosDisplayed () {