From e857ddd5981b01da7084410fcf40145ddc2fa09c Mon Sep 17 00:00:00 2001 From: Heitor Reis Date: Mon, 9 Mar 2015 14:30:16 -0300 Subject: [PATCH] Finished internationalization for compound metric configuration --- app/views/compound_metric_configurations/_form.html.erb | 8 ++++---- app/views/compound_metric_configurations/_metric_options.html.erb | 22 +++++++++++----------- config/locales/views/en.yml | 12 +++++++----- config/locales/views/pt.yml | 14 +++++++------- 4 files changed, 29 insertions(+), 27 deletions(-) diff --git a/app/views/compound_metric_configurations/_form.html.erb b/app/views/compound_metric_configurations/_form.html.erb index f1ed313..14d7a20 100644 --- a/app/views/compound_metric_configurations/_form.html.erb +++ b/app/views/compound_metric_configurations/_form.html.erb @@ -8,12 +8,12 @@
- <%= f.label :weight, class: 'control-label' %> + <%= f.label t('weight'), class: 'control-label' %> <%= f.text_field :weight, :required => true, class: 'text-field form-control' %>

- <%= t('calculate_weighted_average') %> <%= link_to t('module'), tutorials_path("keywords", anchor: "module")%> <%= t('grades_belonging_to_a_module') %> + <%= t('calculate_weighted_average_html', :href => link_to(t('module'), tutorials_path("keywords", anchor: "module"))) %>

@@ -21,7 +21,7 @@ <% if @compound_metric_configuration.persisted? %> <%= hidden_field_tag(:reading_group_id, @compound_metric_configuration.reading_group_id) %> <%= hidden_field_tag(:kalibro_configuration_id, @compound_metric_configuration.kalibro_configuration_id) %> - <%= link_to 'Back', kalibro_configuration_path(@compound_metric_configuration.kalibro_configuration_id), class: 'btn btn-default' %> + <%= link_to t('back'), kalibro_configuration_path(@compound_metric_configuration.kalibro_configuration_id), class: 'btn btn-default' %> <% else %>
@@ -30,7 +30,7 @@

- <%= t('the') %> <%= link_to t('reading_group'), tutorials_path('keywords', anchor: 'reading_group') %> <%= t('associated_metric_configuration_form') %> + <%= t('associated_metric_configuration_form_html', :href => link_to(t('reading_group'), tutorials_path('keywords', anchor: 'reading_group'))) %>

diff --git a/app/views/compound_metric_configurations/_metric_options.html.erb b/app/views/compound_metric_configurations/_metric_options.html.erb index 20f43df..df75302 100644 --- a/app/views/compound_metric_configurations/_metric_options.html.erb +++ b/app/views/compound_metric_configurations/_metric_options.html.erb @@ -1,6 +1,6 @@
- <%= f.label :name, class: 'control-label' %> + <%= f.label t('name'), class: 'control-label' %> <%= f.text_field :name, :required => true, class: 'text-field form-control', value: (metric.name unless metric.nil?) %>
@@ -12,7 +12,7 @@
- <%= f.label :description, class: 'control-label' %> + <%= f.label t('description'), class: 'control-label' %> <%= f.text_field :description, class: 'text-field form-control', value: (metric.description unless metric.nil?) %>
@@ -24,7 +24,7 @@
- <%= f.label :script, class: 'control-label' %> + <%= f.label t('script'), class: 'control-label' %> <%= f.text_area :script, :required => true, class: 'text-area form-control', value: (metric.script unless metric.nil?) %>
@@ -36,29 +36,29 @@
- <%= f.label :scope, 'Scope', class: 'control-label' %> + <%= f.label t('scope'), class: 'control-label' %> <%= f.select( :scope, scope_options, {class: 'form-control', selected: (metric.scope unless metric.nil?)} ) %>

- <%= t('the') %> <%= link_to t('granularity'), tutorials_path('keywords', anchor: "granularity")%> <%= t('of_the') %> <%= link_to t('modules'), tutorials_path( 'keywords', anchor: 'module' )%> <%= t('measured_metric') %> + <%= t('measured_metric_html', :href => link_to(t('granularity'), tutorials_path('keywords', anchor: "granularity")), :href2 => link_to(t('modules'), tutorials_path( 'keywords', anchor: 'module' ))) %>

- <%= f.label :code, class: 'control-label' %> + <%= f.label t('code'), class: 'control-label' %> <%= f.text_field :code, :required => true, class: 'text-field form-control' %>

- A variable that holds the value of a metric calculation. It can be used in the script of another compound metric. -

-

- Example: - Code foo := 10 + <%= t('body1_compound_form') %>

+
+

+ <%= t('body1_compound_form_example') %> +

<%= f.hidden_field(:compound, { value: "true"}) %> diff --git a/config/locales/views/en.yml b/config/locales/views/en.yml index 22be0db..22e5aa4 100644 --- a/config/locales/views/en.yml +++ b/config/locales/views/en.yml @@ -111,17 +111,18 @@ en: latest_projects_home_index: "Latest projects" body_home_index: "

This is Mezuro! A free/libre web platform for collaborative source code evaluation.

Here you can evaluate your source code with the most popular SCMs (like Git and SVN), just by providing its URL. For now, you can evaluate C, C++ and Java source codes, but we are looking forward to supporting more languages in the future.

" body_feedback_home_index: "Mezuro is continuously under development. Try it and give us your" - body1_compound_form: "

A variable that holds the value of a metric calculation. It can be used in the script of another compound metric.

Example: Code foo := 10

" - body2_compound_form: "

It is used to calculate the weighted average of a" + body1_compound_form: "A variable that holds the value of a metric calculation. It can be used in the script of another compound metric." + body1_compound_form_example: "Example: Code foo := 10" + body2_compound_form: " It is used to calculate the weighted average of a" body1_compound_metric_options: "A custom name for your compound metric." body2_compound_metric_options: "A short description of your compound metric." - body3_compound_metric_options: " A mathematical expression (in javascript) to calculate your compound metric. It needs a return statement. The codes of already created metrics can be used inside the script." + body3_compound_metric_options: "A mathematical expression (in javascript) to calculate your compound metric. It needs a return statement. The codes of already created metrics can be used inside the script." title_compound_edit: "Edit Compound Metric Configuration" title_compound_new: "New Compound Metric Configuration" weighted_average_metric_configurations_form: "It is used to calculate the weighted average of a" statistical_result_metric_configurations_form: "It is the calculation of statistical results for higher" modules_eg_metric_configurations_form: " modules (e.g., average lines of code of the classes inside a package)." - associated_metric_configuration_form: "associated with this metric." + associated_metric_configuration_form_html: "The %{href} associated with this metric." range_metric_configurations_no_ranges: "There are no Ranges yet!" choose_metric: "Choose a metric from a Base Tool:" editing_metric_configurations_edit: "Editing Metric Configuration" @@ -160,7 +161,7 @@ en: edit_configuration: "Edit Configuration" must_logged_configuration: "You must be logged in to create new Configurations." new_configuration: "New Configuration" - measured_metric: "measured by this metric." + measured_metric_html: "The %{href} of the %{href2} measured by this metric." change_password: "Change your password " no_metric_configurations: "There are no Metric Configurations yet!" calculate_weighted_average: "It is used to calculate the weighted average of the " @@ -329,3 +330,4 @@ en: pick_color: "Pick color" password_confirmation: "Password confirmation" current_password: "Current password" + modules: "Modules" diff --git a/config/locales/views/pt.yml b/config/locales/views/pt.yml index 3044f28..e51d49b 100644 --- a/config/locales/views/pt.yml +++ b/config/locales/views/pt.yml @@ -58,7 +58,7 @@ pt: metric: "Metrica" value: "Valor" threshold: "limite" - granularity: "Granularidade:" + granularity: "Granularidade" repositories: "Repositórios" type: "Tipo" address: "Endereço" @@ -108,8 +108,8 @@ pt: latest_projects_home_index: "Últimos projetos" body_home_index: "

Este é o Mezuro! Uma plataforma web livre para avaliação colaborativa de código fonte.

Aqui você pode avaliar seu código fonte com os SCMs mais populares (como Git e SVN), apenas fornecendo sua URL. Por enquanto, você pode avaliar códigos em C, C++ e Java, mas nós pretendemos dar suporte a mais linguagems no futuro.

" body_feedback_home_index: "Mezuro está sob constante desenvolvimento. Experimente e nos dê o seu" - body1_compound_form: "

Uma variável que contém o valor de um cálculo de métrica. Ele pode ser utilizado na escrita de outra métrica composta.

Exemplo: Código foo := 10

" - body2_compound_form: "

Ele é usado para calcular a média ponderada de um" + body1_compound_form: "Uma variável que contém o valor de um cálculo de métrica. Ele pode ser utilizado no script de outra métrica composta." + body1_compound_form_example: "Exemplo: Código foo := 10" body1_compound_metric_options: "Um nome personalizado para a sua métrica composta." body2_compound_metric_options: "Uma breve descrição de sua métrica composta." body3_compound_metric_options: "A expressão matemática (em javascript) para calcular a sua métrica composta. Ela precisa de uma instrução de retorno (por exemplo, 'return resultado;'). Os códigos de métricas já criadas podem ser usados dentro do script." @@ -118,7 +118,7 @@ pt: weighted_average_metric_configurations_form: "Ele é usado para calcular a média ponderada de um" statistical_result_metric_configurations_form: "É o cálculo dos resultados estatísticos para maior" modules_eg_metric_configurations_form: "módulos (por exemplo, as linhas médias de código das classes dentro de um pacote)." - associated_metric_configuration_form: "associado a esta métrica." + associated_metric_configuration_form_html: "O %{href} associado a esta métrica." range_metric_configurations_no_ranges: "Ainda não existem intervalos!" choose_metric: "Escolha uma métrica a partir de uma ferramenta Base:" editing_metric_configurations_edit: "Edição de configuração da Métrica" @@ -153,12 +153,11 @@ pt: stay_logged: "Fique conectado." resend_unclok_instructions: "Reenviar instruções para desbloquear" grade: "Nota" - grades_belonging_to_a_module: "através de suas Notas" edit_configuration: "Editar configurações" must_logged_configuration: "Você precisa estar logado para criar novas configurações." new_configuration: "Nova Configuração" - calculate_weighted_average: "Ele é usado para calcular a média ponderada de um " - measured_metric: "medidos por essa métrica." + calculate_weighted_average_html: "Ele é usado para calcular a média ponderada de um %{href} através de suas Notas" + measured_metric_html: "A %{href} dos %{href2} medidos por esta métrica." change_password: "Mude sua senha" no_metric_configurations: "Não há configurações de métricas ainda!" range_lower_limit: "Limite de intervalo inferior." @@ -326,6 +325,7 @@ pt: pick_color: "Escolha a Cor" password_confirmation: "Confirme sua senha" current_password: "Senha Atual" + modules: "Módulos" #errors errors: -- libgit2 0.21.2