Makes hardcoded placeholder strings translatable
authorBradley Taylor <hello@brad-taylor.co.uk>
Sat, 16 Oct 2021 13:15:31 +0000 (14:15 +0100)
committerBradley Taylor <hello@brad-taylor.co.uk>
Sat, 16 Oct 2021 13:15:31 +0000 (14:15 +0100)
CRM/Contact/Form/Edit/TagsAndGroups.php
CRM/Contact/Form/Relationship.php
CRM/Event/Form/ManageEvent/Registration.php
CRM/Financial/Form/FinancialAccount.php
CRM/Report/Form/Campaign/SurveyDetails.php
CRM/Report/Form/Contribute/Bookkeeping.php
CRM/UF/Form/Field.php
ext/legacycustomsearches/CRM/Contact/Form/Search/Custom/ActivitySearch.php

index 11bb704fca2518cfd87a927409ce572924f8cddd..a3d060fc4726d103107f4f5be16ed79ead85c081 100644 (file)
@@ -115,7 +115,7 @@ class CRM_Contact_Form_Edit_TagsAndGroups {
 
         if ($groupElementType == 'select' && !empty($groupsOptions)) {
           $form->add('select2', $fName, $groupName, $groupsOptions, FALSE,
-            ['placeholder' => '- select -', 'multiple' => TRUE, 'class' => 'twenty']
+            ['placeholder' => ts('- select -'), 'multiple' => TRUE, 'class' => 'twenty']
           );
           $form->assign('groupCount', count($groupsOptions));
         }
index 6bbbdf3a91c8580521f03ab87659ae87cef8fa48..06d6d09ba18f2b77818449c1da833c80d7f61d14 100644 (file)
@@ -297,7 +297,7 @@ class CRM_Contact_Form_Relationship extends CRM_Core_Form {
       [
         'options' => ['' => ts('- select -')] + $relationshipList,
         'class' => 'huge',
-        'placeholder' => '- select -',
+        'placeholder' => ts('- select -'),
         'option_url' => 'civicrm/admin/reltype',
         'option_context' => [
           'contact_id' => $this->_contactId,
index 16fcd9c3f5d5c50e49e98aac5f0e6da284fa803b..7773107cc0e2ead4de48df6e804b3ab2723a1ca6 100644 (file)
@@ -258,7 +258,7 @@ class CRM_Event_Form_ManageEvent_Registration extends CRM_Event_Form_ManageEvent
     $this->assign('ruleFields', json_encode($ruleFields));
 
     $dedupeRules = [
-      '' => '- Unsupervised rule -',
+      '' => ts('- Unsupervised rule -'),
     ];
     $dedupeRules += CRM_Dedupe_BAO_DedupeRuleGroup::getByType('Individual');
     $this->add('select', 'dedupe_rule_group_id', ts('Duplicate matching rule'), $dedupeRules);
index 860d21003754b90c70984b9334c115cb1ea1bc5d..82fb432f8512741aebab6f45a9e22be64d758b46 100644 (file)
@@ -90,7 +90,7 @@ class CRM_Financial_Form_FinancialAccount extends CRM_Contribute_Form {
     $financialAccountType = CRM_Core_PseudoConstant::get('CRM_Financial_DAO_FinancialAccount', 'financial_account_type_id');
     if (!empty($financialAccountType)) {
       $element = $this->add('select', 'financial_account_type_id', ts('Financial Account Type'),
-        ['' => '- select -'] + $financialAccountType, TRUE, ['class' => 'crm-select2 huge']);
+        ['' => ts('- select -')] + $financialAccountType, TRUE, ['class' => 'crm-select2 huge']);
       if ($this->_isARFlag) {
         $element->freeze();
         $elementAccounting->freeze();
index 5b43d96f553fc5da5b3e7d75a1be7cdbdaca8b34..b7a34aec01773ab4b1f0a21332614666ef3d335f 100644 (file)
@@ -49,7 +49,7 @@ class CRM_Report_Form_Campaign_SurveyDetails extends CRM_Report_Form {
    */
   public function __construct() {
     //filter options for survey activity status.
-    $responseStatus = array('' => '- Any -');
+    $responseStatus = array('' => ts('- Any -'));
     self::$_surveyRespondentStatus = [];
     $activityStatus = CRM_Core_PseudoConstant::activityStatus('name');
     if ($statusId = array_search('Scheduled', $activityStatus)) {
index 2a3af7151613d4eac9bc7cc832d75957d83ec78c..b96c804409c6b2eb35a676ac3b6ac546138fdf7d 100644 (file)
@@ -112,7 +112,7 @@ class CRM_Report_Form_Contribute_Bookkeeping extends CRM_Report_Form {
               'title' => ts('Financial Account Owner - Debit'),
               'operatorType' => CRM_Report_Form::OP_SELECT,
               'type' => CRM_Utils_Type::T_INT,
-              'options' => ['' => '- Select Organization -'] + CRM_Financial_BAO_FinancialAccount::getOrganizationNames(FALSE),
+              'options' => ['' => ts('- Select Organization -')] + CRM_Financial_BAO_FinancialAccount::getOrganizationNames(FALSE),
               'name' => 'contact_id',
               'alias' => 'financial_account_civireport_debit',
             ],
@@ -128,7 +128,7 @@ class CRM_Report_Form_Contribute_Bookkeeping extends CRM_Report_Form {
               'title' => ts('Financial Account Owner - Credit'),
               'operatorType' => CRM_Report_Form::OP_SELECT,
               'type' => CRM_Utils_Type::T_INT,
-              'options' => ['' => '- Select Organization -'] + CRM_Financial_BAO_FinancialAccount::getOrganizationNames(FALSE),
+              'options' => ['' => ts('- Select Organization -')] + CRM_Financial_BAO_FinancialAccount::getOrganizationNames(FALSE),
               'name' => 'contact_id',
               'alias' => 'financial_account_civireport_credit',
             ],
index 997962cd40b1f77cd35c80b4f1167b66310712b0..43509401ab041472664103b07e36f93d05ae01fa 100644 (file)
@@ -287,7 +287,7 @@ class CRM_UF_Form_Field extends CRM_Core_Form {
     unset($contactTypes['']);
 
     $contactTypes = !empty($contactTypes) ? ['Contact' => 'Contacts'] + $contactTypes : [];
-    $sel1 = ['' => '- select -'] + $contactTypes;
+    $sel1 = ['' => ts('- select -')] + $contactTypes;
 
     if (!empty($fields['Activity'])) {
       $sel1['Activity'] = 'Activity';
index 7c403fd0c1a6ef089cfab08ba0675a7e0d6f9835..f3abfdbd796d1a6e1898d087cce84fd7479b1480 100644 (file)
@@ -96,7 +96,7 @@ class CRM_Contact_Form_Search_Custom_ActivitySearch extends CRM_Contact_Form_Sea
     );
 
     // Select box for Activity Type
-    $activityType = ['' => ' - select activity - '] + CRM_Core_PseudoConstant::activityType();
+    $activityType = ['' => ts(' - select activity - ')] + CRM_Core_PseudoConstant::activityType();
 
     $form->add('select', 'activity_type_id', ts('Activity Type'),
       $activityType,
@@ -104,7 +104,7 @@ class CRM_Contact_Form_Search_Custom_ActivitySearch extends CRM_Contact_Form_Sea
     );
 
     // textbox for Activity Status
-    $activityStatus = ['' => ' - select status - '] + CRM_Core_PseudoConstant::activityStatus();
+    $activityStatus = ['' => ts(' - select status - ')] + CRM_Core_PseudoConstant::activityStatus();
 
     $form->add('select', 'activity_status_id', ts('Activity Status'),
       $activityStatus,