From 13d1dbc601e07a3fb736e16dc50905fb21fdd317 Mon Sep 17 00:00:00 2001 From: Jean-Romain Garnier Date: Sun, 9 Jan 2022 18:38:20 +0100 Subject: [PATCH] fix: Show unit in footprint edition field --- footprint/locale/fr/LC_MESSAGES/django.po | 15 +++++++++------ footprint/migrations/0001_initial.py | 4 ++-- footprint/preferences/models.py | 2 +- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/footprint/locale/fr/LC_MESSAGES/django.po b/footprint/locale/fr/LC_MESSAGES/django.po index ef428e49..f0584d5b 100644 --- a/footprint/locale/fr/LC_MESSAGES/django.po +++ b/footprint/locale/fr/LC_MESSAGES/django.po @@ -21,7 +21,7 @@ msgid "" msgstr "" "Project-Id-Version: 2.5\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2021-12-23 22:39+0100\n" +"POT-Creation-Date: 2022-01-09 18:35+0100\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Jean-Romain Garnier \n" "Language-Team: \n" @@ -32,9 +32,8 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n > 1);\n" #: footprint/preferences/models.py:38 -#: footprint/templates/footprint/preferences.html:44 -msgid "Estimated monthly infrastructure emissions" -msgstr "Estimation des émissions mensuelles de l'infrastructure" +msgid "Estimated monthly infrastructure emissions (in kgCO₂e/month)" +msgstr "Estimation des émissions mensuelles de l'infrastructure (en kgCO₂e/mois)" #: footprint/preferences/models.py:47 #: footprint/templates/footprint/preferences.html:55 @@ -86,11 +85,11 @@ msgstr "Estimation du volume de données mensuel" msgid "Compute" msgstr "Calculer" -#: footprint/templates/footprint/aff_profil.html:81 +#: footprint/templates/footprint/aff_profil.html:80 msgid "GiB/month" msgstr "GiO/mois" -#: footprint/templates/footprint/aff_profil.html:83 +#: footprint/templates/footprint/aff_profil.html:82 msgid "Unknown error" msgstr "Erreur inconnue" @@ -98,6 +97,10 @@ msgstr "Erreur inconnue" msgid "Edit" msgstr "Modifier" +#: footprint/templates/footprint/preferences.html:44 +msgid "Estimated monthly infrastructure emissions" +msgstr "Estimation des émissions mensuelles de l'infrastructure" + #: footprint/templates/footprint/preferences.html:47 msgid "Not specified" msgstr "Non spécifié" diff --git a/footprint/migrations/0001_initial.py b/footprint/migrations/0001_initial.py index aa18b2d8..afa69452 100644 --- a/footprint/migrations/0001_initial.py +++ b/footprint/migrations/0001_initial.py @@ -1,4 +1,4 @@ -# Generated by Django 2.2.18 on 2021-12-23 21:44 +# Generated by Django 2.2.18 on 2022-01-09 17:33 import django.core.validators from django.db import migrations, models @@ -17,7 +17,7 @@ class Migration(migrations.Migration): name='FootprintOption', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('monthly_infra_emissions', models.DecimalField(blank=True, decimal_places=2, default=None, max_digits=10, null=True, validators=[django.core.validators.MinValueValidator(0)], verbose_name='Estimated monthly infrastructure emissions')), + ('monthly_infra_emissions', models.DecimalField(blank=True, decimal_places=2, default=None, max_digits=10, null=True, validators=[django.core.validators.MinValueValidator(0)], verbose_name='Estimated monthly infrastructure emissions (in kgCO₂e/month)')), ('data_usage_script_path', models.CharField(default='footprint/scripts/default_data_usage_estimator.py', max_length=4096, verbose_name='User monthly data usage estimation script')), ('data_usage_script_timeout', models.DecimalField(decimal_places=2, default=10, max_digits=4, verbose_name='Estimation script timeout (in seconds)')), ], diff --git a/footprint/preferences/models.py b/footprint/preferences/models.py index 75858dd3..38348b74 100644 --- a/footprint/preferences/models.py +++ b/footprint/preferences/models.py @@ -35,7 +35,7 @@ class FootprintOption(AclMixin, PreferencesModel): # https://www.ademe.fr/expertises/consommer-autrement/passer-a-laction/reconnaitre-produit-plus-respectueux-lenvironnement/dossier/laffichage-environnemental/affichage-environnemental-secteur-numerique monthly_infra_emissions = models.DecimalField( - verbose_name=_("Estimated monthly infrastructure emissions"), + verbose_name=_("Estimated monthly infrastructure emissions (in kgCO₂e/month)"), max_digits=10, decimal_places=2, null=True,