From d70f717984eea70345abe97055b09b6bb780902e Mon Sep 17 00:00:00 2001 From: Daniel Miranda Date: Fri, 27 Mar 2015 18:13:28 -0300 Subject: [PATCH] Translate modules views --- app/views/modules/_metric_result.html.erb | 4 ++-- app/views/modules/_metric_results.html.erb | 2 +- app/views/modules/_module_result.html.erb | 2 +- app/views/modules/_module_tree.html.erb | 2 +- config/locales/views/modules/en.yml | 6 ++++++ config/locales/views/modules/pt.yml | 4 ++++ 6 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 config/locales/views/modules/en.yml create mode 100644 config/locales/views/modules/pt.yml diff --git a/app/views/modules/_metric_result.html.erb b/app/views/modules/_metric_result.html.erb index a8a631a..e928a17 100644 --- a/app/views/modules/_metric_result.html.erb +++ b/app/views/modules/_metric_result.html.erb @@ -15,9 +15,9 @@ - <%= image_tag 'loader.gif' %> Loading data. Please, wait. + <%= image_tag 'loader.gif' %> <%= t('loading_data') %> - + <% end %> diff --git a/app/views/modules/_metric_results.html.erb b/app/views/modules/_metric_results.html.erb index f4935c8..c6d4bdb 100644 --- a/app/views/modules/_metric_results.html.erb +++ b/app/views/modules/_metric_results.html.erb @@ -11,4 +11,4 @@ <%= render partial: 'metric_result', collection: @root_module_result.metric_results, locals: {module_result: @root_module_result} %> <% end %> - \ No newline at end of file + diff --git a/app/views/modules/_module_result.html.erb b/app/views/modules/_module_result.html.erb index ea20958..05fdf16 100644 --- a/app/views/modules/_module_result.html.erb +++ b/app/views/modules/_module_result.html.erb @@ -5,7 +5,7 @@ <% else %> <% end %> - <%= 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});" %> + <%= 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});" %> <%= module_result.kalibro_module.granularity %> <%= format_grade(module_result.grade) %> diff --git a/app/views/modules/_module_tree.html.erb b/app/views/modules/_module_tree.html.erb index 8392693..534cfa0 100644 --- a/app/views/modules/_module_tree.html.erb +++ b/app/views/modules/_module_tree.html.erb @@ -11,7 +11,7 @@ <%= format_grade(@root_module_result.grade) %>

<% unless @root_module_result.parent_id.nil? %> -

<%= link_to '../', '#parent', onClick: "Module.Tree.load('#{escape_javascript(image_tag 'loader.gif')} Loading data. Please, wait.', #{@root_module_result.parent_id});" %>

+

<%= link_to '../', '#parent', onClick: "Module.Tree.load('#{escape_javascript(image_tag 'loader.gif')} #{escape_javascript(t('loading_data'))}', #{@root_module_result.parent_id});" %>

<% end %> <% cache("#{@root_module_result.id}_tree") do %> diff --git a/config/locales/views/modules/en.yml b/config/locales/views/modules/en.yml new file mode 100644 index 0000000..44d66df --- /dev/null +++ b/config/locales/views/modules/en.yml @@ -0,0 +1,6 @@ +--- +en: + value: Value + threshold: Threshold + only_point_printed_chart: There is only one point and it will not be printed into + a chart. diff --git a/config/locales/views/modules/pt.yml b/config/locales/views/modules/pt.yml new file mode 100644 index 0000000..f62e8d5 --- /dev/null +++ b/config/locales/views/modules/pt.yml @@ -0,0 +1,4 @@ +en: + value: "Valor" + threshold: "Limite" + only_point_printed_chart: "Há apenas um ponto e não vai ser impresso em um gráfico." -- libgit2 0.21.2