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"))) %>
- 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'))) %>
- 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'))) %>