Skip to content

Commit

Permalink
Apply gettext on catalog types & subtypes
Browse files Browse the repository at this point in the history
  • Loading branch information
mzazrivec committed Apr 20, 2018
1 parent 17cb33d commit 3d2ff7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/views/catalog/_form_basic_info.html.haml
Expand Up @@ -59,9 +59,9 @@
.col-md-4
%p.form-control-static
- if @record.try(:id)
= h(ServiceTemplate::GENERIC_ITEM_SUBTYPES[@edit[:new][:generic_subtype]])
= h(_(ServiceTemplate::GENERIC_ITEM_SUBTYPES[@edit[:new][:generic_subtype]]))
- else
- available_subtypes = ServiceTemplate::GENERIC_ITEM_SUBTYPES.invert.to_a.sort_by { |a| a.first.downcase }
- available_subtypes = ServiceTemplate::GENERIC_ITEM_SUBTYPES.map { |k, v| [_(v), k]} .sort_by { |a| a.first.downcase }
= select_tag('generic_subtype',
options_for_select(available_subtypes, @edit[:new][:generic_subtype]),
"data-miq_sparkle_on" => true,
Expand Down
4 changes: 2 additions & 2 deletions app/views/catalog/_sandt_tree_show.html.haml
Expand Up @@ -46,13 +46,13 @@
%label.col-md-3.control-label
= _('Item Type')
.col-md-9
= h(ServiceTemplate::CATALOG_ITEM_TYPES[@record.prov_type])
= h(_(ServiceTemplate::CATALOG_ITEM_TYPES[@record.prov_type]))
- if @record.prov_type == "generic"
.form-group
%label.col-md-3.control-label
= _('Subtype')
.col-md-9
= h(ServiceTemplate::GENERIC_ITEM_SUBTYPES[@record[:generic_subtype]])
= h(_(ServiceTemplate::GENERIC_ITEM_SUBTYPES[@record[:generic_subtype]]))
- if @record.prov_type == "generic_orchestration"
.form-group
%label.col-md-3.control-label
Expand Down

0 comments on commit 3d2ff7b

Please sign in to comment.