From b1d40cff89f7cff565a98cdbcea9a624196a169a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 4 Jun 2018 16:21:17 +0200 Subject: Add i18n attributes --- .../video-channel-about/video-channel-about.component.html | 8 ++++---- .../video-channel-about/video-channel-about.component.ts | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) (limited to 'client/src/app/+video-channels/video-channel-about') diff --git a/client/src/app/+video-channels/video-channel-about/video-channel-about.component.html b/client/src/app/+video-channels/video-channel-about/video-channel-about.component.html index a4338121f..b7125ff71 100644 --- a/client/src/app/+video-channels/video-channel-about/video-channel-about.component.html +++ b/client/src/app/+video-channels/video-channel-about/video-channel-about.component.html @@ -1,20 +1,20 @@
-
Description
+
Description
{{ getVideoChannelDescription() }}
-
Support this channel
+
Support this channel
{{ videoChannel.support }}
-
Stats
-
Created {{ videoChannel.createdAt | date }}
+
Stats
+
Created {{ videoChannel.createdAt | date }}
\ No newline at end of file diff --git a/client/src/app/+video-channels/video-channel-about/video-channel-about.component.ts b/client/src/app/+video-channels/video-channel-about/video-channel-about.component.ts index 6f862718f..c5fd442c6 100644 --- a/client/src/app/+video-channels/video-channel-about/video-channel-about.component.ts +++ b/client/src/app/+video-channels/video-channel-about/video-channel-about.component.ts @@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core' import { ActivatedRoute } from '@angular/router' import { VideoChannelService } from '@app/shared/video-channel/video-channel.service' import { VideoChannel } from '@app/shared/video-channel/video-channel.model' +import { I18n } from '@ngx-translate/i18n-polyfill' @Component({ selector: 'my-video-channel-about', @@ -12,7 +13,8 @@ export class VideoChannelAboutComponent implements OnInit { videoChannel: VideoChannel constructor ( - protected route: ActivatedRoute, + private route: ActivatedRoute, + private i18n: I18n, private videoChannelService: VideoChannelService ) { } @@ -25,6 +27,6 @@ export class VideoChannelAboutComponent implements OnInit { getVideoChannelDescription () { if (this.videoChannel.description) return this.videoChannel.description - return 'No description' + return this.i18n('No description') } } -- cgit v1.2.3