From fd6a68282a736516943f7f180cf60c6e6355dbcd Mon Sep 17 00:00:00 2001 From: yashodha Date: Tue, 9 Aug 2016 14:14:09 +0530 Subject: [PATCH] CRM-18972: List of strings that cannot be localized cause the absence of ts() function ---------------------------------------- * CRM-18972: List of strings that cannot be localized cause the absence of ts() function https://issues.civicrm.org/jira/browse/CRM-18972 --- CRM/Report/Form/Activity.php | 6 ++-- CRM/Report/Form/Contact/Detail.php | 16 +++++------ CRM/Report/Form/Contribute/Bookkeeping.php | 6 ++-- CRM/Report/Form/Contribute/Detail.php | 4 +-- .../Form/Contribute/HouseholdSummary.php | 6 ++-- .../Form/Contribute/OrganizationSummary.php | 6 ++-- CRM/Report/Form/Contribute/Recur.php | 2 +- CRM/Report/Form/Contribute/Repeat.php | 28 +++++++++---------- CRM/Report/Form/Contribute/SoftCredit.php | 4 +-- CRM/Report/Form/Contribute/Summary.php | 6 ++-- CRM/Report/Form/Event/ParticipantListing.php | 8 +++--- CRM/Report/Form/Event/Summary.php | 4 +-- CRM/Report/Form/Mailing/Bounce.php | 2 +- CRM/Report/Form/Mailing/Summary.php | 12 ++++---- CRM/Report/Form/Member/Lapse.php | 6 ++-- 15 files changed, 58 insertions(+), 58 deletions(-) diff --git a/CRM/Report/Form/Activity.php b/CRM/Report/Form/Activity.php index 7b06de4f37..a5d6181be9 100644 --- a/CRM/Report/Form/Activity.php +++ b/CRM/Report/Form/Activity.php @@ -298,7 +298,7 @@ class CRM_Report_Form_Activity extends CRM_Report_Form { // Add display column and filter for Survey Results, Campaign and Engagement Index if CiviCampaign is enabled $this->_columns['civicrm_activity']['fields']['result'] = array( - 'title' => 'Survey Result', + 'title' => ts('Survey Result'), 'default' => 'false', ); $this->_columns['civicrm_activity']['filters']['result'] = array( @@ -308,7 +308,7 @@ class CRM_Report_Form_Activity extends CRM_Report_Form { ); if (!empty($this->activeCampaigns)) { $this->_columns['civicrm_activity']['fields']['campaign_id'] = array( - 'title' => 'Campaign', + 'title' => ts('Campaign'), 'default' => 'false', ); $this->_columns['civicrm_activity']['filters']['campaign_id'] = array( @@ -320,7 +320,7 @@ class CRM_Report_Form_Activity extends CRM_Report_Form { } if (!empty($this->engagementLevels)) { $this->_columns['civicrm_activity']['fields']['engagement_level'] = array( - 'title' => 'Engagement Index', + 'title' => ts('Engagement Index'), 'default' => 'false', ); $this->_columns['civicrm_activity']['filters']['engagement_level'] = array( diff --git a/CRM/Report/Form/Contact/Detail.php b/CRM/Report/Form/Contact/Detail.php index 417cf07e07..d03432e435 100644 --- a/CRM/Report/Form/Contact/Detail.php +++ b/CRM/Report/Form/Contact/Detail.php @@ -128,18 +128,18 @@ class CRM_Report_Form_Contact_Detail extends CRM_Report_Form { ), ), 'order_bys' => array( - 'state_province_id' => array('title' => 'State/Province'), - 'city' => array('title' => 'City'), - 'postal_code' => array('title' => 'Postal Code'), + 'state_province_id' => array('title' => ts('State/Province')), + 'city' => array('title' => ts('City')), + 'postal_code' => array('title' => ts('Postal Code')), ), ), 'civicrm_country' => array( 'dao' => 'CRM_Core_DAO_Country', 'fields' => array( - 'name' => array('title' => 'Country', 'default' => TRUE), + 'name' => array('title' => ts('Country'), 'default' => TRUE), ), 'order_bys' => array( - 'name' => array('title' => 'Country'), + 'name' => array('title' => ts('Country')), ), 'grouping' => 'contact-fields', ), @@ -215,7 +215,7 @@ class CRM_Report_Form_Contact_Detail extends CRM_Report_Form { 'title' => ts('Membership Status'), 'default' => TRUE, ), - 'source' => array('title' => 'Membership Source'), + 'source' => array('title' => ts('Membership Source')), ), ), 'civicrm_participant' => array( @@ -272,11 +272,11 @@ class CRM_Report_Form_Contact_Detail extends CRM_Report_Form { 'default' => TRUE, ), 'start_date' => array( - 'title' => 'Start Date ', + 'title' => ts('Start Date'), 'type' => CRM_Report_Form::OP_DATE, ), 'end_date' => array( - 'title' => 'End Date ', + 'title' => ts('End Date'), 'type' => CRM_Report_Form::OP_DATE, ), ), diff --git a/CRM/Report/Form/Contribute/Bookkeeping.php b/CRM/Report/Form/Contribute/Bookkeeping.php index 1f818f4f74..7dc7fcb79a 100644 --- a/CRM/Report/Form/Contribute/Bookkeeping.php +++ b/CRM/Report/Form/Contribute/Bookkeeping.php @@ -312,7 +312,7 @@ class CRM_Report_Form_Contribute_Bookkeeping extends CRM_Report_Form { 'options' => CRM_Contribute_PseudoConstant::paymentInstrument(), ), 'currency' => array( - 'title' => 'Currency', + 'title' => ts('Currency'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, 'options' => CRM_Core_OptionGroup::values('currencies_enabled'), 'default' => NULL, @@ -560,12 +560,12 @@ class CRM_Report_Form_Contribute_Bookkeeping extends CRM_Report_Form { $statistics['counts']['amount'] = array( 'value' => implode(', ', $amount), - 'title' => 'Total Amount', + 'title' => ts('Total Amount'), 'type' => CRM_Utils_Type::T_STRING, ); $statistics['counts']['avg'] = array( 'value' => implode(', ', $avg), - 'title' => 'Average', + 'title' => ts('Average'), 'type' => CRM_Utils_Type::T_STRING, ); return $statistics; diff --git a/CRM/Report/Form/Contribute/Detail.php b/CRM/Report/Form/Contribute/Detail.php index d3c984841c..1683005a42 100644 --- a/CRM/Report/Form/Contribute/Detail.php +++ b/CRM/Report/Form/Contribute/Detail.php @@ -217,7 +217,7 @@ class CRM_Report_Form_Contribute_Detail extends CRM_Report_Form { 'type' => CRM_Utils_Type::T_STRING, ), 'currency' => array( - 'title' => 'Currency', + 'title' => ts('Currency'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, 'options' => CRM_Core_OptionGroup::values('currencies_enabled'), 'default' => NULL, @@ -265,7 +265,7 @@ class CRM_Report_Form_Contribute_Detail extends CRM_Report_Form { ), 'filters' => array( 'soft_credit_type_id' => array( - 'title' => 'Soft Credit Type', + 'title' => ts('Soft Credit Type'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, 'options' => CRM_Core_OptionGroup::values('soft_credit_type'), 'default' => NULL, diff --git a/CRM/Report/Form/Contribute/HouseholdSummary.php b/CRM/Report/Form/Contribute/HouseholdSummary.php index 4d7527f233..5484fe3d6b 100644 --- a/CRM/Report/Form/Contribute/HouseholdSummary.php +++ b/CRM/Report/Form/Contribute/HouseholdSummary.php @@ -128,7 +128,7 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form { 'required' => TRUE, ), 'contribution_status_id' => array( - 'title' => 'Contribution Status', + 'title' => ts('Contribution Status'), 'default' => TRUE, ), 'check_number' => array( @@ -146,7 +146,7 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form { 'receive_date' => array('operatorType' => CRM_Report_Form::OP_DATE), 'total_amount' => array('title' => ts('Amount Between')), 'currency' => array( - 'title' => 'Currency', + 'title' => ts('Currency'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, 'options' => CRM_Core_OptionGroup::values('currencies_enabled'), 'default' => NULL, @@ -187,7 +187,7 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form { if ($campaignEnabled && !empty($this->activeCampaigns)) { $this->_columns['civicrm_contribution']['fields']['campaign_id'] = array( - 'title' => 'Campaign', + 'title' => ts('Campaign'), 'default' => 'false', ); $this->_columns['civicrm_contribution']['filters']['campaign_id'] = array( diff --git a/CRM/Report/Form/Contribute/OrganizationSummary.php b/CRM/Report/Form/Contribute/OrganizationSummary.php index ea7e20fd66..3fea16cae3 100644 --- a/CRM/Report/Form/Contribute/OrganizationSummary.php +++ b/CRM/Report/Form/Contribute/OrganizationSummary.php @@ -140,7 +140,7 @@ class CRM_Report_Form_Contribute_OrganizationSummary extends CRM_Report_Form { 'required' => TRUE, ), 'contribution_status_id' => array( - 'title' => 'Contribution Status', + 'title' => ts('Contribution Status'), 'default' => TRUE, ), 'check_number' => array( @@ -158,7 +158,7 @@ class CRM_Report_Form_Contribute_OrganizationSummary extends CRM_Report_Form { 'receive_date' => array('operatorType' => CRM_Report_Form::OP_DATE), 'total_amount' => array('title' => ts('Amount Between')), 'currency' => array( - 'title' => 'Currency', + 'title' => ts('Currency'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, 'options' => CRM_Core_OptionGroup::values('currencies_enabled'), 'default' => NULL, @@ -197,7 +197,7 @@ class CRM_Report_Form_Contribute_OrganizationSummary extends CRM_Report_Form { if ($campaignEnabled && !empty($this->activeCampaigns)) { $this->_columns['civicrm_contribution']['fields']['campaign_id'] = array( - 'title' => 'Campaign', + 'title' => ts('Campaign'), 'default' => 'false', ); $this->_columns['civicrm_contribution']['filters']['campaign_id'] = array( diff --git a/CRM/Report/Form/Contribute/Recur.php b/CRM/Report/Form/Contribute/Recur.php index 9e5ff3ccec..bd71fee2cc 100644 --- a/CRM/Report/Form/Contribute/Recur.php +++ b/CRM/Report/Form/Contribute/Recur.php @@ -158,7 +158,7 @@ class CRM_Report_Form_Contribute_Recur extends CRM_Report_Form { 'type' => CRM_Utils_Type::T_INT, ), 'currency' => array( - 'title' => 'Currency', + 'title' => ts('Currency'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, 'options' => CRM_Core_OptionGroup::values('currencies_enabled'), 'default' => NULL, diff --git a/CRM/Report/Form/Contribute/Repeat.php b/CRM/Report/Form/Contribute/Repeat.php index ae608b46bb..30eeeb80f2 100644 --- a/CRM/Report/Form/Contribute/Repeat.php +++ b/CRM/Report/Form/Contribute/Repeat.php @@ -725,23 +725,23 @@ LEFT JOIN $this->tempTableRepeat2 {$this->_aliases['civicrm_contribution']}2 //display percentages for new, lapsed, upgraded, downgraded, and maintained contributors $statistics['counts']['count_new'] = array( 'value' => $new, - 'title' => '% New Donors', + 'title' => ts('% New Donors'), ); $statistics['counts']['count_lapsed'] = array( 'value' => $lapsed, - 'title' => '% Lapsed Donors', + 'title' => ts('% Lapsed Donors'), ); $statistics['counts']['count_upgraded'] = array( 'value' => $upgraded, - 'title' => '% Upgraded Donors', + 'title' => ts('% Upgraded Donors'), ); $statistics['counts']['count_downgraded'] = array( 'value' => $downgraded, - 'title' => '% Downgraded Donors', + 'title' => ts('% Downgraded Donors'), ); $statistics['counts']['count_maintained'] = array( 'value' => $maintained, - 'title' => '% Maintained Donors', + 'title' => ts('% Maintained Donors'), ); $select = " @@ -777,36 +777,36 @@ GROUP BY currency $count2 += $dao->count2; } - $statistics['counts']['range_one_title'] = array('title' => 'Initial Date Range:'); + $statistics['counts']['range_one_title'] = array('title' => ts('Initial Date Range:')); $statistics['counts']['amount'] = array( 'value' => implode(', ', $amount), - 'title' => 'Total Amount', + 'title' => ts('Total Amount'), 'type' => CRM_Utils_Type::T_STRING, ); $statistics['counts']['count'] = array( 'value' => $count, - 'title' => 'Total Donations', + 'title' => ts('Total Donations'), ); $statistics['counts']['avg'] = array( 'value' => implode(', ', $average), - 'title' => 'Average', + 'title' => ts('Average'), 'type' => CRM_Utils_Type::T_STRING, ); $statistics['counts']['range_two_title'] = array( - 'title' => 'Second Date Range:', + 'title' => ts('Second Date Range:'), ); $statistics['counts']['amount2'] = array( 'value' => implode(', ', $amount2), - 'title' => 'Total Amount', + 'title' => ts('Total Amount'), 'type' => CRM_Utils_Type::T_STRING, ); $statistics['counts']['count2'] = array( 'value' => $count2, - 'title' => 'Total Donations', + 'title' => ts('Total Donations'), ); $statistics['counts']['avg2'] = array( 'value' => implode(', ', $average2), - 'title' => 'Average', + 'title' => ts('Average'), 'type' => CRM_Utils_Type::T_STRING, ); @@ -862,7 +862,7 @@ GROUP BY currency } } $this->_columnHeaders['change'] = array( - 'title' => '% Change', + 'title' => ts('% Change'), 'type' => CRM_Utils_Type::T_INT, ); diff --git a/CRM/Report/Form/Contribute/SoftCredit.php b/CRM/Report/Form/Contribute/SoftCredit.php index 52c6165ed6..dba761272c 100644 --- a/CRM/Report/Form/Contribute/SoftCredit.php +++ b/CRM/Report/Form/Contribute/SoftCredit.php @@ -238,7 +238,7 @@ class CRM_Report_Form_Contribute_SoftCredit extends CRM_Report_Form { 'filters' => array( 'receive_date' => array('operatorType' => CRM_Report_Form::OP_DATE), 'currency' => array( - 'title' => 'Currency', + 'title' => ts('Currency'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, 'options' => CRM_Core_OptionGroup::values('currencies_enabled'), 'default' => NULL, @@ -277,7 +277,7 @@ class CRM_Report_Form_Contribute_SoftCredit extends CRM_Report_Form { ), 'filters' => array( 'soft_credit_type_id' => array( - 'title' => 'Soft Credit Type', + 'title' => ts('Soft Credit Type'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, 'options' => CRM_Core_OptionGroup::values('soft_credit_type'), 'default' => NULL, diff --git a/CRM/Report/Form/Contribute/Summary.php b/CRM/Report/Form/Contribute/Summary.php index aaf7064805..76a047c57e 100644 --- a/CRM/Report/Form/Contribute/Summary.php +++ b/CRM/Report/Form/Contribute/Summary.php @@ -155,7 +155,7 @@ class CRM_Report_Form_Contribute_Summary extends CRM_Report_Form { 'type' => CRM_Utils_Type::T_INT, ), 'currency' => array( - 'title' => 'Currency', + 'title' => ts('Currency'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, 'options' => CRM_Core_OptionGroup::values('currencies_enabled'), 'default' => NULL, @@ -242,7 +242,7 @@ class CRM_Report_Form_Contribute_Summary extends CRM_Report_Form { 'title' => ts('Soft Credit Amount'), ), 'soft_credit_type_id' => array( - 'title' => 'Soft Credit Type', + 'title' => ts('Soft Credit Type'), 'operatorType' => CRM_Report_Form::OP_MULTISELECT, 'options' => CRM_Core_OptionGroup::values('soft_credit_type'), 'default' => NULL, @@ -273,7 +273,7 @@ class CRM_Report_Form_Contribute_Summary extends CRM_Report_Form { // If we have a campaign, build out the relevant elements if ($campaignEnabled && !empty($this->activeCampaigns)) { $this->_columns['civicrm_contribution']['fields']['campaign_id'] = array( - 'title' => 'Campaign', + 'title' => ts('Campaign'), 'default' => 'false', ); $this->_columns['civicrm_contribution']['filters']['campaign_id'] = array( diff --git a/CRM/Report/Form/Event/ParticipantListing.php b/CRM/Report/Form/Event/ParticipantListing.php index e30d3dae84..9a5bd5160c 100644 --- a/CRM/Report/Form/Event/ParticipantListing.php +++ b/CRM/Report/Form/Event/ParticipantListing.php @@ -162,7 +162,7 @@ class CRM_Report_Form_Event_ParticipantListing extends CRM_Report_Form_Event { 'civicrm_participant' => array( 'dao' => 'CRM_Event_DAO_Participant', 'fields' => array( - 'participant_id' => array('title' => 'Participant ID'), + 'participant_id' => array('title' => ts('Participant ID')), 'participant_record' => array( 'name' => 'id', 'no_display' => TRUE, @@ -230,7 +230,7 @@ class CRM_Report_Form_Event_ParticipantListing extends CRM_Report_Form_Event { 'options' => CRM_Event_PseudoConstant::participantRole(), ), 'participant_register_date' => array( - 'title' => 'Registration Date', + 'title' => ts('Registration Date'), 'operatorType' => CRM_Report_Form::OP_DATE, ), 'fee_currency' => array( @@ -346,7 +346,7 @@ class CRM_Report_Form_Event_ParticipantListing extends CRM_Report_Form_Event { 'grouping' => 'contrib-fields', 'filters' => array( 'receive_date' => array( - 'title' => 'Payment Date', + 'title' => ts('Payment Date'), 'operatorType' => CRM_Report_Form::OP_DATE, ), 'financial_type_id' => array( @@ -400,7 +400,7 @@ class CRM_Report_Form_Event_ParticipantListing extends CRM_Report_Form_Event { 'title' => ts('Blank column at the End'), 'type' => 'select', 'options' => array( - '' => '-select-', + '' => ts('-select-'), 1 => ts('One'), 2 => ts('Two'), 3 => ts('Three'), diff --git a/CRM/Report/Form/Event/Summary.php b/CRM/Report/Form/Event/Summary.php index 17ee01029e..247e33ceec 100644 --- a/CRM/Report/Form/Event/Summary.php +++ b/CRM/Report/Form/Event/Summary.php @@ -96,11 +96,11 @@ class CRM_Report_Form_Event_Summary extends CRM_Report_Form_Event { 'options' => CRM_Core_OptionGroup::values('event_type'), ), 'event_start_date' => array( - 'title' => 'Event Start Date', + 'title' => ts('Event Start Date'), 'operatorType' => CRM_Report_Form::OP_DATE, ), 'event_end_date' => array( - 'title' => 'Event End Date', + 'title' => ts('Event End Date'), 'operatorType' => CRM_Report_Form::OP_DATE, ), ), diff --git a/CRM/Report/Form/Mailing/Bounce.php b/CRM/Report/Form/Mailing/Bounce.php index c994faa1ee..a351a96e7c 100644 --- a/CRM/Report/Form/Mailing/Bounce.php +++ b/CRM/Report/Form/Mailing/Bounce.php @@ -412,7 +412,7 @@ class CRM_Report_Form_Mailing_Bounce extends CRM_Report_Form { */ public function bounce_type() { - $data = array('' => '--Please Select--'); + $data = array('' => ts('--Please Select--')); $bounce_type = new CRM_Mailing_DAO_BounceType(); $query = "SELECT name FROM civicrm_mailing_bounce_type"; diff --git a/CRM/Report/Form/Mailing/Summary.php b/CRM/Report/Form/Mailing/Summary.php index 2c2a0b798d..6f2f1c761f 100644 --- a/CRM/Report/Form/Mailing/Summary.php +++ b/CRM/Report/Form/Mailing/Summary.php @@ -153,7 +153,7 @@ class CRM_Report_Form_Mailing_Summary extends CRM_Report_Form { 'title' => ts('Delivered'), ), 'accepted_rate' => array( - 'title' => 'Accepted Rate', + 'title' => ts('Accepted Rate'), 'statistics' => array( 'calc' => 'PERCENTAGE', 'top' => 'civicrm_mailing_event_delivered.delivered_count', @@ -171,7 +171,7 @@ class CRM_Report_Form_Mailing_Summary extends CRM_Report_Form { 'title' => ts('Bounce'), ), 'bounce_rate' => array( - 'title' => 'Bounce Rate', + 'title' => ts('Bounce Rate'), 'statistics' => array( 'calc' => 'PERCENTAGE', 'top' => 'civicrm_mailing_event_bounce.bounce_count', @@ -191,7 +191,7 @@ class CRM_Report_Form_Mailing_Summary extends CRM_Report_Form { 'title' => ts('Unique Opens'), ), 'unique_open_rate' => array( - 'title' => 'Unique Open Rate', + 'title' => ts('Unique Open Rate'), 'statistics' => array( 'calc' => 'PERCENTAGE', 'top' => 'civicrm_mailing_event_opened.unique_open_count', @@ -203,7 +203,7 @@ class CRM_Report_Form_Mailing_Summary extends CRM_Report_Form { 'title' => ts('Total Opens'), ), 'open_rate' => array( - 'title' => 'Total Open Rate', + 'title' => ts('Total Open Rate'), 'statistics' => array( 'calc' => 'PERCENTAGE', 'top' => 'civicrm_mailing_event_opened.open_count', @@ -221,7 +221,7 @@ class CRM_Report_Form_Mailing_Summary extends CRM_Report_Form { 'title' => ts('Clicks'), ), 'CTR' => array( - 'title' => 'Click through Rate', + 'title' => ts('Click through Rate'), 'default' => 0, 'statistics' => array( 'calc' => 'PERCENTAGE', @@ -230,7 +230,7 @@ class CRM_Report_Form_Mailing_Summary extends CRM_Report_Form { ), ), 'CTO' => array( - 'title' => 'Click to Open Rate', + 'title' => ts('Click to Open Rate'), 'default' => 0, 'statistics' => array( 'calc' => 'PERCENTAGE', diff --git a/CRM/Report/Form/Member/Lapse.php b/CRM/Report/Form/Member/Lapse.php index d746013baa..7a6cd9a6f8 100644 --- a/CRM/Report/Form/Member/Lapse.php +++ b/CRM/Report/Form/Member/Lapse.php @@ -113,7 +113,7 @@ class CRM_Report_Form_Member_Lapse extends CRM_Report_Form { 'grouping' => 'member-fields', 'fields' => array( 'membership_type_id' => array( - 'title' => 'Membership Type', + 'title' => ts('Membership Type'), 'required' => TRUE, 'type' => CRM_Utils_Type::T_STRING, ), @@ -127,7 +127,7 @@ class CRM_Report_Form_Member_Lapse extends CRM_Report_Form { ), 'filters' => array( 'membership_end_date' => array( - 'title' => 'Lapsed Memberships', + 'title' => ts('Lapsed Memberships'), 'operatorType' => CRM_Report_Form::OP_DATE, ), ), @@ -175,7 +175,7 @@ class CRM_Report_Form_Member_Lapse extends CRM_Report_Form { // If we have a campaign, build out the relevant elements if ($campaignEnabled && !empty($this->activeCampaigns)) { $this->_columns['civicrm_membership']['fields']['campaign_id'] = array( - 'title' => 'Campaign', + 'title' => ts('Campaign'), 'default' => 'false', ); $this->_columns['civicrm_membership']['filters']['campaign_id'] = array( -- 2.25.1