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

[2.x] Allow Role's $name and $description to be translated #798

Merged
merged 1 commit into from
Jun 1, 2021

Conversation

crynobone
Copy link
Member

I'm not sure whether this should be considered as a breaking change. But this will avoid loading translation early in the request lifecycle and instead only require it to be translated when returning a response.

@driesvints
Copy link
Member

Bit torn. I see what you're trying to do but it doesn't feels right to instantiate the app in a value object.

@driesvints driesvints changed the title Allow Role's $name and $description to be translated [2.x] Allow Role's $name and $description to be translated Jun 1, 2021
@taylorotwell
Copy link
Member

This could potentially lead to weird situations where the user is able to name roles but it happens to match a translated string in the language files, etc. I think best to just let the user override the method if they want.

@taylorotwell taylorotwell reopened this Jun 1, 2021
@taylorotwell
Copy link
Member

Hmm, on second thought this change could be necesary.

@taylorotwell taylorotwell merged commit 827b2da into laravel:2.x Jun 1, 2021
@crynobone crynobone deleted the patch-1 branch July 22, 2021 10:31
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