diff --git a/src/app/components/dialog-edit-param-computed/dialog-edit-param-computed.component.ts b/src/app/components/dialog-edit-param-computed/dialog-edit-param-computed.component.ts index e7979965fce7f80717be0d9086fddc818922c6e1..5321f476f84fec449f58c0fb597e4e74f4f31b92 100644 --- a/src/app/components/dialog-edit-param-computed/dialog-edit-param-computed.component.ts +++ b/src/app/components/dialog-edit-param-computed/dialog-edit-param-computed.component.ts @@ -30,8 +30,7 @@ export class DialogEditParamComputedComponent implements OnInit { } public get uitextEditParamComputedInitialValue() { - return "Modifier la valeur initiale (à traduire)"; - // return this.intlService.localizeText("INFO_OPTION_ALL"); + return this.intlService.localizeText("INFO_DIALOG_COMPUTED_VALUE_TITLE"); } public ngOnInit() { diff --git a/src/app/components/generic-calculator/calculator.component.html b/src/app/components/generic-calculator/calculator.component.html index e2820e129aaa54123c0c44a86e936d815dabd08e..d5d0c4c40bdaeac549f367834579c5572ba136ae 100644 --- a/src/app/components/generic-calculator/calculator.component.html +++ b/src/app/components/generic-calculator/calculator.component.html @@ -48,7 +48,7 @@ <mat-card id="calc-card-results" fxFlex.gt-xs="1 0 400px" fxFlex.lt-sm="1 0 300px"> <mat-card-header> <mat-card-title> - Resultats (à traduire) + {{ uitextResultsTitle }} </mat-card-title> </mat-card-header> <mat-card-content> diff --git a/src/app/components/generic-calculator/calculator.component.ts b/src/app/components/generic-calculator/calculator.component.ts index e696082cb0e3409287247f1b1810a1b5f17100ef..de45460ffb50915e08171d0ee84e96dd3c349d2c 100644 --- a/src/app/components/generic-calculator/calculator.component.ts +++ b/src/app/components/generic-calculator/calculator.component.ts @@ -142,6 +142,10 @@ export class GenericCalculatorComponent extends BaseComponent implements OnInit, return this.intlService.localizeText("INFO_CALCULATOR_CALC_NAME"); } + public get uitextResultsTitle() { + return this.intlService.localizeText("INFO_CALCULATOR_RESULTS_TITLE"); + } + ngOnInit() { this.intlService.addObserver(this); this.formulaireService.addObserver(this); diff --git a/src/app/components/param-computed/param-computed.component.ts b/src/app/components/param-computed/param-computed.component.ts index a1148d90b5b25d7256215e82e6509cde692791d2..6bfced00bab90372af36a4d7946a5aee44dae579 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 } 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", @@ -20,7 +21,8 @@ export class ParamComputedComponent { public title: string; constructor( - private editInitialValueDialog: MatDialog + private editInitialValueDialog: MatDialog, + private intlService: I18nService ) { } public get isDicho() { @@ -28,9 +30,10 @@ export class ParamComputedComponent { } public get infoText() { - let text = "En calcul (à traduire)"; // @TODO traduire "in calculation" + let text = this.intlService.localizeText("INFO_PARAMFIELD_IN_CALCULATION"); if (this.isDicho) { - text += " (valeur initiale: " + this.param.getValue() + ")"; + text += " (" + this.intlService.localizeText("INFO_PARAMFIELD_IN_CALCULATION_INITIAL_VALUE") + + ": " + this.param.getValue() + ")"; } return text; } diff --git a/src/app/components/param-link/param-link.component.ts b/src/app/components/param-link/param-link.component.ts index 4add3db0526ea2e31dee6f436bab280a8b119f2b..6ef2f06c9ce93d10bdc5c1c8d5c7819ce85e15ad 100644 --- a/src/app/components/param-link/param-link.component.ts +++ b/src/app/components/param-link/param-link.component.ts @@ -4,6 +4,7 @@ import { NgParameter } from "../../formulaire/ngparam"; import { ServiceFactory } from "../../services/service-factory"; import { ParamValueMode, Observer } from "jalhyd"; import { FormulaireService } from "../../services/formulaire/formulaire.service"; +import { I18nService } from "../..//services/internationalisation/internationalisation.service"; @Component({ selector: "param-link", @@ -53,9 +54,9 @@ export class ParamLinkComponent implements OnChanges, Observer, OnDestroy { private _formService: FormulaireService; - public label = "Choix du paramètre lié (à traduire)"; - - constructor() { + constructor( + private intlService: I18nService + ) { this.valid = new EventEmitter(); this._formService = ServiceFactory.instance.formulaireService; this._formService.addObserver(this); @@ -69,6 +70,10 @@ export class ParamLinkComponent implements OnChanges, Observer, OnDestroy { return this._message; } + public get label() { + return this.intlService.localizeText("INFO_PARAMFIELD_PARAMLIE_LABEL"); + } + public set currentLinkedParam(p: any) { for (let i = 0; i < this._linkableParams.length; i++) { if (this._linkableParams[i].value.uid === p.uid) { diff --git a/src/app/components/results-graph/graph-type.component.ts b/src/app/components/results-graph/graph-type.component.ts index c3d41ebd9265b96f9183f1a7edf26ab6a90b85cc..b2ced5a559b76ccebddd9a61b7b865b5d27bcd23 100644 --- a/src/app/components/results-graph/graph-type.component.ts +++ b/src/app/components/results-graph/graph-type.component.ts @@ -1,6 +1,7 @@ import { Component } from "@angular/core"; import { Observable, IObservable, Observer } from "jalhyd"; import { GraphType } from "../../results/var-results"; +import { I18nService } from "../../services/internationalisation/internationalisation.service"; @Component({ selector: "graph-type", @@ -13,9 +14,7 @@ export class GraphTypeSelectComponent implements IObservable { private _observable: Observable; - public label = "Type de graphe (à traduire)"; - - constructor() { + constructor(private intlService: I18nService) { this._observable = new Observable(); } @@ -42,6 +41,10 @@ export class GraphTypeSelectComponent implements IObservable { } } + public get label() { + return this.intlService.localizeText("INFO_PARAMFIELD_GRAPH_TYPE"); + } + // interface IObservable /** diff --git a/src/locale/messages.en.json b/src/locale/messages.en.json index 6f454dc41fef87ba73244198a371354a064b02ce..554fbba134ac40adea083eceaa99640c5b062c9b 100644 --- a/src/locale/messages.en.json +++ b/src/locale/messages.en.json @@ -34,6 +34,7 @@ "INFO_CALCULATOR_CALC_NAME": "Calculator name", "INFO_CALCULATOR_CALCULER": "Compute", "INFO_CALCULATOR_PARAMFIXES": "Fixed parameters", + "INFO_CALCULATOR_RESULTS_TITLE": "Results", "INFO_CALCULATOR_VALEURS": "Values", "INFO_CLOISONS_TITRE": "Fish ladder: Cross walls", "INFO_CLOSE_DIALOGUE_TEXT": "Warning ! Parameters and results will be lost. Really close?", @@ -51,6 +52,7 @@ "INFO_EXTRARES_ENUM_STRUCTUREFLOWREGIME_1": "Partially submerged", "INFO_EXTRARES_ENUM_STRUCTUREFLOWREGIME_2": "Submerged", "INFO_EXTRARES_ENUM_STRUCTUREFLOWREGIME_3": "Zero flow", + "INFO_DIALOG_COMPUTED_VALUE_TITLE": "Edit initial value", "INFO_DIALOG_LOAD_SESSION_FILENAME": "Choose a file", "INFO_DIALOG_LOAD_SESSION_TITLE": "Load calculator modules", "INFO_DIALOG_SAVE_SESSION_FILENAME": "File name", @@ -135,9 +137,13 @@ "INFO_PABDIMENSIONS_TITRE": "Fish ladder: dimensions", "INFO_PABPUISSANCE_TITRE": "Fish ladder: dissipated power", "INFO_PARALLELSTRUCTURE_TITRE": "Parallel structures", + "INFO_PARAMFIELD_GRAPH_TYPE": "Graph type", + "INFO_PARAMFIELD_IN_CALCULATION": "In calculation", + "INFO_PARAMFIELD_IN_CALCULATION_INITIAL_VALUE": "initial value", "INFO_PARAMFIELD_PARAMCALCULER": "Calculate", "INFO_PARAMFIELD_PARAMFIXE": "Fixed", "INFO_PARAMFIELD_PARAMLIE": "Link", + "INFO_PARAMFIELD_PARAMLIE_LABEL": "Linked parameter", "INFO_PARAMFIELD_PARAMVARIER": "Vary", "INFO_PARAMFIELD_PASVARIATION": "With a variation step of", "INFO_PARAMFIELD_VALEURMAXI": "To maximum value", diff --git a/src/locale/messages.fr.json b/src/locale/messages.fr.json index 490f83bec45c5d2ae0473c3a22b63ee380b41860..f510f99109d595510f7bd9058e8e3e10fef9c753 100644 --- a/src/locale/messages.fr.json +++ b/src/locale/messages.fr.json @@ -34,6 +34,7 @@ "INFO_CALCULATOR_CALC_NAME": "Nom du module de calcul", "INFO_CALCULATOR_CALCULER": "Calculer", "INFO_CALCULATOR_PARAMFIXES": "Paramètres fixés", + "INFO_CALCULATOR_RESULTS_TITLE": "Résultats", "INFO_CALCULATOR_VALEURS": "Valeurs", "INFO_CLOISONS_TITRE": "Passe à bassin : Cloisons", "INFO_CLOSE_DIALOGUE_TEXT": "Attention ! Les paramètres et résultats de la calculette seront perdus. Vraiment fermer ?", @@ -51,6 +52,7 @@ "INFO_EXTRARES_ENUM_STRUCTUREFLOWREGIME_1": "Partiellement noyé", "INFO_EXTRARES_ENUM_STRUCTUREFLOWREGIME_2": "Noyé", "INFO_EXTRARES_ENUM_STRUCTUREFLOWREGIME_3": "Débit nul", + "INFO_DIALOG_COMPUTED_VALUE_TITLE": "Modifier la valeur initiale", "INFO_DIALOG_LOAD_SESSION_FILENAME": "Choisir un fichier", "INFO_DIALOG_LOAD_SESSION_TITLE": "Charger des modules de calcul", "INFO_DIALOG_SAVE_SESSION_FILENAME": "Nom de fichier", @@ -135,9 +137,13 @@ "INFO_PABDIMENSIONS_TITRE": "Passe à bassin : dimensions", "INFO_PABPUISSANCE_TITRE": "Passe à bassin : puissance dissipée", "INFO_PARALLELSTRUCTURE_TITRE": "Lois d'ouvrages", + "INFO_PARAMFIELD_GRAPH_TYPE": "Type de graphe", + "INFO_PARAMFIELD_IN_CALCULATION": "En calcul", + "INFO_PARAMFIELD_IN_CALCULATION_INITIAL_VALUE": "valeur initiale", "INFO_PARAMFIELD_PARAMCALCULER": "calculer", "INFO_PARAMFIELD_PARAMFIXE": "fixé", "INFO_PARAMFIELD_PARAMLIE": "lié", + "INFO_PARAMFIELD_PARAMLIE_LABEL": "Paramètre lié", "INFO_PARAMFIELD_PARAMVARIER": "varier", "INFO_PARAMFIELD_PASVARIATION": "Avec un pas de", "INFO_PARAMFIELD_VALEURMAXI": "À la valeur maximum",