CRM-16119: Fix incorrect usages of ts().
authorMathieu Lutfy <mathieu@bidon.ca>
Tue, 17 Mar 2015 00:13:35 +0000 (20:13 -0400)
committerMathieu Lutfy <mathieu@bidon.ca>
Wed, 18 Mar 2015 18:18:44 +0000 (14:18 -0400)
CRM/Campaign/Form/Task/Interview.php
CRM/Campaign/Form/Task/Reserve.php
CRM/Campaign/Page/AJAX.php
CRM/Contact/Form/Edit/TagsAndGroups.php
CRM/Contribute/Form/AdditionalPayment.php
CRM/Event/Form/ParticipantFeeSelection.php

index 649a42333541a5161dbffe6d9a0d9c7ced7ff3d8..2954a9d80e3d905bfdf7cdc664561789862d4ea4 100755 (executable)
@@ -546,8 +546,7 @@ WHERE {$clause}
     $subject = '';
     $surveyTitle = CRM_Utils_Array::value('surveyTitle', $params);
     if ($surveyTitle) {
-      $subject = ts('%1', array(1 => $surveyTitle));
-      $subject .= ' - ';
+      $subject = $surveyTitle . ' - ';
     }
     $subject .= ts('Respondent Interview');
 
index 3fd757bfda47a59dada782e01d39294b709fa71e..c843d3767ddfaf4e844134410355a5c27689fd97 100644 (file)
@@ -253,7 +253,7 @@ class CRM_Campaign_Form_Task_Reserve extends CRM_Campaign_Form_Task {
 
     $reservedVoterIds = array();
     foreach ($this->_contactIds as $cid) {
-      $subject = ts('%1', array(1 => $this->_surveyDetails['title'])) . ' - ' . ts('Respondent Reservation');
+      $subject = $this->_surveyDetails['title'] . ' - ' . ts('Respondent Reservation');
       $session = CRM_Core_Session::singleton();
       $activityParams = array(
         'source_contact_id' => $session->get('userID'),
index 79a47cc4defcf75f1e62156f0c081da450934c0a..474b79e4415afd1268b92e35ec7e180d1f354f03 100644 (file)
@@ -435,7 +435,7 @@ class CRM_Campaign_Page_AJAX {
             $surveytitle = $surveyValues['title'];
           }
 
-          $subject = ts('%1', array(1 => $surveytitle)) . ' - ' . ts('Respondent Reservation');
+          $subject = $surveytitle . ' - ' . ts('Respondent Reservation');
           $activityParams['subject'] = $subject;
           $activityParams['status_id'] = $scheduledStatusId;
           $activityParams['skipRecentView'] = 1;
index 23c83cf6bd569da8777d5685a9fadca2e536c101..72302f9a9dfe0fa00d7676135cb56ea4723159e3 100644 (file)
@@ -70,8 +70,8 @@ class CRM_Contact_Form_Edit_TagsAndGroups {
     $type = self::ALL,
     $visibility = FALSE,
     $isRequired = NULL,
-    $groupName = 'Group(s)',
-    $tagName = 'Tag(s)',
+    $groupName = ts('Group(s)'),
+    $tagName = ts('Tag(s)'),
     $fieldName = NULL,
     $groupElementType = 'checkbox'
   ) {
@@ -130,7 +130,7 @@ class CRM_Contact_Form_Edit_TagsAndGroups {
         }
 
         if ($groupElementType == 'select' && !empty($groupsOptions)) {
-          $form->add('select', $fName, ts('%1', array(1 => $groupName)), $groupsOptions, FALSE,
+          $form->add('select', $fName, $groupName, $groupsOptions, FALSE,
             array('id' => $fName, 'multiple' => 'multiple', 'class' => 'crm-select2')
           );
           $form->assign('groupCount', count($groupsOptions));
index e25f046314f32da6ee4712f6cafe2d93be403bcd..8a0d8990b25e3de844a6e6508d76bad8e14e5084 100644 (file)
@@ -264,9 +264,9 @@ class CRM_Contribute_Form_AdditionalPayment extends CRM_Contribute_Form_Abstract
     $attributes = CRM_Core_DAO::getAttribute('CRM_Financial_DAO_FinancialTrxn');
 
     $this->add('select', 'payment_processor_id', ts('Payment Processor'), $this->_processors, NULL);
-    $label = ($this->_refund) ? 'Refund Amount' : 'Payment Amount';
+    $label = ($this->_refund) ? ts('Refund Amount') : ts('Payment Amount');
     $this->addMoney('total_amount',
-      ts('%1', array(1 => $label)),
+      $label,
       FALSE,
       $attributes['total_amount'],
       TRUE, 'currency', NULL
@@ -289,8 +289,8 @@ class CRM_Contribute_Form_AdditionalPayment extends CRM_Contribute_Form_Abstract
     $this->add('textarea', 'receipt_text', ts('Confirmation Message'));
 
     // add various dates
-    $dateLabel = ($this->_refund) ? 'Refund Date' : 'Received Date';
-    $this->addDateTime('trxn_date', ts('%1', array(1 => $dateLabel)), FALSE, array('formatType' => 'activityDateTime'));
+    $dateLabel = ($this->_refund) ? ts('Refund Date') : ts('Received Date');
+    $this->addDateTime('trxn_date', $dateLabel, FALSE, array('formatType' => 'activityDateTime'));
 
     if ($this->_contactId && $this->_id) {
       if ($this->_component == 'event') {
index 7aa096163b290102e87732674b499d7284884e8e..a8ebbacccf528d86bbc1539dc7693c7d6de3b764 100644 (file)
@@ -116,9 +116,9 @@ class CRM_Event_Form_ParticipantFeeSelection extends CRM_Core_Form {
       $this->assign('lineItemTotal', $lineItemTotal);
     }
 
-    $title = "Change selections for {$this->_contributorDisplayName}";
+    $title = ts("Change selections for %1", array(1 => $this->_contributorDisplayName));
     if ($title) {
-      CRM_Utils_System::setTitle(ts('%1', array(1 => $title)));
+      CRM_Utils_System::setTitle($title);
     }
   }