Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Signage & Blade conditions translations + admin BladeCondition entry (#3847) #3903

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/changelog.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 4 additions & 3 deletions geotrek/signage/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -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)
14 changes: 13 additions & 1 deletion geotrek/signage/locale/de/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -62,6 +62,12 @@ msgstr ""
msgid "Code"
msgstr ""

msgid "Signage Condition"
msgstr ""

msgid "Signage Conditions"
msgstr ""

msgid "Manager"
msgstr ""

Expand Down Expand Up @@ -98,6 +104,12 @@ msgstr ""
msgid "Blade types"
msgstr ""

msgid "Blade Condition"
msgstr ""

msgid "Blade Conditions"
msgstr ""

msgid "Number"
msgstr ""

Expand Down
14 changes: 13 additions & 1 deletion geotrek/signage/locale/en/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -62,6 +62,12 @@ msgstr ""
msgid "Code"
msgstr ""

msgid "Signage Condition"
msgstr ""

msgid "Signage Conditions"
msgstr ""

msgid "Manager"
msgstr ""

Expand Down Expand Up @@ -98,6 +104,12 @@ msgstr ""
msgid "Blade types"
msgstr ""

msgid "Blade Condition"
msgstr ""

msgid "Blade Conditions"
msgstr ""

msgid "Number"
msgstr ""

Expand Down
14 changes: 13 additions & 1 deletion geotrek/signage/locale/es/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -62,6 +62,12 @@ msgstr ""
msgid "Code"
msgstr ""

msgid "Signage Condition"
msgstr ""

msgid "Signage Conditions"
msgstr ""

msgid "Manager"
msgstr ""

Expand Down Expand Up @@ -98,6 +104,12 @@ msgstr ""
msgid "Blade types"
msgstr ""

msgid "Blade Condition"
msgstr ""

msgid "Blade Conditions"
msgstr ""

msgid "Number"
msgstr ""

Expand Down
14 changes: 13 additions & 1 deletion geotrek/signage/locale/fr/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"

Expand Down Expand Up @@ -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"

Expand Down
14 changes: 13 additions & 1 deletion geotrek/signage/locale/it/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -62,6 +62,12 @@ msgstr ""
msgid "Code"
msgstr ""

msgid "Signage Condition"
msgstr ""

msgid "Signage Conditions"
msgstr ""

msgid "Manager"
msgstr ""

Expand Down Expand Up @@ -98,6 +104,12 @@ msgstr ""
msgid "Blade types"
msgstr ""

msgid "Blade Condition"
msgstr ""

msgid "Blade Conditions"
msgstr ""

msgid "Number"
msgstr ""

Expand Down
14 changes: 13 additions & 1 deletion geotrek/signage/locale/nl/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -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 <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
Expand Down Expand Up @@ -62,6 +62,12 @@ msgstr ""
msgid "Code"
msgstr ""

msgid "Signage Condition"
msgstr ""

msgid "Signage Conditions"
msgstr ""

msgid "Manager"
msgstr ""

Expand Down Expand Up @@ -98,6 +104,12 @@ msgstr ""
msgid "Blade types"
msgstr ""

msgid "Blade Condition"
msgstr ""

msgid "Blade Conditions"
msgstr ""

msgid "Number"
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions geotrek/signage/migrations/0036_auto_20231013_1326.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Loading