Commit bac18767 authored by Grand Francois's avatar Grand Francois
Browse files

fix: modify abstract log messages

refs #517
parent b1b6c4a7
Pipeline #35864 passed with stages
in 17 minutes and 25 seconds
...@@ -111,11 +111,18 @@ export class LogHelper { ...@@ -111,11 +111,18 @@ export class LogHelper {
&& l.messages.length === 0 // existing global messages make generic message below useless && l.messages.length === 0 // existing global messages make generic message below useless
) { ) {
const logStats = this.logStats(); const logStats = this.logStats();
const m = new Message(MessageCode.WARNING_PROBLEMS_ENCOUNTERED); let m: Message;
m.extraVar.info = "" + logStats.info; // to avoid displaying fixed number of digits if (logStats.warning > 0) {
m.extraVar.warning = "" + logStats.warning; m = new Message(MessageCode.WARNING_WARNINGS_ABSTRACT);
m.extraVar.error = "" + logStats.error; m.extraVar.nb = "" + logStats.warning;
l.add(m); l.add(m);
}
if (logStats.error > 0) {
let c: MessageCode = logStats.error > 1 ? MessageCode.WARNING_ERRORS_ABSTRACT_PLUR : MessageCode.WARNING_ERRORS_ABSTRACT;
m = new Message(c);
m.extraVar.nb = "" + logStats.error;
l.add(m);
}
} }
} // sinon pas de log global (aucun paramètre ne varie) } // sinon pas de log global (aucun paramètre ne varie)
return l; return l;
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
"WARNING_NOTCH_SUBMERSION_GREATER_THAN_07": "Notch formula is discouraged when submersion is greater than 0.7", "WARNING_NOTCH_SUBMERSION_GREATER_THAN_07": "Notch formula is discouraged when submersion is greater than 0.7",
"WARNING_SLOT_SUBMERSION_NOT_BETWEEN_07_AND_09": "Slot formula is discouraged when submersion is lower than 0.7 or greater than 0.9", "WARNING_SLOT_SUBMERSION_NOT_BETWEEN_07_AND_09": "Slot formula is discouraged when submersion is lower than 0.7 or greater than 0.9",
"WARNING_WEIR_SUBMERSION_LOWER_THAN_08": "Submerged weir formula is discouraged when submersion is lower than 08", "WARNING_WEIR_SUBMERSION_LOWER_THAN_08": "Submerged weir formula is discouraged when submersion is lower than 08",
"WARNING_WARNINGS_ABSTRACT": "%nb% warnings occurred during calculation",
"WARNING_ERRORS_ABSTRACT": "%nb% error occurred during calculation", "WARNING_ERRORS_ABSTRACT": "%nb% error occurred during calculation",
"WARNING_ERRORS_ABSTRACT_PLUR": "%nb% errors occurred during calculation", "WARNING_ERRORS_ABSTRACT_PLUR": "%nb% errors occurred during calculation",
"ERROR_BIEF_Z1_CALC_FAILED": "Unable to calculate upstream elevation (calculation interrupted before upstream)", "ERROR_BIEF_Z1_CALC_FAILED": "Unable to calculate upstream elevation (calculation interrupted before upstream)",
...@@ -553,7 +554,6 @@ ...@@ -553,7 +554,6 @@
"INFO_QUICKNAV_INPUT": "input", "INFO_QUICKNAV_INPUT": "input",
"INFO_QUICKNAV_RESULTS": "results", "INFO_QUICKNAV_RESULTS": "results",
"WARNING_PREBARRAGE_BASSIN_ZF_SUP_Z1": "Bottom elevation of basin #%n% is greater than upstream water elevation", "WARNING_PREBARRAGE_BASSIN_ZF_SUP_Z1": "Bottom elevation of basin #%n% is greater than upstream water elevation",
"WARNING_PROBLEMS_ENCOUNTERED": "Problems occurred during calculation (info: %info%, warning: %warning%, error: %error%)",
"INFO_REGIMEUNIFORME_DESCRIPTION": "open-channel flow normal depth", "INFO_REGIMEUNIFORME_DESCRIPTION": "open-channel flow normal depth",
"INFO_REGIMEUNIFORME_TITRE_COURT": "Uniform flow", "INFO_REGIMEUNIFORME_TITRE_COURT": "Uniform flow",
"INFO_REGIMEUNIFORME_TITRE": "Uniform flow calculation", "INFO_REGIMEUNIFORME_TITRE": "Uniform flow calculation",
...@@ -658,7 +658,6 @@ ...@@ -658,7 +658,6 @@
"INFO_ESPECE_TITRE": "Fish species characteristics", "INFO_ESPECE_TITRE": "Fish species characteristics",
"INFO_ESPECE_DESCRIPTION": "ichtyocompatible", "INFO_ESPECE_DESCRIPTION": "ichtyocompatible",
"INFO_ESPECE_TITRE_COURT": "Species", "INFO_ESPECE_TITRE_COURT": "Species",
"WARNING_WARNINGS_ABSTRACT": "%nb% warnings occurred during calculation",
"ERROR_JET_SUBMERGED_NO_SOLUTION": "There is no solution", "ERROR_JET_SUBMERGED_NO_SOLUTION": "There is no solution",
"WARNING_DEVER_ZDV_INF_ZR": "Apron elevation of structure #%number% is below river bed elevation", "WARNING_DEVER_ZDV_INF_ZR": "Apron elevation of structure #%number% is below river bed elevation",
"WARNING_JET_START_SUBMERGED": "Water elevation is greater than jet start elevation", "WARNING_JET_START_SUBMERGED": "Water elevation is greater than jet start elevation",
......
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
"WARNING_NOTCH_SUBMERSION_GREATER_THAN_07": "La formule de l'échancrure n'est pas conseillée pour un ennoiement supérieur à 0.7", "WARNING_NOTCH_SUBMERSION_GREATER_THAN_07": "La formule de l'échancrure n'est pas conseillée pour un ennoiement supérieur à 0.7",
"WARNING_SLOT_SUBMERSION_NOT_BETWEEN_07_AND_09": "La formule de la fente n'est pas conseillée pour un ennoiement inférieur à 0.7 et supérieur à 0.9", "WARNING_SLOT_SUBMERSION_NOT_BETWEEN_07_AND_09": "La formule de la fente n'est pas conseillée pour un ennoiement inférieur à 0.7 et supérieur à 0.9",
"WARNING_WEIR_SUBMERSION_LOWER_THAN_08": "La formule du seuil noyé n'est pas conseillé pour un ennoiement inférieur à 0.8", "WARNING_WEIR_SUBMERSION_LOWER_THAN_08": "La formule du seuil noyé n'est pas conseillé pour un ennoiement inférieur à 0.8",
"WARNING_WARNINGS_ABSTRACT": "%nb% avertissements rencontrés lors du calcul",
"WARNING_ERRORS_ABSTRACT": "%nb% erreur rencontrée lors du calcul", "WARNING_ERRORS_ABSTRACT": "%nb% erreur rencontrée lors du calcul",
"WARNING_ERRORS_ABSTRACT_PLUR": "%nb% erreurs rencontrées lors du calcul", "WARNING_ERRORS_ABSTRACT_PLUR": "%nb% erreurs rencontrées lors du calcul",
"ERROR_BIEF_Z1_CALC_FAILED": "Impossible de calculer la cote amont (calcul interrompu avant l'amont)", "ERROR_BIEF_Z1_CALC_FAILED": "Impossible de calculer la cote amont (calcul interrompu avant l'amont)",
...@@ -554,7 +555,6 @@ ...@@ -554,7 +555,6 @@
"INFO_QUICKNAV_INPUT": "données", "INFO_QUICKNAV_INPUT": "données",
"INFO_QUICKNAV_RESULTS": "résultats", "INFO_QUICKNAV_RESULTS": "résultats",
"WARNING_PREBARRAGE_BASSIN_ZF_SUP_Z1": "Cote de fond du bassin n°%n% supérieure à la cote de l'eau amont", "WARNING_PREBARRAGE_BASSIN_ZF_SUP_Z1": "Cote de fond du bassin n°%n% supérieure à la cote de l'eau amont",
"WARNING_PROBLEMS_ENCOUNTERED": "Des problèmes sont survenus durant le calcul (info : %info%, avertissement : %warning%, erreur : %error%)",
"INFO_REGIMEUNIFORME_DESCRIPTION": "hydraulique à surface libre hauteur normale", "INFO_REGIMEUNIFORME_DESCRIPTION": "hydraulique à surface libre hauteur normale",
"INFO_REGIMEUNIFORME_TITRE_COURT": "R. uniforme", "INFO_REGIMEUNIFORME_TITRE_COURT": "R. uniforme",
"INFO_REGIMEUNIFORME_TITRE": "Régime uniforme", "INFO_REGIMEUNIFORME_TITRE": "Régime uniforme",
...@@ -659,7 +659,6 @@ ...@@ -659,7 +659,6 @@
"INFO_ESPECE_TITRE": "Caractéristiques d'une espèce", "INFO_ESPECE_TITRE": "Caractéristiques d'une espèce",
"INFO_ESPECE_DESCRIPTION": "ichtyocompatible", "INFO_ESPECE_DESCRIPTION": "ichtyocompatible",
"INFO_ESPECE_TITRE_COURT": "Espèce", "INFO_ESPECE_TITRE_COURT": "Espèce",
"WARNING_WARNINGS_ABSTRACT": "%nb% avertissements rencontrés lors du calcul",
"ERROR_JET_SUBMERGED_NO_SOLUTION": "Il n'y a pas de solution", "ERROR_JET_SUBMERGED_NO_SOLUTION": "Il n'y a pas de solution",
"WARNING_DEVER_ZDV_INF_ZR": "La cote de radier de l'ouvrage n°%number% est sous la cote de fond du lit", "WARNING_DEVER_ZDV_INF_ZR": "La cote de radier de l'ouvrage n°%number% est sous la cote de fond du lit",
"WARNING_JET_START_SUBMERGED": "La cote de l'eau est supérieure à la cote de départ du jet", "WARNING_JET_START_SUBMERGED": "La cote de l'eau est supérieure à la cote de départ du jet",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment