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

[5.2] Fix trans capitalization when replacement is numerical array #14249

Merged
merged 3 commits into from
Jul 8, 2016

Conversation

microtony
Copy link
Contributor

Related issue: #11337

Reorders the 3 search terms from [':ATTRIBUTE', ':Attribute', ':attribute'] to [':attribute', ':ATTRIBUTE', ':Attribute'], so that replacements indexed numerically (undocumented) would not get capitalized.

This change should not affect normal use (associative array). A test has been added to test the original behavior.

Translation string: 'Hello, :0!'
Replacement array: ['World']
Now gives 'Hello, World!' instead of Hello, WORLD!

Reorders the 3 search terms from [':ATTRIBUTE', ':Attribute', ':attribute'] to [':attribute', ':ATTRIBUTE', ':Attribute'], so that replacements indexed numerically (undocumented) would not get capitalized.

Translation string: 'Hello, :0!'
Replacement array: ['World']
Expected: 'Hello, World!'
Reorders the 3 search terms from `[':ATTRIBUTE', ':Attribute', ':attribute']` to `[':attribute', ':ATTRIBUTE', ':Attribute']`, so that replacements indexed numerically (undocumented) would not get capitalized.
@GrahamCampbell GrahamCampbell changed the title Fix trans capitalization when replacement is numerical array [5.2] Fix trans capitalization when replacement is numerical array Jul 7, 2016
@taylorotwell taylorotwell merged commit def547d into laravel:5.2 Jul 8, 2016
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