Commit 8a7dfde2e95fbcf4f93a242db47c23024c5950d3

Authored by Heitor
Committed by Rafael Manzo
1 parent ed86c4b3

I18n missing BaseMetricConfigurations messages

Signed-off-by: Rafael Reggiani Manzo <rr.manzo@gmail.com>
app/controllers/base_metric_configurations_controller.rb
... ... @@ -131,7 +131,7 @@ class BaseMetricConfigurationsController &lt; ApplicationController
131 131 end
132 132  
133 133 respond_to do |format|
134   - failed_action(format, 'Invalid combination of metric collector, name/code and type')
  134 + failed_action(format, t('invalid_metric_or_collector'))
135 135 end
136 136 end
137 137  
... ... @@ -140,7 +140,7 @@ class BaseMetricConfigurationsController &lt; ApplicationController
140 140 @reading_group = ReadingGroup.find(@metric_configuration.reading_group_id)
141 141 rescue KalibroClient::Errors::RecordNotFound
142 142 respond_to do |format|
143   - failed_action(format, 'Invalid reading group')
  143 + failed_action(format, t('invalid_model', model: ReadingGroup.model_name.human))
144 144 end
145 145 end
146 146 end
... ...
config/locales/views/metric_configurations/en.yml
... ... @@ -37,6 +37,8 @@ en:
37 37 reading_group_helper_html: "The %{href} associated with this metric."
38 38 no_models: "There are no %{model} yet!"
39 39 choose_metric: "Choose a metric from a Base Tool:"
  40 + invalid_metric_or_collector: "Invalid combination of metric collector, name/code and type"
  41 + invalid_model: "Invalid %{model}"
40 42 scopes:
41 43 METHOD: "Method"
42 44 CLASS: "Class"
... ...
config/locales/views/metric_configurations/pt.yml
... ... @@ -41,6 +41,8 @@ pt:
41 41 reading_group_helper_html: "O %{href} associado com esta métrica."
42 42 no_models: "Não há %{model} ainda!"
43 43 choose_metric: "Escolha uma métrica de um Coletor:"
  44 + invalid_metric_or_collector: "Combinação inválida de coletor de métricas, nome/código e tipo"
  45 + invalid_model: "%{model} inválido"
44 46 scopes:
45 47 METHOD: "Método"
46 48 CLASS: "Classe"
... ...