From 500b2020fa2c34afe3e9a454bdb80f835dfa74d1 Mon Sep 17 00:00:00 2001 From: "mathias.chouet" <mathias.chouet@irstea.fr> Date: Wed, 17 Jul 2019 11:50:07 +0200 Subject: [PATCH] Tooltips on icon buttons --- src/app/app.component.html | 6 ++-- .../app-setup/app-setup.component.html | 4 +-- .../app-setup/app-setup.component.ts | 7 ++++ .../dialog-edit-param-values.component.html | 2 +- .../dialog-edit-param-values.component.ts | 36 +++++++++++-------- .../field-set/field-set.component.html | 10 +++--- .../field-set/field-set.component.ts | 20 +++++++++++ .../fixed-results.component.html | 2 +- .../fixed-results.component.ts | 4 +++ .../var-results.component.html | 6 ++-- .../fixedvar-results/var-results.component.ts | 12 +++++++ .../pab-results-table.component.html | 6 ++-- .../pab-results-table.component.ts | 12 +++++++ .../pab-table/pab-table.component.html | 15 +++++--- .../pab-table/pab-table.component.ts | 28 +++++++++++++++ .../param-computed.component.html | 2 +- .../param-computed.component.ts | 8 ++++- .../param-values/param-values.component.html | 2 +- .../param-values/param-values.component.ts | 8 ++++- .../remous-results.component.html | 12 +++---- .../remous-results.component.ts | 12 +++++++ .../section-results.component.html | 6 ++-- .../section-results.component.ts | 16 ++++++++- src/locale/messages.en.json | 12 +++++++ src/locale/messages.fr.json | 12 +++++++ 25 files changed, 210 insertions(+), 50 deletions(-) diff --git a/src/app/app.component.html b/src/app/app.component.html index 5889fc197..e482e6042 100644 --- a/src/app/app.component.html +++ b/src/app/app.component.html @@ -53,10 +53,12 @@ </div> - <button *ngIf="currentRoute != '/list'" mat-icon-button id="new-calculator" routerLink="/list" (click)="sidenav.close()"> + <button *ngIf="currentRoute != '/list'" mat-icon-button id="new-calculator" routerLink="/list" + [title]="uitextSidenavNewCalc" (click)="sidenav.close()"> <mat-icon>add_box</mat-icon> </button> - <a *ngIf="enableHeaderDoc" target="_blank" id="header-doc" href="assets/docs-fr/index.html" (click)="sidenav.close()"> + <a *ngIf="enableHeaderDoc" target="_blank" id="header-doc" href="assets/docs-fr/index.html" + [title]="uitextSidenavHelp" (click)="sidenav.close()"> <mat-icon>help</mat-icon> </a> diff --git a/src/app/components/app-setup/app-setup.component.html b/src/app/components/app-setup/app-setup.component.html index c928af6fd..78e9b85ef 100644 --- a/src/app/components/app-setup/app-setup.component.html +++ b/src/app/components/app-setup/app-setup.component.html @@ -7,10 +7,10 @@ <h1>{{ uitextTitle }}</h1> </mat-card-title> - <button type="button" mat-icon-button (click)="storePreferences()"> + <button type="button" mat-icon-button (click)="storePreferences()" [title]="uitextStorePreferences"> <mat-icon>file_download</mat-icon> </button> - <button type="button" mat-icon-button (click)="restoreDefaultValues()"> + <button type="button" mat-icon-button (click)="restoreDefaultValues()" [title]="uitextRestoreDefaultValues"> <mat-icon>settings_backup_restore</mat-icon> </button> </mat-card-header> diff --git a/src/app/components/app-setup/app-setup.component.ts b/src/app/components/app-setup/app-setup.component.ts index 13c2381e5..c1eafaed8 100644 --- a/src/app/components/app-setup/app-setup.component.ts +++ b/src/app/components/app-setup/app-setup.component.ts @@ -89,6 +89,13 @@ export class ApplicationSetupComponent extends BaseComponent implements Observer return this.intlService.localizeText("ERROR_PARAM_MUST_BE_A_NUMBER"); } + public get uitextStorePreferences(): string { + return this.intlService.localizeText("INFO_SETUP_STORE_PREFERENCES"); + } + + public get uitextRestoreDefaultValues(): string { + return this.intlService.localizeText("INFO_SETUP_RESTORE_DEFAULT_VALUES"); + } public storePreferences() { this.appSetupService.saveValuesIntoLocalStorage(); diff --git a/src/app/components/dialog-edit-param-values/dialog-edit-param-values.component.html b/src/app/components/dialog-edit-param-values/dialog-edit-param-values.component.html index ebc57a529..011f1f7d6 100644 --- a/src/app/components/dialog-edit-param-values/dialog-edit-param-values.component.html +++ b/src/app/components/dialog-edit-param-values/dialog-edit-param-values.component.html @@ -1,4 +1,4 @@ -<button mat-icon-button id="show-values-chart" (click)="toggleViewChart()"> +<button mat-icon-button id="show-values-chart" (click)="toggleViewChart()" [title]="uitextShowValuesChart"> <mat-icon *ngIf="! viewChart">show_chart</mat-icon> <mat-icon *ngIf="viewChart">mode_edit</mat-icon> </button> diff --git a/src/app/components/dialog-edit-param-values/dialog-edit-param-values.component.ts b/src/app/components/dialog-edit-param-values/dialog-edit-param-values.component.ts index fc2ec72e6..56923b672 100644 --- a/src/app/components/dialog-edit-param-values/dialog-edit-param-values.component.ts +++ b/src/app/components/dialog-edit-param-values/dialog-edit-param-values.component.ts @@ -381,39 +381,39 @@ export class DialogEditParamValuesComponent implements OnInit { }; } - public get uiTextModeSelection() { + public get uiTextModeSelection(): string { return this.intlService.localizeText("INFO_PARAMFIELD_PARAMVARIER_MODE"); } - public get uitextValeurMini() { + public get uitextValeurMini(): string { return this.intlService.localizeText("INFO_PARAMFIELD_VALEURMINI"); } - public get uitextValeurMaxi() { + public get uitextValeurMaxi(): string { return this.intlService.localizeText("INFO_PARAMFIELD_VALEURMAXI"); } - public get uitextPasVariation() { + public get uitextPasVariation(): string { return this.intlService.localizeText("INFO_PARAMFIELD_PASVARIATION"); } - public get uitextClose() { + public get uitextClose(): string { return this.intlService.localizeText("INFO_OPTION_CLOSE"); } - public get uitextCancel() { + public get uitextCancel(): string { return this.intlService.localizeText("INFO_OPTION_CANCEL"); } - public get uitextValidate() { + public get uitextValidate(): string { return this.intlService.localizeText("INFO_OPTION_VALIDATE"); } - public get uitextEditParamVariableValues() { + public get uitextEditParamVariableValues(): string { return this.intlService.localizeText("INFO_PARAMFIELD_PARAMVARIER_TITLE"); } - public get uitextListeValeurs() { + public get uitextListeValeurs(): string { return this.intlService.localizeText("INFO_PARAMFIELD_PARAMVARIER_VALUES_FORMAT"); } @@ -421,26 +421,34 @@ export class DialogEditParamValuesComponent implements OnInit { return this.intlService.localizeText("ERROR_PARAM_MUST_BE_A_NUMBER"); } - public get uitextMustBeListOfNumbers() { + public get uitextMustBeListOfNumbers(): string { return sprintf(this.intlService.localizeText("INFO_PARAMFIELD_PARAMVARIER_VALUES_FORMAT_ERROR"), this.separatorPattern); } - public get uitextDecimalSeparator() { + public get uitextDecimalSeparator(): string { return this.intlService.localizeText("INFO_PARAMFIELD_PARAMVARIER_SEPARATEUR_DECIMAL"); } - public get uitextImportFile() { + public get uitextImportFile(): string { return this.intlService.localizeText("INFO_PARAMFIELD_PARAMVARIER_IMPORT_FICHIER"); } - public get uitextExtensionStrategy() { + public get uitextExtensionStrategy(): string { return this.intlService.localizeText("INFO_PARAMFIELD_PARAMVARIER_EXT_STRATEGY"); } - public get uitextMustBePositive() { + public get uitextMustBePositive(): string { return this.intlService.localizeText("ERROR_PARAM_MUST_BE_POSITIVE"); } + public get uitextShowValuesChart(): string { + if (this.viewChart) { + return this.intlService.localizeText("INFO_PARAMFIELD_PARAMVARIER_EDIT_VALUES"); + } else { + return this.intlService.localizeText("INFO_PARAMFIELD_PARAMVARIER_SHOW_CHART"); + } + } + public ngOnInit() { this.initVariableValues(); } diff --git a/src/app/components/field-set/field-set.component.html b/src/app/components/field-set/field-set.component.html index 708b04ad6..9e9ba53f6 100644 --- a/src/app/components/field-set/field-set.component.html +++ b/src/app/components/field-set/field-set.component.html @@ -8,20 +8,20 @@ {{ i }} </mat-option> </mat-select> - <button type="button" mat-icon-button (click)="onAddClick()" class="add-structure"> + <button type="button" mat-icon-button (click)="onAddClick()" class="add-structure" [title]="uitextAddStructure"> <mat-icon>add_box</mat-icon> </button> - <button type="button" mat-icon-button (click)="onCopyClick()" class="copy-structure"> + <button type="button" mat-icon-button (click)="onCopyClick()" class="copy-structure" [title]="uitextCopyStructure"> <mat-icon>content_copy</mat-icon> </button> | - <button type="button" mat-icon-button [disabled]="! enableRemoveButton" (click)="onRemoveClick()"> + <button type="button" mat-icon-button [disabled]="! enableRemoveButton" (click)="onRemoveClick()" [title]="uitextRemoveStructure"> <mat-icon>delete</mat-icon> </button> - <button type="button" mat-icon-button [disabled]="! enableUpButton" (click)="onMoveUpClick()"> + <button type="button" mat-icon-button [disabled]="! enableUpButton" (click)="onMoveUpClick()" [title]="uitextMoveStructureUp"> <mat-icon>arrow_upward</mat-icon> </button> - <button type="button" mat-icon-button [disabled]="! enableDownButton" (click)="onMoveDownClick()"> + <button type="button" mat-icon-button [disabled]="! enableDownButton" (click)="onMoveDownClick()" [title]="uitextMoveStructureDown"> <mat-icon>arrow_downward</mat-icon> </button> </div> diff --git a/src/app/components/field-set/field-set.component.ts b/src/app/components/field-set/field-set.component.ts index d26f1e004..b377317bb 100644 --- a/src/app/components/field-set/field-set.component.ts +++ b/src/app/components/field-set/field-set.component.ts @@ -311,6 +311,26 @@ export class FieldSetComponent implements DoCheck { this._paramComponents.forEach(fsc => fsc.updateLinkedParameter()); } + public get uitextAddStructure(): string { + return this.i18nService.localizeText("INFO_FIELDSET_ADD"); + } + + public get uitextCopyStructure(): string { + return this.i18nService.localizeText("INFO_FIELDSET_COPY"); + } + + public get uitextRemoveStructure(): string { + return this.i18nService.localizeText("INFO_FIELDSET_REMOVE"); + } + + public get uitextMoveStructureUp(): string { + return this.i18nService.localizeText("INFO_FIELDSET_MOVE_UP"); + } + + public get uitextMoveStructureDown(): string { + return this.i18nService.localizeText("INFO_FIELDSET_MOVE_DOWN"); + } + /** * clic sur le bouton ajouter */ diff --git a/src/app/components/fixedvar-results/fixed-results.component.html b/src/app/components/fixedvar-results/fixed-results.component.html index d915732d8..67effaa6a 100644 --- a/src/app/components/fixedvar-results/fixed-results.component.html +++ b/src/app/components/fixedvar-results/fixed-results.component.html @@ -1,7 +1,7 @@ <div class="fixed-results-container" *ngIf="hasFixedParameters"> <div class="fixed-results-buttons"> - <button mat-icon-button (click)="exportAsSpreadsheet()"> + <button mat-icon-button (click)="exportAsSpreadsheet()" [title]="uitextExportAsSpreadsheet"> <mat-icon color="primary">file_download</mat-icon> </button> </div> diff --git a/src/app/components/fixedvar-results/fixed-results.component.ts b/src/app/components/fixedvar-results/fixed-results.component.ts index 1b52d9c66..61569300d 100644 --- a/src/app/components/fixedvar-results/fixed-results.component.ts +++ b/src/app/components/fixedvar-results/fixed-results.component.ts @@ -46,6 +46,10 @@ export class FixedResultsComponent { return this.intlService.localizeText("INFO_CALCULATOR_VALEURS"); } + private get uitextExportAsSpreadsheet() { + return this.intlService.localizeText("INFO_RESULTS_EXPORT_AS_SPREADSHEET"); + } + private get fixedParams() { return this._fixedResults && this._fixedResults.fixedParameters; } diff --git a/src/app/components/fixedvar-results/var-results.component.html b/src/app/components/fixedvar-results/var-results.component.html index 252c579fc..8768e08b8 100644 --- a/src/app/components/fixedvar-results/var-results.component.html +++ b/src/app/components/fixedvar-results/var-results.component.html @@ -1,13 +1,13 @@ <div class="var-results-container" #variableResults *ngIf="hasResults" fxLayout="row wrap" fxLayoutAlign="center center"> <div fxFlex="1 1 100%"> <div class="var-results-buttons"> - <button mat-icon-button (click)="exportAsSpreadsheet()"> + <button mat-icon-button (click)="exportAsSpreadsheet()" [title]="uitextExportAsSpreadsheet"> <mat-icon color="primary">file_download</mat-icon> </button> - <button mat-icon-button *ngIf="! isFullscreen" (click)="setFullscreen(variableResults)"> + <button mat-icon-button *ngIf="! isFullscreen" (click)="setFullscreen(variableResults)" [title]="uitextEnterFSTitle"> <mat-icon color="primary" class="scaled12">fullscreen</mat-icon> </button> - <button mat-icon-button *ngIf="isFullscreen" (click)="exitFullscreen()"> + <button mat-icon-button *ngIf="isFullscreen" (click)="exitFullscreen()" [title]="uitextExitFSTitle"> <mat-icon color="primary" class="scaled12">fullscreen_exit</mat-icon> </button> </div> diff --git a/src/app/components/fixedvar-results/var-results.component.ts b/src/app/components/fixedvar-results/var-results.component.ts index 424e43423..6a1e67b47 100644 --- a/src/app/components/fixedvar-results/var-results.component.ts +++ b/src/app/components/fixedvar-results/var-results.component.ts @@ -181,6 +181,18 @@ export class VarResultsComponent extends ResultsComponent { XLSX.writeFile(wb, "VariableResults.xlsx"); } + public get uitextExportAsSpreadsheet() { + return this.intlService.localizeText("INFO_RESULTS_EXPORT_AS_SPREADSHEET"); + } + + public get uitextEnterFSTitle() { + return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_ENTER_FS"); + } + + public get uitextExitFSTitle() { + return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_EXIT_FS"); + } + /** Shows a modal displaying the log messages details for a calcutation step */ public openLogDetails(messages: Message[]) { if (this.isFullscreen) { diff --git a/src/app/components/pab-results/pab-results-table.component.html b/src/app/components/pab-results/pab-results-table.component.html index ce1029fae..094eb14a8 100644 --- a/src/app/components/pab-results/pab-results-table.component.html +++ b/src/app/components/pab-results/pab-results-table.component.html @@ -2,13 +2,13 @@ <div class="pab-results-table-container" #pabResultsTable fxLayout="row wrap" fxLayoutAlign="center center"> <div fxFlex="1 1 100%"> <div class="pab-results-table-buttons"> - <button mat-icon-button (click)="exportAsSpreadsheet()"> + <button mat-icon-button (click)="exportAsSpreadsheet()" [title]="uitextExportAsSpreadsheet"> <mat-icon color="primary">file_download</mat-icon> </button> - <button mat-icon-button *ngIf="! isFullscreen" (click)="setFullscreen(pabResultsTable)"> + <button mat-icon-button *ngIf="! isFullscreen" (click)="setFullscreen(pabResultsTable)" [title]="uitextEnterFSTitle"> <mat-icon color="primary" class="scaled12">fullscreen</mat-icon> </button> - <button mat-icon-button *ngIf="isFullscreen" (click)="exitFullscreen()"> + <button mat-icon-button *ngIf="isFullscreen" (click)="exitFullscreen()" [title]="uitextExitFSTitle"> <mat-icon color="primary" class="scaled12">fullscreen_exit</mat-icon> </button> </div> diff --git a/src/app/components/pab-results/pab-results-table.component.ts b/src/app/components/pab-results/pab-results-table.component.ts index 3080acf1f..cd7cba2d4 100644 --- a/src/app/components/pab-results/pab-results-table.component.ts +++ b/src/app/components/pab-results/pab-results-table.component.ts @@ -136,4 +136,16 @@ export class PabResultsTableComponent extends ResultsComponent { // save and download XLSX.writeFile(wb, "PABResults.xlsx"); } + + public get uitextExportAsSpreadsheet() { + return this.intlService.localizeText("INFO_RESULTS_EXPORT_AS_SPREADSHEET"); + } + + public get uitextEnterFSTitle() { + return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_ENTER_FS"); + } + + public get uitextExitFSTitle() { + return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_EXIT_FS"); + } } diff --git a/src/app/components/pab-table/pab-table.component.html b/src/app/components/pab-table/pab-table.component.html index 93864ec7b..cad53037f 100644 --- a/src/app/components/pab-table/pab-table.component.html +++ b/src/app/components/pab-table/pab-table.component.html @@ -21,21 +21,26 @@ {{ i }} </mat-option> </mat-select> - <button type="button" mat-icon-button color="primary" [disabled]="! enableAddButton" (click)="onAddClick()"> + <button type="button" mat-icon-button color="primary" [disabled]="! enableAddButton" (click)="onAddClick()" + [title]="uitextAdd"> <mat-icon>add_box</mat-icon> </button> - <button type="button" mat-icon-button color="primary" [disabled]="! enableCopyButton" (click)="onCopyClick()"> + <button type="button" mat-icon-button color="primary" [disabled]="! enableCopyButton" (click)="onCopyClick()" + [title]="uitextCopy"> <mat-icon>content_copy</mat-icon> </button> | - <button type="button" mat-icon-button color="primary" [disabled]="! enableRemoveButton" (click)="onRemoveClick()"> + <button type="button" mat-icon-button color="primary" [disabled]="! enableRemoveButton" (click)="onRemoveClick()" + [title]="uitextRemove"> <mat-icon>delete</mat-icon> </button> - <button type="button" mat-icon-button color="primary" [disabled]="! enableUpButton" (click)="onMoveUpClick()"> + <button type="button" mat-icon-button color="primary" [disabled]="! enableUpButton" (click)="onMoveUpClick()" + [title]="uitextMoveUp"> <mat-icon *ngIf="! selectionIsOneDevice">arrow_upward</mat-icon> <mat-icon *ngIf="selectionIsOneDevice">arrow_back</mat-icon> </button> - <button type="button" mat-icon-button color="primary" [disabled]="! enableDownButton" (click)="onMoveDownClick()"> + <button type="button" mat-icon-button color="primary" [disabled]="! enableDownButton" (click)="onMoveDownClick()" + [title]="uitextMoveDown"> <mat-icon *ngIf="! selectionIsOneDevice">arrow_downward</mat-icon> <mat-icon *ngIf="selectionIsOneDevice">arrow_forward</mat-icon> </button> diff --git a/src/app/components/pab-table/pab-table.component.ts b/src/app/components/pab-table/pab-table.component.ts index edb78086f..494704720 100644 --- a/src/app/components/pab-table/pab-table.component.ts +++ b/src/app/components/pab-table/pab-table.component.ts @@ -1020,6 +1020,34 @@ export class PabTableComponent implements AfterViewInit, OnInit { this.refresh(); } + public get uitextAdd(): string { + return this.i18nService.localizeText("INFO_FIELDSET_ADD"); + } + + public get uitextCopy(): string { + return this.i18nService.localizeText("INFO_FIELDSET_COPY"); + } + + public get uitextRemove(): string { + return this.i18nService.localizeText("INFO_FIELDSET_REMOVE"); + } + + public get uitextMoveUp(): string { + if (this.selectionIsOneDevice) { + return this.i18nService.localizeText("INFO_FIELDSET_MOVE_LEFT"); + } else { + return this.i18nService.localizeText("INFO_FIELDSET_MOVE_UP"); + } + } + + public get uitextMoveDown(): string { + if (this.selectionIsOneDevice) { + return this.i18nService.localizeText("INFO_FIELDSET_MOVE_RIGHT"); + } else { + return this.i18nService.localizeText("INFO_FIELDSET_MOVE_DOWN"); + } + } + /** Replace device Nub when LoiDebit is changed */ public loiDebitSelected($event: any, cell: any) { const device = cell.model as Nub; diff --git a/src/app/components/param-computed/param-computed.component.html b/src/app/components/param-computed/param-computed.component.html index ee50ccaaf..d2d336cfc 100644 --- a/src/app/components/param-computed/param-computed.component.html +++ b/src/app/components/param-computed/param-computed.component.html @@ -1,7 +1,7 @@ <!-- a fake input bound to nothing, for the sake of UI consistency --> <mat-form-field> <input matInput disabled [id]="inputId" class="form-control" type="text" [ngModel]="infoText" [placeholder]="param.title"> - <button type="button" *ngIf="isDicho" mat-icon-button class="param-computed-more" (click)="openDialog()"> + <button type="button" *ngIf="isDicho" mat-icon-button class="param-computed-more" (click)="openDialog()" [title]="uitextEditInitialValue"> <mat-icon>more_horiz</mat-icon> </button> </mat-form-field> diff --git a/src/app/components/param-computed/param-computed.component.ts b/src/app/components/param-computed/param-computed.component.ts index b95fe29ea..2eb59b5ae 100644 --- a/src/app/components/param-computed/param-computed.component.ts +++ b/src/app/components/param-computed/param-computed.component.ts @@ -3,6 +3,7 @@ import { MatDialog } from "@angular/material"; import { NgParameter } from "../../formulaire/ngparam"; import { ParamCalculability, Structure } from "jalhyd"; import { DialogEditParamComputedComponent } from "../dialog-edit-param-computed/dialog-edit-param-computed.component"; +import { I18nService } from "../../services/internationalisation/internationalisation.service"; @Component({ selector: "param-computed", @@ -34,7 +35,8 @@ export class ParamComputedComponent { } constructor( - private editInitialValueDialog: MatDialog + private editInitialValueDialog: MatDialog, + private i18nService: I18nService ) { } public get isDicho() { @@ -58,4 +60,8 @@ export class ParamComputedComponent { } ); } + + public get uitextEditInitialValue() { + return this.i18nService.localizeText("INFO_DIALOG_COMPUTED_VALUE_TITLE"); + } } diff --git a/src/app/components/param-values/param-values.component.html b/src/app/components/param-values/param-values.component.html index a34d49e5f..2561e9220 100644 --- a/src/app/components/param-values/param-values.component.html +++ b/src/app/components/param-values/param-values.component.html @@ -2,7 +2,7 @@ <mat-form-field> <input matInput disabled class="form-control" type="text" [id]="inputId" [name]="inputId" [ngModel]="infoText" [placeholder]="param.title"> - <button type="button" mat-icon-button class="param-values-more" (click)="openDialog()"> + <button type="button" mat-icon-button class="param-values-more" (click)="openDialog()" [title]="uitextEditValues"> <mat-icon>more_horiz</mat-icon> </button> </mat-form-field> diff --git a/src/app/components/param-values/param-values.component.ts b/src/app/components/param-values/param-values.component.ts index 3e1e933d5..828d6c1df 100644 --- a/src/app/components/param-values/param-values.component.ts +++ b/src/app/components/param-values/param-values.component.ts @@ -3,6 +3,7 @@ import { NgParameter } from "../../formulaire/ngparam"; import { DialogEditParamValuesComponent } from "../dialog-edit-param-values/dialog-edit-param-values.component"; import { MatDialog } from "@angular/material"; import { ParamValueMode, Observer, Structure } from "jalhyd"; +import { I18nService } from "../../services/internationalisation/internationalisation.service"; @Component({ selector: "param-values", @@ -26,7 +27,8 @@ export class ParamValuesComponent implements AfterViewInit, Observer { protected change = new EventEmitter<any>(); constructor( - private editValuesDialog: MatDialog + private editValuesDialog: MatDialog, + private i18nService: I18nService ) { } public get isMinMax() { @@ -97,4 +99,8 @@ export class ParamValuesComponent implements AfterViewInit, Observer { } } + public get uitextEditValues(): string { + return this.i18nService.localizeText("INFO_PARAMFIELD_PARAMVARIER_EDIT_VALUES"); + } + } diff --git a/src/app/components/remous-results/remous-results.component.html b/src/app/components/remous-results/remous-results.component.html index 4efd8c40d..8c3243939 100644 --- a/src/app/components/remous-results/remous-results.component.html +++ b/src/app/components/remous-results/remous-results.component.html @@ -1,13 +1,13 @@ <div class="remous-results-container" #remousResults *ngIf="hasResults" fxLayout="row wrap" fxLayoutAlign="center center"> <div fxFlex="1 1 100%"> <div class="remous-results-buttons"> - <button mat-icon-button (click)="exportAsImage(remousResults)"> + <button mat-icon-button (click)="exportAsImage(remousResults)" [title]="uitextExportImageTitle"> <mat-icon color="primary">image</mat-icon> </button> - <button mat-icon-button *ngIf="! isFullscreen" (click)="setFullscreen(remousResults)"> + <button mat-icon-button *ngIf="! isFullscreen" (click)="setFullscreen(remousResults)" [title]="uitextEnterFSTitle"> <mat-icon color="primary" class="scaled12">fullscreen</mat-icon> </button> - <button mat-icon-button *ngIf="isFullscreen" (click)="exitFullscreen()"> + <button mat-icon-button *ngIf="isFullscreen" (click)="exitFullscreen()" [title]="uitextExitFSTitle"> <mat-icon color="primary" class="scaled12">fullscreen_exit</mat-icon> </button> </div> @@ -21,13 +21,13 @@ <div class="remous-results-extragraph-container" #remousResultsExtra *ngIf="extraGraph" fxLayout="row wrap" fxLayoutAlign="center center"> <div fxFlex="1 1 100%"> <div class="remous-results-buttons"> - <button mat-icon-button (click)="exportAsImage(remousResultsExtra)"> + <button mat-icon-button (click)="exportAsImage(remousResultsExtra)" [title]="uitextExportImageTitle"> <mat-icon color="primary">image</mat-icon> </button> - <button mat-icon-button *ngIf="! isFullscreen" (click)="setFullscreen(remousResultsExtra)"> + <button mat-icon-button *ngIf="! isFullscreen" (click)="setFullscreen(remousResultsExtra)" [title]="uitextEnterFSTitle"> <mat-icon color="primary" class="scaled12">fullscreen</mat-icon> </button> - <button mat-icon-button *ngIf="isFullscreen" (click)="exitFullscreen()"> + <button mat-icon-button *ngIf="isFullscreen" (click)="exitFullscreen()" [title]="uitextExitFSTitle"> <mat-icon color="primary" class="scaled12">fullscreen_exit</mat-icon> </button> </div> diff --git a/src/app/components/remous-results/remous-results.component.ts b/src/app/components/remous-results/remous-results.component.ts index f5328dc13..7c21d05d6 100644 --- a/src/app/components/remous-results/remous-results.component.ts +++ b/src/app/components/remous-results/remous-results.component.ts @@ -283,6 +283,18 @@ export class RemousResultsComponent extends ResultsComponent implements DoCheck return this.intlService.localizeText("INFO_REMOUSRESULTS_TIRANTCRITIQUE"); } + public get uitextExportImageTitle() { + return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_EXPORT_IMAGE"); + } + + public get uitextEnterFSTitle() { + return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_ENTER_FS"); + } + + public get uitextExitFSTitle() { + return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_EXIT_FS"); + } + public get extraGraph(): boolean { return this._remousResults === undefined ? false : this._remousResults.extraGraph; } diff --git a/src/app/components/section-results/section-results.component.html b/src/app/components/section-results/section-results.component.html index 2415b2655..04625e227 100644 --- a/src/app/components/section-results/section-results.component.html +++ b/src/app/components/section-results/section-results.component.html @@ -1,13 +1,13 @@ <div class="section-results-container" #sectionResults *ngIf="hasResults" fxLayout="row wrap" fxLayoutAlign="center center"> <div fxFlex="1 1 100%"> <div class="section-results-buttons"> - <button mat-icon-button (click)="exportAsImage(sectionResults)"> + <button mat-icon-button (click)="exportAsImage(sectionResults)" [title]="uitextExportImageTitle"> <mat-icon color="primary">image</mat-icon> </button> - <button mat-icon-button *ngIf="! isFullscreen" (click)="setFullscreen(sectionResults)"> + <button mat-icon-button *ngIf="! isFullscreen" (click)="setFullscreen(sectionResults)" [title]="uitextEnterFSTitle"> <mat-icon color="primary" class="scaled12">fullscreen</mat-icon> </button> - <button mat-icon-button *ngIf="isFullscreen" (click)="exitFullscreen()"> + <button mat-icon-button *ngIf="isFullscreen" (click)="exitFullscreen()" [title]="uitextExitFSTitle"> <mat-icon color="primary" class="scaled12">fullscreen_exit</mat-icon> </button> </div> diff --git a/src/app/components/section-results/section-results.component.ts b/src/app/components/section-results/section-results.component.ts index 1309ab2ab..47141eaf2 100644 --- a/src/app/components/section-results/section-results.component.ts +++ b/src/app/components/section-results/section-results.component.ts @@ -7,6 +7,7 @@ import { SectionResults } from "../../results/section-results"; import { ApplicationSetupService } from "../../services/app-setup/app-setup.service"; import { CalculatorResults } from "../../results/calculator-results"; import { ResultsComponent } from "../fixedvar-results/results.component"; +import { I18nService } from "../../services/internationalisation/internationalisation.service"; @Component({ selector: "section-results", @@ -18,7 +19,8 @@ import { ResultsComponent } from "../fixedvar-results/results.component"; export class SectionResultsComponent extends ResultsComponent implements DoCheck { constructor( - private appSetupService: ApplicationSetupService + private appSetupService: ApplicationSetupService, + private intlService: I18nService ) { super(); } @@ -130,4 +132,16 @@ export class SectionResultsComponent extends ResultsComponent implements DoCheck saveAs(blob, "chart.png"); }); // defaults to image/png } + + public get uitextExportImageTitle() { + return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_EXPORT_IMAGE"); + } + + public get uitextEnterFSTitle() { + return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_ENTER_FS"); + } + + public get uitextExitFSTitle() { + return this.intlService.localizeText("INFO_GRAPH_BUTTON_TITLE_EXIT_FS"); + } } diff --git a/src/locale/messages.en.json b/src/locale/messages.en.json index d4f28aa47..cdc0d46c4 100644 --- a/src/locale/messages.en.json +++ b/src/locale/messages.en.json @@ -111,6 +111,13 @@ "INFO_DEVICE_COPIED_N_TIMES": "Device #%s copied %s times", "INFO_DEVICE_MOVED": "Device #%s moved", "INFO_DEVICE_REMOVED": "Device #%s removed", + "INFO_FIELDSET_ADD": "Add", + "INFO_FIELDSET_COPY": "Copy", + "INFO_FIELDSET_REMOVE": "Remove", + "INFO_FIELDSET_MOVE_UP": "Move up", + "INFO_FIELDSET_MOVE_DOWN": "Move down", + "INFO_FIELDSET_MOVE_LEFT": "Move left", + "INFO_FIELDSET_MOVE_RIGHT": "Move right", "INFO_WALL_ADDED": "1 wall added", "INFO_WALL_ADDED_N_TIMES": "%s walls added", "INFO_WALL_COPIED": "Wall #%s copied", @@ -283,6 +290,7 @@ "INFO_PARAMFIELD_PARAMFIXE": "Fixed", "INFO_PARAMFIELD_PARAMLIE_LABEL": "Linked parameter", "INFO_PARAMFIELD_PARAMLIE": "Link", + "INFO_PARAMFIELD_PARAMVARIER_EDIT_VALUES": "Edit values", "INFO_PARAMFIELD_PARAMVARIER_EXT_STRATEGY": "Values list extension strategy", "INFO_PARAMFIELD_PARAMVARIER_EXT_STRATEGY_REPEAT_LAST": "Repeat last value", "INFO_PARAMFIELD_PARAMVARIER_EXT_STRATEGY_RECYCLE": "Recycle values", @@ -292,6 +300,7 @@ "INFO_PARAMFIELD_PARAMVARIER_SEPARATEUR_DECIMAL": "Decimal separator", "INFO_PARAMFIELD_PARAMVARIER_SEPARATEUR_POINT": ". (dot)", "INFO_PARAMFIELD_PARAMVARIER_SEPARATEUR_VIRGULE": ", (comma)", + "INFO_PARAMFIELD_PARAMVARIER_SHOW_CHART": "Show values chart", "INFO_PARAMFIELD_PARAMVARIER_TITLE": "Multiple values", "INFO_PARAMFIELD_PARAMVARIER_VALUES_FORMAT_ERROR": "Incorrect format; accepted separator: %s", "INFO_PARAMFIELD_PARAMVARIER_VALUES_FORMAT": "Values list", @@ -322,6 +331,7 @@ "INFO_REPORT_BUG_BODY": "This is an issue report.\n\nPlease describe quickly the issue you encoutered, and the steps you followed:\n\n\n\n\n--- Current session state - do not modify text below ---\n------------------------------------------------------------------------\n\n", "INFO_REPORT_BUG_SUBJECT": "Issue report", "INFO_REQUIRES": "requires", + "INFO_RESULTS_EXPORT_AS_SPREADSHEET": "Export as XLSX", "INFO_SECTIONPARAMETREE_TITRE_COURT": "Param. section", "INFO_SECTIONPARAMETREE_TITRE": "Parametric section", "INFO_SETUP_ENABLE_NOTIFICATIONS": "Enable on-screen notifications", @@ -329,6 +339,8 @@ "INFO_SETUP_NEWTON_MAX_ITER": "Newton iteration limit", "INFO_SETUP_PRECISION_AFFICHAGE": "Display accuracy", "INFO_SETUP_PRECISION_CALCUL": "Computation accuracy", + "INFO_SETUP_RESTORE_DEFAULT_VALUES": "Restore default values", + "INFO_SETUP_STORE_PREFERENCES": "Save preferences", "INFO_SETUP_TITLE": "Application setup", "INFO_SNACKBAR_DEFAULT_SETTINGS_RESTORED": "Default settings restored", "INFO_SNACKBAR_RESULTS_CALCULATED": "Results calculated for", diff --git a/src/locale/messages.fr.json b/src/locale/messages.fr.json index 55efcec60..34523b4b9 100644 --- a/src/locale/messages.fr.json +++ b/src/locale/messages.fr.json @@ -111,6 +111,13 @@ "INFO_DEVICE_COPIED_N_TIMES": "Ouvrage n°%s copié %s fois", "INFO_DEVICE_MOVED": "Ouvrage n°%s déplacé", "INFO_DEVICE_REMOVED": "Ouvrage n°%s supprimé", + "INFO_FIELDSET_ADD": "Ajouter", + "INFO_FIELDSET_COPY": "Copier", + "INFO_FIELDSET_REMOVE": "Supprimer", + "INFO_FIELDSET_MOVE_UP": "Déplacer vers le haut", + "INFO_FIELDSET_MOVE_DOWN": "Déplacer vers le bas", + "INFO_FIELDSET_MOVE_LEFT": "Déplacer vers la gauche", + "INFO_FIELDSET_MOVE_RIGHT": "Déplacer vers la droite", "INFO_WALL_ADDED": "1 cloison ajoutée", "INFO_WALL_ADDED_N_TIMES": "%s cloisons ajoutées", "INFO_WALL_COPIED": "Cloison n°%s copiée", @@ -283,6 +290,7 @@ "INFO_PARAMFIELD_PARAMFIXE": "fixé", "INFO_PARAMFIELD_PARAMLIE_LABEL": "Paramètre lié", "INFO_PARAMFIELD_PARAMLIE": "lié", + "INFO_PARAMFIELD_PARAMVARIER_EDIT_VALUES": "Modifier les valeurs", "INFO_PARAMFIELD_PARAMVARIER_EXT_STRATEGY": "Stratégie d'extension de la liste de valeurs", "INFO_PARAMFIELD_PARAMVARIER_EXT_STRATEGY_REPEAT_LAST": "Répéter la dernière valeur", "INFO_PARAMFIELD_PARAMVARIER_EXT_STRATEGY_RECYCLE": "Réutiliser les valeurs", @@ -292,6 +300,7 @@ "INFO_PARAMFIELD_PARAMVARIER_SEPARATEUR_DECIMAL": "Séparateur décimal", "INFO_PARAMFIELD_PARAMVARIER_SEPARATEUR_POINT": ". (point)", "INFO_PARAMFIELD_PARAMVARIER_SEPARATEUR_VIRGULE": ", (virgule)", + "INFO_PARAMFIELD_PARAMVARIER_SHOW_CHART": "Afficher le graphique des valeurs", "INFO_PARAMFIELD_PARAMVARIER_TITLE": "Valeurs multiples", "INFO_PARAMFIELD_PARAMVARIER_VALUES_FORMAT_ERROR": "Format incorrect; séparateurs acceptés: %s", "INFO_PARAMFIELD_PARAMVARIER_VALUES_FORMAT": "Liste de valeurs", @@ -322,6 +331,7 @@ "INFO_REPORT_BUG_BODY": "Ceci est un rapport d'erreur.\n\nMerci de décrire rapidement ci-dessous le problème rencontré, et les étapes qui vous y ont mené :\n\n\n\n\n--- État de la session en cours - ne pas modifier le texte ci-dessous ---\n--------------------------------------------------------------------------------------------\n\n", "INFO_REPORT_BUG_SUBJECT": "Rapport d'erreur", "INFO_REQUIRES": "dépend de", + "INFO_RESULTS_EXPORT_AS_SPREADSHEET": "Exporter en XLSX", "INFO_SECTIONPARAMETREE_TITRE_COURT": "Sec. param.", "INFO_SECTIONPARAMETREE_TITRE": "Section paramétrée", "INFO_SETUP_ENABLE_NOTIFICATIONS": "Activer les notifications à l'écran", @@ -329,6 +339,8 @@ "INFO_SETUP_NEWTON_MAX_ITER": "Newton : nombre d'itérations maximum", "INFO_SETUP_PRECISION_AFFICHAGE": "Précision d'affichage", "INFO_SETUP_PRECISION_CALCUL": "Précision de calcul", + "INFO_SETUP_RESTORE_DEFAULT_VALUES": "Restaurer les valeurs par défaut", + "INFO_SETUP_STORE_PREFERENCES": "Enregistrer les préférences", "INFO_SETUP_TITLE": "Paramètres de l'application", "INFO_SNACKBAR_DEFAULT_SETTINGS_RESTORED": "Paramètres par défaut restaurés", "INFO_SNACKBAR_RESULTS_CALCULATED": "Résultats calculés pour", -- GitLab