From fd686bdde4c969533eabff20df08ccbcc1dacafc Mon Sep 17 00:00:00 2001 From: Bradley Taylor Date: Sat, 23 Oct 2021 11:52:00 +0100 Subject: [PATCH] Translate hardcoded labels passed to setTitle --- CRM/ACL/Form/WordPress/Permissions.php | 2 +- CRM/Activity/Form/Task/PDF.php | 2 +- CRM/Contact/Form/Task/PDFLetterCommon.php | 2 +- CRM/Contact/Form/Task/PDFTrait.php | 2 +- CRM/Core/Form/Task/PDFLetterCommon.php | 2 +- .../CRM/Contact/Form/Search/Custom/ActivitySearch.php | 2 +- .../CRM/Contact/Form/Search/Custom/ContribSYBNT.php | 2 +- .../CRM/Contact/Form/Search/Custom/ContributionAggregate.php | 2 +- .../CRM/Contact/Form/Search/Custom/DateAdded.php | 2 +- .../CRM/Contact/Form/Search/Custom/EventAggregate.php | 2 +- .../CRM/Contact/Form/Search/Custom/MultipleValues.php | 2 +- .../CRM/Contact/Form/Search/Custom/PriceSet.php | 2 +- .../CRM/Contact/Form/Search/Custom/Proximity.php | 2 +- .../CRM/Contact/Form/Search/Custom/TagContributions.php | 2 +- .../CRM/Contact/Form/Search/Custom/ZipCodeRange.php | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/CRM/ACL/Form/WordPress/Permissions.php b/CRM/ACL/Form/WordPress/Permissions.php index 6c49a0037a..5839aaf0a3 100644 --- a/CRM/ACL/Form/WordPress/Permissions.php +++ b/CRM/ACL/Form/WordPress/Permissions.php @@ -30,7 +30,7 @@ class CRM_ACL_Form_WordPress_Permissions extends CRM_Core_Form { */ public function buildQuickForm() { - $this->setTitle('WordPress Access Control'); + $this->setTitle(ts('WordPress Access Control')); // Get the core permissions array $permissionsArray = self::getPermissionArray(); diff --git a/CRM/Activity/Form/Task/PDF.php b/CRM/Activity/Form/Task/PDF.php index 8a7cd7abb0..e7a4441bad 100644 --- a/CRM/Activity/Form/Task/PDF.php +++ b/CRM/Activity/Form/Task/PDF.php @@ -23,7 +23,7 @@ class CRM_Activity_Form_Task_PDF extends CRM_Activity_Form_Task { */ public function preProcess(): void { parent::preProcess(); - $this->setTitle('Print/Merge Document'); + $this->setTitle(ts('Print/Merge Document')); } /** diff --git a/CRM/Contact/Form/Task/PDFLetterCommon.php b/CRM/Contact/Form/Task/PDFLetterCommon.php index f49ab98d51..bae7d601a7 100644 --- a/CRM/Contact/Form/Task/PDFLetterCommon.php +++ b/CRM/Contact/Form/Task/PDFLetterCommon.php @@ -55,7 +55,7 @@ class CRM_Contact_Form_Task_PDFLetterCommon extends CRM_Core_Form_Task_PDFLetter $defaults['from_email_address'] = current(CRM_Core_BAO_Domain::getNameAndEmail(FALSE, TRUE)); } $form->setDefaults($defaults); - $form->setTitle('Print/Merge Document'); + $form->setTitle(ts('Print/Merge Document')); } /** diff --git a/CRM/Contact/Form/Task/PDFTrait.php b/CRM/Contact/Form/Task/PDFTrait.php index 8a3146c8d8..c562e04d8b 100644 --- a/CRM/Contact/Form/Task/PDFTrait.php +++ b/CRM/Contact/Form/Task/PDFTrait.php @@ -179,7 +179,7 @@ trait CRM_Contact_Form_Task_PDFTrait { $defaults['from_email_address'] = current(CRM_Core_BAO_Domain::getNameAndEmail(FALSE, TRUE)); } $form->setDefaults($defaults); - $form->setTitle('Print/Merge Document'); + $form->setTitle(ts('Print/Merge Document')); } /** diff --git a/CRM/Core/Form/Task/PDFLetterCommon.php b/CRM/Core/Form/Task/PDFLetterCommon.php index f3774ce75b..bd3537371f 100644 --- a/CRM/Core/Form/Task/PDFLetterCommon.php +++ b/CRM/Core/Form/Task/PDFLetterCommon.php @@ -36,7 +36,7 @@ class CRM_Core_Form_Task_PDFLetterCommon { public static function preProcess(&$form) { CRM_Core_Error::deprecatedFunctionWarning('no alternative'); - $form->setTitle('Print/Merge Document'); + $form->setTitle(ts('Print/Merge Document')); } /** diff --git a/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/ActivitySearch.php b/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/ActivitySearch.php index 7c403fd0c1..890244e583 100644 --- a/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/ActivitySearch.php +++ b/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/ActivitySearch.php @@ -81,7 +81,7 @@ class CRM_Contact_Form_Search_Custom_ActivitySearch extends CRM_Contact_Form_Sea /** * You can define a custom title for the search form */ - $this->setTitle('Find Latest Activities'); + $this->setTitle(ts('Find Latest Activities')); /** * Define the search form fields here diff --git a/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/ContribSYBNT.php b/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/ContribSYBNT.php index cbd887c39f..90b4c4b141 100644 --- a/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/ContribSYBNT.php +++ b/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/ContribSYBNT.php @@ -95,7 +95,7 @@ class CRM_Contact_Form_Search_Custom_ContribSYBNT extends CRM_Contact_Form_Searc ); } - $this->setTitle('Contributions made in Year X and not Year Y'); + $this->setTitle(ts('Contributions made in Year X and not Year Y')); // @TODO: Decide on better names for "Exclusion" // @TODO: Add rule to ensure that exclusion dates are not in the inclusion range } diff --git a/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/ContributionAggregate.php b/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/ContributionAggregate.php index 2e640827ba..487eb1cf70 100644 --- a/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/ContributionAggregate.php +++ b/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/ContributionAggregate.php @@ -53,7 +53,7 @@ class CRM_Contact_Form_Search_Custom_ContributionAggregate extends CRM_Contact_F /** * You can define a custom title for the search form */ - $this->setTitle('Find Contributors by Aggregate Totals'); + $this->setTitle(ts('Find Contributors by Aggregate Totals')); /** * Define the search form fields here diff --git a/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/DateAdded.php b/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/DateAdded.php index 2e4877bac7..89d6d5801e 100644 --- a/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/DateAdded.php +++ b/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/DateAdded.php @@ -72,7 +72,7 @@ class CRM_Contact_Form_Search_Custom_DateAdded extends CRM_Contact_Form_Search_C $select2style ); - $this->setTitle('Search by date added to CiviCRM'); + $this->setTitle(ts('Search by date added to CiviCRM')); //redirect if group not available for search criteria if (count($groups) == 0) { diff --git a/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/EventAggregate.php b/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/EventAggregate.php index af1bd24238..283ae72f07 100644 --- a/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/EventAggregate.php +++ b/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/EventAggregate.php @@ -52,7 +52,7 @@ class CRM_Contact_Form_Search_Custom_EventAggregate extends CRM_Contact_Form_Sea /** * You can define a custom title for the search form */ - $this->setTitle('Find Totals for Events'); + $this->setTitle(ts('Find Totals for Events')); /** * Define the search form fields here diff --git a/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/MultipleValues.php b/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/MultipleValues.php index fe5d5374ce..8f148a5362 100644 --- a/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/MultipleValues.php +++ b/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/MultipleValues.php @@ -85,7 +85,7 @@ class CRM_Contact_Form_Search_Custom_MultipleValues extends CRM_Contact_Form_Sea */ public function buildForm(&$form) { - $this->setTitle('Multiple Value Custom Group Search and Export'); + $this->setTitle(ts('Multiple Value Custom Group Search and Export')); $form->add('text', 'sort_name', ts('Contact Name'), TRUE); diff --git a/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/PriceSet.php b/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/PriceSet.php index 49b5b32e95..007845840d 100644 --- a/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/PriceSet.php +++ b/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/PriceSet.php @@ -198,7 +198,7 @@ AND p.entity_id = e.id /** * You can define a custom title for the search form */ - $this->setTitle('Price Set Export'); + $this->setTitle(ts('Price Set Export')); /** * if you are using the standard template, this array tells the template what elements diff --git a/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/Proximity.php b/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/Proximity.php index 11533db374..e572e99f5e 100644 --- a/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/Proximity.php +++ b/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/Proximity.php @@ -108,7 +108,7 @@ class CRM_Contact_Form_Search_Custom_Proximity extends CRM_Contact_Form_Search_C /** * You can define a custom title for the search form */ - $this->setTitle('Proximity Search'); + $this->setTitle(ts('Proximity Search')); /** * if you are using the standard template, this array tells the template what elements diff --git a/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/TagContributions.php b/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/TagContributions.php index a0995d50ad..0c69d4899b 100644 --- a/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/TagContributions.php +++ b/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/TagContributions.php @@ -51,7 +51,7 @@ class CRM_Contact_Form_Search_Custom_TagContributions extends CRM_Contact_Form_S /** * You can define a custom title for the search form */ - $this->setTitle('Find Contribution Amounts by Tag'); + $this->setTitle(ts('Find Contribution Amounts by Tag')); /** * Define the search form fields here diff --git a/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/ZipCodeRange.php b/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/ZipCodeRange.php index 77dec63eab..bbbb2e25ae 100644 --- a/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/ZipCodeRange.php +++ b/ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/ZipCodeRange.php @@ -60,7 +60,7 @@ class CRM_Contact_Form_Search_Custom_ZipCodeRange extends CRM_Contact_Form_Searc /** * You can define a custom title for the search form */ - $this->setTitle('Zip Code Range Search'); + $this->setTitle(ts('Zip Code Range Search')); /** * if you are using the standard template, this array tells the template what elements -- 2.25.1