-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1064 from ORCID/introduce-angular-i18n
Introduce angular i18n
- Loading branch information
Showing
26 changed files
with
10,358 additions
and
250 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
111 changes: 73 additions & 38 deletions
111
ui/src/app/account/password/password-reset-init.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,81 @@ | ||
<div class="container m-3"> | ||
<div class="row justify-content-center"> | ||
<div class="col-md-8"> | ||
<h1 jhiTranslate="reset.request.title.string">Reset your password</h1> | ||
<div class="row justify-content-center"> | ||
<div class="col-md-8"> | ||
<h1 i18n="@@reset.request.title.string">Reset your password</h1> | ||
|
||
<div class="alert alert-danger" jhiTranslate="reset.request.messages.notfound.string" *ngIf="errorEmailNotExists"> | ||
<strong>Email address isn't registered!</strong> Please check and try again. | ||
</div> | ||
<div class="alert alert-danger" i18n="@@reset.request.messages.notfound.string" *ngIf="errorEmailNotExists"> | ||
<strong>Email address isn't registered!</strong> Please check and try again. | ||
</div> | ||
|
||
<div class="alert alert-warning" *ngIf="!success"> | ||
<p jhiTranslate="reset.request.messages.info.string">Enter the email address you used to register.</p> | ||
</div> | ||
<div class="alert alert-warning" *ngIf="!success"> | ||
<p i18n="@@reset.request.messages.info.string">Enter the email address you used to register.</p> | ||
</div> | ||
|
||
<div class="alert alert-success" *ngIf="success === 'OK'"> | ||
<p jhiTranslate="reset.request.messages.success.string">Check your emails for details on how to reset your password.</p> | ||
</div> | ||
<div class="alert alert-success" *ngIf="success === 'OK'"> | ||
<p i18n="@@reset.request.messages.success.string"> | ||
Check your emails for details on how to reset your password. | ||
</p> | ||
</div> | ||
|
||
<form *ngIf="!success" name="form" role="form" (ngSubmit)="requestReset()" [formGroup]="resetRequestForm"> | ||
<div class="form-group"> | ||
<label class="form-control-label" for="email" jhiTranslate="global.form.email.label.string">Email</label> | ||
<input type="email" class="form-control" id="email" name="email" placeholder="{{'global.form.email.placeholder.string'}}" | ||
formControlName="email"> | ||
<div *ngIf="resetRequestForm.get('email')?.invalid && (resetRequestForm.get('email')?.dirty || resetRequestForm.get('email')?.touched)"> | ||
<small class="form-text text-danger" | ||
*ngIf="resetRequestForm.get('email')?.errors!['required']" jhiTranslate="global.messages.validate.email.required.string"> | ||
Your email is required. | ||
</small> | ||
<small class="form-text text-danger" | ||
*ngIf="resetRequestForm.get('email')?.errors!['email']" jhiTranslate="global.messages.validate.email.invalid.string"> | ||
Your email is invalid. | ||
</small> | ||
<small class="form-text text-danger" | ||
*ngIf="resetRequestForm.get('email')?.errors!['minlength']" jhiTranslate="global.messages.validate.email.minlength.string"> | ||
Your email is required to be at least 5 characters. | ||
</small> | ||
<small class="form-text text-danger" id="maxlengthError" | ||
*ngIf="resetRequestForm.get('email')?.errors!['maxlength']" jhiTranslate="global.messages.validate.email.maxlength.string"> | ||
Your email cannot be longer than 100 characters. | ||
</small> | ||
</div> | ||
</div> | ||
<button type="submit" id="reset" [disabled]="resetRequestForm.invalid" class="btn btn-primary" jhiTranslate="reset.request.form.button.string">Reset</button> | ||
</form> | ||
<form *ngIf="!success" name="form" role="form" (ngSubmit)="requestReset()" [formGroup]="resetRequestForm"> | ||
<div class="form-group"> | ||
<label class="form-control-label" for="email" i18n="@@global.form.email.label.string">Email</label> | ||
<input | ||
type="email" | ||
class="form-control" | ||
id="email" | ||
name="email" | ||
placeholder="Your email" | ||
i18n-placeholder="@@global.form.email.placeholder.string" | ||
formControlName="email" | ||
/> | ||
<div | ||
*ngIf=" | ||
resetRequestForm.get('email')?.invalid && | ||
(resetRequestForm.get('email')?.dirty || resetRequestForm.get('email')?.touched) | ||
" | ||
> | ||
<small | ||
class="form-text text-danger" | ||
*ngIf="(resetRequestForm.get('email')?.errors)!['required']" | ||
i18n="@@global.messages.validate.email.required.string" | ||
> | ||
Your email is required. | ||
</small> | ||
<small | ||
class="form-text text-danger" | ||
*ngIf="(resetRequestForm.get('email')?.errors)!['email']" | ||
i18n="@@global.messages.validate.email.invalid.string" | ||
> | ||
Your email is invalid. | ||
</small> | ||
<small | ||
class="form-text text-danger" | ||
*ngIf="(resetRequestForm.get('email')?.errors)!['minlength']" | ||
i18n="@@global.messages.validate.email.minlength.string" | ||
> | ||
Your email is required to be at least 5 characters. | ||
</small> | ||
<small | ||
class="form-text text-danger" | ||
id="maxlengthError" | ||
*ngIf="(resetRequestForm.get('email')?.errors)!['maxlength']" | ||
i18n="@@global.messages.validate.email.maxlength.string" | ||
> | ||
Your email cannot be longer than 100 characters. | ||
</small> | ||
</div> | ||
</div> | ||
<button | ||
type="submit" | ||
id="reset" | ||
[disabled]="resetRequestForm.invalid" | ||
class="btn btn-primary" | ||
i18n="@@reset.request.form.button.string" | ||
> | ||
Reset | ||
</button> | ||
</form> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.