Skip to content
Snippets Groups Projects
Commit 352db95f authored by mathias.chouet's avatar mathias.chouet
Browse files

Update childrenType translations; improve lined param display

parent aac32b5b
No related branches found
No related tags found
1 merge request!69Resolve "Module y = a.x + b"
import { Component, Input, Output, EventEmitter, OnChanges, OnDestroy } from "@angular/core"; import { Component, Input, Output, EventEmitter, OnChanges, OnDestroy } from "@angular/core";
import { NgParameter } from "../../formulaire/ngparam"; import { NgParameter } from "../../formulaire/ngparam";
import { LinkedValue, ParamValueMode, Observer, Structure, acSection, ParamDefinition } from "jalhyd"; import { LinkedValue, ParamValueMode, Observer, Structure, acSection, ParamDefinition, ChildNub } from "jalhyd";
import { FormulaireService } from "../../services/formulaire.service"; import { FormulaireService } from "../../services/formulaire.service";
import { I18nService } from "../../services/internationalisation.service"; import { I18nService } from "../../services/internationalisation.service";
import { FormulaireDefinition } from "../../formulaire/definition/form-definition"; import { FormulaireDefinition } from "../../formulaire/definition/form-definition";
...@@ -168,21 +168,21 @@ export class ParamLinkComponent implements OnChanges, Observer, OnDestroy { ...@@ -168,21 +168,21 @@ export class ParamLinkComponent implements OnChanges, Observer, OnDestroy {
preview = NgParameter.preview(i.element as ParamDefinition, true); preview = NgParameter.preview(i.element as ParamDefinition, true);
} }
// 1. Paramètre / résultat d'un ouvrage dans un Nub de type ParallelStructure // 1. Paramètre / résultat d'un Nub enfant au sein d'un Nub parent
if (i.nub instanceof Structure) { if (i.nub instanceof ChildNub) {
let pos: number; let pos: number;
pos = i.nub.findPositionInParent(); pos = i.nub.findPositionInParent();
if (i.isResult()) { if (i.isResult()) {
// résultat d'ouvrage // résultat d'enfant
return `${preview} - ` + sprintf( return `${preview} - ` + sprintf(
this.intlService.localizeText("INFO_LINKED_VALUE_DEVICE_RESULT"), this.intlService.localizeText("INFO_LINKED_VALUE_CHILD_RESULT"),
s, c, (pos + 1) s, c, i.nub.parent.childrenType, (pos + 1)
); );
} else { } else {
// paramètre d'ouvrage // paramètre d'enfant
return `${preview} - ` + sprintf( return `${preview} - ` + sprintf(
this.intlService.localizeText("INFO_LINKED_VALUE_DEVICE"), this.intlService.localizeText("INFO_LINKED_VALUE_CHILD"),
s, c, (pos + 1) s, c, i.nub.parent.childrenType, (pos + 1)
); );
} }
} else } else
......
...@@ -153,12 +153,12 @@ ...@@ -153,12 +153,12 @@
"INFO_STUFF_MOVED": "%s #%s moved", "INFO_STUFF_MOVED": "%s #%s moved",
"INFO_STUFF_REMOVED": "%s #%s removed", "INFO_STUFF_REMOVED": "%s #%s removed",
"INFO_STUFF_N": "%s #", "INFO_STUFF_N": "%s #",
"INFO_CHILD_TYPE_STRUCTURE": "device", "INFO_CHILD_TYPE_OUVRAGE": "device",
"INFO_CHILD_TYPE_STRUCTURE_PLUR": "devices", "INFO_CHILD_TYPE_OUVRAGE_PLUR": "devices",
"INFO_CHILD_TYPE_MACRORUGO": "apron", "INFO_CHILD_TYPE_MACRORUGO": "apron",
"INFO_CHILD_TYPE_MACRORUGO_PLUR": "aprons", "INFO_CHILD_TYPE_MACRORUGO_PLUR": "aprons",
"INFO_CHILD_TYPE_YAXN": "power", "INFO_CHILD_TYPE_PUISSANCE": "power",
"INFO_CHILD_TYPE_YAXN_PLUR": "powers", "INFO_CHILD_TYPE_PUISSANCE_PLUR": "powers",
"INFO_FIELDSET_ADD": "Add", "INFO_FIELDSET_ADD": "Add",
"INFO_FIELDSET_COPY": "Copy", "INFO_FIELDSET_COPY": "Copy",
"INFO_FIELDSET_REMOVE": "Remove", "INFO_FIELDSET_REMOVE": "Remove",
...@@ -285,8 +285,8 @@ ...@@ -285,8 +285,8 @@
"INFO_LIB_ZRAM": "Upstream apron elevation", "INFO_LIB_ZRAM": "Upstream apron elevation",
"INFO_LIB_ZRMB": "Downstream basin bottom elevation", "INFO_LIB_ZRMB": "Downstream basin bottom elevation",
"INFO_LIB_ZT": "Triangle top elevation", "INFO_LIB_ZT": "Triangle top elevation",
"INFO_LINKED_VALUE_DEVICE_RESULT": "%s (%s, device %s)", "INFO_LINKED_VALUE_CHILD_RESULT": "%s (%s, %s %s)",
"INFO_LINKED_VALUE_DEVICE": "%s (%s, device %s)", "INFO_LINKED_VALUE_CHILD": "%s (%s, %s %s)",
"INFO_LINKED_VALUE_EXTRA_RESULT_OF": "%s (%s)", "INFO_LINKED_VALUE_EXTRA_RESULT_OF": "%s (%s)",
"INFO_LINKED_VALUE_EXTRA_RESULT": "%s (%s)", "INFO_LINKED_VALUE_EXTRA_RESULT": "%s (%s)",
"INFO_LINKED_VALUE_RESULT": "%s (%s)", "INFO_LINKED_VALUE_RESULT": "%s (%s)",
......
...@@ -153,12 +153,12 @@ ...@@ -153,12 +153,12 @@
"INFO_STUFF_MOVED": "%s n°%s déplacé(e)", "INFO_STUFF_MOVED": "%s n°%s déplacé(e)",
"INFO_STUFF_REMOVED": "%s n°%s supprimé(e)", "INFO_STUFF_REMOVED": "%s n°%s supprimé(e)",
"INFO_STUFF_N": "%s n°", "INFO_STUFF_N": "%s n°",
"INFO_CHILD_TYPE_STRUCTURE": "ouvrage", "INFO_CHILD_TYPE_OUVRAGE": "ouvrage",
"INFO_CHILD_TYPE_STRUCTURE_PLUR": "ouvrages", "INFO_CHILD_TYPE_OUVRAGE_PLUR": "ouvrages",
"INFO_CHILD_TYPE_MACRORUGO": "radier", "INFO_CHILD_TYPE_MACRORUGO": "radier",
"INFO_CHILD_TYPE_MACRORUGO_PLUR": "radiers", "INFO_CHILD_TYPE_MACRORUGO_PLUR": "radiers",
"INFO_CHILD_TYPE_YAXN": "puissance", "INFO_CHILD_TYPE_PUISSANCE": "puissance",
"INFO_CHILD_TYPE_YAXN_PLUR": "puissances", "INFO_CHILD_TYPE_PUISSANCE_PLUR": "puissances",
"INFO_FIELDSET_ADD": "Ajouter", "INFO_FIELDSET_ADD": "Ajouter",
"INFO_FIELDSET_COPY": "Copier", "INFO_FIELDSET_COPY": "Copier",
"INFO_FIELDSET_REMOVE": "Supprimer", "INFO_FIELDSET_REMOVE": "Supprimer",
...@@ -284,8 +284,8 @@ ...@@ -284,8 +284,8 @@
"INFO_LIB_ZRAM": "Cote du radier amont", "INFO_LIB_ZRAM": "Cote du radier amont",
"INFO_LIB_ZRMB": "Cote de radier mi-bassin", "INFO_LIB_ZRMB": "Cote de radier mi-bassin",
"INFO_LIB_ZT": "Cote haute du triangle", "INFO_LIB_ZT": "Cote haute du triangle",
"INFO_LINKED_VALUE_DEVICE_RESULT": "%s (%s, ouvrage %s)", "INFO_LINKED_VALUE_CHILD_RESULT": "%s (%s, %s %s)",
"INFO_LINKED_VALUE_DEVICE": "%s (%s, ouvrage %s)", "INFO_LINKED_VALUE_CHILD": "%s (%s, %s %s)",
"INFO_LINKED_VALUE_EXTRA_RESULT_OF": "%s (%s)", "INFO_LINKED_VALUE_EXTRA_RESULT_OF": "%s (%s)",
"INFO_LINKED_VALUE_EXTRA_RESULT": "%s (%s)", "INFO_LINKED_VALUE_EXTRA_RESULT": "%s (%s)",
"INFO_LINKED_VALUE_RESULT": "%s (%s)", "INFO_LINKED_VALUE_RESULT": "%s (%s)",
......
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