From 496c80937f37ddf8beadb7c7d2fa1120311dc5ee Mon Sep 17 00:00:00 2001 From: "hamza.hramchi" <hamza.hramchi@xelians.fr> Date: Fri, 22 Jan 2021 17:24:55 +0100 Subject: [PATCH] FEAT #15550 TIME 0:25 Translate language variables --- lang/en.json | 11 +++++++---- lang/fr.json | 5 ++++- .../connection/ldap/ldap-list.component.html | 2 +- .../administration/group/groups-list.component.html | 2 +- .../history/history-list.component.html | 2 +- .../app/administration/user/users-list.component.html | 2 +- .../models/visa-workflow-models.component.html | 2 +- .../models/visa-workflow-models.component.ts | 2 +- .../plugins/autocomplete/autocomplete.component.html | 2 +- src/frontend/app/search/search.component.html | 4 ++-- src/frontend/app/sidebar/sidebar.component.html | 2 +- 11 files changed, 21 insertions(+), 15 deletions(-) diff --git a/lang/en.json b/lang/en.json index 6caa89f910..e6df5f4d98 100755 --- a/lang/en.json +++ b/lang/en.json @@ -413,8 +413,8 @@ "certifiedDocumentMsg2": "Certified document! Annotations on the document will not be taken into account!", "history": "History", "manage_history": "Manage history", - "filters": "Filter (s)", - "currentFilters": "Active filter (s)", + "filters": "Filter(s)", + "currentFilters": "Active filter(s)", "since": "Since", "until": "Until", "resource": "Resource", @@ -446,10 +446,13 @@ "emails": "Emails", "workflowTemplates": "Workflow templates", "configurations": "Configurations", - "signaturesInDocAdded": "Signature (s) affixed to page (s) {{0}}", + "signaturesInDocAdded": "Signature(s) affixed to page(s) {{0}}", "docIsInMailGroup": "This document is the result of a direct mail", "makeActionOnDocInMailGroup": "Do you want to validate the other documents with the current stamps?", "mailing": "Direct mail", - "delegatedUser": "Delegated user" + "delegatedUser": "Delegated user", + "filter": "Filter", + "noItem": "No item", + "modelCreated": "Model created" } } \ No newline at end of file diff --git a/lang/fr.json b/lang/fr.json index 1c2a232735..1e133dd9c1 100755 --- a/lang/fr.json +++ b/lang/fr.json @@ -446,6 +446,9 @@ "docIsInMailGroup": "Ce document est issu d'un publipostage", "makeActionOnDocInMailGroup": "Voulez-vous valider les autres documents avec les tampons actuels ?", "mailing": "Publipostage", - "delegatedUser": "Utilisateur délégué" + "delegatedUser": "Utilisateur délégué", + "filter": "Filtrer", + "noItem": "Aucun élément", + "modelCreated": "Modèle créé" } } diff --git a/src/frontend/app/administration/connection/ldap/ldap-list.component.html b/src/frontend/app/administration/connection/ldap/ldap-list.component.html index 476adbfb7c..f897d4f565 100644 --- a/src/frontend/app/administration/connection/ldap/ldap-list.component.html +++ b/src/frontend/app/administration/connection/ldap/ldap-list.component.html @@ -27,7 +27,7 @@ </div> </ng-container> <div style="flex: 1" *ngIf="displayedColumns.indexOf('actions') > -1"> - <ion-searchbar placeholder="Filtrer" style="padding: 1px;" + <ion-searchbar [placeholder] = "'lang.filter' | translate" style="padding: 1px;" (ionChange)="applyFilter($event.detail.value)"></ion-searchbar> </div> </ion-label> diff --git a/src/frontend/app/administration/group/groups-list.component.html b/src/frontend/app/administration/group/groups-list.component.html index c451685ada..440bfc70e9 100644 --- a/src/frontend/app/administration/group/groups-list.component.html +++ b/src/frontend/app/administration/group/groups-list.component.html @@ -25,7 +25,7 @@ </div> </ng-container> <div style="flex: 1" *ngIf="displayedColumns.indexOf('actions') > -1"> - <ion-searchbar placeholder="Filtrer" style="padding: 1px;" (ionChange)="applyFilter($event.detail.value)"></ion-searchbar> + <ion-searchbar [placeholder] = "'lang.filter' | translate" style="padding: 1px;" (ionChange)="applyFilter($event.detail.value)"></ion-searchbar> </div> </ion-label> <ion-button slot="end" fill="clear" shape="round" disabled> diff --git a/src/frontend/app/administration/history/history-list.component.html b/src/frontend/app/administration/history/history-list.component.html index be36ca16e5..aa4ddc9ac8 100644 --- a/src/frontend/app/administration/history/history-list.component.html +++ b/src/frontend/app/administration/history/history-list.component.html @@ -57,7 +57,7 @@ </ion-item> </ion-virtual-scroll> <ion-infinite-scroll threshold="100px" (ionInfinite)="loadData($event)"> - <ion-infinite-scroll-content loadingSpinner="bubbles" loadingText="Loading more data..."> + <ion-infinite-scroll-content loadingSpinner="bubbles" [loadingText]="'lang.loadingMoreData' | translate"> </ion-infinite-scroll-content> </ion-infinite-scroll> </ion-list> diff --git a/src/frontend/app/administration/user/users-list.component.html b/src/frontend/app/administration/user/users-list.component.html index 31adf7f056..2201dc0630 100644 --- a/src/frontend/app/administration/user/users-list.component.html +++ b/src/frontend/app/administration/user/users-list.component.html @@ -25,7 +25,7 @@ </div> </ng-container> <div style="flex: 1" *ngIf="displayedColumns.indexOf('actions') > -1"> - <ion-searchbar placeholder="Filtrer" style="padding: 1px;" (ionChange)="applyFilter($event.detail.value)"></ion-searchbar> + <ion-searchbar [placeholder] = "'lang.filter' | translate" style="padding: 1px;" (ionChange)="applyFilter($event.detail.value)"></ion-searchbar> </div> </ion-label> <ion-button slot="end" fill="clear" shape="round" disabled> diff --git a/src/frontend/app/document/visa-workflow/models/visa-workflow-models.component.html b/src/frontend/app/document/visa-workflow/models/visa-workflow-models.component.html index 1a7fd63251..43a4eac100 100644 --- a/src/frontend/app/document/visa-workflow/models/visa-workflow-models.component.html +++ b/src/frontend/app/document/visa-workflow/models/visa-workflow-models.component.html @@ -12,6 +12,6 @@ </ion-item> <ion-item button (click)="createModel()" [disabled]="currentWorkflow.length === 0"> <ion-icon color="primary" slot="start" name="add-circle-outline"></ion-icon> - <ion-label color="primary">Nouveau modèle</ion-label> + <ion-label color="primary">{{'lang.newTemplate' | translate}}</ion-label> </ion-item> </ion-list> \ No newline at end of file diff --git a/src/frontend/app/document/visa-workflow/models/visa-workflow-models.component.ts b/src/frontend/app/document/visa-workflow/models/visa-workflow-models.component.ts index 4131169576..074a596dab 100644 --- a/src/frontend/app/document/visa-workflow/models/visa-workflow-models.component.ts +++ b/src/frontend/app/document/visa-workflow/models/visa-workflow-models.component.ts @@ -78,7 +78,7 @@ export class VisaWorkflowModelsComponent implements OnInit { }; this.http.post('../rest/workflowTemplates', objToSend).pipe( tap((res: any) => { - this.notificationService.success('Modèle créé'); + this.notificationService.success('lang.modelCreated'); this.visaWorkflowModels.push({ id: res.id, title: title }); }), catchError(err => { diff --git a/src/frontend/app/plugins/autocomplete/autocomplete.component.html b/src/frontend/app/plugins/autocomplete/autocomplete.component.html index 1f0637b026..2bcead21f4 100644 --- a/src/frontend/app/plugins/autocomplete/autocomplete.component.html +++ b/src/frontend/app/plugins/autocomplete/autocomplete.component.html @@ -9,7 +9,7 @@ </ion-list> <ion-list> <ion-item lines="none"> - <ion-label *ngIf="currentItems.length === 0" color="medium" style="font-style: italic;">Aucun élément</ion-label> + <ion-label *ngIf="currentItems.length === 0" color="medium" style="font-style: italic;">{{ 'lang.noItem' | translate }}</ion-label> <p> <ion-chip *ngFor="let item of currentItems;let i=index" (click)="removeItem(i)" style="height: auto;"> <ion-label class="ion-text-wrap">{{ item.firstname }} {{ item.lastname }}</ion-label> diff --git a/src/frontend/app/search/search.component.html b/src/frontend/app/search/search.component.html index 5a4421769d..68311fbb41 100644 --- a/src/frontend/app/search/search.component.html +++ b/src/frontend/app/search/search.component.html @@ -146,7 +146,7 @@ </ion-virtual-scroll> </ion-list> <ion-infinite-scroll threshold="100px" (ionInfinite)="loadData($event)"> - <ion-infinite-scroll-content loadingSpinner="bubbles" loadingText="Loading more data..."> + <ion-infinite-scroll-content loadingSpinner="bubbles" [loadingText]="'lang.loadingMoreData' | translate"> </ion-infinite-scroll-content> </ion-infinite-scroll> </ion-content> @@ -156,7 +156,7 @@ <ion-buttons slot="start"> <ion-back-button></ion-back-button> </ion-buttons> - <ion-title class="ion-text-center">Filtre(s)</ion-title> + <ion-title class="ion-text-center">{{ 'lang.filters' | translate }}</ion-title> </ion-toolbar> </ion-header> <ion-content> diff --git a/src/frontend/app/sidebar/sidebar.component.html b/src/frontend/app/sidebar/sidebar.component.html index 75323d8d86..7ebd2134b5 100755 --- a/src/frontend/app/sidebar/sidebar.component.html +++ b/src/frontend/app/sidebar/sidebar.component.html @@ -98,7 +98,7 @@ </ion-menu-toggle> </ion-list> <ion-infinite-scroll threshold="100px" (ionInfinite)="loadData($event)" *ngIf="signaturesService.documentsList.length > 0"> - <ion-infinite-scroll-content loadingSpinner="bubbles" loadingText="Loading more data..."> + <ion-infinite-scroll-content loadingSpinner="bubbles" [loadingText]="'lang.loadingMoreData' | translate"> </ion-infinite-scroll-content> </ion-infinite-scroll> </ion-content> -- GitLab