for ($i = 1; $i < count($options); $i++) {
$this->addElement('select', "order_bys[{$i}][column]", ts('Order by Column'), $options);
$this->addElement('select', "order_bys[{$i}][order]", ts('Order by Order'), array(
- 'ASC' => 'Ascending',
- 'DESC' => 'Descending',
+ 'ASC' => ts('Ascending'),
+ 'DESC' => ts('Descending'),
));
}
/**
* You can define a custom title for the search form
*/
- $this->setTitle('My Search Title');
+ $this->setTitle(ts('My Search Title'));
/**
* if you are using the standard template, this array tells the template what elements
$dao->is_active = 1;
$dao->find();
$min_amount = array();
- $sel1[0] = '-select product-';
+ $sel1[0] = ts('-select product-');
while ($dao->fetch()) {
$sel1[$dao->id] = $dao->name . " ( " . $dao->sku . " )";
$min_amount[$dao->id] = $dao->min_contribution;
if (array_key_exists('civicrm_contact', $this->_columns)) {
$this->_columns['civicrm_contact']['fields']['exposed_id'] = array(
'name' => 'id',
- 'title' => 'Contact ID',
+ 'title' => ts('Contact ID'),
'no_repeat' => TRUE,
);
}
case CRM_Report_Form::OP_DATE:
// build datetime fields
- CRM_Core_Form_Date::buildDateRange($this, $fieldName, $count, '_from', '_to', 'From:', FALSE, $operations);
+ CRM_Core_Form_Date::buildDateRange($this, $fieldName, $count, '_from', '_to', ts('From:'), FALSE, $operations);
$count++;
break;
case CRM_Report_Form::OP_DATETIME:
// build datetime fields
- CRM_Core_Form_Date::buildDateRange($this, $fieldName, $count, '_from', '_to', 'From:', FALSE, $operations, 'searchDate', TRUE);
+ CRM_Core_Form_Date::buildDateRange($this, $fieldName, $count, '_from', '_to', ts('From:'), FALSE, $operations, 'searchDate', TRUE);
$count++;
break;
$this->assignTabs();
$this->sqlArray[] = $sql;
foreach (array('LEFT JOIN') as $term) {
- $sql = str_replace($term, '<br>  ' . $term, $sql);
+ $sql = str_replace($term, '<br />  ' . $term, $sql);
}
foreach (array('FROM', 'WHERE', 'GROUP BY', 'ORDER BY', 'LIMIT', ';') as $term) {
- $sql = str_replace($term, '<br><br>' . $term, $sql);
+ $sql = str_replace($term, '<br /><br />' . $term, $sql);
}
- $this->sql .= $sql . "<br>";
+ $this->sql .= $sql . "<br />";
$this->assign('sql', $this->sql);
}
for ($i = 1; $i <= 5; $i++) {
$this->addElement('select', "order_bys[{$i}][column]", ts('Order by Column'), $options);
$this->addElement('select', "order_bys[{$i}][order]", ts('Order by Order'), array(
- 'ASC' => 'Ascending',
- 'DESC' => 'Descending',
+ 'ASC' => ts('Ascending'),
+ 'DESC' => ts('Descending'),
));
$this->addElement('checkbox', "order_bys[{$i}][section]", ts('Order by Section'), FALSE, array('id' => "order_by_section_$i"));
$this->addElement('checkbox', "order_bys[{$i}][pageBreak]", ts('Page Break'), FALSE, array('id' => "order_by_pagebreak_$i"));
}
elseif (isset($this->_columnHeaders[$colName])) {
if ($subtotal) {
- $row[$colName] = "Subtotal";
+ $row[$colName] = ts('Subtotal');
$subtotal = FALSE;
}
else {
/**
* BeginPostProcess function run in both report mode and non-report mode (api).
*/
- public function beginPostProcessCommon() {}
+ public function beginPostProcessCommon() {
+ }
/**
* Build the report query.
case 'Boolean':
$curFilters[$fieldName]['operatorType'] = CRM_Report_Form::OP_SELECT;
- $curFilters[$fieldName]['options'] = array('' => ts('- select -'))
- + CRM_Core_PseudoConstant::get('CRM_Core_BAO_CustomField', 'custom_' . $customDAO->cf_id, array(), 'search');
+ $curFilters[$fieldName]['options'] = array('' => ts('- select -')) + CRM_Core_PseudoConstant::get('CRM_Core_BAO_CustomField', 'custom_' . $customDAO->cf_id, array(), 'search');
$curFilters[$fieldName]['type'] = CRM_Utils_Type::T_INT;
break;
if ($orderBy) {
$addressFields['civicrm_address']['order_bys'] = array(
'street_name' => array('title' => ts('Street Name')),
- 'street_number' => array('title' => 'Odd / Even Street Number'),
+ 'street_number' => array('title' => ts('Odd / Even Street Number')),
'street_address' => NULL,
'city' => NULL,
'postal_code' => NULL,
'dao' => 'CRM_Core_DAO_Email',
'fields' => array(
'email' => array(
- 'title' => 'Email',
+ 'title' => ts('Email'),
),
),
'order_bys' => array(
'dao' => 'CRM_Core_DAO_Email',
'fields' => array(
'phone' => array(
- 'title' => 'Phone',
+ 'title' => ts('Phone'),
),
),
'grouping' => 'contact-fields',
public function modifyColumnHeaders() {
//CRM-16719 modify name of column
if (!empty($this->_columnHeaders['civicrm_activity_status_id'])) {
- $this->_columnHeaders['civicrm_activity_status_id']['title'] = "Status";
+ $this->_columnHeaders['civicrm_activity_status_id']['title'] = ts('Status');
}
}
'name' => 'street_number',
'dbAlias' => 'address_civireport.street_number%2',
),
- 'street_number' => array('title' => 'Street Number'),
+ 'street_number' => array('title' => ts('Street Number')),
),
'grouping' => 'location-fields',
),
'title' => ts('Relationship Status'),
'operatorType' => CRM_Report_Form::OP_SELECT,
'options' => array(
- '' => '- Any -',
- 1 => 'Active',
- 0 => 'Inactive',
+ '' => ts('- Any -'),
+ 1 => ts('Active'),
+ 0 => ts('Inactive'),
),
'type' => CRM_Utils_Type::T_INT,
),
//for displaying relationship type filter
if ($value['title'] == 'Relationship') {
$relTypes = CRM_Core_PseudoConstant::relationshipType();
- $op = CRM_Utils_Array::value('relationship_type_id_op', $this->_params) == 'in' ?
- ts('Is one of') . ' ' : ts('Is not one of') . ' ';
+ $op = CRM_Utils_Array::value('relationship_type_id_op', $this->_params) == 'in' ? ts('Is one of') . ' ' : ts('Is not one of') . ' ';
$relationshipTypes = array();
foreach ($this->_params['relationship_type_id_value'] as $relationship) {
$relationshipTypes[] = $relTypes[$relationship]['label_' . $this->relationType];
$select[] = "SUM({$field['dbAlias']}) as {$tableName}_{$fieldName}";
$this->_columnHeaders["civicrm_upto_{$upTo_year}"]['type'] = $field['type'];
- $this->_columnHeaders["civicrm_upto_{$upTo_year}"]['title'] = "Up To $upTo_year";
+ $this->_columnHeaders["civicrm_upto_{$upTo_year}"]['title'] = ts("Up To %1", array(1 => $upTo_year));
$this->_columnHeaders["year_{$previous_ppyear}"]['type'] = $field['type'];
$this->_columnHeaders["year_{$previous_ppyear}"]['title'] = $previous_ppyear;
$this->_columnHeaders["year_{$previous_year}"]['title'] = $previous_year;
$this->_columnHeaders["civicrm_life_time_total"]['type'] = $field['type'];
- $this->_columnHeaders["civicrm_life_time_total"]['title'] = 'LifeTime';;
+ $this->_columnHeaders["civicrm_life_time_total"]['title'] = ts('LifeTime');
}
elseif ($fieldName == 'receive_date') {
$select[] = self::fiscalYearOffset($field['dbAlias']) .
if ($dao->fetch()) {
$statistics['counts']['amount'] = array(
'value' => $dao->amount,
- 'title' => 'Total LifeTime',
+ 'title' => ts('Total LifeTime'),
'type' => CRM_Utils_Type::T_MONEY,
);
}
foreach ($rows as $key => $row) {
$display["upto_{$upto}"]
- = CRM_Utils_Array::value("upto_{$upto}", $display)
- + CRM_Utils_Array::value("civicrm_upto_{$upto}", $row);
+ = CRM_Utils_Array::value("upto_{$upto}", $display) + CRM_Utils_Array::value("civicrm_upto_{$upto}", $row);
$display[$previous_year]
- = CRM_Utils_Array::value($previous_year, $display)
- + CRM_Utils_Array::value($previous_year, $row);
+ = CRM_Utils_Array::value($previous_year, $display) + CRM_Utils_Array::value($previous_year, $row);
$display[$previous_two_year]
- = CRM_Utils_Array::value($previous_two_year, $display)
- + CRM_Utils_Array::value($previous_two_year, $row);
+ = CRM_Utils_Array::value($previous_two_year, $display) + CRM_Utils_Array::value($previous_two_year, $row);
$display[$previous_three_year]
- = CRM_Utils_Array::value($previous_three_year, $display)
- + CRM_Utils_Array::value($previous_three_year, $row);
+ = CRM_Utils_Array::value($previous_three_year, $display) + CRM_Utils_Array::value($previous_three_year, $row);
}
$graphRows['value'] = $display;
'operatorType' => CRM_Report_Form::OP_DATE,
),
'currency' => array(
- 'title' => 'Currency',
+ 'title' => ts('Currency'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Core_OptionGroup::values('currencies_enabled'),
'default' => NULL,
'required' => TRUE,
),
'id' => array(
- 'title' => 'Event ID',
+ 'title' => ts('Event ID'),
'no_display' => TRUE,
'required' => TRUE,
),
}
$statistics['counts']['count'] = array(
'value' => $dao->count,
- 'title' => 'Total Participants',
+ 'title' => ts('Total Participants'),
'type' => CRM_Utils_Type::T_INT,
);
$statistics['counts']['amount'] = array(
'value' => $dao->amount,
- 'title' => 'Total Income',
+ 'title' => ts('Total Income'),
'type' => CRM_Utils_Type::T_MONEY,
);
$statistics['counts']['avg'] = array(
'value' => $avg,
- 'title' => 'Average',
+ 'title' => ts('Average'),
'type' => CRM_Utils_Type::T_MONEY,
);
}
'required' => TRUE,
),
'organization_name' => array(
- 'title' => 'Employer',
+ 'title' => ts('Employer'),
'default' => TRUE,
'no_repeat' => TRUE,
),
}
$statistics['counts']['count'] = array(
'value' => $dao->count,
- 'title' => 'Total Participants',
+ 'title' => ts('Total Participants'),
'type' => CRM_Utils_Type::T_INT,
);
$statistics['counts']['amount'] = array(
'value' => $dao->amount,
- 'title' => 'Total Income',
+ 'title' => ts('Total Income'),
'type' => CRM_Utils_Type::T_MONEY,
);
- $statistics['counts']['avg '] = array(
+ $statistics['counts']['avg'] = array(
'value' => $avg,
- 'title' => 'Average',
+ 'title' => ts('Average'),
'type' => CRM_Utils_Type::T_MONEY,
);
}
'type' => CRM_Utils_Type::T_INT,
);
$this->_columnHeaders['totalAmount'] = array(
- 'title' => 'Total Income',
+ 'title' => ts('Total Income'),
'type' => CRM_Utils_Type::T_STRING,
);
}
'civicrm_participant' => array(
'dao' => 'CRM_Event_DAO_Participant',
'fields' => array(
- 'participant_id' => array('title' => 'Participant ID'),
+ 'participant_id' => array('title' => ts('Participant ID')),
'participant_record' => array(
'name' => 'id',
'title' => ts('Participant ID'),
'options' => CRM_Event_PseudoConstant::participantRole(),
),
'participant_register_date' => array(
- 'title' => ' Registration Date',
+ 'title' => ts('Registration Date'),
'operatorType' => CRM_Report_Form::OP_DATE,
),
),
'grouping' => 'member-fields',
'fields' => array(
'membership_type_id' => array(
- 'title' => 'Membership Type',
+ 'title' => ts('Membership Type'),
'required' => TRUE,
'alter_display' => 'alterMembershipTypeID',
),
'status_id' => array(
- 'title' => 'Membership Status',
+ 'title' => ts('Membership Status'),
'required' => TRUE,
'alter_display' => 'alterMembershipStatusID',
),
'title' => ts('Payment Method'),
'alter_display' => 'alterPaymentType',
),
- 'source' => array('title' => 'Contribution Source'),
+ 'source' => array('title' => ts('Contribution Source')),
'trxn_id' => NULL,
'receive_date' => array('default' => TRUE),
'receipt_date' => NULL,
'title' => ts('Individual Contribution'),
'name' => 'id',
),
- 'source' => array('title' => 'Contribution Source'),
+ 'source' => array('title' => ts('Contribution Source')),
),
'grouping' => 'contribution-fields',
),
'options' => CRM_Contribute_PseudoConstant::financialType(),
),
'currency' => array(
- 'title' => 'Currency',
+ 'title' => ts('Currency'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Core_OptionGroup::values('currencies_enabled'),
'default' => NULL,
'dao' => 'CRM_Member_DAO_Membership',
'fields' => array(
'membership_type_id' => array(
- 'title' => 'Membership Type',
+ 'title' => ts('Membership Type'),
'required' => TRUE,
'no_repeat' => TRUE,
),
'title' => ts('Join Date'),
'default' => TRUE,
),
- 'source' => array('title' => 'Source'),
+ 'source' => array('title' => ts('Source')),
),
'filters' => array(
'join_date' => array('operatorType' => CRM_Report_Form::OP_DATE),
'type' => CRM_Utils_Type::T_INT,
),
'currency' => array(
- 'title' => 'Currency',
+ 'title' => ts('Currency'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Core_OptionGroup::values('currencies_enabled'),
'default' => NULL,
'grouping' => 'member-fields',
'fields' => array(
'membership_type_id' => array(
- 'title' => 'Membership Type',
+ 'title' => ts('Membership Type'),
'required' => TRUE,
),
),
'type' => 12,
),
'membership_type_id' => array(
- 'title' => 'Membership Type',
+ 'title' => ts('Membership Type'),
'default' => TRUE,
'chart' => TRUE,
),
),
'filters' => array(
'currency' => array(
- 'title' => 'Currency',
+ 'title' => ts('Currency'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Core_OptionGroup::values('currencies_enabled'),
'default' => NULL,
// If we have a campaign, build out the relevant elements
if ($campaignEnabled && !empty($this->activeCampaigns)) {
$this->_columns['civicrm_membership']['fields']['campaign_id'] = array(
- 'title' => 'Campaign',
+ 'title' => ts('Campaign'),
'default' => 'false',
);
$this->_columns['civicrm_membership']['filters']['campaign_id'] = array(
),
'filters' => array(
'pledge_create_date' => array(
- 'title' => 'Pledge Made Date',
+ 'title' => ts('Pledge Made Date'),
'operatorType' => CRM_Report_Form::OP_DATE,
),
'pledge_amount' => array(
'operatorType' => CRM_Report_Form::OP_INT,
),
'currency' => array(
- 'title' => 'Currency',
+ 'title' => ts('Currency'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Core_OptionGroup::values('currencies_enabled'),
'default' => NULL,
$this->_tagFilter = TRUE;
if ($campaignEnabled && !empty($this->activeCampaigns)) {
$this->_columns['civicrm_pledge']['fields']['campaign_id'] = array(
- 'title' => 'Campaign',
+ 'title' => ts('Campaign'),
'default' => 'false',
);
$this->_columns['civicrm_pledge']['filters']['campaign_id'] = array(
// Add Special headers
$this->_columnHeaders['scheduled_date'] = array(
'type' => CRM_Utils_Type::T_DATE,
- 'title' => 'Next Payment Due',
+ 'title' => ts('Next Payment Due'),
);
$this->_columnHeaders['scheduled_amount'] = array(
'type' => CRM_Utils_Type::T_MONEY,
- 'title' => 'Next Payment Amount',
+ 'title' => ts('Next Payment Amount'),
);
$this->_columnHeaders['status_id'] = NULL;
'operatorType' => CRM_Report_Form::OP_INT,
),
'currency' => array(
- 'title' => 'Currency',
+ 'title' => ts('Currency'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Core_OptionGroup::values('currencies_enabled'),
'default' => NULL,
),
'scheduled_amount' => array(
'type' => CRM_Utils_Type::T_MONEY,
- 'title' => 'Next Payment Amount',
+ 'title' => ts('Next Payment Amount'),
),
),
'filters' => array(
// If we have a campaign, build out the relevant elements
if ($campaignEnabled && !empty($this->activeCampaigns)) {
$this->_columns['civicrm_pledge']['fields']['campaign_id'] = array(
- 'title' => 'Campaign',
+ 'title' => ts('Campaign'),
'default' => 'false',
);
$this->_columns['civicrm_pledge']['filters']['campaign_id'] = array(
),
'filters' => array(
'pledge_create_date' => array(
- 'title' => 'Pledge Made Date',
+ 'title' => ts('Pledge Made Date'),
'operatorType' => CRM_Report_Form::OP_DATE,
),
'pledge_amount' => array(
'operatorType' => CRM_Report_Form::OP_INT,
),
'currency' => array(
- 'title' => 'Currency',
+ 'title' => ts('Currency'),
'operatorType' => CRM_Report_Form::OP_MULTISELECT,
'options' => CRM_Core_OptionGroup::values('currencies_enabled'),
'default' => NULL,
if ($dao->fetch()) {
$statistics['count']['amount'] = array(
'value' => $dao->amount,
- 'title' => 'Total Pledged',
+ 'title' => ts('Total Pledged'),
'type' => CRM_Utils_Type::T_MONEY,
);
$statistics['count']['count '] = array(
'value' => $dao->count,
- 'title' => 'Total No Pledges',
+ 'title' => ts('Total No Pledges'),
);
$statistics['count']['avg '] = array(
'value' => $dao->avg,
- 'title' => 'Average',
+ 'title' => ts('Average'),
'type' => CRM_Utils_Type::T_MONEY,
);
}