Commit 6a86c67729206911b0718cd0b7d271014260994e

Authored by Rafael Manzo
2 parents 3444bb93 6316f108

Merge pull request #204 from mezuro/issue_03

Internationalization on Brazilian portuguese translations
Showing 182 changed files with 2843 additions and 838 deletions   Show diff stats

Too many changes.

To preserve performance only 100 of 182 files displayed.

Gemfile
... ... @@ -63,6 +63,9 @@ gem 'exception_notification', '~> 4.0.1'
63 63 # Google Analytics
64 64 gem 'google-analytics-rails', '~> 0.0.6'
65 65  
  66 +# Browser language detection
  67 +gem 'http_accept_language'
  68 +
66 69 group :test do
67 70 # Easier test writing
68 71 gem "shoulda-matchers", '~> 2.8.0'
... ... @@ -105,6 +108,9 @@ group :development, :test do
105 108 # Better error interface
106 109 gem 'better_errors'
107 110 gem 'binding_of_caller'
  111 +
  112 + # Localization assistance
  113 + gem 'i18n_generators'
108 114 end
109 115  
110 116 # Acceptance tests
... ...
Gemfile.lock
... ... @@ -118,6 +118,8 @@ GEM
118 118 warden (~> 1.2.3)
119 119 diff-lcs (1.2.5)
120 120 docile (1.1.5)
  121 + domain_name (0.5.23)
  122 + unf (>= 0.0.5, < 1.0.0)
121 123 erubis (2.7.0)
122 124 exception_notification (4.0.1)
123 125 actionmailer (>= 3.0.4)
... ... @@ -138,7 +140,13 @@ GEM
138 140 activesupport (>= 4.1.0)
139 141 google-analytics-rails (0.0.6)
140 142 hike (1.2.3)
  143 + http-cookie (1.0.2)
  144 + domain_name (~> 0.5)
  145 + http_accept_language (2.0.5)
141 146 i18n (0.7.0)
  147 + i18n_generators (1.2.1)
  148 + mechanize
  149 + rails (>= 3.0.0)
142 150 jbuilder (2.2.12)
143 151 activesupport (>= 3.0.0, < 5)
144 152 multi_json (~> 1.2)
... ... @@ -168,6 +176,15 @@ GEM
168 176 nokogiri (>= 1.5.9)
169 177 mail (2.6.3)
170 178 mime-types (>= 1.16, < 3)
  179 + mechanize (2.7.3)
  180 + domain_name (~> 0.5, >= 0.5.1)
  181 + http-cookie (~> 1.0)
  182 + mime-types (~> 2.0)
  183 + net-http-digest_auth (~> 1.1, >= 1.1.1)
  184 + net-http-persistent (~> 2.5, >= 2.5.2)
  185 + nokogiri (~> 1.4)
  186 + ntlm-http (~> 0.1, >= 0.1.1)
  187 + webrobots (>= 0.0.9, < 0.2)
171 188 metaclass (0.0.4)
172 189 mime-types (2.4.3)
173 190 mini_portile (0.6.2)
... ... @@ -177,11 +194,14 @@ GEM
177 194 multi_json (1.11.0)
178 195 multi_test (0.1.2)
179 196 multipart-post (2.0.0)
  197 + net-http-digest_auth (1.4)
  198 + net-http-persistent (2.9.4)
180 199 net-scp (1.2.1)
181 200 net-ssh (>= 2.6.5)
182 201 net-ssh (2.9.2)
183 202 nokogiri (1.6.6.2)
184 203 mini_portile (~> 0.6.0)
  204 + ntlm-http (0.1.1)
185 205 orm_adapter (0.5.0)
186 206 pg (0.18.1)
187 207 poltergeist (1.6.0)
... ... @@ -283,6 +303,9 @@ GEM
283 303 uglifier (2.7.1)
284 304 execjs (>= 0.3.0)
285 305 json (>= 1.8.0)
  306 + unf (0.1.4)
  307 + unf_ext
  308 + unf_ext (0.0.6)
286 309 warden (1.2.3)
287 310 rack (>= 1.0)
288 311 web-console (2.0.0)
... ... @@ -290,6 +313,7 @@ GEM
290 313 binding_of_caller (>= 0.7.2)
291 314 railties (~> 4.0)
292 315 sprockets-rails (>= 2.0, < 4.0)
  316 + webrobots (0.1.1)
293 317 websocket-driver (0.5.3)
294 318 websocket-extensions (>= 0.1.0)
295 319 websocket-extensions (0.1.2)
... ... @@ -318,6 +342,8 @@ DEPENDENCIES
318 342 exception_notification (~> 4.0.1)
319 343 factory_girl_rails (~> 4.5.0)
320 344 google-analytics-rails (~> 0.0.6)
  345 + http_accept_language
  346 + i18n_generators
321 347 jbuilder (~> 2.2.2)
322 348 jquery-rails
323 349 jquery-ui-rails (~> 5.0.0)
... ...
app/assets/stylesheets/bootstrap_and_overrides.css
... ... @@ -54,4 +54,8 @@ footer div {
54 54 line-height: 20px;
55 55 color: #999999;
56 56 text-transform: uppercase;
57   -}
58 57 \ No newline at end of file
  58 +}
  59 +
  60 +dd {
  61 + margin-left: 40px !important;
  62 +}
... ...
app/controllers/application_controller.rb
  1 +require 'http_accept_language'
  2 +
1 3 class ApplicationController < ActionController::Base
2 4 # Prevent CSRF attacks by raising an exception.
3 5 # For APIs, you may want to use :null_session instead.
... ... @@ -6,10 +8,27 @@ class ApplicationController &lt; ActionController::Base
6 8 add_flash_types :error, :alert
7 9  
8 10 before_filter :configure_permitted_parameters, if: :devise_controller?
  11 + before_filter :set_locale
  12 +
  13 + class << self
  14 + # This is necessary for correct devise routing with locales: https://github.com/plataformatec/devise/wiki/How-To:--Redirect-with-locale-after-authentication-failure
  15 + def default_url_options
  16 + locale_options
  17 + end
  18 +
  19 + def locale_options
  20 + { locale: I18n.locale }
  21 + end
  22 + end
  23 +
  24 + # This happens after the *_url *_path helpers
  25 + def default_url_options
  26 + self.class.locale_options
  27 + end
9 28  
10 29 protected
11 30  
12   - # We don't have how too test this unless we have the Devise controllers.
  31 + # We don't have a way to test this unless we have the Devise controllers among our code.
13 32 # Since creating the controllers looks wronger than not testing this two
14 33 # lines. I think we can live without 100% of coverage
15 34 # :nocov:
... ... @@ -17,5 +36,12 @@ class ApplicationController &lt; ActionController::Base
17 36 devise_parameter_sanitizer.for(:sign_up) << :name
18 37 devise_parameter_sanitizer.for(:account_update) << :name
19 38 end
20   - # :nocov:
  39 +
  40 + def set_locale
  41 + I18n.locale = (
  42 + params[:locale] ||
  43 + http_accept_language.compatible_language_from(I18n.available_locales) ||
  44 + I18n.default_locale
  45 + )
  46 + end
21 47 end
... ...
app/controllers/compound_metric_configurations_controller.rb
... ... @@ -25,7 +25,7 @@ class CompoundMetricConfigurationsController &lt; BaseMetricConfigurationsControlle
25 25 respond_to do |format|
26 26 edit
27 27 if @compound_metric_configuration.update(metric_configuration_params)
28   - format.html { redirect_to kalibro_configuration_path(@compound_metric_configuration.kalibro_configuration_id), notice: 'Compound Metric Configuration was successfully updated.' }
  28 + format.html { redirect_to kalibro_configuration_path(@compound_metric_configuration.kalibro_configuration_id), notice: t('successfully_updated', :record => t('compound') + " " + @compound_metric_configuration.class.model_name.human) }
29 29 format.json { head :no_content }
30 30 else
31 31 failed_action(format, 'edit')
... ... @@ -59,7 +59,7 @@ class CompoundMetricConfigurationsController &lt; BaseMetricConfigurationsControlle
59 59 #Code extracted from create action
60 60 def create_and_redir(format)
61 61 if @compound_metric_configuration.save
62   - format.html { redirect_to kalibro_configuration_path(@compound_metric_configuration.kalibro_configuration_id), notice: 'Compound Metric Configuration was successfully created.' }
  62 + format.html { redirect_to kalibro_configuration_path(@compound_metric_configuration.kalibro_configuration_id), notice: t('successfully_created', :record => t('compound') + " " + @compound_metric_configuration.class.model_name.human) }
63 63 else
64 64 failed_action(format, 'new')
65 65 end
... ...
app/controllers/concerns/ownership_authentication.rb
... ... @@ -54,7 +54,7 @@ module OwnershipAuthentication
54 54 def check_project_ownership(id)
55 55 if current_user.project_attributes.find_by_project_id(id).nil?
56 56 respond_to do |format|
57   - format.html { redirect_to projects_url, notice: "You're not allowed to do this operation" }
  57 + format.html { redirect_to projects_url, notice: t('not_allowed') }
58 58 format.json { head :no_content }
59 59 end
60 60 end
... ... @@ -65,7 +65,7 @@ module OwnershipAuthentication
65 65 def check_reading_group_ownership(id)
66 66 if current_user.reading_group_ownerships.find_by_reading_group_id(id).nil?
67 67 respond_to do |format|
68   - format.html { redirect_to reading_group_url(id), notice: "You're not allowed to do this operation" }
  68 + format.html { redirect_to reading_group_url(id: id), notice: t('not_allowed') }
69 69 format.json { head :no_content }
70 70 end
71 71 end
... ... @@ -76,7 +76,7 @@ module OwnershipAuthentication
76 76 def check_kalibro_configuration_ownership(id)
77 77 if current_user.kalibro_configuration_ownerships.find_by_kalibro_configuration_id(id).nil?
78 78 respond_to do |format|
79   - format.html { redirect_to kalibro_configurations_url(id), notice: "You're not allowed to do this operation" }
  79 + format.html { redirect_to kalibro_configurations_url(id: id), notice: t('not_allowed') }
80 80 format.json { head :no_content }
81 81 end
82 82 end
... ...
app/controllers/kalibro_configurations_controller.rb
... ... @@ -80,7 +80,7 @@ class KalibroConfigurationsController &lt; ApplicationController
80 80 if @kalibro_configuration.save
81 81 current_user.kalibro_configuration_ownerships.create kalibro_configuration_id: @kalibro_configuration.id
82 82  
83   - format.html { redirect_to kalibro_configuration_path(@kalibro_configuration.id), notice: 'Configuration was successfully created.' }
  83 + format.html { redirect_to kalibro_configuration_path(@kalibro_configuration.id), notice: t('successfully_created', :record => t(@kalibro_configuration.model_name.human)) }
84 84 format.json { render action: 'show', status: :created, location: @kalibro_configuration }
85 85 else
86 86 format.html { render action: 'new' }
... ...
app/controllers/kalibro_ranges_controller.rb
... ... @@ -23,7 +23,7 @@ class KalibroRangesController &lt; ApplicationController
23 23 def destroy
24 24 @kalibro_range.destroy
25 25 respond_to do |format|
26   - format_metric_configuration_path(format, "Range was successfully destroyed.")
  26 + format_metric_configuration_path(format, t('successfully_destroyed', :record => t(@kalibro_range.class)))
27 27 format.json { head :no_content }
28 28 end
29 29 end
... ... @@ -36,7 +36,7 @@ class KalibroRangesController &lt; ApplicationController
36 36 respond_to do |format|
37 37 @kalibro_range.metric_configuration_id = @metric_configuration_id
38 38 if @kalibro_range.update(kalibro_range_params)
39   - format_metric_configuration_path(format, 'Range was successfully edited.')
  39 + format_metric_configuration_path(format, t('successfully_updated', :record => t(@kalibro_range.class)))
40 40 format.json { head :no_content }
41 41 else
42 42 failed_action(format, 'edit')
... ... @@ -53,7 +53,7 @@ class KalibroRangesController &lt; ApplicationController
53 53  
54 54 def create_and_redir(format)
55 55 if @kalibro_range.save
56   - format_metric_configuration_path(format, 'Range was successfully created.')
  56 + format_metric_configuration_path(format, t('successfully_created', :record => t(@kalibro_range.class)))
57 57 else
58 58 failed_action(format, 'new')
59 59 end
... ...
app/controllers/metric_configurations_controller.rb
... ... @@ -29,7 +29,7 @@ class MetricConfigurationsController &lt; BaseMetricConfigurationsController
29 29 respond_to do |format|
30 30 @metric_configuration.kalibro_configuration_id = params[:kalibro_configuration_id]
31 31 if @metric_configuration.update(metric_configuration_params)
32   - format.html { redirect_to(kalibro_configuration_path(@metric_configuration.kalibro_configuration_id), notice: 'Metric Configuration was successfully updated.') }
  32 + format.html { redirect_to(kalibro_configuration_path(@metric_configuration.kalibro_configuration_id), notice: t('successfully_updated', :record => t(metric_configuration.class))) }
33 33 format.json { head :no_content }
34 34 Rails.cache.delete("#{@metric_configuration.kalibro_configuration_id}_metric_configurations")
35 35 else
... ... @@ -71,7 +71,7 @@ class MetricConfigurationsController &lt; BaseMetricConfigurationsController
71 71 #Code extracted from create action
72 72 def create_and_redir(format)
73 73 if @metric_configuration.save
74   - format.html { redirect_to kalibro_configuration_path(@metric_configuration.kalibro_configuration_id), notice: 'Metric Configuration was successfully created.' }
  74 + format.html { redirect_to kalibro_configuration_path(@metric_configuration.kalibro_configuration_id), notice: t('successfully_created', :record => t(metric_configuration.class)) }
75 75 else
76 76 failed_action(format, 'new')
77 77 end
... ...
app/controllers/projects_controller.rb
... ... @@ -79,7 +79,7 @@ class ProjectsController &lt; ApplicationController
79 79 def create_and_redir(format)
80 80 if @project.save
81 81 current_user.project_attributes.create(project_id: @project.id)
82   - format.html { redirect_to project_path(@project.id), notice: 'Project was successfully created.' }
  82 + format.html { redirect_to project_path(@project.id), notice: t('successfully_created', :record => t(@project.class.name)) }
83 83 format.json { render action: 'show', status: :created, location: @project }
84 84 else
85 85 format.html { render action: 'new' }
... ...
app/controllers/reading_groups_controller.rb
... ... @@ -71,7 +71,7 @@ class ReadingGroupsController &lt; ApplicationController
71 71 if @reading_group.save
72 72 current_user.reading_group_ownerships.create reading_group_id: @reading_group.id
73 73  
74   - format.html { redirect_to reading_group_path(@reading_group.id), notice: 'Reading Group was successfully created.' }
  74 + format.html { redirect_to reading_group_path(@reading_group.id), notice: t('successfully_created', :record => t(@reading_group.class)) }
75 75 format.json { render action: 'show', status: :created, location: @reading_group }
76 76 else
77 77 format.html { render action: 'new' }
... ...
app/controllers/readings_controller.rb
... ... @@ -28,7 +28,7 @@ class ReadingsController &lt; ApplicationController
28 28 def update
29 29 respond_to do |format|
30 30 if @reading.update(reading_params)
31   - format.html { redirect_to(reading_group_path(@reading.reading_group_id), notice: 'Reading was successfully updated.') }
  31 + format.html { redirect_to(reading_group_path(@reading.reading_group_id), notice: t('successfully_updated', :record => t(@reading.class))) }
32 32 format.json { head :no_content }
33 33 else
34 34 failed_action(format, 'edit')
... ... @@ -63,7 +63,7 @@ class ReadingsController &lt; ApplicationController
63 63 # Code extracted from create action
64 64 def create_and_redir(format)
65 65 if @reading.save
66   - format.html { redirect_to reading_group_path(@reading.reading_group_id), notice: 'Reading was successfully created.' }
  66 + format.html { redirect_to reading_group_path(@reading.reading_group_id), notice: t('successfully_created', :record => t(@reading.class)) }
67 67 else
68 68 @reading_group_id = params[:reading_group_id]
69 69 failed_action(format, 'new')
... ...
app/controllers/repositories_controller.rb
... ... @@ -43,7 +43,7 @@ class RepositoriesController &lt; ApplicationController
43 43 def update
44 44 respond_to do |format|
45 45 if @repository.update(repository_params)
46   - format.html { redirect_to(project_repository_path(params[:project_id], @repository.id), notice: 'Repository was successfully updated.') }
  46 + format.html { redirect_to(project_repository_path(params[:project_id], @repository.id), notice: t('successfully_updated', :record => t(@repository.class))) }
47 47 format.json { head :no_content }
48 48 else
49 49 failed_action(format, 'edit')
... ... @@ -118,7 +118,7 @@ private
118 118 # Code extracted from create action
119 119 def create_and_redir(format)
120 120 if @repository.save
121   - format.html { redirect_to project_repository_process_path(@repository.project_id, @repository.id), notice: 'Repository was successfully created.' }
  121 + format.html { redirect_to project_repository_process_path(@repository.project_id, @repository.id), notice: t('successfully_created', :record => t(@repository.class)) }
122 122 else
123 123 failed_action(format, 'new')
124 124 end
... ...
app/helpers/application_helper.rb
1 1 module ApplicationHelper
  2 + def t_hint(attribute_key, class_key=nil, options={})
  3 + class_key ||= controller_name.singularize
  4 + t("activemodel.hints.#{class_key}.#{attribute_key}", options)
  5 + end
2 6 end
... ...
app/helpers/compound_metric_configurations_helper.rb
1 1 module CompoundMetricConfigurationsHelper
2 2 def scope_options
3   - [["Method","METHOD"], ["Class", "CLASS"], ["Package", "PACKAGE"], ["Software", "SOFTWARE"]]
  3 + [[t("scopes.METHOD"),"METHOD"], [t("scopes.CLASS"), "CLASS"], [t("scopes.PACKAGE"), "PACKAGE"], [t("scopes.SOFTWARE"), "SOFTWARE"]]
  4 + end
  5 +
  6 + def compound_metric_human_name(count=1)
  7 + key = count > 1 ? 'other': 'one'
  8 + t("activemodel.models.compound_metric_configuration.#{key}")
  9 + end
  10 +
  11 + def compound_metric_human_attribute_name(attribute_key)
  12 + t("activemodel.attributes.compound_metric_configuration.#{attribute_key}")
4 13 end
5 14 end
... ...
app/helpers/kalibro_configurations_helper.rb
... ... @@ -5,17 +5,17 @@ module KalibroConfigurationsHelper
5 5  
6 6 def link_to_edit_form(metric_configuration, kalibro_configuration_id)
7 7 if (metric_configuration.metric.is_a? KalibroClient::Entities::Miscellaneous::CompoundMetric)
8   - link_to('Edit', edit_kalibro_configuration_compound_metric_configuration_path(kalibro_configuration_id, metric_configuration.id), class: 'btn btn-info')
  8 + link_to(t('edit'), edit_kalibro_configuration_compound_metric_configuration_path(kalibro_configuration_id: kalibro_configuration_id, id: metric_configuration.id), class: 'btn btn-info')
9 9 else
10   - link_to('Edit', edit_kalibro_configuration_metric_configuration_path(kalibro_configuration_id, metric_configuration.id), class: 'btn btn-info')
  10 + link_to(t('edit'), edit_kalibro_configuration_metric_configuration_path(kalibro_configuration_id: kalibro_configuration_id, id: metric_configuration.id), class: 'btn btn-info')
11 11 end
12 12 end
13 13  
14 14 def link_to_show_page(metric_configuration, kalibro_configuration_id)
15 15 if (metric_configuration.metric.is_a? KalibroClient::Entities::Miscellaneous::CompoundMetric)
16   - link_to('Show', kalibro_configuration_compound_metric_configuration_path(kalibro_configuration_id, metric_configuration.id), class: 'btn btn-info')
  16 + link_to(t('show'), kalibro_configuration_compound_metric_configuration_path(kalibro_configuration_id: kalibro_configuration_id, id: metric_configuration.id), class: 'btn btn-info')
17 17 else
18   - link_to('Show', kalibro_configuration_metric_configuration_path(kalibro_configuration_id, metric_configuration.id), class: 'btn btn-info')
  18 + link_to(t('show'), kalibro_configuration_metric_configuration_path(kalibro_configuration_id: kalibro_configuration_id, id: metric_configuration.id), class: 'btn btn-info')
19 19 end
20 20 end
21 21 end
... ...
app/helpers/metric_configurations_helper.rb
1 1 module MetricConfigurationsHelper
2 2 def aggregation_options
3   - [["Average","AVERAGE"], ["Median", "MEDIAN"], ["Maximum", "MAXIMUM"], ["Minimum", "MINIMUM"],
4   - ["Standard Deviation", "STANDARD_DEVIATION"], ["Count", "COUNT"]]
  3 + [[t("aggregation_forms.AVERAGE"),"AVERAGE"], [t("aggregation_forms.MEDIAN"), "MEDIAN"], [t("aggregation_forms.MAXIMUM"), "MAXIMUM"], [t("aggregation_forms.MINIMUM"), "MINIMUM"], [t("aggregation_forms.STANDARD_DEVIATION"), "STANDARD_DEVIATION"], [t("aggregation_forms.COUNT"), "COUNT"]]
5 4 end
6 5  
7 6 def reading_group_options
... ...
app/views/compound_metric_configurations/_created_metrics.html.erb
1 1 <div id="created-metrics-accordion">
2   - <h3 class="jquery-ui-accordion"> Created Metrics </h3>
  2 + <h3 class="jquery-ui-accordion"> <%= t('created_metrics') %> </h3>
3 3 <div>
4 4 <table class="table table-hover">
5 5 <thead>
6   - <th>Name</th>
7   - <th>Code</th>
  6 + <th> <%= t('name') %> </th>
  7 + <th> <%= t('code') %> </th>
8 8 </thead>
9 9 <tbody>
10 10 <%= render partial: 'created_metric', collection: metric_configurations, as: 'metric_configuration' %>
11 11 </tbody>
12 12 </table>
13 13 </div>
14   -</div>
15 14 \ No newline at end of file
  15 +</div>
... ...
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 :weight, compound_metric_human_attribute_name('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   - It is used to calculate the weighted average of a <%= link_to 'module', tutorials_path("keywords", anchor: "module")%>'s grade.
  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,23 +21,23 @@
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">
28   - <%= f.label :reading_group_id, 'Reading Group', class: 'control-label' %>
  28 + <%= f.label :reading_group_id, ReadingGroup.model_name.human, class: 'control-label' %>
29 29 <%= f.select( :reading_group_id, reading_group_options, {class: 'form-control'} ) %>
30 30 </div>
31 31 <div class="help-container">
32 32 <p>
33   - The <%= link_to 'Reading Group', tutorials_path('keywords', anchor: 'reading_group') %> associated with this metric.
  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>
37 37 <%= f.hidden_field(:kalibro_configuration_id, value: @kalibro_configuration_id) %>
38   - <%= link_to 'Back', kalibro_configuration_path(@kalibro_configuration_id), class: 'btn btn-default' %>
  38 + <%= link_to t('back'), kalibro_configuration_path(@kalibro_configuration_id), class: 'btn btn-default' %>
39 39 <% end %>
40 40 </div>
41 41 </div>
42 42 <br>
43   -<%= f.submit 'Save', class: 'btn btn-primary' %>
  43 +<%= f.submit t('save'), class: 'btn btn-primary' %>
... ...
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 :name, compound_metric_human_attribute_name('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">
7 7 <p>
8   - A custom name for your compound metric.
  8 + <%= t_hint(:name) %>
9 9 </p>
10 10 </div>
11 11 </div>
12 12  
13 13 <div class="form-row">
14 14 <div class="field-container">
15   - <%= f.label :description, class: 'control-label' %>
  15 + <%= f.label :description, compound_metric_human_attribute_name('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">
19 19 <p>
20   - A short description of your compound metric.
  20 + <%= t_hint(:description) %>
21 21 </p>
22 22 </div>
23 23 </div>
24 24  
25 25 <div class="form-row">
26 26 <div class="field-container">
27   - <%= f.label :script, class: 'control-label' %>
  27 + <%= f.label :script, compound_metric_human_attribute_name('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">
31 31 <p>
32   - 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.
  32 + <%= t_hint(:script) %>
33 33 </p>
34 34 </div>
35 35 </div>
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 :scope, compound_metric_human_attribute_name('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   - The <%= link_to 'granularity', tutorials_path("keywords", anchor: "granularity")%> of the <%= link_to 'modules', tutorials_path("keywords", anchor: "module")%> measured by this 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 :code, compound_metric_human_attribute_name('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_hint('code.description') %>
61 57 </p>
  58 + <br>
  59 + <p>
  60 + <%= t_hint('code.example') %>
  61 + </p>
62 62 </div>
63 63 </div>
64 64 <%= f.hidden_field(:compound, { value: "true"}) %>
... ...
app/views/compound_metric_configurations/edit.html.erb
1 1 <div class="page-header">
2   - <h1>Edit Compound Metric Configuration</h1>
3   -</div>
  2 + <h1> <%= t('edit_model', model: compound_metric_human_name) %> </h1>
  3 +</div
4 4  
5 5 <%= render partial: 'created_metrics', locals: {metric_configurations: @metric_configurations} %>
6 6  
... ...
app/views/compound_metric_configurations/new.html.erb
1 1 <div class="page-header">
2   - <h1>New Compound Metric Configuration</h1>
  2 + <h1> <%= "#{t('new.female')} #{compound_metric_human_name}" %> </h1>
3 3 </div>
4 4  
5 5 <%= render partial: 'created_metrics', locals: {metric_configurations: @metric_configurations} %>
... ...
app/views/compound_metric_configurations/show.html.erb
... ... @@ -3,58 +3,58 @@
3 3 </div>
4 4  
5 5 <p>
6   - <strong>Description:</strong>
  6 + <strong> <%= t('description') %>:</strong>
7 7 <% if @compound_metric_configuration.metric.description.nil? %>
8   - <%= "There is no description available." %>
  8 + <%= t('no_description') %>
9 9 <% else %>
10 10 <%= @compound_metric_configuration.metric.description %>
11 11 <% end %>
12 12 </p>
13 13  
14 14 <p>
15   - <strong>Script:</strong>
  15 + <strong> <%= t('script') %>:</strong>
16 16 <%= @compound_metric_configuration.metric.script %>
17 17 </p>
18 18  
19 19 <p>
20   - <strong>Scope:</strong>
  20 + <strong> <%= t('scope') %>:</strong>
21 21 <%= @compound_metric_configuration.metric.scope %>
22 22 </p>
23 23  
24 24 <p>
25   - <strong>Code:</strong>
  25 + <strong> <%= t('code') %>:</strong>
26 26 <%= @compound_metric_configuration.metric.code %>
27 27 </p>
28 28  
29 29 <p>
30   - <strong>Weight:</strong>
  30 + <strong> <%= t('weight') %>:</strong>
31 31 <%= @compound_metric_configuration.weight %>
32 32 </p>
33 33  
34 34 <p>
35   - <strong>Aggregation Form:</strong>
  35 + <strong> <%= t('metric_configurations_aggregation') %>:</strong>
36 36 <%= @compound_metric_configuration.aggregation_form %>
37 37 </p>
38 38  
39 39 <p>
40   - <strong>Reading Group Name:</strong>
  40 + <strong> <%= t('metric_configurations_reading_group') %>:</strong>
41 41 <%= @reading_group.name %>
42 42 </p>
43 43  
44 44 <hr>
45 45  
46   -<h2> Ranges </h2>
  46 +<h2> <%= t('ranges') %> </h2>
47 47 <% if kalibro_configuration_owner? @compound_metric_configuration.kalibro_configuration_id %>
48   - <%= link_to 'Add Range', kalibro_configuration_metric_configuration_new_kalibro_range_path(@compound_metric_configuration.kalibro_configuration_id,
  48 + <%= link_to t('add_range'), kalibro_configuration_metric_configuration_new_kalibro_range_path(@compound_metric_configuration.kalibro_configuration_id,
49 49 @compound_metric_configuration.id), class: 'btn btn-info' %>
50 50 <% end %>
51 51  
52 52 <table class="table table-hover">
53 53 <thead>
54 54 <tr>
55   - <th>Label</th>
56   - <th>Beginning</th>
57   - <th>End</th>
  55 + <th> <%= t('label') %> </th>
  56 + <th> <%= t('beginning') %> </th>
  57 + <th> <%= t('end') %> </th>
58 58 </tr>
59 59 </thead>
60 60 <tbody>
... ... @@ -69,10 +69,10 @@
69 69 <hr>
70 70  
71 71 <p>
72   - <%= link_to 'Back', kalibro_configuration_path(@compound_metric_configuration.kalibro_configuration_id), class: 'btn btn-default' %>
  72 + <%= link_to t('back'), kalibro_configuration_path(@compound_metric_configuration.kalibro_configuration_id), class: 'btn btn-default' %>
73 73 <% if kalibro_configuration_owner? @compound_metric_configuration.kalibro_configuration_id %>
74   - <%= link_to 'Destroy Metric Configuration', kalibro_configuration_metric_configuration_path(@compound_metric_configuration.kalibro_configuration_id,
75   - @compound_metric_configuration.id), method: :delete, data: { confirm: 'Are you sure that you want to destroy this Metric Configuration?' },
  74 + <%= link_to t('destroy_metric_configuration'), kalibro_configuration_metric_configuration_path(@compound_metric_configuration.kalibro_configuration_id,
  75 + @compound_metric_configuration.id), method: :delete, data: { confirm: t('want_destroy_metric_configuration') },
76 76 class: 'btn btn-danger' %>
77 77 <% end %>
78 78 </p>
... ...
app/views/devise/_links.erb 0 → 100644
... ... @@ -0,0 +1,4 @@
  1 +<%# This file was autogenerated by devise-i18n-views and is not used %>
  2 +<% ActiveSupport::Deprecation.warn "Rendering partials devise/_links.erb is deprecated" \
  3 + "please use devise/shared/_links.erb instead."%>
  4 +<%= render "shared/links" %>
... ...
app/views/devise/confirmations/new.html.erb
1 1 <div class="page-header">
2   - <h1>Resend confirmation instructions</h1>
  2 + <h1><%= t('.resend_confirmation_instructions', :default => 'Resend confirmation instructions') %></h1>
3 3 </div>
4 4  
5 5 <%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
... ... @@ -8,7 +8,7 @@
8 8 <div><%= f.label :email %><br />
9 9 <%= f.email_field :email, :autofocus => true %></div>
10 10  
11   - <div><%= f.submit "Resend confirmation instructions", class: 'btn btn-default' %></div>
  11 + <div><%= f.submit t('.resend_confirmation_instructions', :default => 'Resend confirmation instructions'), class: 'btn btn-default' %></div>
12 12 <% end %>
13 13  
14 14 <%= render "devise/shared/links" %>
... ...
app/views/devise/mailer/confirmation_instructions.html.erb
1   -<p>Welcome <%= @email %>!</p>
  1 +<% require 'devise/version' %>
  2 +<p><%= t('.greeting', :recipient => @resource.email, :default => "Welcome #{@resource.email}!") %></p>
2 3  
3   -<p>You can confirm your account email through the link below:</p>
4   -
5   -<p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @token) %></p>
  4 +<p><%= t('.instruction', :default => "You can confirm your account email through the link below:") %></p>
  5 +<p><%= link_to t('.action', :default => "Confirm my account"),
  6 + confirmation_url(@resource, :confirmation_token => (Devise::VERSION.start_with?('3.') ? @token : @resource.confirmation_token)) %></p>
6 7 \ No newline at end of file
... ...
app/views/devise/mailer/reset_password_instructions.html.erb
1   -<p>Hello <%= @resource.email %>!</p>
  1 +<% require 'devise/version' %>
  2 +<p><%= t('.greeting', :recipient => @resource.email, :default => "Hello #{@resource.email}!") %></p>
2 3  
3   -<p>Someone has requested a link to change your password. You can do this through the link below:</p>
  4 +<p><%= t('.instruction', :default => "Someone has requested a link to change your password, and you can do this through the link below.") %></p>
4 5  
5   -<p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @token) %></p>
  6 +<p><%= link_to t('.action', :default => "Change my password"), edit_password_url(@resource, :reset_password_token => (Devise::VERSION.start_with?('3.') ? @token : @resource.reset_password_token)) %></p>
6 7  
7   -<p>If you did not request this, please ignore this email.</p>
8   -<p>Your password will not change until you access the link above and create a new one.</p>
  8 +<p><%= t('.instruction_2', :default => "If you didn't request this, please ignore this email.") %></p>
  9 +<p><%= t('.instruction_3', :default => "Your password won't change until you access the link above and create a new one.") %></p>
... ...
app/views/devise/mailer/unlock_instructions.html.erb
1   -<p>Hello <%= @resource.email %>!</p>
  1 +<% require 'devise/version' %>
  2 +<p><%= t('.greeting', :recipient => @resource.email, :default => "Hello #{@resource.email}!") %></p>
2 3  
3   -<p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p>
  4 +<p><%= t('.message', :default => "Your account has been locked due to an excessive amount of unsuccessful sign in attempts.") %></p>
4 5  
5   -<p>Click the link below to unlock your account:</p>
  6 +<p><%= t('.instruction', :default => "Click the link below to unlock your account:") %></p>
6 7  
7   -<p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @token) %></p>
  8 +<p><%= link_to t('.action', :default => "Unlock my account"), unlock_url(@resource, :unlock_token => (Devise::VERSION.start_with?('3.') ? @token :@resource.unlock_token)) %></p>
... ...
app/views/devise/passwords/edit.html.erb
1 1 <div class="page-header">
2   - <h1>Change your password</h1>
  2 + <h1><%= t('.change_your_password', :default => 'Change your password') %></h1>
3 3 </div>
4 4  
5 5 <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
6 6 <%= devise_error_messages! %>
7 7 <%= f.hidden_field :reset_password_token %>
8 8  
9   - <div><%= f.label :password, "New password" %><br />
  9 + <div><%= f.label :password, t('.new_password', :default => 'New password') %><br />
10 10 <%= f.password_field :password, :autofocus => true %></div>
11 11  
12   - <div><%= f.label :password_confirmation, "Confirm new password" %><br />
  12 + <div><%= f.label :password_confirmation, t('.confirm_new_password', :default => 'Confirm new password') %><br />
13 13 <%= f.password_field :password_confirmation %></div>
14 14  
15   - <div><%= f.submit "Change my password", class: 'btn btn-warning' %></div>
  15 + <div><%= f.submit t('.change_my_password', :default => 'Change my password'), class: 'btn btn-warning' %></div>
16 16 <% end %>
17 17  
18 18 <%= render "devise/shared/links" %>
... ...
app/views/devise/passwords/new.html.erb
1 1 <div class="page-header">
2   - <h1>Forgot your password?</h1>
  2 + <h1><%= t('.forgot_your_password', :default => 'Forgot your password?') %></h1>
3 3 </div>
4 4  
5 5 <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
... ... @@ -14,7 +14,7 @@
14 14 </div>
15 15 <div class="help-container">
16 16 <p>
17   - The same email address used to sign up.
  17 + <%= t('.same_email') %>
18 18 </p>
19 19 </div>
20 20 </div>
... ... @@ -22,8 +22,7 @@
22 22 </div>
23 23  
24 24 <div class="row margin-left-none" style="margin-top: 20px">
25   - <%= f.submit "Send me reset password instructions", class: 'btn btn-warning' %>
  25 + <%= f.submit t('.send_me_reset_password_instructions', :default => "Send me reset password instructions"), class: 'btn btn-warning' %>
26 26 <%= render "devise/shared/links" %>
27 27 </div>
28 28 <% end %>
29   -
... ...
app/views/devise/registrations/edit.html.erb
1 1 <div class="page-header">
2   - <h1>Edit <%= resource_name.to_s.humanize %></h1>
  2 + <h1><%= t('.title', :resource => resource_class.model_name.human , :default => "Edit #{resource_name.to_s.humanize}") %></h1>
3 3 </div>
4   -
5 4 <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put, :class => "form-inline" }) do |f| %>
6 5 <%= devise_error_messages! %>
7 6  
... ... @@ -10,39 +9,39 @@
10 9 <div class="form-row">
11 10 <div class="field-container">
12 11 <%= f.label :name, class: 'control-label' %><br />
13   - <%= f.text_field :name, :autofocus => true, class: 'text-field form-control' %>
  12 + <%= f.email_field :name, :autofocus => true, class: 'text-field form-control' %>
14 13 </div>
15 14 <div class="help-container">
16 15 <p>
17   - Your full name.
  16 + <%= t('.your_full_name')%>
18 17 </p>
19 18 </div>
20 19 </div>
21   -
22 20 <div class="form-row">
23 21 <div class="field-container">
24 22 <%= f.label :email, class: 'control-label' %><br />
25 23 <%= f.email_field :email, class: 'text-field form-control' %>
26   -
27   - <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %>
28   - <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div>
29   - <% end %>
  24 + <%- if devise_mapping.confirmable? && resource.pending_reconfirmation? -%>
  25 + <p>
  26 + <%= t('.currently_waiting_confirmation_for_email', :email => resource.unconfirmed_email, :default => "Currently waiting confirmation for: %{email}") %>
  27 + </p>
  28 + <%- end -%>
30 29 </div>
31 30 <div class="help-container">
32 31 <p>
33   - Your email is our communication channel. Make sure you have typed it correctly.
  32 + <%= t('.your_email_is_our_communication_channel')%>
34 33 </p>
35 34 </div>
36 35 </div>
37 36  
38 37 <div class="form-row">
39 38 <div class="field-container">
40   - <%= f.label :password, class: 'control-label' %> <i>(leave it blank if you do not want to change it)</i><br />
  39 + <%= f.label :password, class: 'control-label' %> <i>(<%= t('.leave_blank_if_you_don_t_want_to_change_it', :default => "leave blank if you don't want to change it") %>)</i><br />
41 40 <%= f.password_field :password, :autocomplete => "off", class: 'text-field form-control' %>
42 41 </div>
43 42 <div class="help-container">
44 43 <p>
45   - Your password must have at least 8 characters. Strong passwords contain numbers, symbols, upper and lowercase characters.
  44 + <%= t('.password_instructions')%>
46 45 </p>
47 46 </div>
48 47 </div>
... ... @@ -54,32 +53,33 @@
54 53 </div>
55 54 <div class="help-container">
56 55 <p>
57   - Confirm your password.
  56 + <%= t('.confirm_your_password')%>
58 57 </p>
59 58 </div>
60 59 </div>
61 60  
62 61 <div class="form-row">
63 62 <div class="field-container">
64   - <%= f.label :current_password, class: 'control-label' %><br />
  63 + <%= f.label :current_password, class: 'control-label' %> <i>(<%= t('.we_need_your_current_password_to_confirm_your_changes', :default => 'we need your current password to confirm your changes') %>)</i><br />
65 64 <%= f.password_field :current_password, class: 'text-field form-control' %>
66 65 </div>
67 66 <div class="help-container">
68 67 <p>
69   - Your current password is needed to confirm your changes.
  68 + <%= t('.current_password_required')%>
70 69 </p>
71 70 </div>
72 71 </div>
73   - </div>
74   - </div>
75 72  
76   - <div class="row margin-left-none" style="margin-top: 20px">
77   - <%= f.submit "Update", class: 'btn btn-primary col-md-2' %>
  73 + <div class="row margin-left-none" style="margin-top: 20px">
  74 + <%= f.submit t('.update', :default => "Update"), class: 'btn btn-primary col-md-2' %>
  75 + </div>
  76 + </div>
78 77 </div>
79 78 <% end %>
80 79  
81 80 <hr />
  81 +<h2><%= t('.cancel_my_account', :default => 'Cancel my account') %></h2>
82 82  
83   -<h2>Cancel my account</h2>
  83 +<p><%= t('.unhappy', :default => 'Unhappy') %>? <%= link_to t('.cancel_my_account', :default => "Cancel my account"), registration_path(resource_name), :data => { :confirm => t('.are_you_sure', :default => "Are you sure?") }, :method => :delete, class: 'btn btn-warning' %>.</p>
84 84  
85   -<p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Do you really want to cancel your account?" }, :method => :delete, class: 'btn btn-danger' %></p>
  85 +<%= link_to t('devise.shared.links.back', :default => "Back"), :back, class: 'btn btn-default' %>
... ...
app/views/devise/registrations/new.html.erb
1 1 <div class="page-header">
2   - <h1>Sign Up</h1>
  2 + <h1><%= t('.sign_up', :default => "Sign up") %></h1>
3 3 </div>
4 4  
5   -<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name),:html => { :class => "form-inline" }) do |f| %>
  5 +<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :class => "form-inline" }) do |f| %>
6 6 <%= devise_error_messages! %>
7 7  
8 8 <div class="row margin-left-none">
... ... @@ -14,7 +14,7 @@
14 14 </div>
15 15 <div class="help-container">
16 16 <p>
17   - Your full name.
  17 + <%= t('.your_full_name')%>
18 18 </p>
19 19 </div>
20 20 </div>
... ... @@ -26,7 +26,7 @@
26 26 </div>
27 27 <div class="help-container">
28 28 <p>
29   - Your email is our communication channel. Make sure you have typed it correctly.
  29 + <%= t('.your_email_is_our_communication_channel')%>
30 30 </p>
31 31 </div>
32 32 </div>
... ... @@ -38,7 +38,7 @@
38 38 </div>
39 39 <div class="help-container">
40 40 <p>
41   - Your password must have at least 8 characters. Strong passwords contain numbers, symbols, upper and lowercase characters.
  41 + <%= t('.password_instructions')%>
42 42 </p>
43 43 </div>
44 44 </div>
... ... @@ -50,15 +50,14 @@
50 50 </div>
51 51 <div class="help-container">
52 52 <p>
53   - Confirm your password.
  53 + <%= t('.confirm_your_password')%>
54 54 </p>
55 55 </div>
56 56 </div>
57 57 </div>
58   -
59   - </div> <!--row-->
  58 + </div>
60 59  
61 60 <div class="row margin-left-none" style="margin-top: 20px">
62   - <%= f.submit "Sign Up", class: 'btn btn-primary col-md-2' %>
  61 + <%= f.submit t('.sign_up', :default => "Sign up"), class: 'btn btn-primary col-md-2' %>
63 62 </div>
64 63 <% end %>
... ...
app/views/devise/sessions/new.html.erb
1 1 <div class="page-header">
2   - <h1>Login into Mezuro</h1>
  2 + <h1><%= t('.sign_in', :default => "Sign in") %></h1>
3 3 </div>
4 4  
5   -<%= form_for(resource, :as => resource_name, :url => session_path(resource_name),:html => { :class => "form-inline" }) do |f| %>
  5 +<%= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :class => "form-inline" }) do |f| %>
6 6 <div class="row margin-left-none">
7 7 <div class="form-table col-md-9">
8 8 <div class="form-row">
9 9 <div class="field-container">
10   - <%= f.label :email, class: "control-label " %>
11   - <%= f.email_field :email, autofocus: true, tabindex: 1, class: 'text-field form-control' %>
  10 + <%= f.label :email, class: 'control-label' %>
  11 + <%= f.email_field :email, :autofocus => true, tabindex: 1, class: 'text-field form-control' %>
12 12 </div>
13 13 <div class="help-container">
14 14 <p>
15   - The same email address used to sign up.
  15 + <%= t('.same_email') %>
16 16 </p>
17 17 </div>
18 18 </div>
19   - </div>
20   - </div>
21 19  
22   - <div class="row margin-left-none">
23   - <div class="form-table col-md-9">
24 20 <div class="form-row">
25 21 <div class="field-container">
26   - <%= f.label :password, class: "control-label" %>
27   - <%= f.password_field :password, tabindex: 2, class: 'text-field form-control' %>
  22 + <%= f.label :password, class: 'control-label' %>
  23 + <%= f.password_field :password, class: 'text-field form-control', tabindex: 2 %>
28 24 </div>
29 25 <div class="help-container">
30 26 <p>
31   - If you forgot your password, follow this <a href="/users/password/new">link</a> to reset it.
  27 + <%= t('.forgot_password_link_html', link: link_to("link", "/users/password/new")) %>
32 28 </p>
33 29 </div>
34 30 </div>
35   - </div>
36   - </div>
37 31  
38   - <% if devise_mapping.rememberable? -%>
39   - <div class="row margin-left-none">
40   - <div class="form-table col-md-9">
41   - <div class="form-row">
42   - <div class="field-container">
43   - <div class="checkbox">
  32 + <% if devise_mapping.rememberable? -%>
  33 + <div class="form-row">
  34 + <div class="field-container">
44 35 <label>
45 36 <%= f.check_box :remember_me, class: "checkbox" %> <%= f.label :remember_me %>
46 37 </label>
47 38 </div>
  39 + <div class="help-container">
  40 + <p>
  41 + <%= t('.stay_logged_in')%>
  42 + </p>
  43 + </div>
48 44 </div>
49   - <div class="help-container">
50   - <p>
51   - Stay logged in.
52   - </p>
53   - </div>
54   - </div>
  45 + <% end -%>
55 46 </div>
56 47 </div>
57   - <% end -%>
58 48  
59 49 <div class="row margin-left-none" style="margin-top: 20px">
60   - <%= f.submit "Sign In", class: 'btn btn-primary', :tabindex => 3 %>
  50 + <%= f.submit t('.sign_in', :default => "Sign in"), class: 'btn btn-primary', :tabindex => 3 %>
61 51 <%= render "devise/shared/links" %>
62 52 </div>
63 53 <% end %>
... ...
app/views/devise/shared/_links.erb
1 1 <%- if controller_name != 'sessions' %>
2   - <%= link_to "Sign In", new_session_path(resource_name), class: 'btn btn-info' %>
  2 +<%= link_to t(".sign_in", :default => "Sign in"), new_session_path(resource_name), class: 'btn btn-info' %>
3 3 <% end -%>
4 4  
5 5 <%- if devise_mapping.registerable? && controller_name != 'registrations' %>
6   - <%= link_to "Sign Up", new_registration_path(resource_name), class: 'btn btn-info' %>
  6 +<%= link_to t(".sign_up", :default => "Sign up"), new_registration_path(resource_name), class: 'btn btn-info' %>
7 7 <% end -%>
8 8  
9   -<!-- <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %>
10   - <%= link_to "Forgot your password?", new_password_path(resource_name), class: 'btn btn-info' %>
  9 +<!-- <%- if devise_mapping.recoverable? && controller_name != 'passwords' %>
  10 +<%= link_to t(".forgot_your_password", :default => "Forgot your password?"), new_password_path(resource_name), class: 'btn btn-info' %>
11 11 <% end -%> -->
12 12  
13 13 <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
14   - <%= link_to "Have you received confirmation instructions?", new_confirmation_path(resource_name), class: 'btn btn-info' %>
  14 +<%= link_to t('.didn_t_receive_confirmation_instructions', :default => "Didn't receive confirmation instructions?"), new_confirmation_path(resource_name), class: 'btn btn-info' %>
15 15 <% end -%>
16 16  
17 17 <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
18   - <%= link_to "Have you received unlock instructions?", new_unlock_path(resource_name), class: 'btn btn-info' %>
  18 +<%= link_to t('.didn_t_receive_unlock_instructions', :default => "Didn't receive unlock instructions?"), new_unlock_path(resource_name), class: 'btn btn-info' %>
19 19 <% end -%>
20 20  
21 21 <%- if devise_mapping.omniauthable? %>
22 22 <%- resource_class.omniauth_providers.each do |provider| %>
23   - <%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider), class: 'btn btn-info' %>
  23 + <%= link_to t('.sign_in_with_provider', :provider => provider.to_s.titleize, :default => "Sign in with #{provider.to_s.titleize}"), omniauth_authorize_path(resource_name, provider), class: 'btn btn-info' %>
24 24 <% end -%>
25 25 -<% end -%>
  26 +<% end -%>
26 27 \ No newline at end of file
... ...
app/views/devise/unlocks/new.html.erb
1 1 <div class="page-header">
2   - <h1>Resend unlock instructions</h1>
  2 + <h2><%= t('.resend_unlock_instructions', :default => "Resend unlock instructions") %></h2>
3 3 </div>
4 4  
5 5 <%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
... ... @@ -8,7 +8,7 @@
8 8 <div><%= f.label :email %><br />
9 9 <%= f.email_field :email, :autofocus => true %></div>
10 10  
11   - <div><%= f.submit "Resend unlock instructions", class: 'btn btn-primary' %></div>
  11 + <div><%= f.submit t('.resend_unlock_instructions', :default => "Resend unlock instructions"), class: 'btn btn-primary' %></div>
12 12 <% end %>
13 13  
14 14 <%= render "devise/shared/links" %>
... ...
app/views/home/index.html.erb
1 1 <div class="jumbotron">
2   - <p><h1>Understanding Code Metrics</h1></p>
3   -
4   - <p>This is Mezuro! A <strong>free/libre</strong> web platform for <strong>collaborative</strong> source code <strong>evaluation</strong>.</p>
5   -
6   - <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>
7   -
8   - <p> Mezuro is continuously under development. Try it and give us your <%= link_to 'feedback', 'https://github.com/mezuro/mezuro/issues', target: '_blank' %>.</p>
  2 + <p><h1><%= t('title_home_index') %></h1></p>
  3 + <p>
  4 + <%= t('body_home_index_html') %>
  5 + </p>
  6 + <p>
  7 + <%= t('body_feedback_home_index_html', href: link_to('feedback', 'https://github.com/mezuro/mezuro/issues', target: '_blank')) %>
  8 + </p>
9 9 </div>
10 10  
11   -<h2>Latest projects</h2>
  11 +<h2><%= t('latest_projects') %></h2>
12 12  
13 13 <ul>
14 14 <% cache do %>
... ...
app/views/kalibro_configurations/_form.html.erb
... ... @@ -22,8 +22,8 @@
22 22 </div>
23 23  
24 24 <div class="row margin-left-none" style="margin-top: 20px">
25   - <%= f.submit 'Save', class: 'btn btn-primary' %>
26   - <%= link_to 'Back', kalibro_configurations_path, class: 'btn btn-default' %>
  25 + <%= f.submit t('save'), class: 'btn btn-primary' %>
  26 + <%= link_to t('back'), kalibro_configurations_path, class: 'btn btn-default' %>
27 27 </div>
28 28  
29 29 <% end %>
... ...
app/views/kalibro_configurations/_kalibro_configuration.html.erb
1 1 <tr>
2 2 <td><%= kalibro_configuration.name %></td>
3 3 <td><%= kalibro_configuration.description %></td>
4   - <td><%= link_to 'Show', kalibro_configuration_path(kalibro_configuration.id), class: 'btn btn-info' %></td>
  4 + <td><%= link_to t('show'), kalibro_configuration_path(kalibro_configuration.id), class: 'btn btn-info' %></td>
5 5 <td>
6 6 <% if kalibro_configuration_owner?(kalibro_configuration.id) %>
7   - <%= link_to 'Edit', edit_kalibro_configuration_path(kalibro_configuration.id), class: 'btn btn-info' %>
  7 + <%= link_to t('edit', model: ''), edit_kalibro_configuration_path(kalibro_configuration.id), class: 'btn btn-info' %>
8 8 <% end %>
9 9 </td>
10 10 </tr>
11 11 \ No newline at end of file
... ...
app/views/kalibro_configurations/_list.html.erb
1 1 <table class="table table-hover">
2 2 <thead>
3 3 <tr>
4   - <th>Name</th>
5   - <th>Description</th>
  4 + <th><%= t('name') %></th>
  5 + <th><%= t('description') %></th>
6 6 <th colspan="2"></th>
7 7 </tr>
8 8 </thead>
... ...
app/views/kalibro_configurations/_metric_configurations.html.erb
... ... @@ -10,10 +10,9 @@
10 10 <%= link_to_edit_form(metric_configuration, @kalibro_configuration.id) %>
11 11 </td>
12 12 <td>
13   - <%= link_to 'Destroy', kalibro_configuration_metric_configuration_path(@kalibro_configuration.id, metric_configuration.id),
14   - method: :delete, data: { confirm: 'Are you sure that you want to destroy this Metric Configuration?' },
  13 + <%= link_to t('destroy_metric_configuration'), kalibro_configuration_metric_configuration_path(@kalibro_configuration.id, metric_configuration.id),
  14 + method: :delete, data: { confirm: t('want_destroy_metric_configuration') },
15 15 class: 'btn btn-danger' %>
16 16 </td>
17   - </td>
18   - <% end %>
  17 + <% end %>
19 18 </tr>
... ...
app/views/kalibro_configurations/_no_metric_configurations.html.erb
1 1 <tr>
2 2 <% col_number = kalibro_configuration_owner?(@kalibro_configuration.id) ? 5 : 3 %>
3   - <td colspan="<%= col_number %>">There are no Metric Configurations yet!</td>
  3 + <td colspan="<%= col_number %>"><%= t('no_metric_configurations') %></td>
4 4 </tr>
5 5 \ No newline at end of file
... ...
app/views/kalibro_configurations/edit.html.erb
1   -<h1>Edit Configuration</h1>
  1 +<h1><%= t('edit_model', model: KalibroConfiguration.model_name.human) %></h1>
2 2  
3 3 <%= render 'form' %>
... ...
app/views/kalibro_configurations/index.html.erb
1 1 <div class="page-header">
2   - <h1>Configurations</h1>
  2 + <h1><%= KalibroConfiguration.model_name.human(count: 2) %></h1>
3 3 </div>
4 4  
5 5 <% if user_signed_in? %>
6 6 <p>
7   - <%= link_to 'New Configuration', new_kalibro_configuration_path, class: 'btn btn-primary' %>
  7 + <%= link_to "#{t('new.female')} #{KalibroConfiguration.model_name.human}", new_kalibro_configuration_path, class: 'btn btn-primary' %>
8 8 </p>
9 9 <%else%>
10 10 <p class="alert alert-warning alert-dismissable">
11 11 <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
12   - You must be logged in to create new Configurations.
  12 + <%= t('unauthenticated', action: "#{t('create', model: KalibroConfiguration.model_name.human(count: 2)).downcase}") %>.
13 13 </p>
14 14 <% end %>
15 15  
16   -<%= render partial: 'list', locals: {configurations: @configurations} %>
17 16 \ No newline at end of file
  17 +<%= render partial: 'list', locals: {configurations: @configurations} %>
... ...
app/views/kalibro_configurations/new.html.erb
1   -<h1>New Configuration</h1>
  1 +<h1><%= "#{t('new.female')} #{KalibroConfiguration.model_name.human}" %></h1>
2 2  
3 3 <%= render 'form' %>
... ...
app/views/kalibro_configurations/show.html.erb
... ... @@ -3,23 +3,23 @@
3 3 </div>
4 4  
5 5 <p>
6   - <strong>Description:</strong>
  6 + <strong><%= t('description') %>:</strong>
7 7 <%= @kalibro_configuration.description %>
8 8 </p>
9 9  
10 10 <hr>
11   -
12   -<h2> Metrics </h2>
  11 +<div id="metrics">
  12 +<h2><%= t('metric').pluralize %></h2>
13 13 <% if kalibro_configuration_owner? @kalibro_configuration.id %>
14   - <%= link_to 'Add Metric', kalibro_configuration_choose_metric_path(@kalibro_configuration.id), class: 'btn btn-info' %>
  14 + <%= link_to "#{t('add')} #{t('metric')}", kalibro_configuration_choose_metric_path(@kalibro_configuration.id), class: 'btn btn-info' %>
15 15 <% end %>
16 16  
17 17 <table class="table table-hover">
18 18 <thead>
19 19 <tr>
20   - <th>Metric Name</th>
21   - <th>Code</th>
22   - <th>Weight</th>
  20 + <th><%= t('metric') %></th>
  21 + <th><%= t('code') %></th>
  22 + <th><%= t('weight') %></th>
23 23 <th colspan="3"></th>
24 24 </tr>
25 25 </thead>
... ... @@ -31,12 +31,13 @@
31 31 <% end %>
32 32 </tbody>
33 33 </table>
  34 +</div>
34 35  
35 36 <hr>
36 37  
37 38 <p>
38   - <%= link_to 'Back', kalibro_configurations_path, class: 'btn btn-default' %>
  39 + <%= link_to t('back'), kalibro_configurations_path, class: 'btn btn-default' %>
39 40 <% if kalibro_configuration_owner? @kalibro_configuration.id %>
40   - <%= link_to 'Destroy Configuration', kalibro_configuration_path(@kalibro_configuration.id), method: :delete, data: { confirm: 'Are you sure that you want to destroy this Configuration?' }, class: 'btn btn-danger' %>
  41 + <%= link_to t('destroy_configuration'), kalibro_configuration_path(@kalibro_configuration.id), method: :delete, data: { confirm: 'Are you sure that you want to destroy this Configuration?' }, class: 'btn btn-danger' %>
41 42 <% end %>
42 43 </p>
... ...
app/views/kalibro_ranges/_form.html.erb
... ... @@ -8,12 +8,16 @@
8 8 <%= render partial: 'no_readings' %>
9 9 <% else %>
10 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 12 <%= f.select( :reading_id, readings_options(@readings), {class: 'form-control'} ) %>
13 13 </div>
14 14 <div class="help-container">
15 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_hint('reading', 'kalibro_range',
  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 21 </p>
18 22 </div>
19 23 <% end %>
... ... @@ -32,7 +36,7 @@
32 36  
33 37 <div class="help-container">
34 38 <p>
35   - This Range's lower limit.
  39 + <%= t_hint('beginning', 'kalibro_range') %>
36 40 </p>
37 41 </div>
38 42 </div>
... ... @@ -49,7 +53,7 @@
49 53 </div>
50 54 <div class="help-container">
51 55 <p>
52   - This Range's upper limit.
  56 + <%= t_hint('end', 'kalibro_range') %>
53 57 </p>
54 58 </div>
55 59 </div>
... ... @@ -61,7 +65,7 @@
61 65 </div>
62 66 <div class="help-container">
63 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_hint('comments', 'kalibro_range', metric_href: link_to(t('metric'), tutorials_path('keywords', anchor: 'metric'))).html_safe %>
65 69 </p>
66 70 </div>
67 71 </div>
... ... @@ -69,6 +73,6 @@
69 73 </div>
70 74  
71 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 78 </div>
... ...
app/views/kalibro_ranges/_no_readings.html.erb
1 1 <div class="alert alert-error alert-dismissable">
2   - <h4 class="alert-heading">You must have Readings within your associated Reading Group to create a new Range.</h4>
3   - <p>
4   - <% if reading_groups_owner? @reading_group_id %>
5   - <br /><%= link_to 'Create New Reading', new_reading_group_reading_path(@reading_group_id), class: 'btn btn-danger' %>
6   - <% else %>
7   - <p> The Reading Group of your Metric Configuration belongs to another user and you are not allowed to modify it.</p>
8   - <% end %>
9   - </p>
  2 + <h4 class="alert-heading"><%= t('activemodel.errors.kalibro_range.no_readings') %></h4>
  3 + <p>
  4 + <% if reading_groups_owner? @reading_group_id %>
  5 + <br /><%= link_to t('create', model: Reading.model_name.human), new_reading_group_reading_path(@reading_group_id), class: 'btn btn-danger' %>
  6 + <% else %>
  7 + <p><%= t('activemodel.errors.kalibro_range.reading_group_belongs_to_another') %></p>
  8 + <% end %>
  9 + </p>
10 10 </div>
... ...
app/views/kalibro_ranges/edit.html.erb
1   -<h1>Edit Range</h1>
  1 +<h1><%= t('edit', model: KalibroRange.model_name.human) %></h1>
2 2  
3 3 <%= form_for(@kalibro_range, :url => kalibro_configuration_metric_configuration_kalibro_range_update_url(
4 4 @kalibro_configuration_id, @metric_configuration_id, @kalibro_range.id), method: :put) do |f| %>
... ...
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 3 <%= form_for(@kalibro_range, :url => kalibro_configuration_metric_configuration_kalibro_ranges_path(
4 4 @kalibro_configuration_id, @metric_configuration_id)) do |f| %>
... ...
app/views/layouts/application.html.erb
... ... @@ -58,19 +58,30 @@
58 58 </div>
59 59 <div class="collapse navbar-collapse" id="nav-collapse">
60 60 <ul class="nav navbar-nav">
61   - <li><%= link_to 'Home', root_path %></li>
62   - <li><%= link_to 'Project', projects_path %></li>
63   - <li><%= link_to 'Configuration', kalibro_configurations_path %></li>
64   - <li><%= link_to 'Reading Group', reading_groups_path %></li>
  61 + <li><%= link_to t('home'), root_path %></li>
  62 + <li><%= link_to Project.model_name.human, projects_path %></li>
  63 + <li><%= link_to KalibroConfiguration.model_name.human, kalibro_configurations_path %></li>
  64 + <li><%= link_to ReadingGroup.model_name.human, reading_groups_path %></li>
65 65 </ul>
66   - <ul class="nav navbar-nav" style="float: right;">
  66 + <ul class="nav navbar-nav navbar-right">
67 67 <% if user_signed_in? %>
68   - <li><%= link_to 'Edit Account', edit_user_registration_path %></li>
69   - <li><%= link_to 'Sign Out', destroy_user_session_path, :method => :delete %></li>
  68 + <li><%= link_to t('edit_account'), edit_user_registration_path %></li>
  69 + <li><%= link_to t('sign_out'), destroy_user_session_path, :method => :delete %></li>
70 70 <% else %>
71   - <li><%= link_to 'Sign In', new_user_session_path %></li>
72   - <li><%= link_to 'Sign Up', new_user_registration_path %></li>
  71 + <li><%= link_to t('sign_in'), new_user_session_path %></li>
  72 + <li><%= link_to t('sign_up'), new_user_registration_path %></li>
73 73 <% end %>
  74 + <li class="dropdown">
  75 + <a class="dropdown-toggle" aria-expanded="true" role="button" data-toggle="dropdown" href="#">
  76 + <%= t('idiom') %>
  77 + <span class="caret"></span>
  78 + </a>
  79 + <ul class="dropdown-menu" role="menu">
  80 + <% I18n.available_locales.each do |locale| %>
  81 + <li><%= link_to(locale.to_s, url_for(locale: locale), data: { no_turbolink: true }) %></li>
  82 + <% end %>
  83 + </ul>
  84 + </li>
74 85 </ul>
75 86 </div><!--/.nav-collapse -->
76 87 </div>
... ... @@ -83,13 +94,13 @@
83 94 <div class="well sidebar-nav">
84 95 <ul class="list-group">
85 96 <% if user_signed_in? %>
86   - <li class="nav-header">Hello, <strong><%= current_user.name %></strong></li>
87   - <li class="list-group-item"><%= link_to 'Your projects', user_projects_path(current_user.id) %></li>
  97 + <li class="nav-header"><%= t('hello_html', user: current_user.name) %></li>
  98 + <li class="list-group-item"><%= link_to t('your_projects'), user_projects_path(current_user.id) %></li>
88 99 <% end %>
89   - <li class="nav-header">Tutorials</li>
90   - <li class="list-group-item"><%= link_to 'Analysis', tutorials_path('analyzing') %></li>
91   - <li class="list-group-item"><%= link_to 'Configuring', tutorials_path('configuring') %></li>
92   - <li class="list-group-item" ><%= link_to 'Keywords', tutorials_path('keywords') %></li>
  100 + <li class="nav-header"><%= t('tutorials') %></li>
  101 + <li class="list-group-item"><%= link_to t('analysis'), tutorials_path('analyzing') %></li>
  102 + <li class="list-group-item"><%= link_to t('configuring'), tutorials_path('configuring') %></li>
  103 + <li class="list-group-item" ><%= link_to t('keywords'), tutorials_path('keywords') %></li>
93 104 <% if content_for?(:sidebar) %>
94 105 <%= yield :sidebar %>
95 106 <% else %>
... ... @@ -99,7 +110,7 @@
99 110 </div><!--/.well -->
100 111 </div><!--/col-sm-3 col-md-3-->
101 112 <div class="col-sm-9 col-md-9">
102   - <div class="alert alert-info" id="loader"><i class="fa fa-spinner fa-spin fa-lg"></i>&nbsp&nbsp Wait an instant while we are loading the page that you have requested.</div>
  113 + <div class="alert alert-info" id="loader"><i class="fa fa-spinner fa-spin fa-lg"></i>&nbsp;&nbsp; <%= t('instant_loading_page') %></div>
103 114  
104 115 <%= bootstrap_flash %>
105 116 <%= yield %>
... ... @@ -107,10 +118,20 @@
107 118 </div><!--/row-->
108 119  
109 120 <footer>
110   - <div class="footer-left">&copy; <%= link_to 'The Mezuro Team', '/humans.txt' %> 2013-2015</div>
  121 + <div class="footer-left">&copy; <%= link_to(t('mezuro_team'), '/humans.txt') %> 2013-2015</div>
111 122 <div class="footer-right"><%= link_to(image_tag('agplv3-88x31.png'), 'http://www.gnu.org/licenses/agpl-3.0-standalone.html') %> <%= link_to image_tag('fork-me.png'), 'https://github.com/mezuro/prezento' %> <%= image_tag 'usp-cloud-nuvem-logo.png' %> <%= link_to image_tag('banner-ccsl.png', height: '40', width: '190'), 'http://ccsl.ime.usp.br/' %></div>
112 123 </footer>
113 124  
  125 + <script type="text/javascript">
  126 + $(function() {
  127 + $( "#languages-accordion > div" ).accordion({
  128 + heightStyle: "content",
  129 + collapsible: true,
  130 + active: false
  131 + });
  132 + });
  133 + </script>
  134 +
114 135 </div> <!-- /container -->
115 136  
116 137 </body>
... ...
app/views/metric_configurations/_form.html.erb
... ... @@ -10,19 +10,19 @@
10 10 </div>
11 11 <div class="help-container">
12 12 <p>
13   - It is used to calculate the weighted average of a <%= link_to 'module', tutorials_path("keywords", anchor: "module")%>'s grade.
  13 + <%= t('calculate_weighted_average_html', href: link_to(KalibroModule.model_name.human, tutorials_path("keywords", anchor: "module"))) %>
14 14 </p>
15 15 </div>
16 16 </div>
17 17  
18 18 <div class="form-row">
19 19 <div class="field-container">
20   - <%= f.label :aggregation_form, 'Aggregation Form', class: 'control-label' %>
  20 + <%= f.label :aggregation_form, class: 'control-label' %>
21 21 <%= f.select( :aggregation_form, aggregation_options, {class: 'form-control'} ) %>
22 22 </div>
23 23 <div class="help-container">
24 24 <p>
25   - It is the calculation of statistical results for higher <%= link_to 'granularity', tutorials_path('keywords', anchor: 'granularity') %> modules (e.g., average lines of code of the classes inside a package).
  25 + <%= t('aggregation_form_helper_html', href: link_to(t('granularity'), tutorials_path('keywords', anchor: 'granularity'))) %>
26 26 </p>
27 27 </div>
28 28 </div>
... ... @@ -33,12 +33,12 @@
33 33 <% else %>
34 34 <div class="form-row">
35 35 <div class="field-container">
36   - <%= f.label :reading_group_id, 'Reading Group', class: 'control-label' %>
  36 + <%= f.label :reading_group_id, class: 'control-label' %>
37 37 <%= f.select( :reading_group_id, reading_group_options, {class: 'form-control'} ) %>
38 38 </div>
39 39 <div class="help-container">
40 40 <p>
41   - The <%= link_to 'Reading Group', tutorials_path('keywords', anchor: 'reading-group') %> associated with this metric.
  41 + <%= t('reading_group_helper_html', href: link_to(ReadingGroup.model_name.human, tutorials_path('keywords', anchor: 'reading-group'))) %>
42 42 </p>
43 43 </div>
44 44 </div>
... ...
app/views/metric_configurations/_no_ranges.html.erb
1 1 <tr>
2 2 <!-- TODO: expand this columns when the user owns the metric configurations and can edit or delete this range -->
3   - <td colspan="3">There are no Ranges yet!</td>
4   -</tr>
5 3 \ No newline at end of file
  4 +<td colspan="3"><%= t('no_models', model: KalibroRange.model_name.human(count: 2)) %></td>
  5 +</tr>
... ...
app/views/metric_configurations/_ranges.html.erb
... ... @@ -9,10 +9,10 @@
9 9 <td><%= kalibro_range.end %></td>
10 10 <td>
11 11 <% if kalibro_configuration_owner? @metric_configuration.kalibro_configuration_id %>
12   - <%= link_to 'Edit', edit_kalibro_configuration_metric_configuration_kalibro_range_path(
  12 + <%= link_to t('edit'), edit_kalibro_configuration_metric_configuration_kalibro_range_path(
13 13 @metric_configuration.kalibro_configuration_id, @metric_configuration.id, kalibro_range.id), class: 'btn btn-info' %>
14   - <%= link_to 'Destroy', kalibro_configuration_metric_configuration_kalibro_range_path(@metric_configuration.kalibro_configuration_id,
15   - @metric_configuration.id, kalibro_range.id), method: :delete, data: { confirm: 'Are you sure that you want to destroy this Range?' },
  14 + <%= link_to t('destroy'), kalibro_configuration_metric_configuration_kalibro_range_path(@metric_configuration.kalibro_configuration_id,
  15 + @metric_configuration.id, kalibro_range.id), method: :delete, data: { confirm: t('want_destroy_range') },
16 16 class: 'btn btn-danger' %>
17 17 <% end %>
18 18 </td>
... ...
app/views/metric_configurations/choose_metric.html.erb
1 1 <div class="page-header">
2   - <h1>Choose a metric from a Base Tool:</h1>
  2 + <h1><%= t('choose_metric') %></h1>
3 3 </div>
4 4  
5 5 <%= form_tag kalibro_configuration_new_metric_configuration_path(@kalibro_configuration.id) do %>
... ... @@ -18,8 +18,8 @@
18 18 <% end %>
19 19 </div><br />
20 20  
21   -<%= link_to 'Back', kalibro_configuration_path(@kalibro_configuration.id), class: 'btn btn-default' %>
22   -<%= link_to 'Compound Metric', new_kalibro_configuration_compound_metric_configuration_path(@kalibro_configuration.id), class: 'btn btn-info', id: "link_to_compound" %>
  21 +<%= link_to t('back'), kalibro_configuration_path(@kalibro_configuration.id), class: 'btn btn-default' %>
  22 +<%= link_to t('compound_metric'), new_kalibro_configuration_compound_metric_configuration_path(@kalibro_configuration.id), class: 'btn btn-info', id: "link_to_compound" %>
23 23  
24 24  
25 25 <script type="text/javascript">
... ...
app/views/metric_configurations/edit.html.erb
1 1 <div class="page-header">
2   - <h1>Editing Metric Configuration</h1>
  2 + <h1><%= t('editing_metric_configuration') %></h1>
3 3 </div>
4 4  
5 5 <%= form_for(@metric_configuration, :url => kalibro_configuration_metric_configuration_update_url(@kalibro_configuration_id, @metric_configuration.id), method: :put) do |f| %>
6 6 <%= render partial: 'form', locals: {f: f} %>
7 7 <div class="row margin-left-none" style="margin-top: 20px">
8   - <%= f.submit 'Save', class: 'btn btn-primary' %>
9   - <%= link_to 'Back', kalibro_configuration_path(@metric_configuration.kalibro_configuration_id), class: 'btn btn-default' %>
  8 + <%= f.submit t('save'), class: 'btn btn-primary' %>
  9 + <%= link_to t('back'), kalibro_configuration_path(@metric_configuration.kalibro_configuration_id), class: 'btn btn-default' %>
10 10 </div>
11 11 <% end %>
... ...
app/views/metric_configurations/new.html.erb
1 1 <div class="page-header">
2   - <h1>New Metric Configuration</h1>
  2 + <h1><%= t('new_metric_configurations') %></h1>
3 3 </div>
4 4  
5 5 <p>
6   - <b>Base Tool:</b> <%= @metric_configuration.metric.metric_collector_name %>
  6 + <b><%= t('metric_base_tool_name') %>:</b> <%= @metric_configuration.metric.metric_collector_name %>
7 7 </p>
8 8  
9 9 <p>
10   - <b>Metric Name:</b> <%= @metric_configuration.metric.name %>
  10 + <b><%= t('metric') %>:</b> <%= @metric_configuration.metric.name %>
11 11 </p>
12 12  
13 13 <p>
14   - <b>Metric Description:</b> <%= @metric_configuration.metric.description.nil? ? "No description available." : @metric_configuration.metric.description %>
  14 + <b><%= t('description') %>:</b> <%= @metric_configuration.metric.description.nil? ? "No description available." : @metric_configuration.metric.description %>
15 15 </p>
16 16  
17 17 <p>
18   - <b>Language:</b> <%= @metric_configuration.metric.languages.to_s %>
  18 + <b><%= t('language') %>:</b> <%= @metric_configuration.metric.languages.to_s %>
19 19 </p>
20 20  
21 21 <p>
22   - <b>Scope:</b> <%= @metric_configuration.metric.scope %>
  22 + <b><%= t('metric_scope') %>:</b> <%= t(@metric_configuration.metric.scope.to_s, scope: 'scopes') %>
23 23 </p>
24 24  
25 25 <br>
... ... @@ -27,7 +27,7 @@
27 27 <%= form_for(@metric_configuration, :url => kalibro_configuration_metric_configurations_path(@kalibro_configuration_id)) do |f| %>
28 28 <%= render partial: 'form', locals: {f: f} %>
29 29 <div class="row margin-left-none" style="margin-top: 20px">
30   - <%= f.submit 'Save', class: 'btn btn-primary' %>
31   - <%= link_to 'Back', kalibro_configuration_choose_metric_path(@kalibro_configuration_id), class: 'btn btn-default' %>
  30 + <%= f.submit t('save'), class: 'btn btn-primary' %>
  31 + <%= link_to t('back'), kalibro_configuration_choose_metric_path(@kalibro_configuration_id), class: 'btn btn-default' %>
32 32 </div>
33 33 <% end %>
... ...
app/views/metric_configurations/show.html.erb
... ... @@ -3,44 +3,47 @@
3 3 </div>
4 4  
5 5 <p>
6   - <strong>Base Tool Name:</strong>
  6 + <strong><%= t('metric_base_tool_name') %>:</strong>
7 7 <%= @metric_configuration.metric.metric_collector_name %>
8 8 </p>
9 9  
10 10 <p>
11   - <strong>Code:</strong>
  11 + <strong><%= t('code') %>:</strong>
12 12 <%= @metric_configuration.metric.code %>
13 13 </p>
14 14  
15 15 <p>
16   - <strong>Weight:</strong>
  16 + <strong><%= t('weight') %>:</strong>
17 17 <%= @metric_configuration.weight %>
18 18 </p>
19 19  
20 20 <p>
21   - <strong>Language:</strong>
  21 + <strong><%= t('language') %>:</strong>
22 22 <%= @metric_configuration.metric.languages %>
23 23 </p>
24 24  
25 25 <p>
26   - <strong>Scope:</strong>
27   - <%= @metric_configuration.metric.scope %>
  26 + <strong><%= t('metric_scope') %>:</strong>
  27 + <%= t(@metric_configuration.metric.scope.to_s, scope: 'scopes') %>
28 28 </p>
29 29  
30 30 <p>
31   - <strong>Aggregation Form:</strong>
32   - <%= @metric_configuration.aggregation_form %>
  31 + <strong><%= t('metric_aggregation_form') %>:</strong>
  32 + <%=
  33 + f = @metric_configuration.aggregation_form
  34 + t(f, scope: 'aggregation_forms', default: f)
  35 + %>
33 36 </p>
34 37  
35 38 <p>
36   - <strong>Reading Group Name:</strong>
  39 + <strong><%= t('reading_group_name') %>:</strong>
37 40 <%= @reading_group.name %>
38 41 </p>
39 42  
40 43 <p>
41   - <strong>Description:</strong>
42   - <% if @metric_configuration.metric.description.nil? %>
43   - <%= "There is no description available." %>
  44 + <strong><%= t('description') %>:</strong>
  45 + <% if @metric_configuration.metric.description.blank? %>
  46 + <%= t('no_description_available') %>
44 47 <% else %>
45 48 <%= @metric_configuration.metric.description %>
46 49 <% end %>
... ... @@ -48,18 +51,18 @@
48 51 </p>
49 52 <hr>
50 53  
51   -<h2> Ranges </h2>
  54 +<h2><%= KalibroRange.model_name.human(count: 2) %></h2>
52 55 <% if kalibro_configuration_owner? @metric_configuration.kalibro_configuration_id %>
53   - <%= link_to 'Add Range', kalibro_configuration_metric_configuration_new_kalibro_range_path(@metric_configuration.kalibro_configuration_id,
  56 + <%= link_to t('add_range'), kalibro_configuration_metric_configuration_new_kalibro_range_path(@metric_configuration.kalibro_configuration_id,
54 57 @metric_configuration.id), class: 'btn btn-info' %>
55 58 <% end %>
56 59  
57 60 <table class="table table-hover">
58 61 <thead>
59 62 <tr>
60   - <th>Label</th>
61   - <th>Beginning</th>
62   - <th>End</th>
  63 + <th><%= t('label') %></th>
  64 + <th><%= t('beginning') %></th>
  65 + <th><%= t('end') %></th>
63 66 </tr>
64 67 </thead>
65 68 <tbody>
... ... @@ -72,10 +75,10 @@
72 75 </table>
73 76  
74 77 <p>
75   - <%= link_to 'Back', kalibro_configuration_path(@metric_configuration.kalibro_configuration_id), class: 'btn btn-default' %>
  78 + <%= link_to t('back'), kalibro_configuration_path(@metric_configuration.kalibro_configuration_id), class: 'btn btn-default' %>
76 79 <% if kalibro_configuration_owner? @metric_configuration.kalibro_configuration_id %>
77   - <%= link_to 'Destroy Metric Configuration', kalibro_configuration_metric_configuration_path(@metric_configuration.kalibro_configuration_id,
78   - @metric_configuration.id), method: :delete, data: { confirm: 'Are you sure that you want to destroy this Metric Configuration?' },
  80 + <%= link_to t('destroy_metric_configuration'), kalibro_configuration_metric_configuration_path(@metric_configuration.kalibro_configuration_id,
  81 + @metric_configuration.id), method: :delete, data: { confirm: t('want_destroy_metric_configuration') },
79 82 class: 'btn btn-danger' %>
80 83 <% end %>
81 84 </p>
... ...
app/views/modules/_metric_result.html.erb
... ... @@ -15,9 +15,9 @@
15 15 </tr>
16 16 <tr id="container<%= metric_result.id %>" style="display: none">
17 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 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 21 </td>
22 22 </tr>
23 23 <% end %>
... ...
app/views/modules/_metric_results.html.erb
1 1 <table class="table table-hover">
2 2 <thead>
3   - <th>Metric</th>
4   - <th>Value</th>
5   - <th>Weight</th>
6   - <th>Threshold</th>
  3 + <th><%= t('activemodel.attributes.metric_result.metric') %></th>
  4 + <th><%= t('activemodel.attributes.metric_result.value') %></th>
  5 + <th><%= t('activemodel.attributes.metric_result.weight') %></th>
  6 + <th><%= t('activemodel.attributes.metric_result.threshold') %></th>
7 7 </thead>
8 8  
9 9 <tbody>
... ... @@ -11,4 +11,4 @@
11 11 <%= render partial: 'metric_result', collection: @root_module_result.metric_results, locals: {module_result: @root_module_result} %>
12 12 <% end %>
13 13 </tbody>
14   -</table>
15 14 \ No newline at end of file
  15 +</table>
... ...
app/views/modules/_module_result.html.erb
... ... @@ -5,7 +5,7 @@
5 5 <% else %>
6 6 <i class="icon-file"></i>
7 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 9 </td>
10 10 <td><%= module_result.kalibro_module.granularity %></td>
11 11 <td><%= format_grade(module_result.grade) %></td>
... ...
app/views/modules/_module_tree.html.erb
1 1 <p>
2   - <strong>Name:</strong>
  2 + <strong><%= KalibroModule.human_attribute_name('name') %>:</strong>
3 3 <%= format_module_name(@root_module_result.kalibro_module.name) %>
4 4 </p>
5 5 <p>
6   - <strong>Granularity:</strong>
  6 + <strong><%= KalibroModule.human_attribute_name('granularity') %>:</strong>
7 7 <%= @root_module_result.kalibro_module.granularity %>
8 8 </p>
9 9 <p>
10   - <strong>Grade:</strong>
  10 + <strong><%= KalibroModule.human_attribute_name('grade') %>:</strong>
11 11 <%= format_grade(@root_module_result.grade) %>
12 12 </p>
13 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 15 <% end %>
16 16  
17 17 <% cache("#{@root_module_result.id}_tree") do %>
... ... @@ -19,9 +19,9 @@
19 19 <% unless children.empty? %>
20 20 <table class="table table-hover">
21 21 <thead>
22   - <th>Name</th>
23   - <th>Granularity</th>
24   - <th>Grade</th>
  22 + <th><%= KalibroModule.human_attribute_name('name') %></th>
  23 + <th><%= KalibroModule.human_attribute_name('granularity') %></th>
  24 + <th><%= KalibroModule.human_attribute_name('grade') %></th>
25 25 </thead>
26 26 <tbody>
27 27 <%= render partial: 'module_result', collection: children %>
... ...
app/views/projects/_form.html.erb
... ... @@ -16,14 +16,14 @@
16 16 </div>
17 17 <div class="form-row">
18 18 <div class="field-container">
19   - <%= f.label "Image url", class: 'control-label' %><br>
  19 + <%= f.label t("image_url"), class: 'control-label' %><br>
20 20 <%= f.text_field :image_url, class: 'text-area', value: @project.attributes.nil? || @project.attributes.image_url.nil? ? '#' : @project.attributes.image_url %>
21 21 </div>
22 22 </div>
23 23 </div>
24 24 </div>
25 25 <div class="row margin-left-none" style="margin-top: 20px">
26   - <%= f.submit 'Save', class: 'btn btn-primary' %>
27   - <%= link_to 'All Projects', projects_path, class: 'btn btn-default'%>
  26 + <%= f.submit t('save'), class: 'btn btn-primary' %>
  27 + <%= link_to t('all_projects'), projects_path, class: 'btn btn-default'%>
28 28 </div>
29 29 <% end %>
... ...
app/views/projects/edit.html.erb
1 1 <div class="page-header">
2   - <h1>Edit Project</h1>
  2 + <h1><%= t("edit_project") %></h1>
3 3 </div>
4 4  
5 5 <%= render 'form' %>
... ...
app/views/projects/index.html.erb
1 1 <div class="page-header">
2   - <h1>Projects</h1>
  2 + <h1><%= "#{Project.model_name.human(count: 2)}" %></h1>
3 3 </div>
4 4  
5 5 <% if user_signed_in? %>
6 6 <p>
7   - <%= link_to 'New Project', new_project_path, class: 'btn btn-primary' %>
  7 + <%= link_to t('create', model: Project.model_name.human), new_project_path, class: 'btn btn-primary' %>
8 8 </p>
9 9 <%else%>
10 10 <p class="alert alert-warning alert-dismissable">
11 11 <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
12   - You must be logged in to create new Projects.
  12 + <%= "#{t('unauthenticated', action: t("create", model: Project.model_name.human(count: 2)).downcase)}" %>
13 13 </p>
14 14 <% end %>
15 15  
16   -<%= render partial: 'shared/project_list', locals: {projects: @projects} %>
17 16 \ No newline at end of file
  17 +<%= render partial: 'shared/project_list', locals: {projects: @projects} %>
... ...
app/views/projects/new.html.erb
1 1 <div class="page-header">
2   - <h1>New Project</h1>
  2 + <h1><%= t('create', model: Project.model_name.human) %></h1>
3 3 </div>
4 4  
5 5 <%= render 'form' %>
... ...
app/views/projects/show.html.erb
1   -
2 1 <div class="page-header">
3 2 <div class="row">
4 3 <div class="col-md-2">
... ... @@ -6,7 +5,7 @@
6 5 <%= image_tag "#{@project_image.url}", size:"128x128" %>
7 6 <% else %>
8 7 <center><i class="fa fa-file-image-o fa-5x"></i></center><br />
9   - No image available
  8 + <%= t("no_image_available") %>
10 9 <% end %>
11 10 </div>
12 11 <div class="col-md-10">
... ... @@ -16,22 +15,22 @@
16 15 </div>
17 16  
18 17 <p>
19   - <strong>Description:</strong>
  18 + <strong> <%= t("description") %>:</strong>
20 19 <%= @project.description %>
21 20 </p>
22 21  
23 22 <hr />
24 23  
25   -<h2>Repositories</h2>
  24 +<h2><%= Repository.model_name.human(count: 2) %></h2>
26 25  
27   -<% if project_owner? @project.id %><%= link_to 'New Repository', new_project_repository_path(@project,), class: 'btn btn-primary' %><% end %>
  26 +<% if project_owner? @project.id %><%= link_to t('new_repository'), new_project_repository_path(@project,), class: 'btn btn-primary' %><% end %>
28 27  
29 28 <table class="table table-hover">
30 29 <thead>
31 30 <tr>
32   - <th>Name</th>
33   - <th>Type</th>
34   - <th>Address</th>
  31 + <th><%= t("Name") %></th>
  32 + <th><%= t("Type") %></th>
  33 + <th><%= t("Address") %></th>
35 34 <th colspan="2"></th>
36 35 </tr>
37 36 </thead>
... ... @@ -40,7 +39,7 @@
40 39 <% if @project_repositories.size == 0 %>
41 40 <tr>
42 41 <% col_number = project_owner?(@project.id) ? 4 : 3 %>
43   - <td colspan="<%= col_number %>">There are no Repositories yet!</td>
  42 + <td colspan="<%= col_number %>"> <%= t("no_repositories") %></td>
44 43 </tr>
45 44 <% end %>
46 45 <% @project_repositories.each do |repository| %>
... ... @@ -50,11 +49,11 @@
50 49 <td><%= repository.address %></td>
51 50 <td>
52 51 <% if project_owner? @project.id %>
53   - <%= link_to 'Edit', edit_project_repository_path(@project, repository.id), class: 'btn btn-info' %>
  52 + <%= link_to t('edit'), edit_project_repository_path(@project, repository.id), class: 'btn btn-info' %>
54 53 <% end %>
55 54 </td>
56 55 <td>
57   - <%= link_to 'Show', project_repository_path(@project, repository.id), class: 'btn btn-info' %></td>
  56 + <%= link_to t('show'), project_repository_path(@project, repository.id), class: 'btn btn-info' %></td>
58 57 </td>
59 58 </tr>
60 59 <% end %>
... ... @@ -65,6 +64,6 @@
65 64  
66 65 <p>
67 66 <% if project_owner? @project.id %>
68   - <%= link_to 'Destroy Project', project_path(@project.id), method: :delete, data: { confirm: 'Are you sure that you want to destroy this Project?' }, class: 'btn btn-danger' %>
  67 + <%= link_to t('destroy_project'), project_path(@project.id), method: :delete, data: { confirm: t('want_destroy_project') }, class: 'btn btn-danger' %>
69 68 <% end %>
70 69 </p>
... ...
app/views/reading_groups/_form.html.erb
... ... @@ -21,7 +21,7 @@
21 21 </div>
22 22  
23 23 <div class="row margin-left-none" style="margin-top: 20px">
24   - <%= f.submit 'Save', class: 'btn btn-primary' %>
25   - <%= link_to 'Back', reading_groups_path, class: 'btn btn-default' %>
  24 + <%= f.submit t('save'), class: 'btn btn-primary' %>
  25 + <%= link_to t('back'), reading_groups_path, class: 'btn btn-default' %>
26 26 </div>
27 27 <% end %>
... ...
app/views/reading_groups/_no_readings.html.erb
1 1 <tr>
2 2 <% col_number = reading_groups_owner?(@reading_group.id) ? 5 : 3 %>
3   - <td colspan="<%= col_number %>">There are no Readings yet!</td>
  3 + <td colspan="<%= col_number %>"><%= t('activemodel.errors.reading_group.no_readings') %></td>
4 4 </tr>
5 5 \ No newline at end of file
... ...
app/views/reading_groups/_reading.html.erb
... ... @@ -4,10 +4,10 @@
4 4 <td style="background-color: #<%= reading.color %>; width: 20%;">&nbsp;</td>
5 5 <% if reading_groups_owner? @reading_group.id %>
6 6 <td>
7   - <%= link_to 'Edit', edit_reading_group_reading_path(@reading_group.id, reading.id), class: 'btn btn-info' %>
  7 + <%= link_to t('edit', model: ''), edit_reading_group_reading_path(@reading_group.id, reading.id), class: 'btn btn-info' %>
8 8 </td>
9 9 <td>
10   - <%= link_to 'Destroy', reading_group_reading_path(@reading_group.id, reading.id), method: :delete, data: { confirm: 'Are you sure that you want to destroy this Reading?' }, class: 'btn btn-danger' %>
  10 + <%= link_to t('destroy'), reading_group_reading_path(@reading_group.id, reading.id), method: :delete, data: { confirm: t('sure_destroy', model: Reading.model_name.human) }, class: 'btn btn-danger' %>
11 11 </td>
12 12 </td>
13 13 <% end %>
... ...
app/views/reading_groups/edit.html.erb
1 1 <div class="page-header">
2   - <h1>Edit Reading Group</h1>
  2 + <h1><%= t('edit', model: ReadingGroup.model_name.human) %></h1>
3 3 </div>
4 4  
5 5 <%= render 'form' %>
6 6 \ No newline at end of file
... ...
app/views/reading_groups/index.html.erb
1 1 <div class="page-header">
2   - <h1>Reading Groups</h1>
  2 + <h1><%= ReadingGroup.model_name.human(count: 2) %></h1>
3 3 </div>
4 4  
5 5 <% if user_signed_in? %>
6 6 <p>
7   - <%= link_to 'New Reading Group', new_reading_group_path, class: 'btn btn-primary' %>
  7 + <%= link_to "#{t('new.male')} #{ReadingGroup.model_name.human}", new_reading_group_path, class: 'btn btn-primary' %>
8 8 </p>
9 9 <%else%>
10 10 <p class="alert alert-warning alert-dismissable">
11 11 <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
12   - You must be logged in to create new Reading Groups.
  12 + <%= t('unauthenticated', action: t('create', model: ReadingGroup.model_name.human)) %>
13 13 </p>
14 14 <% end %>
15 15  
... ...
app/views/reading_groups/new.html.erb
1 1 <div class="page-header">
2   - <h1>New Reading Group</h1>
  2 + <h1><%= "#{t('new.male')} #{ReadingGroup.model_name.human}" %></h1>
3 3 </div>
4 4  
5 5 <%= render 'form' %>
... ...
app/views/reading_groups/show.html.erb
... ... @@ -3,22 +3,22 @@
3 3 </div>
4 4  
5 5 <p>
6   - <strong>Description:</strong>
  6 + <strong><%= ReadingGroup.human_attribute_name('description') %></strong>
7 7 <%= @reading_group.description %>
8 8 </p>
9 9  
10 10 <hr />
11 11  
12   -<h2>Readings</h2>
  12 +<h2><%= Reading.model_name.human(count: 2) %></h2>
13 13  
14   -<% if reading_groups_owner? @reading_group.id %><%= link_to 'New Reading', new_reading_group_reading_path(@reading_group,), class: 'btn btn-primary' %><% end %>
  14 +<% if reading_groups_owner? @reading_group.id %><%= link_to "#{t('new.female')} #{Reading.model_name.human}", new_reading_group_reading_path(@reading_group,), class: 'btn btn-primary' %><% end %>
15 15  
16 16 <table class="table table-hover">
17 17 <thead>
18 18 <tr>
19   - <th>Label</th>
20   - <th>Grade</th>
21   - <th>Color</th>
  19 + <th><%= Reading.human_attribute_name('label') %></th>
  20 + <th><%= Reading.human_attribute_name('grade') %></th>
  21 + <th><%= Reading.human_attribute_name('color') %></th>
22 22 </tr>
23 23 </thead>
24 24  
... ... @@ -36,6 +36,6 @@
36 36  
37 37 <p>
38 38 <% if reading_groups_owner? @reading_group.id %>
39   - <%= link_to 'Destroy Reading Group', reading_group_path(@reading_group.id), method: :delete, data: { confirm: 'Are you sure that you want to destroy this Reading Group?' }, class: 'btn btn-danger' %>
  39 + <%= link_to t('destroy'), reading_group_path(@reading_group.id), method: :delete, data: { confirm: t('sure_destroy', model: ReadingGroup.model_name.human) }, class: 'btn btn-danger' %>
40 40 <% end %>
41 41 </p>
... ...
app/views/readings/_form.html.erb
... ... @@ -10,10 +10,10 @@
10 10 </div>
11 11 <div class="help-container">
12 12 <p>
13   - It is a verbal concise form of highlighting the content of an interpretation.
  13 + <%= t('activemodel.hints.reading.label') %>
14 14 </p>
15 15 <p>
16   - Example values: terrible, bad, regular, good, great etc.
  16 + <%= t('activemodel.hints.reading.label_example') %>
17 17 </p>
18 18 </div>
19 19 </div>
... ... @@ -30,10 +30,10 @@
30 30 </div>
31 31 <div class="help-container">
32 32 <p>
33   - It is a visual form of highlighting an interpretation. You can choose one by typing its hexadecimal value or by using the color picker.
  33 + <%= t('activemodel.hints.reading.color') %>
34 34 </p>
35 35 <p>
36   - Example values: 000000, 00ff00 etc
  36 + <%= t('activemodel.hints.reading.color_example') %>
37 37 </p>
38 38 </div>
39 39 </div>
... ... @@ -45,7 +45,7 @@
45 45 </div>
46 46 <div class="help-container">
47 47 <p>
48   - A number to classify this reading.
  48 + <%= t('activemodel.hints.reading.grade') %>
49 49 </p>
50 50 </div>
51 51 </div>
... ... @@ -53,13 +53,13 @@
53 53 </div>
54 54  
55 55 <div class="row margin-left-none" style="margin-top: 20px">
56   - <%= f.submit 'Save', class: 'btn btn-primary' %>
  56 + <%= f.submit t('save'), class: 'btn btn-primary' %>
57 57 <% if @reading.persisted? %>
58 58 <%= f.hidden_field(:reading_group_id, value: @reading.reading_group_id) %>
59   - <%= link_to 'Back', reading_group_path(@reading.reading_group_id), class: 'btn btn-default' %>
  59 + <%= link_to t('back'), reading_group_path(@reading.reading_group_id), class: 'btn btn-default' %>
60 60 <% else %>
61 61 <%= f.hidden_field(:reading_group_id, value: @reading_group_id) %>
62   - <%= link_to 'Back', reading_group_path(@reading_group_id), class: 'btn btn-default' %>
  62 + <%= link_to t('back'), reading_group_path(@reading_group_id), class: 'btn btn-default' %>
63 63 <% end %>
64 64 </div>
65 65  
... ...
app/views/readings/edit.html.erb
1 1 <div class="page-header">
2   - <h1>Editing Reading</h1>
  2 + <h1><%= t('edit', model: Reading.model_name.human) %></h1>
3 3 </div>
4 4  
5 5 <%= form_for(@reading, :url => reading_group_reading_update_path(@reading.reading_group_id, @reading.id), method: :put) do |f| %>
... ...
app/views/readings/new.html.erb
1 1 <div class="page-header">
2   - <h1>New Reading</h1>
  2 + <h1><%= "#{t('new.female')} #{Reading.model_name.human}" %></h1>
3 3 </div>
4 4  
5 5 <%= form_for(@reading, :url => reading_group_readings_path(@reading_group_id)) do |f| %>
... ...
app/views/repositories/_form.html.erb
... ... @@ -11,7 +11,7 @@
11 11 </div>
12 12 <div class="help-container">
13 13 <p>
14   - The name of your Repository.
  14 + <%= t('activemodel.hints.repository.name') %>
15 15 </p>
16 16 </div>
17 17 </div>
... ... @@ -23,7 +23,7 @@
23 23 </div>
24 24 <div class="help-container">
25 25 <p>
26   - A short description of your Repository.
  26 + <%= t('activemodel.hints.repository.description') %>
27 27 </p>
28 28 </div>
29 29 </div>
... ... @@ -35,7 +35,7 @@
35 35 </div>
36 36 <div class="help-container">
37 37 <p>
38   - The source code's license.
  38 + <%= t('activemodel.hints.repository.license') %>
39 39 </p>
40 40 </div>
41 41 </div>
... ... @@ -47,7 +47,7 @@
47 47 </div>
48 48 <div class="help-container">
49 49 <p>
50   - The version control system the Repository uses.
  50 + <%= t('activemodel.hints.repository.scm_type') %>
51 51 </p>
52 52 </div>
53 53 </div>
... ... @@ -59,7 +59,7 @@
59 59 </div>
60 60 <div class="help-container">
61 61 <p>
62   - The URL where the Repository is located.
  62 + <%= t('activemodel.hints.repository.address') %>
63 63 </p>
64 64 </div>
65 65 </div>
... ... @@ -71,20 +71,20 @@
71 71 </div>
72 72 <div class="help-container">
73 73 <p>
74   - Select how often the Repository will be reprocessed.
  74 + <%= t('activemodel.hints.repository.period') %>
75 75 </p>
76 76 </div>
77 77 </div>
78 78  
79 79 <div class="form-row">
80 80 <div class="field-container">
81   - <%= f.label :configuration, 'Configuration', class: 'control-label' %>
  81 + <%= f.label :kalibro_configuration_id, KalibroConfiguration.model_name.human, class: 'control-label' %>
82 82 <% configuration_list = KalibroClient::Entities::Configurations::KalibroConfiguration.all.map { |conf| [conf.name, conf.id] } %>
83 83 <%= f.select( :kalibro_configuration_id, configuration_list, class: 'tooltip-control' ) %>
84 84 </div>
85 85 <div class="help-container">
86 86 <p>
87   - A <%= link_to 'Configuration', tutorials_path('keywords', anchor: 'configuration') %> defines all the metrics to be calculated in the source code. Choose your weapon!
  87 + <%= t('activemodel.hints.repository.kalibro_configuration', configuration_href: link_to(KalibroConfiguration.model_name.human, tutorials_path('keywords', anchor: 'configuration'))).html_safe %>
88 88 </p>
89 89 </div>
90 90 </div>
... ...
app/views/repositories/_metric_results_error.html.erb
1   -<p> Repository process returned with error. There are no metric results. </p>
2 1 \ No newline at end of file
  2 +<p><%= t('activemodel.errors.repository.no_metric_results') %></p>
3 3 \ No newline at end of file
... ...
app/views/repositories/_module_tree_error.html.erb
1   -<p> Repository process returned with error. There is no module tree. </p>
2 1 \ No newline at end of file
  2 +<p><%= t('activemodel.errors.repository.no_module_tree') %></p>
3 3 \ No newline at end of file
... ...
app/views/repositories/_processing_information.html.erb
1 1 <p>
2   - <strong>State:</strong>
  2 + <strong><%= t('activemodel.attributes.processing.state') %>:</strong>
3 3 <%= @processing.state %>
4 4 </p>
5 5  
6 6 <p>
7   - <strong>Creation date:</strong>
  7 + <strong><%= t('activemodel.attributes.processing.creation_date') %>:</strong>
8 8 <%= @processing.created_at.strftime("%Y/%m/%d at %Hh%M (%z)") %>
9 9 </p>
10 10  
... ...
app/views/repositories/_unstarted_processing.html.erb
1   -<p>This Repository has no processings yet. Please, wait an instant as we start it.</p>
  1 +<p><%= t('activemodel.errors.repository.unstarted_processing') %></p>
2 2  
3   -<div id="processing_information"><%= image_tag 'loader.gif' %> Loading data. Please, wait.</div>
4 3 \ No newline at end of file
  4 +<div id="processing_information"><%= image_tag 'loader.gif' %> <%= t('repository.show.loading') %></div>
5 5 \ No newline at end of file
... ...
app/views/repositories/edit.html.erb
1 1 <div class="page-header">
2   - <h1>Editing Repository</h1>
  2 + <h1><%= "#{t('edit')} #{Repository.model_name.human}" %></h1>
3 3 </div>
4 4  
5 5 <%= form_for(@repository, :url => project_repository_update_url(@project_id, @repository.id), method: :put) do |f| %>
... ...
app/views/repositories/new.html.erb
1 1 <div class="page-header">
2   - <h1>New Repository</h1>
  2 + <h1><%= "#{t('new.male')} #{Repository.model_name.human}" %></h1>
3 3 </div>
4 4  
5 5 <%= form_for(@repository, :url => project_repositories_url(@project_id)) do |f| %>
... ...
app/views/repositories/reload_processing.js.erb
  1 +current_path_splited = window.location.pathname.split("/");
  2 +if(current_path_splited[1] != "projects"){
  3 + current_path_splited.splice(1,1); // Removes the locale
  4 +}
  5 +current_path = current_path_splited.join("/");
  6 +
1 7 // This if prevents it from updating the repository's state after the user leaves its page
2   -if(document.URL == '<%= project_repository_url(@repository.project_id, @repository) %>'){
  8 +if(current_path == '<%= project_repository_path(project_id: @repository.project_id, id: @repository, locale: nil) %>'){
3 9 $('div#processing_information').html('<%= escape_javascript(render partial: "processing_information") %>');
4 10 repository = new Module.Repository(<%= @repository.project_id %>, <%= @repository.id %>)
5 11 repository.schedule_poll_state('<%= @processing.state %>')
... ...
app/views/repositories/show.html.erb
... ... @@ -3,43 +3,46 @@
3 3 </div>
4 4  
5 5 <p>
6   - <strong>Description:</strong>
  6 + <strong><%= Repository.human_attribute_name('description') %>:</strong>
7 7 <%= @repository.description %>
8 8 </p>
9 9  
10 10 <p>
11   - <strong>License:</strong>
  11 + <strong><%= Repository.human_attribute_name('license') %>:</strong>
12 12 <%= @repository.license %>
13 13 </p>
14 14  
15 15 <p>
16   - <strong>Type:</strong>
  16 + <strong><%= Repository.human_attribute_name('type') %>:</strong>
17 17 <%= @repository.scm_type %>
18 18 </p>
19 19  
20 20 <p>
21   - <strong>Address:</strong>
  21 + <strong><%= Repository.human_attribute_name('address') %>:</strong>
22 22 <%= @repository.address %>
23 23 </p>
24 24  
25 25 <p>
26   - <strong>Periodicity:</strong>
  26 + <strong><%= Repository.human_attribute_name('period') %>:</strong>
27 27 <%= periodicity_option(@repository.period) %>
28 28 </p>
29 29  
30 30 <p>
31   - <strong>Configuration:</strong>
  31 + <strong><%= KalibroConfiguration.model_name.human %>:</strong>
32 32 <%= @kalibro_configuration.name %>
33 33 </p>
34 34  
35   -<p><strong> Retrieve the closest processing information from: </strong></p>
  35 +<p><strong> <%= t('repository.show.date_processing') %>: </strong></p>
36 36  
37 37 <%= form_tag(project_repository_state_with_date_path(@repository.project_id, @repository.id), method: "post", remote: true) do %>
38 38 <p>
39   - Day: <%= select_tag(:day, options_for_select(day_options), :style => "width:55px; margin-top:5px") %>
40   - Month: <%= select_tag(:month, options_for_select(month_options), :style => "width:55px; margin-top:5px") %>
41   - Year: <%= select_tag(:year, options_for_select(year_options), :style => "width:70px; margin-top:5px") %>
42   - <%= submit_tag("Search", class: 'btn btn-info', style: 'margin-bottom:5px', onClick: "Module.Repository.set_loader('#{image_tag 'loader.gif'} Loading data. Please, wait.')") %>
  39 + <%= label_tag :day, t("day") %>:
  40 + <%= select_tag(:day, options_for_select(day_options), :style => "width:55px; margin-top:5px") %>
  41 + <%= label_tag :month, t("month") %>:
  42 + <%= select_tag(:month, options_for_select(month_options), :style => "width:55px; margin-top:5px") %>
  43 + <%= label_tag :year, t("year") %>:
  44 + <%= select_tag(:year, options_for_select(year_options), :style => "width:70px; margin-top:5px") %>
  45 + <%= submit_tag(t('search'), class: 'btn btn-info', style: 'margin-bottom:5px', onClick: "Module.Repository.set_loader('#{image_tag 'loader.gif'} Loading data. Please, wait.')") %>
43 46 </p>
44 47 <% end %>
45 48  
... ... @@ -47,18 +50,18 @@
47 50  
48 51 <div id="repository-accordion">
49 52 <div id="processing-accordion">
50   - <h3 class="jquery-ui-accordion">Processing information</h3>
51   - <div id="processing_information"><%= image_tag 'loader.gif' %> Loading data. Please, wait.</div>
  53 + <h3 class="jquery-ui-accordion"><%= t('repository.show.processing_information') %></h3>
  54 + <div id="processing_information"><%= image_tag 'loader.gif' %> <%= t('repository.show.loading') %></div>
52 55 </div>
53 56  
54 57 <div id="module-accordion">
55   - <h3 class="jquery-ui-accordion">Modules Tree</h3>
56   - <div id="module_tree"><%= image_tag 'loader.gif' %> Loading data. Please, wait.</div>
  58 + <h3 class="jquery-ui-accordion"><%= t('repository.show.modules_tree') %></h3>
  59 + <div id="module_tree"><%= image_tag 'loader.gif' %> <%= t('repository.show.loading') %></div>
57 60 </div>
58 61  
59 62 <div id="metric-accordion">
60   - <h3 class="jquery-ui-accordion">Metric Results</h3>
61   - <div id="metric_results"><%= image_tag 'loader.gif' %> Loading data. Please, wait.</div>
  63 + <h3 class="jquery-ui-accordion"><%= t('repository.show.metric_results') %></h3>
  64 + <div id="metric_results"><%= image_tag 'loader.gif' %> <%= t('repository.show.loading') %></div>
62 65 </div>
63 66 </div>
64 67 <script type="text/javascript">
... ... @@ -79,8 +82,8 @@
79 82  
80 83 <hr/>
81 84  
82   -<%= link_to 'Back', project_path(@repository.project_id), class: 'btn btn-default' %>
  85 +<%= link_to t('back'), project_path(@repository.project_id), class: 'btn btn-default' %>
83 86 <% if project_owner? @repository.project_id %>
84   - <%= link_to 'Reprocess', project_repository_process_path(@repository.project_id, @repository.id), class: 'btn btn-info' %>
85   - <%= link_to 'Destroy', project_repository_path(@repository.project_id, @repository.id), method: :delete, data: { confirm: 'Are you sure that you want to destroy this Repository?' }, class: 'btn btn-danger' %>
  87 + <%= link_to t('repository.show.reprocess'), project_repository_process_path(@repository.project_id, @repository.id), class: 'btn btn-info' %>
  88 + <%= link_to t('destroy'), project_repository_path(@repository.project_id, @repository.id), method: :delete, data: { confirm: t('sure_destroy', model: Repository.model_name.human) }, class: 'btn btn-danger' %>
86 89 <% end %>
... ...
app/views/shared/_reading_groups_list.erb
1 1 <table class="table table-hover">
2 2 <thead>
3 3 <tr>
4   - <th>Name</th>
5   - <th>Description</th>
  4 + <th><%= ReadingGroup.human_attribute_name('name') %></th>
  5 + <th><%= ReadingGroup.human_attribute_name('description') %></th>
6 6 <th colspan="2"></th>
7 7 </tr>
8 8 </thead>
... ... @@ -12,10 +12,10 @@
12 12 <tr>
13 13 <td><%= reading_group.name %></td>
14 14 <td><%= reading_group.description %></td>
15   - <td><%= link_to 'Show', reading_group_path(reading_group.id), class: 'btn btn-info' %></td>
  15 + <td><%= link_to t('show'), reading_group_path(reading_group.id), class: 'btn btn-info' %></td>
16 16 <td>
17 17 <% if reading_groups_owner? reading_group.id %>
18   - <%= link_to 'Edit', edit_reading_group_path(reading_group.id), class: 'btn btn-info' %>
  18 + <%= link_to t('edit', model: ''), edit_reading_group_path(reading_group.id), class: 'btn btn-info' %>
19 19 <% end %>
20 20 </td>
21 21 </tr>
... ...
app/views/shared/_short_about.html.erb
1   -<li class="nav-header">About Mezuro</li>
  1 +<li class="nav-header"><%= t('about_mezuro') %></li>
2 2 <li class="list-group-item">
3   - <small> The Mezuro project attempts to provide a platform to compare projects and metric techniques, teaching how to use metrics through configurations and code analysis, avoid technical debts and disseminate code metrics usage and understanding.<br></small>
4   - <small>Here you can try the front-end, which we call Prezento. It interacts with the <%= link_to 'Kalibro Web Service', 'https://github.com/mezuro/kalibro', target: '_blank' %> and <%= link_to 'Kalibro Processor', 'https://github.com/mezuro/kalibro_processor', target: '_blank' %>. It is intended to be a service where you can evaluate your code quality and, if you want, define which set of metrics to use.</small>
  3 + <small>
  4 + <%= t('about_mezuro_body_html', href: link_to( 'Kalibro Web Service', 'https://github.com/mezuro/kalibro', target: '_blank'), href2: link_to('Kalibro Processor', 'https://github.com/mezuro/kalibro_processor', target: '_blank'))%>
  5 + </small>
5 6 </li>
... ...
app/views/tutorials/analyzing.en.html.erb 0 → 100644
... ... @@ -0,0 +1,90 @@
  1 +<h1>Tutorial</h1>
  2 +<h2>Analyzing a repository</h2>
  3 +
  4 +<hr />
  5 +
  6 +<h3>Requisites</h3>
  7 +
  8 +In order to create a Project, you must:
  9 +<ul>
  10 + <li>Have <%= link_to(t('signed_up'), new_user_registration_path) %> to the platform</li>
  11 + <li>Be <%= link_to(t('signed_in'), new_user_session_path) %></li>
  12 + <li>And have a repository URL which you wish to analyze</li>
  13 +</ul>
  14 +
  15 +<hr />
  16 +
  17 +<h3>Steps</h3>
  18 +
  19 +<h4>Project creation</h4>
  20 +
  21 +<ol>
  22 + <li>Click on "Project" on the upper menu</li>
  23 + <li>Click on "New Project"</li>
  24 + <li>Fill in the form with a name that must be unique</li>
  25 + <li>Fill in the form with a description which is not required</li>
  26 + <li>Click on "Save" and you should be at the project page now, congratulations!</li>
  27 +</ol>
  28 +
  29 +<h4>Repository creation</h4>
  30 +
  31 +<ol>
  32 + <li>From the project page, click on "New Repository"</li>
  33 + <li>Fill in the form, making sure that:
  34 + <ul>
  35 + <li>"Name" must be unique</li>
  36 + <li>You should choose one of the Open Source licenses in the platform according to your code</li>
  37 + <li>The "Type" field stands for the Repository source code management tool (Git, for example)</li>
  38 + <li>Fill in the "Address" with the URL from which we can download your code</li>
  39 + <li>If you want to analyze your project periodically, set it (you can as well run it from the interface whenever you want)</li>
  40 + <li>Finally, the "Configuration" stands for the set of metrics and interpretation that we will use to analyze your project</li>
  41 + </ul>
  42 + </li>
  43 + <li>Click on "Save" and you should be at the repository page, waiting for the analysis</li>
  44 +</ol>
  45 +
  46 +<hr />
  47 +
  48 +<h4>Repository page details</h4>
  49 +
  50 +The repository page is divided into four different sections:
  51 +
  52 +<h5><b>Details</b></h5>
  53 +<ul>
  54 + <li>Information that you provided during the creation steps</li>
  55 + <li>Select box so it is possible to visualize previous processings of your repository</li>
  56 +</ul>
  57 +
  58 +<h5><b>Processing information</b></h5>
  59 +
  60 +<ul>
  61 + <li>Information about the time it has taken to finish each step of the processing
  62 + <ul>
  63 + <li>PREPARING: the system is reserving a folder for your repository and retrieving the configuration</li>
  64 + <li>DOWNLOADING: retrieving the source code</li>
  65 + <li>COLLECTING: calculating the metrics for your repository</li>
  66 + <li>BUILDING: organizing the results into a source tree structure</li>
  67 + <li>AGGREGATING: calculating the aggregated value for parent modules in the source tree</li>
  68 + <li>CALCULATING: if the chosen configuration has compound metrics, they will be calculated</li>
  69 + <li>INTERPRETING: with all the necessary results, the system will interpret them using reading groups (labels and colors)</li>
  70 + </ul>
  71 + </li>
  72 +</ul>
  73 +<h5><b>Modules Tree</b></h5>
  74 +<ul>
  75 + <li>Source tree structure where you can navigate by clicking on the names
  76 + <li>Information about the granularity of the module
  77 + <ul>
  78 + <li>METHOD</li>
  79 + <li>CLASS</li>
  80 + <li>PACKAGE</li>
  81 + <li>SOFTWARE</li>
  82 + </ul>
  83 + <li>Grade of the given module according to the weights of the metrics on the configuration
  84 +</ul>
  85 +
  86 +<h5><b>Metric Results</b></h5>
  87 +<ul>
  88 + <li>Displays the individual results of each metric for the current module selected in the source tree</li>
  89 + <li>By clicking on the metric name, you will see a historic chart for that metric</li>
  90 +</ul>
... ...
app/views/tutorials/analyzing.html.erb
... ... @@ -1,88 +0,0 @@
1   -<h1>Tutorial</h1>
2   -<h2>Analyzing a repository</h2>
3   -
4   -<hr />
5   -
6   -<h3>Requisites</h3>
7   -
8   -In order to create a Project, you must:
9   -<ul>
10   - <li>Have <%= link_to("signed up", new_user_registration_path) %> to the platform</li>
11   - <li>Be <%= link_to("signed in", new_user_session_path) %></li>
12   - <li>And have a repository URL which you wish to analyze</li>
13   -</ul>
14   -
15   -<hr />
16   -
17   -<h3>Steps</h3>
18   -
19   -<ol>
20   - <li>Project creation
21   - <ol>
22   - <li>Click on "Project" on the upper menu</li>
23   - <li>Click on "New Project"</li>
24   - <ol>
25   - <li>Fill in the form with a name that must be unique</li>
26   - <li>Fill in the form with a description which is not required</li>
27   - <li>Click on "Save" and you should be at the project page now, congratulations!</li>
28   - </ol>
29   - </ol>
30   - <li>Repository creation</li>
31   - <ol>
32   - <li>From the project page, click on "New Repository"</li>
33   - <li>Fill in the form</li>
34   - <ul>
35   - <li>"Name" must be unique</li>
36   - <li>You should choose one of the Open Source licenses in the platform according to your code</li>
37   - <li>The "Type" field stands for the Repository source code management tool (Git, for example)</li>
38   - <li>Fill in the "Address" with the URL from which we can download your code</li>
39   - <li>If you want to analyze your project periodically, set it (you can as well run it from the interface whenever you want)</li>
40   - <li>Finally, the "Configuration" stands for the set of metrics and interpretation that we will use to analyze your project</li>
41   - <li>Click on "Save" and you should be at the repository page, waiting for the analysis</li>
42   - </ul>
43   - </ol>
44   -</ol>
45   -
46   -<hr />
47   -
48   -<h3>Repository page details</h3>
49   -
50   -The repository page is divided into four different sections:
51   -
52   -<ol>
53   - <li><b>Details</b></li>
54   - <ul>
55   - <li>Information that you provided during the creation steps</li>
56   - <li>Select box so it is possible to visualize previous processings of your repository</li>
57   - </ul>
58   - <li><b>Processing information</b></li>
59   - <ul>
60   - <li>Information about the time it has taken to finish each step of the processing</li>
61   - <ol>
62   - <li>PREPARING: the system is reserving a folder for your repository and retrieving the configuration</li>
63   - <li>DOWNLOADING: retrieving the source code</li>
64   - <li>COLLECTING: calculating the metrics for your repository</li>
65   - <li>BUILDING: organizing the results into a source tree structure</li>
66   - <li>AGGREGATING: calculating the aggregated value for parent modules in the source tree</li>
67   - <li>CALCULATING: if the chosen configuration has compound metrics, they will be calculated</li>
68   - <li>INTERPRETING: with all the necessary results, the system will interpret them using reading groups (labels and colors)</li>
69   - </ol>
70   - </ul>
71   - <li><b>Modules Tree</b></li>
72   - <ul>
73   - <li>Source tree structure where you can navigate by clicking on the names
74   - <li>Information about the granularity of the module
75   - <ul>
76   - <li>METHOD</li>
77   - <li>CLASS</li>
78   - <li>PACKAGE</li>
79   - <li>SOFTWARE</li>
80   - </ul>
81   - <li>Grade of the given module according to the weights of the metrics on the configuration
82   - </ul>
83   - <li><b>Metric Results</b></li>
84   - <ul>
85   - <li>Displays the individual results of each metric for the current module selected in the source tree</li>
86   - <li>By clicking on the metric name, you will see a historic chart for that metric</li>
87   - </ul>
88   -</ol>
app/views/tutorials/analyzing.pt.html.erb 0 → 100644
... ... @@ -0,0 +1,93 @@
  1 +<h1>Tutorial</h1>
  2 +<h2>Analisando um repositório</h2>
  3 +
  4 +<hr>
  5 +
  6 +<h3>Requisitos</h3>
  7 +
  8 +A fim de criar um projeto, você deve:
  9 +<ul>
  10 + <li><%= link_to(t('signed_up'), new_user_registration_path) %> na plataforma</li>
  11 + <li>Estar <%= link_to(t('signed_in'), new_user_session_path) %></li>
  12 + <li>E ter uma URL do repositório que você deseja analisar</li>
  13 +</ul>
  14 +
  15 +<hr>
  16 +
  17 +<h3>Passos</h3>
  18 +
  19 +<h4>Criando um Projeto</h4>
  20 +
  21 +<ol>
  22 + <li>Clique em "Projeto" no menu superior</li>
  23 + <li>Clique em "Novo Projeto"</li>
  24 + <li>Preencha o formulário com um "Nome", que deve ser único</li>
  25 + <li>Preencha o formulário com uma "Descrição"</li>
  26 + <li>Clique em "Salvar". Agora você deve estar na página do projeto, parabéns!</li>
  27 +</ol>
  28 +
  29 +<h4>Criando um Repositório</h4>
  30 +
  31 +<ol>
  32 + <li>A partir da página do projeto, clique em "Novo Repositório"</li>
  33 + <li>Preencha o formulário:
  34 + <ul>
  35 + <li>O "Nome" deve ser único</li>
  36 + <li>Você deve escolher uma "Licença" Open Source na plataforma de acordo com o seu código</li>
  37 + <li>O campo "Tipo" está relacionado com a ferramenta de controle de versão do código (Git, por exemplo)</li>
  38 + <li>Preencha o "Endereço" com a URL a partir da qual podemos fazer o download do código</li>
  39 + <li>Se você quiser analisar seu projeto periodicamente, configure-o (você pode também executá-lo a partir da interface sempre que quiser)</li>
  40 + <li>Por fim, a "Configuração" representa o conjunto de métricas e interpretações que vamos usar para analisar o seu projeto</li>
  41 + </ul>
  42 + </li>
  43 + <li>Clique em "Salvar" e você deve estar na página de repositório, esperando a análise</li>
  44 +</ol>
  45 +
  46 +<hr>
  47 +
  48 +<h4>Detalhes da página do repositório</h4>
  49 +
  50 +A página de repositório é dividida em quatro seções diferentes:
  51 +
  52 +<h5><b>Detalhes</b></h5>
  53 +<ul>
  54 + <li>A informação que você forneceu durante as etapas de criação</li>
  55 + <li>Selecione a caixa de modo que seja possível visualizar processamentos anteriores do seu repositório</li>
  56 +</ul>
  57 +
  58 +<h5><b>Informação de processamento</b></h5>
  59 +
  60 +<ul>
  61 + <li>Informações sobre o tempo que cada etapa do processamento levou para concluir
  62 + <ul>
  63 + <li>PREPARAÇÃO: o sistema está reservando uma pasta para seu repositório e selecionando a configuração</li>
  64 + <li>DOWNLOAD: descarregando o código-fonte</li>
  65 + <li>COLETA: cálculo das métricas para o repositório</li>
  66 + <li>CONSTRUÇÂO: organiza os resultados em uma estrutura de árvore</li>
  67 + <li>AGREGAÇÂO: cálculo do valor agregado para os módulos pai presentes na árvore do código de origem</li>
  68 + <li>CÁLCULO: se a configuração escolhida tem métricas compostas, elas serão calculadas</li>
  69 + <li>INTERPRETAÇÃO: com todos os resultados necessários, o sistema irá interpretá-los utilizando grupos de leitura (rótulos e cores)</li>
  70 + </ul>
  71 + </li>
  72 +</ul>
  73 +<h5><b>Árvore de Módulos</b></h5>
  74 +<ul>
  75 + <li>Estrutura de árvore do código em que você pode navegar, clicando nos nomes
  76 + </li>
  77 +<li>Informação sobre a granularidade do módulo
  78 + <ul>
  79 + <li>MÉTODO</li>
  80 + <li>CLASSE</li>
  81 + <li>PACOTE</li>
  82 + <li>SOFTWARE</li>
  83 + </ul>
  84 + </li>
  85 +<li>Nota do módulo de acordo com os pesos das métricas dados na sua configuração
  86 +</li>
  87 +</ul>
  88 +
  89 +<h5><b>Resultado das Métricas</b></h5>
  90 +<ul>
  91 + <li>Exibe os resultados individuais de cada métrica para o módulo atual, selecionado na árvore de código</li>
  92 + <li>Ao clicar sobre o nome da métrica, você vai ver um gráfico do histórico dessa métrica</li>
  93 +</ul>
... ...
app/views/tutorials/configuring.en.html.erb 0 → 100644
... ... @@ -0,0 +1,90 @@
  1 +<h1>Tutorial</h1>
  2 +<h2>Setting a New Configuration</h2>
  3 +
  4 +<hr />
  5 +
  6 +<h3>Requisites</h3>
  7 +
  8 +In order to create a Configuration, you must:
  9 +<ul>
  10 + <li>Have <%= link_to(t('signed_up'), new_user_registration_path) %> to the platform</li>
  11 + <li>Be <%= link_to(t('signed_in'), new_user_session_path) %></li>
  12 + <li>Have already created at least one Reading Group</li>
  13 +</ul>
  14 +
  15 +<hr />
  16 +
  17 +<h3>Introduction</h3>
  18 +
  19 +To process a repository, Mezuro uses configurations which you specify on the <%= link_to(t('repository_creation'), tutorials_path('analyzing')) %>.
  20 +
  21 +<h4>Configuration components</h4>
  22 +
  23 +<p>Here you will be briefly introduced to all the components of a configuration and then guided through the steps to create one.</p>
  24 +
  25 +<dl>
  26 + <dt><b>Configuration</b></dt>
  27 + <dd>Just a high level container for the remaining components association</dd>
  28 + <dt><b>Metrics</b></dt>
  29 + <dd>Specification of which metric will be calculated during the processing and how to interpret its results
  30 + <ul>
  31 + <li>Weight: for each module it is given a grade which is a weighted average of all the metrics calculated for it. This field is the weight of the metric on the final grade</li>
  32 + <li>Aggregation Form: Not all the metrics can be calculated for every module. For this type of metric, we calculate the aggregation of the children values according to what this field specifies</li>
  33 + <li>Reading Group: specifies which set of interpretations (called readings) will be available for this metric</li>
  34 + </ul>
  35 + </dd>
  36 + <dt><b>Reading Group</b></dt>
  37 + <dd>Just a high level container for the readings (interpretations)</dd>
  38 + <dt><b>Reading</b></dt>
  39 + <dd>Interpretation for a given value providing label, grade (this is the grade used for the weighted average mentioned above) and color</dd>
  40 + <dt><b>Range</b></dt>
  41 + <dd>Associates numeric intervals to the readings of a given metric</dd>
  42 +</dl>
  43 +
  44 +<hr />
  45 +
  46 +<h3>Steps</h3>
  47 +
  48 +<ol>
  49 + <li><b>Configuration creation</b>
  50 + <ol>
  51 + <li>Click on "Configuration" on the upper menu</li>
  52 + <li>Click on "New Configuration"
  53 + <ol>
  54 + <li>Fill in the form with a name that must be unique</li>
  55 + <li>Fill in the form with a description which is not required</li>
  56 + </ol>
  57 + </li>
  58 + <li>Click on "Save" and you should be at the configuration page now</li>
  59 + </ol>
  60 + </li>
  61 + <li><b>Metric addition</b>
  62 + <ol>
  63 + <li>From the configuration page</li>
  64 + <li>Click on "Add Metric"</li>
  65 + <li>Select one collector from the options, and click on the metric that you want to add
  66 + <ol>
  67 + <li>Fill in the form with a "Weight", used to calculate the final grade</li>
  68 + <li>Select the "Aggregation Form" that will be used for this metric</li>
  69 + <li>Select the "Reading Group" which will provide the interpretations for this metric</li>
  70 + </ol>
  71 + </li>
  72 + <li>Click on "Save" and you should be at the configuration page now with the new metric added</li>
  73 + </ol>
  74 + </li>
  75 + <li><b>Ranges creation</b>
  76 + <ol>
  77 + <li>From the configuration page</li>
  78 + <li>Click on "Show" for the metric which you want to create ranges for</li>
  79 + <li>Click on "Add Range"
  80 + <ol>
  81 + <li>Fill in the form with the "Beginning" and "End" values for the interval</li>
  82 + <li>Fill in the form with the "Comments" which will be displayed if the metric value matches the interval</li>
  83 + <li>Select the "Reading" which will be associated with this range</li>
  84 + </ol>
  85 + </li>
  86 + <li>Click on "Save" and you should be at the metric page with the new range added, congratulations!</li>
  87 + </ol>
  88 +</ol>
  89 +
  90 +<hr />
... ...
app/views/tutorials/configuring.html.erb
... ... @@ -1,78 +0,0 @@
1   -<h1>Tutorial</h1>
2   -<h2>Setting a New Configuration</h2>
3   -
4   -<hr />
5   -
6   -<h3>Requisites</h3>
7   -
8   -In order to create a Configuration, you must:
9   -<ul>
10   - <li>Have <%= link_to("signed up", new_user_registration_path) %> to the platform</li>
11   - <li>Be <%= link_to("signed in", new_user_session_path) %></li>
12   - <li>Have already created at least one Reading Group</li>
13   -</ul>
14   -
15   -<hr />
16   -
17   -<h3>Introduction</h3>
18   -
19   -To process a repository, Mezuro uses configurations which you specify on the <%= link_to "repository creation", tutorials_path('analyzing') %>. Here you will be briefly introduced to all the components of a configuration and then guided through the steps to create one.
20   -
21   -<h4>Configuration components</h4>
22   -<ul>
23   - <li><b>Configuration</b>: just a high level container for the remaining components association</li>
24   - <li><b>Metrics</b>: specification of which metric will be calculated during the processing and how to interpret its results</li>
25   - <ul>
26   - <li>Weight: for each module it is given a grade which is a weighted average of all the metrics calculated for it. This field is the weight of the metric on the final grade</li>
27   - <li>Aggregation Form: Not all the metrics can be calculated for every module. For this type of metric, we calculate the aggregation of the children values according to what this field specifies</li>
28   - <li>Reading Group: specifies which set of interpretations (called readings) will be available for this metric</li>
29   - </ul>
30   - <li><b>Reading Group</b>: just a high level container for the readings (interpretations)</li>
31   - <ul>
32   - <li>Reading: interpretation for a given value providing label, grade (this is the grade used for the weighted average mentioned above) and color</li>
33   - </ul>
34   - <li><b>Range</b>: Associates number intervals to the readings of a given metric</li>
35   -</ul>
36   -
37   -<hr />
38   -
39   -<h3>Steps</h3>
40   -
41   -<ol>
42   - <li>Configuration creation</li>
43   - <ol>
44   - <li>Click on "Configuration" on the upper menu</li>
45   - <li>Click on "New Configuration"</li>
46   - <ol>
47   - <li>Fill in the form with a name that must be unique</li>
48   - <li>Fill in the form with a description which is not required</li>
49   - <li>Click on "Save" and you should be at the configuration page now</li>
50   - </ol>
51   - </ol>
52   - <li>Metric addition</li>
53   - <ol>
54   - <li>From the configuration page</li>
55   - <li>Click on "Add Metric"</li>
56   - <li>Select one collector from the options, and click on the metric that you want to add</li>
57   - <ol>
58   - <li>Fill in the form with a "Weight", used to calculate the final grade</li>
59   - <li>Select the "Aggregation Form" that will be used for this metric</li>
60   - <li>Select the "Reading Group" which will provide the interpretations for this metric</li>
61   - <li>Click on "Save" and you should be at the configuration page now with the new metric added</li>
62   - </ol>
63   - </ol>
64   - <li>Ranges creation</li>
65   - <ol>
66   - <li>From the configuration page</li>
67   - <li>Click on "Show" for the metric which you want to create ranges for</li>
68   - <li>Click on "Add Range"</li>
69   - <ol>
70   - <li>Fill in the form with the "Beginning" and "End" values for the interval</li>
71   - <li>Fill in the form with the "Comments" which will be displayed if the metric value matches the interval</li>
72   - <li>Select the "Reading" which will be associated with this range</li>
73   - <li>Click on "Save" and you should be at the metric page with the new range added, congratulations!</li>
74   - </ol>
75   - </ol>
76   -</ol>
77   -
78   -<hr />
app/views/tutorials/configuring.pt.html.erb 0 → 100644
... ... @@ -0,0 +1,94 @@
  1 +<h1>Tutorial</h1>
  2 +<h2>Criando uma nova configuração</h2>
  3 +
  4 +<hr>
  5 +
  6 +<h3>Requisitos</h3>
  7 +
  8 +Para criar uma configuração, é necessário:
  9 +<ul>
  10 + <li><%= link_to(t('signed_up'), new_user_registration_path) %> na plataforma</li>
  11 + <li>Estar <%= link_to(t('signed_in'), new_user_session_path) %></li>
  12 + <li>Já ter criado pelo menos um Grupo de Leitura</li>
  13 +</ul>
  14 +
  15 +<hr>
  16 +
  17 +<h3>Introdução</h3>
  18 +
  19 +Para processar um repositório, o Mezuro utiliza configurações que você especifica no <%= link_to(t('repository_creation'), tutorials_path('analyzing')) %>.
  20 +
  21 +<h4>Componentes de Configuração</h4>
  22 +
  23 +<p>Aqui você será apresentado brevemente a todos os componentes de uma configuração e, em seguida, verá os passos para criar uma nova configuração.</p>
  24 +
  25 +<dl>
  26 + <dt><b>Configuração</b></dt>
  27 + <dd>Apenas um contêiner de alto nível para a associação componentes restantes</dd>
  28 + <dt><b>Métricas</b></dt>
  29 + <dd>Especificação de quais métricas serão calculadas durante o processamento e como interpretar seus resultados
  30 + <ul>
  31 + <li>Peso: para cada módulo é dada uma nota, que é uma média ponderada de todas as métricas calculadas para ele. Este campo corresponde ao peso da métrica sobre a nota final</li>
  32 + <li>Forma de Agregação: Nem todas as métricas podem ser calculadas para cada módulo. Para este tipo de métrica, calcula-se a agregação dos valores de acordo com o que está especificado em cada campo</li>
  33 + <li>Grupo de Leitura: especifica qual conjunto de interpretações (chamados leituras) estará disponível para esta métrica</li>
  34 + </ul>
  35 + </dd>
  36 + <dt><b>Grupo de Leitura</b></dt>
  37 + <dd>Apenas um contêiner de alto nível para as leituras (interpretações)</dd>
  38 + <dt><b>Leitura</b></dt>
  39 + <dd>Leitura: a interpretação de um determinado valor fornecendo rótulo, nota (esta é a nota utilizada para a média ponderada mencionada acima) e a cor</dd>
  40 + <dt><b>Intervalo</b></dt>
  41 + <dd>Associa intervalos numéricos para as leituras de uma determinada métrica</dd>
  42 +</dl>
  43 +
  44 +<hr>
  45 +
  46 +<h3>Passos</h3>
  47 +
  48 +<ol>
  49 + <li>
  50 +<b>Criando Configuração</b>
  51 + <ol>
  52 + <li>Clique em "Configuração" no menu superior</li>
  53 + <li>Clique em "Nova Configuração"
  54 + <ol>
  55 + <li>Preencha o formulário com um "Nome", que deve ser único</li>
  56 + <li>Preencha o formulário com uma "Descrição"</li>
  57 + </ol>
  58 + </li>
  59 + <li>Clique em "Salvar" e você será redirecionado para a página de configuração</li>
  60 + </ol>
  61 + </li>
  62 + <li>
  63 +<b>Adicionando uma Métrica</b>
  64 + <ol>
  65 + <li>A partir da página de configuração</li>
  66 + <li>Clique em "Adicionar Métrica"</li>
  67 + <li>Selecione um coletor das opções e clique na métrica que você deseja adicionar
  68 + <ol>
  69 + <li>Preencha o formulário com um "Peso" que será utilizado para o cálculo da nota final</li>
  70 + <li>Escolher a "Forma de Agregação" que irá ser utilizada para esta métrica</li>
  71 + <li>Selecione o "Grupo de Leitura", que irá fornecer as interpretações para essa métrica</li>
  72 + </ol>
  73 + </li>
  74 + <li>Clique em "Salvar" e você deve estar na página de configuração, agora com uma nova métrica adicionada</li>
  75 + </ol>
  76 + </li>
  77 + <li>
  78 +<b>Criação de Intervalos</b>
  79 + <ol>
  80 + <li>A partir da página de configuração</li>
  81 + <li>Clique em "Mostrar" para a métrica que você deseja criar intervalos</li>
  82 + <li>Clique em "Adicionar intervalo"
  83 + <ol>
  84 + <li>Preencha o formulário com os valores de "Início" e "Fim" de cada intervalo</li>
  85 + <li>Preencha o formulário com os "Comentários", que serão exibidos se o valor da métrica corresponder ao intervalo</li>
  86 + <li>Selecione a "Leitura" que será associada a este intervalo</li>
  87 + </ol>
  88 + </li>
  89 + <li>Clique em "Salvar" e você deve estar na página da métrica com o novo intervalo criado, parabéns!</li>
  90 + </ol>
  91 +</li>
  92 +</ol>
  93 +
  94 +<hr>
... ...
app/views/tutorials/keywords.en.html.erb 0 → 100644
... ... @@ -0,0 +1,59 @@
  1 +<h1>Tutorial</h1>
  2 +
  3 +<h2>Keywords</h2>
  4 +
  5 +<hr />
  6 +
  7 +<div class="keywords-explanations">
  8 + <div>
  9 + <h3 id="granularity">Granularity</h3>
  10 +
  11 + <p>Represents the granularity level of the code fragment being measured. Mezuro uses four levels of granularity:</p>
  12 + <ul>
  13 + <li>Method</li>
  14 + <li>Class</li>
  15 + <li>Package</li>
  16 + <li>Software</li>
  17 + </ul>
  18 + </div>
  19 +
  20 + <div>
  21 + <h3 id="module">Module</h3>
  22 +
  23 + <p>Represents a fragment of the software. Every node in the processing tree generated by the Kalibro processor is a module and each module has a <i>granularity</i>.</p>
  24 + </div>
  25 +
  26 + <div>
  27 + <h3 id="range">Range</h3>
  28 +
  29 + <p>Represents numerical intervals that may contain the value calculated for a given <i>metric</i>. Ranges combined with readings provide interpretations for <i>metric results</i>.</p>
  30 + </div>
  31 +
  32 + <div>
  33 + <h3 id="reading">Reading</h3>
  34 +
  35 + <p>The interpretation given to a <i>metric result</i> (e.g., "Good", "Complex", "A"). Readings combined with ranges provide interpretations for <i>metric results</i>.</p>
  36 + </div>
  37 +
  38 + <div>
  39 + <h3 id="reading-group">Reading Group</h3>
  40 +
  41 + <p>A set of <i>readings</i> that make sense when grouped together (e.g., "Good" and "Bad", "Simple" and "Complex").</p>
  42 + </div>
  43 + <div>
  44 + <h3 id="configuration">Configuration</h3>
  45 +
  46 + <p>A set of <i>metrics</i>.</p>
  47 + </div>
  48 + <div>
  49 + <h3 id="metric_result">Metric Result</h3>
  50 +
  51 + <p>It is a numerical result associated to a metric by the Collector or aggregating in the case of a Compound Metric</p>
  52 + </div>
  53 +
  54 + <div>
  55 + <h3 id="metric">Metric</h3>
  56 + <p>A software metric is a quantitative measure of some property of a <i>module</i>. For more details see
  57 + <%= link_to(t('carlos_morais_dissertation'), 'http://www.teses.usp.br/teses/disponiveis/45/45134/tde-25092013-142158/publico/dissertacao.pdf') %>.</p>
  58 + </div>
  59 +</div>
... ...
app/views/tutorials/keywords.html.erb
... ... @@ -1,58 +0,0 @@
1   -<h1>Keywords</h1>
2   -
3   -<hr />
4   -
5   -
6   -<div class="keywords-explanations">
7   - <div>
8   - <h3 id="granularity">Granularity</h3>
9   -
10   - <p>Represents the granularity level of the code fragment being measured. Mezuro uses four levels of granularity:</p>
11   - <ul>
12   - <li>Method</li>
13   - <li>Class</li>
14   - <li>Package</li>
15   - <li>Software</li>
16   - </ul>
17   - </div>
18   -
19   - <div>
20   - <h3 id="module">Module</h3>
21   -
22   - <p>Represents a fragment of the software. Every node in the processing tree generated by the Kalibro processor is a module and each module has a <i>granularity</i>.</p>
23   - </div>
24   -
25   - <div>
26   - <h3 id="range">Range</h3>
27   -
28   - <p>Represents numerical intervals that may contain the value calculated for a given <i>metric</i>. Ranges combined with readings provide interpretations for <i>metric results</i>.</p>
29   - </div>
30   -
31   - <div>
32   - <h3 id="reading">Reading</h3>
33   -
34   - <p>The interpretation given to a <i>metric result</i> (e.g., "Good", "Complex", "A"). Readings combined with ranges provide interpretations for <i>metric results</i>.</p>
35   - </div>
36   -
37   - <div>
38   - <h3 id="reading-group">Reading Group</h3>
39   -
40   - <p>A set of <i>readings</i> that make sense when grouped together (e.g., "Good" and "Bad", "Simple" and "Complex").</p>
41   - </div>
42   - <div>
43   - <h3 id="configuration">Configuration</h3>
44   -
45   - <p>A set of <i>metrics</i>.</p>
46   - </div>
47   - <div>
48   - <h3 id="metric_result">Metric Result</h3>
49   -
50   - <p>It is a numerical result associated to a metric by the Collector or aggregating in the case of a Compound Metric</p>
51   - </div>
52   -
53   - <div>
54   - <h3 id="metric">Metric</h3>
55   - <p>A software metric is a quantitative measure of some property of a <i>module</i>. For more details see
56   - <%= link_to 'Carlos Morais dissertation', 'http://www.teses.usp.br/teses/disponiveis/45/45134/tde-25092013-142158/publico/dissertacao.pdf' %>.</p>
57   - </div>
58   -</div>
app/views/tutorials/keywords.pt.html.erb 0 → 100644
... ... @@ -0,0 +1,59 @@
  1 +<h1>Tutorial</h1>
  2 +
  3 +<h2>Palavras-chave</h2>
  4 +
  5 +<hr>
  6 +
  7 +<div class="keywords-explanations">
  8 + <div>
  9 + <h3 id="granularity">Granularidade</h3>
  10 +
  11 + <p>Representa o nível de granularidade do fragmento de código que está sendo medido. O Mezuro utiliza quatro níveis de granularidade, sendo eles:</p>
  12 + <ul>
  13 + <li>Método</li>
  14 + <li>Classe</li>
  15 + <li>Pacote</li>
  16 + <li>Software</li>
  17 + </ul>
  18 + </div>
  19 +
  20 + <div>
  21 + <h3 id="module">Módulo</h3>
  22 +
  23 + <p>Representa um fragmento do software. Cada nó na árvore de processamento gerada pelo Kalibro Processor é um Módulo e cada um deles possui uma <i>Granularidade</i>.</p>
  24 + </div>
  25 +
  26 + <div>
  27 + <h3 id="range">Intervalo</h3>
  28 +
  29 + <p>Representa intervalos numéricos que podem conter o valor calculado para uma métrica determinada <i>Métrica</i>. Intervalos combinados com leituras fornecem interpretações para o <i>Resultado das Métricas</i>.</p>
  30 + </div>
  31 +
  32 + <div>
  33 + <h3 id="reading">Leitura</h3>
  34 +
  35 + <p>A interpretação dada a um<i>Resultado das Métricas</i> (por exemplo, "Bom", "Complexo", "A"). As leituras combinadas com intervalos fornecem interpretações para o <i>Resultado das Métricas</i>.</p>
  36 + </div>
  37 +
  38 + <div>
  39 + <h3 id="reading-group">Grupo de Leitura</h3>
  40 +
  41 + <p>Um conjunto de <i>Leituras</i> que façam sentido quando agrupadas (por exemplo, "Bom" e "Ruim", "Simples" e "Complexo").</p>
  42 + </div>
  43 + <div>
  44 + <h3 id="configuration">Configuração</h3>
  45 +
  46 + <p>Um conjunto de <i>Métricas</i>.</p>
  47 + </div>
  48 + <div>
  49 + <h3 id="metric_result">Resultado da Métrica</h3>
  50 +
  51 + <p>É um resultado numérico associado a uma métrica pelo coletor ou agregador no caso de uma Métrica Composta</p>
  52 + </div>
  53 +
  54 + <div>
  55 + <h3 id="metric">Métrica</h3>
  56 + <p>Uma métrica de software é uma medida quantitativa de alguma propriedade de um <i>Módulo</i>. Para mais detalhes veja
  57 + <%= link_to(t('carlos_morais_dissertation'), 'http://www.teses.usp.br/teses/disponiveis/45/45134/tde-25092013-142158/publico/dissertacao.pdf') %>.</p>
  58 + </div>
  59 +</div>
... ...
config/application.rb
... ... @@ -17,7 +17,7 @@ module Mezuro
17 17 # config.time_zone = 'Central Time (US & Canada)'
18 18  
19 19 # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
20   - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
  20 + config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}').to_s]
21 21 # config.i18n.default_locale = :de
22 22 config.i18n.enforce_available_locales = true
23 23  
... ...
config/locales/bootstrap/en.yml 0 → 100644
... ... @@ -0,0 +1,18 @@
  1 +# Sample localization file for English. Add more files in this directory for other locales.
  2 +# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
  3 +
  4 +en:
  5 + helpers:
  6 + actions: "Actions"
  7 + links:
  8 + back: "Back"
  9 + cancel: "Cancel"
  10 + confirm: "Are you sure?"
  11 + destroy: "Delete"
  12 + new: "New"
  13 + edit: "Edit"
  14 + titles:
  15 + edit: "Edit %{model}"
  16 + save: "Save %{model}"
  17 + new: "New %{model}"
  18 + delete: "Delete %{model}"
... ...
config/locales/bootstrap/pt.yml 0 → 100644
... ... @@ -0,0 +1,15 @@
  1 +pt:
  2 + helpers:
  3 + actions: "Ações"
  4 + links:
  5 + back: "Voltar"
  6 + cancel: "Cancelar"
  7 + confirm: "Tem certeza?"
  8 + destroy: "Destruir"
  9 + new: "Novo"
  10 + edit: "Editar"
  11 + titles:
  12 + edit: "Editar %{model}"
  13 + save: "Salvar %{model}"
  14 + new: "Novo %{model}"
  15 + delete: "Destruir %{model}"
... ...
config/locales/controllers/compound_metric_configurations/en.yml 0 → 100644
... ... @@ -0,0 +1,3 @@
  1 +en:
  2 + compound_metric_configuration:
  3 + CompoundMetricConfiguration: "Compound Metric Configuration"
... ...