8
0
Fork 0
mirror of https://gitlab2.federez.net/re2o/re2o synced 2024-12-22 23:13:46 +00:00

fix: Show unit in footprint edition field

This commit is contained in:
Jean-Romain Garnier 2022-01-09 18:38:20 +01:00 committed by jr-garnier
parent 59d18bc2d7
commit 13d1dbc601
3 changed files with 12 additions and 9 deletions

View file

@ -21,7 +21,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 2.5\n" "Project-Id-Version: 2.5\n"
"Report-Msgid-Bugs-To: \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" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Jean-Romain Garnier <git@jean-romain.com>\n" "Last-Translator: Jean-Romain Garnier <git@jean-romain.com>\n"
"Language-Team: \n" "Language-Team: \n"
@ -32,9 +32,8 @@ msgstr ""
"Plural-Forms: nplurals=2; plural=(n > 1);\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: footprint/preferences/models.py:38 #: footprint/preferences/models.py:38
#: footprint/templates/footprint/preferences.html:44 msgid "Estimated monthly infrastructure emissions (in kgCO₂e/month)"
msgid "Estimated monthly infrastructure emissions" msgstr "Estimation des émissions mensuelles de l'infrastructure (en kgCO₂e/mois)"
msgstr "Estimation des émissions mensuelles de l'infrastructure"
#: footprint/preferences/models.py:47 #: footprint/preferences/models.py:47
#: footprint/templates/footprint/preferences.html:55 #: footprint/templates/footprint/preferences.html:55
@ -86,11 +85,11 @@ msgstr "Estimation du volume de données mensuel"
msgid "Compute" msgid "Compute"
msgstr "Calculer" msgstr "Calculer"
#: footprint/templates/footprint/aff_profil.html:81 #: footprint/templates/footprint/aff_profil.html:80
msgid "GiB/month" msgid "GiB/month"
msgstr "GiO/mois" msgstr "GiO/mois"
#: footprint/templates/footprint/aff_profil.html:83 #: footprint/templates/footprint/aff_profil.html:82
msgid "Unknown error" msgid "Unknown error"
msgstr "Erreur inconnue" msgstr "Erreur inconnue"
@ -98,6 +97,10 @@ msgstr "Erreur inconnue"
msgid "Edit" msgid "Edit"
msgstr "Modifier" 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 #: footprint/templates/footprint/preferences.html:47
msgid "Not specified" msgid "Not specified"
msgstr "Non spécifié" msgstr "Non spécifié"

View file

@ -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 import django.core.validators
from django.db import migrations, models from django.db import migrations, models
@ -17,7 +17,7 @@ class Migration(migrations.Migration):
name='FootprintOption', name='FootprintOption',
fields=[ fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('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_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)')), ('data_usage_script_timeout', models.DecimalField(decimal_places=2, default=10, max_digits=4, verbose_name='Estimation script timeout (in seconds)')),
], ],

View file

@ -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 # 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( monthly_infra_emissions = models.DecimalField(
verbose_name=_("Estimated monthly infrastructure emissions"), verbose_name=_("Estimated monthly infrastructure emissions (in kgCO₂e/month)"),
max_digits=10, max_digits=10,
decimal_places=2, decimal_places=2,
null=True, null=True,