Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Remove risky and useless sprintf() calls #8381
referenced this pull request
Oct 2, 2017
Reviewed 35 of 36 files at r1, 1 of 1 files at r2.
classes/checkout/DeliveryOptionsFinder.php, line 100 at r2 (raw file):
So please split the arguments list so that there's only one argument per line.
It looks like the replacements for
Comments from Reviewable
Sorry @Nobodaddy, but it seems we do not have the same humor.
Just made a quick test, just for you:
dump(sprintf($translator->trans('(Total tax: %s)', array(), 'Admin.International.Help'), '9%')); dump($translator->trans('(Total tax: 9%)', array(), 'Admin.International.Help'));
As we deal with hints and example, The number isn't really important. You may have missed this, but the previous example got its value hardcoded anyway. :)
No offense, @Quetzacoalt91
The job of this PR is to remove the calls to the function
If something is unclear to you, you may be right, but note this is not coming from that PR. That line was added in PS 188.8.131.52 b776d6c#diff-21c9ebbacec5a9ec2ffa89f9c5370019R308 which is 6 years old.
I could have left a variable in this string if there are other occurrences of it, but nothing. There's no need to use a placeholder if this is the only place we use that translated string.