i18n for signin page.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
<form [formGroup]="signinForm" (submit)="performSignin()" ngNativeValidate>
|
||||
<h1>Signin</h1>
|
||||
<h1 i18n>Signin</h1>
|
||||
<div>
|
||||
<mat-icon>person</mat-icon>
|
||||
<label for="pseudo">
|
||||
<label for="pseudo" i18n>
|
||||
Pseudo
|
||||
<span class="required">*</span>
|
||||
</label>
|
||||
@@ -10,7 +10,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<mat-icon>mail</mat-icon>
|
||||
<label for="email">
|
||||
<label for="email" i18n>
|
||||
Email address
|
||||
<span class="required">*</span>
|
||||
</label>
|
||||
@@ -18,7 +18,7 @@
|
||||
</div>
|
||||
<div>
|
||||
<mat-icon>lock</mat-icon>
|
||||
<label for="password">
|
||||
<label for="password" i18n>
|
||||
Password
|
||||
<span class="required">*</span>
|
||||
</label>
|
||||
@@ -26,14 +26,14 @@
|
||||
</div>
|
||||
<div>
|
||||
<mat-icon>lock</mat-icon>
|
||||
<label for="confirm-password">
|
||||
<label for="confirm-password" i18n>
|
||||
Confirm password
|
||||
<span class="required">*</span>
|
||||
</label>
|
||||
<input type="password" id="confirm-password" formControlName="confirmPassword" required />
|
||||
</div>
|
||||
<div class="actions">
|
||||
<button type="submit">Send</button>
|
||||
<a [routerLink]="['/login']">I already have an account</a>
|
||||
<button type="submit" i18n>Send</button>
|
||||
<a [routerLink]="['/login']" i18n>I already have an account</a>
|
||||
</div>
|
||||
</form>
|
||||
@@ -1,23 +0,0 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { SigninComponent } from './signin.component';
|
||||
|
||||
describe('SigninComponent', () => {
|
||||
let component: SigninComponent;
|
||||
let fixture: ComponentFixture<SigninComponent>;
|
||||
|
||||
beforeEach(async () => {
|
||||
await TestBed.configureTestingModule({
|
||||
imports: [SigninComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
|
||||
fixture = TestBed.createComponent(SigninComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -76,7 +76,7 @@ export class SigninService {
|
||||
if (state.request.password !== state.confirmPassword) {
|
||||
const confirmPasswordError: FormError = {
|
||||
fieldName: 'confirmPassword',
|
||||
errorMessage: 'Typed password are different.'
|
||||
errorMessage: $localize`Typed passwords are different.`
|
||||
}
|
||||
state.errors.filter(error => error.fieldName !== 'confirmPassword');
|
||||
state.errors.push(confirmPasswordError)
|
||||
|
||||
Reference in New Issue
Block a user