Make more hardcoded strings available for translation
authorBradley Taylor <hello@brad-taylor.co.uk>
Sat, 6 Nov 2021 12:05:17 +0000 (12:05 +0000)
committerBradley Taylor <hello@brad-taylor.co.uk>
Sat, 6 Nov 2021 12:05:17 +0000 (12:05 +0000)
CRM/Batch/Form/Entry.php
CRM/Case/Form/Activity.php
CRM/Contact/Form/Edit/Individual.php
CRM/Contribute/Form/ContributionCharts.php
CRM/Core/SelectValues.php
CRM/Event/BAO/Query.php
CRM/Report/Form/Case/Detail.php
templates/CRM/Admin/Form/ScheduleReminders.tpl
templates/CRM/Admin/Page/Options.tpl
templates/CRM/Contact/Page/DedupeFind.tpl

index 1e204d8293020b528f032578bd87f5200563b561..0a395b52afad3a2dd833dc7c4bc63bf1e619773b 100644 (file)
@@ -319,7 +319,7 @@ class CRM_Batch_Form_Entry extends CRM_Core_Form {
         $this->add('select', "member_option[$rowNumber]", '', $options);
       }
       if ($this->_batchInfo['type_id'] == $batchTypes['Pledge Payment']) {
-        $options = ['' => '-select-'];
+        $options = ['' => ts('-select-')];
         $optionTypes = [
           '1' => ts('Adjust Pledge Payment Schedule?'),
           '2' => ts('Adjust Total Pledge Amount?'),
index 01714e436b05a4dcb596827eb46b2c86688018c4..0415212fd8ded8ef4aa63be0c1bbb100e7d14b92 100644 (file)
@@ -255,7 +255,7 @@ class CRM_Case_Form_Activity extends CRM_Activity_Form_Activity {
       $openCaseID = CRM_Core_PseudoConstant::getKey('CRM_Activity_BAO_Activity', 'activity_type_id', 'Open Case');
       unset($aTypes[$openCaseID]);
       asort($aTypes);
-      $this->_fields['followup_activity_type_id']['attributes'] = ['' => '- select activity type -'] + $aTypes;
+      $this->_fields['followup_activity_type_id']['attributes'] = ['' => ts('- select activity type -')] + $aTypes;
     }
 
     parent::buildQuickForm();
index f4d933933a3c30915c800db695d7b833e212d98d..4547b56e33de0aa27993ff65f871ed2b6e47f561 100644 (file)
@@ -81,7 +81,7 @@ class CRM_Contact_Form_Edit_Individual {
 
     if (!$inlineEditMode) {
       //External Identifier Element
-      $form->addField('external_identifier', ['label' => 'External ID']);
+      $form->addField('external_identifier', ['label' => ts('External ID')]);
 
       $form->addRule('external_identifier',
         ts('External ID already exists in Database.'),
index 84da27929de7342d8db1d3daab5407d0f2577304..57673d947032d5fbf33a2bdc9fda9f6b1c33327e 100644 (file)
@@ -109,7 +109,7 @@ class CRM_Contribute_Form_ContributionCharts extends CRM_Core_Form {
         //build the params for chart.
         $chartData['by_month']['values'][$monthName] = $val;
       }
-      $chartData['by_month']['legend'] = 'By Month' . ' - ' . $selectedYear;
+      $chartData['by_month']['legend'] = ts('By Month - %1', [1 => $selectedYear]);
 
       // handle onclick event.
       $chartData['by_month']['on_click_fun_name'] = 'byMonthOnClick';
@@ -124,7 +124,7 @@ class CRM_Contribute_Form_ContributionCharts extends CRM_Core_Form {
     $hasContributions = FALSE;
     if (is_array($chartInfoYearly)) {
       $hasContributions = TRUE;
-      $chartData['by_year']['legend'] = 'By Year';
+      $chartData['by_year']['legend'] = ts('By Year');
       $chartData['by_year']['values'] = $chartInfoYearly['By Year'];
 
       // handle onclick event.
index c31dcdcdb6c308336a7d9f25d1c59f933e658d82..7d4522cebb4a2071d243ff91bb8a7c2350ce4695 100644 (file)
@@ -410,7 +410,7 @@ class CRM_Core_SelectValues {
   public static function mapProvider() {
     static $map = NULL;
     if (!$map) {
-      $map = ['' => '- select -'] + CRM_Utils_System::getPluginList('templates/CRM/Contact/Form/Task/Map', ".tpl");
+      $map = ['' => ts('- select -')] + CRM_Utils_System::getPluginList('templates/CRM/Contact/Form/Task/Map', ".tpl");
     }
     return $map;
   }
@@ -424,7 +424,7 @@ class CRM_Core_SelectValues {
   public static function geoProvider() {
     static $geo = NULL;
     if (!$geo) {
-      $geo = ['' => '- select -'] + CRM_Utils_System::getPluginList('CRM/Utils/Geocode');
+      $geo = ['' => ts('- select -')] + CRM_Utils_System::getPluginList('CRM/Utils/Geocode');
     }
     return $geo;
   }
@@ -459,7 +459,7 @@ class CRM_Core_SelectValues {
   public static function addressProvider() {
     static $addr = NULL;
     if (!$addr) {
-      $addr = array_merge(['' => '- select -'], CRM_Utils_System::getPluginList('CRM/Utils/Address', '.php', ['BatchUpdate']));
+      $addr = array_merge(['' => ts('- select -')], CRM_Utils_System::getPluginList('CRM/Utils/Address', '.php', ['BatchUpdate']));
     }
     return $addr;
   }
index ba9a353df8df9151cf96f383d40f583a51edafc9..61500c645fe691942f438483a5b0278646460113 100644 (file)
@@ -323,7 +323,7 @@ class CRM_Event_BAO_Query extends CRM_Core_BAO_Query {
             "Boolean"
           );
 
-          $isTest = $value ? 'a Test' : 'not a Test';
+          $isTest = $value ? ts('a Test') : ts('not a Test');
           $query->_qill[$grouping][] = ts("Participant is %1", [1 => $isTest]);
           $query->_tables['civicrm_participant'] = $query->_whereTables['civicrm_participant'] = 1;
         }
index 3cb0fcfbd9767bd08bdb6b5436598a883af8e30b..053e21c540210359a5675da169dc882dfa9fa0c9 100644 (file)
@@ -122,7 +122,7 @@ class CRM_Report_Form_Case_Detail extends CRM_Report_Form {
         'dao' => 'CRM_Case_DAO_Case',
         'order_bys' => [
           'case_type_title' => [
-            'title' => 'Case Type',
+            'title' => ts('Case Type'),
             'name' => 'title',
           ],
         ],
index db6e95ca7151e7b01996d471d7ef6d0e83074ccb..6ab425a5c01c82ba2b8f0139e89fdb5a95b41479 100644 (file)
@@ -31,7 +31,7 @@
 
     <tr class="crm-scheduleReminder-form-block-when">
         <td class="right">{$form.start_action_offset.label}</td>
-        <td colspan="3">{$form.absolute_date.html} <strong id='OR'>OR</strong><br /></td>
+        <td colspan="3">{$form.absolute_date.html} <strong id='OR'>{ts}OR{/ts}</strong><br /></td>
     </tr>
 
     <tr id="relativeDate" class="crm-scheduleReminder-form-block-description">
index 136c97ca0baa4999cd0194efa96cb26b2f5443ce..ad2d4d5b9d009f2f78c2802b7d48e1db6b97b1a0 100644 (file)
                     {ts}Value{/ts}
                 {/if}
             </th>
-            {if $gName eq "payment_instrument"}<th>Account</th>{/if}
+            {if $gName eq "payment_instrument"}<th>{ts}Account{/ts}</th>{/if}
             {if !empty($showCounted)}<th>{ts}Counted?{/ts}</th>{/if}
             {if !empty($showVisibility)}<th>{ts}Visibility{/ts}</th>{/if}
             <th id="nosort">{ts}Description{/ts}</th>
index c7f0ea7804a15ee728e56a338a7b1acd25378a08..4175b3fd05cd271791423ee5725846dccfd30ec0 100644 (file)
@@ -55,7 +55,7 @@
     </div><!-- /.crm-accordion-body -->
   </div><!-- /.crm-accordion-wrapper -->
   <div>
-    Show / Hide columns:
+    {ts}Show / Hide columns:{/ts}
     <input type='checkbox' id='steet-address' class='toggle-vis' data-column-main="7" data-column-dupe="8" >
         <label for="steet-address">{ts}Street Address{/ts}&nbsp;</label>
     <input type='checkbox' id='post-code' class='toggle-vis' data-column-main="9" data-column-dupe="10" >