diff --git a/src/app/components/dialog-edit-param-values/dialog-edit-param-values.component.html b/src/app/components/dialog-edit-param-values/dialog-edit-param-values.component.html index 61ae3b59b26228ab9f65690ea52dea034bfc38ae..71744a105a2ad80dcdfd637e7f05b0abfc69eca2 100644 --- a/src/app/components/dialog-edit-param-values/dialog-edit-param-values.component.html +++ b/src/app/components/dialog-edit-param-values/dialog-edit-param-values.component.html @@ -1,4 +1,4 @@ -<h1 mat-dialog-title [innerHTML]="uitextEditParamComputedInitialValue"></h1> +<h1 mat-dialog-title [innerHTML]="uitextEditParamVariableValues"></h1> <div mat-dialog-content> diff --git a/src/app/components/dialog-edit-param-values/dialog-edit-param-values.component.ts b/src/app/components/dialog-edit-param-values/dialog-edit-param-values.component.ts index 76b32a8771b409e823883c93cb96d5b0318dff7d..e0e482b4cd86606e1828b51dce96ef7b5a4b9b4b 100644 --- a/src/app/components/dialog-edit-param-values/dialog-edit-param-values.component.ts +++ b/src/app/components/dialog-edit-param-values/dialog-edit-param-values.component.ts @@ -4,6 +4,7 @@ import { FormBuilder, FormGroup, Validators } from "@angular/forms"; import { I18nService } from "../../services/internationalisation/internationalisation.service"; import { NgParameter } from "../../formulaire/ngparam"; import { ParamValueMode } from "jalhyd"; +import { sprintf } from 'sprintf-js'; @Component({ selector: "dialog-edit-param-values", @@ -50,20 +51,20 @@ export class DialogEditParamValuesComponent implements OnInit { this.valueModes = [ { value: ParamValueMode.MINMAX, - label: "Min/max" + label: this.intlService.localizeText("INFO_PARAMMODE_MINMAX") }, { value: ParamValueMode.LISTE, - label: "Liste (à traduire)" + label: this.intlService.localizeText("INFO_PARAMMODE_LIST") } ]; this.decimalSeparators = [ { - label: "Point (à traduire)", + label: this.intlService.localizeText("INFO_PARAMFIELD_PARAMVARIER_SEPARATEUR_POINT"), value: "." }, { - label: "Virgule (à traduire)", + label: this.intlService.localizeText("INFO_PARAMFIELD_PARAMVARIER_SEPARATEUR_VIRGULE"), value: "," } ]; @@ -93,7 +94,7 @@ export class DialogEditParamValuesComponent implements OnInit { } public get uiTextModeSelection() { - return "Mode de variabilité (à traduire)"; + return this.intlService.localizeText("INFO_PARAMFIELD_PARAMVARIER_MODE"); } public get uitextValeurMini() { @@ -112,25 +113,24 @@ export class DialogEditParamValuesComponent implements OnInit { return this.intlService.localizeText("INFO_OPTION_CLOSE"); } - public get uitextEditParamComputedInitialValue() { - return "Modifier les valeurs variables (à traduire)"; - // return this.intlService.localizeText("INFO_OPTION_ALL"); + public get uitextEditParamVariableValues() { + return this.intlService.localizeText("INFO_PARAMFIELD_PARAMVARIER_TITLE"); } public get uitextListeValeurs() { - return "valeurs séparées par ';' (à traduire)"; + return this.intlService.localizeText("INFO_PARAMFIELD_PARAMVARIER_VALUES_FORMAT"); } public get uitextMustBeListOfNumbers() { - return "les valeurs doivent être de la forme 3;4.5;6 (à traduire)"; + return sprintf(this.intlService.localizeText("INFO_PARAMFIELD_PARAMVARIER_VALUES_FORMAT_ERROR"), this.separatorPattern); } public get uitextDecimalSeparator() { - return "Séparateur décimal (à traduire)"; + return this.intlService.localizeText("INFO_PARAMFIELD_PARAMVARIER_SEPARATEUR_DECIMAL"); } public get uitextImportFile() { - return "Importer un fichier (à traduire)"; + return this.intlService.localizeText("INFO_PARAMFIELD_PARAMVARIER_IMPORT_FICHIER"); } public get isMinMax() { diff --git a/src/locale/messages.en.json b/src/locale/messages.en.json index 59bfeb1866f5792d4bf0db3fc5f15d9beffbe8ac..00d565c1f017e2f3f686857c8a8cd86bfd1f73f7 100644 --- a/src/locale/messages.en.json +++ b/src/locale/messages.en.json @@ -146,9 +146,16 @@ "INFO_PARAMFIELD_PARAMLIE_LABEL": "Linked parameter", "INFO_PARAMFIELD_PARAMVARIER": "Vary", "INFO_PARAMFIELD_PASVARIATION": "With a variation step of", - "INFO_PARAMFIELD_PARAMVARIER_MINMAXSTEP": "Min: %s, max: %s, step: %s", + "INFO_PARAMFIELD_PARAMVARIER_IMPORT_FICHIER": "Import file", + "INFO_PARAMFIELD_PARAMVARIER_MINMAXSTEP": "min: %s, max: %s, step: %s", + "INFO_PARAMFIELD_PARAMVARIER_SEPARATEUR_DECIMAL": "Decimal separator", + "INFO_PARAMFIELD_PARAMVARIER_SEPARATEUR_POINT": ". (dot)", + "INFO_PARAMFIELD_PARAMVARIER_SEPARATEUR_VIRGULE": ", (comma)", + "INFO_PARAMFIELD_PARAMVARIER_TITLE": "Multiple values", + "INFO_PARAMFIELD_PARAMVARIER_MODE": "Mode", "INFO_PARAMFIELD_PARAMVARIER_VALUES": "Values:", "INFO_PARAMFIELD_PARAMVARIER_VALUES_FORMAT": "Values list", + "INFO_PARAMFIELD_PARAMVARIER_VALUES_FORMAT_ERROR": "Incorrect format; accepted separator: %s", "INFO_PARAMFIELD_VALEURMAXI": "To maximum value", "INFO_PARAMFIELD_VALEURMINI": "From minimum value", "INFO_PARAMMODE_MINMAX": "Min/max", @@ -180,7 +187,7 @@ "INFO_THEME_PASSE_A_BASSIN_DESCRIPTION": "Tools for sizing a fish pass made with pools also called fish steps", "INFO_THEME_PASSE_NATURELLE_TITRE": "Natural pass", "INFO_THEME_PASSE_NATURELLE_DESCRIPTION": "Tools for sizing a natural fish pass also called macroroughness pass or rock-ramp fish pass", - "INFO_THEME_HYDRAULIQUE_A_SURFACE_LIBRE_TITRE": "Hydraulics with free surfaces", + "INFO_THEME_HYDRAULIQUE_A_SURFACE_LIBRE_TITRE": "Open-channel flow", "INFO_THEME_HYDRAULIQUE_A_SURFACE_LIBRE_DESCRIPTION": "Calculation modules for flows in channels and rivers", "INFO_THEME_HYDRAULIQUE_EN_CHARGE_TITRE": "Pipe flow", "INFO_THEME_HYDRAULIQUE_EN_CHARGE_DESCRIPTION": "Modules for calculating head losses in pressure pipes", diff --git a/src/locale/messages.fr.json b/src/locale/messages.fr.json index dd76ea2dd806b54a694188a2b08c6ca927cd15fb..1d781e399f10b75bf73a6f5410ce153011ee0b7f 100644 --- a/src/locale/messages.fr.json +++ b/src/locale/messages.fr.json @@ -146,9 +146,16 @@ "INFO_PARAMFIELD_PARAMLIE_LABEL": "Paramètre lié", "INFO_PARAMFIELD_PARAMVARIER": "varier", "INFO_PARAMFIELD_PASVARIATION": "Avec un pas de", - "INFO_PARAMFIELD_PARAMVARIER_MINMAXSTEP": "Min: %s, max: %s, pas: %s", + "INFO_PARAMFIELD_PARAMVARIER_IMPORT_FICHIER": "Importer un fichier", + "INFO_PARAMFIELD_PARAMVARIER_MINMAXSTEP": "min : %s, max : %s, pas : %s", + "INFO_PARAMFIELD_PARAMVARIER_SEPARATEUR_DECIMAL": "Séparateur décimal", + "INFO_PARAMFIELD_PARAMVARIER_SEPARATEUR_POINT": ". (point)", + "INFO_PARAMFIELD_PARAMVARIER_SEPARATEUR_VIRGULE": ", (virgule)", + "INFO_PARAMFIELD_PARAMVARIER_TITLE": "Valeurs multiples", + "INFO_PARAMFIELD_PARAMVARIER_MODE": "Mode", "INFO_PARAMFIELD_PARAMVARIER_VALUES": "Valeurs:", "INFO_PARAMFIELD_PARAMVARIER_VALUES_FORMAT": "Liste de valeurs", + "INFO_PARAMFIELD_PARAMVARIER_VALUES_FORMAT_ERROR": "Format incorrect; séparateurs acceptés: %s", "INFO_PARAMFIELD_VALEURMAXI": "À la valeur maximum", "INFO_PARAMFIELD_VALEURMINI": "De la valeur minimum", "INFO_PARAMMODE_MINMAX": "Min/max", @@ -180,7 +187,7 @@ "INFO_THEME_PASSE_A_BASSIN_DESCRIPTION": "Outils de dimensionnement d'une passe à poissons de type passe à bassin ou encore appelée échelle à poisson", "INFO_THEME_PASSE_NATURELLE_TITRE": "Passe naturelle", "INFO_THEME_PASSE_NATURELLE_DESCRIPTION": "Outils de dimensionnement d'une passe à poissons de type passe naturelle ou encore appelée passe à macro-rugosités", - "INFO_THEME_HYDRAULIQUE_A_SURFACE_LIBRE_TITRE": "Hydraulique à surfaces libres", + "INFO_THEME_HYDRAULIQUE_A_SURFACE_LIBRE_TITRE": "Hydraulique à surface libre", "INFO_THEME_HYDRAULIQUE_A_SURFACE_LIBRE_DESCRIPTION": "Modules de calcul pour les écoulements en canaux et rivières", "INFO_THEME_HYDRAULIQUE_EN_CHARGE_TITRE": "Hydraulique en charge", "INFO_THEME_HYDRAULIQUE_EN_CHARGE_DESCRIPTION": "Modules de calcul de perte de charge dans les conduites sous pression", diff --git a/src/styles.scss b/src/styles.scss index c7f1c492cd38e5457a1c5bf66b4dcb18884d8f8d..ba26e2343c506c6dd4345cbec8fea57215a4fb1e 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -15,6 +15,8 @@ button { } mat-dialog-container { + min-width: 280px; + .mat-dialog-actions { margin-bottom: -5px; }