Commit 8a7dfde2e95fbcf4f93a242db47c23024c5950d3
Committed by
Rafael Manzo
1 parent
ed86c4b3
Exists in
colab
and in
4 other branches
I18n missing BaseMetricConfigurations messages
Signed-off-by: Rafael Reggiani Manzo <rr.manzo@gmail.com>
Showing
3 changed files
with
6 additions
and
2 deletions
Show diff stats
app/controllers/base_metric_configurations_controller.rb
| @@ -131,7 +131,7 @@ class BaseMetricConfigurationsController < ApplicationController | @@ -131,7 +131,7 @@ class BaseMetricConfigurationsController < ApplicationController | ||
| 131 | end | 131 | end |
| 132 | 132 | ||
| 133 | respond_to do |format| | 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 | end | 135 | end |
| 136 | end | 136 | end |
| 137 | 137 | ||
| @@ -140,7 +140,7 @@ class BaseMetricConfigurationsController < ApplicationController | @@ -140,7 +140,7 @@ class BaseMetricConfigurationsController < ApplicationController | ||
| 140 | @reading_group = ReadingGroup.find(@metric_configuration.reading_group_id) | 140 | @reading_group = ReadingGroup.find(@metric_configuration.reading_group_id) |
| 141 | rescue KalibroClient::Errors::RecordNotFound | 141 | rescue KalibroClient::Errors::RecordNotFound |
| 142 | respond_to do |format| | 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 | end | 144 | end |
| 145 | end | 145 | end |
| 146 | end | 146 | end |
config/locales/views/metric_configurations/en.yml
| @@ -37,6 +37,8 @@ en: | @@ -37,6 +37,8 @@ en: | ||
| 37 | reading_group_helper_html: "The %{href} associated with this metric." | 37 | reading_group_helper_html: "The %{href} associated with this metric." |
| 38 | no_models: "There are no %{model} yet!" | 38 | no_models: "There are no %{model} yet!" |
| 39 | choose_metric: "Choose a metric from a Base Tool:" | 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 | scopes: | 42 | scopes: |
| 41 | METHOD: "Method" | 43 | METHOD: "Method" |
| 42 | CLASS: "Class" | 44 | CLASS: "Class" |
config/locales/views/metric_configurations/pt.yml
| @@ -41,6 +41,8 @@ pt: | @@ -41,6 +41,8 @@ pt: | ||
| 41 | reading_group_helper_html: "O %{href} associado com esta métrica." | 41 | reading_group_helper_html: "O %{href} associado com esta métrica." |
| 42 | no_models: "Não há %{model} ainda!" | 42 | no_models: "Não há %{model} ainda!" |
| 43 | choose_metric: "Escolha uma métrica de um Coletor:" | 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 | scopes: | 46 | scopes: |
| 45 | METHOD: "Método" | 47 | METHOD: "Método" |
| 46 | CLASS: "Classe" | 48 | CLASS: "Classe" |