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

[9.x] Fixes unable to use trans()->has() on JSON language files #47582

Merged
merged 5 commits into from
Jun 27, 2023

Conversation

crynobone
Copy link
Member

Using trans()->has() on JSON file is not 100% reliable when the $key and $replacement is the same value.

e.g:

{
    "30 Days": "30 Days"
}
// Before
trans()->has('30 Days') // return false

// After
trans()->has('30 Days') // return true

Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
@crynobone crynobone changed the title [9.x] Fixes unable to use tran()->has() on JSON language files. [9.x] Fixes unable to use trans()->has() on JSON language files. Jun 27, 2023
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
Signed-off-by: Mior Muhammad Zaki <crynobone@gmail.com>
@taylorotwell taylorotwell merged commit a6ed3e6 into laravel:9.x Jun 27, 2023
20 checks passed
@GrahamCampbell GrahamCampbell changed the title [9.x] Fixes unable to use trans()->has() on JSON language files. [9.x] Fixes unable to use trans()->has() on JSON language files Jun 27, 2023
@crynobone crynobone deleted the patch-has-json-lang-string-9 branch September 20, 2023 00:37
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.

None yet

2 participants