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
@@ -63,6 +63,9 @@ gem 'exception_notification', '~> 4.0.1' @@ -63,6 +63,9 @@ gem 'exception_notification', '~> 4.0.1'
63 # Google Analytics 63 # Google Analytics
64 gem 'google-analytics-rails', '~> 0.0.6' 64 gem 'google-analytics-rails', '~> 0.0.6'
65 65
  66 +# Browser language detection
  67 +gem 'http_accept_language'
  68 +
66 group :test do 69 group :test do
67 # Easier test writing 70 # Easier test writing
68 gem "shoulda-matchers", '~> 2.8.0' 71 gem "shoulda-matchers", '~> 2.8.0'
@@ -105,6 +108,9 @@ group :development, :test do @@ -105,6 +108,9 @@ group :development, :test do
105 # Better error interface 108 # Better error interface
106 gem 'better_errors' 109 gem 'better_errors'
107 gem 'binding_of_caller' 110 gem 'binding_of_caller'
  111 +
  112 + # Localization assistance
  113 + gem 'i18n_generators'
108 end 114 end
109 115
110 # Acceptance tests 116 # Acceptance tests
@@ -118,6 +118,8 @@ GEM @@ -118,6 +118,8 @@ GEM
118 warden (~> 1.2.3) 118 warden (~> 1.2.3)
119 diff-lcs (1.2.5) 119 diff-lcs (1.2.5)
120 docile (1.1.5) 120 docile (1.1.5)
  121 + domain_name (0.5.23)
  122 + unf (>= 0.0.5, < 1.0.0)
121 erubis (2.7.0) 123 erubis (2.7.0)
122 exception_notification (4.0.1) 124 exception_notification (4.0.1)
123 actionmailer (>= 3.0.4) 125 actionmailer (>= 3.0.4)
@@ -138,7 +140,13 @@ GEM @@ -138,7 +140,13 @@ GEM
138 activesupport (>= 4.1.0) 140 activesupport (>= 4.1.0)
139 google-analytics-rails (0.0.6) 141 google-analytics-rails (0.0.6)
140 hike (1.2.3) 142 hike (1.2.3)
  143 + http-cookie (1.0.2)
  144 + domain_name (~> 0.5)
  145 + http_accept_language (2.0.5)
141 i18n (0.7.0) 146 i18n (0.7.0)
  147 + i18n_generators (1.2.1)
  148 + mechanize
  149 + rails (>= 3.0.0)
142 jbuilder (2.2.12) 150 jbuilder (2.2.12)
143 activesupport (>= 3.0.0, < 5) 151 activesupport (>= 3.0.0, < 5)
144 multi_json (~> 1.2) 152 multi_json (~> 1.2)
@@ -168,6 +176,15 @@ GEM @@ -168,6 +176,15 @@ GEM
168 nokogiri (>= 1.5.9) 176 nokogiri (>= 1.5.9)
169 mail (2.6.3) 177 mail (2.6.3)
170 mime-types (>= 1.16, < 3) 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 metaclass (0.0.4) 188 metaclass (0.0.4)
172 mime-types (2.4.3) 189 mime-types (2.4.3)
173 mini_portile (0.6.2) 190 mini_portile (0.6.2)
@@ -177,11 +194,14 @@ GEM @@ -177,11 +194,14 @@ GEM
177 multi_json (1.11.0) 194 multi_json (1.11.0)
178 multi_test (0.1.2) 195 multi_test (0.1.2)
179 multipart-post (2.0.0) 196 multipart-post (2.0.0)
  197 + net-http-digest_auth (1.4)
  198 + net-http-persistent (2.9.4)
180 net-scp (1.2.1) 199 net-scp (1.2.1)
181 net-ssh (>= 2.6.5) 200 net-ssh (>= 2.6.5)
182 net-ssh (2.9.2) 201 net-ssh (2.9.2)
183 nokogiri (1.6.6.2) 202 nokogiri (1.6.6.2)
184 mini_portile (~> 0.6.0) 203 mini_portile (~> 0.6.0)
  204 + ntlm-http (0.1.1)
185 orm_adapter (0.5.0) 205 orm_adapter (0.5.0)
186 pg (0.18.1) 206 pg (0.18.1)
187 poltergeist (1.6.0) 207 poltergeist (1.6.0)
@@ -283,6 +303,9 @@ GEM @@ -283,6 +303,9 @@ GEM
283 uglifier (2.7.1) 303 uglifier (2.7.1)
284 execjs (>= 0.3.0) 304 execjs (>= 0.3.0)
285 json (>= 1.8.0) 305 json (>= 1.8.0)
  306 + unf (0.1.4)
  307 + unf_ext
  308 + unf_ext (0.0.6)
286 warden (1.2.3) 309 warden (1.2.3)
287 rack (>= 1.0) 310 rack (>= 1.0)
288 web-console (2.0.0) 311 web-console (2.0.0)
@@ -290,6 +313,7 @@ GEM @@ -290,6 +313,7 @@ GEM
290 binding_of_caller (>= 0.7.2) 313 binding_of_caller (>= 0.7.2)
291 railties (~> 4.0) 314 railties (~> 4.0)
292 sprockets-rails (>= 2.0, < 4.0) 315 sprockets-rails (>= 2.0, < 4.0)
  316 + webrobots (0.1.1)
293 websocket-driver (0.5.3) 317 websocket-driver (0.5.3)
294 websocket-extensions (>= 0.1.0) 318 websocket-extensions (>= 0.1.0)
295 websocket-extensions (0.1.2) 319 websocket-extensions (0.1.2)
@@ -318,6 +342,8 @@ DEPENDENCIES @@ -318,6 +342,8 @@ DEPENDENCIES
318 exception_notification (~> 4.0.1) 342 exception_notification (~> 4.0.1)
319 factory_girl_rails (~> 4.5.0) 343 factory_girl_rails (~> 4.5.0)
320 google-analytics-rails (~> 0.0.6) 344 google-analytics-rails (~> 0.0.6)
  345 + http_accept_language
  346 + i18n_generators
321 jbuilder (~> 2.2.2) 347 jbuilder (~> 2.2.2)
322 jquery-rails 348 jquery-rails
323 jquery-ui-rails (~> 5.0.0) 349 jquery-ui-rails (~> 5.0.0)
app/assets/stylesheets/bootstrap_and_overrides.css
@@ -54,4 +54,8 @@ footer div { @@ -54,4 +54,8 @@ footer div {
54 line-height: 20px; 54 line-height: 20px;
55 color: #999999; 55 color: #999999;
56 text-transform: uppercase; 56 text-transform: uppercase;
57 -}  
58 \ No newline at end of file 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 class ApplicationController < ActionController::Base 3 class ApplicationController < ActionController::Base
2 # Prevent CSRF attacks by raising an exception. 4 # Prevent CSRF attacks by raising an exception.
3 # For APIs, you may want to use :null_session instead. 5 # For APIs, you may want to use :null_session instead.
@@ -6,10 +8,27 @@ class ApplicationController &lt; ActionController::Base @@ -6,10 +8,27 @@ class ApplicationController &lt; ActionController::Base
6 add_flash_types :error, :alert 8 add_flash_types :error, :alert
7 9
8 before_filter :configure_permitted_parameters, if: :devise_controller? 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 protected 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 # Since creating the controllers looks wronger than not testing this two 32 # Since creating the controllers looks wronger than not testing this two
14 # lines. I think we can live without 100% of coverage 33 # lines. I think we can live without 100% of coverage
15 # :nocov: 34 # :nocov:
@@ -17,5 +36,12 @@ class ApplicationController &lt; ActionController::Base @@ -17,5 +36,12 @@ class ApplicationController &lt; ActionController::Base
17 devise_parameter_sanitizer.for(:sign_up) << :name 36 devise_parameter_sanitizer.for(:sign_up) << :name
18 devise_parameter_sanitizer.for(:account_update) << :name 37 devise_parameter_sanitizer.for(:account_update) << :name
19 end 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 end 47 end
app/controllers/compound_metric_configurations_controller.rb
@@ -25,7 +25,7 @@ class CompoundMetricConfigurationsController &lt; BaseMetricConfigurationsControlle @@ -25,7 +25,7 @@ class CompoundMetricConfigurationsController &lt; BaseMetricConfigurationsControlle
25 respond_to do |format| 25 respond_to do |format|
26 edit 26 edit
27 if @compound_metric_configuration.update(metric_configuration_params) 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 format.json { head :no_content } 29 format.json { head :no_content }
30 else 30 else
31 failed_action(format, 'edit') 31 failed_action(format, 'edit')
@@ -59,7 +59,7 @@ class CompoundMetricConfigurationsController &lt; BaseMetricConfigurationsControlle @@ -59,7 +59,7 @@ class CompoundMetricConfigurationsController &lt; BaseMetricConfigurationsControlle
59 #Code extracted from create action 59 #Code extracted from create action
60 def create_and_redir(format) 60 def create_and_redir(format)
61 if @compound_metric_configuration.save 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 else 63 else
64 failed_action(format, 'new') 64 failed_action(format, 'new')
65 end 65 end
app/controllers/concerns/ownership_authentication.rb
@@ -54,7 +54,7 @@ module OwnershipAuthentication @@ -54,7 +54,7 @@ module OwnershipAuthentication
54 def check_project_ownership(id) 54 def check_project_ownership(id)
55 if current_user.project_attributes.find_by_project_id(id).nil? 55 if current_user.project_attributes.find_by_project_id(id).nil?
56 respond_to do |format| 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 format.json { head :no_content } 58 format.json { head :no_content }
59 end 59 end
60 end 60 end
@@ -65,7 +65,7 @@ module OwnershipAuthentication @@ -65,7 +65,7 @@ module OwnershipAuthentication
65 def check_reading_group_ownership(id) 65 def check_reading_group_ownership(id)
66 if current_user.reading_group_ownerships.find_by_reading_group_id(id).nil? 66 if current_user.reading_group_ownerships.find_by_reading_group_id(id).nil?
67 respond_to do |format| 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 format.json { head :no_content } 69 format.json { head :no_content }
70 end 70 end
71 end 71 end
@@ -76,7 +76,7 @@ module OwnershipAuthentication @@ -76,7 +76,7 @@ module OwnershipAuthentication
76 def check_kalibro_configuration_ownership(id) 76 def check_kalibro_configuration_ownership(id)
77 if current_user.kalibro_configuration_ownerships.find_by_kalibro_configuration_id(id).nil? 77 if current_user.kalibro_configuration_ownerships.find_by_kalibro_configuration_id(id).nil?
78 respond_to do |format| 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 format.json { head :no_content } 80 format.json { head :no_content }
81 end 81 end
82 end 82 end
app/controllers/kalibro_configurations_controller.rb
@@ -80,7 +80,7 @@ class KalibroConfigurationsController &lt; ApplicationController @@ -80,7 +80,7 @@ class KalibroConfigurationsController &lt; ApplicationController
80 if @kalibro_configuration.save 80 if @kalibro_configuration.save
81 current_user.kalibro_configuration_ownerships.create kalibro_configuration_id: @kalibro_configuration.id 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 format.json { render action: 'show', status: :created, location: @kalibro_configuration } 84 format.json { render action: 'show', status: :created, location: @kalibro_configuration }
85 else 85 else
86 format.html { render action: 'new' } 86 format.html { render action: 'new' }
app/controllers/kalibro_ranges_controller.rb
@@ -23,7 +23,7 @@ class KalibroRangesController &lt; ApplicationController @@ -23,7 +23,7 @@ class KalibroRangesController &lt; ApplicationController
23 def destroy 23 def destroy
24 @kalibro_range.destroy 24 @kalibro_range.destroy
25 respond_to do |format| 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 format.json { head :no_content } 27 format.json { head :no_content }
28 end 28 end
29 end 29 end
@@ -36,7 +36,7 @@ class KalibroRangesController &lt; ApplicationController @@ -36,7 +36,7 @@ class KalibroRangesController &lt; ApplicationController
36 respond_to do |format| 36 respond_to do |format|
37 @kalibro_range.metric_configuration_id = @metric_configuration_id 37 @kalibro_range.metric_configuration_id = @metric_configuration_id
38 if @kalibro_range.update(kalibro_range_params) 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 format.json { head :no_content } 40 format.json { head :no_content }
41 else 41 else
42 failed_action(format, 'edit') 42 failed_action(format, 'edit')
@@ -53,7 +53,7 @@ class KalibroRangesController &lt; ApplicationController @@ -53,7 +53,7 @@ class KalibroRangesController &lt; ApplicationController
53 53
54 def create_and_redir(format) 54 def create_and_redir(format)
55 if @kalibro_range.save 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 else 57 else
58 failed_action(format, 'new') 58 failed_action(format, 'new')
59 end 59 end
app/controllers/metric_configurations_controller.rb
@@ -29,7 +29,7 @@ class MetricConfigurationsController &lt; BaseMetricConfigurationsController @@ -29,7 +29,7 @@ class MetricConfigurationsController &lt; BaseMetricConfigurationsController
29 respond_to do |format| 29 respond_to do |format|
30 @metric_configuration.kalibro_configuration_id = params[:kalibro_configuration_id] 30 @metric_configuration.kalibro_configuration_id = params[:kalibro_configuration_id]
31 if @metric_configuration.update(metric_configuration_params) 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 format.json { head :no_content } 33 format.json { head :no_content }
34 Rails.cache.delete("#{@metric_configuration.kalibro_configuration_id}_metric_configurations") 34 Rails.cache.delete("#{@metric_configuration.kalibro_configuration_id}_metric_configurations")
35 else 35 else
@@ -71,7 +71,7 @@ class MetricConfigurationsController &lt; BaseMetricConfigurationsController @@ -71,7 +71,7 @@ class MetricConfigurationsController &lt; BaseMetricConfigurationsController
71 #Code extracted from create action 71 #Code extracted from create action
72 def create_and_redir(format) 72 def create_and_redir(format)
73 if @metric_configuration.save 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 else 75 else
76 failed_action(format, 'new') 76 failed_action(format, 'new')
77 end 77 end
app/controllers/projects_controller.rb
@@ -79,7 +79,7 @@ class ProjectsController &lt; ApplicationController @@ -79,7 +79,7 @@ class ProjectsController &lt; ApplicationController
79 def create_and_redir(format) 79 def create_and_redir(format)
80 if @project.save 80 if @project.save
81 current_user.project_attributes.create(project_id: @project.id) 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 format.json { render action: 'show', status: :created, location: @project } 83 format.json { render action: 'show', status: :created, location: @project }
84 else 84 else
85 format.html { render action: 'new' } 85 format.html { render action: 'new' }
app/controllers/reading_groups_controller.rb
@@ -71,7 +71,7 @@ class ReadingGroupsController &lt; ApplicationController @@ -71,7 +71,7 @@ class ReadingGroupsController &lt; ApplicationController
71 if @reading_group.save 71 if @reading_group.save
72 current_user.reading_group_ownerships.create reading_group_id: @reading_group.id 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 format.json { render action: 'show', status: :created, location: @reading_group } 75 format.json { render action: 'show', status: :created, location: @reading_group }
76 else 76 else
77 format.html { render action: 'new' } 77 format.html { render action: 'new' }
app/controllers/readings_controller.rb
@@ -28,7 +28,7 @@ class ReadingsController &lt; ApplicationController @@ -28,7 +28,7 @@ class ReadingsController &lt; ApplicationController
28 def update 28 def update
29 respond_to do |format| 29 respond_to do |format|
30 if @reading.update(reading_params) 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 format.json { head :no_content } 32 format.json { head :no_content }
33 else 33 else
34 failed_action(format, 'edit') 34 failed_action(format, 'edit')
@@ -63,7 +63,7 @@ class ReadingsController &lt; ApplicationController @@ -63,7 +63,7 @@ class ReadingsController &lt; ApplicationController
63 # Code extracted from create action 63 # Code extracted from create action
64 def create_and_redir(format) 64 def create_and_redir(format)
65 if @reading.save 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 else 67 else
68 @reading_group_id = params[:reading_group_id] 68 @reading_group_id = params[:reading_group_id]
69 failed_action(format, 'new') 69 failed_action(format, 'new')
app/controllers/repositories_controller.rb
@@ -43,7 +43,7 @@ class RepositoriesController &lt; ApplicationController @@ -43,7 +43,7 @@ class RepositoriesController &lt; ApplicationController
43 def update 43 def update
44 respond_to do |format| 44 respond_to do |format|
45 if @repository.update(repository_params) 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 format.json { head :no_content } 47 format.json { head :no_content }
48 else 48 else
49 failed_action(format, 'edit') 49 failed_action(format, 'edit')
@@ -118,7 +118,7 @@ private @@ -118,7 +118,7 @@ private
118 # Code extracted from create action 118 # Code extracted from create action
119 def create_and_redir(format) 119 def create_and_redir(format)
120 if @repository.save 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 else 122 else
123 failed_action(format, 'new') 123 failed_action(format, 'new')
124 end 124 end
app/helpers/application_helper.rb
1 module ApplicationHelper 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 end 6 end
app/helpers/compound_metric_configurations_helper.rb
1 module CompoundMetricConfigurationsHelper 1 module CompoundMetricConfigurationsHelper
2 def scope_options 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 end 13 end
5 end 14 end
app/helpers/kalibro_configurations_helper.rb
@@ -5,17 +5,17 @@ module KalibroConfigurationsHelper @@ -5,17 +5,17 @@ module KalibroConfigurationsHelper
5 5
6 def link_to_edit_form(metric_configuration, kalibro_configuration_id) 6 def link_to_edit_form(metric_configuration, kalibro_configuration_id)
7 if (metric_configuration.metric.is_a? KalibroClient::Entities::Miscellaneous::CompoundMetric) 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 else 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 end 11 end
12 end 12 end
13 13
14 def link_to_show_page(metric_configuration, kalibro_configuration_id) 14 def link_to_show_page(metric_configuration, kalibro_configuration_id)
15 if (metric_configuration.metric.is_a? KalibroClient::Entities::Miscellaneous::CompoundMetric) 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 else 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 end 19 end
20 end 20 end
21 end 21 end
app/helpers/metric_configurations_helper.rb
1 module MetricConfigurationsHelper 1 module MetricConfigurationsHelper
2 def aggregation_options 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 end 4 end
6 5
7 def reading_group_options 6 def reading_group_options
app/views/compound_metric_configurations/_created_metrics.html.erb
1 <div id="created-metrics-accordion"> 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 <div> 3 <div>
4 <table class="table table-hover"> 4 <table class="table table-hover">
5 <thead> 5 <thead>
6 - <th>Name</th>  
7 - <th>Code</th> 6 + <th> <%= t('name') %> </th>
  7 + <th> <%= t('code') %> </th>
8 </thead> 8 </thead>
9 <tbody> 9 <tbody>
10 <%= render partial: 'created_metric', collection: metric_configurations, as: 'metric_configuration' %> 10 <%= render partial: 'created_metric', collection: metric_configurations, as: 'metric_configuration' %>
11 </tbody> 11 </tbody>
12 </table> 12 </table>
13 </div> 13 </div>
14 -</div>  
15 \ No newline at end of file 14 \ No newline at end of file
  15 +</div>
app/views/compound_metric_configurations/_form.html.erb
@@ -8,12 +8,12 @@ @@ -8,12 +8,12 @@
8 8
9 <div class="form-row"> 9 <div class="form-row">
10 <div class="field-container"> 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 <%= f.text_field :weight, :required => true, class: 'text-field form-control' %> 12 <%= f.text_field :weight, :required => true, class: 'text-field form-control' %>
13 </div> 13 </div>
14 <div class="help-container"> 14 <div class="help-container">
15 <p> 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 </p> 17 </p>
18 </div> 18 </div>
19 </div> 19 </div>
@@ -21,23 +21,23 @@ @@ -21,23 +21,23 @@
21 <% if @compound_metric_configuration.persisted? %> 21 <% if @compound_metric_configuration.persisted? %>
22 <%= hidden_field_tag(:reading_group_id, @compound_metric_configuration.reading_group_id) %> 22 <%= hidden_field_tag(:reading_group_id, @compound_metric_configuration.reading_group_id) %>
23 <%= hidden_field_tag(:kalibro_configuration_id, @compound_metric_configuration.kalibro_configuration_id) %> 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 <% else %> 25 <% else %>
26 <div class="form-row"> 26 <div class="form-row">
27 <div class="field-container"> 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 <%= f.select( :reading_group_id, reading_group_options, {class: 'form-control'} ) %> 29 <%= f.select( :reading_group_id, reading_group_options, {class: 'form-control'} ) %>
30 </div> 30 </div>
31 <div class="help-container"> 31 <div class="help-container">
32 <p> 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 </p> 34 </p>
35 </div> 35 </div>
36 </div> 36 </div>
37 <%= f.hidden_field(:kalibro_configuration_id, value: @kalibro_configuration_id) %> 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 <% end %> 39 <% end %>
40 </div> 40 </div>
41 </div> 41 </div>
42 <br> 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 <div class="form-row"> 1 <div class="form-row">
2 <div class="field-container"> 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 <%= f.text_field :name, :required => true, class: 'text-field form-control', value: (metric.name unless metric.nil?) %> 4 <%= f.text_field :name, :required => true, class: 'text-field form-control', value: (metric.name unless metric.nil?) %>
5 </div> 5 </div>
6 <div class="help-container"> 6 <div class="help-container">
7 <p> 7 <p>
8 - A custom name for your compound metric. 8 + <%= t_hint(:name) %>
9 </p> 9 </p>
10 </div> 10 </div>
11 </div> 11 </div>
12 12
13 <div class="form-row"> 13 <div class="form-row">
14 <div class="field-container"> 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 <%= f.text_field :description, class: 'text-field form-control', value: (metric.description unless metric.nil?) %> 16 <%= f.text_field :description, class: 'text-field form-control', value: (metric.description unless metric.nil?) %>
17 </div> 17 </div>
18 <div class="help-container"> 18 <div class="help-container">
19 <p> 19 <p>
20 - A short description of your compound metric. 20 + <%= t_hint(:description) %>
21 </p> 21 </p>
22 </div> 22 </div>
23 </div> 23 </div>
24 24
25 <div class="form-row"> 25 <div class="form-row">
26 <div class="field-container"> 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 <%= f.text_area :script, :required => true, class: 'text-area form-control', value: (metric.script unless metric.nil?) %> 28 <%= f.text_area :script, :required => true, class: 'text-area form-control', value: (metric.script unless metric.nil?) %>
29 </div> 29 </div>
30 <div class="help-container"> 30 <div class="help-container">
31 <p> 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 </p> 33 </p>
34 </div> 34 </div>
35 </div> 35 </div>
36 36
37 <div class="form-row"> 37 <div class="form-row">
38 <div class="field-container"> 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 <%= f.select( :scope, scope_options, {class: 'form-control', selected: (metric.scope unless metric.nil?)} ) %> 40 <%= f.select( :scope, scope_options, {class: 'form-control', selected: (metric.scope unless metric.nil?)} ) %>
41 </div> 41 </div>
42 <div class="help-container"> 42 <div class="help-container">
43 <p> 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 </p> 45 </p>
46 </div> 46 </div>
47 </div> 47 </div>
48 48
49 <div class="form-row"> 49 <div class="form-row">
50 <div class="field-container"> 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 <%= f.text_field :code, :required => true, class: 'text-field form-control' %> 52 <%= f.text_field :code, :required => true, class: 'text-field form-control' %>
53 </div> 53 </div>
54 <div class="help-container"> 54 <div class="help-container">
55 <p> 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 </p> 57 </p>
  58 + <br>
  59 + <p>
  60 + <%= t_hint('code.example') %>
  61 + </p>
62 </div> 62 </div>
63 </div> 63 </div>
64 <%= f.hidden_field(:compound, { value: "true"}) %> 64 <%= f.hidden_field(:compound, { value: "true"}) %>
app/views/compound_metric_configurations/edit.html.erb
1 <div class="page-header"> 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 <%= render partial: 'created_metrics', locals: {metric_configurations: @metric_configurations} %> 5 <%= render partial: 'created_metrics', locals: {metric_configurations: @metric_configurations} %>
6 6
app/views/compound_metric_configurations/new.html.erb
1 <div class="page-header"> 1 <div class="page-header">
2 - <h1>New Compound Metric Configuration</h1> 2 + <h1> <%= "#{t('new.female')} #{compound_metric_human_name}" %> </h1>
3 </div> 3 </div>
4 4
5 <%= render partial: 'created_metrics', locals: {metric_configurations: @metric_configurations} %> 5 <%= render partial: 'created_metrics', locals: {metric_configurations: @metric_configurations} %>
app/views/compound_metric_configurations/show.html.erb
@@ -3,58 +3,58 @@ @@ -3,58 +3,58 @@
3 </div> 3 </div>
4 4
5 <p> 5 <p>
6 - <strong>Description:</strong> 6 + <strong> <%= t('description') %>:</strong>
7 <% if @compound_metric_configuration.metric.description.nil? %> 7 <% if @compound_metric_configuration.metric.description.nil? %>
8 - <%= "There is no description available." %> 8 + <%= t('no_description') %>
9 <% else %> 9 <% else %>
10 <%= @compound_metric_configuration.metric.description %> 10 <%= @compound_metric_configuration.metric.description %>
11 <% end %> 11 <% end %>
12 </p> 12 </p>
13 13
14 <p> 14 <p>
15 - <strong>Script:</strong> 15 + <strong> <%= t('script') %>:</strong>
16 <%= @compound_metric_configuration.metric.script %> 16 <%= @compound_metric_configuration.metric.script %>
17 </p> 17 </p>
18 18
19 <p> 19 <p>
20 - <strong>Scope:</strong> 20 + <strong> <%= t('scope') %>:</strong>
21 <%= @compound_metric_configuration.metric.scope %> 21 <%= @compound_metric_configuration.metric.scope %>
22 </p> 22 </p>
23 23
24 <p> 24 <p>
25 - <strong>Code:</strong> 25 + <strong> <%= t('code') %>:</strong>
26 <%= @compound_metric_configuration.metric.code %> 26 <%= @compound_metric_configuration.metric.code %>
27 </p> 27 </p>
28 28
29 <p> 29 <p>
30 - <strong>Weight:</strong> 30 + <strong> <%= t('weight') %>:</strong>
31 <%= @compound_metric_configuration.weight %> 31 <%= @compound_metric_configuration.weight %>
32 </p> 32 </p>
33 33
34 <p> 34 <p>
35 - <strong>Aggregation Form:</strong> 35 + <strong> <%= t('metric_configurations_aggregation') %>:</strong>
36 <%= @compound_metric_configuration.aggregation_form %> 36 <%= @compound_metric_configuration.aggregation_form %>
37 </p> 37 </p>
38 38
39 <p> 39 <p>
40 - <strong>Reading Group Name:</strong> 40 + <strong> <%= t('metric_configurations_reading_group') %>:</strong>
41 <%= @reading_group.name %> 41 <%= @reading_group.name %>
42 </p> 42 </p>
43 43
44 <hr> 44 <hr>
45 45
46 -<h2> Ranges </h2> 46 +<h2> <%= t('ranges') %> </h2>
47 <% if kalibro_configuration_owner? @compound_metric_configuration.kalibro_configuration_id %> 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 @compound_metric_configuration.id), class: 'btn btn-info' %> 49 @compound_metric_configuration.id), class: 'btn btn-info' %>
50 <% end %> 50 <% end %>
51 51
52 <table class="table table-hover"> 52 <table class="table table-hover">
53 <thead> 53 <thead>
54 <tr> 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 </tr> 58 </tr>
59 </thead> 59 </thead>
60 <tbody> 60 <tbody>
@@ -69,10 +69,10 @@ @@ -69,10 +69,10 @@
69 <hr> 69 <hr>
70 70
71 <p> 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 <% if kalibro_configuration_owner? @compound_metric_configuration.kalibro_configuration_id %> 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 class: 'btn btn-danger' %> 76 class: 'btn btn-danger' %>
77 <% end %> 77 <% end %>
78 </p> 78 </p>
app/views/devise/_links.erb 0 → 100644
@@ -0,0 +1,4 @@ @@ -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 <div class="page-header"> 1 <div class="page-header">
2 - <h1>Resend confirmation instructions</h1> 2 + <h1><%= t('.resend_confirmation_instructions', :default => 'Resend confirmation instructions') %></h1>
3 </div> 3 </div>
4 4
5 <%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %> 5 <%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %>
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 <div><%= f.label :email %><br /> 8 <div><%= f.label :email %><br />
9 <%= f.email_field :email, :autofocus => true %></div> 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 <% end %> 12 <% end %>
13 13
14 <%= render "devise/shared/links" %> 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 \ No newline at end of file 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 <div class="page-header"> 1 <div class="page-header">
2 - <h1>Change your password</h1> 2 + <h1><%= t('.change_your_password', :default => 'Change your password') %></h1>
3 </div> 3 </div>
4 4
5 <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %> 5 <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %>
6 <%= devise_error_messages! %> 6 <%= devise_error_messages! %>
7 <%= f.hidden_field :reset_password_token %> 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 <%= f.password_field :password, :autofocus => true %></div> 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 <%= f.password_field :password_confirmation %></div> 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 <% end %> 16 <% end %>
17 17
18 <%= render "devise/shared/links" %> 18 <%= render "devise/shared/links" %>
app/views/devise/passwords/new.html.erb
1 <div class="page-header"> 1 <div class="page-header">
2 - <h1>Forgot your password?</h1> 2 + <h1><%= t('.forgot_your_password', :default => 'Forgot your password?') %></h1>
3 </div> 3 </div>
4 4
5 <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %> 5 <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %>
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 </div> 14 </div>
15 <div class="help-container"> 15 <div class="help-container">
16 <p> 16 <p>
17 - The same email address used to sign up. 17 + <%= t('.same_email') %>
18 </p> 18 </p>
19 </div> 19 </div>
20 </div> 20 </div>
@@ -22,8 +22,7 @@ @@ -22,8 +22,7 @@
22 </div> 22 </div>
23 23
24 <div class="row margin-left-none" style="margin-top: 20px"> 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 <%= render "devise/shared/links" %> 26 <%= render "devise/shared/links" %>
27 </div> 27 </div>
28 <% end %> 28 <% end %>
29 -  
app/views/devise/registrations/edit.html.erb
1 <div class="page-header"> 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 </div> 3 </div>
4 -  
5 <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put, :class => "form-inline" }) do |f| %> 4 <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put, :class => "form-inline" }) do |f| %>
6 <%= devise_error_messages! %> 5 <%= devise_error_messages! %>
7 6
@@ -10,39 +9,39 @@ @@ -10,39 +9,39 @@
10 <div class="form-row"> 9 <div class="form-row">
11 <div class="field-container"> 10 <div class="field-container">
12 <%= f.label :name, class: 'control-label' %><br /> 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 </div> 13 </div>
15 <div class="help-container"> 14 <div class="help-container">
16 <p> 15 <p>
17 - Your full name. 16 + <%= t('.your_full_name')%>
18 </p> 17 </p>
19 </div> 18 </div>
20 </div> 19 </div>
21 -  
22 <div class="form-row"> 20 <div class="form-row">
23 <div class="field-container"> 21 <div class="field-container">
24 <%= f.label :email, class: 'control-label' %><br /> 22 <%= f.label :email, class: 'control-label' %><br />
25 <%= f.email_field :email, class: 'text-field form-control' %> 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 </div> 29 </div>
31 <div class="help-container"> 30 <div class="help-container">
32 <p> 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 </p> 33 </p>
35 </div> 34 </div>
36 </div> 35 </div>
37 36
38 <div class="form-row"> 37 <div class="form-row">
39 <div class="field-container"> 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 <%= f.password_field :password, :autocomplete => "off", class: 'text-field form-control' %> 40 <%= f.password_field :password, :autocomplete => "off", class: 'text-field form-control' %>
42 </div> 41 </div>
43 <div class="help-container"> 42 <div class="help-container">
44 <p> 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 </p> 45 </p>
47 </div> 46 </div>
48 </div> 47 </div>
@@ -54,32 +53,33 @@ @@ -54,32 +53,33 @@
54 </div> 53 </div>
55 <div class="help-container"> 54 <div class="help-container">
56 <p> 55 <p>
57 - Confirm your password. 56 + <%= t('.confirm_your_password')%>
58 </p> 57 </p>
59 </div> 58 </div>
60 </div> 59 </div>
61 60
62 <div class="form-row"> 61 <div class="form-row">
63 <div class="field-container"> 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 <%= f.password_field :current_password, class: 'text-field form-control' %> 64 <%= f.password_field :current_password, class: 'text-field form-control' %>
66 </div> 65 </div>
67 <div class="help-container"> 66 <div class="help-container">
68 <p> 67 <p>
69 - Your current password is needed to confirm your changes. 68 + <%= t('.current_password_required')%>
70 </p> 69 </p>
71 </div> 70 </div>
72 </div> 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 </div> 77 </div>
79 <% end %> 78 <% end %>
80 79
81 <hr /> 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 <div class="page-header"> 1 <div class="page-header">
2 - <h1>Sign Up</h1> 2 + <h1><%= t('.sign_up', :default => "Sign up") %></h1>
3 </div> 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 <%= devise_error_messages! %> 6 <%= devise_error_messages! %>
7 7
8 <div class="row margin-left-none"> 8 <div class="row margin-left-none">
@@ -14,7 +14,7 @@ @@ -14,7 +14,7 @@
14 </div> 14 </div>
15 <div class="help-container"> 15 <div class="help-container">
16 <p> 16 <p>
17 - Your full name. 17 + <%= t('.your_full_name')%>
18 </p> 18 </p>
19 </div> 19 </div>
20 </div> 20 </div>
@@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
26 </div> 26 </div>
27 <div class="help-container"> 27 <div class="help-container">
28 <p> 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 </p> 30 </p>
31 </div> 31 </div>
32 </div> 32 </div>
@@ -38,7 +38,7 @@ @@ -38,7 +38,7 @@
38 </div> 38 </div>
39 <div class="help-container"> 39 <div class="help-container">
40 <p> 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 </p> 42 </p>
43 </div> 43 </div>
44 </div> 44 </div>
@@ -50,15 +50,14 @@ @@ -50,15 +50,14 @@
50 </div> 50 </div>
51 <div class="help-container"> 51 <div class="help-container">
52 <p> 52 <p>
53 - Confirm your password. 53 + <%= t('.confirm_your_password')%>
54 </p> 54 </p>
55 </div> 55 </div>
56 </div> 56 </div>
57 </div> 57 </div>
58 -  
59 - </div> <!--row--> 58 + </div>
60 59
61 <div class="row margin-left-none" style="margin-top: 20px"> 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 </div> 62 </div>
64 <% end %> 63 <% end %>
app/views/devise/sessions/new.html.erb
1 <div class="page-header"> 1 <div class="page-header">
2 - <h1>Login into Mezuro</h1> 2 + <h1><%= t('.sign_in', :default => "Sign in") %></h1>
3 </div> 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 <div class="row margin-left-none"> 6 <div class="row margin-left-none">
7 <div class="form-table col-md-9"> 7 <div class="form-table col-md-9">
8 <div class="form-row"> 8 <div class="form-row">
9 <div class="field-container"> 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 </div> 12 </div>
13 <div class="help-container"> 13 <div class="help-container">
14 <p> 14 <p>
15 - The same email address used to sign up. 15 + <%= t('.same_email') %>
16 </p> 16 </p>
17 </div> 17 </div>
18 </div> 18 </div>
19 - </div>  
20 - </div>  
21 19
22 - <div class="row margin-left-none">  
23 - <div class="form-table col-md-9">  
24 <div class="form-row"> 20 <div class="form-row">
25 <div class="field-container"> 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 </div> 24 </div>
29 <div class="help-container"> 25 <div class="help-container">
30 <p> 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 </p> 28 </p>
33 </div> 29 </div>
34 </div> 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 <label> 35 <label>
45 <%= f.check_box :remember_me, class: "checkbox" %> <%= f.label :remember_me %> 36 <%= f.check_box :remember_me, class: "checkbox" %> <%= f.label :remember_me %>
46 </label> 37 </label>
47 </div> 38 </div>
  39 + <div class="help-container">
  40 + <p>
  41 + <%= t('.stay_logged_in')%>
  42 + </p>
  43 + </div>
48 </div> 44 </div>
49 - <div class="help-container">  
50 - <p>  
51 - Stay logged in.  
52 - </p>  
53 - </div>  
54 - </div> 45 + <% end -%>
55 </div> 46 </div>
56 </div> 47 </div>
57 - <% end -%>  
58 48
59 <div class="row margin-left-none" style="margin-top: 20px"> 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 <%= render "devise/shared/links" %> 51 <%= render "devise/shared/links" %>
62 </div> 52 </div>
63 <% end %> 53 <% end %>
app/views/devise/shared/_links.erb
1 <%- if controller_name != 'sessions' %> 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 <% end -%> 3 <% end -%>
4 4
5 <%- if devise_mapping.registerable? && controller_name != 'registrations' %> 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 <% end -%> 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 <% end -%> --> 11 <% end -%> -->
12 12
13 <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %> 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 <% end -%> 15 <% end -%>
16 16
17 <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %> 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 <% end -%> 19 <% end -%>
20 20
21 <%- if devise_mapping.omniauthable? %> 21 <%- if devise_mapping.omniauthable? %>
22 <%- resource_class.omniauth_providers.each do |provider| %> 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 <% end -%> 24 <% end -%>
25 -<% end -%> 25 -<% end -%>
  26 +<% end -%>
26 \ No newline at end of file 27 \ No newline at end of file
app/views/devise/unlocks/new.html.erb
1 <div class="page-header"> 1 <div class="page-header">
2 - <h1>Resend unlock instructions</h1> 2 + <h2><%= t('.resend_unlock_instructions', :default => "Resend unlock instructions") %></h2>
3 </div> 3 </div>
4 4
5 <%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %> 5 <%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %>
@@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
8 <div><%= f.label :email %><br /> 8 <div><%= f.label :email %><br />
9 <%= f.email_field :email, :autofocus => true %></div> 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 <% end %> 12 <% end %>
13 13
14 <%= render "devise/shared/links" %> 14 <%= render "devise/shared/links" %>
app/views/home/index.html.erb
1 <div class="jumbotron"> 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 </div> 9 </div>
10 10
11 -<h2>Latest projects</h2> 11 +<h2><%= t('latest_projects') %></h2>
12 12
13 <ul> 13 <ul>
14 <% cache do %> 14 <% cache do %>
app/views/kalibro_configurations/_form.html.erb
@@ -22,8 +22,8 @@ @@ -22,8 +22,8 @@
22 </div> 22 </div>
23 23
24 <div class="row margin-left-none" style="margin-top: 20px"> 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 </div> 27 </div>
28 28
29 <% end %> 29 <% end %>
app/views/kalibro_configurations/_kalibro_configuration.html.erb
1 <tr> 1 <tr>
2 <td><%= kalibro_configuration.name %></td> 2 <td><%= kalibro_configuration.name %></td>
3 <td><%= kalibro_configuration.description %></td> 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 <td> 5 <td>
6 <% if kalibro_configuration_owner?(kalibro_configuration.id) %> 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 <% end %> 8 <% end %>
9 </td> 9 </td>
10 </tr> 10 </tr>
11 \ No newline at end of file 11 \ No newline at end of file
app/views/kalibro_configurations/_list.html.erb
1 <table class="table table-hover"> 1 <table class="table table-hover">
2 <thead> 2 <thead>
3 <tr> 3 <tr>
4 - <th>Name</th>  
5 - <th>Description</th> 4 + <th><%= t('name') %></th>
  5 + <th><%= t('description') %></th>
6 <th colspan="2"></th> 6 <th colspan="2"></th>
7 </tr> 7 </tr>
8 </thead> 8 </thead>
app/views/kalibro_configurations/_metric_configurations.html.erb
@@ -10,10 +10,9 @@ @@ -10,10 +10,9 @@
10 <%= link_to_edit_form(metric_configuration, @kalibro_configuration.id) %> 10 <%= link_to_edit_form(metric_configuration, @kalibro_configuration.id) %>
11 </td> 11 </td>
12 <td> 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 class: 'btn btn-danger' %> 15 class: 'btn btn-danger' %>
16 </td> 16 </td>
17 - </td>  
18 - <% end %> 17 + <% end %>
19 </tr> 18 </tr>
app/views/kalibro_configurations/_no_metric_configurations.html.erb
1 <tr> 1 <tr>
2 <% col_number = kalibro_configuration_owner?(@kalibro_configuration.id) ? 5 : 3 %> 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 </tr> 4 </tr>
5 \ No newline at end of file 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 <%= render 'form' %> 3 <%= render 'form' %>
app/views/kalibro_configurations/index.html.erb
1 <div class="page-header"> 1 <div class="page-header">
2 - <h1>Configurations</h1> 2 + <h1><%= KalibroConfiguration.model_name.human(count: 2) %></h1>
3 </div> 3 </div>
4 4
5 <% if user_signed_in? %> 5 <% if user_signed_in? %>
6 <p> 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 </p> 8 </p>
9 <%else%> 9 <%else%>
10 <p class="alert alert-warning alert-dismissable"> 10 <p class="alert alert-warning alert-dismissable">
11 <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button> 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 </p> 13 </p>
14 <% end %> 14 <% end %>
15 15
16 -<%= render partial: 'list', locals: {configurations: @configurations} %>  
17 \ No newline at end of file 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 <%= render 'form' %> 3 <%= render 'form' %>
app/views/kalibro_configurations/show.html.erb
@@ -3,23 +3,23 @@ @@ -3,23 +3,23 @@
3 </div> 3 </div>
4 4
5 <p> 5 <p>
6 - <strong>Description:</strong> 6 + <strong><%= t('description') %>:</strong>
7 <%= @kalibro_configuration.description %> 7 <%= @kalibro_configuration.description %>
8 </p> 8 </p>
9 9
10 <hr> 10 <hr>
11 -  
12 -<h2> Metrics </h2> 11 +<div id="metrics">
  12 +<h2><%= t('metric').pluralize %></h2>
13 <% if kalibro_configuration_owner? @kalibro_configuration.id %> 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 <% end %> 15 <% end %>
16 16
17 <table class="table table-hover"> 17 <table class="table table-hover">
18 <thead> 18 <thead>
19 <tr> 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 <th colspan="3"></th> 23 <th colspan="3"></th>
24 </tr> 24 </tr>
25 </thead> 25 </thead>
@@ -31,12 +31,13 @@ @@ -31,12 +31,13 @@
31 <% end %> 31 <% end %>
32 </tbody> 32 </tbody>
33 </table> 33 </table>
  34 +</div>
34 35
35 <hr> 36 <hr>
36 37
37 <p> 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 <% if kalibro_configuration_owner? @kalibro_configuration.id %> 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 <% end %> 42 <% end %>
42 </p> 43 </p>
app/views/kalibro_ranges/_form.html.erb
@@ -8,12 +8,16 @@ @@ -8,12 +8,16 @@
8 <%= render partial: 'no_readings' %> 8 <%= render partial: 'no_readings' %>
9 <% else %> 9 <% else %>
10 <div class="field-container"> 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 <%= f.select( :reading_id, readings_options(@readings), {class: 'form-control'} ) %> 12 <%= f.select( :reading_id, readings_options(@readings), {class: 'form-control'} ) %>
13 </div> 13 </div>
14 <div class="help-container"> 14 <div class="help-container">
15 <p> 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 </p> 21 </p>
18 </div> 22 </div>
19 <% end %> 23 <% end %>
@@ -32,7 +36,7 @@ @@ -32,7 +36,7 @@
32 36
33 <div class="help-container"> 37 <div class="help-container">
34 <p> 38 <p>
35 - This Range's lower limit. 39 + <%= t_hint('beginning', 'kalibro_range') %>
36 </p> 40 </p>
37 </div> 41 </div>
38 </div> 42 </div>
@@ -49,7 +53,7 @@ @@ -49,7 +53,7 @@
49 </div> 53 </div>
50 <div class="help-container"> 54 <div class="help-container">
51 <p> 55 <p>
52 - This Range's upper limit. 56 + <%= t_hint('end', 'kalibro_range') %>
53 </p> 57 </p>
54 </div> 58 </div>
55 </div> 59 </div>
@@ -61,7 +65,7 @@ @@ -61,7 +65,7 @@
61 </div> 65 </div>
62 <div class="help-container"> 66 <div class="help-container">
63 <p> 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 </p> 69 </p>
66 </div> 70 </div>
67 </div> 71 </div>
@@ -69,6 +73,6 @@ @@ -69,6 +73,6 @@
69 </div> 73 </div>
70 74
71 <div class="row margin-left-none" style="margin-top: 20px"> 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 </div> 78 </div>
app/views/kalibro_ranges/_no_readings.html.erb
1 <div class="alert alert-error alert-dismissable"> 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 </div> 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 <%= form_for(@kalibro_range, :url => kalibro_configuration_metric_configuration_kalibro_range_update_url( 3 <%= form_for(@kalibro_range, :url => kalibro_configuration_metric_configuration_kalibro_range_update_url(
4 @kalibro_configuration_id, @metric_configuration_id, @kalibro_range.id), method: :put) do |f| %> 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 <%= form_for(@kalibro_range, :url => kalibro_configuration_metric_configuration_kalibro_ranges_path( 3 <%= form_for(@kalibro_range, :url => kalibro_configuration_metric_configuration_kalibro_ranges_path(
4 @kalibro_configuration_id, @metric_configuration_id)) do |f| %> 4 @kalibro_configuration_id, @metric_configuration_id)) do |f| %>
app/views/layouts/application.html.erb
@@ -58,19 +58,30 @@ @@ -58,19 +58,30 @@
58 </div> 58 </div>
59 <div class="collapse navbar-collapse" id="nav-collapse"> 59 <div class="collapse navbar-collapse" id="nav-collapse">
60 <ul class="nav navbar-nav"> 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 </ul> 65 </ul>
66 - <ul class="nav navbar-nav" style="float: right;"> 66 + <ul class="nav navbar-nav navbar-right">
67 <% if user_signed_in? %> 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 <% else %> 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 <% end %> 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 </ul> 85 </ul>
75 </div><!--/.nav-collapse --> 86 </div><!--/.nav-collapse -->
76 </div> 87 </div>
@@ -83,13 +94,13 @@ @@ -83,13 +94,13 @@
83 <div class="well sidebar-nav"> 94 <div class="well sidebar-nav">
84 <ul class="list-group"> 95 <ul class="list-group">
85 <% if user_signed_in? %> 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 <% end %> 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 <% if content_for?(:sidebar) %> 104 <% if content_for?(:sidebar) %>
94 <%= yield :sidebar %> 105 <%= yield :sidebar %>
95 <% else %> 106 <% else %>
@@ -99,7 +110,7 @@ @@ -99,7 +110,7 @@
99 </div><!--/.well --> 110 </div><!--/.well -->
100 </div><!--/col-sm-3 col-md-3--> 111 </div><!--/col-sm-3 col-md-3-->
101 <div class="col-sm-9 col-md-9"> 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 <%= bootstrap_flash %> 115 <%= bootstrap_flash %>
105 <%= yield %> 116 <%= yield %>
@@ -107,10 +118,20 @@ @@ -107,10 +118,20 @@
107 </div><!--/row--> 118 </div><!--/row-->
108 119
109 <footer> 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 <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> 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 </footer> 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 </div> <!-- /container --> 135 </div> <!-- /container -->
115 136
116 </body> 137 </body>
app/views/metric_configurations/_form.html.erb
@@ -10,19 +10,19 @@ @@ -10,19 +10,19 @@
10 </div> 10 </div>
11 <div class="help-container"> 11 <div class="help-container">
12 <p> 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 </p> 14 </p>
15 </div> 15 </div>
16 </div> 16 </div>
17 17
18 <div class="form-row"> 18 <div class="form-row">
19 <div class="field-container"> 19 <div class="field-container">
20 - <%= f.label :aggregation_form, 'Aggregation Form', class: 'control-label' %> 20 + <%= f.label :aggregation_form, class: 'control-label' %>
21 <%= f.select( :aggregation_form, aggregation_options, {class: 'form-control'} ) %> 21 <%= f.select( :aggregation_form, aggregation_options, {class: 'form-control'} ) %>
22 </div> 22 </div>
23 <div class="help-container"> 23 <div class="help-container">
24 <p> 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 </p> 26 </p>
27 </div> 27 </div>
28 </div> 28 </div>
@@ -33,12 +33,12 @@ @@ -33,12 +33,12 @@
33 <% else %> 33 <% else %>
34 <div class="form-row"> 34 <div class="form-row">
35 <div class="field-container"> 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 <%= f.select( :reading_group_id, reading_group_options, {class: 'form-control'} ) %> 37 <%= f.select( :reading_group_id, reading_group_options, {class: 'form-control'} ) %>
38 </div> 38 </div>
39 <div class="help-container"> 39 <div class="help-container">
40 <p> 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 </p> 42 </p>
43 </div> 43 </div>
44 </div> 44 </div>
app/views/metric_configurations/_no_ranges.html.erb
1 <tr> 1 <tr>
2 <!-- TODO: expand this columns when the user owns the metric configurations and can edit or delete this range --> 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 \ No newline at end of file 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,10 +9,10 @@
9 <td><%= kalibro_range.end %></td> 9 <td><%= kalibro_range.end %></td>
10 <td> 10 <td>
11 <% if kalibro_configuration_owner? @metric_configuration.kalibro_configuration_id %> 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 @metric_configuration.kalibro_configuration_id, @metric_configuration.id, kalibro_range.id), class: 'btn btn-info' %> 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 class: 'btn btn-danger' %> 16 class: 'btn btn-danger' %>
17 <% end %> 17 <% end %>
18 </td> 18 </td>
app/views/metric_configurations/choose_metric.html.erb
1 <div class="page-header"> 1 <div class="page-header">
2 - <h1>Choose a metric from a Base Tool:</h1> 2 + <h1><%= t('choose_metric') %></h1>
3 </div> 3 </div>
4 4
5 <%= form_tag kalibro_configuration_new_metric_configuration_path(@kalibro_configuration.id) do %> 5 <%= form_tag kalibro_configuration_new_metric_configuration_path(@kalibro_configuration.id) do %>
@@ -18,8 +18,8 @@ @@ -18,8 +18,8 @@
18 <% end %> 18 <% end %>
19 </div><br /> 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 <script type="text/javascript"> 25 <script type="text/javascript">
app/views/metric_configurations/edit.html.erb
1 <div class="page-header"> 1 <div class="page-header">
2 - <h1>Editing Metric Configuration</h1> 2 + <h1><%= t('editing_metric_configuration') %></h1>
3 </div> 3 </div>
4 4
5 <%= form_for(@metric_configuration, :url => kalibro_configuration_metric_configuration_update_url(@kalibro_configuration_id, @metric_configuration.id), method: :put) do |f| %> 5 <%= form_for(@metric_configuration, :url => kalibro_configuration_metric_configuration_update_url(@kalibro_configuration_id, @metric_configuration.id), method: :put) do |f| %>
6 <%= render partial: 'form', locals: {f: f} %> 6 <%= render partial: 'form', locals: {f: f} %>
7 <div class="row margin-left-none" style="margin-top: 20px"> 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 </div> 10 </div>
11 <% end %> 11 <% end %>
app/views/metric_configurations/new.html.erb
1 <div class="page-header"> 1 <div class="page-header">
2 - <h1>New Metric Configuration</h1> 2 + <h1><%= t('new_metric_configurations') %></h1>
3 </div> 3 </div>
4 4
5 <p> 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 </p> 7 </p>
8 8
9 <p> 9 <p>
10 - <b>Metric Name:</b> <%= @metric_configuration.metric.name %> 10 + <b><%= t('metric') %>:</b> <%= @metric_configuration.metric.name %>
11 </p> 11 </p>
12 12
13 <p> 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 </p> 15 </p>
16 16
17 <p> 17 <p>
18 - <b>Language:</b> <%= @metric_configuration.metric.languages.to_s %> 18 + <b><%= t('language') %>:</b> <%= @metric_configuration.metric.languages.to_s %>
19 </p> 19 </p>
20 20
21 <p> 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 </p> 23 </p>
24 24
25 <br> 25 <br>
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 <%= form_for(@metric_configuration, :url => kalibro_configuration_metric_configurations_path(@kalibro_configuration_id)) do |f| %> 27 <%= form_for(@metric_configuration, :url => kalibro_configuration_metric_configurations_path(@kalibro_configuration_id)) do |f| %>
28 <%= render partial: 'form', locals: {f: f} %> 28 <%= render partial: 'form', locals: {f: f} %>
29 <div class="row margin-left-none" style="margin-top: 20px"> 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 </div> 32 </div>
33 <% end %> 33 <% end %>
app/views/metric_configurations/show.html.erb
@@ -3,44 +3,47 @@ @@ -3,44 +3,47 @@
3 </div> 3 </div>
4 4
5 <p> 5 <p>
6 - <strong>Base Tool Name:</strong> 6 + <strong><%= t('metric_base_tool_name') %>:</strong>
7 <%= @metric_configuration.metric.metric_collector_name %> 7 <%= @metric_configuration.metric.metric_collector_name %>
8 </p> 8 </p>
9 9
10 <p> 10 <p>
11 - <strong>Code:</strong> 11 + <strong><%= t('code') %>:</strong>
12 <%= @metric_configuration.metric.code %> 12 <%= @metric_configuration.metric.code %>
13 </p> 13 </p>
14 14
15 <p> 15 <p>
16 - <strong>Weight:</strong> 16 + <strong><%= t('weight') %>:</strong>
17 <%= @metric_configuration.weight %> 17 <%= @metric_configuration.weight %>
18 </p> 18 </p>
19 19
20 <p> 20 <p>
21 - <strong>Language:</strong> 21 + <strong><%= t('language') %>:</strong>
22 <%= @metric_configuration.metric.languages %> 22 <%= @metric_configuration.metric.languages %>
23 </p> 23 </p>
24 24
25 <p> 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 </p> 28 </p>
29 29
30 <p> 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 </p> 36 </p>
34 37
35 <p> 38 <p>
36 - <strong>Reading Group Name:</strong> 39 + <strong><%= t('reading_group_name') %>:</strong>
37 <%= @reading_group.name %> 40 <%= @reading_group.name %>
38 </p> 41 </p>
39 42
40 <p> 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 <% else %> 47 <% else %>
45 <%= @metric_configuration.metric.description %> 48 <%= @metric_configuration.metric.description %>
46 <% end %> 49 <% end %>
@@ -48,18 +51,18 @@ @@ -48,18 +51,18 @@
48 </p> 51 </p>
49 <hr> 52 <hr>
50 53
51 -<h2> Ranges </h2> 54 +<h2><%= KalibroRange.model_name.human(count: 2) %></h2>
52 <% if kalibro_configuration_owner? @metric_configuration.kalibro_configuration_id %> 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 @metric_configuration.id), class: 'btn btn-info' %> 57 @metric_configuration.id), class: 'btn btn-info' %>
55 <% end %> 58 <% end %>
56 59
57 <table class="table table-hover"> 60 <table class="table table-hover">
58 <thead> 61 <thead>
59 <tr> 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 </tr> 66 </tr>
64 </thead> 67 </thead>
65 <tbody> 68 <tbody>
@@ -72,10 +75,10 @@ @@ -72,10 +75,10 @@
72 </table> 75 </table>
73 76
74 <p> 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 <% if kalibro_configuration_owner? @metric_configuration.kalibro_configuration_id %> 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 class: 'btn btn-danger' %> 82 class: 'btn btn-danger' %>
80 <% end %> 83 <% end %>
81 </p> 84 </p>
app/views/modules/_metric_result.html.erb
@@ -15,9 +15,9 @@ @@ -15,9 +15,9 @@
15 </tr> 15 </tr>
16 <tr id="container<%= metric_result.id %>" style="display: none"> 16 <tr id="container<%= metric_result.id %>" style="display: none">
17 <td colspan="4"> 17 <td colspan="4">
18 - <span id="loader_container<%= metric_result.id %>"><%= image_tag 'loader.gif' %> Loading data. Please, wait.</span> 18 + <span id="loader_container<%= metric_result.id %>"><%= image_tag 'loader.gif' %> <%= t('loading_data') %></span>
19 <canvas id="container<%= metric_result.id %>" class="graphic_container" style="display: none"></canvas> 19 <canvas id="container<%= metric_result.id %>" class="graphic_container" style="display: none"></canvas>
20 - <span id="container<%= metric_result.id %>" style="display: none">There is only one point and it will not be printed into a chart.</span> 20 + <span id="container<%= metric_result.id %>" style="display: none"><%= t('only_point_printed_chart') %></span>
21 </td> 21 </td>
22 </tr> 22 </tr>
23 <% end %> 23 <% end %>
app/views/modules/_metric_results.html.erb
1 <table class="table table-hover"> 1 <table class="table table-hover">
2 <thead> 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 </thead> 7 </thead>
8 8
9 <tbody> 9 <tbody>
@@ -11,4 +11,4 @@ @@ -11,4 +11,4 @@
11 <%= render partial: 'metric_result', collection: @root_module_result.metric_results, locals: {module_result: @root_module_result} %> 11 <%= render partial: 'metric_result', collection: @root_module_result.metric_results, locals: {module_result: @root_module_result} %>
12 <% end %> 12 <% end %>
13 </tbody> 13 </tbody>
14 -</table>  
15 \ No newline at end of file 14 \ No newline at end of file
  15 +</table>
app/views/modules/_module_result.html.erb
@@ -5,7 +5,7 @@ @@ -5,7 +5,7 @@
5 <% else %> 5 <% else %>
6 <i class="icon-file"></i> 6 <i class="icon-file"></i>
7 <% end %> 7 <% end %>
8 - <%= link_to format_module_name(module_result.kalibro_module.name), "#module_#{module_result.id}", onClick: "Module.Tree.load('#{escape_javascript(image_tag 'loader.gif')} Loading data. Please, wait.', #{module_result.id});" %> 8 + <%= link_to format_module_name(module_result.kalibro_module.name), "#module_#{module_result.id}", onClick: "Module.Tree.load('#{escape_javascript(image_tag 'loader.gif')} #{escape_javascript(t('loading_data'))}', #{module_result.id});" %>
9 </td> 9 </td>
10 <td><%= module_result.kalibro_module.granularity %></td> 10 <td><%= module_result.kalibro_module.granularity %></td>
11 <td><%= format_grade(module_result.grade) %></td> 11 <td><%= format_grade(module_result.grade) %></td>
app/views/modules/_module_tree.html.erb
1 <p> 1 <p>
2 - <strong>Name:</strong> 2 + <strong><%= KalibroModule.human_attribute_name('name') %>:</strong>
3 <%= format_module_name(@root_module_result.kalibro_module.name) %> 3 <%= format_module_name(@root_module_result.kalibro_module.name) %>
4 </p> 4 </p>
5 <p> 5 <p>
6 - <strong>Granularity:</strong> 6 + <strong><%= KalibroModule.human_attribute_name('granularity') %>:</strong>
7 <%= @root_module_result.kalibro_module.granularity %> 7 <%= @root_module_result.kalibro_module.granularity %>
8 </p> 8 </p>
9 <p> 9 <p>
10 - <strong>Grade:</strong> 10 + <strong><%= KalibroModule.human_attribute_name('grade') %>:</strong>
11 <%= format_grade(@root_module_result.grade) %> 11 <%= format_grade(@root_module_result.grade) %>
12 </p> 12 </p>
13 <% unless @root_module_result.parent_id.nil? %> 13 <% unless @root_module_result.parent_id.nil? %>
14 - <p id="parent"><i class="icon-arrow-up"></i><%= link_to '../', '#parent', onClick: "Module.Tree.load('#{escape_javascript(image_tag 'loader.gif')} Loading data. Please, wait.', #{@root_module_result.parent_id});" %></p> 14 + <p id="parent"><i class="icon-arrow-up"></i><%= link_to '../', '#parent', onClick: "Module.Tree.load('#{escape_javascript(image_tag 'loader.gif')} #{escape_javascript(t('loading_data'))}', #{@root_module_result.parent_id});" %></p>
15 <% end %> 15 <% end %>
16 16
17 <% cache("#{@root_module_result.id}_tree") do %> 17 <% cache("#{@root_module_result.id}_tree") do %>
@@ -19,9 +19,9 @@ @@ -19,9 +19,9 @@
19 <% unless children.empty? %> 19 <% unless children.empty? %>
20 <table class="table table-hover"> 20 <table class="table table-hover">
21 <thead> 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 </thead> 25 </thead>
26 <tbody> 26 <tbody>
27 <%= render partial: 'module_result', collection: children %> 27 <%= render partial: 'module_result', collection: children %>
app/views/projects/_form.html.erb
@@ -16,14 +16,14 @@ @@ -16,14 +16,14 @@
16 </div> 16 </div>
17 <div class="form-row"> 17 <div class="form-row">
18 <div class="field-container"> 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 <%= f.text_field :image_url, class: 'text-area', value: @project.attributes.nil? || @project.attributes.image_url.nil? ? '#' : @project.attributes.image_url %> 20 <%= f.text_field :image_url, class: 'text-area', value: @project.attributes.nil? || @project.attributes.image_url.nil? ? '#' : @project.attributes.image_url %>
21 </div> 21 </div>
22 </div> 22 </div>
23 </div> 23 </div>
24 </div> 24 </div>
25 <div class="row margin-left-none" style="margin-top: 20px"> 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 </div> 28 </div>
29 <% end %> 29 <% end %>
app/views/projects/edit.html.erb
1 <div class="page-header"> 1 <div class="page-header">
2 - <h1>Edit Project</h1> 2 + <h1><%= t("edit_project") %></h1>
3 </div> 3 </div>
4 4
5 <%= render 'form' %> 5 <%= render 'form' %>
app/views/projects/index.html.erb
1 <div class="page-header"> 1 <div class="page-header">
2 - <h1>Projects</h1> 2 + <h1><%= "#{Project.model_name.human(count: 2)}" %></h1>
3 </div> 3 </div>
4 4
5 <% if user_signed_in? %> 5 <% if user_signed_in? %>
6 <p> 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 </p> 8 </p>
9 <%else%> 9 <%else%>
10 <p class="alert alert-warning alert-dismissable"> 10 <p class="alert alert-warning alert-dismissable">
11 <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button> 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 </p> 13 </p>
14 <% end %> 14 <% end %>
15 15
16 -<%= render partial: 'shared/project_list', locals: {projects: @projects} %>  
17 \ No newline at end of file 16 \ No newline at end of file
  17 +<%= render partial: 'shared/project_list', locals: {projects: @projects} %>
app/views/projects/new.html.erb
1 <div class="page-header"> 1 <div class="page-header">
2 - <h1>New Project</h1> 2 + <h1><%= t('create', model: Project.model_name.human) %></h1>
3 </div> 3 </div>
4 4
5 <%= render 'form' %> 5 <%= render 'form' %>
app/views/projects/show.html.erb
1 -  
2 <div class="page-header"> 1 <div class="page-header">
3 <div class="row"> 2 <div class="row">
4 <div class="col-md-2"> 3 <div class="col-md-2">
@@ -6,7 +5,7 @@ @@ -6,7 +5,7 @@
6 <%= image_tag "#{@project_image.url}", size:"128x128" %> 5 <%= image_tag "#{@project_image.url}", size:"128x128" %>
7 <% else %> 6 <% else %>
8 <center><i class="fa fa-file-image-o fa-5x"></i></center><br /> 7 <center><i class="fa fa-file-image-o fa-5x"></i></center><br />
9 - No image available 8 + <%= t("no_image_available") %>
10 <% end %> 9 <% end %>
11 </div> 10 </div>
12 <div class="col-md-10"> 11 <div class="col-md-10">
@@ -16,22 +15,22 @@ @@ -16,22 +15,22 @@
16 </div> 15 </div>
17 16
18 <p> 17 <p>
19 - <strong>Description:</strong> 18 + <strong> <%= t("description") %>:</strong>
20 <%= @project.description %> 19 <%= @project.description %>
21 </p> 20 </p>
22 21
23 <hr /> 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 <table class="table table-hover"> 28 <table class="table table-hover">
30 <thead> 29 <thead>
31 <tr> 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 <th colspan="2"></th> 34 <th colspan="2"></th>
36 </tr> 35 </tr>
37 </thead> 36 </thead>
@@ -40,7 +39,7 @@ @@ -40,7 +39,7 @@
40 <% if @project_repositories.size == 0 %> 39 <% if @project_repositories.size == 0 %>
41 <tr> 40 <tr>
42 <% col_number = project_owner?(@project.id) ? 4 : 3 %> 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 </tr> 43 </tr>
45 <% end %> 44 <% end %>
46 <% @project_repositories.each do |repository| %> 45 <% @project_repositories.each do |repository| %>
@@ -50,11 +49,11 @@ @@ -50,11 +49,11 @@
50 <td><%= repository.address %></td> 49 <td><%= repository.address %></td>
51 <td> 50 <td>
52 <% if project_owner? @project.id %> 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 <% end %> 53 <% end %>
55 </td> 54 </td>
56 <td> 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 </td> 57 </td>
59 </tr> 58 </tr>
60 <% end %> 59 <% end %>
@@ -65,6 +64,6 @@ @@ -65,6 +64,6 @@
65 64
66 <p> 65 <p>
67 <% if project_owner? @project.id %> 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 <% end %> 68 <% end %>
70 </p> 69 </p>
app/views/reading_groups/_form.html.erb
@@ -21,7 +21,7 @@ @@ -21,7 +21,7 @@
21 </div> 21 </div>
22 22
23 <div class="row margin-left-none" style="margin-top: 20px"> 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 </div> 26 </div>
27 <% end %> 27 <% end %>
app/views/reading_groups/_no_readings.html.erb
1 <tr> 1 <tr>
2 <% col_number = reading_groups_owner?(@reading_group.id) ? 5 : 3 %> 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 </tr> 4 </tr>
5 \ No newline at end of file 5 \ No newline at end of file
app/views/reading_groups/_reading.html.erb
@@ -4,10 +4,10 @@ @@ -4,10 +4,10 @@
4 <td style="background-color: #<%= reading.color %>; width: 20%;">&nbsp;</td> 4 <td style="background-color: #<%= reading.color %>; width: 20%;">&nbsp;</td>
5 <% if reading_groups_owner? @reading_group.id %> 5 <% if reading_groups_owner? @reading_group.id %>
6 <td> 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 </td> 8 </td>
9 <td> 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 </td> 11 </td>
12 </td> 12 </td>
13 <% end %> 13 <% end %>
app/views/reading_groups/edit.html.erb
1 <div class="page-header"> 1 <div class="page-header">
2 - <h1>Edit Reading Group</h1> 2 + <h1><%= t('edit', model: ReadingGroup.model_name.human) %></h1>
3 </div> 3 </div>
4 4
5 <%= render 'form' %> 5 <%= render 'form' %>
6 \ No newline at end of file 6 \ No newline at end of file
app/views/reading_groups/index.html.erb
1 <div class="page-header"> 1 <div class="page-header">
2 - <h1>Reading Groups</h1> 2 + <h1><%= ReadingGroup.model_name.human(count: 2) %></h1>
3 </div> 3 </div>
4 4
5 <% if user_signed_in? %> 5 <% if user_signed_in? %>
6 <p> 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 </p> 8 </p>
9 <%else%> 9 <%else%>
10 <p class="alert alert-warning alert-dismissable"> 10 <p class="alert alert-warning alert-dismissable">
11 <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button> 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 </p> 13 </p>
14 <% end %> 14 <% end %>
15 15
app/views/reading_groups/new.html.erb
1 <div class="page-header"> 1 <div class="page-header">
2 - <h1>New Reading Group</h1> 2 + <h1><%= "#{t('new.male')} #{ReadingGroup.model_name.human}" %></h1>
3 </div> 3 </div>
4 4
5 <%= render 'form' %> 5 <%= render 'form' %>
app/views/reading_groups/show.html.erb
@@ -3,22 +3,22 @@ @@ -3,22 +3,22 @@
3 </div> 3 </div>
4 4
5 <p> 5 <p>
6 - <strong>Description:</strong> 6 + <strong><%= ReadingGroup.human_attribute_name('description') %></strong>
7 <%= @reading_group.description %> 7 <%= @reading_group.description %>
8 </p> 8 </p>
9 9
10 <hr /> 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 <table class="table table-hover"> 16 <table class="table table-hover">
17 <thead> 17 <thead>
18 <tr> 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 </tr> 22 </tr>
23 </thead> 23 </thead>
24 24
@@ -36,6 +36,6 @@ @@ -36,6 +36,6 @@
36 36
37 <p> 37 <p>
38 <% if reading_groups_owner? @reading_group.id %> 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 <% end %> 40 <% end %>
41 </p> 41 </p>
app/views/readings/_form.html.erb
@@ -10,10 +10,10 @@ @@ -10,10 +10,10 @@
10 </div> 10 </div>
11 <div class="help-container"> 11 <div class="help-container">
12 <p> 12 <p>
13 - It is a verbal concise form of highlighting the content of an interpretation. 13 + <%= t('activemodel.hints.reading.label') %>
14 </p> 14 </p>
15 <p> 15 <p>
16 - Example values: terrible, bad, regular, good, great etc. 16 + <%= t('activemodel.hints.reading.label_example') %>
17 </p> 17 </p>
18 </div> 18 </div>
19 </div> 19 </div>
@@ -30,10 +30,10 @@ @@ -30,10 +30,10 @@
30 </div> 30 </div>
31 <div class="help-container"> 31 <div class="help-container">
32 <p> 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 </p> 34 </p>
35 <p> 35 <p>
36 - Example values: 000000, 00ff00 etc 36 + <%= t('activemodel.hints.reading.color_example') %>
37 </p> 37 </p>
38 </div> 38 </div>
39 </div> 39 </div>
@@ -45,7 +45,7 @@ @@ -45,7 +45,7 @@
45 </div> 45 </div>
46 <div class="help-container"> 46 <div class="help-container">
47 <p> 47 <p>
48 - A number to classify this reading. 48 + <%= t('activemodel.hints.reading.grade') %>
49 </p> 49 </p>
50 </div> 50 </div>
51 </div> 51 </div>
@@ -53,13 +53,13 @@ @@ -53,13 +53,13 @@
53 </div> 53 </div>
54 54
55 <div class="row margin-left-none" style="margin-top: 20px"> 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 <% if @reading.persisted? %> 57 <% if @reading.persisted? %>
58 <%= f.hidden_field(:reading_group_id, value: @reading.reading_group_id) %> 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 <% else %> 60 <% else %>
61 <%= f.hidden_field(:reading_group_id, value: @reading_group_id) %> 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 <% end %> 63 <% end %>
64 </div> 64 </div>
65 65
app/views/readings/edit.html.erb
1 <div class="page-header"> 1 <div class="page-header">
2 - <h1>Editing Reading</h1> 2 + <h1><%= t('edit', model: Reading.model_name.human) %></h1>
3 </div> 3 </div>
4 4
5 <%= form_for(@reading, :url => reading_group_reading_update_path(@reading.reading_group_id, @reading.id), method: :put) do |f| %> 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 <div class="page-header"> 1 <div class="page-header">
2 - <h1>New Reading</h1> 2 + <h1><%= "#{t('new.female')} #{Reading.model_name.human}" %></h1>
3 </div> 3 </div>
4 4
5 <%= form_for(@reading, :url => reading_group_readings_path(@reading_group_id)) do |f| %> 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,7 +11,7 @@
11 </div> 11 </div>
12 <div class="help-container"> 12 <div class="help-container">
13 <p> 13 <p>
14 - The name of your Repository. 14 + <%= t('activemodel.hints.repository.name') %>
15 </p> 15 </p>
16 </div> 16 </div>
17 </div> 17 </div>
@@ -23,7 +23,7 @@ @@ -23,7 +23,7 @@
23 </div> 23 </div>
24 <div class="help-container"> 24 <div class="help-container">
25 <p> 25 <p>
26 - A short description of your Repository. 26 + <%= t('activemodel.hints.repository.description') %>
27 </p> 27 </p>
28 </div> 28 </div>
29 </div> 29 </div>
@@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
35 </div> 35 </div>
36 <div class="help-container"> 36 <div class="help-container">
37 <p> 37 <p>
38 - The source code's license. 38 + <%= t('activemodel.hints.repository.license') %>
39 </p> 39 </p>
40 </div> 40 </div>
41 </div> 41 </div>
@@ -47,7 +47,7 @@ @@ -47,7 +47,7 @@
47 </div> 47 </div>
48 <div class="help-container"> 48 <div class="help-container">
49 <p> 49 <p>
50 - The version control system the Repository uses. 50 + <%= t('activemodel.hints.repository.scm_type') %>
51 </p> 51 </p>
52 </div> 52 </div>
53 </div> 53 </div>
@@ -59,7 +59,7 @@ @@ -59,7 +59,7 @@
59 </div> 59 </div>
60 <div class="help-container"> 60 <div class="help-container">
61 <p> 61 <p>
62 - The URL where the Repository is located. 62 + <%= t('activemodel.hints.repository.address') %>
63 </p> 63 </p>
64 </div> 64 </div>
65 </div> 65 </div>
@@ -71,20 +71,20 @@ @@ -71,20 +71,20 @@
71 </div> 71 </div>
72 <div class="help-container"> 72 <div class="help-container">
73 <p> 73 <p>
74 - Select how often the Repository will be reprocessed. 74 + <%= t('activemodel.hints.repository.period') %>
75 </p> 75 </p>
76 </div> 76 </div>
77 </div> 77 </div>
78 78
79 <div class="form-row"> 79 <div class="form-row">
80 <div class="field-container"> 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 <% configuration_list = KalibroClient::Entities::Configurations::KalibroConfiguration.all.map { |conf| [conf.name, conf.id] } %> 82 <% configuration_list = KalibroClient::Entities::Configurations::KalibroConfiguration.all.map { |conf| [conf.name, conf.id] } %>
83 <%= f.select( :kalibro_configuration_id, configuration_list, class: 'tooltip-control' ) %> 83 <%= f.select( :kalibro_configuration_id, configuration_list, class: 'tooltip-control' ) %>
84 </div> 84 </div>
85 <div class="help-container"> 85 <div class="help-container">
86 <p> 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 </p> 88 </p>
89 </div> 89 </div>
90 </div> 90 </div>
app/views/repositories/_metric_results_error.html.erb
1 -<p> Repository process returned with error. There are no metric results. </p>  
2 \ No newline at end of file 1 \ No newline at end of file
  2 +<p><%= t('activemodel.errors.repository.no_metric_results') %></p>
3 \ No newline at end of file 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 \ No newline at end of file 1 \ No newline at end of file
  2 +<p><%= t('activemodel.errors.repository.no_module_tree') %></p>
3 \ No newline at end of file 3 \ No newline at end of file
app/views/repositories/_processing_information.html.erb
1 <p> 1 <p>
2 - <strong>State:</strong> 2 + <strong><%= t('activemodel.attributes.processing.state') %>:</strong>
3 <%= @processing.state %> 3 <%= @processing.state %>
4 </p> 4 </p>
5 5
6 <p> 6 <p>
7 - <strong>Creation date:</strong> 7 + <strong><%= t('activemodel.attributes.processing.creation_date') %>:</strong>
8 <%= @processing.created_at.strftime("%Y/%m/%d at %Hh%M (%z)") %> 8 <%= @processing.created_at.strftime("%Y/%m/%d at %Hh%M (%z)") %>
9 </p> 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 \ No newline at end of file 3 \ No newline at end of file
  4 +<div id="processing_information"><%= image_tag 'loader.gif' %> <%= t('repository.show.loading') %></div>
5 \ No newline at end of file 5 \ No newline at end of file
app/views/repositories/edit.html.erb
1 <div class="page-header"> 1 <div class="page-header">
2 - <h1>Editing Repository</h1> 2 + <h1><%= "#{t('edit')} #{Repository.model_name.human}" %></h1>
3 </div> 3 </div>
4 4
5 <%= form_for(@repository, :url => project_repository_update_url(@project_id, @repository.id), method: :put) do |f| %> 5 <%= form_for(@repository, :url => project_repository_update_url(@project_id, @repository.id), method: :put) do |f| %>
app/views/repositories/new.html.erb
1 <div class="page-header"> 1 <div class="page-header">
2 - <h1>New Repository</h1> 2 + <h1><%= "#{t('new.male')} #{Repository.model_name.human}" %></h1>
3 </div> 3 </div>
4 4
5 <%= form_for(@repository, :url => project_repositories_url(@project_id)) do |f| %> 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 // This if prevents it from updating the repository's state after the user leaves its page 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 $('div#processing_information').html('<%= escape_javascript(render partial: "processing_information") %>'); 9 $('div#processing_information').html('<%= escape_javascript(render partial: "processing_information") %>');
4 repository = new Module.Repository(<%= @repository.project_id %>, <%= @repository.id %>) 10 repository = new Module.Repository(<%= @repository.project_id %>, <%= @repository.id %>)
5 repository.schedule_poll_state('<%= @processing.state %>') 11 repository.schedule_poll_state('<%= @processing.state %>')
app/views/repositories/show.html.erb
@@ -3,43 +3,46 @@ @@ -3,43 +3,46 @@
3 </div> 3 </div>
4 4
5 <p> 5 <p>
6 - <strong>Description:</strong> 6 + <strong><%= Repository.human_attribute_name('description') %>:</strong>
7 <%= @repository.description %> 7 <%= @repository.description %>
8 </p> 8 </p>
9 9
10 <p> 10 <p>
11 - <strong>License:</strong> 11 + <strong><%= Repository.human_attribute_name('license') %>:</strong>
12 <%= @repository.license %> 12 <%= @repository.license %>
13 </p> 13 </p>
14 14
15 <p> 15 <p>
16 - <strong>Type:</strong> 16 + <strong><%= Repository.human_attribute_name('type') %>:</strong>
17 <%= @repository.scm_type %> 17 <%= @repository.scm_type %>
18 </p> 18 </p>
19 19
20 <p> 20 <p>
21 - <strong>Address:</strong> 21 + <strong><%= Repository.human_attribute_name('address') %>:</strong>
22 <%= @repository.address %> 22 <%= @repository.address %>
23 </p> 23 </p>
24 24
25 <p> 25 <p>
26 - <strong>Periodicity:</strong> 26 + <strong><%= Repository.human_attribute_name('period') %>:</strong>
27 <%= periodicity_option(@repository.period) %> 27 <%= periodicity_option(@repository.period) %>
28 </p> 28 </p>
29 29
30 <p> 30 <p>
31 - <strong>Configuration:</strong> 31 + <strong><%= KalibroConfiguration.model_name.human %>:</strong>
32 <%= @kalibro_configuration.name %> 32 <%= @kalibro_configuration.name %>
33 </p> 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 <%= form_tag(project_repository_state_with_date_path(@repository.project_id, @repository.id), method: "post", remote: true) do %> 37 <%= form_tag(project_repository_state_with_date_path(@repository.project_id, @repository.id), method: "post", remote: true) do %>
38 <p> 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 </p> 46 </p>
44 <% end %> 47 <% end %>
45 48
@@ -47,18 +50,18 @@ @@ -47,18 +50,18 @@
47 50
48 <div id="repository-accordion"> 51 <div id="repository-accordion">
49 <div id="processing-accordion"> 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 </div> 55 </div>
53 56
54 <div id="module-accordion"> 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 </div> 60 </div>
58 61
59 <div id="metric-accordion"> 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 </div> 65 </div>
63 </div> 66 </div>
64 <script type="text/javascript"> 67 <script type="text/javascript">
@@ -79,8 +82,8 @@ @@ -79,8 +82,8 @@
79 82
80 <hr/> 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 <% if project_owner? @repository.project_id %> 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 <% end %> 89 <% end %>
app/views/shared/_reading_groups_list.erb
1 <table class="table table-hover"> 1 <table class="table table-hover">
2 <thead> 2 <thead>
3 <tr> 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 <th colspan="2"></th> 6 <th colspan="2"></th>
7 </tr> 7 </tr>
8 </thead> 8 </thead>
@@ -12,10 +12,10 @@ @@ -12,10 +12,10 @@
12 <tr> 12 <tr>
13 <td><%= reading_group.name %></td> 13 <td><%= reading_group.name %></td>
14 <td><%= reading_group.description %></td> 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 <td> 16 <td>
17 <% if reading_groups_owner? reading_group.id %> 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 <% end %> 19 <% end %>
20 </td> 20 </td>
21 </tr> 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 <li class="list-group-item"> 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 </li> 6 </li>
app/views/tutorials/analyzing.en.html.erb 0 → 100644
@@ -0,0 +1,90 @@ @@ -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,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 @@ @@ -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 @@ @@ -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,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 @@ @@ -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 @@ @@ -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,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 @@ @@ -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,7 +17,7 @@ module Mezuro
17 # config.time_zone = 'Central Time (US & Canada)' 17 # config.time_zone = 'Central Time (US & Canada)'
18 18
19 # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. 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 # config.i18n.default_locale = :de 21 # config.i18n.default_locale = :de
22 config.i18n.enforce_available_locales = true 22 config.i18n.enforce_available_locales = true
23 23
config/locales/bootstrap/en.yml 0 → 100644
@@ -0,0 +1,18 @@ @@ -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 @@ @@ -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 @@ @@ -0,0 +1,3 @@
  1 +en:
  2 + compound_metric_configuration:
  3 + CompoundMetricConfiguration: "Compound Metric Configuration"
config/locales/controllers/compound_metric_configurations/pt.yml 0 → 100644
@@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
  1 +pt:
  2 + compound_metric_configuration:
  3 + CompoundMetricConfiguration: "Configuração de Métrica Composta"
config/locales/controllers/concerns/en.yml 0 → 100644
@@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
  1 +---
  2 +en:
  3 + not_allowed: "You're not allowed to do this operation"
config/locales/controllers/concerns/pt.yml 0 → 100644
@@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
  1 +---
  2 +pt:
  3 + not_allowed: "Você não está autorizado a fazer esta operação"
config/locales/default/en.yml 0 → 100644
@@ -0,0 +1,38 @@ @@ -0,0 +1,38 @@
  1 +# Files in the config/locales directory are used for internationalization
  2 +# and are automatically loaded by Rails. If you want to use locales other
  3 +# than English, add the necessary files in this directory.
  4 +#
  5 +# To use the locales, use `I18n.t`:
  6 +#
  7 +# I18n.t 'hello'
  8 +#
  9 +# In views, this is aliased to just `t`:
  10 +#
  11 +# <%= t('hello') %>
  12 +#
  13 +# To use a different locale, set it with `I18n.locale`:
  14 +#
  15 +# I18n.locale = :es
  16 +#
  17 +# This would use the information in config/locales/es.yml.
  18 +#
  19 +# To learn more, please read the Rails Internationalization guide
  20 +# available at http://guides.rubyonrails.org/i18n.html.
  21 +
  22 +en:
  23 + successfully_created: "%{record} was successfully created."
  24 + successfully_updated: "%{record} was successfully updated."
  25 +
  26 + #class names
  27 + MetricConfiguration: "Metric Configuration"
  28 + KalibroRange: "Range"
  29 + ReadingGroup: "Reading Group"
  30 + Repository: "Repository"
  31 + Project: "Project"
  32 + Reading: "Reading"
  33 + metric: 'Metric'
  34 + Configuration: "Configuration"
  35 +
  36 + compound: "Compound"
  37 +
  38 + unauthenticated: "You must be logged in to %{action}"
config/locales/default/pt.yml 0 → 100644
@@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
  1 +pt:
  2 + successfully_created: "%{record} criado(a) com sucesso."
  3 + successfully_updated: "%{record} atualizado(a) com sucesso."
  4 +
  5 + #class names
  6 + MetricConfiguration: "Configuração de Métrica"
  7 + KalibroRange: "Intervalo"
  8 + ReadingGroup: "Grupo de Leitura"
  9 + Repository: "Repositório"
  10 + Project: "Projeto"
  11 + Reading: "Leitura"
  12 + metric: 'Métrica'
  13 + Configuration: "Configuração"
  14 +
  15 + compound: "Composta"
  16 +
  17 + unauthenticated: "Você precisa fazer login para %{action}"
config/locales/devise.en.yml
@@ -1,60 +0,0 @@ @@ -1,60 +0,0 @@
1 -# Additional translations at https://github.com/plataformatec/devise/wiki/I18n  
2 -  
3 -en:  
4 - devise:  
5 - confirmations:  
6 - confirmed: "Your account was successfully confirmed. Please sign in."  
7 - confirmed_and_signed_in: "Your account was successfully confirmed. You are now signed in."  
8 - send_instructions: "You will receive an email with instructions about how to confirm your account in a few minutes."  
9 - send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions about how to confirm your account in a few minutes."  
10 - failure:  
11 - already_authenticated: "You are already signed in."  
12 - inactive: "Your account is not activated yet."  
13 - invalid: "Invalid email or password."  
14 - invalid_token: "Invalid authentication token."  
15 - locked: "Your account is locked."  
16 - not_found_in_database: "Invalid email or password."  
17 - timeout: "Your session expired. Please sign in again to continue."  
18 - unauthenticated: "You need to sign in or sign up before continuing."  
19 - unconfirmed: "You have to confirm your account before continuing."  
20 - mailer:  
21 - confirmation_instructions:  
22 - subject: "Confirmation instructions"  
23 - reset_password_instructions:  
24 - subject: "Reset password instructions"  
25 - unlock_instructions:  
26 - subject: "Unlock Instructions"  
27 - omniauth_callbacks:  
28 - failure: "Could not authenticate you from %{kind} because \"%{reason}\"."  
29 - success: "Successfully authenticated from %{kind} account."  
30 - passwords:  
31 - no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."  
32 - send_instructions: "You will receive an email with instructions about how to reset your password in a few minutes."  
33 - send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."  
34 - updated: "Your password was changed successfully. You are now signed in."  
35 - updated_not_active: "Your password was changed successfully."  
36 - registrations:  
37 - destroyed: "Bye! Your account was successfully cancelled. We hope to see you again soon."  
38 - signed_up: "Welcome! You have signed up successfully."  
39 - signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."  
40 - signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."  
41 - signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please open the link to activate your account."  
42 - update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address."  
43 - updated: "You updated your account successfully."  
44 - sessions:  
45 - signed_in: "Signed in successfully."  
46 - signed_out: "Signed out successfully."  
47 - unlocks:  
48 - send_instructions: "You will receive an email with instructions about how to unlock your account in a few minutes."  
49 - send_paranoid_instructions: "If your account exists, you will receive an email with instructions about how to unlock it in a few minutes."  
50 - unlocked: "Your account has been unlocked successfully. Please sign in to continue."  
51 - errors:  
52 - messages:  
53 - already_confirmed: "was already confirmed, please try signing in"  
54 - confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"  
55 - expired: "has expired, please request a new one"  
56 - not_found: "not found"  
57 - not_locked: "was not locked"  
58 - not_saved:  
59 - one: "1 error prohibited this %{resource} from being saved:"  
60 - other: "%{count} errors prohibited this %{resource} from being saved:"  
config/locales/en.bootstrap.yml
@@ -1,18 +0,0 @@ @@ -1,18 +0,0 @@
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/en.yml
@@ -1,23 +0,0 @@ @@ -1,23 +0,0 @@
1 -# Files in the config/locales directory are used for internationalization  
2 -# and are automatically loaded by Rails. If you want to use locales other  
3 -# than English, add the necessary files in this directory.  
4 -#  
5 -# To use the locales, use `I18n.t`:  
6 -#  
7 -# I18n.t 'hello'  
8 -#  
9 -# In views, this is aliased to just `t`:  
10 -#  
11 -# <%= t('hello') %>  
12 -#  
13 -# To use a different locale, set it with `I18n.locale`:  
14 -#  
15 -# I18n.locale = :es  
16 -#  
17 -# This would use the information in config/locales/es.yml.  
18 -#  
19 -# To learn more, please read the Rails Internationalization guide  
20 -# available at http://guides.rubyonrails.org/i18n.html.  
21 -  
22 -en:  
23 - hello: "Hello world"  
config/locales/models/en.yml 0 → 100644
@@ -0,0 +1,21 @@ @@ -0,0 +1,21 @@
  1 +en:
  2 + activemodel:
  3 + models:
  4 + kalibro_module:
  5 + one: "Module"
  6 + other: "Modules"
  7 + reading_group:
  8 + one: "Reading Group"
  9 + other: "Reading Groups"
  10 + kalibro_range:
  11 + one: "Range"
  12 + other: "Ranges"
  13 + metric_configuration:
  14 + one: "Metric Configuration"
  15 + other: "Metric Configurations"
  16 + attributes:
  17 + metric_configuration:
  18 + metric: "Metric"
  19 + weight: "Weight"
  20 + aggregation_form: "Aggregation Form"
  21 + reading_group_id: "Reading Group"
config/locales/models/pt.yml 0 → 100644
@@ -0,0 +1,21 @@ @@ -0,0 +1,21 @@
  1 +pt:
  2 + activemodel:
  3 + models:
  4 + kalibro_module:
  5 + one: "Módulo"
  6 + other: "Módulos"
  7 + reading_group:
  8 + one: "Grupo de Leitura"
  9 + other: "Grupos de Leitura"
  10 + kalibro_range:
  11 + one: "Intervalo"
  12 + other: "Intervalos"
  13 + metric_configuration:
  14 + one: "Configuração de Métrica"
  15 + other: "Configurações de Métricas"
  16 + attributes:
  17 + metric_configuration:
  18 + metric: "Métrica"
  19 + weight: "Peso"
  20 + aggregation_form: "Forma de Agregação"
  21 + reading_group_id: "Grupo de Leitura"
config/locales/modules/en.yml 0 → 100644
@@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
  1 +en:
  2 + activemodel:
  3 + models:
  4 + metric_result:
  5 + one: Metric Result
  6 + other: Metric Results
  7 + module:
  8 + one: Module
  9 + other: Modules
  10 + attributes:
  11 + metric_result:
  12 + metric: 'Metric'
  13 + value: 'Value'
  14 + weight: 'Weight'
  15 + threshold: 'Threshold'
  16 + module:
  17 + name: 'Name'
  18 + granularity: 'Granularity'
  19 + grade: 'Grade'
config/locales/modules/pt.yml 0 → 100644
@@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
  1 +pt:
  2 + activemodel:
  3 + models:
  4 + metric_result:
  5 + one: Resultado de Métrica
  6 + other: Resultados de Métricas
  7 + kalibro_module:
  8 + one: Módulo
  9 + other: Módulos
  10 + attributes:
  11 + metric_result:
  12 + metric: 'Métrica'
  13 + value: 'Valor'
  14 + weight: 'Peso'
  15 + threshold: 'Limiar'
  16 + kalibro_module:
  17 + name: 'Nome'
  18 + granularity: 'Granularidade'
  19 + grade: 'Nota'
0 \ No newline at end of file 20 \ No newline at end of file
config/locales/pt.yml 0 → 100644
@@ -0,0 +1,207 @@ @@ -0,0 +1,207 @@
  1 +---
  2 +pt:
  3 + date:
  4 + abbr_day_names:
  5 + - Dom
  6 + - Seg
  7 + - Ter
  8 + - Qua
  9 + - Qui
  10 + - Sex
  11 + - Sáb
  12 + abbr_month_names:
  13 + -
  14 + - Jan
  15 + - Fev
  16 + - Mar
  17 + - Abr
  18 + - Mai
  19 + - Jun
  20 + - Jul
  21 + - Ago
  22 + - Set
  23 + - Out
  24 + - Nov
  25 + - Dez
  26 + day_names:
  27 + - Domingo
  28 + - Segunda
  29 + - Terça
  30 + - Quarta
  31 + - Quinta
  32 + - Sexta
  33 + - Sábado
  34 + formats:
  35 + default: "%d/%m/%Y"
  36 + long: "%d de %B de %Y"
  37 + short: "%d de %B"
  38 + month_names:
  39 + -
  40 + - Janeiro
  41 + - Fevereiro
  42 + - Março
  43 + - Abril
  44 + - Maio
  45 + - Junho
  46 + - Julho
  47 + - Agosto
  48 + - Setembro
  49 + - Outubro
  50 + - Novembro
  51 + - Dezembro
  52 + order:
  53 + - :day
  54 + - :month
  55 + - :year
  56 + datetime:
  57 + distance_in_words:
  58 + about_x_hours:
  59 + one: aproximadamente 1 hora
  60 + other: aproximadamente %{count} horas
  61 + about_x_months:
  62 + one: aproximadamente 1 mês
  63 + other: aproximadamente %{count} meses
  64 + about_x_years:
  65 + one: aproximadamente 1 ano
  66 + other: aproximadamente %{count} anos
  67 + almost_x_years:
  68 + one: quase 1 ano
  69 + other: quase %{count} anos
  70 + half_a_minute: meio minuto
  71 + less_than_x_minutes:
  72 + one: menos de um minuto
  73 + other: menos de %{count} minutos
  74 + less_than_x_seconds:
  75 + one: menos de 1 segundo
  76 + other: menos de %{count} segundos
  77 + over_x_years:
  78 + one: mais de 1 ano
  79 + other: mais de %{count} anos
  80 + x_days:
  81 + one: 1 dia
  82 + other: "%{count} dias"
  83 + x_minutes:
  84 + one: 1 minuto
  85 + other: "%{count} minutos"
  86 + x_months:
  87 + one: 1 mês
  88 + other: "%{count} meses"
  89 + x_seconds:
  90 + one: 1 segundo
  91 + other: "%{count} segundos"
  92 + prompts:
  93 + day: Dia
  94 + hour: Hora
  95 + minute: Minuto
  96 + month: Mês
  97 + second: Segundo
  98 + year: Ano
  99 + errors:
  100 + format: "%{attribute} %{message}"
  101 + messages:
  102 + accepted: deve ser aceito
  103 + blank: não pode ficar em branco
  104 + present: deve ficar em branco
  105 + confirmation: não é igual a %{attribute}
  106 + empty: não pode ficar vazio
  107 + equal_to: deve ser igual a %{count}
  108 + even: deve ser par
  109 + exclusion: não está disponível
  110 + greater_than: deve ser maior que %{count}
  111 + greater_than_or_equal_to: deve ser maior ou igual a %{count}
  112 + inclusion: não está incluído na lista
  113 + invalid: não é válido
  114 + less_than: deve ser menor que %{count}
  115 + less_than_or_equal_to: deve ser menor ou igual a %{count}
  116 + not_a_number: não é um número
  117 + not_an_integer: não é um número inteiro
  118 + odd: deve ser ímpar
  119 + record_invalid: 'A validação falhou: %{errors}'
  120 + restrict_dependent_destroy:
  121 + one: Não é possível excluir o registro pois existe um %{record} dependente
  122 + many: Não é possível excluir o registro pois existem %{record} dependentes
  123 + taken: já está em uso
  124 + too_long: 'é muito longo (máximo: %{count} caracteres)'
  125 + too_short: 'é muito curto (mínimo: %{count} caracteres)'
  126 + wrong_length: não possui o tamanho esperado (%{count} caracteres)
  127 + other_than: deve ser diferente de %{count}
  128 + template:
  129 + body: 'Por favor, verifique o(s) seguinte(s) campo(s):'
  130 + header:
  131 + one: 'Não foi possível gravar %{model}: 1 erro'
  132 + other: 'Não foi possível gravar %{model}: %{count} erros.'
  133 + helpers:
  134 + select:
  135 + prompt: Por favor selecione
  136 + submit:
  137 + create: Criar %{model}
  138 + submit: Salvar %{model}
  139 + update: Atualizar %{model}
  140 + number:
  141 + currency:
  142 + format:
  143 + delimiter: "."
  144 + format: "%u %n"
  145 + precision: 2
  146 + separator: ","
  147 + significant: false
  148 + strip_insignificant_zeros: false
  149 + unit: R$
  150 + format:
  151 + delimiter: "."
  152 + precision: 3
  153 + separator: ","
  154 + significant: false
  155 + strip_insignificant_zeros: false
  156 + human:
  157 + decimal_units:
  158 + format: "%n %u"
  159 + units:
  160 + billion:
  161 + one: bilhão
  162 + other: bilhões
  163 + million:
  164 + one: milhão
  165 + other: milhões
  166 + quadrillion:
  167 + one: quatrilhão
  168 + other: quatrilhões
  169 + thousand: mil
  170 + trillion:
  171 + one: trilhão
  172 + other: trilhões
  173 + unit: ''
  174 + format:
  175 + delimiter: "."
  176 + precision: 2
  177 + significant: true
  178 + strip_insignificant_zeros: true
  179 + storage_units:
  180 + format: "%n %u"
  181 + units:
  182 + byte:
  183 + one: Byte
  184 + other: Bytes
  185 + gb: GB
  186 + kb: KB
  187 + mb: MB
  188 + tb: TB
  189 + percentage:
  190 + format:
  191 + delimiter: "."
  192 + format: "%n%"
  193 + precision:
  194 + format:
  195 + delimiter: "."
  196 + support:
  197 + array:
  198 + last_word_connector: " e "
  199 + two_words_connector: " e "
  200 + words_connector: ", "
  201 + time:
  202 + am: ''
  203 + formats:
  204 + default: "%a, %d de %B de %Y, %H:%M:%S %z"
  205 + long: "%d de %B de %Y, %H:%M"
  206 + short: "%d de %B, %H:%M"
  207 + pm: ''
config/locales/views/compound_metric_configuration/en.yml 0 → 100644
@@ -0,0 +1,23 @@ @@ -0,0 +1,23 @@
  1 +en:
  2 + activemodel:
  3 + models:
  4 + compound_metric_configuration:
  5 + one: "Compound Metric Configuration"
  6 + other: "Compound Metric Configurations"
  7 + attributes:
  8 + compound_metric_configuration:
  9 + name: "Name"
  10 + description: "Description"
  11 + script: "Script"
  12 + scope: "Scope"
  13 + code: "Code"
  14 + weight: "Weight"
  15 + hints:
  16 + compound_metric_configuration:
  17 + name: "A custom name for your compound metric."
  18 + description: "A short description of your compound metric."
  19 + script: "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."
  20 + code:
  21 + description: "A variable that holds the value of a metric calculation. It can be used in the script of another compound metric."
  22 + example: "Example: Code foo := 10"
  23 + weight: "It is used to calculate the weighted average of a"
config/locales/views/compound_metric_configuration/pt.yml 0 → 100644
@@ -0,0 +1,23 @@ @@ -0,0 +1,23 @@
  1 +pt:
  2 + activemodel:
  3 + models:
  4 + compound_metric_configuration:
  5 + one: "Configuração de Métrica Composta"
  6 + other: "Configurações de Métricas Compostas"
  7 + attributes:
  8 + compound_metric_configuration:
  9 + name: "Nome"
  10 + description: "Descrição"
  11 + script: "Script"
  12 + scope: "Escopo"
  13 + code: "Código"
  14 + weight: "Peso"
  15 + hints:
  16 + compound_metric_configuration:
  17 + name: "Um nome personalizado para sua métrica composta."
  18 + description: "Uma descrição curta de sua métrica composta."
  19 + script: "Uma expressão matemática (em JavaScript) para calcular sua métrica composta. Ela precisa de uma cláusula de retorno. O código de suas demais métricas pode ser utilizado dentro deste script."
  20 + code:
  21 + description: "Uma variável que contém o valor do cálculo da métrica. Ela pode ser usada no script de outra métrica composa."
  22 + example: "Examplo: Código foo := 10"
  23 + weight: "ele é usado para o cálculo de uma média ponderada de um"
config/locales/views/devise/en.yml 0 → 100644
@@ -0,0 +1,90 @@ @@ -0,0 +1,90 @@
  1 +en:
  2 + dictionary:
  3 + same_email: &same_email The same email address used to sign up.
  4 + your_full_name: &your_full_name Your full name.
  5 + your_email_is_our_communication_channel: &your_email_is_our_communication_channel Your email is our communication channel. Make sure you have typed it correctly.
  6 + password_instructions: &password_instructions Your password must have at least 8 characters. Strong passwords contain numbers, symbols, upper and lowercase characters.
  7 + confirm_your_password: &confirm_your_password Confirm your password.
  8 + activerecord:
  9 + attributes:
  10 + user:
  11 + name: Name
  12 + current_password: Current password
  13 + email: Email
  14 + password: Password
  15 + password_confirmation: Password confirmation
  16 + remember_me: Remember me
  17 + models:
  18 + user: User
  19 + devise:
  20 + confirmations:
  21 + new:
  22 + resend_confirmation_instructions: Resend confirmation instructions
  23 + mailer:
  24 + confirmation_instructions:
  25 + action: Confirm my account
  26 + greeting: Welcome %{recipient}!
  27 + instruction: 'You can confirm your account email through the link below:'
  28 + reset_password_instructions:
  29 + action: Change my password
  30 + greeting: Hello %{recipient}!
  31 + instruction: Someone has requested a link to change your password, and you can do this through the link below.
  32 + instruction_2: If you didn't request this, please ignore this email.
  33 + instruction_3: Your password won't change until you access the link above and create a new one.
  34 + unlock_instructions:
  35 + action: Unlock my account
  36 + greeting: Hello %{recipient}!
  37 + instruction: 'Click the link below to unlock your account:'
  38 + message: Your account has been locked due to an excessive amount of unsuccessful sign in attempts.
  39 + passwords:
  40 + edit:
  41 + change_my_password: Change my password
  42 + change_your_password: Change your password
  43 + confirm_new_password: Confirm new password
  44 + new_password: New password
  45 + new:
  46 + same_email: *same_email
  47 + forgot_your_password: Forgot your password?
  48 + send_me_reset_password_instructions: Send me reset password instructions
  49 + registrations:
  50 + edit:
  51 + are_you_sure: Are you sure?
  52 + cancel_my_account: Cancel my account
  53 + currently_waiting_confirmation_for_email: 'Currently waiting confirmation for: %{email}'
  54 + leave_blank_if_you_don_t_want_to_change_it: leave blank if you dont want to change it
  55 + title: Edit %{resource}
  56 + unhappy: Unhappy
  57 + update: Update
  58 + we_need_your_current_password_to_confirm_your_changes: we need your current password to confirm your changes
  59 + current_password_required: Your current password is needed to confirm your changes.
  60 + your_full_name: *your_full_name
  61 + your_email_is_our_communication_channel: *your_email_is_our_communication_channel
  62 + password_instructions: *password_instructions
  63 + confirm_your_password: *confirm_your_password
  64 + new:
  65 + sign_up: Sign up
  66 + your_full_name: *your_full_name
  67 + your_email_is_our_communication_channel: *your_email_is_our_communication_channel
  68 + password_instructions: *password_instructions
  69 + confirm_your_password: *confirm_your_password
  70 + sessions:
  71 + new:
  72 + sign_in: Sign in
  73 + same_email: *same_email
  74 + forgot_password_link_html: If you forgot your password, follow this %{link} to reset it.
  75 + stay_logged_in: Stay logged in.
  76 + user:
  77 + signed_in: Signed in successfully.
  78 + signed_out: Signed out successfully.
  79 + shared:
  80 + links:
  81 + back: Back
  82 + didn_t_receive_confirmation_instructions: Didn't receive confirmation instructions?
  83 + didn_t_receive_unlock_instructions: Didn't receive unlock instructions?
  84 + forgot_your_password: Forgot your password?
  85 + sign_in: Sign in
  86 + sign_in_with_provider: Sign in with %{provider}
  87 + sign_up: Sign up
  88 + unlocks:
  89 + new:
  90 + resend_unlock_instructions: Resend unlock instructions
config/locales/views/devise/pt.yml 0 → 100644
@@ -0,0 +1,93 @@ @@ -0,0 +1,93 @@
  1 +pt:
  2 + dictionary:
  3 + same_email: &same_email O mesmo endereço de email usado para registrar.
  4 + your_full_name: &your_full_name Seu nome completo.
  5 + your_email_is_our_communication_channel: &your_email_is_our_communication_channel Seu email é o nosso canal de comunicação. Assegure-se de que tenha o digitado corretamente.
  6 + password_instructions: &password_instructions Sua senha precisa ter pelo menos 8 caracteres. Senhas fortes contêm números, símbolos e letras maiúsculas e minúsculas.
  7 + confirm_your_password: &confirm_your_password Confirme sua senha.
  8 + activerecord:
  9 + attributes:
  10 + user:
  11 + name: Nome
  12 + current_password: Senha atual
  13 + email: Email
  14 + password: Senha
  15 + password_confirmation: Confirme sua senha
  16 + remember_me: Lembre-se de mim
  17 + models:
  18 + user: Usuário
  19 + devise:
  20 + failure:
  21 + user:
  22 + invalid: Email ou senha inválidos.
  23 + confirmations:
  24 + new:
  25 + resend_confirmation_instructions: Reenviar instruções de confirmação
  26 + mailer:
  27 + confirmation_instructions:
  28 + action: Confirmar minha conta
  29 + greeting: Bem-vindo %{recipient}!
  30 + instruction: 'Você pode confirmar sua conta através do link abaixo:'
  31 + reset_password_instructions:
  32 + action: Redefinir minha senha
  33 + greeting: Olá %{recipient}!
  34 + instruction: Alguém fez o pedido para redefinir sua senha, e você pode fazer isso clicando no link abaixo.
  35 + instruction_2: Se você não fez este pedido, por favor ignore este e-mail.
  36 + instruction_3: Sua senha não será alterada até que você acesse o link abaixo e crie uma nova.
  37 + unlock_instructions:
  38 + action: Desbloquear minha conta
  39 + greeting: Olá %{recipient}!
  40 + instruction: 'Clique no link abaixo para desbloquear sua conta:'
  41 + message: Sua conta foi bloqueada devido ao excessivo número de tentativas acesso inválidas.
  42 + passwords:
  43 + edit:
  44 + change_my_password: Alterar minha senha
  45 + change_your_password: Alterar sua senha
  46 + confirm_new_password: Confirme sua nova senha
  47 + new_password: Nova senha
  48 + new:
  49 + same_email: *same_email
  50 + forgot_your_password: Esqueceu sua senha?
  51 + send_me_reset_password_instructions: Enviar instruções para redefinição da senha
  52 + registrations:
  53 + edit:
  54 + are_you_sure: Você tem certeza?
  55 + cancel_my_account: Cancelar minha conta
  56 + currently_waiting_confirmation_for_email: 'No momento esperando por: %{email}'
  57 + leave_blank_if_you_don_t_want_to_change_it: deixe em branco caso não queira alterá-la
  58 + title: Editar %{resource}
  59 + unhappy: Não está contente
  60 + update: Atualizar
  61 + we_need_your_current_password_to_confirm_your_changes: precisamos da sua senha atual para confirmar suas mudanças
  62 + current_password_required: Sua senha atual é necessária para confirmar as mudanças.
  63 + your_full_name: *your_full_name
  64 + your_email_is_our_communication_channel: *your_email_is_our_communication_channel
  65 + password_instructions: *password_instructions
  66 + confirm_your_password: *confirm_your_password
  67 + new:
  68 + sign_up: Inscrever-se
  69 + your_full_name: *your_full_name
  70 + your_email_is_our_communication_channel: *your_email_is_our_communication_channel
  71 + password_instructions: *password_instructions
  72 + confirm_your_password: *confirm_your_password
  73 + sessions:
  74 + new:
  75 + sign_in: Login
  76 + same_email: *same_email
  77 + forgot_password_link_html: Se você esqueceu sua senha, clique neste %{link} para redefini-la.
  78 + stay_logged_in: Continuar logado.
  79 + user:
  80 + signed_in: Entrou com sucesso.
  81 + signed_out: Saiu com sucesso.
  82 + shared:
  83 + links:
  84 + back: Voltar
  85 + didn_t_receive_confirmation_instructions: Não recebeu instruções de confirmação?
  86 + didn_t_receive_unlock_instructions: Não recebeu instruções de desbloqueio?
  87 + forgot_your_password: Esqueceu sua senha?
  88 + sign_in: Login
  89 + sign_in_with_provider: Entrar com %{provider}
  90 + sign_up: Inscrever-se
  91 + unlocks:
  92 + new:
  93 + resend_unlock_instructions: Reenviar instruções de desbloqueio
config/locales/views/en.yml 0 → 100644
@@ -0,0 +1,293 @@ @@ -0,0 +1,293 @@
  1 +# Files in the config/locales directory are used for internationalization
  2 +# and are automatically loaded by Rails. If you want to use locales other
  3 +# than English, add the necessary files in this directory.
  4 +#
  5 +# To use the locales, use `I18n.t`:
  6 +#
  7 +# I18n.t 'hello'
  8 +#
  9 +# In views, this is aliased to just `t`:
  10 +#
  11 +# <%= t('hello') %>
  12 +#
  13 +# To use a different locale, set it with `I18n.locale`:
  14 +#
  15 +# I18n.locale = :es
  16 +#
  17 +# This would use the information in config/locales/es.yml.
  18 +#
  19 +# To learn more, please read the Rails Internationalization guide
  20 +# available at http://guides.rubyonrails.org/i18n.html.
  21 +
  22 +en:
  23 + #commons
  24 + show: "Show"
  25 + edit_model: "Edit %{model}"
  26 + edit: "Edit"
  27 + edit_user: "Edit User"
  28 + end: "End"
  29 + the: "The"
  30 + of_the: "of the"
  31 + and: "and"
  32 + name: "Name"
  33 + label: "Label"
  34 + scope: "Scope"
  35 + code: "Code"
  36 + reading_group: "Reading Group"
  37 + reading_groups: "Reading Groups"
  38 + configuration: "Configuration"
  39 + configurations: "Configurations"
  40 + module: "Module"
  41 + weight: "Weight"
  42 + description: "Description"
  43 + beginning: "Beginning"
  44 + ranges: "Ranges"
  45 + range: "Range"
  46 + language: "Language:"
  47 + no_description: "There is no description available"
  48 + welcome: "Welcome"
  49 + metrics: "Metrics"
  50 + value: "Value"
  51 + threshold: "Threshold"
  52 + granularity: "Granularity"
  53 + repositories: "Repositories"
  54 + type: "Type"
  55 + address: "Address"
  56 + script: "script"
  57 + add_range: "Add Range"
  58 + back: "Back"
  59 + destroy: "Destroy"
  60 + save: "Save"
  61 + color: "Color"
  62 + a: "A"
  63 + state: "State"
  64 + license: "License"
  65 + periodicity: "Periodicity"
  66 + reprocess: "Reprocess"
  67 + tutorial: "Tutorial"
  68 + requisites: "Requisites"
  69 + have: "Have"
  70 + signed_up: "signed up"
  71 + signed_in: "signed in"
  72 + be: "Be"
  73 + steps: "Steps"
  74 + details: "Details"
  75 + instroduction: "Introduction"
  76 + keywords: "Keywords"
  77 + reading: "Reading"
  78 + readings: "Readings"
  79 + analysis: "Analysis"
  80 + feedback: "feedback"
  81 + update: "Update"
  82 + configuring: "Configuring"
  83 + tutorials: "Tutorials"
  84 + analysis: "Analysis"
  85 + password: "Password"
  86 + configuring: "Configuring"
  87 + tutorials: "Tutorials"
  88 + password_confirmation: "Password Confirmation"
  89 + remember_me: "Remember me"
  90 + day: "Day"
  91 + month: "Month"
  92 + year: "Year"
  93 + search: "Search"
  94 + new:
  95 + male: 'New'
  96 + female: 'New'
  97 + create: 'Create %{model}'
  98 + add: 'Add'
  99 + sure_destroy: 'Are you sure that you want to destroy this %{model}?'
  100 + #this pattern is type_folder_file
  101 +
  102 + choose_metric: "Choose a metric from a Base Tool:"
  103 + created_metrics: "Created Metrics"
  104 + resend_instruction: "Resend confirmation instructions"
  105 + confirm_account_email: "You can confirm your account email through the link below:"
  106 + request_change_password: "Someone has requested a link to change your password. You can do this through the link below:"
  107 + ignore_email: "If you did not request this, please ignore this email."
  108 + password_not_change: "Your password will not change until you access the link above and create a new one."
  109 + account_locked: "Your account has been locked due to an excessive number of unsuccessful sign in attempts."
  110 + link_unlock_account: "Click the link below to unlock your account:"
  111 + change_password: "Change your password"
  112 + forgot_password: "Forgot your password?"
  113 + email_address: "The same email address used to sign up."
  114 + full_name: "Your full name."
  115 + email_communication_channel: "Your email is our communication channel. Make sure you have typed it correctly."
  116 + password_rules: "Your password must have at least 8 characters. Strong passwords contain numbers, symbols, upper and lowercase characters."
  117 + confirm_password: "Confirm your password."
  118 + current_password_changes: "Your current password is needed to confirm your changes."
  119 + cancel_account: "Cancel my account"
  120 + unhappy: "Unhappy?"
  121 + login_mezuro: "Login into Mezuro"
  122 + forgot_password_follow: "If you forgot your password, follow this"
  123 + reset_it: "to reset it."
  124 + stay_logged: "Stay logged in."
  125 + resend_unclok_instructions: "Resend unlock instructions"
  126 + grade: "Grade"
  127 + grades_belonging_to_a_module: "'s Grades"
  128 + edit_configuration: "Edit Configuration"
  129 + must_logged_configuration: "You must be logged in to create new Configurations."
  130 + new_configuration: "New Configuration"
  131 + measured_metric_html: "The %{href} of the %{href2} measured by this metric."
  132 + change_password: "Change your password "
  133 + range_lower_limit: "This Range's lower limit."
  134 + range_upper_limit: "This Range's upper limit."
  135 + explanation_chose_interval: "An explanation of why you chose this interval, with that reading for this"
  136 + readings_associated_reading_group: "You must have Readings within your associated Reading Group to create a new Range."
  137 + user_no_allowed_modify: "The Reading Group of your Metric Configuration belongs to another user and you are not allowed to modify it."
  138 + edit_range: "Edit Range"
  139 + new_range: "New Range"
  140 + new_reading: "New Reading"
  141 + only_point_printed_chart: "There is only one point and it will not be printed into a chart."
  142 + there_readings_yet: "There are no Readings yet!"
  143 + edit_reading_group: "Edit Reading Group"
  144 + must_logged_create_reading_groups: "You must be logged in to create new Reading Groups."
  145 + new_reading_group: "New Reading Group"
  146 +
  147 + confirm_my_account: "Confirm my account"
  148 + change_my_password: "Change my password"
  149 + unlock_my_account: "Unlock my account"
  150 + new_password: "New password"
  151 + confirm_new_password: "Confirm new password"
  152 + send_reset_password_instructions: "Send me reset password instructions"
  153 + really_want_cancel_account: "Do you really want to cancel your account?"
  154 + received_confirmation_instructions: "Have you received confirmation instructions?"
  155 + received_unlock_instructions: "Have you received unlock instructions?"
  156 + mezuro_team: "The Mezuro Team"
  157 + want_destroy_range: "Are you sure that you want to destroy this Range?"
  158 + add_metric: "Add Metric"
  159 + destroy_configuration: "Destroy Configuration"
  160 + want_destroy_configuration: "Are you sure that you want to destroy this Configuration?"
  161 + want_destroy_reading: "Are you sure that you want to destroy this Reading?"
  162 + grade_show: "Grade"
  163 + destroy_reading_group: "Destroy Reading Group"
  164 + highlighting_interpretation: "It is a verbal concise form of highlighting the content of an interpretation."
  165 + example_values_bad: "Example values: terrible, bad, regular, good, great etc."
  166 + choose_hexadecimal_picker: " It is a visual form of highlighting an interpretation. You can choose one by typing its hexadecimal value or by using the color picker."
  167 + example_values: "Example values: 000000, 00ff00 etc"
  168 + number_classify_reading: " A number to classify this reading."
  169 + editing_reading: "Editing Reading"
  170 + name_repository: "The name of your Repository."
  171 + short_description_repository: "A short description of your Repository."
  172 + code_license: "The source code's license."
  173 + version_system_repository_uses: "The version control system the Repository uses."
  174 + URL_repository_located: "The URL where the Repository is located."
  175 + select_repository_reprocessed: "Select how often the Repository will be reprocessed."
  176 + define_metrics_calculated: "defines all the metrics to be calculated in the source code. Choose your weapon!"
  177 + repository_returned: "Repository process returned with error. There are no metric results."
  178 + repository_process_returned_module: "Repository process returned with error. There is no module tree."
  179 + creation_date: "Creation date:"
  180 + repository_no_processings: "This Repository has no processings yet. Please, wait an instant as we start it."
  181 + loading_data: "Loading data. Please, wait."
  182 + editing_repository: "Editing Repository"
  183 + new_repository: "New Repository"
  184 + closest_processing_information: "Retrieve the closest processing information from:"
  185 + want_destroy_repository: "Are you sure that you want to destroy this Repository?"
  186 + analyzing_repository: "Analyzing a repository"
  187 + order_created_project: "In order to create a Project, you must:"
  188 + repository_which_analyse: "And have a repository URL which you wish to analyze"
  189 + project_creation: "Project creation"
  190 + project_upper_menu: "Click on 'Project' on the upper menu"
  191 + click_new_project: "Click on New Project"
  192 + fill_name_unique: "Fill in the form with a name that must be unique"
  193 + description_required: "Fill in the form with a description which is not required"
  194 + click_save_project: "Click on 'Save' and you should be at the project page now, congratulations!"
  195 + repository_creation: "Repository creation"
  196 + project_page_click_new_repository: "From the project page, click on New Repository"
  197 + fill_form: "Fill in the form"
  198 + name_must_unique: "Name' must be unique"
  199 + open_source_licenses: "You should choose one of the Open Source licenses in the platform according to your code"
  200 + repository_source_management: "The 'Type' field stands for the Repository source code management tool (Git, for example)"
  201 + fill_URL_which_can_download: "Fill in the 'Address' with the URL from which we can download your code"
  202 + analyse_project_periodically: "If you want to analyze your project periodically, set it (you can as well run it from the interface whenever you want)"
  203 + configuration_metric_interpretation: "Finally, the 'Configuration' stands for the set of metrics and interpretation that we will use to analyze your project"
  204 + should_repository_page_analysis: "Click on 'Save' and you should be at the repository page, waiting for the analysis"
  205 + repository_details: "Repository page details"
  206 + repository_divided_diferent_sections: "The repository page is divided into four different sections:"
  207 + provided_creation_steps: "Information that you provided during the creation steps"
  208 + visualize_processings_repository: "Select box so it is possible to visualize previous processings of your repository"
  209 + processing_information: "Processing information"
  210 + time_finish_processing: "Information about the time it has taken to finish each step of the processing"
  211 + reserving_folder_repository: "PREPARING: the system is reserving a folder for your repository and retrieving the configuration"
  212 + retrieving_source_code: "DOWNLOADING: retrieving the source code"
  213 + calculationg_metric_repository: "COLLECTING: calculating the metrics for your repository"
  214 + results_source_structure: "BUILDING: organizing the results into a source tree structure"
  215 + calculating_aggregated_parent: "AGGREGATING: calculating the aggregated value for parent modules in the source tree"
  216 + chosen_configuration_compound_metrics: "CALCULATING: if the chosen configuration has compound metrics, they will be calculated"
  217 + system_interpret_reading_groups: "INTERPRETING: with all the necessary results, the system will interpret them using reading groups (labels and colors)"
  218 + modules_tree: "Modules Tree"
  219 + tree_structure: "Source tree structure where you can navigate by clicking on the names"
  220 + information_granulary_module: "Information about the granularity of the module"
  221 + method: "METHOD"
  222 + method2: "Method"
  223 + class: "CLASS"
  224 + class2: "Class"
  225 + package: "PACKAGE"
  226 + packege2: "Package"
  227 + software: "SOFTWARE"
  228 + software2: "Software"
  229 + given_module_weights: "Grade of the given module according to the weights of the metrics on the configuration"
  230 + metric_results: "Metric Results"
  231 + metric_result: "metric result"
  232 + metric_result2: "Metric Result"
  233 + metric_current_selected_tree: "Displays the individual results of each metric for the current module selected in the source tree"
  234 + historic_chart_metric: "By clicking on the metric name, you will see a historic chart for that metric"
  235 + setting_new_configuration: "Setting a New Configuration"
  236 + order_create_configuration: "In order to create a Configuration, you must:"
  237 + to_platform: "to the platform"
  238 + already_reading_group: "Have already created at least one Reading Group"
  239 + repository_mezuro_configurations: "To process a repository, Mezuro uses configurations which you specify on the"
  240 + briefly_components_configuration: "Here you will be briefly introduced to all the components of a configuration and then guided through the steps to create one."
  241 + configuration_components: "Configuration components"
  242 + remaining_components_association: ": just a high level container for the remaining components association"
  243 + processing_interpret_results: ": specification of which metric will be calculated during the processing and how to interpret its results"
  244 + metric_final_grade: "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"
  245 + according_field_specifies: "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"
  246 + reading_group_specifies_interpretations: "Reading Group: specifies which set of interpretations (called readings) will be available for this metric"
  247 + container_readings: ": just a high level container for the readings (interpretations)"
  248 + interpretation_value_providing: "Reading: interpretation for a given value providing label, grade (this is the grade used for the weighted average mentioned above) and color"
  249 + associates_number_intervals: ": Associates numeric intervals to the readings of a given metric"
  250 + configuration_creation: "Configuration creation"
  251 + click_configuration: "Click on Configuration on the upper menu"
  252 + click_new_configuration: "Click on New Configuration"
  253 + click_save_configuration_page: "Click on 'Save' and you should be at the configuration page now"
  254 + metric_addition: "Metric addition"
  255 + configuration_page: "From the configuration page"
  256 + click_add_metric: "Click on 'Add Metric'"
  257 + collector_options: "Select one collector from the options, and click on the metric that you want to add"
  258 + fill_with_calculate: "Fill in the form with a 'Weight', used to calculate the final grade"
  259 + select_aggregation_form: "Select the 'Aggregation Form' that will be used for this metric"
  260 + select_reading_group: "Select the 'Reading Group' which will provide the interpretations for this metric"
  261 + click_save_configuration_metric: "Click on 'Save' and you should be at the configuration page now with the new metric added"
  262 + ranges_creation: "Ranges creation"
  263 + click_show_metric_create: "Click on 'Show' for the metric which you want to create ranges for"
  264 + click_add_range: "Click on 'Add Range'"
  265 + fill_beginning_end_values_interval: "Fill in the form with the 'Beginning' and 'End' values for the interval"
  266 + fill_comments_displayed: "Fill in the form with the 'Comments' which will be displayed if the metric value matches the interval"
  267 + select_reading_range: "Select the 'Reading' which will be associated with this range"
  268 + click_save_metric_range: "Click on 'Save' and you should be at the metric page with the new range added, congratulations!"
  269 + mezuro_levels_granularity: "Represents the granularity level of the code fragment being measured. Mezuro uses four levels of granularity:"
  270 + generated_module: "Represents a fragment of the software. Every node in the processing tree generated by Kalibro Processor is a module and each module has a"
  271 + numerical_intervals: "Represents numerical intervals that may contain the value calculated for a given"
  272 + ranges_combined_interpretations: ". Ranges combined with readings provide interpretations for"
  273 + interpretation_given: "The interpretation given to a "
  274 + readings_combined: "(e.g., 'Good', 'Complex', 'A'). Readings combined with ranges provide interpretations for"
  275 + set_of: "A set of"
  276 + sense_grouped: "that make sense when grouped together (e.g., 'Good' and 'Bad', 'Simple' and 'Complex')."
  277 + collector_compond_metric: "It is a numerical result associated to a metric by the Collector or aggregating in the case of a Compound Metric"
  278 + sofware_metric_quantitative: "A software metric is a quantitative measure of some property of a"
  279 + more_details: ". For more details see"
  280 + kalibro_web_service: "Kalibro Web Service"
  281 + no_description_available: "No description available."
  282 + create_new_reading: "Create New Reading"
  283 + process_period: "Process Period"
  284 + currently_waiting_confirmation: "Currently waiting confirmation for:"
  285 + leave_blank_wont_change: "(leave it blank if you do not want to change it)"
  286 + pick_color: "Pick color"
  287 + password_confirmation: "Password confirmation"
  288 + current_password: "Current password"
  289 + modules: "Modules"
  290 + comments: "Comments"
  291 + aggregation_form: "Aggregation Form"
  292 + kalibro_configuration: "Configuration"
  293 + idiom: 'Idiom'
config/locales/views/home/en.yml 0 → 100644
@@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
  1 +en:
  2 + title_home_index: "Understanding Code Metrics"
  3 + body_home_index_html: "This is Mezuro! A <strong>free/libre</strong> web platform for <strong>collaborative</strong> source code <strong>evaluation</strong>.</p> <p>Here you can evaluate your source code with the most popular SCMs (like Git and SVN), just by providing its URL. For now, you can evaluate <strong>C</strong>, <strong>C++</strong> and <strong>Java</strong> source codes, but we are looking forward to supporting more languages in the future."
  4 + body_feedback_home_index_html: "Mezuro is continuously under development. Try it and give us your %{href}."
  5 + latest_projects: "Latest projects"
config/locales/views/home/pt.yml 0 → 100644
@@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
  1 +pt:
  2 + title_home_index: "Entendendo Métricas de Código"
  3 + body_home_index_html: "<p>Este é o Mezuro! Uma plataforma web <strong>livre</strong> para <strong>avaliação colaborativa</strong> de código fonte.</p> <p>Aqui você pode avaliar seu código fonte com os SCMs mais populares (como Git e SVN), apenas fornecendo sua URL. Por enquanto, você pode avaliar códigos em <strong>C</strong>, <strong>C++</strong> e <strong>Java</strong>, mas nós pretendemos dar suporte a mais linguagems no futuro.</p>"
  4 + body_feedback_home_index_html: "Mezuro está sob constante desenvolvimento. Experimente e nos dê o seu %{href}."
  5 + latest_projects: "Últimos projetos"
config/locales/views/kalibro_configuration/en.yml 0 → 100644
@@ -0,0 +1,10 @@ @@ -0,0 +1,10 @@
  1 +en:
  2 + activemodel:
  3 + models:
  4 + kalibro_configuration:
  5 + one: Configuration
  6 + other: Configurations
  7 + attributes:
  8 + kalibro_configuration:
  9 + name: 'Name'
  10 + description: 'Description'
0 \ No newline at end of file 11 \ No newline at end of file
config/locales/views/kalibro_configuration/pt.yml 0 → 100644
@@ -0,0 +1,10 @@ @@ -0,0 +1,10 @@
  1 +pt:
  2 + activemodel:
  3 + models:
  4 + kalibro_configuration:
  5 + one: Configuração
  6 + other: Configurações
  7 + attributes:
  8 + kalibro_configuration:
  9 + name: 'Nome'
  10 + description: 'Descrição'
0 \ No newline at end of file 11 \ No newline at end of file
config/locales/views/kalibro_range/en.yml 0 → 100644
@@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
  1 +en:
  2 + activemodel:
  3 + models:
  4 + kalibro_range:
  5 + one: Range
  6 + other: Ranges
  7 + attributes:
  8 + kalibro_range:
  9 + reading: 'Reading'
  10 + beginning: 'Beginning'
  11 + end: 'End'
  12 + comments: 'Comments'
  13 + hints:
  14 + kalibro_range:
  15 + reading: 'The %{reading_href} associated with this %{range_href}.'
  16 + beginning: "This Range's lower limit."
  17 + end: "This Range's upper limit."
  18 + comments: 'An explanation of why you chose this interval, with that reading for this %{metric_href}.'
  19 + errors:
  20 + kalibro_range:
  21 + no_readings: 'You must have Readings within your associated Reading Group to create a new Range.'
  22 + reading_group_belongs_to_another: 'The Reading Group of your Metric Configuration belongs to another user and you are not allowed to modify it.'
0 \ No newline at end of file 23 \ No newline at end of file
config/locales/views/kalibro_range/pt.yml 0 → 100644
@@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
  1 +pt:
  2 + activemodel:
  3 + models:
  4 + kalibro_range:
  5 + one: Intervalo
  6 + other: Intervalos
  7 + attributes:
  8 + kalibro_range:
  9 + reading: 'Leitura'
  10 + beginning: 'Início'
  11 + end: 'Fim'
  12 + comments: 'Comentários'
  13 + hints:
  14 + kalibro_range:
  15 + reading: 'A %{reading_href} associada a este %{range_href}.'
  16 + beginning: "Limite inferior de um Intervalo."
  17 + end: "Limite superior de um Intervalo."
  18 + comments: 'Uma explicação do porquê você escolheu este Intervalo, com esta Leitura para esta %{metric_href}.'
  19 + errors:
  20 + kalibro_range:
  21 + no_readings: 'Você deve ter Leituras associadas ao Grupo de Leitura para criar um novo intervalo.'
  22 + reading_group_belongs_to_another: 'O Grupo de Leitura da sua Configuração de Métrica pertence a outro usuário e você não tem permissão para modificá-lo.'
0 \ No newline at end of file 23 \ No newline at end of file
config/locales/views/layouts/en.yml 0 → 100644
@@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
  1 +en:
  2 + hello_html: "Hello, %{user}"
  3 + instant_loading_page: "Wait an instant while we are loading the page that you have requested."
  4 + home: "Home"
  5 + edit_account: "Edit Account"
  6 + sign_out: "Sign Out"
  7 + sign_in: "Sign In"
  8 + sign_up: "Sign Up"
config/locales/views/layouts/pt.yml 0 → 100644
@@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
  1 +pt:
  2 + hello_html: "Olá, %{user}"
  3 + instant_loading_page: "Espere um instante enquanto estamos carregando a página que você solicitou."
  4 + home: "Início"
  5 + edit_account: "Editar Conta"
  6 + sign_out: "Sair"
  7 + sign_in: "Entrar"
  8 + sign_up: "Inscrever-se"
config/locales/views/metric_configurations/en.yml 0 → 100644
@@ -0,0 +1,40 @@ @@ -0,0 +1,40 @@
  1 +en:
  2 + weighted_average_metric_configurations_form: "It is used to calculate the weighted average of a"
  3 + statistical_result_metric_configurations_form: "It is the calculation of statistical results for higher"
  4 + modules_eg_metric_configurations_form: " modules (e.g., average lines of code of the classes inside a package)."
  5 + associated_metric_configuration_form_html: "The %{href} associated with this metric."
  6 + range_metric_configurations_no_ranges: "There are no Ranges yet!"
  7 + editing_metric_configuration: "Editing Metric Configuration"
  8 + new_metric_configuration: "New Metric Configuration"
  9 + metric_configurations_base: "Base Tool:"
  10 + metric_configuration_name: "Metric Name:"
  11 + metric_configurations_description: "Metric Description:"
  12 + metric_configurations_base_tool_name: "Base Tool Name:"
  13 + metric_configurations_aggregation: "Aggregation Form"
  14 + metric_configurations_reading_group: "Reading Group Name"
  15 + no_metric_configurations: "There are no Metric Configurations yet!"
  16 + destroy_metric_configuration: "Destroy Metric Configuration"
  17 + want_destroy_metric_configuration: "Are you sure that you want to destroy this Metric Configuration?"
  18 + metric_base_tool_name: "Base Tool Name"
  19 + metric_language: "Language"
  20 + metric_scope: "Scope"
  21 + metric_aggregation_form: "Aggregation Form"
  22 + reading_group_name: "Reading Group Name"
  23 + calculate_weighted_average_html: "It is used to calculate the weighted average of a %{href}'s grade"
  24 + aggregation_form_helper_html: "It is the calculation of statistical results for higher %{href} modules (e.g., average lines of code of the classes inside a package)."
  25 + reading_group_helper_html: "The %{href} associated with this metric."
  26 + no_models: "There are no %{model} yet!"
  27 + choose_metric: "Choose a metric from a Base Tool:"
  28 + scopes:
  29 + METHOD: "Method"
  30 + CLASS: "Class"
  31 + PACKAGE: "Package"
  32 + SOFTWARE: "Software"
  33 + aggregation_forms:
  34 + AVERAGE: "Average"
  35 + MEDIAN: "Median"
  36 + MAXIMUM: "Maximum"
  37 + MINIMUM: "Minimum"
  38 + COUNT: "Count"
  39 + STANDARD_DEVIATION: "Standard Deviation"
  40 +
config/locales/views/metric_configurations/pt.yml 0 → 100644
@@ -0,0 +1,51 @@ @@ -0,0 +1,51 @@
  1 +pt:
  2 + activemodel:
  3 + models:
  4 + metric_configuration:
  5 + one: Configuração de Métrica
  6 + other: Configurações de Métricas
  7 + attributes:
  8 + metric_configuration:
  9 + metric: Métrica
  10 + weight: Peso
  11 + aggregation_form: Forma de Agregação
  12 + reading_group_id: Grupo de Leitura
  13 + weighted_average_metric_configurations_form: "Ele é usado para calcular a média ponderada de um"
  14 + statistical_result_metric_configurations_form: "É o cálculo dos resultados estatísticos para maior"
  15 + modules_eg_metric_configurations_form: "módulos (por exemplo, as linhas médias de código das classes dentro de um pacote)."
  16 + associated_metric_configuration_form_html: "O %{href} associado a esta métrica."
  17 + range_metric_configurations_no_ranges: "Ainda não existem intervalos!"
  18 + editing_metric_configuration: "Edição de configuração da Métrica"
  19 + new_metric_configuration: "Nova Configuração de Métrica"
  20 + metric_configurations_base: "Ferramenta de Base de Dados:"
  21 + metric_configuration_name: "Nome da Métrica:"
  22 + metric_configurations_description: "Descrição da métrica:"
  23 + metric_configurations_base_tool_name: "Nome da ferramenta base:"
  24 + metric_configurations_aggregation: "Forma de Agregação"
  25 + metric_configurations_reading_group: "Nome do grupo"
  26 + no_metric_configurations: "Não há configurações de métricas ainda!"
  27 + destroy_metric_configuration: "Destruir Configuração de Métrica"
  28 + want_destroy_metric_configuration: "Tem certeza que você quer destruir esta Configuração de Métrica?"
  29 + metric_base_tool_name: "Coletor"
  30 + metric_language: "Linguagem"
  31 + metric_scope: "Escopo"
  32 + metric_aggregation_form: "Forma de Agregação"
  33 + reading_group_name: "Nome do Grupo de Leitura"
  34 + calculate_weighted_average_html: "É usado para calcular a média ponderada das notas de um %{href}"
  35 + aggregation_form_helper_html: "É o cálculo dos resultados estatísticos para módulos de maior %{href} (por exemplo número médio de linhas das classes dentro de um pacote)"
  36 + reading_group_helper_html: "O %{href} associado com esta métrica."
  37 + no_models: "Não há %{model} ainda!"
  38 + choose_metric: "Escolha uma métrica de um Coletor:"
  39 + scopes:
  40 + METHOD: "Método"
  41 + CLASS: "Classe"
  42 + PACKAGE: "Pacote"
  43 + SOFTWARE: "Software"
  44 + aggregation_forms:
  45 + AVERAGE: "Média"
  46 + MEDIAN: "Mediana"
  47 + MAXIMUM: "Máxima"
  48 + MINIMUM: "Mínima"
  49 + COUNT: "Contagem"
  50 + STANDARD_DEVIATION: "Desvio Padrão"
  51 +
config/locales/views/modules/en.yml 0 → 100644
@@ -0,0 +1,6 @@ @@ -0,0 +1,6 @@
  1 +---
  2 +en:
  3 + value: Value
  4 + threshold: Threshold
  5 + only_point_printed_chart: There is only one point and it will not be printed into
  6 + a chart.
config/locales/views/modules/pt.yml 0 → 100644
@@ -0,0 +1,4 @@ @@ -0,0 +1,4 @@
  1 +en:
  2 + value: "Valor"
  3 + threshold: "Limite"
  4 + only_point_printed_chart: "Há apenas um ponto e não vai ser impresso em um gráfico."
config/locales/views/processing/en.yml 0 → 100644
@@ -0,0 +1,10 @@ @@ -0,0 +1,10 @@
  1 +en:
  2 + activemodel:
  3 + models:
  4 + processing:
  5 + one: Processing
  6 + other: Processings
  7 + attributes:
  8 + processing:
  9 + state: 'State'
  10 + creation_date: 'Creation Date'
0 \ No newline at end of file 11 \ No newline at end of file
config/locales/views/processing/pt.yml 0 → 100644
@@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
  1 +pt:
  2 + activemodel:
  3 + models:
  4 + kalibro_range:
  5 + one: Intervalo
  6 + other: Intervalos
  7 + attributes:
  8 + kalibro_range:
  9 + reading: 'Leitura'
  10 + beginning: 'Início'
  11 + end: 'Fim'
  12 + comments: 'Comentários'
  13 + hints:
  14 + kalibro_range:
  15 + reading: 'A %{reading_href} associada a este %{range_href}.'
  16 + beginning: "Limite inferior de um Intervalo."
  17 + end: "Limite superior de um Intervalo."
  18 + comments: 'Uma explicação do porquê você escolheu este Intervalo, com esta Leitura para esta %{metric_href}.'
  19 + errors:
  20 + kalibro_range:
  21 + no_readings: 'Você deve ter Leituras associadas ao Grupo de Leitura para criar um novo intervalo.'
  22 + reading_group_belongs_to_another: 'O Grupo de Leitura da sua Configuração de Métrica pertence a outro usuário e você não tem permissão para modificá-lo.'
0 \ No newline at end of file 23 \ No newline at end of file
config/locales/views/projects/en.yml 0 → 100644
@@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
  1 +en:
  2 + activemodel:
  3 + models:
  4 + project:
  5 + one: "Project"
  6 + other: "Projects"
  7 + attributes:
  8 + project:
  9 + name: "Name"
  10 + description: "Description"
  11 + new_project: "New Project"
  12 + edit_project: "Edit Project"
  13 + your_projects: "Your projects"
  14 + new_project: "New Project"
  15 + destroy_project: "Destroy Project"
  16 + want_destroy_project: "Are you sure that you want to destroy this Project?"
  17 + image_url: "Image URL"
  18 + all_projects: "All Projects"
  19 + no_repositories: "There are no Repositories yet!"
config/locales/views/projects/pt.yml 0 → 100644
@@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
  1 +pt:
  2 + activemodel:
  3 + models:
  4 + project:
  5 + one: "Projeto"
  6 + other: "Projetos"
  7 + attributes:
  8 + project:
  9 + name: "Nome"
  10 + description: "Descrição"
  11 + new_project: "Criar Projeto"
  12 + edit_project: "Editar Projeto"
  13 + your_projects: "Seus projetos"
  14 + new_project: "Novo Projeto"
  15 + destroy_project: "Destruir Projeto"
  16 + want_destroy_project: "Você tem certeza de que quer destruir este projeto?"
  17 + image_url: "URL da imagem"
  18 + all_projects: "Todos os Projetos"
  19 + no_repositories: "Não há repositórios ainda!"
config/locales/views/pt.yml 0 → 100644
@@ -0,0 +1,319 @@ @@ -0,0 +1,319 @@
  1 +# Files in the config/locales directory are used for internationalization
  2 +# and are automatically loaded by Rails. If you want to use locales other
  3 +# than English, add the necessary files in this directory.
  4 +#
  5 +# To use the locales, use `I18n.t`:
  6 +#
  7 +# I18n.t 'hello'
  8 +#
  9 +# In views, this is aliased to just `t`:
  10 +#
  11 +# <%= t('hello') %>
  12 +#
  13 +# To use a different locale, set it with `I18n.locale`:
  14 +#
  15 +# I18n.locale = :es
  16 +#
  17 +# This would use the information in config/locales/es.yml.
  18 +#
  19 +# To learn more, please read the Rails Internationalization guide
  20 +# available at http://guides.rubyonrails.org/i18n.html.
  21 +
  22 +pt:
  23 + #commons
  24 + show: "Mostrar"
  25 + edit_model: "Editar %{model}"
  26 + edit: "Editar"
  27 + edit_user: "Editar Usuário"
  28 + end: "Fim"
  29 + the: "A"
  30 + of_the: "dos"
  31 + and: "e"
  32 + name: "Nome"
  33 + label: "Rótulo"
  34 + scope: "Escopo"
  35 + code: "Código"
  36 + reading_group: "Grupo de Leitura"
  37 + reading_groups: "Grupos de Leitura"
  38 + project: "Projeto"
  39 + projects: "Projetos"
  40 + configuration: "Configuração"
  41 + configurations: "Configurações"
  42 + module: "Módulo"
  43 + weight: "Peso"
  44 + description: "Descrição"
  45 + beginning: "Início"
  46 + range: "Intervalo"
  47 + ranges: "Intervalos"
  48 + language: "Linguagem"
  49 + new_project: "Novo Projeto"
  50 + no_description: "Não há descrição disponível."
  51 + welcome: "Bem-Vindo"
  52 + metrics: "Métricas"
  53 + value: "Valor"
  54 + threshold: "limite"
  55 + granularity: "Granularidade"
  56 + repositories: "Repositórios"
  57 + type: "Tipo"
  58 + address: "Endereço"
  59 + script: "Script"
  60 + add_range: "Adicionar Intervalo"
  61 + back: "Voltar"
  62 + destroy: "Destruir"
  63 + save: "Salvar"
  64 + color: "Cor"
  65 + a: "A"
  66 + state: "Estado"
  67 + license: "Licença"
  68 + periodicity: "Periodicidade"
  69 + reprocess: "Reprocessar"
  70 + tutorial: "Tutorial"
  71 + requisites: "Requisitos"
  72 + have: "Ter"
  73 + signed_up: "inscrever-se"
  74 + signed_in: "logado"
  75 + be: "ser"
  76 + steps: "Passos"
  77 + details: "Detalhes"
  78 + instroduction: "Introdução"
  79 + keywords: "Palavras-chave"
  80 + reading: "Leitura"
  81 + readings: "Leituras"
  82 + analysis: "Análise"
  83 + feedback: "feedback"
  84 + update: "Atualizar"
  85 + configuring: "Configurando"
  86 + tutorials: "Tutoriais"
  87 + password: "Senha"
  88 + password_confirmation: "Confirmar Senha"
  89 + remember_me: "Lembrar-me"
  90 + day: "Dia"
  91 + month: "Mês"
  92 + year: "Ano"
  93 + search: "Procurar"
  94 + new:
  95 + male: 'Novo'
  96 + female: 'Nova'
  97 + create: 'Criar %{model}'
  98 + add: 'Adicionar'
  99 + sure_destroy: 'Você tem certeza que deseja apagar este(a) %{model}?'
  100 +
  101 + #this pattern is type_folder_file
  102 + choose_metric: "Escolha uma métrica a partir de uma ferramenta Base:"
  103 + created_metrics: "Métricas Criadas"
  104 + resend_instruction: "Reenviar instruções de confirmação"
  105 + confirm_account_email: "Você pode confirmar a sua conta de e-mail através do link abaixo:"
  106 + request_change_password: "Alguém pediu um link para alterar sua senha. Você pode fazer isso através do link abaixo:"
  107 + ignore_email: "Se você não solicitou este e-mail, por favor ignore-o."
  108 + password_not_change: "Sua senha não será alterada até que você acesse o link acima e crie uma nova senha."
  109 + account_locked: "Sua conta foi bloqueada devido a um número excessivo de tentativas de login sem sucesso."
  110 + link_unlock_account: "Clique no link abaixo para desbloquear sua conta:"
  111 + change_password: "Mudando sua senha"
  112 + forgot_password: "Esqueceu sua senha?"
  113 + email_address: "O mesmo endereço de e-mail usado para se inscrever."
  114 + full_name: "Seu nome completo."
  115 + email_communication_channel: "Seu e-mail é o nosso canal de comunicação. Certifique-se de que você digitou-o corretamente."
  116 + password_rules: "Sua senha deve ter pelo menos 8 caracteres. Senhas fortes devem conter números, símbolos, caracteres maiúsculos e caracteres minúsculos."
  117 + confirm_password: "Confirme sua senha"
  118 + current_password_changes: "Sua senha atual é necessária para confirmar as alterações."
  119 + cancel_account: "Cancelar a minha conta"
  120 + unhappy: "Infeliz?"
  121 + login_mezuro: "Entrar no Mezuro"
  122 + forgot_password_follow: "Se você esqueceu sua senha, siga este"
  123 + reset_it: "redefini-la."
  124 + stay_logged: "Fique conectado."
  125 + resend_unclok_instructions: "Reenviar instruções para desbloquear"
  126 + grade: "Nota"
  127 + edit_configuration: "Editar configurações"
  128 + must_logged_configuration: "Você precisa estar logado para criar novas configurações."
  129 + new_configuration: "Nova Configuração"
  130 + measured_metric_html: "A %{href} dos %{href2} medidos por esta métrica."
  131 + change_password: "Mude sua senha"
  132 + range_lower_limit: "Limite de intervalo inferior."
  133 + range_upper_limit: "Limite de intervalo superior."
  134 + explanation_chose_interval: "Uma explicação do porquê você escolheu este intervalo, com que a leitura para este"
  135 + readings_associated_reading_group: "Você deve ter leituras associadas dentro de seus grupos de leitura para criar um novo intervalo."
  136 + user_no_allowed_modify: "O Grupo de Leitura da configuração de métrica pertence a outro usuário e você não tem permissão para modificá-lo."
  137 + edit_range: "Edite o intervalos"
  138 + new_range: "Novo intervalo"
  139 + new_reading: "Nova Leitura"
  140 + only_point_printed_chart: "Há apenas um ponto e não vai ser impresso em um gráfico."
  141 + edit_project: "Edite o Projeto"
  142 + must_logged_create_projetcs: "Você precisa estar logado para criar novos projetos."
  143 + there_readings_yet: "Ainda não existem leituras!"
  144 + edit_reading_group: "Edite Grupos de Leitura"
  145 + must_logged_create_reading_groups: "Você precisa estar logado para criar novos grupos de leitura."
  146 + new_reading_group: "Novo Grupo de Leitura"
  147 +
  148 + confirm_my_account: "Confirme sua conta"
  149 + change_my_password: "Alterar a senha"
  150 + unlock_my_account: "Desbloquear a minha conta"
  151 + new_password: "Nova senha"
  152 + confirm_new_password: "Confirme nova senha"
  153 + send_reset_password_instructions: "Envie-me instruções de senha"
  154 + really_want_cancel_account: "Você realmente deseja cancelar sua conta?"
  155 + received_confirmation_instructions: "Você recebeu instruções de confirmação?"
  156 + received_unlock_instructions: "Você recebeu instruções de desbloqueio?"
  157 + your_projects: "Seus projetos"
  158 + mezuro_team: "A Equipe Mezuro"
  159 + want_destroy_range: "Tem certeza que você quer destruir este Intervalo?"
  160 + add_metric: "Adicionando Métrica"
  161 + destroy_configuration: "Destruindo Configuração"
  162 + want_destroy_configuration: "Tem certeza que você quer destruir esta configuração?"
  163 + new_project: "Novo Projeto"
  164 + destroy_projects: "Destruindo um Projeto"
  165 + want_destroy_project: "Tem certeza que você quer destruir este projeto?"
  166 + want_destroy_reading: "Tem certeza que você quer destruir esta leitura?"
  167 + grade_show: "Nota"
  168 + destroy_reading_group: "Destruindo Grupo de Leitura"
  169 + highlighting_interpretation: "É uma forma concisa verbal de destacar o conteúdo de uma interpretação."
  170 + example_values_bad: "Exemplo de valores: terrível, ruim, regular, bom, ótimo, etc."
  171 + choose_hexadecimal_picker: "É uma forma visual de destaque para uma interpretação. Você pode escolher uma digitando seu valor hexadecimal ou usando o seletor de cores."
  172 + example_values: "Exemplo de Valores: 000000, 00ff00, entre outros."
  173 + number_classify_reading: "Um número para classificar esta leitura."
  174 + editing_reading: "Edição de Leitura"
  175 + name_repository: "O nome do seu repositório."
  176 + short_description_repository: "Uma breve descrição de seu repositório."
  177 + code_license: "A licença do código-fonte."
  178 + version_system_repository_uses: "O sistema de controle de versão que o repositório utiliza."
  179 + URL_repository_located: "A URL onde o repositório está localizado."
  180 + select_repository_reprocessed: "Selecione a frequência com que o repositório será reprocessado."
  181 + define_metrics_calculated: "define todas as métricas a serem calculados no código-fonte. Escolha a sua!"
  182 + repository_returned: "Processo retornou um repositório com erro. Não há resultados de métricas."
  183 + repository_process_returned_module: "Processo retornou um repositório com erro. Não há árvore de módulos."
  184 + creation_date: "Data de criação:"
  185 + repository_no_processings: "Este repositório não tem processamentos ainda. Por favor, aguarde um instante enquanto ele é iniciado."
  186 + loading_data: "Carregando dados. Por favor, aguarde."
  187 + editing_repository: "Editando Repositório"
  188 + new_repository: "Novo Repositório"
  189 + closest_processing_information: "Recuperar as informações do processamento mais próximo de:"
  190 + want_destroy_repository: "Tem certeza que você quer destruir este repositório?"
  191 + analyzing_repository: "Analisando um repositório"
  192 + order_created_project: "A fim de criar um projeto, você deve:"
  193 + repository_which_analyse: "E tem uma URL do repositório que você deseja analisar"
  194 + project_creation: "Criando um projeto"
  195 + project_upper_menu: "Clique em 'Projeto' no menu superior"
  196 + click_new_project: "Clique em novo projeto"
  197 + fill_name_unique: "Preencha o formulário com um nome que deve ser único"
  198 + description_required: "Preencha o formulário com a descrição"
  199 + click_save_project: "Clique em Salvar. Agora você deve estar na página do projeto, parabéns!"
  200 + repository_creation: "Criando um repositório"
  201 + project_page_click_new_repository: "A partir da página do projeto, clique em Novo Repositório"
  202 + fill_form: "Preencha o formulário"
  203 + name_must_unique: "O nome deve ser exclusivo"
  204 + open_source_licenses: "Você deve escolher uma das licenças Open Source na plataforma de acordo com o seu código"
  205 + repository_source_management: "O campo 'Tipo' está relacionado com a ferramenta de controle de versão do código (Git, por exemplo)"
  206 + fill_URL_which_can_download: "Preencha o Endereço com a URL a partir da qual podemos fazer o download do código"
  207 + analyse_project_periodically: "Se você quiser analisar seu projeto periodicamente, configure-o (você pode também executá-lo a partir da interface sempre que quiser)"
  208 + configuration_metric_interpretation: "Por fim, a configuração representa o conjunto de métricas e interpretações que vamos usar para analisar o seu projeto"
  209 + should_repository_page_analysis: "Clique em Salvar e você deve estar na página de repositório, esperando a análise"
  210 + repository_details: "Detalhes da página do repositório"
  211 + repository_divided_diferent_sections: "A página de repositório é dividida em quatro seções diferentes:"
  212 + provided_creation_steps: "A informação que você forneceu durante as etapas de criação"
  213 + visualize_processings_repository: "Selecione a caixa de modo que seja possível visualizar processamentos anteriores do seu repositório"
  214 + processing_information: "Informação de processamento"
  215 + time_finish_processing: "Informações sobre o tempo que cada etapa do processamento levou para concluir"
  216 + reserving_folder_repository: "PREPARAÇÃO: o sistema está reservando uma pasta para seu repositório e recuperando a configuração"
  217 + retrieving_source_code: "DOWNLOAD: recuperando o código-fonte"
  218 + calculationg_metric_repository: "COLETA: cálculo das métricas para o repositório"
  219 + results_source_structure: "BUILDING: organiza os resultados em uma estrutura de árvore"
  220 + calculating_aggregated_parent: "AGREGANDO: cálculo do valor agregado para os módulos pai presentes na árvore do código de origem"
  221 + chosen_configuration_compound_metrics: "CÁLCULO: se a configuração escolhida tem métricas compostas, elas serão calculadas"
  222 + system_interpret_reading_groups: "INTERPRETAÇÃO: com todos os resultados necessários, o sistema irá interpretá-los utilizando grupos de leitura (rótulos e cores)"
  223 + modules_tree: "Árvore de Módulos"
  224 + tree_structure: "Estrutura de árvore do código em que você pode navegar, clicando nos nomes"
  225 + information_granulary_module: "Informação sobre a granularidade do módulo"
  226 + method: "MÉTODO"
  227 + method2: "Método"
  228 + class: "CLASSE"
  229 + class2: "Classe"
  230 + package: "PACOTE"
  231 + packege2: "Pacote"
  232 + software: "SOFTWARE"
  233 + software2: "Software"
  234 + given_module_weights: "Nota do módulo de dados de acordo com os pesos das métricas dados na sua configuração"
  235 + metric_results: "Resultado das Métricas"
  236 + metric_result: "resultado das métricas"
  237 + metric_result2: "Resultado da Métrica"
  238 + metric_current_selected_tree: "Exibe os resultados individuais de cada métrica para o módulo atual selecionado na árvore de código"
  239 + historic_chart_metric: "Ao clicar sobre o nome da métrica, você vai ver um gráfico do histórico dessa métrica"
  240 + setting_new_configuration: "Criando uma nova configuração"
  241 + order_create_configuration: "Para criar uma configuração, é necessário:"
  242 + to_platform: "para a plataforma"
  243 + already_reading_group: "Já ter criado pelo menos um Grupo de Leitura"
  244 + repository_mezuro_configurations: "Para processar um repositório, o Mezuro utiliza configurações que você especifica no"
  245 + briefly_components_configuration: ". Aqui você será apresentado brevemente a todos os componentes de uma configuração e, em seguida, será guiado através dos passos para criar uma nova configuração"
  246 + configuration_components: "Componentes de Configuração"
  247 + remaining_components_association: ": Apenas um contêiner de alto nível para a associação componentes restantes"
  248 + processing_interpret_results: ": Especificação de quais métricas serão calculadas durante o processamento e como interpretar seus resultados"
  249 + metric_final_grade: "Peso: para cada módulo é dado 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"
  250 + according_field_specifies: "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"
  251 + reading_group_specifies_interpretations: "Grupo de Leitura: especifica qual conjunto de interpretações (chamados leituras) estará disponível para esta métrica"
  252 + container_readings: ": Apenas um contêiner de alto nível para as leituras (interpretações)"
  253 + interpretation_value_providing: "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"
  254 + associates_number_intervals: ": Associa intervalos numéricos para as leituras de uma determinada métrica"
  255 + configuration_creation: "Criando Configuração"
  256 + click_configuration: "Clique em Configuração no menu superior"
  257 + click_new_configuration: "Clique em nova configuração"
  258 + click_save_configuration_page: "Clique em Salvar e você será redirecionado para a página de configuração"
  259 + metric_addition: "Adicionando uma Métrica"
  260 + configuration_page: "A partir da página de configuração"
  261 + click_add_metric: "Clique em Adicionar Métrica"
  262 + collector_options: "Selecione um coletor das opções e clique na métrica que você deseja adicionar"
  263 + fill_with_calculate: "Preencha o formulário com um peso, utilizado para o cálculo da nota final"
  264 + select_aggregation_form: "Escolher a forma de agregação que irá ser utilizada para esta métrica"
  265 + select_reading_group: "Selecione o Grupo de Leitura, que irá fornecer as interpretações para essa métrica"
  266 + click_save_configuration_metric: "Clique em salvar e você deve estar na página de configuração agora com uma nova métrica adicionada"
  267 + ranges_creation: "Criação de Intervalos"
  268 + click_show_metric_create: "Clique em 'Show' para a métrica que você deseja criar intervalos"
  269 + click_add_range: "Clique em adicionar intervalo"
  270 + fill_beginning_end_values_interval: "Preencha o formulário com os valores de 'Início' e 'Fim' de cada intervalo"
  271 + fill_comments_displayed: "Preencha o formulário com os comentários, que serão exibidos se o valor da métrica corresponder ao intervalo"
  272 + select_reading_range: "Selecione a leitura que será associada a este intervalo"
  273 + click_save_metric_range: "Clique em salvar e você deve estar na página da métrica com o novo intervalo criado, parabéns!"
  274 + mezuro_levels_granularity: "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:"
  275 + generated_module: "Representa um fragmento do software. Cada nó da árvore processamento gerado pelo Kalibro Processor é um módulo e cada módulo tem uma"
  276 + numerical_intervals: "Representa intervalos numéricos que podem conter o valor calculado para uma métrica determinada"
  277 + ranges_combined_interpretations: ". Intervalos combinados com leituras fornecem interpretações para"
  278 + interpretation_given: "A interpretação dada a uma"
  279 + readings_combined: "(por exemplo, 'Good', 'Complex', 'A'). As leituras combinadas com intervalos fornecem interpretações para"
  280 + set_of: "Um conjunto de"
  281 + sense_grouped: "que faz sentido quando agrupadas (por exemplo, 'Bom' e 'Ruim', 'simples' e 'Complexo')."
  282 + collector_compond_metric: "É um resultado numérico associado a uma métrica pelo coletor ou agregar no caso de uma Métrica Composta"
  283 + sofware_metric_quantitative: "Uma métrica de software é uma medida quantitativa de alguma propriedade de uma"
  284 + more_details: ". Para mais detalhes veja"
  285 + kalibro_web_service: "Kalibro Web Service"
  286 + no_description_available: "Nenhuma descrição disponível"
  287 + create_new_reading: "Criar nova leitura"
  288 + process_period: "Período de processamento"
  289 + currently_waiting_confirmation: "Atualmente esperando confirmação de:"
  290 + leave_blank_wont_change: "(deixe-o em branco se não quiser mudá-lo.)"
  291 + pick_color: "Escolha a Cor"
  292 + password_confirmation: "Confirme sua senha"
  293 + current_password: "Senha Atual"
  294 + modules: "Módulos"
  295 + comments: "Comentários"
  296 + aggregation_form: "Forma de Agregação"
  297 + kalibro_configuration: "Configuração"
  298 + idiom: 'Idioma'
  299 +
  300 + #errors
  301 + errors:
  302 + messages:
  303 + not_saved: "Não foi possível salvar!"
  304 + activerecord:
  305 + messages:
  306 + models:
  307 + project:
  308 + successful: "Projeto criado com sucesso!"
  309 + errors:
  310 + models:
  311 + user:
  312 + attributes:
  313 + email:
  314 + taken: "Já existe um usuário cadastrado com este email."
  315 + invalid: "O e-mail inserido não é valido."
  316 + password:
  317 + too_short: "A senha fornecida é muito curta!"
  318 + password_confirmation:
  319 + confirmation: "As senhas fornecidas não são iguais."
config/locales/views/reading/en.yml 0 → 100644
@@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
  1 +en:
  2 + activemodel:
  3 + models:
  4 + reading:
  5 + one: Reading
  6 + other: Readings
  7 + attributes:
  8 + reading:
  9 + label: 'Label'
  10 + color: 'Color'
  11 + grade: 'Grade'
  12 + hints:
  13 + reading:
  14 + label: 'It is a verbal concise form of highlighting the content of an interpretation.'
  15 + label_example: 'Example values: terrible, bad, regular, good, great etc.'
  16 + color: "It is a visual form of highlighting an interpretation. You can choose one by typing its hexadecimal value or by using the color picker."
  17 + color_example: "Example values: 000000, 00ff00 etc."
  18 + grade: "A number to classify this reading."
config/locales/views/reading/pt.yml 0 → 100644
@@ -0,0 +1,18 @@ @@ -0,0 +1,18 @@
  1 +pt:
  2 + activemodel:
  3 + models:
  4 + reading:
  5 + one: Leitura
  6 + other: Leituras
  7 + attributes:
  8 + reading:
  9 + label: 'Rótulo'
  10 + color: 'Cor'
  11 + grade: 'Nota'
  12 + hints:
  13 + reading:
  14 + label: 'É uma forma concisa de descrever o conteúdo de uma avaliação.'
  15 + label_example: 'Valores de exemplo: terrível, ruim, regular, bom, ótimo etc.'
  16 + color: "É uma forma visual de destacar uma interpretação. Você pode escolher seu valor hexadecimal ou pela caixa de seleção."
  17 + color_example: "Valores de exemplo: 000000, 00ff00 etc."
  18 + grade: "Um número para classificar esta leitura."
0 \ No newline at end of file 19 \ No newline at end of file
config/locales/views/reading_group/en.yml 0 → 100644
@@ -0,0 +1,13 @@ @@ -0,0 +1,13 @@
  1 +en:
  2 + activemodel:
  3 + models:
  4 + reading_group:
  5 + one: Reading Group
  6 + other: Reading Groups
  7 + attributes:
  8 + reading_group:
  9 + name: 'Name'
  10 + description: 'Description'
  11 + errors:
  12 + reading_group:
  13 + no_readings: 'There are no Readings yet!'
config/locales/views/reading_group/pt.yml 0 → 100644
@@ -0,0 +1,13 @@ @@ -0,0 +1,13 @@
  1 +pt:
  2 + activemodel:
  3 + models:
  4 + reading_group:
  5 + one: Grupo de Leitura
  6 + other: Grupos de Leitura
  7 + attributes:
  8 + reading_group:
  9 + name: 'Nome'
  10 + description: 'Descrição'
  11 + errors:
  12 + reading_group:
  13 + no_readings: 'Ainda não existem Leituras!'
0 \ No newline at end of file 14 \ No newline at end of file
config/locales/views/repository/en.yml 0 → 100644
@@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
  1 +en:
  2 + activemodel:
  3 + models:
  4 + repository:
  5 + one: Repository
  6 + other: Repositories
  7 + attributes:
  8 + repository:
  9 + name: 'Name'
  10 + description: 'Description'
  11 + license: 'License'
  12 + scm_type: 'Type'
  13 + address: 'Address'
  14 + period: 'Period'
  15 + hints:
  16 + repository:
  17 + name: 'The name of your Repository.'
  18 + description: 'A short description of your Repository.'
  19 + license: "The source code's license."
  20 + scm_type: 'The version control system the Repository uses.'
  21 + address: 'The URL where the Repository is located.'
  22 + period: 'Select how often the Repository will be reprocessed.'
  23 + kalibro_configuration: 'A %{configuration_href} defines all the metrics to be calculated in the source code. Choose your weapon!'
  24 + errors:
  25 + repository:
  26 + no_metric_results: 'Repository process returned with error. There are no metric results.'
  27 + no_modeule_tree: 'Repository process returned with error. There is no module tree.'
  28 + unstarted_processing: "This Repository has no processings yet. Please, wait an instant as we start it."
  29 + repository:
  30 + show:
  31 + reprocess: 'Reprocess'
  32 + processing_information: 'Processing Information'
  33 + modules_tree: 'Modules Tree'
  34 + metric_results: 'Metric Results'
  35 + loading: 'Loading data. Please, wait.'
  36 + date_processing: 'Retrieve the closest processing information from'
0 \ No newline at end of file 37 \ No newline at end of file
config/locales/views/repository/pt.yml 0 → 100644
@@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
  1 +pt:
  2 + activemodel:
  3 + models:
  4 + repository:
  5 + one: Repositório
  6 + other: Repositórios
  7 + attributes:
  8 + repository:
  9 + name: 'Nome'
  10 + description: 'Descrição'
  11 + license: 'Licensa'
  12 + scm_type: 'Tipo'
  13 + address: 'endereço'
  14 + period: 'Período'
  15 + hints:
  16 + repository:
  17 + name: 'O nome do seu Repositório.'
  18 + description: 'Uma descrição breve do seu Repositório.'
  19 + license: "A licensa do código-fonte."
  20 + scm_type: 'O controlador de versão utilizado pelo Repositório.'
  21 + address: 'A URL onde o respositório está acessível.'
  22 + period: 'Selecione o quão frequentemente o repositório será reprocessado.'
  23 + kalibro_configuration: 'Uma %{configuration_href} define todas as métricas a serem extraídas do códifo-fonte.'
  24 + errors:
  25 + repository:
  26 + no_metric_results: 'O processamento do Repósitório retornou um erro. Não há Resultados de Métrica.'
  27 + no_modeule_tree: 'Repository process returned with error. Não há uma Árvore de Módulos.'
  28 + unstarted_processing: "Este Repositório ainda não tem Processamentos. Por favor, aguarde um instante enquanto o iniciamos."
  29 + repository:
  30 + show:
  31 + reprocess: 'Reprocessar'
  32 + processing_information: 'Informação do Processamento'
  33 + modules_tree: 'Árvore de Módulos'
  34 + metric_results: 'Resultados de Métrica'
  35 + loading: 'Carregando os dados. Por favor, aguarde.'
  36 + date_processing: 'Obtenha a informação de processamento mais próxima a'
0 \ No newline at end of file 37 \ No newline at end of file
config/locales/views/shared/en.yml 0 → 100644
@@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
  1 +en:
  2 + about_mezuro: "About Mezuro"
  3 + about_mezuro_body_html: "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>Here you can try the front-end, which we call Prezento. It interacts with the %{href} and %{href2}. 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."
config/locales/views/shared/pt.yml 0 → 100644
@@ -0,0 +1,3 @@ @@ -0,0 +1,3 @@
  1 +pt:
  2 + about_mezuro: "Sobre Mezuro"
  3 + about_mezuro_body_html: "O projeto Mezuro tenta prover uma plataforma para comparar técnicas de projetos e métricas, ensinando como usar métricas através de configurações e análise de código, evitando débitos técnicos e disseminando o uso e entendimento de métricas de código.<br>Aqui você pode experimentar a interface, que nós chamamos de Prezento. Ela interage com o %{href} e o %{href2}. A ideia é ser um serviço em que vocẽ pode avaliar a qualidade do seu código e, se você quiser, definir um conjunto de métricas a serem usadas."
config/routes.rb
1 Rails.application.routes.draw do 1 Rails.application.routes.draw do
2 - devise_for :users  
3 - get 'users/:user_id/projects' => 'users#projects', as: :user_projects  
4 -  
5 - resources :projects do  
6 - resources :repositories, except: [:update, :index]  
7 - get '/repositories/:id/modules/:module_result_id' => 'repositories#show', as: :repository_module  
8 - post '/repositories/:id/state' => 'repositories#state', as: :repository_state  
9 - post '/repositories/:id/state_with_date' => 'repositories#state_with_date', as: :repository_state_with_date  
10 - put '/repositories/:id' => 'repositories#update', as: :repository_update  
11 - get '/repositories/:id/process' => 'repositories#process_repository', as: :repository_process  
12 - end 2 + scope "(:locale)", locale: /en|pt/ do
  3 + devise_for :users
  4 + get 'users/:user_id/projects' => 'users#projects', as: :user_projects
  5 +
  6 + resources :projects do
  7 + resources :repositories, except: [:update, :index]
  8 + get '/repositories/:id/modules/:module_result_id' => 'repositories#show', as: :repository_module
  9 + post '/repositories/:id/state' => 'repositories#state', as: :repository_state
  10 + post '/repositories/:id/state_with_date' => 'repositories#state_with_date', as: :repository_state_with_date
  11 + put '/repositories/:id' => 'repositories#update', as: :repository_update
  12 + get '/repositories/:id/process' => 'repositories#process_repository', as: :repository_process
  13 + end
13 14
14 - resources :kalibro_configurations do  
15 - get '/metric_configurations/choose_metric' => 'metric_configurations#choose_metric', as: :choose_metric  
16 - resources :metric_configurations, except: [:update, :new] do  
17 - get '/kalibro_ranges/new' => 'kalibro_ranges#new', as: :new_kalibro_range  
18 - resources :kalibro_ranges, except: [:update, :new]  
19 - put '/kalibro_ranges/:id' => 'kalibro_ranges#update', as: :kalibro_range_update 15 + resources :kalibro_configurations do
  16 + get '/metric_configurations/choose_metric' => 'metric_configurations#choose_metric', as: :choose_metric
  17 + resources :metric_configurations, except: [:update, :new] do
  18 + get '/kalibro_ranges/new' => 'kalibro_ranges#new', as: :new_kalibro_range
  19 + resources :kalibro_ranges, except: [:update, :new]
  20 + put '/kalibro_ranges/:id' => 'kalibro_ranges#update', as: :kalibro_range_update
  21 + end
  22 + post '/metric_configurations/new' => 'metric_configurations#new', as: :new_metric_configuration
  23 + put '/metric_configurations/:id' => 'metric_configurations#update', as: :metric_configuration_update
  24 +
  25 + resources :compound_metric_configurations, except: [:destroy, :update]
  26 + put '/compound_metric_configurations/:id' => 'compound_metric_configurations#update', as: :compound_metric_configuration_update
20 end 27 end
21 - post '/metric_configurations/new' => 'metric_configurations#new', as: :new_metric_configuration  
22 - put '/metric_configurations/:id' => 'metric_configurations#update', as: :metric_configuration_update  
23 28
24 - resources :compound_metric_configurations, except: [:destroy, :update]  
25 - put '/compound_metric_configurations/:id' => 'compound_metric_configurations#update', as: :compound_metric_configuration_update  
26 - end 29 + resources :reading_groups do
  30 + resources :readings, except: [:index, :update, :show]
  31 + put '/readings/:id' => 'readings#update', as: :reading_update
  32 + end
27 33
28 - resources :reading_groups do  
29 - resources :readings, except: [:index, :update, :show]  
30 - put '/readings/:id' => 'readings#update', as: :reading_update  
31 - end 34 + #resources :modules
  35 + post '/modules/:id/metric_history' => 'modules#metric_history'
  36 + post '/modules/:id/tree' => 'modules#load_module_tree'
32 37
33 - #resources :modules  
34 - post '/modules/:id/metric_history' => 'modules#metric_history'  
35 - post '/modules/:id/tree' => 'modules#load_module_tree' 38 + # Tutorials
  39 + get '/tutorials/:name' => 'tutorials#view', as: 'tutorials'
36 40
37 - # Tutorials  
38 - get '/tutorials/:name' => 'tutorials#view', as: 'tutorials' 41 + root "home#index"
  42 + end
39 43
40 - root "home#index" 44 + get '/:locale' => 'home#index'
41 45
42 # The priority is based upon order of creation: first created -> highest priority. 46 # The priority is based upon order of creation: first created -> highest priority.
43 # See how all your routes lay out with "rake routes". 47 # See how all your routes lay out with "rake routes".
features/compound_metric_configuration/create.feature
@@ -13,18 +13,18 @@ Feature: Compound Metric Configuration Creation @@ -13,18 +13,18 @@ Feature: Compound Metric Configuration Creation
13 And I am at the Sample Configuration page 13 And I am at the Sample Configuration page
14 And I click the Add Metric link 14 And I click the Add Metric link
15 And I click the Compound Metric link 15 And I click the Compound Metric link
16 - When I click the "Created Metrics" h3  
17 Then I see the sample metric configuration name 16 Then I see the sample metric configuration name
18 And I see the sample metric configuration code 17 And I see the sample metric configuration code
19 When I fill the Name field with "My Compound Metric" 18 When I fill the Name field with "My Compound Metric"
20 And I fill the Description field with "Some description" 19 And I fill the Description field with "Some description"
21 And I fill the Code field with "mcm" 20 And I fill the Code field with "mcm"
22 - And I fill the Script field with "8*8;" 21 + And I fill the Script field with "return 8*8;"
23 And I fill the Weight field with "8" 22 And I fill the Weight field with "8"
24 And I set the select field "Scope" as "Class" 23 And I set the select field "Scope" as "Class"
25 And I set the select field "Reading Group" as "Scholar" 24 And I set the select field "Reading Group" as "Scholar"
26 And I press the Save button 25 And I press the Save button
27 - When I click the show link of "My Compound Metric" 26 + Then I should see "Compound Metric Configuration was successfully created."
  27 + And I click the show link of "My Compound Metric"
28 Then I should see "My Compound Metric" 28 Then I should see "My Compound Metric"
29 And I should see "mcm" 29 And I should see "mcm"
30 And I should see "8" 30 And I should see "8"
@@ -38,6 +38,7 @@ Feature: Compound Metric Configuration Creation @@ -38,6 +38,7 @@ Feature: Compound Metric Configuration Creation
38 And I have another compound metric configuration with code "Another_Code" within the given mezuro configuration 38 And I have another compound metric configuration with code "Another_Code" within the given mezuro configuration
39 And I am at the Sample Configuration page 39 And I am at the Sample Configuration page
40 And I click the Add Metric link 40 And I click the Add Metric link
  41 + And I take a picture of the page
41 And I click the Compound Metric link 42 And I click the Compound Metric link
42 When I fill the Name field with "My Compound Metric" 43 When I fill the Name field with "My Compound Metric"
43 And I fill the Description field with "Some description" 44 And I fill the Description field with "Some description"
features/homepage.feature
@@ -18,4 +18,12 @@ Feature: Homepage @@ -18,4 +18,12 @@ Feature: Homepage
18 And I should see "Sign Out" 18 And I should see "Sign Out"
19 And I should see "Latest projects" 19 And I should see "Latest projects"
20 And I should see "Project" 20 And I should see "Project"
21 - And I should see "Your projects"  
22 \ No newline at end of file 21 \ No newline at end of file
  22 + And I should see "Your projects"
  23 +
  24 + Scenario: Language selection
  25 + Given I am at the homepage
  26 + When I click the Idiom link
  27 + And I click the pt link
  28 + Then I should see "Entendendo Métricas de Código"
  29 + When I click the Idioma link
  30 + And I click the en link
23 \ No newline at end of file 31 \ No newline at end of file
features/kalibro_configuration/listing.feature
@@ -9,7 +9,7 @@ Feature: Configuration listing @@ -9,7 +9,7 @@ Feature: Configuration listing
9 Then I should see "Configurations" 9 Then I should see "Configurations"
10 And I should see "Name" 10 And I should see "Name"
11 And I should see "Description" 11 And I should see "Description"
12 - And I should see "You must be logged in to create new Configurations." 12 + And I should see "You must be logged in to create configurations."
13 13
14 @kalibro_configuration_restart 14 @kalibro_configuration_restart
15 Scenario: Should list the existing configurations 15 Scenario: Should list the existing configurations
@@ -18,7 +18,7 @@ Feature: Configuration listing @@ -18,7 +18,7 @@ Feature: Configuration listing
18 And I have a sample configuration 18 And I have a sample configuration
19 And I am at the All Configurations page 19 And I am at the All Configurations page
20 Then the sample configuration should be there 20 Then the sample configuration should be there
21 - And I should not see "You must be logged in to create new Configurations." 21 + And I should not see "You must be logged in to create configurations."
22 22
23 @kalibro_configuration_restart 23 @kalibro_configuration_restart
24 Scenario: Should show the existing configuration 24 Scenario: Should show the existing configuration
features/kalibro_range/create.feature
@@ -49,7 +49,7 @@ Feature: Create Kalibro Range @@ -49,7 +49,7 @@ Feature: Create Kalibro Range
49 And I should see "End" 49 And I should see "End"
50 And I should see "Comments" 50 And I should see "Comments"
51 And I should see "You must have Readings within your associated Reading Group to create a new Range." 51 And I should see "You must have Readings within your associated Reading Group to create a new Range."
52 - When I click the Create New Reading link 52 + When I click the Create Reading link
53 Then I should be at the New Reading page 53 Then I should be at the New Reading page
54 And I should see "Label" 54 And I should see "Label"
55 And I should see "Grade" 55 And I should see "Grade"
features/metric_configuration/delete.feature
@@ -11,7 +11,7 @@ Feature: Metric Configuration Deletion @@ -11,7 +11,7 @@ Feature: Metric Configuration Deletion
11 And I have a sample reading group 11 And I have a sample reading group
12 And I have a sample metric configuration within the given mezuro configuration 12 And I have a sample metric configuration within the given mezuro configuration
13 When I am at the Sample Configuration page 13 When I am at the Sample Configuration page
14 - And I click the Destroy link 14 + And I click destroy Metric Configuration
15 Then I should see "There are no Metric Configurations yet!" 15 Then I should see "There are no Metric Configurations yet!"
16 16
17 @kalibro_configuration_restart 17 @kalibro_configuration_restart
features/metric_configuration/listing.feature
@@ -7,7 +7,7 @@ Feature: Configuration listing @@ -7,7 +7,7 @@ Feature: Configuration listing
7 Scenario: When there are no metric configurations 7 Scenario: When there are no metric configurations
8 Given I have a sample configuration 8 Given I have a sample configuration
9 When I am at the Sample Configuration page 9 When I am at the Sample Configuration page
10 - Then I should see "Metric Name" 10 + Then I should see "Metric"
11 And I should see "Code" 11 And I should see "Code"
12 And I should see "Weight" 12 And I should see "Weight"
13 And I should see "There are no Metric Configurations yet!" 13 And I should see "There are no Metric Configurations yet!"
features/project/create.feature
@@ -5,7 +5,7 @@ Feature: Project Creation @@ -5,7 +5,7 @@ Feature: Project Creation
5 5
6 Scenario: Should not create project without login 6 Scenario: Should not create project without login
7 Given I am at the All Projects page 7 Given I am at the All Projects page
8 - Then I should not see "New Project" 8 + Then I should not see "Create Project"
9 9
10 @kalibro_processor_restart 10 @kalibro_processor_restart
11 Scenario: project creation 11 Scenario: project creation
@@ -44,7 +44,7 @@ Feature: Project Creation @@ -44,7 +44,7 @@ Feature: Project Creation
44 And I am at the homepage 44 And I am at the homepage
45 And I click the Your projects link 45 And I click the Your projects link
46 When I click the New Project link 46 When I click the New Project link
47 - Then I should see "New Project" 47 + Then I should see "Create Project"
48 48
49 @kalibro_processor_restart 49 @kalibro_processor_restart
50 Scenario: Choosing a name with whitespaces on the beginning and end 50 Scenario: Choosing a name with whitespaces on the beginning and end
features/project/listing.feature
@@ -9,7 +9,7 @@ Feature: Project listing @@ -9,7 +9,7 @@ Feature: Project listing
9 Then I should see "Projects" 9 Then I should see "Projects"
10 And I should see "Name" 10 And I should see "Name"
11 And I should see "Description" 11 And I should see "Description"
12 - And I should see "You must be logged in to create new Projects." 12 + And I should see "You must be logged in to create projects"
13 13
14 @kalibro_processor_restart 14 @kalibro_processor_restart
15 Scenario: Should list the existing projects 15 Scenario: Should list the existing projects
@@ -28,4 +28,4 @@ Feature: Project listing @@ -28,4 +28,4 @@ Feature: Project listing
28 And I have sample project_attributes 28 And I have sample project_attributes
29 And I am at the All Projects page 29 And I am at the All Projects page
30 When I click the Show link 30 When I click the Show link
31 - Then the sample project should be there  
32 \ No newline at end of file 31 \ No newline at end of file
  32 + Then the sample project should be there
features/reading/delete.feature
@@ -10,7 +10,7 @@ Feature: Reading Deletion @@ -10,7 +10,7 @@ Feature: Reading Deletion
10 And I own a sample reading group 10 And I own a sample reading group
11 And I have a sample reading within the sample reading group 11 And I have a sample reading within the sample reading group
12 When I visit the Sample Reading Group page 12 When I visit the Sample Reading Group page
13 - And I click the Destroy link 13 + And I choose the destroy reading link
14 Then I should see "There are no Readings yet!" 14 Then I should see "There are no Readings yet!"
15 15
16 @kalibro_configuration_restart 16 @kalibro_configuration_restart
@@ -20,4 +20,4 @@ Feature: Reading Deletion @@ -20,4 +20,4 @@ Feature: Reading Deletion
20 And I have a sample reading group 20 And I have a sample reading group
21 And I have a sample reading within the sample reading group 21 And I have a sample reading within the sample reading group
22 When I visit the Sample Reading Group page 22 When I visit the Sample Reading Group page
23 - Then I should not see "Destroy"  
24 \ No newline at end of file 23 \ No newline at end of file
  24 + Then I should not see "Destroy"
features/reading_group/create.feature
@@ -19,7 +19,7 @@ Scenario: Reading Group creation @@ -19,7 +19,7 @@ Scenario: Reading Group creation
19 Then I should see "My reading group" 19 Then I should see "My reading group"
20 And I should see "New reading group" 20 And I should see "New reading group"
21 And I should see "New Reading" 21 And I should see "New Reading"
22 - And I should see "Destroy Reading Group" 22 + And I should see "Destroy"
23 23
24 @kalibro_configuration_restart 24 @kalibro_configuration_restart
25 Scenario: Reading Group creation with already taken name 25 Scenario: Reading Group creation with already taken name
features/reading_group/delete.feature
@@ -23,6 +23,6 @@ Feature: Reading Group Deletion @@ -23,6 +23,6 @@ Feature: Reading Group Deletion
23 And I am signed in 23 And I am signed in
24 And I own a sample reading group 24 And I own a sample reading group
25 And I visit the Sample Reading Group page 25 And I visit the Sample Reading Group page
26 - When I click the Destroy Reading Group link 26 + When I click the Destroy link
27 Then I should see "New Reading Group" 27 Then I should see "New Reading Group"
28 And the Sample Reading Group should not be there 28 And the Sample Reading Group should not be there
features/reading_group/show.feature
@@ -25,7 +25,7 @@ Scenario: Should show the links for the user that owns the reading group @@ -25,7 +25,7 @@ Scenario: Should show the links for the user that owns the reading group
25 And I should see "New Reading" 25 And I should see "New Reading"
26 And I should see "Edit" 26 And I should see "Edit"
27 And I should see "Destroy" 27 And I should see "Destroy"
28 - And I should see "Destroy Reading Group" 28 + And I should see "Destroy"
29 29
30 @kalibro_configuration_restart 30 @kalibro_configuration_restart
31 Scenario: Should show the information of the sample reading 31 Scenario: Should show the information of the sample reading
features/repository/create.feature
@@ -16,7 +16,7 @@ Scenario: repository creation @@ -16,7 +16,7 @@ Scenario: repository creation
16 And I set the select field "Type" as "GIT" 16 And I set the select field "Type" as "GIT"
17 And I fill the Address field with "https://github.com/mezuro/kalibro_gem.git" 17 And I fill the Address field with "https://github.com/mezuro/kalibro_gem.git"
18 And I set the select field "Process Period" as "1 day" 18 And I set the select field "Process Period" as "1 day"
19 - And I set the select field "repository_kalibro_configuration_id" as "Java" 19 + And I set the select field "Kalibro Configuration" as "Java"
20 When I press the Save button 20 When I press the Save button
21 Then I should see the saved repository's content 21 Then I should see the saved repository's content
22 22
@@ -32,7 +32,7 @@ Scenario: repository creation blank validations @@ -32,7 +32,7 @@ Scenario: repository creation blank validations
32 And I set the select field "License" as "ISC License (ISC)" 32 And I set the select field "License" as "ISC License (ISC)"
33 And I set the select field "Type" as "GIT" 33 And I set the select field "Type" as "GIT"
34 And I set the select field "Process Period" as "1 day" 34 And I set the select field "Process Period" as "1 day"
35 - And I set the select field "repository_kalibro_configuration_id" as "Java" 35 + And I set the select field "Kalibro Configuration" as "Java"
36 When I press the Save button 36 When I press the Save button
37 Then I should see "Name can't be blank" 37 Then I should see "Name can't be blank"
38 And I should see "Address can't be blank" 38 And I should see "Address can't be blank"
@@ -51,7 +51,7 @@ Scenario: repository creation with name already taken @@ -51,7 +51,7 @@ Scenario: repository creation with name already taken
51 And I set the select field "Type" as "GIT" 51 And I set the select field "Type" as "GIT"
52 And I fill the Address field with "https://github.com/mezuro/kalibro_gem.git" 52 And I fill the Address field with "https://github.com/mezuro/kalibro_gem.git"
53 And I set the select field "Process Period" as "1 day" 53 And I set the select field "Process Period" as "1 day"
54 - And I set the select field "repository_kalibro_configuration_id" as "Java" 54 + And I set the select field "Kalibro Configuration" as "Java"
55 When I press the Save button 55 When I press the Save button
56 Then I should see "Name should be unique within project" 56 Then I should see "Name should be unique within project"
57 57
@@ -68,6 +68,6 @@ Scenario: Repository name with whitespaces @@ -68,6 +68,6 @@ Scenario: Repository name with whitespaces
68 And I set the select field "Type" as "GIT" 68 And I set the select field "Type" as "GIT"
69 And I fill the Address field with "https://github.com/mezuro/kalibro_gem.git" 69 And I fill the Address field with "https://github.com/mezuro/kalibro_gem.git"
70 And I set the select field "Process Period" as "1 day" 70 And I set the select field "Process Period" as "1 day"
71 - And I set the select field "repository_kalibro_configuration_id" as "Java" 71 + And I set the select field "Kalibro Configuration" as "Java"
72 When I press the Save button 72 When I press the Save button
73 Then I should see "Name should be unique within project" 73 Then I should see "Name should be unique within project"
features/repository/show/date_select.feature
@@ -9,8 +9,8 @@ Feature: Date Select @@ -9,8 +9,8 @@ Feature: Date Select
9 And I have a sample configuration with native metrics 9 And I have a sample configuration with native metrics
10 And I have a sample repository within the sample project 10 And I have a sample repository within the sample project
11 And I start to process that repository 11 And I start to process that repository
12 - And I wait for "60" seconds  
13 And I wait up for a ready processing 12 And I wait up for a ready processing
  13 + And I wait for "60" seconds
14 And I start to process that repository 14 And I start to process that repository
15 And I wait up for the last processing to get ready 15 And I wait up for the last processing to get ready
16 When I visit the repository show page 16 When I visit the repository show page
@@ -19,10 +19,10 @@ Feature: Date Select @@ -19,10 +19,10 @@ Feature: Date Select
19 And I set the select field "month" as "1" 19 And I set the select field "month" as "1"
20 And I set the select field "year" as "2013" 20 And I set the select field "year" as "2013"
21 And I press the Search button 21 And I press the Search button
22 - And I get the Creation date information as "before" 22 + And I get the Creation Date information as "before"
23 When I set the select field "day" as "1" 23 When I set the select field "day" as "1"
24 And I set the select field "month" as "1" 24 And I set the select field "month" as "1"
25 And I set the select field "year" as "2020" 25 And I set the select field "year" as "2020"
26 And I press the Search button 26 And I press the Search button
27 - And I get the Creation date information as "after" 27 + And I get the Creation Date information as "after"
28 Then "before" should be lesser than "after" 28 Then "before" should be lesser than "after"
features/repository/show/repository_info.feature
@@ -13,7 +13,7 @@ Feature: Show Repository @@ -13,7 +13,7 @@ Feature: Show Repository
13 When I visit the repository show page 13 When I visit the repository show page
14 Then I should see "Address" 14 Then I should see "Address"
15 And I should see "Configuration" 15 And I should see "Configuration"
16 - And I should see "Periodicity" 16 + And I should see "Period"
17 And I should see "Type" 17 And I should see "Type"
18 And I should see "Description" 18 And I should see "Description"
19 And I should see "License" 19 And I should see "License"
@@ -31,7 +31,7 @@ Feature: Show Repository @@ -31,7 +31,7 @@ Feature: Show Repository
31 When I visit the repository show page 31 When I visit the repository show page
32 Then I should see the sample repository name 32 Then I should see the sample repository name
33 And I should see "State" 33 And I should see "State"
34 - And I should see "Creation date" 34 + And I should see "Creation Date"
35 And I should see "PREPARING time" 35 And I should see "PREPARING time"
36 And I should see "COLLECTING time" 36 And I should see "COLLECTING time"
37 And I should see "BUILDING time" 37 And I should see "BUILDING time"
@@ -64,7 +64,7 @@ Feature: Show Repository @@ -64,7 +64,7 @@ Feature: Show Repository
64 And I should see "Address" 64 And I should see "Address"
65 And I should see "Configuration" 65 And I should see "Configuration"
66 And I should see "State" 66 And I should see "State"
67 - And I should see "Creation date" 67 + And I should see "Creation Date"
68 When I click the "Metric Results" h3 68 When I click the "Metric Results" h3
69 Then I should see "Loading data. Please, wait." 69 Then I should see "Loading data. Please, wait."
70 When I click the "Modules Tree" h3 70 When I click the "Modules Tree" h3
features/step_definitions/compound_metric_configuration_steps.rb
@@ -15,7 +15,7 @@ Given(/^I have another compound metric configuration with code &quot;(.*?)&quot; within th @@ -15,7 +15,7 @@ Given(/^I have another compound metric configuration with code &quot;(.*?)&quot; within th
15 end 15 end
16 16
17 When(/^I visit the sample compound metric configuration edit page$/) do 17 When(/^I visit the sample compound metric configuration edit page$/) do
18 - visit edit_kalibro_configuration_compound_metric_configuration_path(@compound_metric_configuration.kalibro_configuration_id, @compound_metric_configuration.id) 18 + visit edit_kalibro_configuration_compound_metric_configuration_path(kalibro_configuration_id: @compound_metric_configuration.kalibro_configuration_id, id: @compound_metric_configuration.id)
19 end 19 end
20 20
21 When(/^I click the edit link of the Coumpound Metric$/) do 21 When(/^I click the edit link of the Coumpound Metric$/) do
@@ -27,7 +27,7 @@ When(/^I click the show link of &quot;(.*?)&quot;$/) do |name| @@ -27,7 +27,7 @@ When(/^I click the show link of &quot;(.*?)&quot;$/) do |name|
27 end 27 end
28 28
29 When(/^I am at the sample compound metric configuration page$/) do 29 When(/^I am at the sample compound metric configuration page$/) do
30 - visit kalibro_configuration_compound_metric_configuration_path(@compound_metric_configuration.kalibro_configuration_id, @compound_metric_configuration.id) 30 + visit kalibro_configuration_compound_metric_configuration_path(kalibro_configuration_id: @compound_metric_configuration.kalibro_configuration_id, id: @compound_metric_configuration.id)
31 expect(page).to have_content(@compound_metric_configuration.metric.name) 31 expect(page).to have_content(@compound_metric_configuration.metric.name)
32 expect(page).to have_content("Ranges") 32 expect(page).to have_content("Ranges")
33 end 33 end
features/step_definitions/kalibro_configuration_steps.rb
@@ -20,11 +20,11 @@ Given(/^I own a sample configuration$/) do @@ -20,11 +20,11 @@ Given(/^I own a sample configuration$/) do
20 end 20 end
21 21
22 Given(/^I am at the Sample Configuration page$/) do 22 Given(/^I am at the Sample Configuration page$/) do
23 - visit kalibro_configuration_path(@kalibro_configuration.id) 23 + visit kalibro_configuration_path(id: @kalibro_configuration.id)
24 end 24 end
25 25
26 Given(/^I am at the sample configuration edit page$/) do 26 Given(/^I am at the sample configuration edit page$/) do
27 - visit edit_kalibro_configuration_path(@kalibro_configuration.id) 27 + visit edit_kalibro_configuration_path(id: @kalibro_configuration.id)
28 end 28 end
29 29
30 Given(/^I own a configuration named "(.*?)"$/) do |name| 30 Given(/^I own a configuration named "(.*?)"$/) do |name|
@@ -33,7 +33,7 @@ Given(/^I own a configuration named &quot;(.*?)&quot;$/) do |name| @@ -33,7 +33,7 @@ Given(/^I own a configuration named &quot;(.*?)&quot;$/) do |name|
33 end 33 end
34 34
35 When(/^I visit the sample configuration edit page$/) do 35 When(/^I visit the sample configuration edit page$/) do
36 - visit edit_kalibro_configuration_path(@kalibro_configuration.id) 36 + visit edit_kalibro_configuration_path(id: @kalibro_configuration.id)
37 end 37 end
38 38
39 Then(/^I should be in the Edit Configuration page$/) do 39 Then(/^I should be in the Edit Configuration page$/) do
features/step_definitions/kalibro_range_steps.rb
@@ -9,11 +9,11 @@ Given(/^I have a sample range within the sample compound metric configuration wi @@ -9,11 +9,11 @@ Given(/^I have a sample range within the sample compound metric configuration wi
9 end 9 end
10 10
11 Given(/^I am at the Edit Kalibro Range page$/) do 11 Given(/^I am at the Edit Kalibro Range page$/) do
12 - visit edit_kalibro_configuration_metric_configuration_kalibro_range_path(@metric_configuration.kalibro_configuration_id, @metric_configuration.id, @kalibro_range.id) 12 + visit edit_kalibro_configuration_metric_configuration_kalibro_range_path(kalibro_configuration_id: @metric_configuration.kalibro_configuration_id, metric_configuration_id: @metric_configuration.id, id: @kalibro_range.id)
13 end 13 end
14 14
15 Given(/^I am at the Edit Kalibro Range page for the compound metric configuration$/) do 15 Given(/^I am at the Edit Kalibro Range page for the compound metric configuration$/) do
16 - visit edit_kalibro_configuration_metric_configuration_kalibro_range_path(@compound_metric_configuration.kalibro_configuration_id, @compound_metric_configuration.id, @kalibro_range.id) 16 + visit edit_kalibro_configuration_metric_configuration_kalibro_range_path(kalibro_configuration_id: @compound_metric_configuration.kalibro_configuration_id, metric_configuration_id: @compound_metric_configuration.id, id: @kalibro_range.id)
17 end 17 end
18 18
19 Given(/^the select field "(.*?)" is set as "(.*?)"$/) do |field, text| 19 Given(/^the select field "(.*?)" is set as "(.*?)"$/) do |field, text|
@@ -31,11 +31,11 @@ Given(/^I have a sample range within the sample compound metric configuration$/) @@ -31,11 +31,11 @@ Given(/^I have a sample range within the sample compound metric configuration$/)
31 end 31 end
32 32
33 When(/^I am at the New Range page$/) do 33 When(/^I am at the New Range page$/) do
34 - visit kalibro_configuration_metric_configuration_new_kalibro_range_path(@metric_configuration.kalibro_configuration_id, @metric_configuration.id) 34 + visit kalibro_configuration_metric_configuration_new_kalibro_range_path(kalibro_configuration_id: @metric_configuration.kalibro_configuration_id, metric_configuration_id: @metric_configuration.id)
35 end 35 end
36 36
37 Given(/^I am at the New Range page for the compound metric configuration$/) do 37 Given(/^I am at the New Range page for the compound metric configuration$/) do
38 - visit kalibro_configuration_metric_configuration_new_kalibro_range_path(@compound_metric_configuration.kalibro_configuration_id, @compound_metric_configuration.id) 38 + visit kalibro_configuration_metric_configuration_new_kalibro_range_path(kalibro_configuration_id: @compound_metric_configuration.kalibro_configuration_id, metric_configuration_id: @compound_metric_configuration.id)
39 end 39 end
40 40
41 41
features/step_definitions/metric_configuration_steps.rb
@@ -20,19 +20,19 @@ Given(/^I have a sample configuration with MetricFu metrics$/) do @@ -20,19 +20,19 @@ Given(/^I have a sample configuration with MetricFu metrics$/) do
20 end 20 end
21 21
22 When(/^I visit the sample metric configuration edit page$/) do 22 When(/^I visit the sample metric configuration edit page$/) do
23 - visit edit_kalibro_configuration_metric_configuration_path(@metric_configuration.kalibro_configuration_id, @metric_configuration.id) 23 + visit edit_kalibro_configuration_metric_configuration_path(kalibro_configuration_id: @metric_configuration.kalibro_configuration_id, id: @metric_configuration.id)
24 end 24 end
25 25
26 When(/^I visit the sample metric configuration page$/) do 26 When(/^I visit the sample metric configuration page$/) do
27 - visit kalibro_configuration_metric_configuration_path(@metric_configuration.kalibro_configuration_id, @metric_configuration.id) 27 + visit kalibro_configuration_metric_configuration_path(kalibro_configuration_id: @metric_configuration.kalibro_configuration_id, id: @metric_configuration.id)
28 end 28 end
29 29
30 When(/^I visit the sample metric configuration page$/) do 30 When(/^I visit the sample metric configuration page$/) do
31 - visit edit_kalibro_configuration_path(@kalibro_configuration.id) 31 + visit edit_kalibro_configuration_path(id: @kalibro_configuration.id)
32 end 32 end
33 33
34 Then(/^I am at the sample metric configuration page$/) do 34 Then(/^I am at the sample metric configuration page$/) do
35 - visit kalibro_configuration_metric_configuration_path(@metric_configuration.kalibro_configuration_id, @metric_configuration.id) 35 + visit kalibro_configuration_metric_configuration_path(kalibro_configuration_id: @metric_configuration.kalibro_configuration_id, id: @metric_configuration.id)
36 expect(page).to have_content(@metric_configuration.metric.name) 36 expect(page).to have_content(@metric_configuration.metric.name)
37 expect(page).to have_content("Ranges") 37 expect(page).to have_content("Ranges")
38 end 38 end
@@ -52,3 +52,6 @@ Then(/^I should be at the choose metric page$/) do @@ -52,3 +52,6 @@ Then(/^I should be at the choose metric page$/) do
52 expect(page).to have_content("Choose a metric from a Base Tool:") 52 expect(page).to have_content("Choose a metric from a Base Tool:")
53 end 53 end
54 54
  55 +When(/^I click destroy Metric Configuration$/) do
  56 + find('#metrics').first(:link, "Destroy").click
  57 +end
features/step_definitions/project_steps.rb
@@ -27,15 +27,15 @@ Given(/^I own a project named &quot;(.*?)&quot;$/) do |name| @@ -27,15 +27,15 @@ Given(/^I own a project named &quot;(.*?)&quot;$/) do |name|
27 end 27 end
28 28
29 Given(/^I am at the Sample Project page$/) do 29 Given(/^I am at the Sample Project page$/) do
30 - visit project_path(@project.id) 30 + visit project_path(id: @project.id)
31 end 31 end
32 32
33 Given(/^I am at the sample project edit page$/) do 33 Given(/^I am at the sample project edit page$/) do
34 - visit edit_project_path(@project.id) 34 + visit edit_project_path(id: @project.id)
35 end 35 end
36 36
37 Given(/^I visit the sample project edit page$/) do 37 Given(/^I visit the sample project edit page$/) do
38 - visit edit_project_path(@project.id) 38 + visit edit_project_path(id: @project.id)
39 end 39 end
40 40
41 Given(/^I am at the New Project page$/) do 41 Given(/^I am at the New Project page$/) do
features/step_definitions/reading_group_steps.rb
@@ -22,11 +22,11 @@ Given(/^I have a sample reading group$/) do @@ -22,11 +22,11 @@ Given(/^I have a sample reading group$/) do
22 end 22 end
23 23
24 Given(/^I visit the Sample Reading Group page$/) do 24 Given(/^I visit the Sample Reading Group page$/) do
25 - visit reading_group_path(@reading_group.id) 25 + visit reading_group_path(id: @reading_group.id)
26 end 26 end
27 27
28 Given(/^I am at the sample reading group edit page$/) do 28 Given(/^I am at the sample reading group edit page$/) do
29 - visit edit_reading_group_path(@reading_group.id) 29 + visit edit_reading_group_path(id: @reading_group.id)
30 end 30 end
31 31
32 Given(/^I own a reading group named "(.*?)"$/) do |name| 32 Given(/^I own a reading group named "(.*?)"$/) do |name|
@@ -35,7 +35,7 @@ Given(/^I own a reading group named &quot;(.*?)&quot;$/) do |name| @@ -35,7 +35,7 @@ Given(/^I own a reading group named &quot;(.*?)&quot;$/) do |name|
35 end 35 end
36 36
37 When(/^I visit the sample reading group edit page$/) do 37 When(/^I visit the sample reading group edit page$/) do
38 - visit edit_reading_group_path(@reading_group.id) 38 + visit edit_reading_group_path(id: @reading_group.id)
39 end 39 end
40 40
41 Then(/^The field "(.*?)" should be filled with the sample reading group "(.*?)"$/) do |field, value| 41 Then(/^The field "(.*?)" should be filled with the sample reading group "(.*?)"$/) do |field, value|
@@ -57,7 +57,7 @@ Then(/^I should see the information of the sample reading$/) do @@ -57,7 +57,7 @@ Then(/^I should see the information of the sample reading$/) do
57 end 57 end
58 58
59 Then(/^I should be in the Edit Reading Group page$/) do 59 Then(/^I should be in the Edit Reading Group page$/) do
60 - visit edit_reading_group_path(@reading_group.id) 60 + visit edit_reading_group_path(id: @reading_group.id)
61 end 61 end
62 62
63 Then(/^the Sample Reading Group should not be there$/) do 63 Then(/^the Sample Reading Group should not be there$/) do
features/step_definitions/reading_steps.rb
@@ -3,11 +3,11 @@ Given(/^I have a sample reading within the sample reading group$/) do @@ -3,11 +3,11 @@ Given(/^I have a sample reading within the sample reading group$/) do
3 end 3 end
4 4
5 Given(/^I am at the New Reading page$/) do 5 Given(/^I am at the New Reading page$/) do
6 - visit new_reading_group_reading_path(@reading_group.id) 6 + visit new_reading_group_reading_path(reading_group_id: @reading_group.id)
7 end 7 end
8 8
9 Given(/^I am at the Edit Reading page$/) do 9 Given(/^I am at the Edit Reading page$/) do
10 - visit edit_reading_group_reading_path(@reading_group.id, @reading.id) 10 + visit edit_reading_group_reading_path(reading_group_id: @reading_group.id, id: @reading.id)
11 end 11 end
12 12
13 Given(/^I have a sample reading within the sample reading group labeled "(.*?)"$/) do |label| 13 Given(/^I have a sample reading within the sample reading group labeled "(.*?)"$/) do |label|
@@ -23,9 +23,14 @@ When(/^I click on the center of the color picker$/) do @@ -23,9 +23,14 @@ When(/^I click on the center of the color picker$/) do
23 end 23 end
24 24
25 Then(/^I should be at the New Reading page$/) do 25 Then(/^I should be at the New Reading page$/) do
26 - visit new_reading_group_reading_path(@reading_group.id) 26 + visit new_reading_group_reading_path(reading_group_id: @reading_group.id)
27 end 27 end
28 28
29 Then(/^I should see a color picker Canvas$/) do 29 Then(/^I should see a color picker Canvas$/) do
30 page.find('div.colorpicker') 30 page.find('div.colorpicker')
31 end 31 end
  32 +
  33 +When(/^I choose the destroy reading link$/) do
  34 + url = reading_group_reading_path(reading_group_id: @reading_group.id, id: @reading.id, locale: :en)
  35 + find("//a[@href='#{url}']").click
  36 +end
features/step_definitions/repository_steps.rb
@@ -64,11 +64,11 @@ Given(/^I wait up for a error processing$/) do @@ -64,11 +64,11 @@ Given(/^I wait up for a error processing$/) do
64 end 64 end
65 65
66 Given(/^I am at the New Repository page$/) do 66 Given(/^I am at the New Repository page$/) do
67 - visit new_project_repository_path(@project.id) 67 + visit new_project_repository_path(project_id: @project.id)
68 end 68 end
69 69
70 Given(/^I am at repository edit page$/) do 70 Given(/^I am at repository edit page$/) do
71 - visit edit_project_repository_path(@repository.project_id, @repository.id) 71 + visit edit_project_repository_path(project_id: @repository.project_id, id: @repository.id)
72 end 72 end
73 73
74 Given(/^I ask for the last ready processing of the given repository$/) do 74 Given(/^I ask for the last ready processing of the given repository$/) do
@@ -92,11 +92,11 @@ When(/^I click on the sample metric&#39;s name$/) do @@ -92,11 +92,11 @@ When(/^I click on the sample metric&#39;s name$/) do
92 end 92 end
93 93
94 When(/^I set the select field "(.+)" as "(.+)"$/) do |field, text| 94 When(/^I set the select field "(.+)" as "(.+)"$/) do |field, text|
95 - select text, from: field 95 + select text, from: I18n.t(field.gsub(" ", "_").downcase)
96 end 96 end
97 97
98 When(/^I visit the repository show page$/) do 98 When(/^I visit the repository show page$/) do
99 - visit project_repository_path(@project.id, @repository.id) 99 + visit project_repository_path(project_id: @project.id, id: @repository.id)
100 end 100 end
101 101
102 When(/^I click on the sample child's name$/) do 102 When(/^I click on the sample child's name$/) do
@@ -113,9 +113,9 @@ When(/^I wait up for the ajax request$/) do @@ -113,9 +113,9 @@ When(/^I wait up for the ajax request$/) do
113 end 113 end
114 end 114 end
115 115
116 -When(/^I get the Creation date information as "(.*?)"$/) do |variable|  
117 - val = page.find('p', text: 'Creation date').text.match(/^Creation date:(.*)$/).captures.first  
118 - eval ("@#{variable} = '#{val}'") 116 +When(/^I get the Creation Date information as "(.*?)"$/) do |variable|
  117 + val = page.find('p', text: 'Creation Date').text.match(/^Creation Date:(.*)$/).captures.first
  118 + eval ("@#{variable} = DateTime.parse('#{val}')")
119 end 119 end
120 120
121 Then(/^I should see the sample repository name$/) do 121 Then(/^I should see the sample repository name$/) do
@@ -171,7 +171,5 @@ end @@ -171,7 +171,5 @@ end
171 Then(/^"(.*?)" should be lesser than "(.*?)"$/) do |arg1, arg2| 171 Then(/^"(.*?)" should be lesser than "(.*?)"$/) do |arg1, arg2|
172 v1 = eval "@#{arg1}" 172 v1 = eval "@#{arg1}"
173 v2 = eval "@#{arg2}" 173 v2 = eval "@#{arg2}"
174 -  
175 expect(v1 < v2).to be_truthy 174 expect(v1 < v2).to be_truthy
176 end 175 end
177 -  
features/step_definitions/user_steps.rb
@@ -30,4 +30,4 @@ end @@ -30,4 +30,4 @@ end
30 When(/^I click the "(.*?)" icon$/) do |icon| 30 When(/^I click the "(.*?)" icon$/) do |icon|
31 find('#' + icon).click # the hashtag symbol is necessary to find the id of a HTML element 31 find('#' + icon).click # the hashtag symbol is necessary to find the id of a HTML element
32 sleep(1) #This sleep is essential to make the popup visible when we take a picture of the page 32 sleep(1) #This sleep is essential to make the popup visible when we take a picture of the page
33 -end  
34 \ No newline at end of file 33 \ No newline at end of file
  34 +end
features/support/hooks.rb
1 After do |scenario| 1 After do |scenario|
2 -# Do something after each scenario.  
3 -# The +scenario+ argument is optional, but  
4 -# if you use it, you can inspect status with  
5 -# the #failed?, #passed? and #exception methods.  
6 -Rails.cache.clear  
7 -end  
8 \ No newline at end of file 2 \ No newline at end of file
  3 + # Do something after each scenario.
  4 + # The +scenario+ argument is optional, but
  5 + # if you use it, you can inspect status with
  6 + # the #failed?, #passed? and #exception methods.
  7 + Rails.cache.clear
  8 +end
  9 +
  10 +# Run all acceptance tests on the default language
  11 +Before do |scenario|
  12 + if defined?(page) && ! page.driver.nil?
  13 + header_method = [:add_header, :header].find(&page.driver.method(:respond_to?))
  14 + page.driver.send(header_method, 'Accept-Language', I18n.default_locale) if header_method
  15 + end
  16 +
  17 + I18n.locale = I18n.default_locale
  18 +end
features/users/user_update.feature
@@ -11,5 +11,5 @@ Feature: User update @@ -11,5 +11,5 @@ Feature: User update
11 And I fill the Name field with "Rafael Manzo" 11 And I fill the Name field with "Rafael Manzo"
12 And I fill the Current password field with "password" 12 And I fill the Current password field with "password"
13 And I press the Update button 13 And I press the Update button
14 - Then I should see "You updated your account successfully"  
15 - And my name should have changed to Rafael Manzo  
16 \ No newline at end of file 14 \ No newline at end of file
  15 + Then I should see "Your account has been updated successfully"
  16 + And my name should have changed to Rafael Manzo
spec/controllers/base_metric_configurations_controller_spec.rb
@@ -80,7 +80,7 @@ describe InheritsFromBaseMetricConfigurationsController, :type =&gt; :controller do @@ -80,7 +80,7 @@ describe InheritsFromBaseMetricConfigurationsController, :type =&gt; :controller do
80 get :new, kalibro_configuration_id: kalibro_configuration.id 80 get :new, kalibro_configuration_id: kalibro_configuration.id
81 end 81 end
82 82
83 - it { is_expected.to redirect_to(kalibro_configurations_url(kalibro_configuration.id)) } 83 + it { is_expected.to redirect_to(kalibro_configurations_url(id: kalibro_configuration.id)) }
84 it { is_expected.to respond_with(:redirect) } 84 it { is_expected.to respond_with(:redirect) }
85 end 85 end
86 end 86 end
spec/controllers/compound_metric_configurations_controller_spec.rb
@@ -25,7 +25,7 @@ describe CompoundMetricConfigurationsController, :type =&gt; :controller do @@ -25,7 +25,7 @@ describe CompoundMetricConfigurationsController, :type =&gt; :controller do
25 get :new, kalibro_configuration_id: kalibro_configuration.id 25 get :new, kalibro_configuration_id: kalibro_configuration.id
26 end 26 end
27 27
28 - it { is_expected.to redirect_to(kalibro_configurations_url(kalibro_configuration.id)) } 28 + it { is_expected.to redirect_to(kalibro_configurations_url(id: kalibro_configuration.id)) }
29 it { is_expected.to respond_with(:redirect) } 29 it { is_expected.to respond_with(:redirect) }
30 end 30 end
31 end 31 end
@@ -107,7 +107,7 @@ describe CompoundMetricConfigurationsController, :type =&gt; :controller do @@ -107,7 +107,7 @@ describe CompoundMetricConfigurationsController, :type =&gt; :controller do
107 get :edit, id: compound_metric_configuration.id, kalibro_configuration_id: compound_metric_configuration.kalibro_configuration_id.to_s 107 get :edit, id: compound_metric_configuration.id, kalibro_configuration_id: compound_metric_configuration.kalibro_configuration_id.to_s
108 end 108 end
109 109
110 - it { is_expected.to redirect_to(kalibro_configurations_path(kalibro_configuration.id)) } 110 + it { is_expected.to redirect_to(kalibro_configurations_path(id: kalibro_configuration.id)) }
111 it { is_expected.to respond_with(:redirect) } 111 it { is_expected.to respond_with(:redirect) }
112 it { is_expected.to set_flash[:notice].to("You're not allowed to do this operation") } 112 it { is_expected.to set_flash[:notice].to("You're not allowed to do this operation") }
113 end 113 end
@@ -144,7 +144,7 @@ describe CompoundMetricConfigurationsController, :type =&gt; :controller do @@ -144,7 +144,7 @@ describe CompoundMetricConfigurationsController, :type =&gt; :controller do
144 post :update, kalibro_configuration_id: compound_metric_configuration.kalibro_configuration_id, id: compound_metric_configuration.id, metric_configuration: metric_configuration_params 144 post :update, kalibro_configuration_id: compound_metric_configuration.kalibro_configuration_id, id: compound_metric_configuration.id, metric_configuration: metric_configuration_params
145 end 145 end
146 146
147 - it { should redirect_to(kalibro_configuration_path(compound_metric_configuration.kalibro_configuration_id)) } 147 + it { should redirect_to(kalibro_configuration_path(id: compound_metric_configuration.kalibro_configuration_id)) }
148 it { should respond_with(:redirect) } 148 it { should respond_with(:redirect) }
149 end 149 end
150 150
@@ -166,7 +166,7 @@ describe CompoundMetricConfigurationsController, :type =&gt; :controller do @@ -166,7 +166,7 @@ describe CompoundMetricConfigurationsController, :type =&gt; :controller do
166 post :update, kalibro_configuration_id: compound_metric_configuration.kalibro_configuration_id, id: compound_metric_configuration.id, metric_configuration: metric_configuration_params 166 post :update, kalibro_configuration_id: compound_metric_configuration.kalibro_configuration_id, id: compound_metric_configuration.id, metric_configuration: metric_configuration_params
167 end 167 end
168 168
169 - it { should redirect_to kalibro_configurations_path(compound_metric_configuration.kalibro_configuration_id) } 169 + it { should redirect_to kalibro_configurations_path(id: compound_metric_configuration.kalibro_configuration_id) }
170 end 170 end
171 end 171 end
172 end 172 end
spec/controllers/home_controller_spec.rb
@@ -5,11 +5,38 @@ describe HomeController, :type =&gt; :controller do @@ -5,11 +5,38 @@ describe HomeController, :type =&gt; :controller do
5 context '#index' do 5 context '#index' do
6 before :each do 6 before :each do
7 Project.expects(:latest).with(5).returns([]) 7 Project.expects(:latest).with(5).returns([])
  8 + end
8 9
9 - get :index 10 + describe 'Rendering' do
  11 + before :each do
  12 + get :index
  13 + end
  14 + it {is_expected.to render_template(:index)}
10 end 15 end
11 16
12 - it {is_expected.to render_template(:index)} 17 + describe 'Language auto-detection' do
  18 + it 'should automatically use the language specified in the request headers' do
  19 + request.env['HTTP_ACCEPT_LANGUAGE'] = 'pt-BR'
  20 + get :index
  21 + expect(I18n.locale).to eq(:pt)
  22 + end
  23 +
  24 + it 'should use a different region if still the best match' do
  25 + request.env['HTTP_ACCEPT_LANGUAGE'] = 'en-GB'
  26 + get :index
  27 + expect(I18n.locale).to eq(:en)
  28 + end
  29 +
  30 + it 'should use the default language if no available language matches the requested one' do
  31 + request.env['HTTP_ACCEPT_LANGUAGE'] = 'de'
  32 + get :index
  33 + expect(I18n.locale).to eq(:en)
  34 + end
  35 +
  36 + after do
  37 + I18n.locale = I18n.default_locale
  38 + end
  39 + end
13 end 40 end
14 end 41 end
15 end 42 end
spec/controllers/kalibro_configurations_controller_spec.rb
@@ -31,7 +31,7 @@ describe KalibroConfigurationsController, :type =&gt; :controller do @@ -31,7 +31,7 @@ describe KalibroConfigurationsController, :type =&gt; :controller do
31 end 31 end
32 32
33 it 'should redirect to the show view' do 33 it 'should redirect to the show view' do
34 - expect(response).to redirect_to kalibro_configuration_path(kalibro_configuration.id) 34 + expect(response).to redirect_to kalibro_configuration_path(id: kalibro_configuration.id)
35 end 35 end
36 end 36 end
37 37
@@ -119,7 +119,7 @@ describe KalibroConfigurationsController, :type =&gt; :controller do @@ -119,7 +119,7 @@ describe KalibroConfigurationsController, :type =&gt; :controller do
119 delete :destroy, :id => @subject.id 119 delete :destroy, :id => @subject.id
120 end 120 end
121 121
122 - it { is_expected.to redirect_to(kalibro_configurations_path(@subject.id)) } 122 + it { is_expected.to redirect_to(kalibro_configurations_path(id: @subject.id)) }
123 end 123 end
124 end 124 end
125 125
@@ -181,7 +181,7 @@ describe KalibroConfigurationsController, :type =&gt; :controller do @@ -181,7 +181,7 @@ describe KalibroConfigurationsController, :type =&gt; :controller do
181 get :edit, :id => @subject.id 181 get :edit, :id => @subject.id
182 end 182 end
183 183
184 - it { is_expected.to redirect_to(kalibro_configurations_path(@subject.id)) } 184 + it { is_expected.to redirect_to(kalibro_configurations_path(id: @subject.id)) }
185 it { is_expected.to set_flash[:notice].to("You're not allowed to do this operation") } 185 it { is_expected.to set_flash[:notice].to("You're not allowed to do this operation") }
186 end 186 end
187 end 187 end
@@ -225,7 +225,7 @@ describe KalibroConfigurationsController, :type =&gt; :controller do @@ -225,7 +225,7 @@ describe KalibroConfigurationsController, :type =&gt; :controller do
225 end 225 end
226 226
227 it 'should redirect to the show view' do 227 it 'should redirect to the show view' do
228 - expect(response).to redirect_to kalibro_configuration_path(kalibro_configuration.id) 228 + expect(response).to redirect_to kalibro_configuration_path(id: kalibro_configuration.id)
229 end 229 end
230 end 230 end
231 231
@@ -255,7 +255,7 @@ describe KalibroConfigurationsController, :type =&gt; :controller do @@ -255,7 +255,7 @@ describe KalibroConfigurationsController, :type =&gt; :controller do
255 post :update, :id => kalibro_configuration.id, :kalibro_configuration => kalibro_configuration_params 255 post :update, :id => kalibro_configuration.id, :kalibro_configuration => kalibro_configuration_params
256 end 256 end
257 257
258 - it { is_expected.to redirect_to kalibro_configurations_path(kalibro_configuration.id) } 258 + it { is_expected.to redirect_to kalibro_configurations_path(id: kalibro_configuration.id) }
259 end 259 end
260 end 260 end
261 261
spec/controllers/kalibro_ranges_controller_spec.rb
@@ -28,7 +28,7 @@ describe KalibroRangesController, :type =&gt; :controller do @@ -28,7 +28,7 @@ describe KalibroRangesController, :type =&gt; :controller do
28 get :new, kalibro_configuration_id: kalibro_configuration.id, metric_configuration_id: kalibro_range.metric_configuration_id 28 get :new, kalibro_configuration_id: kalibro_configuration.id, metric_configuration_id: kalibro_range.metric_configuration_id
29 end 29 end
30 30
31 - it { is_expected.to redirect_to(kalibro_configurations_path(kalibro_configuration.id)) } 31 + it { is_expected.to redirect_to(kalibro_configurations_path(id: kalibro_configuration.id)) }
32 it { is_expected.to respond_with(:redirect) } 32 it { is_expected.to respond_with(:redirect) }
33 end 33 end
34 end 34 end
@@ -54,7 +54,7 @@ describe KalibroRangesController, :type =&gt; :controller do @@ -54,7 +54,7 @@ describe KalibroRangesController, :type =&gt; :controller do
54 post :create, kalibro_configuration_id: kalibro_configuration.id, metric_configuration_id: kalibro_range.metric_configuration_id, kalibro_range: kalibro_range_params 54 post :create, kalibro_configuration_id: kalibro_configuration.id, metric_configuration_id: kalibro_range.metric_configuration_id, kalibro_range: kalibro_range_params
55 end 55 end
56 56
57 - it { is_expected.to redirect_to(kalibro_configuration_metric_configuration_path(metric_configuration.kalibro_configuration_id, metric_configuration.id)) } 57 + it { is_expected.to redirect_to(kalibro_configuration_metric_configuration_path(kalibro_configuration_id: metric_configuration.kalibro_configuration_id, id: metric_configuration.id)) }
58 it { is_expected.to respond_with(:redirect) } 58 it { is_expected.to respond_with(:redirect) }
59 end 59 end
60 60
@@ -69,7 +69,7 @@ describe KalibroRangesController, :type =&gt; :controller do @@ -69,7 +69,7 @@ describe KalibroRangesController, :type =&gt; :controller do
69 post :create, kalibro_configuration_id: kalibro_configuration.id, metric_configuration_id: new_kalibro_range.metric_configuration_id, kalibro_range: new_kalibro_range.to_hash 69 post :create, kalibro_configuration_id: kalibro_configuration.id, metric_configuration_id: new_kalibro_range.metric_configuration_id, kalibro_range: new_kalibro_range.to_hash
70 end 70 end
71 71
72 - it { is_expected.to redirect_to(kalibro_configuration_compound_metric_configuration_path(compound_metric_configuration.kalibro_configuration_id, compound_metric_configuration.id)) } 72 + it { is_expected.to redirect_to(kalibro_configuration_compound_metric_configuration_path(kalibro_configuration_id: compound_metric_configuration.kalibro_configuration_id, id: compound_metric_configuration.id)) }
73 it { is_expected.to respond_with(:redirect) } 73 it { is_expected.to respond_with(:redirect) }
74 end 74 end
75 75
@@ -103,7 +103,7 @@ describe KalibroRangesController, :type =&gt; :controller do @@ -103,7 +103,7 @@ describe KalibroRangesController, :type =&gt; :controller do
103 delete :destroy, id: kalibro_range.id, metric_configuration_id: metric_configuration.id, kalibro_configuration_id: metric_configuration.kalibro_configuration_id 103 delete :destroy, id: kalibro_range.id, metric_configuration_id: metric_configuration.id, kalibro_configuration_id: metric_configuration.kalibro_configuration_id
104 end 104 end
105 105
106 - it { is_expected.to redirect_to(kalibro_configuration_metric_configuration_path(metric_configuration.kalibro_configuration_id, metric_configuration.id)) } 106 + it { is_expected.to redirect_to(kalibro_configuration_metric_configuration_path(kalibro_configuration_id: metric_configuration.kalibro_configuration_id, id: metric_configuration.id)) }
107 it { is_expected.to respond_with(:redirect) } 107 it { is_expected.to respond_with(:redirect) }
108 end 108 end
109 109
@@ -120,7 +120,7 @@ describe KalibroRangesController, :type =&gt; :controller do @@ -120,7 +120,7 @@ describe KalibroRangesController, :type =&gt; :controller do
120 delete :destroy, id: new_kalibro_range.id, metric_configuration_id: compound_metric_configuration.id, kalibro_configuration_id: compound_metric_configuration.kalibro_configuration_id 120 delete :destroy, id: new_kalibro_range.id, metric_configuration_id: compound_metric_configuration.id, kalibro_configuration_id: compound_metric_configuration.kalibro_configuration_id
121 end 121 end
122 122
123 - it { is_expected.to redirect_to(kalibro_configuration_compound_metric_configuration_path(compound_metric_configuration.kalibro_configuration_id, compound_metric_configuration.id)) } 123 + it { is_expected.to redirect_to(kalibro_configuration_compound_metric_configuration_path(kalibro_configuration_id: compound_metric_configuration.kalibro_configuration_id, id: compound_metric_configuration.id)) }
124 it { is_expected.to respond_with(:redirect) } 124 it { is_expected.to respond_with(:redirect) }
125 end 125 end
126 126
@@ -129,7 +129,7 @@ describe KalibroRangesController, :type =&gt; :controller do @@ -129,7 +129,7 @@ describe KalibroRangesController, :type =&gt; :controller do
129 delete :destroy, id: kalibro_range.id, metric_configuration_id: metric_configuration.id, kalibro_configuration_id: metric_configuration.kalibro_configuration_id 129 delete :destroy, id: kalibro_range.id, metric_configuration_id: metric_configuration.id, kalibro_configuration_id: metric_configuration.kalibro_configuration_id
130 end 130 end
131 131
132 - it { is_expected.to redirect_to(kalibro_configurations_path(metric_configuration.kalibro_configuration_id)) } 132 + it { is_expected.to redirect_to(kalibro_configurations_path(id: metric_configuration.kalibro_configuration_id)) }
133 it { is_expected.to respond_with(:redirect) } 133 it { is_expected.to respond_with(:redirect) }
134 end 134 end
135 end 135 end
@@ -172,7 +172,7 @@ describe KalibroRangesController, :type =&gt; :controller do @@ -172,7 +172,7 @@ describe KalibroRangesController, :type =&gt; :controller do
172 get :edit, id: kalibro_range.id, kalibro_configuration_id: metric_configuration.kalibro_configuration_id, metric_configuration_id: metric_configuration.id 172 get :edit, id: kalibro_range.id, kalibro_configuration_id: metric_configuration.kalibro_configuration_id, metric_configuration_id: metric_configuration.id
173 end 173 end
174 174
175 - it { is_expected.to redirect_to(kalibro_configurations_url(metric_configuration.kalibro_configuration_id)) } 175 + it { is_expected.to redirect_to(kalibro_configurations_url(id: metric_configuration.kalibro_configuration_id)) }
176 it { is_expected.to respond_with(:redirect) } 176 it { is_expected.to respond_with(:redirect) }
177 it { is_expected.to set_flash[:notice].to("You're not allowed to do this operation") } 177 it { is_expected.to set_flash[:notice].to("You're not allowed to do this operation") }
178 end 178 end
@@ -212,7 +212,7 @@ describe KalibroRangesController, :type =&gt; :controller do @@ -212,7 +212,7 @@ describe KalibroRangesController, :type =&gt; :controller do
212 post :update, kalibro_configuration_id: metric_configuration.kalibro_configuration_id, id: kalibro_range.id, metric_configuration_id: metric_configuration.id, kalibro_range: kalibro_range_params 212 post :update, kalibro_configuration_id: metric_configuration.kalibro_configuration_id, id: kalibro_range.id, metric_configuration_id: metric_configuration.id, kalibro_range: kalibro_range_params
213 end 213 end
214 214
215 - it { is_expected.to redirect_to(kalibro_configuration_metric_configuration_path(metric_configuration.kalibro_configuration_id, metric_configuration.id)) } 215 + it { is_expected.to redirect_to(kalibro_configuration_metric_configuration_path(kalibro_configuration_id: metric_configuration.kalibro_configuration_id, id: metric_configuration.id)) }
216 it { is_expected.to respond_with(:redirect) } 216 it { is_expected.to respond_with(:redirect) }
217 end 217 end
218 218
@@ -228,7 +228,7 @@ describe KalibroRangesController, :type =&gt; :controller do @@ -228,7 +228,7 @@ describe KalibroRangesController, :type =&gt; :controller do
228 post :update, kalibro_configuration_id: compound_metric_configuration.kalibro_configuration_id, id: new_kalibro_range.id, metric_configuration_id: compound_metric_configuration.id, kalibro_range: new_kalibro_range.to_hash 228 post :update, kalibro_configuration_id: compound_metric_configuration.kalibro_configuration_id, id: new_kalibro_range.id, metric_configuration_id: compound_metric_configuration.id, kalibro_range: new_kalibro_range.to_hash
229 end 229 end
230 230
231 - it { is_expected.to redirect_to(kalibro_configuration_compound_metric_configuration_path(compound_metric_configuration.kalibro_configuration_id, compound_metric_configuration.id)) } 231 + it { is_expected.to redirect_to(kalibro_configuration_compound_metric_configuration_path(kalibro_configuration_id: compound_metric_configuration.kalibro_configuration_id, id: compound_metric_configuration.id)) }
232 it { is_expected.to respond_with(:redirect) } 232 it { is_expected.to respond_with(:redirect) }
233 end 233 end
234 234
@@ -251,7 +251,7 @@ describe KalibroRangesController, :type =&gt; :controller do @@ -251,7 +251,7 @@ describe KalibroRangesController, :type =&gt; :controller do
251 post :update, kalibro_configuration_id: metric_configuration.kalibro_configuration_id, id: kalibro_range.id, metric_configuration_id: metric_configuration.id, kalibro_range: kalibro_range_params 251 post :update, kalibro_configuration_id: metric_configuration.kalibro_configuration_id, id: kalibro_range.id, metric_configuration_id: metric_configuration.id, kalibro_range: kalibro_range_params
252 end 252 end
253 253
254 - it { is_expected.to redirect_to kalibro_configurations_path(metric_configuration.kalibro_configuration_id) } 254 + it { is_expected.to redirect_to kalibro_configurations_path(id: metric_configuration.kalibro_configuration_id) }
255 end 255 end
256 end 256 end
257 end 257 end
spec/controllers/metric_configurations_controller_spec.rb
@@ -45,7 +45,7 @@ describe MetricConfigurationsController, :type =&gt; :controller do @@ -45,7 +45,7 @@ describe MetricConfigurationsController, :type =&gt; :controller do
45 post :new, kalibro_configuration_id: kalibro_configuration.id, metric_name: "Lines of Code", metric_collector_name: metric_collector.name 45 post :new, kalibro_configuration_id: kalibro_configuration.id, metric_name: "Lines of Code", metric_collector_name: metric_collector.name
46 end 46 end
47 47
48 - it { is_expected.to redirect_to(kalibro_configurations_url(kalibro_configuration.id)) } 48 + it { is_expected.to redirect_to(kalibro_configurations_url(id: kalibro_configuration.id)) }
49 it { is_expected.to respond_with(:redirect) } 49 it { is_expected.to respond_with(:redirect) }
50 end 50 end
51 end 51 end
@@ -129,7 +129,7 @@ describe MetricConfigurationsController, :type =&gt; :controller do @@ -129,7 +129,7 @@ describe MetricConfigurationsController, :type =&gt; :controller do
129 get :edit, id: metric_configuration.id, kalibro_configuration_id: metric_configuration.kalibro_configuration_id.to_s 129 get :edit, id: metric_configuration.id, kalibro_configuration_id: metric_configuration.kalibro_configuration_id.to_s
130 end 130 end
131 131
132 - it { is_expected.to redirect_to(kalibro_configurations_path(metric_configuration.kalibro_configuration_id)) } 132 + it { is_expected.to redirect_to(kalibro_configurations_path(id: metric_configuration.kalibro_configuration_id)) }
133 it { is_expected.to respond_with(:redirect) } 133 it { is_expected.to respond_with(:redirect) }
134 it { is_expected.to set_flash[:notice].to("You're not allowed to do this operation") } 134 it { is_expected.to set_flash[:notice].to("You're not allowed to do this operation") }
135 end 135 end
@@ -166,7 +166,7 @@ describe MetricConfigurationsController, :type =&gt; :controller do @@ -166,7 +166,7 @@ describe MetricConfigurationsController, :type =&gt; :controller do
166 post :update, kalibro_configuration_id: metric_configuration.kalibro_configuration_id, id: metric_configuration.id, metric_configuration: metric_configuration_params 166 post :update, kalibro_configuration_id: metric_configuration.kalibro_configuration_id, id: metric_configuration.id, metric_configuration: metric_configuration_params
167 end 167 end
168 168
169 - it { is_expected.to redirect_to(kalibro_configuration_path(metric_configuration.kalibro_configuration_id)) } 169 + it { is_expected.to redirect_to(kalibro_configuration_path(id: metric_configuration.kalibro_configuration_id)) }
170 it { is_expected.to respond_with(:redirect) } 170 it { is_expected.to respond_with(:redirect) }
171 end 171 end
172 172
@@ -187,7 +187,7 @@ describe MetricConfigurationsController, :type =&gt; :controller do @@ -187,7 +187,7 @@ describe MetricConfigurationsController, :type =&gt; :controller do
187 post :update, kalibro_configuration_id: metric_configuration.kalibro_configuration_id, id: metric_configuration.id, metric_configuration: metric_configuration_params 187 post :update, kalibro_configuration_id: metric_configuration.kalibro_configuration_id, id: metric_configuration.id, metric_configuration: metric_configuration_params
188 end 188 end
189 189
190 - it { is_expected.to redirect_to kalibro_configurations_path(metric_configuration.kalibro_configuration_id) } 190 + it { is_expected.to redirect_to kalibro_configurations_path(id: metric_configuration.kalibro_configuration_id) }
191 end 191 end
192 end 192 end
193 end 193 end
@@ -210,7 +210,7 @@ describe MetricConfigurationsController, :type =&gt; :controller do @@ -210,7 +210,7 @@ describe MetricConfigurationsController, :type =&gt; :controller do
210 delete :destroy, id: metric_configuration.id, kalibro_configuration_id: metric_configuration.kalibro_configuration_id.to_s 210 delete :destroy, id: metric_configuration.id, kalibro_configuration_id: metric_configuration.kalibro_configuration_id.to_s
211 end 211 end
212 212
213 - it { is_expected.to redirect_to(kalibro_configuration_path(metric_configuration.kalibro_configuration_id)) } 213 + it { is_expected.to redirect_to(kalibro_configuration_path(id: metric_configuration.kalibro_configuration_id)) }
214 it { is_expected.to respond_with(:redirect) } 214 it { is_expected.to respond_with(:redirect) }
215 end 215 end
216 216
@@ -219,7 +219,7 @@ describe MetricConfigurationsController, :type =&gt; :controller do @@ -219,7 +219,7 @@ describe MetricConfigurationsController, :type =&gt; :controller do
219 delete :destroy, id: metric_configuration.id, kalibro_configuration_id: metric_configuration.kalibro_configuration_id.to_s 219 delete :destroy, id: metric_configuration.id, kalibro_configuration_id: metric_configuration.kalibro_configuration_id.to_s
220 end 220 end
221 221
222 - it { is_expected.to redirect_to(kalibro_configurations_path(metric_configuration.kalibro_configuration_id)) } 222 + it { is_expected.to redirect_to(kalibro_configurations_path(id: metric_configuration.kalibro_configuration_id)) }
223 it { is_expected.to respond_with(:redirect) } 223 it { is_expected.to respond_with(:redirect) }
224 end 224 end
225 end 225 end
spec/controllers/reading_groups_controller_spec.rb
@@ -121,7 +121,7 @@ describe ReadingGroupsController, :type =&gt; :controller do @@ -121,7 +121,7 @@ describe ReadingGroupsController, :type =&gt; :controller do
121 delete :destroy, :id => @subject.id 121 delete :destroy, :id => @subject.id
122 end 122 end
123 123
124 - it { is_expected.to redirect_to new_user_session_path } 124 + it { is_expected.to redirect_to new_user_session_url }
125 end 125 end
126 end 126 end
127 127
spec/controllers/repositories_controller_spec.rb
@@ -60,7 +60,7 @@ describe RepositoriesController, :type =&gt; :controller do @@ -60,7 +60,7 @@ describe RepositoriesController, :type =&gt; :controller do
60 post :create, project_id: project.id, repository: repository_params 60 post :create, project_id: project.id, repository: repository_params
61 end 61 end
62 62
63 - it { is_expected.to redirect_to(project_repository_process_path(repository.project_id, repository.id)) } 63 + it { is_expected.to redirect_to(project_repository_process_path(project_id: repository.project_id, id: repository.id)) }
64 it { is_expected.to respond_with(:redirect) } 64 it { is_expected.to respond_with(:redirect) }
65 end 65 end
66 66
spec/helpers/application_helper_spec.rb 0 → 100644
@@ -0,0 +1,26 @@ @@ -0,0 +1,26 @@
  1 +require 'rails_helper'
  2 +
  3 +describe ApplicationHelper, :type => :helper do
  4 + describe 't_hint' do
  5 + let(:class_key) { :compound_metric_configuration }
  6 + let(:attribute_key) { :script }
  7 +
  8 + context 'without class_key' do
  9 + let!(:translation) { "translated test" }
  10 +
  11 + before :each do
  12 + helper.expects(:t).with("activemodel.hints.#{helper.controller_name}.#{attribute_key}", {}).returns(translation)
  13 + end
  14 +
  15 + it 'is expected to return the hint for the given attribute' do
  16 + expect(helper.t_hint(attribute_key)).to eq(translation)
  17 + end
  18 + end
  19 +
  20 + context 'with class_key' do
  21 + it 'is expected to return the hint for the given attribute' do
  22 + expect(helper.t_hint(attribute_key, class_key)).to eq(I18n.t("activemodel.hints.#{class_key}.#{attribute_key}"))
  23 + end
  24 + end
  25 + end
  26 +end
spec/helpers/compound_metric_configurations_helper_spec.rb
@@ -6,4 +6,27 @@ describe CompoundMetricConfigurationsHelper, :type =&gt; :helper do @@ -6,4 +6,27 @@ describe CompoundMetricConfigurationsHelper, :type =&gt; :helper do
6 expect(helper.scope_options).to eq [["Method","METHOD"], ["Class", "CLASS"], ["Package", "PACKAGE"], ["Software", "SOFTWARE"]] 6 expect(helper.scope_options).to eq [["Method","METHOD"], ["Class", "CLASS"], ["Package", "PACKAGE"], ["Software", "SOFTWARE"]]
7 end 7 end
8 end 8 end
  9 +
  10 + describe 'compound_metric_human_name' do
  11 + context 'with one' do
  12 + it 'is expected to return the class name internationalized' do
  13 + expect(helper.compound_metric_human_name).to eq(I18n.t('activemodel.models.compound_metric_configuration.one'))
  14 + end
  15 + end
  16 +
  17 + context 'with more than one' do
  18 + it 'is expected to return the class name internationalized and pluralized' do
  19 + expect(helper.compound_metric_human_name(2)).to eq(I18n.t('activemodel.models.compound_metric_configuration.other'))
  20 + expect(helper.compound_metric_human_name(50)).to eq(I18n.t('activemodel.models.compound_metric_configuration.other'))
  21 + end
  22 + end
  23 + end
  24 +
  25 + describe 'compound_metric_human_attribute_name' do
  26 + let(:attribute) { :name }
  27 +
  28 + it 'is expected to return the attribute name internationalized' do
  29 + expect(helper.compound_metric_human_attribute_name(attribute)).to eq(I18n.t("activemodel.attributes.compound_metric_configuration.#{attribute}"))
  30 + end
  31 + end
9 end 32 end
spec/routing/home_routing_spec.rb
@@ -4,5 +4,7 @@ describe HomeController, :type =&gt; :routing do @@ -4,5 +4,7 @@ describe HomeController, :type =&gt; :routing do
4 describe "routing" do 4 describe "routing" do
5 it { is_expected.to route(:get, '/'). 5 it { is_expected.to route(:get, '/').
6 to(controller: :home, action: :index) } 6 to(controller: :home, action: :index) }
  7 + it { is_expected.to route(:get, '/pt').
  8 + to(controller: :home, action: :index, locale: 'pt') }
7 end 9 end
8 end 10 end
9 \ No newline at end of file 11 \ No newline at end of file
spec/routing/project_routing_spec.rb
@@ -8,6 +8,9 @@ describe ProjectsController, :type =&gt; :routing do @@ -8,6 +8,9 @@ describe ProjectsController, :type =&gt; :routing do
8 it { is_expected.to route(:get, '/projects'). 8 it { is_expected.to route(:get, '/projects').
9 to(controller: :projects, action: :index) } 9 to(controller: :projects, action: :index) }
10 10
  11 + it { is_expected.to route(:get, '/pt/projects').
  12 + to(controller: :projects, action: :index, locale: 'pt') }
  13 +
11 it { is_expected.to route(:post, '/projects'). 14 it { is_expected.to route(:post, '/projects').
12 to(controller: :projects, action: :create) } 15 to(controller: :projects, action: :create) }
13 16