* @param string $field
* @param string $fieldType
* @param bool $active
+ * @param bool $localize
+ * if true, localize the results before returning.
*
* @return array
*/
public static function getRowValues(
$groupName, $fieldValue, $field = 'name',
- $fieldType = 'String', $active = TRUE
+ $fieldType = 'String', $active = TRUE, $localize = FALSE
) {
$query = "
SELECT v.id, v.label, v.value, v.name, v.weight, v.description
$row[$fld] = $dao->$fld;
}
}
+
+ if ($localize) {
+ foreach (array('label', 'description') as $f) {
+ $row[$f] = ts($row[$f]);
+ }
+ }
+
return $row;
}
$optionVal = CRM_Report_Utils_Report::getValueFromUrl();
$templateInfo = CRM_Core_OptionGroup::getRowValues('report_template', "{$optionVal}", 'value',
- 'String', FALSE
+ 'String', FALSE, TRUE
);
$extKey = strpos(CRM_Utils_Array::value('name', $templateInfo), '.');
}
if (strstr(CRM_Utils_Array::value('name', $templateInfo), '_Form') || !is_null($reportClass)) {
- CRM_Utils_System::setTitle($templateInfo['label'] . ' - Template');
+ CRM_Utils_System::setTitle(ts('%1 - Template', array(1 => $templateInfo['label'])));
$this->assign('reportTitle', $templateInfo['label']);
$session = CRM_Core_Session::singleton();
) {
continue;
}
- $rows[$dao->component_name][$dao->value]['title'] = $dao->label;
- $rows[$dao->component_name][$dao->value]['description'] = $dao->description;
+ $rows[$dao->component_name][$dao->value]['title'] = ts($dao->label);
+ $rows[$dao->component_name][$dao->value]['description'] = ts($dao->description);
$rows[$dao->component_name][$dao->value]['url'] = CRM_Utils_System::url('civicrm/report/' . trim($dao->value, '/'), 'reset=1');
if ($dao->instance_id) {
$rows[$dao->component_name][$dao->value]['instanceUrl'] = CRM_Utils_System::url('civicrm/report/list',