From b187a9b1293392fe296a2ab2cbbb550cb2fca70d Mon Sep 17 00:00:00 2001 From: Wieland Lindenthal Date: Fri, 24 Mar 2017 10:29:13 +0100 Subject: [PATCH] Remove translation logic for group names from form-configuration form --- app/helpers/types_helper.rb | 13 +------------ app/views/types/form/_form_configuration.html.erb | 8 ++++---- 2 files changed, 5 insertions(+), 16 deletions(-) diff --git a/app/helpers/types_helper.rb b/app/helpers/types_helper.rb index 3625ddfe02..a0610bfd1f 100644 --- a/app/helpers/types_helper.rb +++ b/app/helpers/types_helper.rb @@ -75,11 +75,8 @@ module ::TypesHelper } end - extended_group = { key: group[0], translation: group_translate(group[0]) } - - [extended_group, extended_attributes] + [group[0], extended_attributes] end - inactives = inactive_attributes.map do |key, attribute| { key: key, @@ -109,14 +106,6 @@ module ::TypesHelper end end - def group_translate(name) - if ['details', 'estimates_and_time', 'other', 'people'].include? name - I18n.t("label_#{name}") - else - name - end - end - def translated_attribute_name(name, attr) if attr[:name_source] attr[:name_source].call diff --git a/app/views/types/form/_form_configuration.html.erb b/app/views/types/form/_form_configuration.html.erb index 026e807509..8c62de5e53 100644 --- a/app/views/types/form/_form_configuration.html.erb +++ b/app/views/types/form/_form_configuration.html.erb @@ -71,14 +71,14 @@ See doc/COPYRIGHT.rdoc for more details.
<% form_configuration_groups(@type)[:actives].each do |group, attributes| %> -
+
- <%= group[:translation] %> + <%= group %>
<%= I18n.t('label_always_visible') %>