diff --git a/src/app/app.component.ts b/src/app/app.component.ts index 8f495b5da0dbe4234713a14f92f25418f2569097..d9fe72c2412f454d4d17bbfa37dd85a96de92b69 100644 --- a/src/app/app.component.ts +++ b/src/app/app.component.ts @@ -1,34 +1,34 @@ -import { Component, ApplicationRef, OnInit, OnDestroy, HostListener, ViewChild, ComponentRef } from '@angular/core'; -//import { MdDialog } from '@angular/material'; -import { Router, ActivatedRoute } from '@angular/router'; +import { Component, ApplicationRef, OnInit, OnDestroy, HostListener, ViewChild, ComponentRef } from "@angular/core"; +// import { MdDialog } from '@angular/material'; +import { Router, ActivatedRoute } from "@angular/router"; import { Observer } from "jalhyd"; -import { environment } from '../environments/environment'; -import { InternationalisationService, Language, LanguageCode } from './services/internationalisation/internationalisation.service'; -import { ErrorService } from './services/error/error.service'; +import { environment } from "../environments/environment"; +import { InternationalisationService, Language, LanguageCode } from "./services/internationalisation/internationalisation.service"; +import { ErrorService } from "./services/error/error.service"; // import { AlertDialog } from './components/alert-dialog/alert-dialog.component'; -import { FormulaireService } from './services/formulaire/formulaire.service'; -import { FormulaireDefinition } from './formulaire/definition/form-definition'; -import { ServiceFactory } from './services/service-factory'; -import { ParamService } from './services/param/param.service'; -import { ApplicationSetupService } from './services/app-setup/app-setup.service'; -import { HttpService } from './services/http/http.service'; -import { HelpService } from './services/help/help.service'; -import { HelpComponent } from './components/help/help.component'; -import { LoadCalcDialogAnchorDirective } from './components/load-calculator/load-calculator-anchor.directive'; -import { LoadCalculatorComponent } from './components/load-calculator/load-calculator.component'; -import { SaveCalcDialogAnchorDirective } from './components/save-calculator/save-calculator-anchor.directive'; -import { SaveCalculatorComponent } from './components/save-calculator/save-calculator.component'; +import { FormulaireService } from "./services/formulaire/formulaire.service"; +import { FormulaireDefinition } from "./formulaire/definition/form-definition"; +import { ServiceFactory } from "./services/service-factory"; +import { ParamService } from "./services/param/param.service"; +import { ApplicationSetupService } from "./services/app-setup/app-setup.service"; +import { HttpService } from "./services/http/http.service"; +import { HelpService } from "./services/help/help.service"; +import { HelpComponent } from "./components/help/help.component"; +import { LoadCalcDialogAnchorDirective } from "./components/load-calculator/load-calculator-anchor.directive"; +import { LoadCalculatorComponent } from "./components/load-calculator/load-calculator.component"; +import { SaveCalcDialogAnchorDirective } from "./components/save-calculator/save-calculator-anchor.directive"; +import { SaveCalculatorComponent } from "./components/save-calculator/save-calculator.component"; @Component({ - selector: 'nghyd-app', - templateUrl: './app.component.html', - styleUrls: ['./app.component.scss'] + selector: "nghyd-app", + templateUrl: "./app.component.html", + styleUrls: ["./app.component.scss"] }) export class AppComponent implements OnInit, OnDestroy, Observer { - private _displayErrorDialog: boolean = false; + private _displayErrorDialog = false; /** * liste des calculettes. Forme des objets : @@ -115,8 +115,8 @@ export class AppComponent implements OnInit, OnDestroy, Observer { } private updateLocale() { - let tag = this.intlService.currentLanguage.tag; - document['locale'] = tag; + const tag = this.intlService.currentLanguage.tag; + document["locale"] = tag; // location.reload(true); // this.cdRef.markForCheck(); @@ -136,8 +136,7 @@ export class AppComponent implements OnInit, OnDestroy, Observer { // } // else console.log(data); - } - else if (sender instanceof FormulaireService) { + } else if (sender instanceof FormulaireService) { switch (data["action"]) { case "createForm": const f: FormulaireDefinition = data["form"]; @@ -175,11 +174,9 @@ export class AppComponent implements OnInit, OnDestroy, Observer { this.closeCalculator(form); break; } - } - else if (sender instanceof InternationalisationService) { + } else if (sender instanceof InternationalisationService) { this.updateLocale(); - } - else if (sender instanceof FormulaireDefinition) { + } else if (sender instanceof FormulaireDefinition) { switch (data["action"]) { case "nameChanged": this.updateCalculatorTitle(sender, data["name"]); @@ -193,8 +190,9 @@ export class AppComponent implements OnInit, OnDestroy, Observer { private getCalculatorIndexFromId(formId: number) { const index = this._calculators.reduce((resultIndex, calc, currIndex) => { - if (resultIndex == -1 && calc["uid"] == formId) + if (resultIndex === -1 && calc["uid"] === formId) { resultIndex = currIndex; + } return resultIndex; }, -1); @@ -215,7 +213,7 @@ export class AppComponent implements OnInit, OnDestroy, Observer { const compRef: ComponentRef<SaveCalculatorComponent> = this.saveCalcDialogAnchor.createDialog(); // création de la liste des formulaires - let list = []; + const list = []; for (const c of this._calculators) { const uid = +c["uid"]; list.push({ @@ -233,22 +231,24 @@ export class AppComponent implements OnInit, OnDestroy, Observer { // ajout extension ".json" const re = /.+\.json/; const match = re.exec(name.toLowerCase()); - if (match === null) + if (match === null) { name = name + ".json"; + } - this.saveSession(list, name) + this.saveSession(list, name); }); } private saveSession(calcList: any[], filename) { - let elems = []; - for (const c of calcList) + const elems = []; + for (const c of calcList) { if (c.selected) { console.log(c.title); const form: FormulaireDefinition = this.formulaireService.getFormulaireFromId(c.uid); elems.push(form.JSONserialise()); } - let session = { "session": { "elements": elems } }; + } + const session = { "session": { "elements": elems } }; this.formulaireService.saveSession(session, filename); } @@ -264,50 +264,51 @@ export class AppComponent implements OnInit, OnDestroy, Observer { const closedIndex = this.getCalculatorIndexFromId(formId); /* - * détermination de la nouvelle calculette à afficher : + * détermination de la nouvelle calculette à afficher : * - celle après celle supprimée * - ou celle avant celle supprimée si on supprime la dernière */ - let newId: number = -1; + let newId = -1; const l = this._calculators.length; if (l > 1) { - if (closedIndex == l - 1) + if (closedIndex === l - 1) { newId = +this._calculators[closedIndex - 1]["uid"]; - else + } else { newId = +this._calculators[closedIndex + 1]["uid"]; + } } // suppression this._calculators = this._calculators.filter(calc => { - return formId != +calc["uid"] + return formId !== +calc["uid"]; }); // MAJ affichage - if (newId == -1) { + if (newId === -1) { this.toList(); this._currentFormId = -1; - } - else + } else { this.toCalc(newId); + } } private toList() { - this.router.navigate(['/list']); + this.router.navigate(["/list"]); } private toCalc(id: number) { - this.router.navigate(['/calculator', id]); + this.router.navigate(["/calculator", id]); } private toHelp(form: FormulaireDefinition) { // Activated.firstChild.component : type du composant actuellement affiché par le router outlet - this.router.navigate(['/help']).then(_ => { + this.router.navigate(["/help"]).then(_ => { const helpComp = this._routerCurrentComponent as HelpComponent; helpComp.formHelp = form; - }) + }); } /** @@ -318,7 +319,7 @@ export class AppComponent implements OnInit, OnDestroy, Observer { } private getHighlightClass(uid: number) { - return uid == this._currentFormId ? "blue darken-2" : ""; + return uid === this._currentFormId ? "blue darken-2" : ""; } // flag d'affichage des repères des colonnes Bootstrap : uniquement en mode dev @@ -358,7 +359,7 @@ export class AppComponent implements OnInit, OnDestroy, Observer { private params() { this.closeNav(); - this.router.navigate(['/setup']); + this.router.navigate(["/setup"]); } // /sidenav @@ -366,11 +367,11 @@ export class AppComponent implements OnInit, OnDestroy, Observer { /** * détection de la fermeture de la page/navigateur et demande de confirmation */ - @HostListener('window:beforeunload', ['$event']) + @HostListener("window:beforeunload", ["$event"]) confirmExit($event) { if (environment.production) { // affecter une valeur différente de null provoque l'affichage d'un dialogue de confirmation, mais le texte n'est pas affiché - $event.returnValue = 'Your data will be lost !'; + $event.returnValue = "Your data will be lost !"; } } } diff --git a/src/app/calculators/cond_distri/cond_distri.fr.json b/src/app/calculators/cond_distri/cond_distri.fr.json index 4ca85d1b5a7a8d11f8095a11cd57e89541610cc3..c092d188e93466ecbe7924ca4fd2fe7c71365330 100644 --- a/src/app/calculators/cond_distri/cond_distri.fr.json +++ b/src/app/calculators/cond_distri/cond_distri.fr.json @@ -4,7 +4,5 @@ "D": "Diamètre du tuyau", "J": "Perte de charge", "Lg": "Longueur du tuyau", - "Nu": "Viscosité dynamique", - "fs_param_calc": "Paramètres de calcul", - "Pr": "Précision de calcul" + "Nu": "Viscosité dynamique" } \ No newline at end of file diff --git a/src/app/calculators/dever/dever.fr.json b/src/app/calculators/dever/dever.fr.json index 7b6fb261a7f49764f729f5f6bd313e62c4de2793..4157c047f09aba29d60e5a8fae7d2698196eb544 100644 --- a/src/app/calculators/dever/dever.fr.json +++ b/src/app/calculators/dever/dever.fr.json @@ -14,29 +14,23 @@ "select_ouvrage_seuil_triang": "Seuil triangulaire", "select_ouvrage_seuil_triangtrunc": "Seuil triangulaire tronqué", "W": "Ouverture de vanne", - "select_loidebit1": "Loi de débit", "select_loidebit1_seuildenoye": "Seuil dénoyé", "select_loidebit1_cunge80": "Cunge 80", "select_loidebit1_cem88d": "Déversoir/Orifice Cemagref 88", "select_loidebit1_cem88v": "Déversoir/Vanne de fond Cemagref 88", "select_loidebit1_kivi": "Kindsvater-Carter et Villemonte", - "select_loidebit2": "Loi de débit", "select_loidebit2_vannedenoye": "Vanne dénoyé", "select_loidebit2_vannenoye": "Vanne noyé", "select_loidebit2_cunge80": "Cunge 80", "select_loidebit2_cem88d": "Déversoir/Orifice Cemagref 88", "select_loidebit2_cem88v": "Déversoir/Vanne de fond Cemagref 88", - "select_loidebit3": "Loi de débit", - "select_loidebit3_seuiltriang": "Seuil triangulaire", - "select_loidebit4": "Loi de débit", - "select_loidebit4_seuiltriangtrunc": "Seuil triangulaire tronqué", + "select_loidebit3_seuiltriang": "Déversoir triangulaire dénoyé", + "select_loidebit4_seuiltriangtrunc": "Déversoir triangulaire tronqué dénoyé", "ZDV": "Cote de la crête du déversoir ou du radier de la vanne", "L": "Largeur du déversoir", "Cd": "Coefficient de débit", "alpha": "Coefficient alpha", "beta": "Coefficient béta", "ZRAM": "Cote du radier amont", - "struct_container": "Ouvrages", - "fs_param_calc": "Paramètres de calcul", - "Pr": "Précision de calcul" + "struct_container": "Ouvrages" } \ No newline at end of file diff --git a/src/app/calculators/ouvrages/ouvrages.fr.json b/src/app/calculators/ouvrages/ouvrages.fr.json index ce4d974c577834aaba2dc09d4d62ba6d1b098f7c..6bb2421291ee456e3d6d56bbc8889a831c282133 100644 --- a/src/app/calculators/ouvrages/ouvrages.fr.json +++ b/src/app/calculators/ouvrages/ouvrages.fr.json @@ -26,7 +26,5 @@ "fs_hydraulique": "Caractéristiques globales", "Q": "Débit", "Y_A": "Cote de l'eau à l'amont", - "Y_a": "Cote de l'eau à l'aval", - "fs_param_calc": "Paramètres de calcul", - "Pr": "Précision de calcul" + "Y_a": "Cote de l'eau à l'aval" } \ No newline at end of file diff --git a/src/app/calculators/pab-puissance/pab-puissance.en.json b/src/app/calculators/pab-puissance/pab-puissance.en.json index b771da5462f5fe203138e6a3d6480d207e757855..0588c37feaa453311079523fc5d79ab58090f835 100644 --- a/src/app/calculators/pab-puissance/pab-puissance.en.json +++ b/src/app/calculators/pab-puissance/pab-puissance.en.json @@ -3,7 +3,5 @@ "DH": "Drop", "Q": "Discharge", "V": "Volume", - "Pv": "Dissipated power", - "fs_param_calc": "Calculation parameters", - "Pr": "Display accuracy" + "Pv": "Dissipated power" } \ No newline at end of file diff --git a/src/app/calculators/pab-puissance/pab-puissance.fr.json b/src/app/calculators/pab-puissance/pab-puissance.fr.json index fb5d64a4a4bc0068b036e6471e37435ab44d06d3..6020d6e453f1e037a42ae188d2dd45f682670b03 100644 --- a/src/app/calculators/pab-puissance/pab-puissance.fr.json +++ b/src/app/calculators/pab-puissance/pab-puissance.fr.json @@ -3,7 +3,5 @@ "DH": "Chute entre bassins", "Q": "Débit", "V": "Volume", - "Pv": "Puissance dissipée", - "fs_param_calc": "Paramètres de calcul", - "Pr": "Précision de calcul" + "Pv": "Puissance dissipée" } \ No newline at end of file diff --git a/src/app/calculators/parallel-structures/parallel-structures.fr.json b/src/app/calculators/parallel-structures/parallel-structures.fr.json index 2264c6b499b0c69035b165bd7913f7eb01ac1ab6..f6db43aaf758ee5e9c41188822805d1b8f086cba 100644 --- a/src/app/calculators/parallel-structures/parallel-structures.fr.json +++ b/src/app/calculators/parallel-structures/parallel-structures.fr.json @@ -13,15 +13,11 @@ "select_ouvrage_seuil_trap": "Seuil trapézoïdal", "select_ouvrage_vanne_trap": "Vanne trapézoïdale", "W": "Ouverture de vanne", - "select_loidebit1": "Loi de débit", "select_loidebit1_seuildenoye": "Seuil dénoyé", "select_loidebit1_cunge80": "Cunge 80", "select_loidebit1_cem88d": "Déversoir/Orifice Cemagref 88", "select_loidebit1_cem88v": "Déversoir/Vanne de fond Cemagref 88", "select_loidebit1_kivi": "Kindsvater-Carter et Villemonte", - "select_loidebit2": "Loi de débit", - "select_loidebit3": "Loi de débit", - "select_loidebit4": "Loi de débit", "select_loidebit2_vannedenoye": "Vanne dénoyé", "select_loidebit2_vannenoye": "Vanne noyé", "select_loidebit2_cunge80": "Cunge 80", @@ -38,7 +34,5 @@ "alpha2": "Demi-angle au sommet (°)", "BT": "Demi-ouverture du triangle (m)", "ZT": "Cote haute du triangle (m)", - "struct_container": "Ouvrages", - "fs_param_calc": "Paramètres de calcul", - "Pr": "Précision de calcul" + "struct_container": "Ouvrages" } \ No newline at end of file diff --git a/src/app/calculators/regime-uniforme/regime-uniforme.config.json b/src/app/calculators/regime-uniforme/regime-uniforme.config.json index 0ef1396598aa2451def98876cfc22b23b3808f3e..32b228708f7e6cf71005f670a1e06626f8f53244 100644 --- a/src/app/calculators/regime-uniforme/regime-uniforme.config.json +++ b/src/app/calculators/regime-uniforme/regime-uniforme.config.json @@ -152,7 +152,7 @@ }, { "type": "options", - "defaultNodeType": "SectionCercle", + "defaultNodeType": "SectionRectangle", "idCal": "Q", "sectionSourceId": "fs_section" } diff --git a/src/app/calculators/regime-uniforme/regime-uniforme.en.json b/src/app/calculators/regime-uniforme/regime-uniforme.en.json index f40a0edaf139eab9f5117d761bb98fb2dae7e4da..1746472648a332f219efdf14dc2f5fef34002adb 100644 --- a/src/app/calculators/regime-uniforme/regime-uniforme.en.json +++ b/src/app/calculators/regime-uniforme/regime-uniforme.en.json @@ -20,7 +20,4 @@ "YB": "Embankment elevation", "fs_hydraulique": "Hydraulic features", "Q": "Flow", - "Y": "Draft", - "fs_param_calc": "Calculation parameters", - "Pr": "Display accuracy" -} \ No newline at end of file + "Y": "Draft"} \ No newline at end of file diff --git a/src/app/calculators/regime-uniforme/regime-uniforme.fr.json b/src/app/calculators/regime-uniforme/regime-uniforme.fr.json index 5feb9f640bea58fb0395a0a5cac92174e2746860..2b36f059c4f954ef5cdcbaf066b6914ecd721287 100644 --- a/src/app/calculators/regime-uniforme/regime-uniforme.fr.json +++ b/src/app/calculators/regime-uniforme/regime-uniforme.fr.json @@ -20,7 +20,5 @@ "YB": "Hauteur de berge", "fs_hydraulique": "Caractéristiques hydrauliques", "Q": "Débit", - "Y": "Tirant d'eau", - "fs_param_calc": "Paramètres de calcul", - "Pr": "Précision de calcul" + "Y": "Tirant d'eau" } \ No newline at end of file diff --git a/src/app/calculators/remous/remous.config.json b/src/app/calculators/remous/remous.config.json index 592621d45ceafbaf28b1e91c907f114d5984796c..8fcdf1c4d171b8d9293ff1c1c96ae76a11d172f0 100644 --- a/src/app/calculators/remous/remous.config.json +++ b/src/app/calculators/remous/remous.config.json @@ -260,7 +260,7 @@ }, { "type": "options", - "defaultNodeType": "SectionPuissance", + "defaultNodeType": "SectionRectangle", "sectionSourceId": "select_section", "targetSelectId": "select_target", "methodSelectId": "select_resolution" diff --git a/src/app/calculators/section-param/section-param.config.json b/src/app/calculators/section-param/section-param.config.json index 7c8a769ec32f0f93d9194b448edfa2958dc33587..9268cc7e34489f0b3e498dc93efe2063bc9ae393 100644 --- a/src/app/calculators/section-param/section-param.config.json +++ b/src/app/calculators/section-param/section-param.config.json @@ -274,7 +274,7 @@ }, { "type": "options", - "defaultNodeType": "SectionCercle", + "defaultNodeType": "SectionRectangle", "sectionSourceId": "select_section", "targetSelectId": "select_target" } diff --git a/src/app/components/calculator-list/calculator-list.component.ts b/src/app/components/calculator-list/calculator-list.component.ts index 1a14c08d0c33fe7d7176354f881dcd9e8d6a92f9..718988b209bbeca6469df352553204a963e45901 100644 --- a/src/app/components/calculator-list/calculator-list.component.ts +++ b/src/app/components/calculator-list/calculator-list.component.ts @@ -1,11 +1,11 @@ import { Component, OnInit } from "@angular/core"; -import { Router } from '@angular/router'; +import { Router } from "@angular/router"; import { CalculatorType, EnumEx } from "jalhyd"; import { FormulaireDefinition } from "../../formulaire/definition/form-definition"; import { ServiceFactory } from "../../services/service-factory"; -import { InternationalisationService } from '../../services/internationalisation/internationalisation.service'; +import { InternationalisationService } from "../../services/internationalisation/internationalisation.service"; import { FormulaireParallelStructure } from "../../formulaire/definition/concrete/form-parallel-structures"; import { FieldsetContainer } from "../../formulaire/fieldset-container"; @@ -34,24 +34,28 @@ export class CalculatorListComponent implements OnInit { private updateLocale() { this._items = []; - for (let t of EnumEx.getValues(CalculatorType)) - if (t !== CalculatorType.Structure) + for (const t of EnumEx.getValues(CalculatorType)) { + if (t !== CalculatorType.Structure) { this._items.push(new ListElement(t)); + } + } } private create(t: CalculatorType) { const p: Promise<FormulaireDefinition> = ServiceFactory.instance.formulaireService.createFormulaire(t); p.then(f => { - this.router.navigate(['/calculator', f.uid]); + this.router.navigate(["/calculator", f.uid]); return f; }).then(f => { // on ajoute un ouvrage après l'ouverture de la calculette "ouvrages parallèles" - if (f instanceof FormulaireParallelStructure) - for (const e of f.allFormElements) + if (f instanceof FormulaireParallelStructure) { + for (const e of f.allFormElements) { if (e instanceof FieldsetContainer) { e.addFromTemplate(0); break; } + } + } }); } diff --git a/src/app/components/generic-calculator/calculator.component.ts b/src/app/components/generic-calculator/calculator.component.ts index 2b0a443f97c077b33886bf5f2c44ed3f769c912a..b5fac99211269acae88dfd7925a987fa9412b934 100644 --- a/src/app/components/generic-calculator/calculator.component.ts +++ b/src/app/components/generic-calculator/calculator.component.ts @@ -1,5 +1,5 @@ import { Component, OnInit, DoCheck, OnDestroy, ViewChild, ViewChildren, QueryList, AfterViewChecked } from "@angular/core"; -import { ActivatedRoute } from '@angular/router'; +import { ActivatedRoute } from "@angular/router"; import { Observer } from "jalhyd"; @@ -19,7 +19,7 @@ import { HelpService } from "../../services/help/help.service"; import { ServiceFactory } from "../../services/service-factory"; @Component({ - selector: 'hydrocalc', + selector: "hydrocalc", templateUrl: "./calculator.component.html", styles: [` .button_compute_ok { @@ -82,19 +82,19 @@ export class GenericCalculatorComponent extends BaseComponent implements OnInit, * La validité de l'UI comprend la forme (pas de chaîne alpha dans les champs numériques, etc..). * La validité formulaire comprend le domaine de définition des valeurs saisies. */ - private _isUIValid: boolean = false; + private _isUIValid = false; /** * flag disabled du bouton "calculer" */ - private isCalculateDisabled: boolean = true; + private isCalculateDisabled = true; /** * flag (+info) indiquant un événement onRadio à traiter * nécessaire avec l'introduction du mode de valeur LINK des paramètres car quand on modifie le mode à LINK, les possibles * paramètres liables ne sont pas encore connus */ - private _pendingRadioClick: boolean = false; + private _pendingRadioClick = false; private _pendingRadioClickInfo: any; // services @@ -111,8 +111,9 @@ export class GenericCalculatorComponent extends BaseComponent implements OnInit, } private get formElements(): FormulaireElement[] { - if (this._formulaire == undefined) + if (this._formulaire === undefined) { return []; + } return this._formulaire.kids as FormulaireElement[]; } @@ -131,7 +132,7 @@ export class GenericCalculatorComponent extends BaseComponent implements OnInit, } private get hasForm() { - return this._formulaire != undefined; + return this._formulaire !== undefined; } private get hasResults() { @@ -170,13 +171,14 @@ export class GenericCalculatorComponent extends BaseComponent implements OnInit, ngOnInit() { this.intlService.addObserver(this); this.formulaireService.addObserver(this); - this.subscribeRouter(); this.formulaireService.updateLocalisation(); + this.subscribeRouter(); } ngDoCheck() { - if (this._formulaire != undefined) + if (this._formulaire !== undefined) { this.isCalculateDisabled = !(this._formulaire.isValid && this._isUIValid); + } } ngOnDestroy() { @@ -188,7 +190,7 @@ export class GenericCalculatorComponent extends BaseComponent implements OnInit, private subscribeRouter() { // récupération des paramètres passés avec la route (URL) this._subscription = this.route.params.subscribe(params => { - const uid: number = params['uid']; + const uid: number = params["uid"]; this.formulaireService.setCurrentForm(+uid); }); } @@ -270,15 +272,15 @@ export class GenericCalculatorComponent extends BaseComponent implements OnInit, } private setForm(f: FormulaireDefinition) { - if (this._formulaire != undefined) + if (this._formulaire !== undefined) this._formulaire.removeObserver(this); this._formulaire = f; - if (this._formulaire != undefined) + if (this._formulaire !== undefined) this._formulaire.addObserver(this); } private updateFormulaireResults(uid: number) { - if (this._formulaire.uid == uid) + if (this._formulaire.uid === uid) this.resultsComponent.updateView(); } @@ -288,8 +290,7 @@ export class GenericCalculatorComponent extends BaseComponent implements OnInit, if (sender instanceof InternationalisationService) { this.formulaireService.updateLocalisation(); this._formulaire.updateHelp(); - } - else if (sender instanceof FormulaireService) { + } else if (sender instanceof FormulaireService) { switch (data["action"]) { case "currentFormChanged": const uid: number = +data["formId"]; @@ -298,11 +299,11 @@ export class GenericCalculatorComponent extends BaseComponent implements OnInit, this._calculatorNameComponent.model = this._formulaire; break; } - } - else if (sender instanceof FormulaireDefinition) { + } else if (sender instanceof FormulaireDefinition) { + let f: FormulaireDefinition; switch (data["action"]) { case "resetForm": // réinitialisation du formulaire - var f = sender as FormulaireDefinition; + f = sender as FormulaireDefinition; this.updateFormulaireResults(f.uid); // this.updateUI(); break; @@ -327,7 +328,7 @@ export class GenericCalculatorComponent extends BaseComponent implements OnInit, private updateUIValidity() { this._isUIValid = false; - if (this._fieldsetComponents != undefined) + if (this._fieldsetComponents !== undefined) this._isUIValid = this._fieldsetComponents.reduce( // callback ( @@ -345,7 +346,7 @@ export class GenericCalculatorComponent extends BaseComponent implements OnInit, // valeur initiale , this._fieldsetComponents.length > 0); - if (this._fieldsetContainerComponents != undefined) + if (this._fieldsetContainerComponents !== undefined) this._isUIValid = this._isUIValid && this._fieldsetContainerComponents.reduce( // callback ( diff --git a/src/app/formulaire/fieldset.ts b/src/app/formulaire/fieldset.ts index 9cff04ec9478d00608ac1256ec229da70f013eea..2719cd61f8974a93dc152d4423ccee8b146d9673 100644 --- a/src/app/formulaire/fieldset.ts +++ b/src/app/formulaire/fieldset.ts @@ -122,11 +122,11 @@ export class FieldSet extends FormulaireElement implements Observer { const input_id: string = json["id"]; const paramService: ParamService = ServiceFactory.instance.paramService; - const calcType: CalculatorType = this.getPropValue("calcType"); + let res: NgParameter; switch (input_id) { case "Pr": - var res: NgParameter = paramService.createParameter(input_id, this); + res = paramService.createParameter(input_id, this); break; default: diff --git a/src/app/formulaire/formulaire-element.ts b/src/app/formulaire/formulaire-element.ts index 5fe3851bdcbccf643c69c5f1e3c6b3de7399c824..600475342cfa1de3dcb7816354ee837575ecbb6f 100644 --- a/src/app/formulaire/formulaire-element.ts +++ b/src/app/formulaire/formulaire-element.ts @@ -5,8 +5,10 @@ import { DependencyCondition, DependencyConditionType } from "./dependency/depen import { ValueDependencyCondition } from "./dependency/value-dependency-condition"; import { ExistenceDependency } from "./dependency/existence-dependency"; import { DeepFormulaireElementIterator } from "./form-iterator/deep-element-iterator"; +import { InternationalisationService } from "../services/internationalisation/internationalisation.service"; +import { ServiceFactory } from "../services/service-factory"; -/** +/** * élément (enfant) du formulaire : fieldset, input, container, ... */ export abstract class FormulaireElement extends FormulaireNode { @@ -25,11 +27,22 @@ export abstract class FormulaireElement extends FormulaireNode { */ private _labelNumber: number; + private intlService: InternationalisationService; + protected _dependencies: Dependency[] = []; + public static removePrefix(s: string, prefix: string): string { + if (s.startsWith(prefix)) { + const l = prefix.length; + return s.substr(l, s.length - l); + } + return undefined; + } + constructor(parent: FormulaireNode) { super(parent); this._isDisplayed = true; + this.intlService = ServiceFactory.instance.internationalisationService; } get isDisplayed(): boolean { @@ -38,18 +51,20 @@ export abstract class FormulaireElement extends FormulaireNode { set isDisplayed(b: boolean) { this._isDisplayed = b; - for (const k of this.getKids()) + for (const k of this.getKids()) { k.isDisplayed = b; + } } get label(): string { let res = this._label; - if (res && this._labelNumber) + if (res && this._labelNumber) { res += " n°" + String(this._labelNumber); + } return res; } - public set labelNumber(n: number) { + set labelNumber(n: number) { this._labelNumber = n; } @@ -62,9 +77,12 @@ export abstract class FormulaireElement extends FormulaireNode { */ public get parentForm(): FormulaireNode { let res = this.parent; - //while (!(res instanceof FormulaireDefinition)) - while (!("calculatorName" in res)) // pour éviter de faire référence au type FormulaireDefinition, supprimer l'import correspondant et casser les dépendances circulaires d'import + // while (!(res instanceof FormulaireDefinition)) + while (!("calculatorName" in res)) { + // pour éviter de faire référence au type FormulaireDefinition, supprimer l'import correspondant et + // casser les dépendances circulaires d'import res = res.parent; + } return res; } @@ -73,32 +91,37 @@ export abstract class FormulaireElement extends FormulaireNode { * @param json configuration de la dépendance */ private parse_existence_dependencies(json: {}) { - for (let di in json) { - let d = json[di]; - let rv = d["refvalue"]; - if (rv != undefined) - var mc: DependencyCondition = new ValueDependencyCondition(rv); - else { - let cond = d["cond"]; - if (cond != undefined) { - switch (cond) { - case "isvar": - var mc = new DependencyCondition(DependencyConditionType.IsVariable); - break; - - case "isdisp": - var mc = new DependencyCondition(DependencyConditionType.IsDisplayed); - break; - - default: - throw "Formulaire.parse_existence_dependencies() : type de condition '" + cond + "' non pris en charge"; + for (const di in json) { + if (json.hasOwnProperty(di)) { + const d = json[di]; + const rv = d["refvalue"]; + let mc: DependencyCondition; + if (rv !== undefined) { + mc = new ValueDependencyCondition(rv); + } else { + const cond = d["cond"]; + if (cond !== undefined) { + switch (cond) { + case "isvar": + mc = new DependencyCondition(DependencyConditionType.IsVariable); + break; + + case "isdisp": + mc = new DependencyCondition(DependencyConditionType.IsDisplayed); + break; + + default: + throw new Error( + "Formulaire.parse_existence_dependencies() : type de condition '" + cond + "' non pris en charge" + ); + } + } else { + throw new Error("Formulaire.parse_existence_dependencies() : infos de dépendance manquantes/non prises en charge"); } } - else - throw "Formulaire.parse_existence_dependencies() : infos de dépendance manquantes/non prises en charge"; + const dep = new ExistenceDependency(this, d["refid"], mc); + this._dependencies.push(dep); } - let dep = new ExistenceDependency(this, d["refid"], mc); - this._dependencies.push(dep); } } @@ -109,74 +132,75 @@ export abstract class FormulaireElement extends FormulaireNode { */ public parseDependencies(json: {}) { const dep = json["dep_exist"]; - if (dep != undefined) + if (dep !== undefined) { this.parse_existence_dependencies(dep); + } } public verifiesDependency(d: Dependency): boolean { - if (d.masterCondition.type == DependencyConditionType.IsDisplayed) + if (d.masterCondition.type === DependencyConditionType.IsDisplayed) { return this._isDisplayed; + } } /** * applique une dépendance dont la condition a été vérifiée */ public applyDependency(d: Dependency) { - if (d instanceof ExistenceDependency) + if (d instanceof ExistenceDependency) { this.isDisplayed = true; + } } private prepareExistenceDependencies() { // si des FormulaireElement sont présents dans des ExistenceDependency, on met leur membre isDisplayed à false - for (let d of this._dependencies) + for (const d of this._dependencies) { if (d instanceof ExistenceDependency) { this.isDisplayed = false; break; } + } } public applyDependencies() { this.prepareExistenceDependencies(); - for (let d of this._dependencies) { + for (const d of this._dependencies) { d.apply(); } - for (const k of this.getKids()) + for (const k of this.getKids()) { k.applyDependencies(); + } } public printDependencies() { - for (let d of this._dependencies) + for (const d of this._dependencies) { console.log(d.toString()); + } } public updateLocalisation(loc: StringMap, key?: string) { - if (!key) + if (!key) { key = this._confId; - if (loc) - this._label = loc[key]; - if (this._label == undefined) - console.log(`WARNING : pas de traduction pour l'id ${this.id}`); - - for (let f of this.getKids()) + } + if (loc[key] !== undefined) { + this._label = this.intlService.localizeText(key, loc); + } else { + // Recherche du code dans locale/error_message.xx.json + this._label = this.intlService.localizeText("INFO_LIB_" + key.replace(/\d+$/, "").toLocaleUpperCase()); + } + for (const f of this.getKids()) { f.updateLocalisation(loc); + } } public toString() { return "id:" + this.id + (this._isDisplayed ? " displayed" : " NOT displayed") + " label:" + this.label; } - public static removePrefix(s: string, prefix: string): string { - if (s.startsWith(prefix)) { - let l = prefix.length; - return s.substr(l, s.length - l); - } - return undefined; - } - /** * itère sur tous les FormulaireElement */ diff --git a/src/app/services/formulaire/formulaire.service.ts b/src/app/services/formulaire/formulaire.service.ts index c8bb1e5d2d016cb8956139710763697896b289fc..ce222c998366268be4b6966fe144442551870508 100644 --- a/src/app/services/formulaire/formulaire.service.ts +++ b/src/app/services/formulaire/formulaire.service.ts @@ -68,7 +68,7 @@ export class FormulaireService extends Observable { */ private updateFormulaireLocalisation(formId: number, localisation: StringMap) { for (let f of this._formulaires) - if (f.uid == formId) { + if (f.uid === formId) { f.updateLocalisation(localisation); break; } @@ -80,7 +80,7 @@ export class FormulaireService extends Observable { */ private updateFormulaireHelp(formId: number) { for (let f of this._formulaires) - if (f.uid == formId) { + if (f.uid === formId) { f.updateHelp(); break; } @@ -101,9 +101,11 @@ export class FormulaireService extends Observable { for (const c of EnumEx.getValues(CalculatorType)) { const prom: Promise<StringMap> = this.loadLocalisation(c); prom.then(loc => { - for (const f of this._formulaires) - if (f.calculatorType == c) + for (const f of this._formulaires) { + if (f.calculatorType === c) { this.updateFormulaireLocalisation(f.uid, loc); + } + } } ); } @@ -212,7 +214,7 @@ export class FormulaireService extends Observable { public getFormulaireFromId(uid: number): FormulaireDefinition { for (let f of this._formulaires) - if (f.uid == uid) + if (f.uid === uid) return f; return undefined; @@ -241,9 +243,9 @@ export class FormulaireService extends Observable { private getFormulaireElementById(formId: number, elemId: string): FormulaireElement { for (let f of this._formulaires) - if (f.uid == formId) { + if (f.uid === formId) { let s = f.getFormulaireNodeById(elemId); - if (s != undefined) + if (s !== undefined) return s as FormulaireElement; } return undefined; @@ -259,7 +261,7 @@ export class FormulaireService extends Observable { } public getConfigPathPrefix(ct: CalculatorType): string { - if (ct == undefined) + if (ct === undefined) throw "FormulaireService.getConfigPathPrefix() : invalid undefined CalculatorType" switch (ct) { @@ -294,13 +296,13 @@ export class FormulaireService extends Observable { return "app/calculators/dever/dever."; default: - throw "FormulaireService.getConfigPathPrefix() : valeur de CalculatorType " + ct + " non implémentée" + throw new Error("FormulaireService.getConfigPathPrefix() : valeur de CalculatorType " + ct + " non implémentée") } } public requestCloseForm(uid: number) { const form = this.getFormulaireFromId(uid); - if (form != undefined) { + if (form !== undefined) { this._formulaires = this._formulaires.filter(f => f.uid !== uid); this.notifyObservers({ @@ -316,14 +318,13 @@ export class FormulaireService extends Observable { public setCurrentForm(formId: number) { const form = this.getFormulaireFromId(formId); - if (form == undefined) { + if (form === undefined) { this._currentFormId = -1; this.notifyObservers({ "action": "invalidFormId", "formId": formId }); - } - else { + } else { this._currentFormId = formId; this.notifyObservers({ "action": "currentFormChanged", @@ -338,7 +339,7 @@ export class FormulaireService extends Observable { public get currentFormHasResults(): boolean { const form = this.currentForm; - if (form != undefined) + if (form !== undefined) return form.hasResults; return false; @@ -441,7 +442,7 @@ export class FormulaireService extends Observable { const form = element[keys[0]]; for (const i of formInfos) - if (i["uid"] == form["uid"] && i["selected"]) + if (i["uid"] === form["uid"] && i["selected"]) this.deserialiseForm(form); break; diff --git a/src/app/services/internationalisation/internationalisation.service.ts b/src/app/services/internationalisation/internationalisation.service.ts index 95b6dcbad37360c531d705f00eacdecfd213cc12..0eb2a74a7f05aa805ba6fd2ff7af945779568d5c 100644 --- a/src/app/services/internationalisation/internationalisation.service.ts +++ b/src/app/services/internationalisation/internationalisation.service.ts @@ -1,10 +1,10 @@ -import { Injectable } from '@angular/core'; -import { Response } from '@angular/http'; +import { Injectable } from "@angular/core"; +import { Response } from "@angular/http"; import { Message, MessageCode, Observable } from "jalhyd"; import { StringMap } from "../../stringmap"; -import { ServiceFactory } from '../service-factory'; +import { ServiceFactory } from "../service-factory"; /* language tag : fr-FR @@ -70,47 +70,45 @@ export class InternationalisationService extends Observable { } private getLanguageFromCode(lc: LanguageCode) { - for (let l of this._languages) { - if (l.code === lc) + for (const l of this._languages) { + if (l.code === lc) { return l; + } } throw new Message(MessageCode.ERROR_LANG_UNSUPPORTED); } private getLanguageFromTag(tag: string) { - for (let l of this._languages) { - if (l.tag === tag) + for (const l of this._languages) { + if (l.tag === tag) { return l; + } } - let e = new Message(MessageCode.ERROR_LANG_UNSUPPORTED); + const e = new Message(MessageCode.ERROR_LANG_UNSUPPORTED); e.extraVar["locale"] = tag; throw e; } public setLocale(lng: string | LanguageCode) { - if (this._currLang !== undefined) - var oldLang: LanguageCode = this._currLang.code; if (typeof lng === "string") { - let t: string = lng.substr(0, 2).toLowerCase(); + const t: string = lng.substr(0, 2).toLowerCase(); this._currLang = this.getLanguageFromTag(t); - } - else { + } else { this._currLang = this.getLanguageFromCode(lng); } - let prom = this.httpGetMessages(); - prom.then((res) => { + this.httpGetMessages().then((res) => { this.notifyObservers(undefined); - }) + }); } private httpGetMessages(): Promise<Response> { - let is: InternationalisationService = this; - let processData = function (s: string) { + const is: InternationalisationService = this; + const processData = function (s: string) { // fermeture nécessaire pour capturer la valeur de this (undefined sinon) is._Messages = JSON.parse(s); - } + }; let l; switch (this._currLang.code) { @@ -122,17 +120,17 @@ export class InternationalisationService extends Observable { l = "en"; } - let f: string = "error_messages." + l + ".json" + const f: string = "error_messages." + l + ".json"; return ServiceFactory.instance.httpService.httpGetRequest(undefined, undefined, undefined, "locale/" + f, processData); } private getMessageFromCode(c: MessageCode): string { - let sCode: string = MessageCode[c]; + const sCode: string = MessageCode[c]; return this._Messages[MessageCode[c]]; } private replaceAll(str: string, find: string, replace: string) { - return str.replace(new RegExp(find, 'g'), replace); + return str.replace(new RegExp(find, "g"), replace); } /** @@ -141,34 +139,39 @@ export class InternationalisationService extends Observable { * @param nDigits nombre de chiffres à utiliser pour l'arrondi dans le cas de données numériques */ public localizeMessage(r: Message, nDigits: number = 3): string { - let sCode: string = MessageCode[r.code]; + const sCode: string = MessageCode[r.code]; let m: string = this.getMessageFromCode(r.code); - for (let k in r.extraVar) { - let v: any = r.extraVar[k]; - if (typeof v === "number") - var s = v.toFixed(nDigits); - else - s = v; - m = this.replaceAll(m, "%" + k + "%", s); + for (const k in r.extraVar) { + if (r.extraVar.hasOwnProperty(k)) { + const v: any = r.extraVar[k]; + let s: string; + if (typeof v === "number") { + s = v.toFixed(nDigits); + } else { + s = v; + } + m = this.replaceAll(m, "%" + k + "%", s); + } } return m; } /** - * Traduit un texte défini dans les fichiers error_message.xx.json + * Traduit un texte défini dans un fichier de langue (locale/error_message.xx.json par défaut) * Les ids dans ces fichiers sont soit un enum de JalHyd, soit une chaine libre correspondant au code passé à localizeText() * @param code id du texte + * @param messages Contenu du fichier de langua à utiliser (locale/error_message.xx.json par défaut) */ - public localizeText(code: string) { - if (this._Messages === undefined) { - return "*** messages not loaded: ${code} ***"; + public localizeText(code: string, messages = this._Messages) { + if (messages === undefined) { + return `*** messages not loaded: ${code} ***`; } - if (this._Messages[code] === undefined) { + if (messages[code] === undefined) { return `*** message not exists: ${code} ***`; } - return this._Messages[code]; + return messages[code]; } /** diff --git a/src/app/services/param/param.service.ts b/src/app/services/param/param.service.ts index bdf292efe32cbcac376bc1be16fc9dc2e644a8c4..8d935405c354b19cd8ee7715dbe4c31a134b5368 100644 --- a/src/app/services/param/param.service.ts +++ b/src/app/services/param/param.service.ts @@ -26,17 +26,17 @@ export class ParamService { } /** - * + * * @param calcType crée un NgParameter n'appartenant pas à un ComputeNode * @param symbol symbole du paramètre à créer */ public createParameter(symbol: string, parent: FormulaireNode): NgParameter { + let p: NgParameter; if (symbol === "Pr") { - var prmDef: ParamDefinition = this.createAccuracyParameter(); - var p = new NgParameter(prmDef.clone(), parent); + const prmDef: ParamDefinition = this.createAccuracyParameter(); + p = new NgParameter(prmDef.clone(), parent); p.confId = "Pr"; - } - else { + } else { const dom = new ParamDomain(ParamDomainValue.POS_NULL); p = new NgParameter(new ParamDefinition(symbol, dom), parent); p.confId = symbol; @@ -86,9 +86,9 @@ export class ParamService { default: throw new Error(`ParamService.createParameter() : symbole ${symbol} non pris en charge`); } + p.updateLocalisation(this._intlService.currentMap); } - p.updateLocalisation(this._intlService.currentMap); return p; } diff --git a/src/locale/error_messages.en.json b/src/locale/error_messages.en.json index 985191346b4255111ce457b26b637751507cef37..f0802700ea4461f6ffabfb7e7d2c6f961fe289c3 100644 --- a/src/locale/error_messages.en.json +++ b/src/locale/error_messages.en.json @@ -1,97 +1,114 @@ { - "ERROR_DICHO_INIT_DOMAIN": "Dichotomy: target %targetSymbol%=%targetValue% does not exist for variable %variableSymbol% valued in interval %variableInterval%", - "ERROR_DICHO_INITVALUE_LOW": "Dichotomy: initial value %variableSymbol%=%variableInitValue% is too low (target is %targetSymbol%=%targetValue%, %targetSymbol%(%variableSymbol%=%variableInitValue%)=%initTarget%)", + "ERROR_DICHO_CONVERGE": "Dichotomy could not converge", + "ERROR_DICHO_FUNCTION_VARIATION": "unable to determinate function direction of variation", "ERROR_DICHO_INITVALUE_HIGH": "Dichotomy: initial value %variableSymbol%=%variableInitValue% is too high (target is %targetSymbol%=%targetValue%, %targetSymbol%(%variableSymbol%=%variableInitValue%)=%initTarget%)", - "ERROR_DICHO_NULL_STEP": "Dichotomy (initial interval search): invalid null step", + "ERROR_DICHO_INITVALUE_LOW": "Dichotomy: initial value %variableSymbol%=%variableInitValue% is too low (target is %targetSymbol%=%targetValue%, %targetSymbol%(%variableSymbol%=%variableInitValue%)=%initTarget%)", + "ERROR_DICHO_INIT_DOMAIN": "Dichotomy: target %targetSymbol%=%targetValue% does not exist for variable %variableSymbol% valued in interval %variableInterval%", "ERROR_DICHO_INVALID_STEP_GROWTH": "Dichotomy (initial interval search): invalid null step growth", - "ERROR_DICHO_FUNCTION_VARIATION": "unable to determinate function direction of variation", - "ERROR_DICHO_CONVERGE": "Dichotomy could not converge", + "ERROR_DICHO_NULL_STEP": "Dichotomy (initial interval search): invalid null step", + "ERROR_INTERVAL_OUTSIDE": "Interval: value %value% is outside of %interval", + "ERROR_INTERVAL_UNDEF": "Interval: invalid 'undefined' value", + "ERROR_LANG_UNSUPPORTED": "internationalisation: unsupported '%locale%' locale", "ERROR_NEWTON_DERIVEE_NULLE": "Null function derivative in Newton computation", - "ERROR_PARAMDOMAIN_INTERVAL_BOUNDS": "invalid %minValue%/%maxValue% min/max boundaries for 'interval' parameter definition domain", "ERROR_PARAMDEF_CALC_UNDEFINED": "calculability of '%symbol%' parameter is undefined", - "ERROR_PARAMDEF_VALUE_UNDEFINED": "value of '%symbol%' parameter is undefined", "ERROR_PARAMDEF_VALUE_FIXED": "value of '%symbol%' parameter cannot be changed", + "ERROR_PARAMDEF_VALUE_INTERVAL": "parameter '%symbol%': value %value% is out of [%minValue%, %maxValue%] interval", + "ERROR_PARAMDEF_VALUE_NULL": "value of '%symbol%' parameter cannot be 0", "ERROR_PARAMDEF_VALUE_POS": "value %value% of '%symbol%' parameter is invalid (cannot be <=0)", "ERROR_PARAMDEF_VALUE_POSNULL": "value %value% of '%symbol%' parameter is invalid (cannot be <0)", - "ERROR_PARAMDEF_VALUE_NULL": "value of '%symbol%' parameter cannot be 0", - "ERROR_PARAMDEF_VALUE_INTERVAL": "parameter '%symbol%': value %value% is out of [%minValue%, %maxValue%] interval", + "ERROR_PARAMDEF_VALUE_UNDEFINED": "value of '%symbol%' parameter is undefined", + "ERROR_PARAMDOMAIN_INTERVAL_BOUNDS": "invalid %minValue%/%maxValue% min/max boundaries for 'interval' parameter definition domain", "ERROR_PARAMDOMAIN_INVALID": "parameter '%symbol%: non supported '%domain%' definition domain", - "ERROR_INTERVAL_UNDEF": "Interval: invalid 'undefined' value", - "ERROR_INTERVAL_OUTSIDE": "Interval: value %value% is outside of %interval", - "ERROR_LANG_UNSUPPORTED": "internationalisation: unsupported '%locale%' locale", - "WARNING_REMOUS_ARRET_CRITIQUE": "Calculation stopped: critical elevation reached at abscissa %x%", - "INFO_REMOUS_CALCUL_FLUVIAL": "Downstream boundary condition >= Critical elevation: calculation of subcritical part from downstream", - "INFO_REMOUS_CALCUL_TORRENTIEL": "Uptream boundary condition <= Critical elevation: calculation of supercritical part from upstream", - "INFO_REMOUS_RESSAUT_DEHORS": "Hydraulic jump detected %sens% abscissa %x% m", - "INFO_REMOUS_LARGEUR_BERGE": "Width at embankment level = %B% m", - "INFO_REMOUS_H_CRITIQUE": "Width at embankment level = %Yc% m", - "INFO_REMOUS_H_NORMALE": "Normal water level = %Yn% m", - "INFO_REMOUS_RESSAUT_HYDRO": "Hydraulic jump detected between abscissa %xmin% and %xmax% m", - "ERROR_REMOUS_PENTE_FORTE": "The water line slope is too steep at abscissa %x% m (the discretisation step should be reduced)", - "ERROR_REMOUS_PAS_CALCUL_DEPUIS_AVAL": "Downstream boundary condition < Critical elevation: no possible calculation from downstream", "ERROR_REMOUS_PAS_CALCUL_DEPUIS_AMONT": "Upstream boundary condition < Critical elevation: no possible calculation from upstream", - "INFO_PARAMFIELD_PARAMFIXE": "Fixed", - "INFO_PARAMFIELD_PARAMVARIER": "Vary", - "INFO_PARAMFIELD_PARAMCALCULER": "Calculate", - "INFO_PARAMFIELD_PARAMLIE": "Link", - "INFO_PARAMFIELD_VALEURMINI": "From minimum value", - "INFO_PARAMFIELD_VALEURMAXI": "to maximum value", - "INFO_PARAMFIELD_PASVARIATION": "with a variation step of:", + "ERROR_REMOUS_PAS_CALCUL_DEPUIS_AVAL": "Downstream boundary condition < Critical elevation: no possible calculation from downstream", + "ERROR_REMOUS_PENTE_FORTE": "The water line slope is too steep at abscissa %x% m (the discretisation step should be reduced)", + "ERROR_SECTION_NON_CONVERGENCE_NEWTON_HCONJUG": "Non-convergence of the calculation of the combined depth (Newton's method)", + "ERROR_SECTION_NON_CONVERGENCE_NEWTON_HCRITIQUE": "Non-convergence of the calculation of the critical depth (Newton's method)", + "ERROR_SECTION_NON_CONVERGENCE_NEWTON_HFLU": "Non convergence of the calculation of the corresponding elevation (Newton's method) for the calculation of the subcritical depth", + "ERROR_SECTION_NON_CONVERGENCE_NEWTON_HNORMALE": "Non convergence of the calculation of the normal depth (Newton's method)", + "ERROR_SECTION_NON_CONVERGENCE_NEWTON_HTOR": "Non convergence of the calculation of the corresponding height (Newton's method) for the calculation of the supercritical depth", + "ERROR_SECTION_PENTE_NEG_NULLE_HNORMALE_INF": "The slope is negative or zero, the normal depth is infinite", "INFO_CALCULATOR_CALCULER": "Compute", "INFO_CALCULATOR_PARAMFIXES": "Fixed parameters", "INFO_CALCULATOR_VALEURS": "Values", - "INFO_CONDDISTRI_TITRE": "Distributor pipe", - "INFO_LECHAPT_TITRE": "Lechapt-Calmon", - "INFO_REGUNI_TITRE": "Uniform flow calculation", - "INFO_SECTPARAM_TITRE": "Parametric section", - "INFO_GRANDEUR_Q": "Flow (m³/s)", - "INFO_GRANDEUR_HS": "Specific head (m)", - "INFO_GRANDEUR_HSC": "Critical head (m)", - "INFO_GRANDEUR_B": "Surface width (m)", - "INFO_GRANDEUR_P": "Wetted perimeter (m)", - "INFO_GRANDEUR_S": "Wetted area (m²)", - "INFO_GRANDEUR_R": "Hydraulic radius (m)", - "INFO_GRANDEUR_V": "Average speed (m/s)", - "INFO_GRANDEUR_FR": "Froude number", - "INFO_GRANDEUR_YC": "Critical depth (m)", - "INFO_GRANDEUR_YN": "Normal depth (m)", - "INFO_GRANDEUR_YF": "Subcritical depth (m)", - "INFO_GRANDEUR_YT": "Supercritical depth (m)", - "INFO_GRANDEUR_YCO": "Conjugate depth (m)", - "INFO_GRANDEUR_J": "Head loss (m)", - "INFO_GRANDEUR_I-J": "Linear variation of specific head (m/m)", - "INFO_GRANDEUR_IMP": "Impulse (N)", - "INFO_GRANDEUR_TAU0": "Tractive force (Pa)", - "INFO_REMOUS_TITRE": "Backwater curves", - "INFO_REMOUSRESULTS_TITREJOURNAL": "Calculation log", - "INFO_REMOUSRESULTS_LIGNEFLUVIALE": "Subcritical water profile", - "INFO_REMOUSRESULTS_LIGNETORRENTIELLE": "Supercritical water profile", + "INFO_CLOSE_DIALOGUE_TEXT": "Warning ! Parameters and results will be lost. Really close?", + "INFO_CLOSE_DIALOGUE_TITRE": "Please confirm", + "INFO_CONDUITEDISTRIBUTRICE_TITRE": "Distributor pipe", + "INFO_COURBEREMOUS_TITRE": "Backwater curves", + "INFO_DEVER_TITRE": "Fish ladder: weir stage-discharge laws", + "INFO_EXTRARES_ENUM_OUVRAGE_Q_MODE_0": "Weir", + "INFO_EXTRARES_ENUM_OUVRAGE_Q_MODE_1": "Orifice", + "INFO_EXTRARES_ENUM_OUVRAGE_Q_MODE_2": "Zero flow", + "INFO_EXTRARES_ENUM_OUVRAGE_Q_REGIME_0": "Free flow", + "INFO_EXTRARES_ENUM_OUVRAGE_Q_REGIME_1": "Partially submerged", + "INFO_EXTRARES_ENUM_OUVRAGE_Q_REGIME_2": "Submerged", + "INFO_EXTRARES_ENUM_OUVRAGE_Q_REGIME_3": "Zero flow", + "INFO_EXTRARES_LIB_B": "Surface width (m)", + "INFO_EXTRARES_LIB_CV": "Cv: Velocity coefficient", + "INFO_EXTRARES_LIB_CVQT": "CV.QT: Corrected discharge (m³/s)", + "INFO_EXTRARES_LIB_EC": "EC: Kinetic energy (m)", + "INFO_EXTRARES_LIB_FLU": "Subcritical water line", + "INFO_EXTRARES_LIB_FR": "Froude number", + "INFO_EXTRARES_LIB_HS": "Specific head (m)", + "INFO_EXTRARES_LIB_HSC": "Critical head (m)", + "INFO_EXTRARES_LIB_I-J": "Linear variation of specific head (m/m)", + "INFO_EXTRARES_LIB_IMP": "Impulse (N)", + "INFO_EXTRARES_LIB_J": "Head loss (m)", + "INFO_EXTRARES_LIB_OUVRAGE_Q": "Discharge (m³/s)", + "INFO_EXTRARES_LIB_OUVRAGE_Q_MODE": "Mode", + "INFO_EXTRARES_LIB_OUVRAGE_Q_REGIME": "Regime", + "INFO_EXTRARES_LIB_P": "Wetted perimeter (m)", + "INFO_EXTRARES_LIB_Q": "Flow (m³/s)", + "INFO_EXTRARES_LIB_R": "Hydraulic radius (m)", + "INFO_EXTRARES_LIB_S": "Wetted area (m²)", + "INFO_EXTRARES_LIB_TAU0": "Tractive force (Pa)", + "INFO_EXTRARES_LIB_TOR": "Supercritical water line", + "INFO_EXTRARES_LIB_V": "Average speed (m/s)", + "INFO_EXTRARES_LIB_YC": "Critical depth (m)", + "INFO_EXTRARES_LIB_YCO": "Conjugate depth (m)", + "INFO_EXTRARES_LIB_YF": "Subcritical depth (m)", + "INFO_EXTRARES_LIB_YN": "Normal depth (m)", + "INFO_EXTRARES_LIB_YT": "Supercritical depth (m)", + "INFO_LECHAPTCALMON_TITRE": "Lechapt-Calmon", + "INFO_LIB_FS_PARAM_CALC": "Calculation parameters", + "INFO_LIB_PR": "Display accuracy", + "INFO_LIB_SELECT_LOIDEBIT": "Stage-discharge law", + "INFO_MENU_NOUVELLE_CALC": "New calculator", + "INFO_OPTION_NO": "No", + "INFO_OPTION_YES": "Yes", + "INFO_OUVRAGE": "Structure", + "INFO_PABDIMENSIONS_TITRE": "Fish ladder: dimensions", + "INFO_PABPUISSANCE_TITRE": "Fish ladder: dissipated power", + "INFO_PARALLELSTRUCTURE_TITRE": "Parallel structures", + "INFO_PARAMFIELD_PARAMCALCULER": "Calculate", + "INFO_PARAMFIELD_PARAMFIXE": "Fixed", + "INFO_PARAMFIELD_PARAMLIE": "Link", + "INFO_PARAMFIELD_PARAMVARIER": "Vary", + "INFO_PARAMFIELD_PASVARIATION": "with a variation step of:", + "INFO_PARAMFIELD_VALEURMAXI": "to maximum value", + "INFO_PARAMFIELD_VALEURMINI": "From minimum value", + "INFO_REGIMEUNIFORME_TITRE": "Uniform flow calculation", "INFO_REMOUSRESULTS_ABSCISSE": "Abscissa (m)", - "INFO_REMOUSRESULTS_TIRANT": "Draft (m)", - "INFO_REMOUSRESULTS_FOND": "Bottom", "INFO_REMOUSRESULTS_BERGE": "Embankment", - "INFO_REMOUSRESULTS_TIRANTNORMAL": "Normal water level", + "INFO_REMOUSRESULTS_FOND": "Bottom", + "INFO_REMOUSRESULTS_TIRANT": "Draft (m)", "INFO_REMOUSRESULTS_TIRANTCRITIQUE": "Critical water level", - "INFO_SETUP_TITLE": "Application setup", + "INFO_REMOUSRESULTS_TIRANTNORMAL": "Normal water level", + "INFO_REMOUSRESULTS_TITREJOURNAL": "Calculation log", + "INFO_REMOUS_CALCUL_FLUVIAL": "Downstream boundary condition >= Critical elevation: calculation of subcritical part from downstream", + "INFO_REMOUS_CALCUL_TORRENTIEL": "Uptream boundary condition <= Critical elevation: calculation of supercritical part from upstream", + "INFO_REMOUS_H_CRITIQUE": "Width at embankment level = %Yc% m", + "INFO_REMOUS_H_NORMALE": "Normal water level = %Yn% m", + "INFO_REMOUS_LARGEUR_BERGE": "Width at embankment level = %B% m", + "INFO_REMOUS_RESSAUT_DEHORS": "Hydraulic jump detected %sens% abscissa %x% m", + "INFO_REMOUS_RESSAUT_HYDRO": "Hydraulic jump detected between abscissa %xmin% and %xmax% m", + "INFO_SECTIONPARAMETREE_TITRE": "Parametric section", + "INFO_SETUP_NEWTON_MAX_ITER": "Newton iteration limit", "INFO_SETUP_PRECISION_AFFICHAGE": "Display accuracy", "INFO_SETUP_PRECISION_CALCUL": "Computation accuracy", - "INFO_SETUP_NEWTON_MAX_ITER": "Newton iteration limit", - "INFO_MENU_NOUVELLE_CALC": "New calculator", - "INFO_CLOSE_DIALOGUE_TITRE": "Please confirm", - "INFO_CLOSE_DIALOGUE_TEXT": "Warning ! Parameters and results will be lost. Really close?", - "INFO_OPTION_YES": "Yes", - "INFO_OPTION_NO": "No", - "INFO_PABDIM_TITRE": "Pool pass: dimensions", - "INFO_PABPUISS_TITRE": "Pool pass: dissipated power", - "INFO_OUVRAGEPARAL_TITRE": "Parallel structures", - "INFO_OUVRAGE": "Structure", - "INFO_TYPE_ECOULEMENT": "Mode", - "INFO_REGIME": "Regime", - "INFO_LIB_ENUM_RES_STRUCTURE_MODE_0": "Weir", - "INFO_LIB_ENUM_RES_STRUCTURE_MODE_1": "Orifice", - "INFO_LIB_ENUM_RES_STRUCTURE_MODE_2": "Zero flow", - "INFO_LIB_ENUM_RES_STRUCTURE_REGIME_0": "Free flow", - "INFO_LIB_ENUM_RES_STRUCTURE_REGIME_1": "Partially submerged", - "INFO_LIB_ENUM_RES_STRUCTURE_REGIME_2": "Submerged", - "INFO_LIB_ENUM_RES_STRUCTURE_REGIME_3": "Zero flow" + "INFO_SETUP_TITLE": "Application setup", + "WARNING_REMOUS_ARRET_CRITIQUE": "Calculation stopped: critical elevation reached at abscissa %x%", + "WARNING_STRUCTUREKIVI_HP_TROP_ELEVE": "h/p must not be greater than 2.5. h/p is forced to 2.5", + "WARNING_STRUCTUREKIVI_PELLE_TROP_FAIBLE": "Threshold height should be greater than 0.1 m. Beta coefficient is forced to 0" + } \ No newline at end of file diff --git a/src/locale/error_messages.fr.json b/src/locale/error_messages.fr.json index e0e56d74ca3f00cc48186a806455143a8990714a..df2de9ae5d9bd0345b49a6d1b1ab1918e72bda94 100644 --- a/src/locale/error_messages.fr.json +++ b/src/locale/error_messages.fr.json @@ -1,115 +1,114 @@ { - "ERROR_DICHO_INIT_DOMAIN": "Dichotomie : la valeur cible %targetSymbol%=%targetValue% n'existe pas pour la variable %variableSymbol% prise dans l'intervalle %variableInterval%", - "ERROR_DICHO_INITVALUE_LOW": "Dichotomie : la valeur initiale %variableSymbol%=%variableInitValue% est trop petite (la valeur cible est %targetSymbol%=%targetValue%, %targetSymbol%(%variableSymbol%=%variableInitValue%)=%initTarget%)", + "ERROR_DICHO_CONVERGE": "La dichotomie n'a pas pu converger", + "ERROR_DICHO_FUNCTION_VARIATION": "Dichotomie : impossible de determiner le sens de variation de la fonction", "ERROR_DICHO_INITVALUE_HIGH": "Dichotomie : la valeur initiale %variableSymbol%=%variableInitValue% est trop grande (la valeur cible est %targetSymbol%=%targetValue%, %targetSymbol%(%variableSymbol%=%variableInitValue%)=%initTarget%)", - "ERROR_DICHO_NULL_STEP": "Dichotomie : le pas pour la recherche de l'intervalle de départ ne devrait pas être nul", + "ERROR_DICHO_INITVALUE_LOW": "Dichotomie : la valeur initiale %variableSymbol%=%variableInitValue% est trop petite (la valeur cible est %targetSymbol%=%targetValue%, %targetSymbol%(%variableSymbol%=%variableInitValue%)=%initTarget%)", + "ERROR_DICHO_INIT_DOMAIN": "Dichotomie : la valeur cible %targetSymbol%=%targetValue% n'existe pas pour la variable %variableSymbol% prise dans l'intervalle %variableInterval%", "ERROR_DICHO_INVALID_STEP_GROWTH": "Dichotomie : l'augmentation du pas pour la recherche de l'intervalle de départ est incorrecte (=0)", - "ERROR_DICHO_FUNCTION_VARIATION": "Dichotomie : impossible de determiner le sens de variation de la fonction", - "ERROR_DICHO_CONVERGE": "La dichotomie n'a pas pu converger", + "ERROR_DICHO_NULL_STEP": "Dichotomie : le pas pour la recherche de l'intervalle de départ ne devrait pas être nul", + "ERROR_INTERVAL_OUTSIDE": "Interval : la valeur %value% est hors de l'intervalle %interval", + "ERROR_INTERVAL_UNDEF": "Interval : valeur 'undefined' incorrecte", + "ERROR_LANG_UNSUPPORTED": "Internationalisation : locale '%locale%' non prise en charge", "ERROR_NEWTON_DERIVEE_NULLE": "Dérivée nulle dans un calcul par la méthode de Newton", - "ERROR_PARAMDOMAIN_INTERVAL_BOUNDS": "Les bornes (%minValue%/%maxValue%) de l'intervalle sont incorrectes", "ERROR_PARAMDEF_CALC_UNDEFINED": "La calculabilité du paramètre %symbol% n'est pas définie", - "ERROR_PARAMDEF_VALUE_UNDEFINED": "La valeur du paramètre %symbol% n'est pas définie", "ERROR_PARAMDEF_VALUE_FIXED": "La valeur du paramètre %symbol% ne peut pas être changée", + "ERROR_PARAMDEF_VALUE_INTERVAL": "Paramètre '%symbol%' : la valeur %value% est en dehors de l'intervalle [%minValue%, %maxValue%]", + "ERROR_PARAMDEF_VALUE_NULL": "La valeur du paramètre '%symbol%' ne peut pas être nulle", "ERROR_PARAMDEF_VALUE_POS": "La valeur %value% du paramètre '%symbol%' est incorrecte (<=0)", "ERROR_PARAMDEF_VALUE_POSNULL": "La valeur %value% du paramètre '%symbol%' est incorrecte (<0)", - "ERROR_PARAMDEF_VALUE_NULL": "La valeur du paramètre '%symbol%' ne peut pas être nulle", - "ERROR_PARAMDEF_VALUE_INTERVAL": "Paramètre '%symbol%' : la valeur %value% est en dehors de l'intervalle [%minValue%, %maxValue%]", + "ERROR_PARAMDEF_VALUE_UNDEFINED": "La valeur du paramètre %symbol% n'est pas définie", + "ERROR_PARAMDOMAIN_INTERVAL_BOUNDS": "Les bornes (%minValue%/%maxValue%) de l'intervalle sont incorrectes", "ERROR_PARAMDOMAIN_INVALID": "Paramètre '%symbol%' : le domaine de définition '%domain%' est incorrect", - "ERROR_INTERVAL_UNDEF": "Interval : valeur 'undefined' incorrecte", - "ERROR_INTERVAL_OUTSIDE": "Interval : la valeur %value% est hors de l'intervalle %interval", - "ERROR_LANG_UNSUPPORTED": "Internationalisation : locale '%locale%' non prise en charge", - "WARNING_REMOUS_ARRET_CRITIQUE": "Arrêt du calcul : hauteur critique atteinte à l'abscisse %x%", - "INFO_REMOUS_CALCUL_FLUVIAL": "Condition limite aval >= Hauteur critique : calcul de la partie fluviale à partir de l'aval", - "INFO_REMOUS_CALCUL_TORRENTIEL": "Condition limite amont <= Hauteur critique : calcul de la partie torrentielle à partir de l'amont", - "INFO_REMOUS_RESSAUT_DEHORS": "Ressaut hydraulique détecté à l'%sens% de l'abscisse %x% m", - "INFO_REMOUS_LARGEUR_BERGE": "Largeur au niveau des berges = %B% m", - "INFO_REMOUS_H_CRITIQUE": "Tirant d'eau critique = %Yc% m", - "INFO_REMOUS_H_NORMALE": "Tirant d'eau normal = %Yn% m", - "INFO_REMOUS_RESSAUT_HYDRO": "Ressaut hydraulique détecté entre les abscisses %xmin% et %xmax% m", - "ERROR_REMOUS_PENTE_FORTE": "La pente de la ligne d'eau est trop forte à l'abscisse %x% m (il faudrait réduire le pas de discrétisation)", - "ERROR_REMOUS_PAS_CALCUL_DEPUIS_AVAL": "Condition limite aval < Hauteur critique : pas de calcul possible depuis l'aval", "ERROR_REMOUS_PAS_CALCUL_DEPUIS_AMONT": "Condition limite amont > Hauteur critique : pas de calcul possible depuis l'amont", - "ERROR_SECTION_NON_CONVERGENCE_NEWTON_HCRITIQUE": "Non convergence du calcul de la hauteur critique (Méthode de Newton)", - "ERROR_SECTION_NON_CONVERGENCE_NEWTON_HNORMALE": "Non convergence du calcul de la hauteur normale (Méthode de Newton)", + "ERROR_REMOUS_PAS_CALCUL_DEPUIS_AVAL": "Condition limite aval < Hauteur critique : pas de calcul possible depuis l'aval", + "ERROR_REMOUS_PENTE_FORTE": "La pente de la ligne d'eau est trop forte à l'abscisse %x% m (il faudrait réduire le pas de discrétisation)", "ERROR_SECTION_NON_CONVERGENCE_NEWTON_HCONJUG": "Non convergence du calcul de la hauteur conjuguée (Méthode de Newton)", + "ERROR_SECTION_NON_CONVERGENCE_NEWTON_HCRITIQUE": "Non convergence du calcul de la hauteur critique (Méthode de Newton)", "ERROR_SECTION_NON_CONVERGENCE_NEWTON_HFLU": "Non convergence du calcul de la hauteur correspondante (Méthode de Newton) pour le calcul de la hauteur fluviale", + "ERROR_SECTION_NON_CONVERGENCE_NEWTON_HNORMALE": "Non convergence du calcul de la hauteur normale (Méthode de Newton)", "ERROR_SECTION_NON_CONVERGENCE_NEWTON_HTOR": "Non convergence du calcul de la hauteur correspondante (Méthode de Newton) pour le calcul de la hauteur torrentielle", "ERROR_SECTION_PENTE_NEG_NULLE_HNORMALE_INF": "La pente est négative ou nulle, la hauteur normale est infinie", - "INFO_PARAMFIELD_PARAMFIXE": "fixé", - "INFO_PARAMFIELD_PARAMVARIER": "varier", - "INFO_PARAMFIELD_PARAMCALCULER": "calculer", - "INFO_PARAMFIELD_PARAMLIE": "lié", - "INFO_PARAMFIELD_VALEURMINI": "De la valeur minimum", - "INFO_PARAMFIELD_VALEURMAXI": "à la valeur maximum", - "INFO_PARAMFIELD_PASVARIATION": "avec un pas de :", + "INFO_CALCULATOR_CALCULER": "Calculer", "INFO_CALCULATOR_PARAMFIXES": "Paramètres fixés", "INFO_CALCULATOR_VALEURS": "Valeurs", - "INFO_CALCULATOR_CALCULER": "Calculer", + "INFO_CLOSE_DIALOGUE_TEXT": "Attention ! Les paramètres et résultats de la calculette seront perdus. Vraiment fermer ?", + "INFO_CLOSE_DIALOGUE_TITRE": "Confirmer la fermeture", "INFO_CONDUITEDISTRIBUTRICE_TITRE": "Conduite distributrice", - "INFO_LECHAPTCALMON_TITRE": "Lechapt-Calmon", - "INFO_REGIMEUNIFORME_TITRE": "Régime uniforme", - "INFO_SECTIONPARAMETREE_TITRE": "Section paramétrée", - "INFO_COURBEREMOUS_TITRE": "Courbes de remous", - "INFO_REMOUSRESULTS_TITREJOURNAL": "Journal de calcul", - "INFO_REMOUSRESULTS_ABSCISSE": "Abscisse (m)", - "INFO_REMOUSRESULTS_TIRANT": "Tirant d'eau (m)", - "INFO_REMOUSRESULTS_FOND": "Fond", - "INFO_REMOUSRESULTS_BERGE": "Berge", - "INFO_REMOUSRESULTS_TIRANTNORMAL": "Tirant d'eau normal", - "INFO_REMOUSRESULTS_TIRANTCRITIQUE": "Tirant d'eau critique", - "INFO_SETUP_TITLE": "Paramètres de l'application", - "INFO_SETUP_PRECISION_AFFICHAGE": "Précision d'affichage", - "INFO_SETUP_PRECISION_CALCUL": "Précision de calcul", - "INFO_SETUP_NEWTON_MAX_ITER": "Newton : nombre d'itérations maximum", - "INFO_MENU_NOUVELLE_CALC": "Nouvelle calculette", - "INFO_CLOSE_DIALOGUE_TITRE": "Confirmer la fermeture", - "INFO_CLOSE_DIALOGUE_TEXT": "Attention ! Les paramètres et résultats de la calculette seront perdus. Vraiment fermer ?", - "INFO_OPTION_YES": "Oui", - "INFO_OPTION_NO": "Non", - "INFO_PABDIMENSIONS_TITRE": "Passe à bassin : dimensions", - "INFO_PABPUISSANCE_TITRE": "Passe à bassin : puissance dissipée", - "INFO_PARALLELSTRUCTURE_TITRE": "Ouvrages en parallèle", - "INFO_DEVER_TITRE": "Outil dever", - "INFO_OUVRAGE": "Ouvrage", - - "INFO_EXTRARES_LIB_FLU": "Ligne d'eau fluviale", - "INFO_EXTRARES_LIB_TOR": "Ligne d'eau torrentielle", - "INFO_EXTRARES_LIB_OUVRAGE_Q": "Débit (m³/s)", - "INFO_EXTRARES_LIB_OUVRAGE_Q_MODE": "Type d'écoulement", - "INFO_EXTRARES_LIB_OUVRAGE_Q_REGIME": "Régime", - "INFO_EXTRARES_LIB_EC": "EC: Énergie cinétique (m)", + "INFO_DEVER_TITRE": "Passe à bassin : Lois de déversoir", + "INFO_EXTRARES_ENUM_OUVRAGE_Q_MODE_0": "Surface libre", + "INFO_EXTRARES_ENUM_OUVRAGE_Q_MODE_1": "En charge", + "INFO_EXTRARES_ENUM_OUVRAGE_Q_MODE_2": "Débit nul", + "INFO_EXTRARES_ENUM_OUVRAGE_Q_REGIME_0": "Dénoyé", + "INFO_EXTRARES_ENUM_OUVRAGE_Q_REGIME_1": "Partiellement noyé", + "INFO_EXTRARES_ENUM_OUVRAGE_Q_REGIME_2": "Noyé", + "INFO_EXTRARES_ENUM_OUVRAGE_Q_REGIME_3": "Débit nul", + "INFO_EXTRARES_LIB_B": "Largeur au miroir (m)", "INFO_EXTRARES_LIB_CV": "Cv: Coefficient de vitesse d'approche", "INFO_EXTRARES_LIB_CVQT": "CV.QT: Débit corrigé (m³/s)", - "INFO_EXTRARES_LIB_Q": "Débit (m³/s)", + "INFO_EXTRARES_LIB_EC": "EC: Énergie cinétique (m)", + "INFO_EXTRARES_LIB_FLU": "Ligne d'eau fluviale", + "INFO_EXTRARES_LIB_FR": "Froude", "INFO_EXTRARES_LIB_HS": "Charge spécifique (m)", "INFO_EXTRARES_LIB_HSC": "Charge critique (m)", - "INFO_EXTRARES_LIB_B": "Largeur au miroir (m)", + "INFO_EXTRARES_LIB_I-J": "Variation linéaire de l'énergie spécifique (m/m)", + "INFO_EXTRARES_LIB_IMP": "Impulsion (N)", + "INFO_EXTRARES_LIB_J": "Perte de charge (m)", + "INFO_EXTRARES_LIB_OUVRAGE_Q": "Débit (m³/s)", + "INFO_EXTRARES_LIB_OUVRAGE_Q_MODE": "Type d'écoulement", + "INFO_EXTRARES_LIB_OUVRAGE_Q_REGIME": "Régime", "INFO_EXTRARES_LIB_P": "Périmètre mouillé (m)", - "INFO_EXTRARES_LIB_S": "Surface mouillée (m²)", + "INFO_EXTRARES_LIB_Q": "Débit (m³/s)", "INFO_EXTRARES_LIB_R": "Rayon hydraulique (m)", + "INFO_EXTRARES_LIB_S": "Surface mouillée (m²)", + "INFO_EXTRARES_LIB_TAU0": "Force tractrice (Pa)", + "INFO_EXTRARES_LIB_TOR": "Ligne d'eau torrentielle", "INFO_EXTRARES_LIB_V": "Vitesse moyenne (m/s)", - "INFO_EXTRARES_LIB_FR": "Froude", "INFO_EXTRARES_LIB_YC": "Tirant d'eau critique (m)", - "INFO_EXTRARES_LIB_YN": "Tirant d'eau normal (m)", + "INFO_EXTRARES_LIB_YCO": "Tirant d'eau conjugué (m)", "INFO_EXTRARES_LIB_YF": "Tirant d'eau fluvial (m)", + "INFO_EXTRARES_LIB_YN": "Tirant d'eau normal (m)", "INFO_EXTRARES_LIB_YT": "Tirant d'eau torrentiel (m)", - "INFO_EXTRARES_LIB_YCO": "Tirant d'eau conjugué (m)", - "INFO_EXTRARES_LIB_J": "Perte de charge (m)", - "INFO_EXTRARES_LIB_I-J": "Variation linéaire de l'énergie spécifique (m/m)", - "INFO_EXTRARES_LIB_IMP": "Impulsion (N)", - "INFO_EXTRARES_LIB_TAU0": "Force tractrice (Pa)", - - "INFO_EXTRARES_ENUM_OUVRAGE_Q_MODE_0": "Surface libre", - "INFO_EXTRARES_ENUM_OUVRAGE_Q_MODE_1": "En charge", - "INFO_EXTRARES_ENUM_OUVRAGE_Q_MODE_2": "Débit nul", - "INFO_EXTRARES_ENUM_OUVRAGE_Q_REGIME_0": "Dénoyé", - "INFO_EXTRARES_ENUM_OUVRAGE_Q_REGIME_1": "Partiellement noyé", - "INFO_EXTRARES_ENUM_OUVRAGE_Q_REGIME_2": "Noyé", - "INFO_EXTRARES_ENUM_OUVRAGE_Q_REGIME_3": "Débit nul", - - "WARNING_STRUCTUREKIVI_PELLE_TROP_FAIBLE": "La pelle du seuil doit mesurer au moins 0,1 m. Le coefficient béta est forcé à 0", - "WARNING_STRUCTUREKIVI_HP_TROP_ELEVE": "h/p ne doit pas être supérieur à 2,5. h/p est forcé à 2,5" + "INFO_LECHAPTCALMON_TITRE": "Lechapt-Calmon", + "INFO_LIB_FS_PARAM_CALC": "Paramètres de calcul", + "INFO_LIB_PR": "Précision de calcul", + "INFO_LIB_SELECT_LOIDEBIT": "Loi de débit", + "INFO_MENU_NOUVELLE_CALC": "Nouvelle calculette", + "INFO_OPTION_NO": "Non", + "INFO_OPTION_YES": "Oui", + "INFO_OUVRAGE": "Ouvrage", + "INFO_PABDIMENSIONS_TITRE": "Passe à bassin : dimensions", + "INFO_PABPUISSANCE_TITRE": "Passe à bassin : puissance dissipée", + "INFO_PARALLELSTRUCTURE_TITRE": "Lois d'ouvrages", + "INFO_PARAMFIELD_PARAMCALCULER": "calculer", + "INFO_PARAMFIELD_PARAMFIXE": "fixé", + "INFO_PARAMFIELD_PARAMLIE": "lié", + "INFO_PARAMFIELD_PARAMVARIER": "varier", + "INFO_PARAMFIELD_PASVARIATION": "avec un pas de :", + "INFO_PARAMFIELD_VALEURMAXI": "à la valeur maximum", + "INFO_PARAMFIELD_VALEURMINI": "De la valeur minimum", + "INFO_REGIMEUNIFORME_TITRE": "Régime uniforme", + "INFO_REMOUSRESULTS_ABSCISSE": "Abscisse (m)", + "INFO_REMOUSRESULTS_BERGE": "Berge", + "INFO_REMOUSRESULTS_FOND": "Fond", + "INFO_REMOUSRESULTS_TIRANT": "Tirant d'eau (m)", + "INFO_REMOUSRESULTS_TIRANTCRITIQUE": "Tirant d'eau critique", + "INFO_REMOUSRESULTS_TIRANTNORMAL": "Tirant d'eau normal", + "INFO_REMOUSRESULTS_TITREJOURNAL": "Journal de calcul", + "INFO_REMOUS_CALCUL_FLUVIAL": "Condition limite aval >= Hauteur critique : calcul de la partie fluviale à partir de l'aval", + "INFO_REMOUS_CALCUL_TORRENTIEL": "Condition limite amont <= Hauteur critique : calcul de la partie torrentielle à partir de l'amont", + "INFO_REMOUS_H_CRITIQUE": "Tirant d'eau critique = %Yc% m", + "INFO_REMOUS_H_NORMALE": "Tirant d'eau normal = %Yn% m", + "INFO_REMOUS_LARGEUR_BERGE": "Largeur au niveau des berges = %B% m", + "INFO_REMOUS_RESSAUT_DEHORS": "Ressaut hydraulique détecté à l'%sens% de l'abscisse %x% m", + "INFO_REMOUS_RESSAUT_HYDRO": "Ressaut hydraulique détecté entre les abscisses %xmin% et %xmax% m", + "INFO_SECTIONPARAMETREE_TITRE": "Section paramétrée", + "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_TITLE": "Paramètres de l'application", + "WARNING_REMOUS_ARRET_CRITIQUE": "Arrêt du calcul : hauteur critique atteinte à l'abscisse %x%", + "WARNING_STRUCTUREKIVI_HP_TROP_ELEVE": "h/p ne doit pas être supérieur à 2,5. h/p est forcé à 2,5", + "WARNING_STRUCTUREKIVI_PELLE_TROP_FAIBLE": "La pelle du seuil doit mesurer au moins 0,1 m. Le coefficient béta est forcé à 0" } \ No newline at end of file