Commit d70f717984eea70345abe97055b09b6bb780902e

Authored by Daniel
Committed by Rafael Manzo
1 parent 090f0634

Translate modules views

app/views/modules/_metric_result.html.erb
@@ -15,9 +15,9 @@ @@ -15,9 +15,9 @@
15 </tr> 15 </tr>
16 <tr id="container<%= metric_result.id %>" style="display: none"> 16 <tr id="container<%= metric_result.id %>" style="display: none">
17 <td colspan="4"> 17 <td colspan="4">
18 - <span id="loader_container<%= metric_result.id %>"><%= image_tag 'loader.gif' %> Loading data. Please, wait.</span> 18 + <span id="loader_container<%= metric_result.id %>"><%= image_tag 'loader.gif' %> <%= t('loading_data') %></span>
19 <canvas id="container<%= metric_result.id %>" class="graphic_container" style="display: none"></canvas> 19 <canvas id="container<%= metric_result.id %>" class="graphic_container" style="display: none"></canvas>
20 - <span id="container<%= metric_result.id %>" style="display: none">There is only one point and it will not be printed into a chart.</span> 20 + <span id="container<%= metric_result.id %>" style="display: none"><%= t('only_point_printed_chart') %></span>
21 </td> 21 </td>
22 </tr> 22 </tr>
23 <% end %> 23 <% end %>
app/views/modules/_metric_results.html.erb
@@ -11,4 +11,4 @@ @@ -11,4 +11,4 @@
11 <%= render partial: 'metric_result', collection: @root_module_result.metric_results, locals: {module_result: @root_module_result} %> 11 <%= render partial: 'metric_result', collection: @root_module_result.metric_results, locals: {module_result: @root_module_result} %>
12 <% end %> 12 <% end %>
13 </tbody> 13 </tbody>
14 -</table>  
15 \ No newline at end of file 14 \ No newline at end of file
  15 +</table>
app/views/modules/_module_result.html.erb
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 <% else %> 5 <% else %>
6 <i class="icon-file"></i> 6 <i class="icon-file"></i>
7 <% end %> 7 <% end %>
8 - <%= link_to format_module_name(module_result.kalibro_module.name), "#module_#{module_result.id}", onClick: "Module.Tree.load('#{escape_javascript(image_tag 'loader.gif')} Loading data. Please, wait.', #{module_result.id});" %> 8 + <%= link_to format_module_name(module_result.kalibro_module.name), "#module_#{module_result.id}", onClick: "Module.Tree.load('#{escape_javascript(image_tag 'loader.gif')} #{escape_javascript(t('loading_data'))}', #{module_result.id});" %>
9 </td> 9 </td>
10 <td><%= module_result.kalibro_module.granularity %></td> 10 <td><%= module_result.kalibro_module.granularity %></td>
11 <td><%= format_grade(module_result.grade) %></td> 11 <td><%= format_grade(module_result.grade) %></td>
app/views/modules/_module_tree.html.erb
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 <%= format_grade(@root_module_result.grade) %> 11 <%= format_grade(@root_module_result.grade) %>
12 </p> 12 </p>
13 <% unless @root_module_result.parent_id.nil? %> 13 <% unless @root_module_result.parent_id.nil? %>
14 - <p id="parent"><i class="icon-arrow-up"></i><%= link_to '../', '#parent', onClick: "Module.Tree.load('#{escape_javascript(image_tag 'loader.gif')} Loading data. Please, wait.', #{@root_module_result.parent_id});" %></p> 14 + <p id="parent"><i class="icon-arrow-up"></i><%= link_to '../', '#parent', onClick: "Module.Tree.load('#{escape_javascript(image_tag 'loader.gif')} #{escape_javascript(t('loading_data'))}', #{@root_module_result.parent_id});" %></p>
15 <% end %> 15 <% end %>
16 16
17 <% cache("#{@root_module_result.id}_tree") do %> 17 <% cache("#{@root_module_result.id}_tree") do %>
config/locales/views/modules/en.yml 0 → 100644
@@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
  1 +---
  2 +en:
  3 + value: Value
  4 + threshold: Threshold
  5 + only_point_printed_chart: There is only one point and it will not be printed into
  6 + a chart.
config/locales/views/modules/pt.yml 0 → 100644
@@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
  1 +en:
  2 + value: "Valor"
  3 + threshold: "Limite"
  4 + only_point_printed_chart: "Há apenas um ponto e não vai ser impresso em um gráfico."