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

Allow phrases to contain more than nine numeric placeholders #1375

Merged
merged 3 commits into from
Jul 17, 2015
Merged

Allow phrases to contain more than nine numeric placeholders #1375

merged 3 commits into from
Jul 17, 2015

Conversation

joshdifabio
Copy link
Contributor

Fixes #1374

@kandy
Copy link
Contributor

kandy commented Jun 16, 2015

better to use strtr instead of str_replaceto resolve issue http://3v4l.org/LKT3k

@vpelipenko vpelipenko added the PS label Jun 17, 2015
@joshdifabio
Copy link
Contributor Author

better to use strtr instead of str_replaceto resolve issue http://3v4l.org/LKT3k

Good call :). Updated the PR.

}

return $text;
}

private function keyToPlaceholder($key)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just make it a closure?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did that initially, but the anonymous function didn't inherit any variables from its parent scope (no use directive) so it seemed like a needless performance overhead to instantiate a Closure every time render() is called.

@magento-team magento-team merged commit 32a856f into magento:develop Jul 17, 2015
@joshdifabio joshdifabio deleted the feature/fix-github-1374 branch July 24, 2015 23:50
magento-team pushed a commit that referenced this pull request Aug 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants