import { Component, Input, OnInit } from '@angular/core'
import { Notifier, UserService } from '@app/core'
import { FormReactive, FormValidatorService, UserValidatorsService } from '@app/shared/shared-forms'
-import { I18n } from '@ngx-translate/i18n-polyfill'
import { UserUpdate } from '@shared/models'
@Component({
protected formValidatorService: FormValidatorService,
private userValidatorsService: UserValidatorsService,
private notifier: Notifier,
- private userService: UserService,
- private i18n: I18n
- ) {
+ private userService: UserService
+ ) {
super()
}
this.userService.updateUser(this.userId, userUpdate).subscribe(
() => {
- this.notifier.success(
- this.i18n('Password changed for user {{username}}.', { username: this.username })
- )
+ this.notifier.success($localize`Password changed for user ${this.username}.`)
},
err => this.error = err.message
}
getFormButtonTitle () {
- return this.i18n('Update user password')
+ return $localize`Update user password`
}
}