Commit e857ddd5981b01da7084410fcf40145ddc2fa09c
Committed by
Rafael Manzo
1 parent
dec710ee
Exists in
colab
and in
4 other branches
Finished internationalization for compound metric configuration
Signed off by: Rafael Manzo <rr.manzo@gmail.com>
Showing
4 changed files
with
29 additions
and
27 deletions
Show diff stats
app/views/compound_metric_configurations/_form.html.erb
... | ... | @@ -8,12 +8,12 @@ |
8 | 8 | |
9 | 9 | <div class="form-row"> |
10 | 10 | <div class="field-container"> |
11 | - <%= f.label :weight, class: 'control-label' %> | |
11 | + <%= f.label t('weight'), class: 'control-label' %> | |
12 | 12 | <%= f.text_field :weight, :required => true, class: 'text-field form-control' %> |
13 | 13 | </div> |
14 | 14 | <div class="help-container"> |
15 | 15 | <p> |
16 | - <%= t('calculate_weighted_average') %> <%= link_to t('module'), tutorials_path("keywords", anchor: "module")%> <%= t('grades_belonging_to_a_module') %> | |
16 | + <%= t('calculate_weighted_average_html', :href => link_to(t('module'), tutorials_path("keywords", anchor: "module"))) %> | |
17 | 17 | </p> |
18 | 18 | </div> |
19 | 19 | </div> |
... | ... | @@ -21,7 +21,7 @@ |
21 | 21 | <% if @compound_metric_configuration.persisted? %> |
22 | 22 | <%= hidden_field_tag(:reading_group_id, @compound_metric_configuration.reading_group_id) %> |
23 | 23 | <%= hidden_field_tag(:kalibro_configuration_id, @compound_metric_configuration.kalibro_configuration_id) %> |
24 | - <%= link_to 'Back', kalibro_configuration_path(@compound_metric_configuration.kalibro_configuration_id), class: 'btn btn-default' %> | |
24 | + <%= link_to t('back'), kalibro_configuration_path(@compound_metric_configuration.kalibro_configuration_id), class: 'btn btn-default' %> | |
25 | 25 | <% else %> |
26 | 26 | <div class="form-row"> |
27 | 27 | <div class="field-container"> |
... | ... | @@ -30,7 +30,7 @@ |
30 | 30 | </div> |
31 | 31 | <div class="help-container"> |
32 | 32 | <p> |
33 | - <%= t('the') %> <%= link_to t('reading_group'), tutorials_path('keywords', anchor: 'reading_group') %> <%= t('associated_metric_configuration_form') %> | |
33 | + <%= t('associated_metric_configuration_form_html', :href => link_to(t('reading_group'), tutorials_path('keywords', anchor: 'reading_group'))) %> | |
34 | 34 | </p> |
35 | 35 | </div> |
36 | 36 | </div> | ... | ... |
app/views/compound_metric_configurations/_metric_options.html.erb
1 | 1 | <div class="form-row"> |
2 | 2 | <div class="field-container"> |
3 | - <%= f.label :name, class: 'control-label' %> | |
3 | + <%= f.label t('name'), class: 'control-label' %> | |
4 | 4 | <%= f.text_field :name, :required => true, class: 'text-field form-control', value: (metric.name unless metric.nil?) %> |
5 | 5 | </div> |
6 | 6 | <div class="help-container"> |
... | ... | @@ -12,7 +12,7 @@ |
12 | 12 | |
13 | 13 | <div class="form-row"> |
14 | 14 | <div class="field-container"> |
15 | - <%= f.label :description, class: 'control-label' %> | |
15 | + <%= f.label t('description'), class: 'control-label' %> | |
16 | 16 | <%= f.text_field :description, class: 'text-field form-control', value: (metric.description unless metric.nil?) %> |
17 | 17 | </div> |
18 | 18 | <div class="help-container"> |
... | ... | @@ -24,7 +24,7 @@ |
24 | 24 | |
25 | 25 | <div class="form-row"> |
26 | 26 | <div class="field-container"> |
27 | - <%= f.label :script, class: 'control-label' %> | |
27 | + <%= f.label t('script'), class: 'control-label' %> | |
28 | 28 | <%= f.text_area :script, :required => true, class: 'text-area form-control', value: (metric.script unless metric.nil?) %> |
29 | 29 | </div> |
30 | 30 | <div class="help-container"> |
... | ... | @@ -36,29 +36,29 @@ |
36 | 36 | |
37 | 37 | <div class="form-row"> |
38 | 38 | <div class="field-container"> |
39 | - <%= f.label :scope, 'Scope', class: 'control-label' %> | |
39 | + <%= f.label t('scope'), class: 'control-label' %> | |
40 | 40 | <%= f.select( :scope, scope_options, {class: 'form-control', selected: (metric.scope unless metric.nil?)} ) %> |
41 | 41 | </div> |
42 | 42 | <div class="help-container"> |
43 | 43 | <p> |
44 | - <%= 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') %> | |
44 | + <%= t('measured_metric_html', :href => link_to(t('granularity'), tutorials_path('keywords', anchor: "granularity")), :href2 => link_to(t('modules'), tutorials_path( 'keywords', anchor: 'module' ))) %> | |
45 | 45 | </p> |
46 | 46 | </div> |
47 | 47 | </div> |
48 | 48 | |
49 | 49 | <div class="form-row"> |
50 | 50 | <div class="field-container"> |
51 | - <%= f.label :code, class: 'control-label' %> | |
51 | + <%= f.label t('code'), class: 'control-label' %> | |
52 | 52 | <%= f.text_field :code, :required => true, class: 'text-field form-control' %> |
53 | 53 | </div> |
54 | 54 | <div class="help-container"> |
55 | 55 | <p> |
56 | - A variable that holds the value of a metric calculation. It can be used in the script of another compound metric. | |
57 | - </p> | |
58 | - <p> | |
59 | - Example: | |
60 | - Code foo := 10 | |
56 | + <%= t('body1_compound_form') %> | |
61 | 57 | </p> |
58 | + <br> | |
59 | + <p> | |
60 | + <%= t('body1_compound_form_example') %> | |
61 | + </p> | |
62 | 62 | </div> |
63 | 63 | </div> |
64 | 64 | <%= f.hidden_field(:compound, { value: "true"}) %> | ... | ... |
config/locales/views/en.yml
... | ... | @@ -111,17 +111,18 @@ en: |
111 | 111 | latest_projects_home_index: "Latest projects" |
112 | 112 | body_home_index: "<p>This is Mezuro! A <strong>free/libre</strong> web platform for <strong>collaborative</strong> source code <strong>evaluation</strong>.</p> <p>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 <strong>C</strong>, <strong>C++</strong> and <strong>Java</strong> source codes, but we are looking forward to supporting more languages in the future.</p>" |
113 | 113 | body_feedback_home_index: "Mezuro is continuously under development. Try it and give us your" |
114 | - body1_compound_form: " <p>A variable that holds the value of a metric calculation. It can be used in the script of another compound metric.</p> <p>Example: Code foo := 10 </p>" | |
115 | - body2_compound_form: " <p>It is used to calculate the weighted average of a" | |
114 | + body1_compound_form: "A variable that holds the value of a metric calculation. It can be used in the script of another compound metric." | |
115 | + body1_compound_form_example: "Example: Code foo := 10" | |
116 | + body2_compound_form: " It is used to calculate the weighted average of a" | |
116 | 117 | body1_compound_metric_options: "A custom name for your compound metric." |
117 | 118 | body2_compound_metric_options: "A short description of your compound metric." |
118 | - 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." | |
119 | + 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." | |
119 | 120 | title_compound_edit: "Edit Compound Metric Configuration" |
120 | 121 | title_compound_new: "New Compound Metric Configuration" |
121 | 122 | weighted_average_metric_configurations_form: "It is used to calculate the weighted average of a" |
122 | 123 | statistical_result_metric_configurations_form: "It is the calculation of statistical results for higher" |
123 | 124 | modules_eg_metric_configurations_form: " modules (e.g., average lines of code of the classes inside a package)." |
124 | - associated_metric_configuration_form: "associated with this metric." | |
125 | + associated_metric_configuration_form_html: "The %{href} associated with this metric." | |
125 | 126 | range_metric_configurations_no_ranges: "There are no Ranges yet!" |
126 | 127 | choose_metric: "Choose a metric from a Base Tool:" |
127 | 128 | editing_metric_configurations_edit: "Editing Metric Configuration" |
... | ... | @@ -160,7 +161,7 @@ en: |
160 | 161 | edit_configuration: "Edit Configuration" |
161 | 162 | must_logged_configuration: "You must be logged in to create new Configurations." |
162 | 163 | new_configuration: "New Configuration" |
163 | - measured_metric: "measured by this metric." | |
164 | + measured_metric_html: "The %{href} of the %{href2} measured by this metric." | |
164 | 165 | change_password: "Change your password " |
165 | 166 | no_metric_configurations: "There are no Metric Configurations yet!" |
166 | 167 | calculate_weighted_average: "It is used to calculate the weighted average of the " |
... | ... | @@ -329,3 +330,4 @@ en: |
329 | 330 | pick_color: "Pick color" |
330 | 331 | password_confirmation: "Password confirmation" |
331 | 332 | current_password: "Current password" |
333 | + modules: "Modules" | ... | ... |
config/locales/views/pt.yml
... | ... | @@ -58,7 +58,7 @@ pt: |
58 | 58 | metric: "Metrica" |
59 | 59 | value: "Valor" |
60 | 60 | threshold: "limite" |
61 | - granularity: "Granularidade:" | |
61 | + granularity: "Granularidade" | |
62 | 62 | repositories: "Repositórios" |
63 | 63 | type: "Tipo" |
64 | 64 | address: "Endereço" |
... | ... | @@ -108,8 +108,8 @@ pt: |
108 | 108 | latest_projects_home_index: "Últimos projetos" |
109 | 109 | body_home_index: "<p>Este é o Mezuro! Uma plataforma web <strong>livre</strong> para <strong>avaliação colaborativa</strong> de código fonte.</p> <p>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 <strong>C</strong>, <strong>C++</strong> e <strong>Java</strong>, mas nós pretendemos dar suporte a mais linguagems no futuro.</p>" |
110 | 110 | body_feedback_home_index: "Mezuro está sob constante desenvolvimento. Experimente e nos dê o seu" |
111 | - body1_compound_form: " <p>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.</p> <p>Exemplo: Código foo := 10 </p>" | |
112 | - body2_compound_form: " <p>Ele é usado para calcular a média ponderada de um" | |
111 | + 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." | |
112 | + body1_compound_form_example: "Exemplo: Código foo := 10" | |
113 | 113 | body1_compound_metric_options: "Um nome personalizado para a sua métrica composta." |
114 | 114 | body2_compound_metric_options: "Uma breve descrição de sua métrica composta." |
115 | 115 | 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: |
118 | 118 | weighted_average_metric_configurations_form: "Ele é usado para calcular a média ponderada de um" |
119 | 119 | statistical_result_metric_configurations_form: "É o cálculo dos resultados estatísticos para maior" |
120 | 120 | modules_eg_metric_configurations_form: "módulos (por exemplo, as linhas médias de código das classes dentro de um pacote)." |
121 | - associated_metric_configuration_form: "associado a esta métrica." | |
121 | + associated_metric_configuration_form_html: "O %{href} associado a esta métrica." | |
122 | 122 | range_metric_configurations_no_ranges: "Ainda não existem intervalos!" |
123 | 123 | choose_metric: "Escolha uma métrica a partir de uma ferramenta Base:" |
124 | 124 | editing_metric_configurations_edit: "Edição de configuração da Métrica" |
... | ... | @@ -153,12 +153,11 @@ pt: |
153 | 153 | stay_logged: "Fique conectado." |
154 | 154 | resend_unclok_instructions: "Reenviar instruções para desbloquear" |
155 | 155 | grade: "Nota" |
156 | - grades_belonging_to_a_module: "através de suas Notas" | |
157 | 156 | edit_configuration: "Editar configurações" |
158 | 157 | must_logged_configuration: "Você precisa estar logado para criar novas configurações." |
159 | 158 | new_configuration: "Nova Configuração" |
160 | - calculate_weighted_average: "Ele é usado para calcular a média ponderada de um " | |
161 | - measured_metric: "medidos por essa métrica." | |
159 | + calculate_weighted_average_html: "Ele é usado para calcular a média ponderada de um %{href} através de suas Notas" | |
160 | + measured_metric_html: "A %{href} dos %{href2} medidos por esta métrica." | |
162 | 161 | change_password: "Mude sua senha" |
163 | 162 | no_metric_configurations: "Não há configurações de métricas ainda!" |
164 | 163 | range_lower_limit: "Limite de intervalo inferior." |
... | ... | @@ -326,6 +325,7 @@ pt: |
326 | 325 | pick_color: "Escolha a Cor" |
327 | 326 | password_confirmation: "Confirme sua senha" |
328 | 327 | current_password: "Senha Atual" |
328 | + modules: "Módulos" | |
329 | 329 | |
330 | 330 | #errors |
331 | 331 | errors: | ... | ... |