$group->save();
if (!isset($params['id'])) {
if (!isset($params['table_name'])) {
- $munged_title = strtolower(CRM_Utils_String::munge($group->title, '_', 32));
+ $munged_title = strtolower(CRM_Utils_String::munge($group->title, '_', 42));
$tableName = "civicrm_value_{$munged_title}_{$group->id}";
}
$group->table_name = $tableName;
if (is_object($coDAO)) {
while ($coDAO->fetch()) {
- $options[$coDAO->value] = $coDAO->label;
+ if ($dataType == 'Country') {
+ // NB: using ts() on a variable here is OK, since the value is pre-determined, not variable
+ // and already extracted to .pot files.
+ $options[$coDAO->value] = ts($coDAO->label, array('context' => 'country'));
+ }
+ elseif ($dataType == 'StateProvince') {
+ $options[$coDAO->value] = ts($coDAO->label, array('context' => 'province'));
+ }
+ else {
+ $options[$coDAO->value] = $coDAO->label;
+ }
}
}