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

Json file translations #38

Merged
merged 4 commits into from
Aug 16, 2023

Conversation

warhuhn
Copy link

@warhuhn warhuhn commented Aug 15, 2023

I've added support for loading .json Translation files from the Application's lang dir.

Because the Laravel documentation describes some special cases to avoid, e.g. if a .json Files' translation key collides with a translation namespace, i've tried to replicate that behavior as best as possible, with the Principle of Least Surprise.

If Laravel has weird behavior, we should replicate that weird behavior.

Unit tests are also updated to clear the view cache before each run, as the tests sometimes wouldn't recognize my changes.

@warhuhn
Copy link
Author

warhuhn commented Aug 15, 2023

This should fix #29.

@iamgergo
Copy link
Member

Thanks a lot! Soon I will make a release!

@iamgergo iamgergo merged commit d17d544 into conedevelopment:master Aug 16, 2023
@warhuhn warhuhn deleted the json-file-translations branch August 19, 2023 18:32
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 this pull request may close these issues.

3 participants