Skip to content

Commit

Permalink
implmented i18n for all loginpage
Browse files Browse the repository at this point in the history
  • Loading branch information
heshanu committed Aug 12, 2024
1 parent 5272afb commit 9b9dc38
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
5 changes: 3 additions & 2 deletions src/app/login/login.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ <h2>{{'LOGIN'| translate}}</h2>
<mat-form-field>
<input matInput type="password" placeholder="Password" [(ngModel)]="password" name="password" required>
<mat-error>
Please provide a valid password
{{'PASSWORD_ERROR'|translate}}
</mat-error>
</mat-form-field>
<button mat-raised-button color="primary" [disabled]="!loginForm.form.valid">Login</button>
<button mat-raised-button color="primary"
[disabled]="!loginForm.form.valid">{{'LOGIN_BTN'| translate }}</button>
</form>
</mat-card-content>
</mat-card>
6 changes: 4 additions & 2 deletions src/assets/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@
"HELLO_WORLD": "Hallo, Welt!",
"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"

"EMAIL_ERROR":"Bitte geben Sie eine gültige E-Mail-Adresse ans",
"PASSWORD_ERROR":"Bitte geben Sie ein gültiges Passwort ein",
"LOGIN_BTN":"LOGIN"

}

6 changes: 4 additions & 2 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
{

"HELLO_WORLD": "Hello, World!",
"LOGIN":"LOGIN",
"LOGIN_FORM_LOGIN_ALL_CREDINTIAL_WRONG":"The username and password were not recognized",
"EMAIL_ERROR":" Please provide a valid email address"

"EMAIL_ERROR":" Please provide a valid email address",
"PASSWORD_ERROR":"Please provide a valid password",
"LOGIN_BTN":"LOGIN"
}

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

0 comments on commit 9b9dc38

Please sign in to comment.