From b1d40cff89f7cff565a98cdbcea9a624196a169a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Mon, 4 Jun 2018 16:21:17 +0200 Subject: Add i18n attributes --- .../my-account-change-password.component.html | 8 ++++---- .../my-account-change-password.component.ts | 8 +++++--- .../my-account-profile.component.html | 6 +++--- .../my-account-profile.component.ts | 6 ++++-- .../my-account-settings.component.html | 14 +++++++------- .../my-account-settings.component.ts | 10 ++++++---- .../my-account-video-settings.component.html | 17 ++++++++++------- .../my-account-video-settings.component.ts | 8 +++++--- .../my-account-video-channel-create.component.ts | 11 ++++++++--- .../my-account-video-channel-edit.component.html | 10 +++++----- .../my-account-video-channel-update.component.ts | 11 ++++++++--- .../my-account-video-channels.component.html | 6 +++--- .../my-account-video-channels.component.ts | 20 ++++++++++++++------ .../my-account-videos.component.html | 8 ++++---- .../my-account-videos.component.ts | 22 ++++++++++++++-------- .../src/app/+my-account/my-account.component.html | 6 +++--- 16 files changed, 103 insertions(+), 68 deletions(-) (limited to 'client/src/app/+my-account') diff --git a/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.html b/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.html index b0e3cada4..767ef0336 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.html +++ b/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.html @@ -2,9 +2,9 @@
- +
@@ -12,9 +12,9 @@
- +
diff --git a/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts b/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts index 80af668f9..1a88aa82e 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts +++ b/client/src/app/+my-account/my-account-settings/my-account-change-password/my-account-change-password.component.ts @@ -2,6 +2,7 @@ import { Component, OnInit } from '@angular/core' import { FormBuilder, FormGroup } from '@angular/forms' import { NotificationsService } from 'angular2-notifications' import { FormReactive, USER_PASSWORD, UserService } from '../../../shared' +import { I18n } from '@ngx-translate/i18n-polyfill' @Component({ selector: 'my-account-change-password', @@ -24,7 +25,8 @@ export class MyAccountChangePasswordComponent extends FormReactive implements On constructor ( private formBuilder: FormBuilder, private notificationsService: NotificationsService, - private userService: UserService + private userService: UserService, + private i18n: I18n ) { super() } @@ -49,12 +51,12 @@ export class MyAccountChangePasswordComponent extends FormReactive implements On this.error = null if (newPassword !== newConfirmedPassword) { - this.error = 'The new password and the confirmed password do not correspond.' + this.error = this.i18n('The new password and the confirmed password do not correspond.') return } this.userService.changePassword(newPassword).subscribe( - () => this.notificationsService.success('Success', 'Password updated.'), + () => this.notificationsService.success(this.i18n('Success'), this.i18n('Password updated.')), err => this.error = err.message ) diff --git a/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.html b/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.html index 306f3a12c..bbdce5b02 100644 --- a/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.html +++ b/client/src/app/+my-account/my-account-settings/my-account-profile/my-account-profile.component.html @@ -2,7 +2,7 @@
- + - +