ryangjchandler / filament-navigation

Build structured navigation menus in Filament.
MIT License
168 stars 64 forks source link

addItemType breaks translations #58

Closed ldrshv closed 1 year ago

ldrshv commented 1 year ago

I found a strange bug. FilamentNavigation::addItemType breaks translations of buttons and placeholders on select. If you change Select to TextInput, everything is fine.

image image image

ryangjchandler commented 1 year ago

Thanks, I'll investigate this later today.

kaitwalla commented 1 year ago

Having this same issue; interestingly, it also breaks translations elsewhere (for example, on the RichEditor fields in completely separate areas of Filament). Any ideas/ETA on a fix?

I've been beating my head against this for the better part of several hours. Apologies because I'm just trying to get back into Laravel after a while away.

No matter how I change it, whenever the Facade gets called outside the plugin context, that's when translations break. Even calling the exact same code after packageBooted in FilamentNavigationServiceProvider lets everything work. It's only when called outside of that context that the Select field eats it, regardless of what options are used. All other fields I tested worked.

kaitwalla commented 1 year ago

Well, shows what I know. If you register the custom types in AppServiceProvider::boot they work fine.