diff --git a/src/app/app.component.html b/src/app/app.component.html index 5889fc197f447399035f5c1374d3d0671fa6ea94..e482e6042fc184e924f111040fdd153b376bab4f 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 c928af6fd58effaa595531ba39e680b990c3566d..78e9b85eff4b92eff2343f878bcb73129b4be3a6 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 13c2381e5d90b56e4b94c34ee9cc338c46e02615..c1eafaed8925e114a095a6a6f36b0a8d870e14b7 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 ebc57a529d423ea6df017904ae43c981c863e715..011f1f7d6e5ba24e972c008063a4d9131205a3eb 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 fc2ec72e615931502751c2e177598cf7e4ed3c4c..56923b672c4fad1e9b73aab494d9670e06079a4a 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 708b04ad6a322a05841b1f4e1e2199e88900fe41..9e9ba53f66c9b7d16a2eff2ce323541c11620a1c 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 d26f1e0048abe33f0f47a8eee5966ca15624b771..b377317bb696c0eae92788d0b9cde7031ef76a52 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 d915732d89f3caeaf124a8445fc29359236e9f7c..67effaa6ae9922257947c55c26863a9801e8eaea 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 1b52d9c66c2f10081109f9071eb54c2558ffee2d..61569300d9cbaf82cd6c8bcd1551274dfeb8925d 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 252c579fca9fb572ef196ba433af7e4c00b31daa..8768e08b8d2a6ad547e17abb2c11f6990771a5dd 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 424e434239f081897fa449828c155dfe2fe6698e..6a1e67b474b81808743361791f8d73fa2ab52aee 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 ce1029faef169b64fc08b8bb7215bf0ea99ec43a..094eb14a8941518893e524c1396a5657f12bd9e9 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 3080acf1f7415f4c7734b20dc262fc7765ea1b55..cd7cba2d41ae8736f187de2454a6c5e12046e3c6 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 93864ec7b69efc4a816a047dcdc6d7d11800df14..cad53037f9604d71da3ab605a23c8b0e7f4009c3 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 edb78086f53ff176ba4522ae3daa7ee2f1ee6bc3..494704720f6baef0d4fae85ac9d0191061f89262 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 ee50ccaaf0f680caab6e02f0e50c2dcdca5ece1b..d2d336cfc25540b47b0412423fd880c9e505b000 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 b95fe29eab7a7343612f8e0bcdb3d19390d0550d..2eb59b5aee683c32dcf1395ea82bfb40b628286b 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 a34d49e5f49e2755478bfdc567d142d1b99d7269..2561e922040ab17c2b7afce1fce27d7e367f3601 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 3e1e933d51f2b66edd2222424c4b9a5a8adade7c..828d6c1df1a421284b4c1814507d6c858f0bdc90 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 4efd8c40dabe2d2ffd9fed7a21755f7e9c400fdb..8c324393901319fb6f0c0f6e7e9a1875f9fbc38a 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 f5328dc134c1abbd23c1687cf375f4a98c5ae93e..7c21d05d68245d81c103bb29f6f95b695904f4a8 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 2415b265547f4e7a83cd676108edaefd596f7b03..04625e227ea5500494aa68bd6cb751036bd43063 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 1309ab2abec6df756691aa907036c6bd4e1c22b1..47141eaf2c0d79ef886b2cbceaf37696d1cfcc9c 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 d4f28aa473a8fe714c5d11eb10551f4e0b63c013..cdc0d46c43045ce4a53361c99f4cb166187ef8e9 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 55efcec60c067f6d562acaccc469a4b9cb2b57dd..34523b4b9f28a951b36be25885b628d75d9b44a9 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",