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

v1.36 update made wrong laravel/nova locale. #136

Closed
bolechen opened this issue Mar 25, 2020 · 3 comments
Closed

v1.36 update made wrong laravel/nova locale. #136

bolechen opened this issue Mar 25, 2020 · 3 comments

Comments

@bolechen
Copy link

Sorry, it's be inconceivable bug I can't understand why.

I'm laravel/nova user, today i update laravel-enum from v1.3.5 -> 1.3.6, when i visit nova admin url, the locale translate string is all gone.

image

I try downgrade this package use

composer require bensampo/laravel-enum:1.35

and it resume normal.

image

The nova locale doc link: https://nova.laravel.com/docs/3.0/customization/localization.html#overview

@BenSampo
Copy link
Owner

BenSampo commented Apr 3, 2020

Did you get to the bottom of this?

Some translations for validation rules were added between 1.35 and 1.36, but it shouldn't interfere with other packages.

v1.35...v1.36

@bolechen
Copy link
Author

Did you get to the bottom of this?

Some translations for validation rules were added between 1.35 and 1.36, but it shouldn't interfere with other packages.

v1.35...v1.36

I change the bootValidators method, and the issue is gone. see the PR for detail.

@cweiske
Copy link

cweiske commented Nov 10, 2023

This is the same issue as msurguy/Honeypot#64 - see there for a truckload of other linked issues.

BenSampo\Enum\EnumServiceProvider is booted very early, and already uses the translator.
Laravel\Nova\NovaServiceProvider is booted later and adds additional configuration to the translator.
Unfortunately, the translator has already loaded its configuration because of EnumServiceProvider, and thus ignores the "new" configuration provided by Nova.

When EnumServiceProvider does not use the translator, everything is fine.

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

Successfully merging a pull request may close this issue.

3 participants