-
Notifications
You must be signed in to change notification settings - Fork 2
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 #203 from e-picsa/ft-calendar-transalation
feat(seasonal-calendar): add translations
- Loading branch information
Showing
24 changed files
with
949 additions
and
545 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
10 changes: 5 additions & 5 deletions
10
...-tool/src/app/components/activities-editor-dialog/activities-editor-dialog.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,22 +1,22 @@ | ||
<div class="table-container"> | ||
<h2 class="dialog-title">Add Activity</h2> | ||
<h2 class="dialog-title">{{'Add Activity' | translate}}</h2> | ||
<div class="dialog-body"> | ||
<mat-form-field> | ||
<mat-label>Select Activity</mat-label> | ||
<mat-label>{{'Select Activity' | translate}}</mat-label> | ||
<mat-select class="selectField" [(ngModel)]="selectedActivity"> | ||
<mat-option *ngFor="let activity of activities" [value]="activity"> | ||
{{ activity }} | ||
</mat-option> | ||
</mat-select> | ||
</mat-form-field> | ||
<div *ngIf="selectedActivity === 'Other'"> | ||
<h4>Type other activity</h4> | ||
<h4>{{'Type other activity' | translate}}</h4> | ||
<input matInput class="inputField" placeholder="Custom Activity" [(ngModel)]="customActivity"> | ||
</div> | ||
</div> | ||
<div class="buttons"> | ||
<button mat-button class="add-button" (click)="onSave()" [mat-dialog-close]="selectedActivity || customActivity" [disabled]="!(selectedActivity || customActivity)">Add</button> | ||
<button mat-button class="cancel-button" (click)="onClose()">Cancel</button> | ||
<button mat-button class="add-button" (click)="onSave()" [mat-dialog-close]="selectedActivity || customActivity" [disabled]="!(selectedActivity || customActivity)">{{'Add' | translate}}</button> | ||
<button mat-button class="cancel-button" (click)="onClose()">{{'Cancel' | translate}}</button> | ||
</div> | ||
</div> | ||
|
6 changes: 3 additions & 3 deletions
6
...lendar-tool/src/app/components/crop-dialog-component/crop-dialog-component.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,9 +1,9 @@ | ||
<div class="dialog-container"> | ||
<h2 class="dialog-container" >{{ data.name }} Extra information</h2> | ||
<h2 class="dialog-container" >{{ data.name }} {{'Extra information' | translate}}</h2> | ||
<p>{{"Please include any information required about farming this crop."}}</p> | ||
<input class="inputField" [(ngModel)]="editedExtraInformation" placeholder="Edit extra information" /> | ||
<div mat-dialog-actions> | ||
<button mat-button (click)="onSave()">Save</button> | ||
<button mat-button (click)="onClose()">Close</button> | ||
<button mat-button (click)="onSave()">{{'Save'|translate}}</button> | ||
<button mat-button (click)="onClose()">{{'Close'|translate}}</button> | ||
</div> | ||
</div> |
2 changes: 1 addition & 1 deletion
2
...l-calendar-tool/src/app/components/field-error-display/field-error-display.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,6 +1,6 @@ | ||
<div *ngIf="displayError" > | ||
<span class="form-control-feedback fix-error-icon"></span> | ||
<div class="error-msg"> | ||
{{ errorMsg }} | ||
{{ errorMsg | translate }} | ||
</div> | ||
</div> |
6 changes: 3 additions & 3 deletions
6
...calendar-tool/src/app/components/month-editor-dialog/crop-dialog-component.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,9 +1,9 @@ | ||
<div class="dialog-container"> | ||
<h2 class="dialog-container" >Edit {{ data.month }} weather condition</h2> | ||
<h2 class="dialog-container" >{{ 'Edit' | translate }} {{ data.month }} {{'weather condition' | translate}}</h2> | ||
<p>{{"Enter the weather condition for this month"}}</p> | ||
<input class="inputField" [(ngModel)]="weather" placeholder="Edit extra information" /> | ||
<div mat-dialog-actions> | ||
<button mat-button (click)="onSave()">Save</button> | ||
<button mat-button (click)="onClose()">Close</button> | ||
<button mat-button (click)="onSave()">{{'Save' | translate}}</button> | ||
<button mat-button (click)="onClose()">{{'Close' | translate}}</button> | ||
</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
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
73 changes: 46 additions & 27 deletions
73
...tools/seasonal-calendar-tool/src/app/pages/create-calendar/create-calendar.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,62 +1,81 @@ | ||
<div class="container"> | ||
<h2>Crops Seasonal calender</h2> | ||
<h2>{{ 'Crops Seasonal calender' | translate }}</h2> | ||
<div class="box"> | ||
<h2>Calender name</h2> | ||
<input class="inputField" [(ngModel)]="calenderTitle" placeholder="Season of 85" /> | ||
<seasonal-calendar-error-display [displayError]="showMessageFlag && calenderTitle===''" errorMsg="Please add the calender title"> | ||
<h2>{{ 'Calender name' | translate }}</h2> | ||
<input class="inputField" [(ngModel)]="calenderTitle" [placeholder]="'Season of 85' | translate" /> | ||
<seasonal-calendar-error-display | ||
[displayError]="showMessageFlag && calenderTitle === ''" | ||
errorMsg="Please add the calender title" | ||
> | ||
</seasonal-calendar-error-display> | ||
</div> | ||
|
||
<!-- Crops --> | ||
<div class="box"> | ||
<h2>Season Crops</h2> | ||
<h2>{{ 'Season Crops' | translate }}</h2> | ||
<div class="select-box"> | ||
<div class="select-input-field"> | ||
<picsa-form-crop-select [(ngModel)]="userCrops"></picsa-form-crop-select> | ||
</div> | ||
<seasonal-calendar-error-display [displayError]="showMessageFlag && userCrops.length<1" errorMsg="Please select a crop"> | ||
<seasonal-calendar-error-display | ||
[displayError]="showMessageFlag && userCrops.length < 1" | ||
errorMsg="Please select a crop" | ||
> | ||
</seasonal-calendar-error-display> | ||
</div> | ||
</div> | ||
|
||
<!-- Calendar Time --> | ||
<div> | ||
<h2>Calendar Time</h2> | ||
<h2>{{ 'Calendar Time' | translate }}</h2> | ||
<div class="calender-box"> | ||
<div> | ||
<div class="form-group"> | ||
<label for="startMonth">Start Month:</label> | ||
<select id="startMonth" [(ngModel)]="startMonth"> | ||
<option value="" disabled selected>Select start month</option> | ||
<option *ngFor="let month of months" [value]="month">{{ month }}</option> | ||
</select> | ||
<div class="form-group"> | ||
<label for="startMonth">{{ 'Start Month ' | translate }} :</label> | ||
<select id="startMonth" [(ngModel)]="startMonth"> | ||
<option value="" disabled selected>{{ 'Select start month' | translate }}</option> | ||
<option *ngFor="let month of months" [value]="month">{{ month | translate }}</option> | ||
</select> | ||
</div> | ||
<seasonal-calendar-error-display | ||
[displayError]="showMessageFlag && startMonth === ''" | ||
[errorMsg]="'Please select a start month' | translate" | ||
> | ||
</seasonal-calendar-error-display> | ||
</div> | ||
<seasonal-calendar-error-display [displayError]="showMessageFlag && startMonth ===''" errorMsg="Please select a start month"> | ||
</seasonal-calendar-error-display> | ||
</div> | ||
<div> | ||
<div class="form-group"> | ||
<label for="numberOfMonths">Number of Months Needed:</label> | ||
<input type="number" class="inputField" id="numberOfMonths" [(ngModel)]="numMonths" /> | ||
<div> | ||
<div class="form-group"> | ||
<label for="numberOfMonths">{{ 'Number of Months Needed' | translate }}:</label> | ||
<input type="number" class="inputField" id="numberOfMonths" [(ngModel)]="numMonths" /> | ||
</div> | ||
<seasonal-calendar-error-display | ||
[displayError]="showMessageFlag && numMonths < 1" | ||
[errorMsg]="'Please enter the required number of months' | translate" | ||
> | ||
</seasonal-calendar-error-display> | ||
</div> | ||
<seasonal-calendar-error-display [displayError]="showMessageFlag && numMonths <1 " errorMsg="Please enter the required number of months"> | ||
</seasonal-calendar-error-display> | ||
</div> | ||
</div> | ||
<h4 *ngIf="calendarMonths.length > 0">{{ "Enter the selected month's weather condition" | translate }}</h4> | ||
<div class="monthsGrid"> | ||
<div *ngFor="let monthData of calendarMonths" class="month"> | ||
<div>{{ monthData.month }}</div> | ||
<div>{{ monthData.month | translate }}</div> | ||
<div> | ||
<input placeholder="wet,dry..." type="text" class="inputField" [(ngModel)]="monthData.weather" /> | ||
<input | ||
[placeholder]="'wet,dry...' | translate" | ||
type="text" | ||
class="inputField" | ||
[(ngModel)]="monthData.weather" | ||
/> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="submit-button"> | ||
<button class="" mat-button mat-raised-button (click)="onSubmition()" color="primary">Create calender</button> | ||
<button class="" mat-button mat-raised-button (click)="onSubmition()" color="primary"> | ||
{{ 'Create calender ' | translate }} | ||
</button> | ||
</div> | ||
<div class="flag-message" *ngIf="showMessageFlag"> | ||
<p>{{ message }}</p> | ||
<p>{{ message | translate }}</p> | ||
</div> | ||
</div> |
1 change: 1 addition & 0 deletions
1
...a-tools/seasonal-calendar-tool/src/app/pages/create-calendar/create-calendar.component.ts
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.