Skip to content

Commit

Permalink
Merge pull request #3903 from GeotrekCE/trad_signage_conditions
Browse files Browse the repository at this point in the history
馃悰 [FIX] Signage & Blade conditions translations + admin BladeCondition entry (#3847)
  • Loading branch information
juggler31 committed Feb 12, 2024
2 parents 373865c + a58a9dc commit b514749
Show file tree
Hide file tree
Showing 9 changed files with 88 additions and 11 deletions.
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 <LL@li.org>\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 <LL@li.org>\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 <LL@li.org>\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 <LL@li.org>\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 <LL@li.org>\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

0 comments on commit b514749

Please sign in to comment.