Skip to content

Commit

Permalink
translation of scheduler jobs inside system module
Browse files Browse the repository at this point in the history
  • Loading branch information
Omar-Nabil authored and alberto-art3ch committed Jun 20, 2024
1 parent ef53756 commit 1ffd508
Show file tree
Hide file tree
Showing 19 changed files with 94 additions and 47 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h1 mat-dialog-title>Edit Job Custom Parameters</h1>
<h1 mat-dialog-title>{{'labels.buttons.Edit Job Custom Parameters' | translate}}</h1>

<mat-dialog-content>
<div class="jobs-container">
Expand All @@ -23,9 +23,9 @@ <h1 mat-dialog-title>Edit Job Custom Parameters</h1>
<mat-dialog-actions>
<button mat-raised-button color="primary" (click)="runSelectedJobs()">
<fa-icon icon="play" class="m-r-10"></fa-icon>
Run Selected Jobs
{{'labels.buttons.Run Selected Jobs' | translate}}
</button>
<button mat-raised-button color="warn" [mat-dialog-close]="{ show: 0 }">
Close Custom Parameters
{{'labels.buttons.Close Custom Parameters' | translate}}
</button>
</mat-dialog-actions>
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,19 @@
<h2>{{'labels.inputs.Job' | translate}}: {{ displayName }}</h2>
<table mat-table [dataSource]="updatedJobParameters">
<ng-container matColumnDef="parameterName">
<th mat-header-cell *matHeaderCellDef>{{'labels.inputs.Parameter Name' | translate}}</th>
<th mat-header-cell *matHeaderCellDef>{{'labels.inputs.Parameter' | translate}} {{'labels.inputs.Name' | translate}}</th>
<td mat-cell *matCellDef="let element; index as i">
<mat-form-field>
<input matInput type="text" placeholder="Parameter Name" [(ngModel)]="element.parameterName" />
<input matInput type="text" [placeholder]="('labels.inputs.Parameter' | translate) + ' ' + ('labels.inputs.Name' | translate)" [(ngModel)]="element.parameterName" />
</mat-form-field>
</td>
</ng-container>

<ng-container matColumnDef="parameterValue">
<th mat-header-cell *matHeaderCellDef>{{'labels.inputs.Parameter Value' | translate}}</th>
<th mat-header-cell *matHeaderCellDef>{{'labels.inputs.Parameter' | translate}} {{'labels.inputs.Value' | translate}}</th>
<td mat-cell *matCellDef="let element; index as i">
<mat-form-field>
<input matInput type="text" placeholder="Parameter Value" [(ngModel)]="element.parameterValue" />
<input matInput type="text" [placeholder]="('labels.inputs.Parameter' | translate) + ' ' + ('labels.inputs.Value' | translate)" [(ngModel)]="element.parameterValue" />
</mat-form-field>
</td>
</ng-container>
Expand All @@ -23,7 +23,7 @@ <h2>{{'labels.inputs.Job' | translate}}: {{ displayName }}</h2>
<th mat-header-cell *matHeaderCellDef></th>
<td mat-cell *matCellDef="let row; let rowIndex = index">
<button type="button" mat-icon-button color="warn"
(click)="deleteParameter(rowIndex)" matTooltip="Delete"
(click)="deleteParameter(rowIndex)" [matTooltip]="('labels.buttons.Delete' | translate)"
matTooltipPosition="left">
<fa-icon icon="trash"></fa-icon>
</button>
Expand All @@ -36,6 +36,6 @@ <h2>{{'labels.inputs.Job' | translate}}: {{ displayName }}</h2>

<button mat-button (click)="addParameter()">
<fa-icon icon="plus" class="m-r-10"></fa-icon>
{{'labels.buttons.Add Parameter' | translate}}
{{'labels.buttons.Add' | translate}} {{'labels.inputs.Parameter' | translate}}
</button>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -9,32 +9,32 @@
<div fxLayout="column">

<mat-form-field>
<mat-label>Job Name</mat-label>
<mat-label>{{'labels.inputs.Job Name' | translate}}</mat-label>
<input matInput required formControlName="displayName">
<mat-error *ngIf="jobForm.controls.displayName.hasError('required')">
Job Name is <strong>required</strong>
{{'labels.inputs.Job Name' | translate}} {{'labels.commons.is' | translate}} <strong>{{'labels.commons.required' | translate}}</strong>
</mat-error>
</mat-form-field>

<mat-form-field>
<mat-label>Cron Expression</mat-label>
<mat-label>{{'labels.inputs.Cron Expression' | translate}}</mat-label>
<input matInput required formControlName="cronExpression">
<mat-error *ngIf="jobForm.controls.cronExpression.hasError('required')">
Cron Expression is <strong>required</strong>
{{'labels.inputs.Cron Expression' | translate}} {{'labels.commons.is' | translate}} <strong>{{'labels.commons.required' | translate}}</strong>
</mat-error>
</mat-form-field>

<mat-checkbox labelPosition="before" formControlName="active">
Is job active?
{{'labels.inputs.Is job active' | translate}}?
</mat-checkbox>

</div>

<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
<button type="button" mat-raised-button [routerLink]="['../']">Cancel</button>
<button mat-raised-button color="primary" [disabled]="!jobForm.valid" *mifosxHasPermission="'UPDATE_SCHEDULER'">Submit</button>
<button type="button" mat-raised-button [routerLink]="['../']">{{'labels.buttons.Cancel' | translate}}</button>
<button mat-raised-button color="primary" [disabled]="!jobForm.valid" *mifosxHasPermission="'UPDATE_SCHEDULER'">{{'labels.buttons.Submit' | translate}}</button>
</mat-card-actions>

</mat-card-content>

</form>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component, Inject, OnInit } from '@angular/core';
import { SchedulerJob } from '../models/scheduler-job.model';
import { MAT_DIALOG_DATA } from '@angular/material/dialog';
import { TranslateService } from '@ngx-translate/core';
import { SchedulerJob } from '../models/scheduler-job.model';


interface ErrorJobDataType {
Expand All @@ -27,7 +27,7 @@ export class ErrorLogPopoverComponent implements OnInit {
}

buttonLabel(): string {
const label: string = this.show ? 'Show less' : 'Show more';
const label: string = this.show ? this.translateService.instant('labels.buttons.Show less'): this.translateService.instant('labels.buttons.Show more');
return this.translateService.instant('labels.buttons.' + label);
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="container m-b-20 space-top" fxLayout="row" fxLayoutGap="20px">
<div #schedulerStatus>
<h2 class="no-m">{{'labels.heading.Scheduler Status' | translate}}:<span class="m-l-20 m-r-20">{{ schedulerActive ? 'Active' : 'Inactive' }}</span>
<h2 class="no-m">{{'labels.heading.Scheduler Status' | translate}}:<span class="m-l-20 m-r-20">{{ schedulerActive ? ( 'labels.inputs.Active' | translate ) : ('labels.catalogs.Inactive' | translate) }}</span>
</h2>
</div>
<button mat-raised-button class="suspend" (click)="suspendScheduler()" *ngIf="schedulerActive">
Expand Down Expand Up @@ -75,9 +75,9 @@ <h2 class="no-m">{{'labels.heading.Scheduler Status' | translate}}:<span class="
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{'labels.inputs.Previous Run' | translate}} </th>
<td mat-cell *matCellDef="let job">
<div *ngIf="job.lastRunHistory">
<fa-icon *ngIf="job.lastRunHistory.status === 'success'" class="success" matTooltip="Successful"
<fa-icon *ngIf="job.lastRunHistory.status === 'success'" class="success" [matTooltip]="('tooltips.Successful' | translate)"
matTooltipPosition="right" icon="check-circle" size="lg"></fa-icon>
<fa-icon *ngIf="!(job.lastRunHistory.status == 'success')" class="fail" matTooltip="Failed"
<fa-icon *ngIf="!(job.lastRunHistory.status == 'success')" class="fail" [matTooltip]="('tooltips.Failed' | translate)"
matTooltipPosition="right" icon="times-circle" size="lg"></fa-icon>
<span *ngIf="job.lastRunHistory" class="m-l-5">
{{ job.lastRunHistory.jobRunStartTime | datetimeFormat}}</span>
Expand Down Expand Up @@ -126,9 +126,9 @@ <h2 class="no-m">{{'labels.heading.Scheduler Status' | translate}}:<span class="
<button mat-raised-button color="primary" (click)="runSelectedJobs()" [disabled]="!isAnyJobSelected()">
<fa-icon icon="play" class="m-r-10"></fa-icon>
{{'labels.buttons.Run Selected Jobs' | translate}}<ng-template #templateSchedulerJobs let-data let-popover="popover">
<h2>Template</h2>
<p>This is the template I am trying to use. Is that fine.</p>
<button (click)="popover.close();nextStepSchedulerJobs()">Next</button>
<h2>{{'labels.heading.Template' | translate}}</h2>
<p>{{'labels.text.Template I am trying to use' | translate}}.</p>
<button (click)="popover.close();nextStepSchedulerJobs()">{{'labels.buttons.Next' | translate }}</button>
</ng-template>
</button>
<button mat-raised-button color="primary" (click)="refresh()">
Expand All @@ -138,7 +138,7 @@ <h2>Template</h2>
</div>

<ng-template #templateSchedulerStatus let-data let-popover="popover">
<h4>Scheduler Status. Button will be used to change the status.</h4>
<h4>{{'labels.heading.Scheduler status' | translate}}.</h4>
<div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="2%" fxLayout.lt-md="column">
<button mat-raised-button color="warn"
(click)="popover.close();configurationWizardService.closeConfigWizard()">{{'labels.buttons.Close' | translate}}</button>
Expand All @@ -149,7 +149,7 @@ <h4>Scheduler Status. Button will be used to change the status.</h4>
</ng-template>

<ng-template #templateFilter let-data let-popover="popover">
<h4>Search bar to filter jobs.</h4>
<h4>{{'labels.heading.Search bar to filter jobs' | translate }}.</h4>
<div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="2%" fxLayout.lt-md="column">
<button mat-raised-button color="warn"
(click)="popover.close();configurationWizardService.closeConfigWizard()">{{'labels.buttons.Close' | translate}}</button>
Expand All @@ -161,9 +161,8 @@ <h4>Search bar to filter jobs.</h4>
</ng-template>

<ng-template #templateJobsTable let-data let-popover="popover">
<h4>List of all scheduled batch jobs <a
href="https://mifosforge.jira.com/wiki/spaces/docs/pages/67895356/Manage+Scheduler+Jobs" target="_blank">Schedular
Jobs</a></h4>
<h4>{{'labels.heading.List of all scheduled batch jobs' | translate }} <a
href="https://mifosforge.jira.com/wiki/spaces/docs/pages/67895356/Manage+Scheduler+Jobs" target="_blank">{{'labels.heading.Schedular Jobs' | translate}}</a></h4>
<div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="2%" fxLayout.lt-md="column">
<button mat-raised-button color="warn"
(click)="popover.close();configurationWizardService.closeConfigWizard()">{{'labels.buttons.Close' | translate}}</button>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<div fxLayout="row" fxLayoutGap="20px">

<mat-form-field fxFlex>
<mat-label>Filter By Version</mat-label>
<mat-label>{{'labels.inputs.Filter By Version' | translate}}</mat-label>
<input matInput (keyup)="applyFilter($event.target.value)">
</mat-form-field>
</div>
Expand All @@ -13,35 +13,35 @@
<table mat-table [dataSource]="dataSource" matSort>

<ng-container matColumnDef="version" >
<th mat-header-cell *matHeaderCellDef mat-sort-header> Version </th>
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{'labels.inputs.Version' | translate}} </th>
<td mat-cell *matCellDef="let jobHistoryData"> {{ jobHistoryData.version }} </td>
</ng-container>

<ng-container matColumnDef="run_start_time">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Start time </th>
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{'labels.inputs.Start Time' | translate}} </th>
<td mat-cell *matCellDef="let jobHistoryData">{{ jobHistoryData.jobRunStartTime | datetimeFormat }}</td>
</ng-container>

<ng-container matColumnDef="run_end_time">
<th mat-header-cell *matHeaderCellDef mat-sort-header> End time </th>
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{'labels.inputs.End Time' | translate}}End time </th>
<td mat-cell *matCellDef="let jobHistoryData">{{ jobHistoryData.jobRunEndTime | datetimeFormat }}</td>
</ng-container>

<ng-container matColumnDef="status">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Status </th>
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Status' | translate }} </th>
<td mat-cell *matCellDef="let jobHistoryData">
<fa-icon *ngIf="jobHistoryData.status === 'success'" class="success" matTooltip="Successful" matTooltipPosition="right" icon="check-circle" size="lg"></fa-icon>
<fa-icon *ngIf="!(jobHistoryData.status == 'success')" class="fail" matTooltip="Failed" matTooltipPosition="right" icon="times-circle" size="lg"></fa-icon>
</td>
</ng-container>

<ng-container matColumnDef="run_type">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Run Type </th>
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Run Type' | translate }} </th>
<td mat-cell *matCellDef="let jobHistoryData">{{ jobHistoryData.triggerType }}</td>
</ng-container>

<ng-container matColumnDef="error_log">
<th mat-header-cell *matHeaderCellDef mat-sort-header> Error Log </th>
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Error Log' | translate }} </th>
<td mat-cell *matCellDef="let jobHistoryData">
<button mat-icon-button class="errorlog" *ngIf="!(jobHistoryData.status == 'success')" matTooltip="Error Log" matTooltipPosition="right" (click)="openError(jobHistoryData.version)">
<fa-icon icon="exclamation-circle" size="lg"></fa-icon>
Expand All @@ -57,7 +57,7 @@
<mat-paginator [pageSizeOptions]="[10, 25, 50, 100]" showFirstLastButtons></mat-paginator>

<div fxLayout="row" fxLayoutAlign="center" fxLayoutGap="2%" fxLayout.lt-md="column">
<button type="button" color="primary" mat-raised-button [routerLink]="['../']">Back</button>
<button type="button" color="primary" mat-raised-button [routerLink]="['../']">{{'labels.buttons.Back' | translate}}</button>
</div>

</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<div class="container m-b-20" fxLayout="row" fxLayout.lt-md="column" fxLayoutAlign="end" fxLayoutGap="2%">
<button mat-raised-button color="primary" [routerLink]="['edit']">
<fa-icon icon="edit" class="m-r-10"></fa-icon>
Edit
{{'labels.buttons.Edit' | translate }}
</button>
<button mat-raised-button color="primary" [routerLink]="['viewhistory']">
View History
{{'labels.buttons.View History' | translate }}
</button>
</div>

Expand All @@ -17,35 +17,35 @@
<div fxLayout="row wrap" class="content">

<div fxFlex="50%" class="mat-body-strong">
Job Name
{{'labels.inputs.Job Name' | translate}}
</div>

<div fxFlex="50%">
{{ jobData.displayName }}
</div>

<div fxFlex="50%" class="mat-body-strong">
Cron Expression
{{'labels.inputs.Cron Expression' | translate}}
</div>

<div fxFlex="50%">
{{ jobData.cronExpression }}
</div>

<div fxFlex="50%" class="mat-body-strong">
Is Active Job?
{{'labels.inputs.Is Active Job' | translate}}?
</div>

<div fxFlex="50%">
{{ jobData.active | yesNo }}
</div>

<div fxFlex="50%" class="mat-body-strong">
Follow
{{'labels.inputs.Follow' | translate}}
</div>

<div fxFlex="50%">
<a href="http://www.cronmaker.com/"> Click Here To Generate Cron Expression </a>
<a href="http://www.cronmaker.com/"> {{'labels.text.Click Here To Generate Cron Expression' | translate}} </a>
</div>

</div>
Expand All @@ -54,7 +54,7 @@

<mat-card-actions>
<div fxLayout="row" fxLayoutAlign="center" fxLayoutGap="2%" fxLayout.lt-md="column">
<button type="button" color="primary" mat-raised-button [routerLink]="['../']">Back</button>
<button type="button" color="primary" mat-raised-button [routerLink]="['../']">{{'labels.buttons.Back' | translate}}</button>
</div>
</mat-card-actions>

Expand Down
4 changes: 4 additions & 0 deletions src/assets/translations/cs-CS.json
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@
"Close": "Zavřít",
"Close Config. Wizard": "Zavřete Config. kouzelník",
"Close Configuration Wizard": "Zavřete Průvodce konfigurací",
"Close Custom Parameters": "Zavřete vlastní parametry",
"Collapse All": "Sbalit vše",
"Collection Sheet": "Sbírkový list",
"Committee": "Výbor",
Expand Down Expand Up @@ -400,6 +401,7 @@
"Edit Code": "Upravit kód",
"Edit Schedule": "Upravit rozvrh",
"Edit Survey": "Upravit průzkum",
"Edit Job Custom Parameters": "Upravit vlastní parametry úlohy",
"Enable": "Umožnit",
"Expand All": "Rozšířit vše",
"Export": "Vývozní",
Expand Down Expand Up @@ -1019,6 +1021,7 @@
"Savings Transactions": "Spořicí transakce",
"Scheduler Status": "Stav plánovače",
"Scheduler status": "Stav plánovače. Tlačítko se použije ke změně stavu.",
"Schedular Jobs": "Plánované úlohy",
"Search Activity": "Aktivita vyhledávání",
"Search Journal Entries": "Prohledejte záznamy deníku",
"Search bar to filter GL accounts.": "Vyhledávací pole pro filtrování účtů GL.",
Expand Down Expand Up @@ -2350,6 +2353,7 @@
"email": "e-mailem",
"form": "formulář",
"json": "json",
"Job": "Práce",
"language": "Jazyk",
"matched": "sladěno",
"mins": "min",
Expand Down
4 changes: 4 additions & 0 deletions src/assets/translations/de-DE.json
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@
"Close": "Schließen",
"Close Config. Wizard": "Konfiguration schließen. Magier",
"Close Configuration Wizard": "Schließen Sie den Konfigurationsassistenten",
"Close Custom Parameters": "Benutzerdefinierte Parameter schließen",
"Collapse All": "Alles reduzieren",
"Collection Sheet": "Sammelblatt",
"Committee": "Ausschuss",
Expand Down Expand Up @@ -400,6 +401,7 @@
"Edit Code": "Code bearbeiten",
"Edit Schedule": "Zeitplan bearbeiten",
"Edit Survey": "Umfrage bearbeiten",
"Edit Job Custom Parameters": "Bearbeiten Sie benutzerdefinierte Auftragsparameter",
"Enable": "Aktivieren",
"Expand All": "Alle erweitern",
"Export": "Export",
Expand Down Expand Up @@ -1020,6 +1022,7 @@
"Savings Transactions": "Spargeschäfte",
"Scheduler Status": "Planerstatus",
"Scheduler status": "Planerstatus. Mit der Schaltfläche können Sie den Status ändern.",
"Schedular Jobs": "Geplante Jobs",
"Search Activity": "Suchaktivität",
"Search Journal Entries": "Journaleinträge durchsuchen",
"Search bar to filter GL accounts.": "Suchleiste zum Filtern von Hauptbuchkonten.",
Expand Down Expand Up @@ -2350,6 +2353,7 @@
"email": "Email",
"form": "bilden",
"json": "json",
"Job": "Arbeit",
"language": "Sprache",
"matched": "abgestimmt",
"mins": "Min",
Expand Down
Loading

0 comments on commit 1ffd508

Please sign in to comment.