From e60e0c0119bb8d535c309bdaf47483da9cc97392 Mon Sep 17 00:00:00 2001 From: yashodha Date: Fri, 20 Apr 2018 14:40:43 +0530 Subject: [PATCH] translate more strings --- CRM/Case/Form/Case.php | 4 ++-- CRM/Grant/BAO/Query.php | 7 +++---- CRM/Price/Page/Set.php | 2 +- CRM/Profile/Form.php | 6 +++--- CRM/Report/Form/Contact/Relationship.php | 4 ++-- CRM/Report/Form/Contribute/Summary.php | 2 +- CRM/Report/Form/Contribute/Sybunt.php | 6 +++--- CRM/Report/Form/Event/IncomeCountSummary.php | 8 ++++---- CRM/Report/Form/Event/Summary.php | 6 +++--- CRM/Report/Form/Mailing/Bounce.php | 2 +- CRM/Report/Form/Mailing/Clicks.php | 2 +- CRM/Report/Form/Mailing/Detail.php | 2 +- CRM/Report/Form/Member/Summary.php | 6 +++--- 13 files changed, 28 insertions(+), 29 deletions(-) diff --git a/CRM/Case/Form/Case.php b/CRM/Case/Form/Case.php index 72034835e1..5f59008df4 100644 --- a/CRM/Case/Form/Case.php +++ b/CRM/Case/Form/Case.php @@ -204,9 +204,9 @@ class CRM_Case_Form_Case extends CRM_Core_Form { $this->assign('multiClient', $isMultiClient); if ($this->_action & CRM_Core_Action::DELETE || $this->_action & CRM_Core_Action::RENEW) { - $title = 'Delete'; + $title = ts('Delete'); if ($this->_action & CRM_Core_Action::RENEW) { - $title = 'Restore'; + $title = ts('Restore'); } $this->addButtons(array( array( diff --git a/CRM/Grant/BAO/Query.php b/CRM/Grant/BAO/Query.php index ffbbb233af..33d5aa03ae 100644 --- a/CRM/Grant/BAO/Query.php +++ b/CRM/Grant/BAO/Query.php @@ -208,15 +208,14 @@ class CRM_Grant_BAO_Query extends CRM_Core_BAO_Query { case 'grant_report_received': if ($value == 1) { - $yesNo = 'Yes'; + $yesNo = ts('Yes'); $query->_where[$grouping][] = "civicrm_grant.grant_report_received $op $value"; } elseif ($value == 0) { - $yesNo = 'No'; + $yesNo = ts('No'); $query->_where[$grouping][] = "civicrm_grant.grant_report_received IS NULL"; } - - $query->_qill[$grouping][] = "Grant Report Received = $yesNo "; + $query->_qill[$grouping][] = ts('Grant Report Received = %1', array(1 => $yesNo)); $query->_tables['civicrm_grant'] = $query->_whereTables['civicrm_grant'] = 1; return; diff --git a/CRM/Price/Page/Set.php b/CRM/Price/Page/Set.php index 8bd781b198..d15f19305e 100644 --- a/CRM/Price/Page/Set.php +++ b/CRM/Price/Page/Set.php @@ -294,7 +294,7 @@ class CRM_Price_Page_Set extends CRM_Core_Page { $actionLinks = self::actionLinks(); //CRM-10117 if ($dao->is_reserved) { - $actionLinks[CRM_Core_Action::BROWSE]['name'] = 'View Price Fields'; + $actionLinks[CRM_Core_Action::BROWSE]['name'] = ts('View Price Fields'); } $priceSet[$dao->id]['action'] = CRM_Core_Action::formLink($actionLinks, $action, array('sid' => $dao->id), diff --git a/CRM/Profile/Form.php b/CRM/Profile/Form.php index 5a0ae26d62..09479b1e74 100644 --- a/CRM/Profile/Form.php +++ b/CRM/Profile/Form.php @@ -849,7 +849,7 @@ class CRM_Profile_Form extends CRM_Core_Form { public static function validateContactActivityProfile($activityId, $contactId, $gid) { $errors = array(); if (!$activityId) { - $errors[] = 'Profile is using one or more activity fields, and is missing the activity Id (aid) in the URL.'; + $errors[] = ts('Profile is using one or more activity fields, and is missing the activity Id (aid) in the URL.'); return $errors; } @@ -858,7 +858,7 @@ class CRM_Profile_Form extends CRM_Core_Form { CRM_Activity_BAO_Activity::retrieve($activityParams, $activityDetails); if (empty($activityDetails)) { - $errors[] = 'Invalid Activity Id (aid).'; + $errors[] = ts('Invalid Activity Id (aid).'); return $errors; } @@ -871,7 +871,7 @@ class CRM_Profile_Form extends CRM_Core_Form { !in_array($contactId, $activityDetails['target_contact']) ) ) { - $errors[] = 'This activity cannot be edited or viewed via this profile.'; + $errors[] = ts('This activity cannot be edited or viewed via this profile.'); } return $errors; diff --git a/CRM/Report/Form/Contact/Relationship.php b/CRM/Report/Form/Contact/Relationship.php index 46eb2e9c86..dd20fba0ea 100644 --- a/CRM/Report/Form/Contact/Relationship.php +++ b/CRM/Report/Form/Contact/Relationship.php @@ -590,10 +590,10 @@ class CRM_Report_Form_Contact_Relationship extends CRM_Report_Form { $isStatusFilter = FALSE; $relStatus = NULL; if (CRM_Utils_Array::value('is_active_value', $this->_params) == '1') { - $relStatus = 'Is equal to Active'; + $relStatus = ts('Is equal to Active'); } elseif (CRM_Utils_Array::value('is_active_value', $this->_params) == '0') { - $relStatus = 'Is equal to Inactive'; + $relStatus = ts('Is equal to Inactive'); } if (!empty($statistics['filters'])) { foreach ($statistics['filters'] as $id => $value) { diff --git a/CRM/Report/Form/Contribute/Summary.php b/CRM/Report/Form/Contribute/Summary.php index a6013a82e0..2ef86cd5ce 100644 --- a/CRM/Report/Form/Contribute/Summary.php +++ b/CRM/Report/Form/Contribute/Summary.php @@ -856,7 +856,7 @@ ROUND(AVG({$this->_aliases['civicrm_contribution_soft']}.amount), 2) as civicrm_ // build the chart. $config = CRM_Core_Config::Singleton(); $graphRows['xname'] = $this->_interval; - $graphRows['yname'] = "Amount ({$config->defaultCurrency})"; + $graphRows['yname'] = ts('Amount (%1)', array(1 => $config->defaultCurrency)); CRM_Utils_OpenFlashChart::chart($graphRows, $this->_params['charts'], $this->_interval); $this->assign('chartType', $this->_params['charts']); } diff --git a/CRM/Report/Form/Contribute/Sybunt.php b/CRM/Report/Form/Contribute/Sybunt.php index a7996d54d7..120a4d80ce 100644 --- a/CRM/Report/Form/Contribute/Sybunt.php +++ b/CRM/Report/Form/Contribute/Sybunt.php @@ -560,9 +560,9 @@ class CRM_Report_Form_Contribute_Sybunt extends CRM_Report_Form { $graphRows['value'] = $display; $config = CRM_Core_Config::Singleton(); $chartInfo = array( - 'legend' => 'Sybunt Report', - 'xname' => 'Year', - 'yname' => "Amount ({$config->defaultCurrency})", + 'legend' => ts('Sybunt Report'), + 'xname' => ts('Year'), + 'yname' => ts('Amount (%1)', array(1 => $config->defaultCurrency)), ); if ($this->_params['charts']) { // build the chart. diff --git a/CRM/Report/Form/Event/IncomeCountSummary.php b/CRM/Report/Form/Event/IncomeCountSummary.php index 236938d2ea..92a4b11c83 100644 --- a/CRM/Report/Form/Event/IncomeCountSummary.php +++ b/CRM/Report/Form/Event/IncomeCountSummary.php @@ -386,16 +386,16 @@ class CRM_Report_Form_Event_IncomeCountSummary extends CRM_Report_Form_Event { if ((!empty($rows)) && $countEvent != 1) { $chartInfo = array( - 'legend' => 'Participants Summary', - 'xname' => 'Event', - 'yname' => 'Total Participants', + 'legend' => ts('Participants Summary'), + 'xname' => ts('Event'), + 'yname' => ts('Total Participants'), ); if (!empty($graphRows)) { foreach ($graphRows[$this->_interval] as $key => $val) { $graph[$val] = $graphRows['value'][$key]; } $chartInfo['values'] = $graph; - $chartInfo['tip'] = 'Participants : #val#'; + $chartInfo['tip'] = ts('Participants : %1', array(1 => '#val#')); $chartInfo['xLabelAngle'] = 20; // build the chart. diff --git a/CRM/Report/Form/Event/Summary.php b/CRM/Report/Form/Event/Summary.php index 789733b824..c68a9e0d14 100644 --- a/CRM/Report/Form/Event/Summary.php +++ b/CRM/Report/Form/Event/Summary.php @@ -356,9 +356,9 @@ class CRM_Report_Form_Event_Summary extends CRM_Report_Form_Event { if ((!empty($rows)) && $countEvent != 1) { $config = CRM_Core_Config::Singleton(); $chartInfo = array( - 'legend' => 'Event Summary', - 'xname' => 'Event', - 'yname' => "Total Amount ({$config->defaultCurrency})", + 'legend' => ts('Event Summary'), + 'xname' => ts('Event'), + 'yname' => ts('Total Amount (%1)', array(1 => $config->defaultCurrency)), ); if (!empty($graphRows)) { foreach ($graphRows[$this->_interval] as $key => $val) { diff --git a/CRM/Report/Form/Mailing/Bounce.php b/CRM/Report/Form/Mailing/Bounce.php index e6c23e58b3..f11991859c 100644 --- a/CRM/Report/Form/Mailing/Bounce.php +++ b/CRM/Report/Form/Mailing/Bounce.php @@ -470,7 +470,7 @@ class CRM_Report_Form_Mailing_Bounce extends CRM_Report_Form { // If the email address has been deleted if (array_key_exists('civicrm_email_email', $row)) { if (empty($rows[$rowNum]['civicrm_email_email'])) { - $rows[$rowNum]['civicrm_email_email'] = 'Email address deleted'; + $rows[$rowNum]['civicrm_email_email'] = ts('Email address deleted'); } $entryFound = TRUE; } diff --git a/CRM/Report/Form/Mailing/Clicks.php b/CRM/Report/Form/Mailing/Clicks.php index 54a2d81022..be060bd0e0 100644 --- a/CRM/Report/Form/Mailing/Clicks.php +++ b/CRM/Report/Form/Mailing/Clicks.php @@ -369,7 +369,7 @@ class CRM_Report_Form_Mailing_Clicks extends CRM_Report_Form { // If the email address has been deleted if (array_key_exists('civicrm_email_email', $row)) { if (empty($rows[$rowNum]['civicrm_email_email'])) { - $rows[$rowNum]['civicrm_email_email'] = 'Email address deleted'; + $rows[$rowNum]['civicrm_email_email'] = ts('Email address deleted'); } $entryFound = TRUE; } diff --git a/CRM/Report/Form/Mailing/Detail.php b/CRM/Report/Form/Mailing/Detail.php index 5fd59ef725..a79c6b7dda 100644 --- a/CRM/Report/Form/Mailing/Detail.php +++ b/CRM/Report/Form/Mailing/Detail.php @@ -484,7 +484,7 @@ class CRM_Report_Form_Mailing_Detail extends CRM_Report_Form { // If the email address has been deleted if (array_key_exists('civicrm_email_email', $row)) { if (empty($rows[$rowNum]['civicrm_email_email'])) { - $rows[$rowNum]['civicrm_email_email'] = 'Email address deleted'; + $rows[$rowNum]['civicrm_email_email'] = ts('Email address deleted'); } $entryFound = TRUE; } diff --git a/CRM/Report/Form/Member/Summary.php b/CRM/Report/Form/Member/Summary.php index 522357fdcd..a84335b4b0 100644 --- a/CRM/Report/Form/Member/Summary.php +++ b/CRM/Report/Form/Member/Summary.php @@ -526,9 +526,9 @@ GROUP BY {$this->_aliases['civicrm_contribution']}.currency if ($isMembershipType) { $graphRows['value'] = $display; $chartInfo = array( - 'legend' => 'Membership Summary', - 'xname' => 'Member Since / Member Type', - 'yname' => 'Fees', + 'legend' => ts('Membership Summary'), + 'xname' => ts('Member Since / Member Type'), + 'yname' => ts('Fees'), ); CRM_Utils_OpenFlashChart::reportChart($graphRows, $this->_params['charts'], $interval, $chartInfo); } -- 2.25.1