Skip to content
Snippets Groups Projects
Commit 49e66bc8 authored by francois.grand's avatar francois.grand
Browse files

Correction bug d'affichage des titres de saisie de paramètre (section...

Correction bug d'affichage des titres de saisie de paramètre (section param/parabolique) dû à un pb de MAJ de l'internationalisation
parent 7574510a
No related branches found
No related tags found
1 merge request!2Resolve "Ajout de la calculette "Passe à bassins : Dimensions""
......@@ -2,7 +2,6 @@ import { ComputeNodeType, ParamsEquation, Nub, acSection, RegimeUniforme, Method
import { ParamsSectionRectang, cSnRectang, ParamsSectionCirc, cSnCirc, ParamsSectionPuiss, cSnPuiss, Result } from "jalhyd";
import { ConduiteDistrib, ConduiteDistribParams, LechaptCalmon, LechaptCalmonParams, ParamsSectionTrapez, cSnTrapez } from "jalhyd";
import { ParamService } from "../services/param/param.service";
import { InternationalisationService } from "../services/internationalisation/internationalisation.service";
import { Field } from "./field";
......@@ -21,6 +20,7 @@ import { ExistenceDependency } from "./existence-dependency";
import { FixedVarResults } from "../results/fixed-var-results";
import { SectionResults } from "../results/section-results";
import { RemousResults } from "../results/remous-results";
import { StringMap } from "../stringmap";
export enum CalculatorType {
......@@ -1089,4 +1089,17 @@ export class FormulaireDefinition {
public hasRemousResults(): boolean {
return this._remousResults.hasResults();
}
public updateLocalisation(localisation: StringMap) {
for (let loc_id in localisation) {
for (let fs of this._fieldSets) {
if (fs.id == loc_id)
fs.updateLocalisation(localisation);
for (let p of fs.fields)
if (p.id === loc_id)
p.updateLocalisation(localisation);
}
}
}
}
......@@ -10,7 +10,7 @@ export abstract class FormulaireElement {
private _id: string;
private _formId: number;
public isDisplayed: boolean;
public label: string;
private _label: string;
constructor(nodeType: ComputeNodeType, id: string, formId: number) {
this._nodeType = nodeType;
......@@ -31,6 +31,10 @@ export abstract class FormulaireElement {
return this._formId;
}
get label(): string {
return this._label;
}
protected abstract verifyDependency(d: Dependency): boolean;
public verifiesDependency(d: Dependency): boolean {
......@@ -41,7 +45,7 @@ export abstract class FormulaireElement {
}
public updateLocalisation(loc: StringMap) {
this.label = loc[this.id];
this._label = loc[this.id];
}
public toString() {
......
......@@ -50,11 +50,11 @@ export class FormulaireService extends Observable {
* @param localisation ensemble id-message traduit
*/
private updateFormulaireLocalisation(formId: number, localisation: StringMap) {
for (let loc_id in localisation) {
let fe = this.getFormulaireElementById(formId, loc_id);
if (fe != undefined)
fe.updateLocalisation(localisation);
}
for (let f of this._formulaires)
if (f.uid == formId) {
f.updateLocalisation(localisation);
break;
}
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment