From 883e218574f43754d9d14db9a74fe96b7f583a27 Mon Sep 17 00:00:00 2001 From: "francois.grand" <francois.grand@irstea.fr> Date: Mon, 15 Jan 2018 14:49:04 +0100 Subject: [PATCH] =?UTF-8?q?ticket=20#37=20:=20correction=20de=20"Mettre=20?= =?UTF-8?q?un=20espace=20ins=C3=A9cable=20avant=20les=20doubles-ponctuatio?= =?UTF-8?q?ns"?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../generic/calculator.component.html | 6 ++- .../calculator-list.component.html | 3 +- .../generic-input.component.html | 5 ++- src/app/components/log/log.component.html | 3 +- src/locale/error_messages.en.json | 36 ++++++++--------- src/locale/error_messages.fr.json | 40 +++++++++---------- 6 files changed, 49 insertions(+), 44 deletions(-) diff --git a/src/app/calculators/generic/calculator.component.html b/src/app/calculators/generic/calculator.component.html index e478cd894..af45d57dd 100644 --- a/src/app/calculators/generic/calculator.component.html +++ b/src/app/calculators/generic/calculator.component.html @@ -1,6 +1,7 @@ <div *ngIf="hasData()" class="row"> <div class="col-10"> - <h1>{{uitextTitre}}</h1> + <!-- on utilise [innerHTML] pour que les codes HTML comme soient interprétés correctement --> + <h1 [innerHTML]="uitextTitre"></h1> </div> <div class="col-2 pr-0"> <button type="button" class="btn btn-primary float-right black" (click)="confirmModal.show()">×</button> @@ -38,7 +39,8 @@ <h4 class="modal-title w-100" id="myModalLabel">{{uitextCloseDialogTitle}}</h4> </div> <div class="modal-body"> - <h4> {{uitextCloseDialogText}} </h4> + <!-- <h4> {{uitextCloseDialogText}} </h4> --> + <h4 [innerHTML]="uitextCloseDialogText"></h4> </div> <div class="modal-footer"> <button type="button" class="btn btn-danger relative waves-light" (click)="confirmModal.hide();onCloseForm()" mdbRippleRadius>{{uitextCloseDialogYes}}</button> diff --git a/src/app/components/calculator-list/calculator-list.component.html b/src/app/components/calculator-list/calculator-list.component.html index 9595b9dce..c9631c342 100644 --- a/src/app/components/calculator-list/calculator-list.component.html +++ b/src/app/components/calculator-list/calculator-list.component.html @@ -2,7 +2,8 @@ <div class="row"> <div class="offset-1 col-10 mx-auto"> <ul *ngFor="let l of _items" class="list-group"> - <button class="list-group-item" (click)="create(l.type)">{{l.label}}</button> + <!-- on utilise [innerHTML] pour que les codes HTML comme soient interprétés correctement --> + <button class="list-group-item" (click)="create(l.type)" [innerHTML]="l.label"></button> </ul> </div> </div> diff --git a/src/app/components/generic-input/generic-input.component.html b/src/app/components/generic-input/generic-input.component.html index 84a7b879b..afdbb5946 100644 --- a/src/app/components/generic-input/generic-input.component.html +++ b/src/app/components/generic-input/generic-input.component.html @@ -1,5 +1,6 @@ <div class="md-form form-sm"> <input mdbActive type="text" id="form1" class="form-control" [disabled]="isDisabled" [ngModel]="uiValue" (ngModelChange)="setUIValue($event)"> - <label for="form1">{{_title}}</label> - <small class="text-danger">{{_message}}</small> + <!-- on utilise [innerHTML] pour que les codes HTML comme soient interprétés correctement --> + <label for="form1" [innerHTML]="_title"></label> + <small class="text-danger" [innerHTML]="_message"></small> </div> \ No newline at end of file diff --git a/src/app/components/log/log.component.html b/src/app/components/log/log.component.html index 80902db3f..86b0f12b4 100644 --- a/src/app/components/log/log.component.html +++ b/src/app/components/log/log.component.html @@ -3,7 +3,8 @@ <div class="hyd_log"> <div class="titre">{{uitextTitreJournal}}</div> <ul *ngFor="let r of _logEntries"> - <li>{{r}}</li> + <!-- on utilise [innerHTML] pour que les codes HTML comme soient interprétés correctement --> + <li [innerHTML]="r"></li> </ul> </div> </div> diff --git a/src/locale/error_messages.en.json b/src/locale/error_messages.en.json index b6c4c68f6..85aeb9c69 100644 --- a/src/locale/error_messages.en.json +++ b/src/locale/error_messages.en.json @@ -1,9 +1,9 @@ { - "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_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_INVALID_STEP_GROWTH": "Dichotomy (initial interval search) : invalid null step growth", + "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_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_INVALID_STEP_GROWTH": "Dichotomy (initial interval search): invalid null step growth", "ERROR_DICHO_FUNCTION_VARIATION": "unable to determinate function direction of variation", "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", @@ -12,28 +12,28 @@ "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_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", + "ERROR_PARAMDEF_VALUE_INTERVAL": "parameter '%symbol%': value %value% is out of [%minValue%, %maxValue%] interval", + "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", "ERROR_REMOUS_ARRET_CRITIQUE": "Calculation stopped: critical elevation reached at abscissa %x%", - "ERROR_REMOUS_CALCUL_FLUVIAL": "Downstream boundary condition >= Critical elevation : calculation of subcritical part from downstream", - "ERROR_REMOUS_CALCUL_TORRENTIEL": "Uptream boundary condition <= Critical elevation : calculation of supercritical part from upstream", + "ERROR_REMOUS_CALCUL_FLUVIAL": "Downstream boundary condition >= Critical elevation: calculation of subcritical part from downstream", + "ERROR_REMOUS_CALCUL_TORRENTIEL": "Uptream boundary condition <= Critical elevation: calculation of supercritical part from upstream", "ERROR_REMOUS_RESSAUT_DEHORS": "Hydraulic jump detected %sens% abscissa %x% m", "ERROR_REMOUS_LARGEUR_BERGE": "Width at embankment level = %B% m", "ERROR_REMOUS_H_CRITIQUE": "Width at embankment level = %Yc% m", "ERROR_REMOUS_H_NORMALE": "Normal water level = %Yn% m", "ERROR_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", + "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_VALEURMINI": "From minimum value", "INFO_PARAMFIELD_VALEURMAXI": "to maximum value", - "INFO_PARAMFIELD_PASVARIATION": "with a variation step of :", + "INFO_PARAMFIELD_PASVARIATION": "with a variation step of:", "INFO_CALCULATOR_CALCULER": "Compute", "INFO_CALCULATOR_PARAMFIXES": "Fixed parameters", "INFO_CALCULATOR_VALEURS": "Values", @@ -73,9 +73,9 @@ "INFO_SETUP_PRECISION_CALCUL": "Computation accuracy", "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_CLOSE_DIALOGUE_TEXT": "Warning ! Parameters and results will be lost. Really close?", "INFO_OPTION_YES": "Yes", "INFO_OPTION_NO": "No", - "INFO_PABDIM_TITRE": "Passe à bassin : dimensions", - "INFO_PABPUISS_TITRE": "Passe à bassin : dissipated power" + "INFO_PABDIM_TITRE": "Pool pass: dimensions", + "INFO_PABPUISS_TITRE": "Pool pass: dissipated power" } \ No newline at end of file diff --git a/src/locale/error_messages.fr.json b/src/locale/error_messages.fr.json index cc78a2a51..13475608d 100644 --- a/src/locale/error_messages.fr.json +++ b/src/locale/error_messages.fr.json @@ -1,10 +1,10 @@ { - "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_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_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_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_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_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_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", @@ -12,22 +12,22 @@ "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_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", - "ERROR_REMOUS_ARRET_CRITIQUE": "Arrêt du calcul : hauteur critique atteinte à l'abscisse %x%", - "ERROR_REMOUS_CALCUL_FLUVIAL": "Condition limite aval >= Hauteur critique: calcul de la partie fluviale à partir de l'aval", - "ERROR_REMOUS_CALCUL_TORRENTIEL": "Condition limite amont <= Hauteur critique: calcul de la partie torrentielle à partir de l'amont", + "ERROR_PARAMDEF_VALUE_INTERVAL": "Paramètre '%symbol%' : la valeur %value% est en dehors de l'intervalle [%minValue%, %maxValue%]", + "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", + "ERROR_REMOUS_ARRET_CRITIQUE": "Arrêt du calcul : hauteur critique atteinte à l'abscisse %x%", + "ERROR_REMOUS_CALCUL_FLUVIAL": "Condition limite aval >= Hauteur critique : calcul de la partie fluviale à partir de l'aval", + "ERROR_REMOUS_CALCUL_TORRENTIEL": "Condition limite amont <= Hauteur critique : calcul de la partie torrentielle à partir de l'amont", "ERROR_REMOUS_RESSAUT_DEHORS": "Ressaut hydraulique détecté à l'%sens% de l'abscisse %x% m", "ERROR_REMOUS_LARGEUR_BERGE": "Largeur au niveau des berges = %B% m", "ERROR_REMOUS_H_CRITIQUE": "Tirant d'eau critique = %Yc% m", "ERROR_REMOUS_H_NORMALE": "Tirant d'eau normal = %Yn% m", "ERROR_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_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_SECTION_NON_CONVERGENCE_NEWTON_HCONJUG": "Non convergence du calcul de la hauteur conjuguée (Méthode de Newton)", @@ -39,7 +39,7 @@ "INFO_PARAMFIELD_PARAMCALCULER": "calculer", "INFO_PARAMFIELD_VALEURMINI": "De la valeur minimum", "INFO_PARAMFIELD_VALEURMAXI": "à la valeur maximum", - "INFO_PARAMFIELD_PASVARIATION": "avec un pas de :", + "INFO_PARAMFIELD_PASVARIATION": "avec un pas de :", "INFO_CALCULATOR_PARAMFIXES": "Paramètres fixés", "INFO_CALCULATOR_VALEURS": "Valeurs", "INFO_CALCULATOR_CALCULER": "Calculer", @@ -79,9 +79,9 @@ "INFO_SETUP_PRECISION_CALCUL": "Précision de calcul", "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_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_PABDIM_TITRE": "Passe à bassin : dimensions", - "INFO_PABPUISS_TITRE": "Passe à bassin : puissance dissipée" + "INFO_PABDIM_TITRE": "Passe à bassin : dimensions", + "INFO_PABPUISS_TITRE": "Passe à bassin : puissance dissipée" } \ No newline at end of file -- GitLab