Commit 5fd2c9005ed0e602ea0e0299d89f88be934df210
1 parent
2945b82e
Exists in
colab
and in
4 other branches
Range internationalized
Showing
7 changed files
with
23 additions
and
15 deletions
Show diff stats
app/views/kalibro_configurations/_kalibro_configuration.html.erb
... | ... | @@ -4,7 +4,7 @@ |
4 | 4 | <td><%= link_to t('show'), kalibro_configuration_path(kalibro_configuration.id), class: 'btn btn-info' %></td> |
5 | 5 | <td> |
6 | 6 | <% if kalibro_configuration_owner?(kalibro_configuration.id) %> |
7 | - <%= link_to t('edit'), edit_kalibro_configuration_path(kalibro_configuration.id), class: 'btn btn-info' %> | |
7 | + <%= link_to t('edit', model: ''), edit_kalibro_configuration_path(kalibro_configuration.id), class: 'btn btn-info' %> | |
8 | 8 | <% end %> |
9 | 9 | </td> |
10 | 10 | </tr> |
11 | 11 | \ No newline at end of file | ... | ... |
app/views/kalibro_ranges/_no_readings.html.erb
1 | 1 | <div class="alert alert-error alert-dismissable"> |
2 | - <h4 class="alert-heading">You must have Readings within your associated Reading Group to create a new Range.</h4> | |
3 | - <p> | |
4 | - <% if reading_groups_owner? @reading_group_id %> | |
5 | - <br /><%= link_to 'Create New Reading', new_reading_group_reading_path(@reading_group_id), class: 'btn btn-danger' %> | |
6 | - <% else %> | |
7 | - <p> The Reading Group of your Metric Configuration belongs to another user and you are not allowed to modify it.</p> | |
8 | - <% end %> | |
9 | - </p> | |
2 | + <h4 class="alert-heading"><%= t('activemodel.errors.kalibro_range.no_readings') %></h4> | |
3 | + <p> | |
4 | + <% if reading_groups_owner? @reading_group_id %> | |
5 | + <br /><%= link_to t('create', model: Reading.model_name.human), new_reading_group_reading_path(@reading_group_id), class: 'btn btn-danger' %> | |
6 | + <% else %> | |
7 | + <p><%= t('activemodel.errors.kalibro_range.reading_group_belongs_to_another') %></p> | |
8 | + <% end %> | |
9 | + </p> | |
10 | 10 | </div> | ... | ... |
app/views/kalibro_ranges/edit.html.erb
1 | -<h1>Edit Range</h1> | |
1 | +<h1><%= t('edit', model: KalibroRange.model_name.human) %></h1> | |
2 | 2 | |
3 | 3 | <%= form_for(@kalibro_range, :url => kalibro_configuration_metric_configuration_kalibro_range_update_url( |
4 | 4 | @kalibro_configuration_id, @metric_configuration_id, @kalibro_range.id), method: :put) do |f| %> | ... | ... |
config/locales/views/en.yml
config/locales/views/kalibro_range/en.yml
... | ... | @@ -15,4 +15,8 @@ en: |
15 | 15 | reading: 'The %{reading_href} associated with this %{range_href}.' |
16 | 16 | beginning: "This Range's lower limit." |
17 | 17 | end: "This Range's upper limit." |
18 | - comments: 'An explanation of why you chose this interval, with that reading for this %{metric_href}.' | |
19 | 18 | \ No newline at end of file |
19 | + comments: 'An explanation of why you chose this interval, with that reading for this %{metric_href}.' | |
20 | + errors: | |
21 | + kalibro_range: | |
22 | + no_readings: 'You must have Readings within your associated Reading Group to create a new Range.' | |
23 | + reading_group_belongs_to_another: 'The Reading Group of your Metric Configuration belongs to another user and you are not allowed to modify it.' | |
20 | 24 | \ No newline at end of file | ... | ... |
config/locales/views/kalibro_range/pt.yml
... | ... | @@ -15,4 +15,8 @@ pt: |
15 | 15 | reading: 'A %{reading_href} associada a este %{range_href}.' |
16 | 16 | beginning: "Limite inferior de um Intervalo." |
17 | 17 | end: "Limite superior de um Intervalo." |
18 | - comments: 'Uma explicação do porquê você escolheu este Intervalo, com esta Leitura para esta %{metric_href}.' | |
19 | 18 | \ No newline at end of file |
19 | + comments: 'Uma explicação do porquê você escolheu este Intervalo, com esta Leitura para esta %{metric_href}.' | |
20 | + errors: | |
21 | + kalibro_range: | |
22 | + no_readings: 'Você deve ter Leituras associadas ao Grupo de Leitura para criar um novo intervalo.' | |
23 | + reading_group_belongs_to_another: 'O Grupo de Leitura da sua Configuração de Métrica pertence a outro usuário e você não tem permissão para modificá-lo.' | |
20 | 24 | \ No newline at end of file | ... | ... |
config/locales/views/pt.yml
... | ... | @@ -27,7 +27,7 @@ pt: |
27 | 27 | sign_in: "Entrar" |
28 | 28 | sign_up: "Inscrever-se" |
29 | 29 | show: "Mostrar" |
30 | - edit: "Editar" | |
30 | + edit: "Editar %{model}" | |
31 | 31 | edit_user: "Editar Usuário" |
32 | 32 | end: "Fim" |
33 | 33 | the: "A" |
... | ... | @@ -99,7 +99,7 @@ pt: |
99 | 99 | new: |
100 | 100 | male: 'Novo' |
101 | 101 | female: 'Nova' |
102 | - create: 'Criar' | |
102 | + create: 'Criar %{model}' | |
103 | 103 | add: 'Adicionar' |
104 | 104 | |
105 | 105 | #this pattern is type_folder_file | ... | ... |