diff options
author | Chocobozzz <me@florianbigard.com> | 2018-06-04 16:21:17 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-06-05 08:43:01 +0200 |
commit | b1d40cff89f7cff565a98cdbcea9a624196a169a (patch) | |
tree | d24746c1cc69f50471a9eba0dfb1c1bae06a1870 /client/src/app/+my-account/my-account-video-channels/my-account-video-channel-update.component.ts | |
parent | 989e526abf0c0dd7958deb630df009608561bb67 (diff) | |
download | PeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.tar.gz PeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.tar.zst PeerTube-b1d40cff89f7cff565a98cdbcea9a624196a169a.zip |
Add i18n attributes
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.ts | 11 |
1 files changed, 8 insertions, 3 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 b4c8df3cd..78c578764 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 | |||
@@ -13,6 +13,7 @@ import { VideoChannelService } from '@app/shared/video-channel/video-channel.ser | |||
13 | import { Subscription } from 'rxjs' | 13 | import { Subscription } from 'rxjs' |
14 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' | 14 | import { VideoChannel } from '@app/shared/video-channel/video-channel.model' |
15 | import { AuthService } from '@app/core' | 15 | import { AuthService } from '@app/core' |
16 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
16 | 17 | ||
17 | @Component({ | 18 | @Component({ |
18 | selector: 'my-account-video-channel-update', | 19 | selector: 'my-account-video-channel-update', |
@@ -43,7 +44,8 @@ export class MyAccountVideoChannelUpdateComponent extends MyAccountVideoChannelE | |||
43 | private router: Router, | 44 | private router: Router, |
44 | private route: ActivatedRoute, | 45 | private route: ActivatedRoute, |
45 | private formBuilder: FormBuilder, | 46 | private formBuilder: FormBuilder, |
46 | private videoChannelService: VideoChannelService | 47 | private videoChannelService: VideoChannelService, |
48 | private i18n: I18n | ||
47 | ) { | 49 | ) { |
48 | super() | 50 | super() |
49 | } | 51 | } |
@@ -97,7 +99,10 @@ export class MyAccountVideoChannelUpdateComponent extends MyAccountVideoChannelE | |||
97 | this.videoChannelService.updateVideoChannel(this.videoChannelToUpdate.uuid, videoChannelUpdate).subscribe( | 99 | this.videoChannelService.updateVideoChannel(this.videoChannelToUpdate.uuid, videoChannelUpdate).subscribe( |
98 | () => { | 100 | () => { |
99 | this.authService.refreshUserInformation() | 101 | this.authService.refreshUserInformation() |
100 | this.notificationsService.success('Success', `Video channel ${videoChannelUpdate.displayName} updated.`) | 102 | this.notificationsService.success( |
103 | this.i18n('Success'), | ||
104 | this.i18n('Video channel {{ videoChannelName }} updated.', { videoChannelName: videoChannelUpdate.displayName }) | ||
105 | ) | ||
101 | this.router.navigate([ '/my-account', 'video-channels' ]) | 106 | this.router.navigate([ '/my-account', 'video-channels' ]) |
102 | }, | 107 | }, |
103 | 108 | ||
@@ -110,6 +115,6 @@ export class MyAccountVideoChannelUpdateComponent extends MyAccountVideoChannelE | |||
110 | } | 115 | } |
111 | 116 | ||
112 | getFormButtonTitle () { | 117 | getFormButtonTitle () { |
113 | return 'Update' | 118 | return this.i18n('Update') |
114 | } | 119 | } |
115 | } | 120 | } |