-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
Fix dev/core issue-5155: Contribution page help text does not match f… #30000
Conversation
🤖 Thank you for contributing to CiviCRM! ❤️ We will need to test and review this PR. 👷 Introduction for new contributors...
Quick links for reviewers...
|
I'm not sure what the best solution is but e.g. for paypal it does say "Continue", e.g.: https://github.com/civicrm/civicrm-core/blob/master/CRM/Core/Payment.php#L604 |
I tested this fix and it works for me! Thank you!!!! |
Code change seems reasonable too |
@demeritcowboy "click Continue/Make Payment" ? |
This could become a long conversation. What's funny is right before it assigns the text it knows the button text already: civicrm-core/CRM/Contribute/Form/Contribution/Confirm.php Lines 567 to 574 in 799d421
%1 isn't as good for translation.
Hmm. I probably shouldn't have said anything... but if it's going to break already translated strings then we should think a little bit. |
Irrelevant to the issue, but just noting the PR number - that's a lot of PR's! |
yes, I think so too. Thing is, I can't close this PR; 2013 looks so shameful in that list with its red icon... 😆 But then again I don't have the energy for one of those long conversations ↑ ... Marked this draft for now. Will close in a bit if we don't come up with a sensible solution. |
@@ -589,7 +589,7 @@ public function getText($context, $params) { | |||
return ''; | |||
|
|||
case 'contributionPageContinueText': | |||
return ts('Click the <strong>Continue</strong> button to proceed with the payment.'); | |||
return ts('Click the <strong>Make Contribution</strong> button to proceed with the payment.'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about doing the same if
block as in the button text? It duplicates some logic, but they are called right after each other, from the same place, and the params are the same.
if ($params['amount'] <= 0.0 || (int) $this->_paymentProcessor['billing_mode'] === 4) {
return ts('Click the <strong>Continue</strong> button to proceed with the payment.');
}
if ($params['is_payment_to_existing']) {
return ts('Click the <strong>Make Payment</strong> button to proceed with the payment.');
}
return ts('Click the <strong>Make Contribution</strong> button to proceed with the payment.');
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Preach! sounds like idea. I've done that. @alifrumin would you mind testing this again with the latest changes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(aside: oh look, we also use the %1 solution in a really weird way at https://github.com/civicrm/civicrm-core/pull/30000/files/2d23553c35e3e5e4237d91f4f80f254e43cba565#diff-3d2a990f0b1960f0b3e6671c645e18033883e6d1eaf535b8d19d085b67dde00bR598-R600)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
echo ts('%1', [1 => ts('Yep')]);
Looks good to me! |
Thanks all. |
…orm text
See
https://lab.civicrm.org/dev/core/-/issues/5155