unfoldadmin / django-unfold

Modern Django admin theme for seamless interface development
https://unfoldadmin.com
MIT License
1.03k stars 96 forks source link

Admin Form tabs i18n #328

Open Adilkhanweb opened 1 month ago

Adilkhanweb commented 1 month ago

Admin Form Tabs not working correctly when using i18n for titles of the fieldsets

In my case I am using cyrillic.

from django.utils.translation import gettext_lazy as _
class Product(ModelAdmin):
    ...
    fieldsets = (
            (_("Main"), {
                "classes": ["tab"],
                'fields': [
                    ("name", "slug"),
                    ("category", "brand"),
                    ("price", "unit"),
                    ("default_variant", "discount"),
                    ("rating", "order",)
                ]
            }),
            (_("Description"), {
                "classes": ["tab"],
                "fields": ("description",)
            }),
        )

In result

<div class="tab-wrapper fieldset-" x-show="openTab == ''" style="display: none;">

Should be

<div class="tab-wrapper fieldset-description" x-show="openTab == 'description'" style="display: none;">

The titles should be slugified

vage-mel commented 1 week ago

question is actual, can you fix?

Adilkhanweb commented 1 week ago

Unfortunately, no. I will try to solve soon.

сб, 4 мая 2024 г., 19:31 vage-mel @.***>:

question is actual, can you fix?

— Reply to this email directly, view it on GitHub https://github.com/unfoldadmin/django-unfold/issues/328#issuecomment-2094222375, or unsubscribe https://github.com/notifications/unsubscribe-auth/AS3O22NGBNDXV5ZIQ5HWLUDZATWMPAVCNFSM6AAAAABFEPWPROVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAOJUGIZDEMZXGU . You are receiving this because you authored the thread.Message ID: @.***>

vage-mel commented 1 week ago

problem maybe with use slugify in tabs

vage-mel commented 1 week ago

@Adilkhanweb can union fields and stacked inline in one tab? how in django suit

ZhangHang commented 4 days ago

+1 same issue here