From 1c0b0693e44497bff759d84fd3e6ff7455f4aedd Mon Sep 17 00:00:00 2001 From: Mathieu Lutfy Date: Wed, 6 Jan 2021 18:13:09 -0500 Subject: [PATCH] Fix ts usage for CiviCRM 5.33 --- CRM/Report/Form/Contribute/SoftCredit.php | 2 +- .../Incremental/php/FiveTwentyEight.php | 18 ++++++++---------- .../Incremental/php/FiveTwentySeven.php | 5 +---- templates/CRM/Contribute/Form/Contribution.tpl | 13 ++++++++----- .../CRM/Member/Form/MembershipRenewal.tpl | 17 +++++++++++------ 5 files changed, 29 insertions(+), 26 deletions(-) diff --git a/CRM/Report/Form/Contribute/SoftCredit.php b/CRM/Report/Form/Contribute/SoftCredit.php index 4d4277f6b6..31401b4633 100644 --- a/CRM/Report/Form/Contribute/SoftCredit.php +++ b/CRM/Report/Form/Contribute/SoftCredit.php @@ -567,7 +567,7 @@ GROUP BY {$this->_aliases['civicrm_contribution']}.currency $this->_absoluteUrl ); $rows[$rowNum]['civicrm_contact_display_name_creditor_link'] = $url; - $rows[$rowNum]['civicrm_contact_display_name_creditor_hover'] = ts("view contact summary"); + $rows[$rowNum]['civicrm_contact_display_name_creditor_hover'] = ts("View contact summary"); } // make subtotals look nicer diff --git a/CRM/Upgrade/Incremental/php/FiveTwentyEight.php b/CRM/Upgrade/Incremental/php/FiveTwentyEight.php index 2d10885877..e765ee4be5 100644 --- a/CRM/Upgrade/Incremental/php/FiveTwentyEight.php +++ b/CRM/Upgrade/Incremental/php/FiveTwentyEight.php @@ -58,21 +58,19 @@ class CRM_Upgrade_Incremental_php_FiveTwentyEight extends CRM_Upgrade_Incrementa $table = '' . sprintf('', ts('[civicrm.files] Path')) - . sprintf('', ts('5.29 Default:'), wp_upload_dir()['basedir'] . DIRECTORY_SEPARATOR . 'civicrm' . DIRECTORY_SEPARATOR) - . sprintf('', ts('5.28 Default:'), CRM_Core_Config::singleton()->userSystem->getDefaultFileStorage()['path']) + . sprintf('', ts('5.29 Default value:'), wp_upload_dir()['basedir'] . DIRECTORY_SEPARATOR . 'civicrm' . DIRECTORY_SEPARATOR) + . sprintf('', ts('5.28 Default value:'), CRM_Core_Config::singleton()->userSystem->getDefaultFileStorage()['path']) . sprintf('', ts('Active Value:'), Civi::paths()->getVariable('civicrm.files', 'path')) . sprintf('', ts('[civicrm.files] URL')) - . sprintf('', ts('5.29 Default:'), wp_upload_dir()['baseurl'] . '/civicrm/') - . sprintf('', ts('5.28 Default:'), CRM_Core_Config::singleton()->userSystem->getDefaultFileStorage()['url']) + . sprintf('', ts('5.29 Default value:'), wp_upload_dir()['baseurl'] . '/civicrm/') + . sprintf('', ts('5.28 Default value:'), CRM_Core_Config::singleton()->userSystem->getDefaultFileStorage()['url']) . sprintf('', ts('Active Value:'), Civi::paths()->getVariable('civicrm.files', 'url')) . '
%s
%s%s
%s%s
%s%s
%s%s
%s%s
%s
%s%s
%s%s
%s%s
%s%s
%s%s
'; - return '

' . ts('Starting with version 5.29.0, CiviCRM on WordPress may make a subtle change in the calculation of [civicrm.files]. - To ensure a smooth upgrade, please review the following table. All paths and URLs should appear the same. If there is any discrepancy, - then consult the upgrade documentation.', [ - 1 => 'https://docs.civicrm.org/sysadmin/en/latest/upgrade/version-specific/#civicrm-5.29', - 2 => '...wp-content/uploads/civicrm', - ]) . '

' . $table; + return '

' . ts('Starting with version 5.29.0, CiviCRM on WordPress may make a subtle change in the calculation of [civicrm.files]. To ensure a smooth upgrade, please review the following table. All paths and URLs should appear the same. If there is any discrepancy, then consult the upgrade documentation.', [ + 1 => 'href="https://docs.civicrm.org/sysadmin/en/latest/upgrade/version-specific/#civicrm-5.29" target="_blank"', + 2 => '...wp-content/uploads/civicrm', + ]) . '

' . $table; } /* diff --git a/CRM/Upgrade/Incremental/php/FiveTwentySeven.php b/CRM/Upgrade/Incremental/php/FiveTwentySeven.php index 60490a0b24..e84a025d24 100644 --- a/CRM/Upgrade/Incremental/php/FiveTwentySeven.php +++ b/CRM/Upgrade/Incremental/php/FiveTwentySeven.php @@ -30,10 +30,7 @@ class CRM_Upgrade_Incremental_php_FiveTwentySeven extends CRM_Upgrade_Incrementa // $preUpgradeMessage .= '

' . ts('A new permission, "%1", has been added. This permission is now used to control access to the Manage Tags screen.', array(1 => ts('manage tags'))) . '

'; // } if ($rev == '5.27.alpha1') { - $preUpgradeMessage .= '

' . ts('Starting with version 5.28.0, CiviCRM will - require the PHP Internationalization extension (PHP-Intl). In preparation - for this, the system check will show a warning beginning in 5.27.0 if your - site lacks this extension.') . '

'; + $preUpgradeMessage .= '

' . ts('Starting with version 5.28.0, CiviCRM will require the PHP Internationalization extension (PHP-Intl). In preparation for this, the system check will show a warning beginning in 5.27.0 if your site lacks this extension.') . '

'; } } diff --git a/templates/CRM/Contribute/Form/Contribution.tpl b/templates/CRM/Contribute/Form/Contribution.tpl index 9ab874819b..d56be1a2dc 100644 --- a/templates/CRM/Contribute/Form/Contribution.tpl +++ b/templates/CRM/Contribute/Form/Contribution.tpl @@ -18,13 +18,16 @@ {if $contributionMode}
{if $contactId && $payNow} - {ts 1=$displayName 2=$contributionMode|upper}Use this form to edit a contribution on behalf of %1. A - %2 transaction will be submitted using the selected payment processor.{/ts} + {ts 1=$displayName}Use this form to edit a contribution on behalf of %1.{/ts} {elseif $contactId} - {ts 1=$displayName 2=$contributionMode|upper}Use this form to submit a new contribution on behalf of %1. A - %2 transaction will be submitted using the selected payment processor.{/ts} + {ts 1=$displayName}Use this form to submit a new contribution on behalf of %1.{/ts} {else} - {ts 1=$displayName 2=$contributionMode|upper}Use this form to submit a new contribution. A %2 transaction will be submitted using the selected payment processor.{/ts} + {ts 1=$displayName}Use this form to submit a new contribution.{/ts} + {/if} + {if $contributionMode == 'live'} + A LIVE transaction will be submitted using the selected payment processor.{/ts} + {else} + A TEST transaction will be submitted using the selected payment processor.{/ts} {/if}
{/if} diff --git a/templates/CRM/Member/Form/MembershipRenewal.tpl b/templates/CRM/Member/Form/MembershipRenewal.tpl index aa8ff8fb6e..7aa5b9dff9 100644 --- a/templates/CRM/Member/Form/MembershipRenewal.tpl +++ b/templates/CRM/Member/Form/MembershipRenewal.tpl @@ -21,18 +21,23 @@ {/if} {if $membershipMode}
- {ts 1=$displayName 2=$registerMode}Use this form to Renew Membership Record on behalf of %1. - A %2 transaction will be submitted - using the selected payment processor.{/ts} + {ts 1=$displayName}Use this form to Renew Membership Record on behalf of %1.{/ts} + {if $registerMode == 'LIVE'} + {ts}A LIVE transaction will be submitted using the selected payment processor.{/ts} + {else} + {ts}A TEST transaction will be submitted using the selected payment processor.{/ts} + {/if}
{/if} {if $action eq 32768} {if $cancelAutoRenew}
{icon icon="fa-info-circle"}{/icon} -

{ts 1=$cancelAutoRenew}This membership is set to renew automatically {if $renewalDate}on {$renewalDate|crmDate}{/if}. You will need to cancel the auto-renew option if you want to modify the Membership Type, End Date or Membership Status. - Click here - if you want to cancel the automatic renewal option.{/ts}

+ {if $renewalDate} +

{ts 1=$cancelAutoRenew 2=$renewalDate|crmDate}This membership is set to renew automatically on %2. You will need to cancel the auto-renew option if you want to modify the Membership Type, End Date or Membership Status. Click here if you want to cancel the automatic renewal option.{/ts}

+ {else} +

{ts 1=$cancelAutoRenew}This membership is set to renew automatically. You will need to cancel the auto-renew option if you want to modify the Membership Type, End Date or Membership Status. Click here if you want to cancel the automatic renewal option.{/ts}

+ {/if}
{/if} {/if} -- 2.25.1