Skip to content

Commit

Permalink
email field i18n implmented
Browse files Browse the repository at this point in the history
  • Loading branch information
heshanu committed Aug 12, 2024
1 parent d91e72f commit 5272afb
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 7 deletions.
4 changes: 2 additions & 2 deletions src/app/login/login.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<h2>{{'LOGIN'| translate}}</h2>

<mat-error *ngIf="!loginValid">
The username and password were not recognized
{{'LOGIN_FORM_LOGIN_ALL_CREDINTIAL_WRONG'|translate}}
</mat-error>
<mat-form-field>
<input matInput placeholder="Email" pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}" [(ngModel)]="username" name="username" required>
<mat-error>
Please provide a valid email address
{{'EMAIL_ERROR'| translate}}
</mat-error>
</mat-form-field>
<mat-form-field>
Expand Down
5 changes: 4 additions & 1 deletion src/assets/i18n/de.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"HELLO_WORLD": "Hallo, Welt!",
"LOGIN":"LOGIN"
"LOGIN":"LOGIN",
"LOGIN_FORM_LOGIN_ALL_CREDINTIAL_WRONG":"Der Benutzername und das Passwort wurden nicht erkannt",
"EMAIL_ERROR":"Bitte geben Sie eine gültige E-Mail-Adresse ans"

}

7 changes: 5 additions & 2 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
{
"HELLO_WORLD": "Hello, World!",
"LOGIN":"LOGIN"
}
"LOGIN":"LOGIN",
"LOGIN_FORM_LOGIN_ALL_CREDINTIAL_WRONG":"The username and password were not recognized",
"EMAIL_ERROR":" Please provide a valid email address"

}

6 changes: 4 additions & 2 deletions src/assets/i18n/ru.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
"HELLO_WORLD": "Привет, мир!",
"LOGIN":"Авторизоваться"
}
"LOGIN":"Авторизоваться",
"LOGIN_FORM_LOGIN_ALL_CREDINTIAL_WRONG":"Имя пользователя и пароль не были распознаны",
"EMAIL_ERROR":"Пожалуйста, укажите действительный адрес электронной почты"
}

0 comments on commit 5272afb

Please sign in to comment.