8
0
Fork 0
mirror of https://gitlab.federez.net/re2o/re2o synced 2024-05-17 08:06:21 +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 ""
"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 <git@jean-romain.com>\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é"

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
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)')),
],

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
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,