diff options
Diffstat (limited to 'client/src/app/+my-account/my-account-settings/my-account-settings.component.ts')
-rw-r--r-- | client/src/app/+my-account/my-account-settings/my-account-settings.component.ts | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts b/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts index 06d1138e7..44eddaa7c 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-settings.component.ts | |||
@@ -5,6 +5,7 @@ import { AuthService } from '../../core' | |||
5 | import { ServerService } from '../../core/server' | 5 | import { ServerService } from '../../core/server' |
6 | import { User } from '../../shared' | 6 | import { User } from '../../shared' |
7 | import { UserService } from '../../shared/users' | 7 | import { UserService } from '../../shared/users' |
8 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
8 | 9 | ||
9 | @Component({ | 10 | @Component({ |
10 | selector: 'my-account-settings', | 11 | selector: 'my-account-settings', |
@@ -22,7 +23,8 @@ export class MyAccountSettingsComponent implements OnInit { | |||
22 | private userService: UserService, | 23 | private userService: UserService, |
23 | private authService: AuthService, | 24 | private authService: AuthService, |
24 | private serverService: ServerService, | 25 | private serverService: ServerService, |
25 | private notificationsService: NotificationsService | 26 | private notificationsService: NotificationsService, |
27 | private i18n: I18n | ||
26 | ) {} | 28 | ) {} |
27 | 29 | ||
28 | ngOnInit () { | 30 | ngOnInit () { |
@@ -33,7 +35,7 @@ export class MyAccountSettingsComponent implements OnInit { | |||
33 | if (this.user.videoQuota !== -1) { | 35 | if (this.user.videoQuota !== -1) { |
34 | this.userVideoQuota = new BytesPipe().transform(this.user.videoQuota, 0).toString() | 36 | this.userVideoQuota = new BytesPipe().transform(this.user.videoQuota, 0).toString() |
35 | } else { | 37 | } else { |
36 | this.userVideoQuota = 'Unlimited' | 38 | this.userVideoQuota = this.i18n('Unlimited') |
37 | } | 39 | } |
38 | } | 40 | } |
39 | ) | 41 | ) |
@@ -51,12 +53,12 @@ export class MyAccountSettingsComponent implements OnInit { | |||
51 | this.userService.changeAvatar(formData) | 53 | this.userService.changeAvatar(formData) |
52 | .subscribe( | 54 | .subscribe( |
53 | data => { | 55 | data => { |
54 | this.notificationsService.success('Success', 'Avatar changed.') | 56 | this.notificationsService.success(this.i18n('Success'), this.i18n('Avatar changed.')) |
55 | 57 | ||
56 | this.user.account.avatar = data.avatar | 58 | this.user.account.avatar = data.avatar |
57 | }, | 59 | }, |
58 | 60 | ||
59 | err => this.notificationsService.error('Error', err.message) | 61 | err => this.notificationsService.error(this.i18n('Error'), err.message) |
60 | ) | 62 | ) |
61 | } | 63 | } |
62 | 64 | ||