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

Admin Form tabs i18n #328

Open
Adilkhanweb opened this issue Mar 23, 2024 · 5 comments
Open

Admin Form tabs i18n #328

Adilkhanweb opened this issue Mar 23, 2024 · 5 comments

Comments

@Adilkhanweb
Copy link

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
Copy link

vage-mel commented May 4, 2024

question is actual, can you fix?

@Adilkhanweb
Copy link
Author

Adilkhanweb commented May 4, 2024 via email

@vage-mel
Copy link

vage-mel commented May 4, 2024

problem maybe with use slugify in tabs

@vage-mel
Copy link

vage-mel commented May 4, 2024

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

@ZhangHang
Copy link

+1 same issue here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants