eminiarts / nova-tabs

Laravel Nova Tabs Package

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tabs won't show if tab name is in Chinese

xuchunyang opened this issue · comments

e.g.,

        return [
            Tabs::make('Some Title', [
                Tab::make('基本信息', [
                    Text::make('Title'),
                ]),
                Tab::make('其他信息', [
                    Textarea::make('Content'),
                ]),
            ])
        ];

there is the result

CleanShot 2023-02-15 at 20 50 57@2x

note that tabs are missing. If I change the Chinese into English, it works fine.

commented

This is a known issue. Slugs are generated by putting the name through Str::slug(), which strips out Chinese characters (among others, including Japanese, Korean and more).

I proposed a change to allow this to happen, but haven't had the time to implement it. See #249 for that.

Until then you're best off calling calling the name method on each tab and supplying a name using ASCII characters.