Skip to content
Snippets Groups Projects
Commit f09ec3c6 authored by Jared Hancock's avatar Jared Hancock
Browse files

i18n: Add phrases for new custom list class

parent 5542fb86
Branches
Tags
No related merge requests found
...@@ -132,12 +132,6 @@ class DynamicList extends VerySimpleModel implements CustomList { ...@@ -132,12 +132,6 @@ class DynamicList extends VerySimpleModel implements CustomList {
'pk' => array('id'), 'pk' => array('id'),
); );
static $sort_modes = array(
'Alpha' => 'Alphabetical',
'-Alpha' => 'Alphabetical (Reversed)',
'SortCol' => 'Manually Sorted'
);
// Required fields // Required fields
static $fields = array('name', 'name_plural', 'sort_mode', 'notes'); static $fields = array('name', 'name_plural', 'sort_mode', 'notes');
...@@ -169,7 +163,11 @@ class DynamicList extends VerySimpleModel implements CustomList { ...@@ -169,7 +163,11 @@ class DynamicList extends VerySimpleModel implements CustomList {
} }
function getSortModes() { function getSortModes() {
return static::$sort_modes; return array(
'Alpha' => __('Alphabetical'),
'-Alpha' => __('Alphabetical (Reversed)'),
'SortCol' => __('Manually Sorted')
);
} }
function getSortMode() { function getSortMode() {
...@@ -435,7 +433,7 @@ class DynamicList extends VerySimpleModel implements CustomList { ...@@ -435,7 +433,7 @@ class DynamicList extends VerySimpleModel implements CustomList {
} }
} }
FormField::addFieldTypes('Custom Lists', array('DynamicList', 'getSelections')); FormField::addFieldTypes(/* trans */ 'Custom Lists', array('DynamicList', 'getSelections'));
/** /**
* Represents a single item in a dynamic list * Represents a single item in a dynamic list
...@@ -915,14 +913,14 @@ class TicketStatus extends VerySimpleModel implements CustomListItem { ...@@ -915,14 +913,14 @@ class TicketStatus extends VerySimpleModel implements CustomListItem {
} }
$this->set('flags', $flags); $this->set('flags', $flags);
} elseif ($val && !$f->errors()) { } elseif ($val && !$f->errors()) {
$f->addError('Unknown or invalid flag format', $name); $f->addError(__('Unknown or invalid flag format'), $name);
} }
break; break;
case 'state': case 'state':
if ($val && is_array($val)) if ($val && is_array($val))
$this->set('state', key($val)); $this->set('state', key($val));
else else
$f->addError('Unknown or invalid state', $name); $f->addError(__('Unknown or invalid state'), $name);
break; break;
default: //Custom properties the user might add. default: //Custom properties the user might add.
$properties[$f->get('id')] = $f->to_php($val); $properties[$f->get('id')] = $f->to_php($val);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment