diff --git a/app/helpers/compound_metric_configurations_helper.rb b/app/helpers/compound_metric_configurations_helper.rb index b0974ed..96b9100 100644 --- a/app/helpers/compound_metric_configurations_helper.rb +++ b/app/helpers/compound_metric_configurations_helper.rb @@ -1,5 +1,5 @@ module CompoundMetricConfigurationsHelper def scope_options - [["Method","METHOD"], ["Class", "CLASS"], ["Package", "PACKAGE"], ["Software", "SOFTWARE"]] + [[t("scopes.METHOD"),"METHOD"], [t("scopes.CLASS"), "CLASS"], [t("scopes.PACKAGE"), "PACKAGE"], [t("scopes.SOFTWARE"), "SOFTWARE"]] end end diff --git a/app/helpers/kalibro_configurations_helper.rb b/app/helpers/kalibro_configurations_helper.rb index 89c1687..29e096b 100644 --- a/app/helpers/kalibro_configurations_helper.rb +++ b/app/helpers/kalibro_configurations_helper.rb @@ -5,17 +5,17 @@ module KalibroConfigurationsHelper def link_to_edit_form(metric_configuration, kalibro_configuration_id) if (metric_configuration.metric.is_a? KalibroClient::Entities::Miscellaneous::CompoundMetric) - link_to('Edit', edit_kalibro_configuration_compound_metric_configuration_path(kalibro_configuration_id, metric_configuration.id), class: 'btn btn-info') + link_to(t('edit'), edit_kalibro_configuration_compound_metric_configuration_path(kalibro_configuration_id, metric_configuration.id), class: 'btn btn-info') else - link_to('Edit', edit_kalibro_configuration_metric_configuration_path(kalibro_configuration_id, metric_configuration.id), class: 'btn btn-info') + link_to(t('edit'), edit_kalibro_configuration_metric_configuration_path(kalibro_configuration_id, metric_configuration.id), class: 'btn btn-info') end end def link_to_show_page(metric_configuration, kalibro_configuration_id) if (metric_configuration.metric.is_a? KalibroClient::Entities::Miscellaneous::CompoundMetric) - link_to('Show', kalibro_configuration_compound_metric_configuration_path(kalibro_configuration_id, metric_configuration.id), class: 'btn btn-info') + link_to(t('show'), kalibro_configuration_compound_metric_configuration_path(kalibro_configuration_id, metric_configuration.id), class: 'btn btn-info') else - link_to('Show', kalibro_configuration_metric_configuration_path(kalibro_configuration_id, metric_configuration.id), class: 'btn btn-info') + link_to(t('show'), kalibro_configuration_metric_configuration_path(kalibro_configuration_id, metric_configuration.id), class: 'btn btn-info') end end end diff --git a/app/helpers/metric_configurations_helper.rb b/app/helpers/metric_configurations_helper.rb index 431bd4a..63b76f4 100644 --- a/app/helpers/metric_configurations_helper.rb +++ b/app/helpers/metric_configurations_helper.rb @@ -1,7 +1,6 @@ module MetricConfigurationsHelper def aggregation_options - [["Average","AVERAGE"], ["Median", "MEDIAN"], ["Maximum", "MAXIMUM"], ["Minimum", "MINIMUM"], - ["Standard Deviation", "STANDARD_DEVIATION"], ["Count", "COUNT"]] + [[t("aggregation_forms.AVERAGE"),"AVERAGE"], [t("aggregation_forms.MEDIAN"), "MEDIAN"], [t("aggregation_forms.MAXIMUM"), "MAXIMUM"], [t("aggregation_forms.MINIMUM"), "MINIMUM"], [t("aggregation_forms.STANDARD_DEVIATION"), "STANDARD_DEVIATION"], ["Count", "COUNT"]] end def reading_group_options diff --git a/app/views/metric_configurations/_form.html.erb b/app/views/metric_configurations/_form.html.erb index b0f302e..b7e0c60 100644 --- a/app/views/metric_configurations/_form.html.erb +++ b/app/views/metric_configurations/_form.html.erb @@ -10,19 +10,19 @@

- It is used to calculate the weighted average of a <%= link_to 'module', tutorials_path("keywords", anchor: "module")%>'s grade. + <%= t('calculate_weighted_average_html', href: link_to(KalibroModule.model_name.human, tutorials_path("keywords", anchor: "module"))) %>

- <%= f.label :aggregation_form, 'Aggregation Form', class: 'control-label' %> + <%= f.label :aggregation_form, class: 'control-label' %> <%= f.select( :aggregation_form, aggregation_options, {class: 'form-control'} ) %>

- It is the calculation of statistical results for higher <%= link_to 'granularity', tutorials_path('keywords', anchor: 'granularity') %> modules (e.g., average lines of code of the classes inside a package). + <%= t('aggregation_form_helper_html', href: link_to(t('granularity'), tutorials_path('keywords', anchor: 'granularity'))) %>

@@ -33,12 +33,12 @@ <% else %>
- <%= f.label :reading_group_id, 'Reading Group', class: 'control-label' %> + <%= f.label :reading_group_id, class: 'control-label' %> <%= f.select( :reading_group_id, reading_group_options, {class: 'form-control'} ) %>

- The <%= link_to 'Reading Group', tutorials_path('keywords', anchor: 'reading-group') %> associated with this metric. + <%= t('reading_group_helper_html', href: link_to(ReadingGroup.model_name.human, tutorials_path('keywords', anchor: 'reading-group'))) %>

diff --git a/app/views/metric_configurations/_no_ranges.html.erb b/app/views/metric_configurations/_no_ranges.html.erb index 2aeef54..e5dce1c 100644 --- a/app/views/metric_configurations/_no_ranges.html.erb +++ b/app/views/metric_configurations/_no_ranges.html.erb @@ -1,4 +1,4 @@ - There are no Ranges yet! - \ No newline at end of file +<%= t('no_models', model: KalibroRange.model_name.human(count: 2)) %> + diff --git a/app/views/metric_configurations/_ranges.html.erb b/app/views/metric_configurations/_ranges.html.erb index f446512..f6e9098 100644 --- a/app/views/metric_configurations/_ranges.html.erb +++ b/app/views/metric_configurations/_ranges.html.erb @@ -9,10 +9,10 @@ <%= kalibro_range.end %> <% if kalibro_configuration_owner? @metric_configuration.kalibro_configuration_id %> - <%= link_to 'Edit', edit_kalibro_configuration_metric_configuration_kalibro_range_path( + <%= link_to t('edit'), edit_kalibro_configuration_metric_configuration_kalibro_range_path( @metric_configuration.kalibro_configuration_id, @metric_configuration.id, kalibro_range.id), class: 'btn btn-info' %> - <%= link_to 'Destroy', kalibro_configuration_metric_configuration_kalibro_range_path(@metric_configuration.kalibro_configuration_id, - @metric_configuration.id, kalibro_range.id), method: :delete, data: { confirm: 'Are you sure that you want to destroy this Range?' }, + <%= link_to t('destroy'), kalibro_configuration_metric_configuration_kalibro_range_path(@metric_configuration.kalibro_configuration_id, + @metric_configuration.id, kalibro_range.id), method: :delete, data: { confirm: t('want_destroy_range') }, class: 'btn btn-danger' %> <% end %> diff --git a/app/views/metric_configurations/choose_metric.html.erb b/app/views/metric_configurations/choose_metric.html.erb index 602be06..6ff6445 100644 --- a/app/views/metric_configurations/choose_metric.html.erb +++ b/app/views/metric_configurations/choose_metric.html.erb @@ -1,5 +1,5 @@ <%= form_tag kalibro_configuration_new_metric_configuration_path(@kalibro_configuration.id) do %> @@ -18,8 +18,8 @@ <% end %>
-<%= link_to 'Back', kalibro_configuration_path(@kalibro_configuration.id), class: 'btn btn-default' %> -<%= link_to 'Compound Metric', new_kalibro_configuration_compound_metric_configuration_path(@kalibro_configuration.id), class: 'btn btn-info', id: "link_to_compound" %> +<%= link_to t('back'), kalibro_configuration_path(@kalibro_configuration.id), class: 'btn btn-default' %> +<%= link_to t('compound_metric'), new_kalibro_configuration_compound_metric_configuration_path(@kalibro_configuration.id), class: 'btn btn-info', id: "link_to_compound" %>