From 4962f783e1660cfe8ae78aaba213c34ea00f1d91 Mon Sep 17 00:00:00 2001 From: Bradley Taylor Date: Sat, 6 Nov 2021 12:05:17 +0000 Subject: [PATCH] Make more hardcoded strings available for translation --- CRM/Batch/Form/Entry.php | 2 +- CRM/Case/Form/Activity.php | 2 +- CRM/Contact/Form/Edit/Individual.php | 2 +- CRM/Contribute/Form/ContributionCharts.php | 4 ++-- CRM/Core/SelectValues.php | 6 +++--- CRM/Event/BAO/Query.php | 2 +- CRM/Report/Form/Case/Detail.php | 2 +- templates/CRM/Admin/Form/ScheduleReminders.tpl | 2 +- templates/CRM/Admin/Page/Options.tpl | 2 +- templates/CRM/Contact/Page/DedupeFind.tpl | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/CRM/Batch/Form/Entry.php b/CRM/Batch/Form/Entry.php index 1e204d8293..0a395b52af 100644 --- a/CRM/Batch/Form/Entry.php +++ b/CRM/Batch/Form/Entry.php @@ -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?'), diff --git a/CRM/Case/Form/Activity.php b/CRM/Case/Form/Activity.php index 01714e436b..0415212fd8 100644 --- a/CRM/Case/Form/Activity.php +++ b/CRM/Case/Form/Activity.php @@ -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(); diff --git a/CRM/Contact/Form/Edit/Individual.php b/CRM/Contact/Form/Edit/Individual.php index f4d933933a..4547b56e33 100644 --- a/CRM/Contact/Form/Edit/Individual.php +++ b/CRM/Contact/Form/Edit/Individual.php @@ -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.'), diff --git a/CRM/Contribute/Form/ContributionCharts.php b/CRM/Contribute/Form/ContributionCharts.php index 84da27929d..57673d9470 100644 --- a/CRM/Contribute/Form/ContributionCharts.php +++ b/CRM/Contribute/Form/ContributionCharts.php @@ -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. diff --git a/CRM/Core/SelectValues.php b/CRM/Core/SelectValues.php index c31dcdcdb6..7d4522cebb 100644 --- a/CRM/Core/SelectValues.php +++ b/CRM/Core/SelectValues.php @@ -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; } diff --git a/CRM/Event/BAO/Query.php b/CRM/Event/BAO/Query.php index ba9a353df8..61500c645f 100644 --- a/CRM/Event/BAO/Query.php +++ b/CRM/Event/BAO/Query.php @@ -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; } diff --git a/CRM/Report/Form/Case/Detail.php b/CRM/Report/Form/Case/Detail.php index 3cb0fcfbd9..053e21c540 100644 --- a/CRM/Report/Form/Case/Detail.php +++ b/CRM/Report/Form/Case/Detail.php @@ -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', ], ], diff --git a/templates/CRM/Admin/Form/ScheduleReminders.tpl b/templates/CRM/Admin/Form/ScheduleReminders.tpl index db6e95ca71..6ab425a5c0 100644 --- a/templates/CRM/Admin/Form/ScheduleReminders.tpl +++ b/templates/CRM/Admin/Form/ScheduleReminders.tpl @@ -31,7 +31,7 @@ {$form.start_action_offset.label} - {$form.absolute_date.html} OR
+ {$form.absolute_date.html} {ts}OR{/ts}
diff --git a/templates/CRM/Admin/Page/Options.tpl b/templates/CRM/Admin/Page/Options.tpl index 136c97ca0b..ad2d4d5b9d 100644 --- a/templates/CRM/Admin/Page/Options.tpl +++ b/templates/CRM/Admin/Page/Options.tpl @@ -100,7 +100,7 @@ {ts}Value{/ts} {/if} - {if $gName eq "payment_instrument"}Account{/if} + {if $gName eq "payment_instrument"}{ts}Account{/ts}{/if} {if !empty($showCounted)}{ts}Counted?{/ts}{/if} {if !empty($showVisibility)}{ts}Visibility{/ts}{/if} {ts}Description{/ts} diff --git a/templates/CRM/Contact/Page/DedupeFind.tpl b/templates/CRM/Contact/Page/DedupeFind.tpl index c7f0ea7804..4175b3fd05 100644 --- a/templates/CRM/Contact/Page/DedupeFind.tpl +++ b/templates/CRM/Contact/Page/DedupeFind.tpl @@ -55,7 +55,7 @@
- Show / Hide columns: + {ts}Show / Hide columns:{/ts} -- 2.25.1