]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/core/auth/user-password-form/user-password-form.component.ts
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / core / auth / user-password-form / user-password-form.component.ts
index cf08a134fb33f6fb3fbe3405afaee41a6106a924..dffb927ac16ec64b9449077df4c5dfabc5c7b24a 100644 (file)
@@ -2,19 +2,18 @@ import { Component } from '@angular/core';
 import { Validators } from '@angular/forms';
 import { Router } from '@angular/router';
 
-import { I18n } from '@ngx-translate/i18n-polyfill';
-import * as _ from 'lodash';
+import _ from 'lodash';
 
-import { UserService } from '../../../shared/api/user.service';
-import { ActionLabelsI18n } from '../../../shared/constants/app.constants';
-import { Icons } from '../../../shared/enum/icons.enum';
-import { NotificationType } from '../../../shared/enum/notification-type.enum';
-import { CdFormBuilder } from '../../../shared/forms/cd-form-builder';
-import { CdFormGroup } from '../../../shared/forms/cd-form-group';
-import { CdValidators } from '../../../shared/forms/cd-validators';
-import { AuthStorageService } from '../../../shared/services/auth-storage.service';
-import { NotificationService } from '../../../shared/services/notification.service';
-import { PasswordPolicyService } from '../../../shared/services/password-policy.service';
+import { UserService } from '~/app/shared/api/user.service';
+import { ActionLabelsI18n } from '~/app/shared/constants/app.constants';
+import { Icons } from '~/app/shared/enum/icons.enum';
+import { NotificationType } from '~/app/shared/enum/notification-type.enum';
+import { CdFormBuilder } from '~/app/shared/forms/cd-form-builder';
+import { CdFormGroup } from '~/app/shared/forms/cd-form-group';
+import { CdValidators } from '~/app/shared/forms/cd-validators';
+import { AuthStorageService } from '~/app/shared/services/auth-storage.service';
+import { NotificationService } from '~/app/shared/services/notification.service';
+import { PasswordPolicyService } from '~/app/shared/services/password-policy.service';
 
 @Component({
   selector: 'cd-user-password-form',
@@ -31,7 +30,6 @@ export class UserPasswordFormComponent {
   icons = Icons;
 
   constructor(
-    public i18n: I18n,
     public actionLabels: ActionLabelsI18n,
     public notificationService: NotificationService,
     public userService: UserService,
@@ -41,7 +39,7 @@ export class UserPasswordFormComponent {
     public passwordPolicyService: PasswordPolicyService
   ) {
     this.action = this.actionLabels.CHANGE;
-    this.resource = this.i18n('password');
+    this.resource = $localize`password`;
     this.createForm();
   }
 
@@ -115,7 +113,7 @@ export class UserPasswordFormComponent {
    * Override this in derived classes to change the behaviour.
    */
   onPasswordChange() {
-    this.notificationService.show(NotificationType.success, this.i18n('Updated user password"'));
+    this.notificationService.show(NotificationType.success, $localize`Updated user password"`);
     this.router.navigate(['/login']);
   }
 }