Commit 2945b82e74a2ade7de66547dd4f860581d221a45
1 parent
e028ed71
Exists in
colab
and in
4 other branches
KalibroRange form translation
Showing
4 changed files
with
48 additions
and
8 deletions
Show diff stats
app/views/kalibro_ranges/_form.html.erb
| @@ -8,12 +8,16 @@ | @@ -8,12 +8,16 @@ | ||
| 8 | <%= render partial: 'no_readings' %> | 8 | <%= render partial: 'no_readings' %> |
| 9 | <% else %> | 9 | <% else %> |
| 10 | <div class="field-container"> | 10 | <div class="field-container"> |
| 11 | - <%= f.label :reading_id, 'Reading', class: 'control-label' %> | 11 | + <%= f.label :reading_id, t('reading'), class: 'control-label' %> |
| 12 | <%= f.select( :reading_id, readings_options(@readings), {class: 'form-control'} ) %> | 12 | <%= f.select( :reading_id, readings_options(@readings), {class: 'form-control'} ) %> |
| 13 | </div> | 13 | </div> |
| 14 | <div class="help-container"> | 14 | <div class="help-container"> |
| 15 | <p> | 15 | <p> |
| 16 | - The <%= link_to 'Reading', tutorials_path('keywords', anchor: 'reading')%> associated with this <%= link_to 'Range', tutorials_path('keywords', anchor: 'range')%>. | 16 | + <%= t('activemodel.hints.kalibro_range.reading', |
| 17 | + reading_href: link_to(t('reading'), tutorials_path('keywords', anchor: 'reading')), | ||
| 18 | + range_href: link_to(KalibroRange.model_name.human, tutorials_path('keywords', anchor: 'range')) | ||
| 19 | + ).html_safe | ||
| 20 | + %> | ||
| 17 | </p> | 21 | </p> |
| 18 | </div> | 22 | </div> |
| 19 | <% end %> | 23 | <% end %> |
| @@ -32,7 +36,7 @@ | @@ -32,7 +36,7 @@ | ||
| 32 | 36 | ||
| 33 | <div class="help-container"> | 37 | <div class="help-container"> |
| 34 | <p> | 38 | <p> |
| 35 | - This Range's lower limit. | 39 | + <%= t('activemodel.hints.kalibro_range.beginning') %> |
| 36 | </p> | 40 | </p> |
| 37 | </div> | 41 | </div> |
| 38 | </div> | 42 | </div> |
| @@ -49,7 +53,7 @@ | @@ -49,7 +53,7 @@ | ||
| 49 | </div> | 53 | </div> |
| 50 | <div class="help-container"> | 54 | <div class="help-container"> |
| 51 | <p> | 55 | <p> |
| 52 | - This Range's upper limit. | 56 | + <%= t('activemodel.hints.kalibro_range.end') %> |
| 53 | </p> | 57 | </p> |
| 54 | </div> | 58 | </div> |
| 55 | </div> | 59 | </div> |
| @@ -61,7 +65,7 @@ | @@ -61,7 +65,7 @@ | ||
| 61 | </div> | 65 | </div> |
| 62 | <div class="help-container"> | 66 | <div class="help-container"> |
| 63 | <p> | 67 | <p> |
| 64 | - An explanation of why you chose this interval, with that reading for this <%= link_to 'Metric', tutorials_path('keywords', anchor: 'metric')%>. | 68 | + <%= t('activemodel.hints.kalibro_range.comments', metric_href: link_to(t('metric'), tutorials_path('keywords', anchor: 'metric'))).html_safe %> |
| 65 | </p> | 69 | </p> |
| 66 | </div> | 70 | </div> |
| 67 | </div> | 71 | </div> |
| @@ -69,6 +73,6 @@ | @@ -69,6 +73,6 @@ | ||
| 69 | </div> | 73 | </div> |
| 70 | 74 | ||
| 71 | <div class="row margin-left-none" style="margin-top: 20px"> | 75 | <div class="row margin-left-none" style="margin-top: 20px"> |
| 72 | - <%= f.submit 'Save', class: 'btn btn-primary' %> | ||
| 73 | - <%= link_to 'Back', kalibro_configuration_metric_configuration_path(@kalibro_configuration_id, @metric_configuration_id), class: 'btn btn-default' %> | 76 | + <%= f.submit t('save'), class: 'btn btn-primary' %> |
| 77 | + <%= link_to t('back'), kalibro_configuration_metric_configuration_path(@kalibro_configuration_id, @metric_configuration_id), class: 'btn btn-default' %> | ||
| 74 | </div> | 78 | </div> |
app/views/kalibro_ranges/new.html.erb
| 1 | -<h1>New Range</h1> | 1 | +<h1><%= "#{t('new.male')} #{KalibroRange.model_name.human}" %></h1> |
| 2 | 2 | ||
| 3 | <%= form_for(@kalibro_range, :url => kalibro_configuration_metric_configuration_kalibro_ranges_path( | 3 | <%= form_for(@kalibro_range, :url => kalibro_configuration_metric_configuration_kalibro_ranges_path( |
| 4 | @kalibro_configuration_id, @metric_configuration_id)) do |f| %> | 4 | @kalibro_configuration_id, @metric_configuration_id)) do |f| %> |
| @@ -0,0 +1,18 @@ | @@ -0,0 +1,18 @@ | ||
| 1 | +en: | ||
| 2 | + activemodel: | ||
| 3 | + models: | ||
| 4 | + kalibro_range: | ||
| 5 | + one: Range | ||
| 6 | + other: Ranges | ||
| 7 | + attributes: | ||
| 8 | + kalibro_range: | ||
| 9 | + reading: 'Reading' | ||
| 10 | + beginning: 'Beginning' | ||
| 11 | + end: 'End' | ||
| 12 | + comments: 'Comments' | ||
| 13 | + hints: | ||
| 14 | + kalibro_range: | ||
| 15 | + reading: 'The %{reading_href} associated with this %{range_href}.' | ||
| 16 | + beginning: "This Range's lower limit." | ||
| 17 | + end: "This Range's upper limit." | ||
| 18 | + comments: 'An explanation of why you chose this interval, with that reading for this %{metric_href}.' | ||
| 0 | \ No newline at end of file | 19 | \ No newline at end of file |
| @@ -0,0 +1,18 @@ | @@ -0,0 +1,18 @@ | ||
| 1 | +pt: | ||
| 2 | + activemodel: | ||
| 3 | + models: | ||
| 4 | + kalibro_range: | ||
| 5 | + one: Intervalo | ||
| 6 | + other: Intervalos | ||
| 7 | + attributes: | ||
| 8 | + kalibro_range: | ||
| 9 | + reading: 'Leitura' | ||
| 10 | + beginning: 'Início' | ||
| 11 | + end: 'Fim' | ||
| 12 | + comments: 'Comentários' | ||
| 13 | + hints: | ||
| 14 | + kalibro_range: | ||
| 15 | + reading: 'A %{reading_href} associada a este %{range_href}.' | ||
| 16 | + beginning: "Limite inferior de um Intervalo." | ||
| 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}.' | ||
| 0 | \ No newline at end of file | 19 | \ No newline at end of file |