From b8f96eb89c2abbbf24467cb59babe160831f68cd Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Sat, 15 Nov 2014 21:51:28 -0500 Subject: [PATCH] CRM-15603 - Standardize case of 'Contact Subtype' --- CRM/Contact/Form/Task/Batch.php | 2 +- CRM/Contact/Import/Parser/Contact.php | 2 +- CRM/Report/Form/Contact/CurrentEmployer.php | 2 +- CRM/Report/Form/Contact/Detail.php | 2 +- CRM/Report/Form/Contact/Relationship.php | 4 ++-- CRM/Report/Form/Contact/Summary.php | 2 +- CRM/Report/Form/Contribute/Bookkeeping.php | 2 +- CRM/Report/Form/Contribute/Detail.php | 2 +- CRM/Report/Form/Contribute/History.php | 2 +- CRM/Report/Form/Contribute/HouseholdSummary.php | 2 +- CRM/Report/Form/Contribute/Lybunt.php | 2 +- CRM/Report/Form/Contribute/OrganizationSummary.php | 2 +- CRM/Report/Form/Contribute/PCP.php | 2 +- CRM/Report/Form/Contribute/Repeat.php | 2 +- CRM/Report/Form/Contribute/SoftCredit.php | 2 +- CRM/Report/Form/Contribute/Summary.php | 2 +- CRM/Report/Form/Contribute/Sybunt.php | 2 +- CRM/Report/Form/Contribute/TopDonor.php | 2 +- CRM/Report/Form/Member/ContributionDetail.php | 2 +- CRM/Report/Form/Member/Detail.php | 2 +- CRM/Report/Form/Member/Lapse.php | 2 +- CRM/Report/Form/Member/Summary.php | 2 +- CRM/Utils/DeprecatedUtils.php | 2 +- api/v3/Contact.php | 2 +- tests/phpunit/api/v3/CustomValueContactTypeTest.php | 2 +- 25 files changed, 26 insertions(+), 26 deletions(-) diff --git a/CRM/Contact/Form/Task/Batch.php b/CRM/Contact/Form/Task/Batch.php index b142d0a467..32ba02d7dd 100644 --- a/CRM/Contact/Form/Task/Batch.php +++ b/CRM/Contact/Form/Task/Batch.php @@ -261,7 +261,7 @@ class CRM_Contact_Form_Task_Batch extends CRM_Contact_Form_Task { CRM_Core_Session::setStatus('', ts("Updates Saved"), 'success'); if ($inValidSubtypeCnt) { - CRM_Core_Session::setStatus(ts('Contact SubType field of 1 contact has not been updated.', array('plural' => 'Contact SubType field of %count contacts has not been updated.', 'count' => $inValidSubtypeCnt)), ts('Invalid Subtype')); + CRM_Core_Session::setStatus(ts('Contact Subtype field of 1 contact has not been updated.', array('plural' => 'Contact Subtype field of %count contacts has not been updated.', 'count' => $inValidSubtypeCnt)), ts('Invalid Subtype')); } } //end of function diff --git a/CRM/Contact/Import/Parser/Contact.php b/CRM/Contact/Import/Parser/Contact.php index 5007ad6896..75d2bb0535 100644 --- a/CRM/Contact/Import/Parser/Contact.php +++ b/CRM/Contact/Import/Parser/Contact.php @@ -509,7 +509,7 @@ class CRM_Contact_Import_Parser_Contact extends CRM_Contact_Import_Parser { $params['contact_sub_type'] = array_search($subType, $subTypes); } elseif (!CRM_Contact_BAO_ContactType::isExtendsContactType($subType, $this->_contactType)) { - $message = "Mismatched or Invalid Contact SubType."; + $message = "Mismatched or Invalid Contact Subtype."; array_unshift($values, $message); return CRM_Import_Parser::NO_MATCH; } diff --git a/CRM/Report/Form/Contact/CurrentEmployer.php b/CRM/Report/Form/Contact/CurrentEmployer.php index 6a8177a5d6..29f013c686 100644 --- a/CRM/Report/Form/Contact/CurrentEmployer.php +++ b/CRM/Report/Form/Contact/CurrentEmployer.php @@ -106,7 +106,7 @@ class CRM_Report_Form_Contact_CurrentEmployer extends CRM_Report_Form { ), 'contact_sub_type' => array( - 'title' => ts('Contact SubType'), + 'title' => ts('Contact Subtype'), ), ), 'filters' => diff --git a/CRM/Report/Form/Contact/Detail.php b/CRM/Report/Form/Contact/Detail.php index 32f0aa3594..e4a97e65be 100644 --- a/CRM/Report/Form/Contact/Detail.php +++ b/CRM/Report/Form/Contact/Detail.php @@ -76,7 +76,7 @@ class CRM_Report_Form_Contact_Detail extends CRM_Report_Form { ), 'contact_sub_type' => array( - 'title' => ts('Contact SubType'), + 'title' => ts('Contact Subtype'), ), 'birth_date' => array( diff --git a/CRM/Report/Form/Contact/Relationship.php b/CRM/Report/Form/Contact/Relationship.php index 547a08dede..1f2041b2a5 100644 --- a/CRM/Report/Form/Contact/Relationship.php +++ b/CRM/Report/Form/Contact/Relationship.php @@ -71,7 +71,7 @@ class CRM_Report_Form_Contact_Relationship extends CRM_Report_Form { ), 'contact_sub_type_a' => array( - 'title' => ts('Contact SubType (Contact A)'), + 'title' => ts('Contact Subtype (Contact A)'), 'name' => 'contact_sub_type', ), ), @@ -116,7 +116,7 @@ class CRM_Report_Form_Contact_Relationship extends CRM_Report_Form { ), 'contact_sub_type_b' => array( - 'title' => ts('Contact SubType (Contact B)'), + 'title' => ts('Contact Subtype (Contact B)'), 'name' => 'contact_sub_type', ), ), diff --git a/CRM/Report/Form/Contact/Summary.php b/CRM/Report/Form/Contact/Summary.php index 7a6a1aa0ec..2ab122ee62 100644 --- a/CRM/Report/Form/Contact/Summary.php +++ b/CRM/Report/Form/Contact/Summary.php @@ -82,7 +82,7 @@ class CRM_Report_Form_Contact_Summary extends CRM_Report_Form { ), 'contact_sub_type' => array( - 'title' => ts('Contact SubType'), + 'title' => ts('Contact Subtype'), ), 'gender_id' => array('title' => ts('Gender'), diff --git a/CRM/Report/Form/Contribute/Bookkeeping.php b/CRM/Report/Form/Contribute/Bookkeeping.php index d1e7961e0a..f94eb7cf4a 100644 --- a/CRM/Report/Form/Contribute/Bookkeeping.php +++ b/CRM/Report/Form/Contribute/Bookkeeping.php @@ -72,7 +72,7 @@ class CRM_Report_Form_Contribute_Bookkeeping extends CRM_Report_Form { ), 'contact_sub_type' => array( - 'title' => ts('Contact SubType'), + 'title' => ts('Contact Subtype'), ), ), 'filters' => diff --git a/CRM/Report/Form/Contribute/Detail.php b/CRM/Report/Form/Contribute/Detail.php index 19ac2641e1..25dfcb588a 100644 --- a/CRM/Report/Form/Contribute/Detail.php +++ b/CRM/Report/Form/Contribute/Detail.php @@ -85,7 +85,7 @@ class CRM_Report_Form_Contribute_Detail extends CRM_Report_Form { ), 'contact_sub_type' => array( - 'title' => ts('Contact SubType'), + 'title' => ts('Contact Subtype'), ), ), 'filters' => diff --git a/CRM/Report/Form/Contribute/History.php b/CRM/Report/Form/Contribute/History.php index 910aa2a9f9..8f87fae635 100644 --- a/CRM/Report/Form/Contribute/History.php +++ b/CRM/Report/Form/Contribute/History.php @@ -106,7 +106,7 @@ class CRM_Report_Form_Contribute_History extends CRM_Report_Form { ), 'contact_sub_type' => array( - 'title' => ts('Contact SubType'), + 'title' => ts('Contact Subtype'), ), ), 'grouping' => 'contact-fields', diff --git a/CRM/Report/Form/Contribute/HouseholdSummary.php b/CRM/Report/Form/Contribute/HouseholdSummary.php index f011b1060a..555b8e4620 100644 --- a/CRM/Report/Form/Contribute/HouseholdSummary.php +++ b/CRM/Report/Form/Contribute/HouseholdSummary.php @@ -77,7 +77,7 @@ class CRM_Report_Form_Contribute_HouseholdSummary extends CRM_Report_Form { 'title' => ts('Contact Type'), ), 'contact_sub_type' => array( - 'title' => ts('Contact SubType'), + 'title' => ts('Contact Subtype'), ), ), 'filters' => array( diff --git a/CRM/Report/Form/Contribute/Lybunt.php b/CRM/Report/Form/Contribute/Lybunt.php index 874deb19f2..82fbe98e40 100644 --- a/CRM/Report/Form/Contribute/Lybunt.php +++ b/CRM/Report/Form/Contribute/Lybunt.php @@ -95,7 +95,7 @@ class CRM_Report_Form_Contribute_Lybunt extends CRM_Report_Form { ), 'contact_sub_type' => array( - 'title' => ts('Contact SubType'), + 'title' => ts('Contact Subtype'), ), ), 'filters' => diff --git a/CRM/Report/Form/Contribute/OrganizationSummary.php b/CRM/Report/Form/Contribute/OrganizationSummary.php index d5f3b5b430..d58ddbff8d 100644 --- a/CRM/Report/Form/Contribute/OrganizationSummary.php +++ b/CRM/Report/Form/Contribute/OrganizationSummary.php @@ -88,7 +88,7 @@ class CRM_Report_Form_Contribute_OrganizationSummary extends CRM_Report_Form { 'title' => ts('Contact Type'), ), 'contact_sub_type' => array( - 'title' => ts('Contact SubType'), + 'title' => ts('Contact Subtype'), ), ), 'filters' => array( diff --git a/CRM/Report/Form/Contribute/PCP.php b/CRM/Report/Form/Contribute/PCP.php index 890f9f0169..a62261a574 100644 --- a/CRM/Report/Form/Contribute/PCP.php +++ b/CRM/Report/Form/Contribute/PCP.php @@ -63,7 +63,7 @@ class CRM_Report_Form_Contribute_PCP extends CRM_Report_Form { ), 'contact_sub_type' => array( - 'title' => ts('Supporter Contact SubType'), + 'title' => ts('Supporter Contact Subtype'), ), ), 'filters' => diff --git a/CRM/Report/Form/Contribute/Repeat.php b/CRM/Report/Form/Contribute/Repeat.php index 8677285443..e10a830dc4 100644 --- a/CRM/Report/Form/Contribute/Repeat.php +++ b/CRM/Report/Form/Contribute/Repeat.php @@ -80,7 +80,7 @@ class CRM_Report_Form_Contribute_Repeat extends CRM_Report_Form { ), 'contact_sub_type' => array( - 'title' => ts('Contact SubType'), + 'title' => ts('Contact Subtype'), 'no_repeat' => TRUE, ), ), diff --git a/CRM/Report/Form/Contribute/SoftCredit.php b/CRM/Report/Form/Contribute/SoftCredit.php index afff9e4154..26867057ba 100644 --- a/CRM/Report/Form/Contribute/SoftCredit.php +++ b/CRM/Report/Form/Contribute/SoftCredit.php @@ -101,7 +101,7 @@ class CRM_Report_Form_Contribute_SoftCredit extends CRM_Report_Form { ), 'contact_sub_type' => array( - 'title' => ts('Contact SubType'), + 'title' => ts('Contact Subtype'), ), ), 'filters' => diff --git a/CRM/Report/Form/Contribute/Summary.php b/CRM/Report/Form/Contribute/Summary.php index ef4023d85a..66d2da707c 100644 --- a/CRM/Report/Form/Contribute/Summary.php +++ b/CRM/Report/Form/Contribute/Summary.php @@ -85,7 +85,7 @@ class CRM_Report_Form_Contribute_Summary extends CRM_Report_Form { ), 'contact_sub_type' => array( - 'title' => ts('Contact SubType'), + 'title' => ts('Contact Subtype'), ), ), 'grouping' => 'contact-fields', diff --git a/CRM/Report/Form/Contribute/Sybunt.php b/CRM/Report/Form/Contribute/Sybunt.php index fcb778f592..9dcb2c469e 100644 --- a/CRM/Report/Form/Contribute/Sybunt.php +++ b/CRM/Report/Form/Contribute/Sybunt.php @@ -91,7 +91,7 @@ class CRM_Report_Form_Contribute_Sybunt extends CRM_Report_Form { ), 'contact_sub_type' => array( - 'title' => ts('Contact SubType'), + 'title' => ts('Contact Subtype'), ), ), 'filters' => diff --git a/CRM/Report/Form/Contribute/TopDonor.php b/CRM/Report/Form/Contribute/TopDonor.php index 25297045f1..5a41d22f9b 100644 --- a/CRM/Report/Form/Contribute/TopDonor.php +++ b/CRM/Report/Form/Contribute/TopDonor.php @@ -80,7 +80,7 @@ class CRM_Report_Form_Contribute_TopDonor extends CRM_Report_Form { ), 'contact_sub_type' => array( - 'title' => ts('Contact SubType'), + 'title' => ts('Contact Subtype'), ), ), ), diff --git a/CRM/Report/Form/Member/ContributionDetail.php b/CRM/Report/Form/Member/ContributionDetail.php index 98b128af6c..f11011479c 100644 --- a/CRM/Report/Form/Member/ContributionDetail.php +++ b/CRM/Report/Form/Member/ContributionDetail.php @@ -83,7 +83,7 @@ class CRM_Report_Form_Member_ContributionDetail extends CRM_Report_Form { ), 'contact_sub_type' => array( - 'title' => ts('Contact SubType'), + 'title' => ts('Contact Subtype'), 'no_repeat' => TRUE, ), 'do_not_email' => diff --git a/CRM/Report/Form/Member/Detail.php b/CRM/Report/Form/Member/Detail.php index e1ee639de1..70c3a39a61 100644 --- a/CRM/Report/Form/Member/Detail.php +++ b/CRM/Report/Form/Member/Detail.php @@ -96,7 +96,7 @@ class CRM_Report_Form_Member_Detail extends CRM_Report_Form { 'title' => ts('Contact Type'), ), 'contact_sub_type' => array( - 'title' => ts('Contact SubType'), + 'title' => ts('Contact Subtype'), ), ), 'filters' => array( diff --git a/CRM/Report/Form/Member/Lapse.php b/CRM/Report/Form/Member/Lapse.php index 3c6cc56b7f..42f5189b7b 100644 --- a/CRM/Report/Form/Member/Lapse.php +++ b/CRM/Report/Form/Member/Lapse.php @@ -102,7 +102,7 @@ class CRM_Report_Form_Member_Lapse extends CRM_Report_Form { ), 'contact_sub_type' => array( - 'title' => ts('Contact SubType'), + 'title' => ts('Contact Subtype'), ), ), 'grouping' => 'contact-fields', diff --git a/CRM/Report/Form/Member/Summary.php b/CRM/Report/Form/Member/Summary.php index 1d63923cc6..e684037a0f 100644 --- a/CRM/Report/Form/Member/Summary.php +++ b/CRM/Report/Form/Member/Summary.php @@ -149,7 +149,7 @@ class CRM_Report_Form_Member_Summary extends CRM_Report_Form { ), 'contact_sub_type' => array( - 'title' => ts('Contact SubType'), + 'title' => ts('Contact Subtype'), ), ), ), diff --git a/CRM/Utils/DeprecatedUtils.php b/CRM/Utils/DeprecatedUtils.php index eff034adaf..900f6ef8a5 100644 --- a/CRM/Utils/DeprecatedUtils.php +++ b/CRM/Utils/DeprecatedUtils.php @@ -1374,7 +1374,7 @@ function _civicrm_api3_deprecated_contact_check_params( if ($csType = CRM_Utils_Array::value('contact_sub_type', $params)) { if (!(CRM_Contact_BAO_ContactType::isExtendsContactType($csType, $params['contact_type']))) { - return civicrm_api3_create_error("Invalid or Mismatched Contact SubType: " . implode(', ', (array)$csType)); + return civicrm_api3_create_error("Invalid or Mismatched Contact Subtype: " . implode(', ', (array)$csType)); } } diff --git a/api/v3/Contact.php b/api/v3/Contact.php index 8e55caf96b..3db94b1622 100644 --- a/api/v3/Contact.php +++ b/api/v3/Contact.php @@ -330,7 +330,7 @@ function _civicrm_api3_contact_check_params( &$params, $dupeCheck = true, $dupeE if (!empty($params['contact_sub_type']) && !empty($params['contact_type'])) { if (!(CRM_Contact_BAO_ContactType::isExtendsContactType($params['contact_sub_type'], $params['contact_type']))) { - throw new API_Exception("Invalid or Mismatched Contact SubType: " . implode(', ', (array)$params['contact_sub_type'])); + throw new API_Exception("Invalid or Mismatched Contact Subtype: " . implode(', ', (array)$params['contact_sub_type'])); } } diff --git a/tests/phpunit/api/v3/CustomValueContactTypeTest.php b/tests/phpunit/api/v3/CustomValueContactTypeTest.php index 1afcfd8844..17886daf79 100644 --- a/tests/phpunit/api/v3/CustomValueContactTypeTest.php +++ b/tests/phpunit/api/v3/CustomValueContactTypeTest.php @@ -47,7 +47,7 @@ class api_v3_CustomValueContactTypeTest extends CiviUnitTestCase { function get_info() { return array( 'name' => 'Custom Data For Contact Subtype', - 'description' => 'Test Custom Data for Contact subtype.', + 'description' => 'Test Custom Data for Contact Subtype.', 'group' => 'CiviCRM API Tests', ); } -- 2.25.1