diff --git a/docs/changelog.rst b/docs/changelog.rst index 3a6b820008..2a6ea9a515 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -5,6 +5,10 @@ CHANGELOG 2.101.5+dev (XXXX-XX-XX) ------------------------ +**Bug fixes** + +- Signage & Blade conditions translations + admin BladeCondition entry (#3847) + **Documentation** - Improve performance in spatial intersection (zoning district and zoning city) for sql views (#3600) diff --git a/geotrek/signage/admin.py b/geotrek/signage/admin.py index aa0d1cbe40..eeefaa97f0 100644 --- a/geotrek/signage/admin.py +++ b/geotrek/signage/admin.py @@ -2,7 +2,7 @@ from django.db.models import Q from geotrek.common.mixins.actions import MergeActionMixin -from geotrek.signage.models import LinePictogram, SignageType, Color, Sealing, Direction, BladeType, SignageCondition +from geotrek.signage.models import LinePictogram, SignageType, Color, Sealing, Direction, BladeType, SignageCondition, BladeCondition class ColorBladeAdmin(MergeActionMixin, admin.ModelAdmin): @@ -129,7 +129,7 @@ def get_list_filter(self, request): return ('structure', ) -class SignageConditionAdmin(MergeActionMixin, admin.ModelAdmin): +class ModelConditionAdmin(MergeActionMixin, admin.ModelAdmin): search_fields = ('label', 'structure__name') merge_field = "label" @@ -171,4 +171,5 @@ def get_list_filter(self, request): admin.site.register(Direction, DirectionBladeAdmin) admin.site.register(BladeType, BladeTypeAdmin) admin.site.register(LinePictogram, LinePictogramAdmin) -admin.site.register(SignageCondition, SignageConditionAdmin) +admin.site.register(SignageCondition, ModelConditionAdmin) +admin.site.register(BladeCondition, ModelConditionAdmin) diff --git a/geotrek/signage/locale/de/LC_MESSAGES/django.po b/geotrek/signage/locale/de/LC_MESSAGES/django.po index d7d205f621..52f08c542e 100644 --- a/geotrek/signage/locale/de/LC_MESSAGES/django.po +++ b/geotrek/signage/locale/de/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-22 13:07+0000\n" +"POT-Creation-Date: 2024-01-23 14:44+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -62,6 +62,12 @@ msgstr "" msgid "Code" msgstr "" +msgid "Signage Condition" +msgstr "" + +msgid "Signage Conditions" +msgstr "" + msgid "Manager" msgstr "" @@ -98,6 +104,12 @@ msgstr "" msgid "Blade types" msgstr "" +msgid "Blade Condition" +msgstr "" + +msgid "Blade Conditions" +msgstr "" + msgid "Number" msgstr "" diff --git a/geotrek/signage/locale/en/LC_MESSAGES/django.po b/geotrek/signage/locale/en/LC_MESSAGES/django.po index d7d205f621..52f08c542e 100644 --- a/geotrek/signage/locale/en/LC_MESSAGES/django.po +++ b/geotrek/signage/locale/en/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-22 13:07+0000\n" +"POT-Creation-Date: 2024-01-23 14:44+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -62,6 +62,12 @@ msgstr "" msgid "Code" msgstr "" +msgid "Signage Condition" +msgstr "" + +msgid "Signage Conditions" +msgstr "" + msgid "Manager" msgstr "" @@ -98,6 +104,12 @@ msgstr "" msgid "Blade types" msgstr "" +msgid "Blade Condition" +msgstr "" + +msgid "Blade Conditions" +msgstr "" + msgid "Number" msgstr "" diff --git a/geotrek/signage/locale/es/LC_MESSAGES/django.po b/geotrek/signage/locale/es/LC_MESSAGES/django.po index d7d205f621..52f08c542e 100644 --- a/geotrek/signage/locale/es/LC_MESSAGES/django.po +++ b/geotrek/signage/locale/es/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-22 13:07+0000\n" +"POT-Creation-Date: 2024-01-23 14:44+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -62,6 +62,12 @@ msgstr "" msgid "Code" msgstr "" +msgid "Signage Condition" +msgstr "" + +msgid "Signage Conditions" +msgstr "" + msgid "Manager" msgstr "" @@ -98,6 +104,12 @@ msgstr "" msgid "Blade types" msgstr "" +msgid "Blade Condition" +msgstr "" + +msgid "Blade Conditions" +msgstr "" + msgid "Number" msgstr "" diff --git a/geotrek/signage/locale/fr/LC_MESSAGES/django.po b/geotrek/signage/locale/fr/LC_MESSAGES/django.po index b3eff79135..f6968f0ef5 100644 --- a/geotrek/signage/locale/fr/LC_MESSAGES/django.po +++ b/geotrek/signage/locale/fr/LC_MESSAGES/django.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-22 13:07+0000\n" +"POT-Creation-Date: 2024-01-23 14:44+0000\n" "PO-Revision-Date: 2015-09-25 17:37+0100\n" "Last-Translator: \n" "Language-Team: \n" @@ -62,6 +62,12 @@ msgstr "Types de signalétique" msgid "Code" msgstr "Code" +msgid "Signage Condition" +msgstr "État de signalétique" + +msgid "Signage Conditions" +msgstr "États de signalétique" + msgid "Manager" msgstr "Gestionnaire" @@ -98,6 +104,12 @@ msgstr "Type de lame" msgid "Blade types" msgstr "Types de lame" +msgid "Blade Condition" +msgstr "État de lame" + +msgid "Blade Conditions" +msgstr "États de lame" + msgid "Number" msgstr "Numéro" diff --git a/geotrek/signage/locale/it/LC_MESSAGES/django.po b/geotrek/signage/locale/it/LC_MESSAGES/django.po index d7d205f621..52f08c542e 100644 --- a/geotrek/signage/locale/it/LC_MESSAGES/django.po +++ b/geotrek/signage/locale/it/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-22 13:07+0000\n" +"POT-Creation-Date: 2024-01-23 14:44+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -62,6 +62,12 @@ msgstr "" msgid "Code" msgstr "" +msgid "Signage Condition" +msgstr "" + +msgid "Signage Conditions" +msgstr "" + msgid "Manager" msgstr "" @@ -98,6 +104,12 @@ msgstr "" msgid "Blade types" msgstr "" +msgid "Blade Condition" +msgstr "" + +msgid "Blade Conditions" +msgstr "" + msgid "Number" msgstr "" diff --git a/geotrek/signage/locale/nl/LC_MESSAGES/django.po b/geotrek/signage/locale/nl/LC_MESSAGES/django.po index d7d205f621..52f08c542e 100644 --- a/geotrek/signage/locale/nl/LC_MESSAGES/django.po +++ b/geotrek/signage/locale/nl/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-06-22 13:07+0000\n" +"POT-Creation-Date: 2024-01-23 14:44+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -62,6 +62,12 @@ msgstr "" msgid "Code" msgstr "" +msgid "Signage Condition" +msgstr "" + +msgid "Signage Conditions" +msgstr "" + msgid "Manager" msgstr "" @@ -98,6 +104,12 @@ msgstr "" msgid "Blade types" msgstr "" +msgid "Blade Condition" +msgstr "" + +msgid "Blade Conditions" +msgstr "" + msgid "Number" msgstr "" diff --git a/geotrek/signage/migrations/0036_auto_20231013_1326.py b/geotrek/signage/migrations/0036_auto_20231013_1326.py index b283a1ea87..b4f3a0ce32 100644 --- a/geotrek/signage/migrations/0036_auto_20231013_1326.py +++ b/geotrek/signage/migrations/0036_auto_20231013_1326.py @@ -16,8 +16,8 @@ def copy_infrastructure_conditions(apps, schema_editor): # Copy InfrastructureCondition to SignageCondition and BladeCondition for condition in InfrastructureCondition.objects.all(): - SignageCondition.objects.get_or_create(label=condition.label) - BladeCondition.objects.get_or_create(label=condition.label) + SignageCondition.objects.get_or_create(label=condition.label, structure=condition.structure) + BladeCondition.objects.get_or_create(label=condition.label, structure=condition.structure) # Associate signage condition to signage condition_tmp for signage in Signage.objects.exclude(condition__isnull=True):