diff options
Diffstat (limited to 'client/src/app/+admin/users/user-edit/user-update.component.ts')
-rw-r--r-- | client/src/app/+admin/users/user-edit/user-update.component.ts | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/client/src/app/+admin/users/user-edit/user-update.component.ts b/client/src/app/+admin/users/user-edit/user-update.component.ts index 3cde07c65..dca555706 100644 --- a/client/src/app/+admin/users/user-edit/user-update.component.ts +++ b/client/src/app/+admin/users/user-edit/user-update.component.ts | |||
@@ -8,6 +8,7 @@ import { User, USER_EMAIL, USER_ROLE, USER_VIDEO_QUOTA } from '../../../shared' | |||
8 | import { ServerService } from '../../../core' | 8 | import { ServerService } from '../../../core' |
9 | import { UserEdit } from './user-edit' | 9 | import { UserEdit } from './user-edit' |
10 | import { UserUpdate } from '../../../../../../shared' | 10 | import { UserUpdate } from '../../../../../../shared' |
11 | import { I18n } from '@ngx-translate/i18n-polyfill' | ||
11 | 12 | ||
12 | @Component({ | 13 | @Component({ |
13 | selector: 'my-user-update', | 14 | selector: 'my-user-update', |
@@ -39,7 +40,8 @@ export class UserUpdateComponent extends UserEdit implements OnInit, OnDestroy { | |||
39 | private router: Router, | 40 | private router: Router, |
40 | private notificationsService: NotificationsService, | 41 | private notificationsService: NotificationsService, |
41 | private formBuilder: FormBuilder, | 42 | private formBuilder: FormBuilder, |
42 | private userService: UserService | 43 | private userService: UserService, |
44 | private i18n: I18n | ||
43 | ) { | 45 | ) { |
44 | super() | 46 | super() |
45 | } | 47 | } |
@@ -81,7 +83,10 @@ export class UserUpdateComponent extends UserEdit implements OnInit, OnDestroy { | |||
81 | 83 | ||
82 | this.userService.updateUser(this.userId, userUpdate).subscribe( | 84 | this.userService.updateUser(this.userId, userUpdate).subscribe( |
83 | () => { | 85 | () => { |
84 | this.notificationsService.success('Success', `User ${this.username} updated.`) | 86 | this.notificationsService.success( |
87 | this.i18n('Success'), | ||
88 | this.i18n('User {{ username }} updated.', { username: this.username }) | ||
89 | ) | ||
85 | this.router.navigate([ '/admin/users/list' ]) | 90 | this.router.navigate([ '/admin/users/list' ]) |
86 | }, | 91 | }, |
87 | 92 | ||
@@ -94,7 +99,7 @@ export class UserUpdateComponent extends UserEdit implements OnInit, OnDestroy { | |||
94 | } | 99 | } |
95 | 100 | ||
96 | getFormButtonTitle () { | 101 | getFormButtonTitle () { |
97 | return 'Update user' | 102 | return this.i18n('Update user') |
98 | } | 103 | } |
99 | 104 | ||
100 | private onUserFetched (userJson: User) { | 105 | private onUserFetched (userJson: User) { |