From b1d40cff89f7cff565a98cdbcea9a624196a169a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 4 Jun 2018 16:21:17 +0200 Subject: Add i18n attributes --- .../my-account-video-channel-create.component.ts | 11 ++++++++--- .../my-account-video-channel-edit.component.html | 10 +++++----- .../my-account-video-channel-update.component.ts | 11 ++++++++--- .../my-account-video-channels.component.html | 6 +++--- .../my-account-video-channels.component.ts | 20 ++++++++++++++------ 5 files changed, 38 insertions(+), 20 deletions(-) (limited to 'client/src/app/+my-account/my-account-video-channels') diff --git a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts index c82bb39c8..9b5a12d18 100644 --- a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts +++ b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-create.component.ts @@ -11,6 +11,7 @@ import { } from '@app/shared/forms/form-validators/video-channel' import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' import { AuthService } from '@app/core' +import { I18n } from '@ngx-translate/i18n-polyfill' @Component({ selector: 'my-account-video-channel-create', @@ -37,7 +38,8 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelE private notificationsService: NotificationsService, private router: Router, private formBuilder: FormBuilder, - private videoChannelService: VideoChannelService + private videoChannelService: VideoChannelService, + private i18n: I18n ) { super() } @@ -69,7 +71,10 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelE this.videoChannelService.createVideoChannel(videoChannelCreate).subscribe( () => { this.authService.refreshUserInformation() - this.notificationsService.success('Success', `Video channel ${videoChannelCreate.displayName} created.`) + this.notificationsService.success( + this.i18n('Success'), + this.i18n('Video channel {{ videoChannelName }} created.', { videoChannelName: videoChannelCreate.displayName }) + ) this.router.navigate([ '/my-account', 'video-channels' ]) }, @@ -82,6 +87,6 @@ export class MyAccountVideoChannelCreateComponent extends MyAccountVideoChannelE } getFormButtonTitle () { - return 'Create' + return this.i18n('Create') } } diff --git a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.component.html b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.component.html index 10d408d55..1c08cfdca 100644 --- a/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.component.html +++ b/client/src/app/+my-account/my-account-video-channels/my-account-video-channel-edit.component.html @@ -1,11 +1,11 @@ -
Create a video channel
-
Update {{ videoChannel?.displayName }}
+
Create a video channel
+
Update {{ videoChannel?.displayName }}
{{ error }}
- +
- +