Commit 6a86c67729206911b0718cd0b7d271014260994e
Exists in
colab
and in
4 other branches
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
Gemfile
| ... | ... | @@ -63,6 +63,9 @@ gem 'exception_notification', '~> 4.0.1' |
| 63 | 63 | # Google Analytics |
| 64 | 64 | gem 'google-analytics-rails', '~> 0.0.6' |
| 65 | 65 | |
| 66 | +# Browser language detection | |
| 67 | +gem 'http_accept_language' | |
| 68 | + | |
| 66 | 69 | group :test do |
| 67 | 70 | # Easier test writing |
| 68 | 71 | gem "shoulda-matchers", '~> 2.8.0' |
| ... | ... | @@ -105,6 +108,9 @@ group :development, :test do |
| 105 | 108 | # Better error interface |
| 106 | 109 | gem 'better_errors' |
| 107 | 110 | gem 'binding_of_caller' |
| 111 | + | |
| 112 | + # Localization assistance | |
| 113 | + gem 'i18n_generators' | |
| 108 | 114 | end |
| 109 | 115 | |
| 110 | 116 | # Acceptance tests | ... | ... |
Gemfile.lock
| ... | ... | @@ -118,6 +118,8 @@ GEM |
| 118 | 118 | warden (~> 1.2.3) |
| 119 | 119 | diff-lcs (1.2.5) |
| 120 | 120 | docile (1.1.5) |
| 121 | + domain_name (0.5.23) | |
| 122 | + unf (>= 0.0.5, < 1.0.0) | |
| 121 | 123 | erubis (2.7.0) |
| 122 | 124 | exception_notification (4.0.1) |
| 123 | 125 | actionmailer (>= 3.0.4) |
| ... | ... | @@ -138,7 +140,13 @@ GEM |
| 138 | 140 | activesupport (>= 4.1.0) |
| 139 | 141 | google-analytics-rails (0.0.6) |
| 140 | 142 | hike (1.2.3) |
| 143 | + http-cookie (1.0.2) | |
| 144 | + domain_name (~> 0.5) | |
| 145 | + http_accept_language (2.0.5) | |
| 141 | 146 | i18n (0.7.0) |
| 147 | + i18n_generators (1.2.1) | |
| 148 | + mechanize | |
| 149 | + rails (>= 3.0.0) | |
| 142 | 150 | jbuilder (2.2.12) |
| 143 | 151 | activesupport (>= 3.0.0, < 5) |
| 144 | 152 | multi_json (~> 1.2) |
| ... | ... | @@ -168,6 +176,15 @@ GEM |
| 168 | 176 | nokogiri (>= 1.5.9) |
| 169 | 177 | mail (2.6.3) |
| 170 | 178 | mime-types (>= 1.16, < 3) |
| 179 | + mechanize (2.7.3) | |
| 180 | + domain_name (~> 0.5, >= 0.5.1) | |
| 181 | + http-cookie (~> 1.0) | |
| 182 | + mime-types (~> 2.0) | |
| 183 | + net-http-digest_auth (~> 1.1, >= 1.1.1) | |
| 184 | + net-http-persistent (~> 2.5, >= 2.5.2) | |
| 185 | + nokogiri (~> 1.4) | |
| 186 | + ntlm-http (~> 0.1, >= 0.1.1) | |
| 187 | + webrobots (>= 0.0.9, < 0.2) | |
| 171 | 188 | metaclass (0.0.4) |
| 172 | 189 | mime-types (2.4.3) |
| 173 | 190 | mini_portile (0.6.2) |
| ... | ... | @@ -177,11 +194,14 @@ GEM |
| 177 | 194 | multi_json (1.11.0) |
| 178 | 195 | multi_test (0.1.2) |
| 179 | 196 | multipart-post (2.0.0) |
| 197 | + net-http-digest_auth (1.4) | |
| 198 | + net-http-persistent (2.9.4) | |
| 180 | 199 | net-scp (1.2.1) |
| 181 | 200 | net-ssh (>= 2.6.5) |
| 182 | 201 | net-ssh (2.9.2) |
| 183 | 202 | nokogiri (1.6.6.2) |
| 184 | 203 | mini_portile (~> 0.6.0) |
| 204 | + ntlm-http (0.1.1) | |
| 185 | 205 | orm_adapter (0.5.0) |
| 186 | 206 | pg (0.18.1) |
| 187 | 207 | poltergeist (1.6.0) |
| ... | ... | @@ -283,6 +303,9 @@ GEM |
| 283 | 303 | uglifier (2.7.1) |
| 284 | 304 | execjs (>= 0.3.0) |
| 285 | 305 | json (>= 1.8.0) |
| 306 | + unf (0.1.4) | |
| 307 | + unf_ext | |
| 308 | + unf_ext (0.0.6) | |
| 286 | 309 | warden (1.2.3) |
| 287 | 310 | rack (>= 1.0) |
| 288 | 311 | web-console (2.0.0) |
| ... | ... | @@ -290,6 +313,7 @@ GEM |
| 290 | 313 | binding_of_caller (>= 0.7.2) |
| 291 | 314 | railties (~> 4.0) |
| 292 | 315 | sprockets-rails (>= 2.0, < 4.0) |
| 316 | + webrobots (0.1.1) | |
| 293 | 317 | websocket-driver (0.5.3) |
| 294 | 318 | websocket-extensions (>= 0.1.0) |
| 295 | 319 | websocket-extensions (0.1.2) |
| ... | ... | @@ -318,6 +342,8 @@ DEPENDENCIES |
| 318 | 342 | exception_notification (~> 4.0.1) |
| 319 | 343 | factory_girl_rails (~> 4.5.0) |
| 320 | 344 | google-analytics-rails (~> 0.0.6) |
| 345 | + http_accept_language | |
| 346 | + i18n_generators | |
| 321 | 347 | jbuilder (~> 2.2.2) |
| 322 | 348 | jquery-rails |
| 323 | 349 | jquery-ui-rails (~> 5.0.0) | ... | ... |
app/assets/stylesheets/bootstrap_and_overrides.css
app/controllers/application_controller.rb
| 1 | +require 'http_accept_language' | |
| 2 | + | |
| 1 | 3 | class ApplicationController < ActionController::Base |
| 2 | 4 | # Prevent CSRF attacks by raising an exception. |
| 3 | 5 | # For APIs, you may want to use :null_session instead. |
| ... | ... | @@ -6,10 +8,27 @@ class ApplicationController < ActionController::Base |
| 6 | 8 | add_flash_types :error, :alert |
| 7 | 9 | |
| 8 | 10 | before_filter :configure_permitted_parameters, if: :devise_controller? |
| 11 | + before_filter :set_locale | |
| 12 | + | |
| 13 | + class << self | |
| 14 | + # This is necessary for correct devise routing with locales: https://github.com/plataformatec/devise/wiki/How-To:--Redirect-with-locale-after-authentication-failure | |
| 15 | + def default_url_options | |
| 16 | + locale_options | |
| 17 | + end | |
| 18 | + | |
| 19 | + def locale_options | |
| 20 | + { locale: I18n.locale } | |
| 21 | + end | |
| 22 | + end | |
| 23 | + | |
| 24 | + # This happens after the *_url *_path helpers | |
| 25 | + def default_url_options | |
| 26 | + self.class.locale_options | |
| 27 | + end | |
| 9 | 28 | |
| 10 | 29 | protected |
| 11 | 30 | |
| 12 | - # We don't have how too test this unless we have the Devise controllers. | |
| 31 | + # We don't have a way to test this unless we have the Devise controllers among our code. | |
| 13 | 32 | # Since creating the controllers looks wronger than not testing this two |
| 14 | 33 | # lines. I think we can live without 100% of coverage |
| 15 | 34 | # :nocov: |
| ... | ... | @@ -17,5 +36,12 @@ class ApplicationController < ActionController::Base |
| 17 | 36 | devise_parameter_sanitizer.for(:sign_up) << :name |
| 18 | 37 | devise_parameter_sanitizer.for(:account_update) << :name |
| 19 | 38 | end |
| 20 | - # :nocov: | |
| 39 | + | |
| 40 | + def set_locale | |
| 41 | + I18n.locale = ( | |
| 42 | + params[:locale] || | |
| 43 | + http_accept_language.compatible_language_from(I18n.available_locales) || | |
| 44 | + I18n.default_locale | |
| 45 | + ) | |
| 46 | + end | |
| 21 | 47 | end | ... | ... |
app/controllers/compound_metric_configurations_controller.rb
| ... | ... | @@ -25,7 +25,7 @@ class CompoundMetricConfigurationsController < BaseMetricConfigurationsControlle |
| 25 | 25 | respond_to do |format| |
| 26 | 26 | edit |
| 27 | 27 | if @compound_metric_configuration.update(metric_configuration_params) |
| 28 | - format.html { redirect_to kalibro_configuration_path(@compound_metric_configuration.kalibro_configuration_id), notice: 'Compound Metric Configuration was successfully updated.' } | |
| 28 | + format.html { redirect_to kalibro_configuration_path(@compound_metric_configuration.kalibro_configuration_id), notice: t('successfully_updated', :record => t('compound') + " " + @compound_metric_configuration.class.model_name.human) } | |
| 29 | 29 | format.json { head :no_content } |
| 30 | 30 | else |
| 31 | 31 | failed_action(format, 'edit') |
| ... | ... | @@ -59,7 +59,7 @@ class CompoundMetricConfigurationsController < BaseMetricConfigurationsControlle |
| 59 | 59 | #Code extracted from create action |
| 60 | 60 | def create_and_redir(format) |
| 61 | 61 | if @compound_metric_configuration.save |
| 62 | - format.html { redirect_to kalibro_configuration_path(@compound_metric_configuration.kalibro_configuration_id), notice: 'Compound Metric Configuration was successfully created.' } | |
| 62 | + format.html { redirect_to kalibro_configuration_path(@compound_metric_configuration.kalibro_configuration_id), notice: t('successfully_created', :record => t('compound') + " " + @compound_metric_configuration.class.model_name.human) } | |
| 63 | 63 | else |
| 64 | 64 | failed_action(format, 'new') |
| 65 | 65 | end | ... | ... |
app/controllers/concerns/ownership_authentication.rb
| ... | ... | @@ -54,7 +54,7 @@ module OwnershipAuthentication |
| 54 | 54 | def check_project_ownership(id) |
| 55 | 55 | if current_user.project_attributes.find_by_project_id(id).nil? |
| 56 | 56 | respond_to do |format| |
| 57 | - format.html { redirect_to projects_url, notice: "You're not allowed to do this operation" } | |
| 57 | + format.html { redirect_to projects_url, notice: t('not_allowed') } | |
| 58 | 58 | format.json { head :no_content } |
| 59 | 59 | end |
| 60 | 60 | end |
| ... | ... | @@ -65,7 +65,7 @@ module OwnershipAuthentication |
| 65 | 65 | def check_reading_group_ownership(id) |
| 66 | 66 | if current_user.reading_group_ownerships.find_by_reading_group_id(id).nil? |
| 67 | 67 | respond_to do |format| |
| 68 | - format.html { redirect_to reading_group_url(id), notice: "You're not allowed to do this operation" } | |
| 68 | + format.html { redirect_to reading_group_url(id: id), notice: t('not_allowed') } | |
| 69 | 69 | format.json { head :no_content } |
| 70 | 70 | end |
| 71 | 71 | end |
| ... | ... | @@ -76,7 +76,7 @@ module OwnershipAuthentication |
| 76 | 76 | def check_kalibro_configuration_ownership(id) |
| 77 | 77 | if current_user.kalibro_configuration_ownerships.find_by_kalibro_configuration_id(id).nil? |
| 78 | 78 | respond_to do |format| |
| 79 | - format.html { redirect_to kalibro_configurations_url(id), notice: "You're not allowed to do this operation" } | |
| 79 | + format.html { redirect_to kalibro_configurations_url(id: id), notice: t('not_allowed') } | |
| 80 | 80 | format.json { head :no_content } |
| 81 | 81 | end |
| 82 | 82 | end | ... | ... |
app/controllers/kalibro_configurations_controller.rb
| ... | ... | @@ -80,7 +80,7 @@ class KalibroConfigurationsController < ApplicationController |
| 80 | 80 | if @kalibro_configuration.save |
| 81 | 81 | current_user.kalibro_configuration_ownerships.create kalibro_configuration_id: @kalibro_configuration.id |
| 82 | 82 | |
| 83 | - format.html { redirect_to kalibro_configuration_path(@kalibro_configuration.id), notice: 'Configuration was successfully created.' } | |
| 83 | + format.html { redirect_to kalibro_configuration_path(@kalibro_configuration.id), notice: t('successfully_created', :record => t(@kalibro_configuration.model_name.human)) } | |
| 84 | 84 | format.json { render action: 'show', status: :created, location: @kalibro_configuration } |
| 85 | 85 | else |
| 86 | 86 | format.html { render action: 'new' } | ... | ... |
app/controllers/kalibro_ranges_controller.rb
| ... | ... | @@ -23,7 +23,7 @@ class KalibroRangesController < ApplicationController |
| 23 | 23 | def destroy |
| 24 | 24 | @kalibro_range.destroy |
| 25 | 25 | respond_to do |format| |
| 26 | - format_metric_configuration_path(format, "Range was successfully destroyed.") | |
| 26 | + format_metric_configuration_path(format, t('successfully_destroyed', :record => t(@kalibro_range.class))) | |
| 27 | 27 | format.json { head :no_content } |
| 28 | 28 | end |
| 29 | 29 | end |
| ... | ... | @@ -36,7 +36,7 @@ class KalibroRangesController < ApplicationController |
| 36 | 36 | respond_to do |format| |
| 37 | 37 | @kalibro_range.metric_configuration_id = @metric_configuration_id |
| 38 | 38 | if @kalibro_range.update(kalibro_range_params) |
| 39 | - format_metric_configuration_path(format, 'Range was successfully edited.') | |
| 39 | + format_metric_configuration_path(format, t('successfully_updated', :record => t(@kalibro_range.class))) | |
| 40 | 40 | format.json { head :no_content } |
| 41 | 41 | else |
| 42 | 42 | failed_action(format, 'edit') |
| ... | ... | @@ -53,7 +53,7 @@ class KalibroRangesController < ApplicationController |
| 53 | 53 | |
| 54 | 54 | def create_and_redir(format) |
| 55 | 55 | if @kalibro_range.save |
| 56 | - format_metric_configuration_path(format, 'Range was successfully created.') | |
| 56 | + format_metric_configuration_path(format, t('successfully_created', :record => t(@kalibro_range.class))) | |
| 57 | 57 | else |
| 58 | 58 | failed_action(format, 'new') |
| 59 | 59 | end | ... | ... |
app/controllers/metric_configurations_controller.rb
| ... | ... | @@ -29,7 +29,7 @@ class MetricConfigurationsController < BaseMetricConfigurationsController |
| 29 | 29 | respond_to do |format| |
| 30 | 30 | @metric_configuration.kalibro_configuration_id = params[:kalibro_configuration_id] |
| 31 | 31 | if @metric_configuration.update(metric_configuration_params) |
| 32 | - format.html { redirect_to(kalibro_configuration_path(@metric_configuration.kalibro_configuration_id), notice: 'Metric Configuration was successfully updated.') } | |
| 32 | + format.html { redirect_to(kalibro_configuration_path(@metric_configuration.kalibro_configuration_id), notice: t('successfully_updated', :record => t(metric_configuration.class))) } | |
| 33 | 33 | format.json { head :no_content } |
| 34 | 34 | Rails.cache.delete("#{@metric_configuration.kalibro_configuration_id}_metric_configurations") |
| 35 | 35 | else |
| ... | ... | @@ -71,7 +71,7 @@ class MetricConfigurationsController < BaseMetricConfigurationsController |
| 71 | 71 | #Code extracted from create action |
| 72 | 72 | def create_and_redir(format) |
| 73 | 73 | if @metric_configuration.save |
| 74 | - format.html { redirect_to kalibro_configuration_path(@metric_configuration.kalibro_configuration_id), notice: 'Metric Configuration was successfully created.' } | |
| 74 | + format.html { redirect_to kalibro_configuration_path(@metric_configuration.kalibro_configuration_id), notice: t('successfully_created', :record => t(metric_configuration.class)) } | |
| 75 | 75 | else |
| 76 | 76 | failed_action(format, 'new') |
| 77 | 77 | end | ... | ... |
app/controllers/projects_controller.rb
| ... | ... | @@ -79,7 +79,7 @@ class ProjectsController < ApplicationController |
| 79 | 79 | def create_and_redir(format) |
| 80 | 80 | if @project.save |
| 81 | 81 | current_user.project_attributes.create(project_id: @project.id) |
| 82 | - format.html { redirect_to project_path(@project.id), notice: 'Project was successfully created.' } | |
| 82 | + format.html { redirect_to project_path(@project.id), notice: t('successfully_created', :record => t(@project.class.name)) } | |
| 83 | 83 | format.json { render action: 'show', status: :created, location: @project } |
| 84 | 84 | else |
| 85 | 85 | format.html { render action: 'new' } | ... | ... |
app/controllers/reading_groups_controller.rb
| ... | ... | @@ -71,7 +71,7 @@ class ReadingGroupsController < ApplicationController |
| 71 | 71 | if @reading_group.save |
| 72 | 72 | current_user.reading_group_ownerships.create reading_group_id: @reading_group.id |
| 73 | 73 | |
| 74 | - format.html { redirect_to reading_group_path(@reading_group.id), notice: 'Reading Group was successfully created.' } | |
| 74 | + format.html { redirect_to reading_group_path(@reading_group.id), notice: t('successfully_created', :record => t(@reading_group.class)) } | |
| 75 | 75 | format.json { render action: 'show', status: :created, location: @reading_group } |
| 76 | 76 | else |
| 77 | 77 | format.html { render action: 'new' } | ... | ... |
app/controllers/readings_controller.rb
| ... | ... | @@ -28,7 +28,7 @@ class ReadingsController < ApplicationController |
| 28 | 28 | def update |
| 29 | 29 | respond_to do |format| |
| 30 | 30 | if @reading.update(reading_params) |
| 31 | - format.html { redirect_to(reading_group_path(@reading.reading_group_id), notice: 'Reading was successfully updated.') } | |
| 31 | + format.html { redirect_to(reading_group_path(@reading.reading_group_id), notice: t('successfully_updated', :record => t(@reading.class))) } | |
| 32 | 32 | format.json { head :no_content } |
| 33 | 33 | else |
| 34 | 34 | failed_action(format, 'edit') |
| ... | ... | @@ -63,7 +63,7 @@ class ReadingsController < ApplicationController |
| 63 | 63 | # Code extracted from create action |
| 64 | 64 | def create_and_redir(format) |
| 65 | 65 | if @reading.save |
| 66 | - format.html { redirect_to reading_group_path(@reading.reading_group_id), notice: 'Reading was successfully created.' } | |
| 66 | + format.html { redirect_to reading_group_path(@reading.reading_group_id), notice: t('successfully_created', :record => t(@reading.class)) } | |
| 67 | 67 | else |
| 68 | 68 | @reading_group_id = params[:reading_group_id] |
| 69 | 69 | failed_action(format, 'new') | ... | ... |
app/controllers/repositories_controller.rb
| ... | ... | @@ -43,7 +43,7 @@ class RepositoriesController < ApplicationController |
| 43 | 43 | def update |
| 44 | 44 | respond_to do |format| |
| 45 | 45 | if @repository.update(repository_params) |
| 46 | - format.html { redirect_to(project_repository_path(params[:project_id], @repository.id), notice: 'Repository was successfully updated.') } | |
| 46 | + format.html { redirect_to(project_repository_path(params[:project_id], @repository.id), notice: t('successfully_updated', :record => t(@repository.class))) } | |
| 47 | 47 | format.json { head :no_content } |
| 48 | 48 | else |
| 49 | 49 | failed_action(format, 'edit') |
| ... | ... | @@ -118,7 +118,7 @@ private |
| 118 | 118 | # Code extracted from create action |
| 119 | 119 | def create_and_redir(format) |
| 120 | 120 | if @repository.save |
| 121 | - format.html { redirect_to project_repository_process_path(@repository.project_id, @repository.id), notice: 'Repository was successfully created.' } | |
| 121 | + format.html { redirect_to project_repository_process_path(@repository.project_id, @repository.id), notice: t('successfully_created', :record => t(@repository.class)) } | |
| 122 | 122 | else |
| 123 | 123 | failed_action(format, 'new') |
| 124 | 124 | end | ... | ... |
app/helpers/application_helper.rb
app/helpers/compound_metric_configurations_helper.rb
| 1 | 1 | module CompoundMetricConfigurationsHelper |
| 2 | 2 | def scope_options |
| 3 | - [["Method","METHOD"], ["Class", "CLASS"], ["Package", "PACKAGE"], ["Software", "SOFTWARE"]] | |
| 3 | + [[t("scopes.METHOD"),"METHOD"], [t("scopes.CLASS"), "CLASS"], [t("scopes.PACKAGE"), "PACKAGE"], [t("scopes.SOFTWARE"), "SOFTWARE"]] | |
| 4 | + end | |
| 5 | + | |
| 6 | + def compound_metric_human_name(count=1) | |
| 7 | + key = count > 1 ? 'other': 'one' | |
| 8 | + t("activemodel.models.compound_metric_configuration.#{key}") | |
| 9 | + end | |
| 10 | + | |
| 11 | + def compound_metric_human_attribute_name(attribute_key) | |
| 12 | + t("activemodel.attributes.compound_metric_configuration.#{attribute_key}") | |
| 4 | 13 | end |
| 5 | 14 | end | ... | ... |
app/helpers/kalibro_configurations_helper.rb
| ... | ... | @@ -5,17 +5,17 @@ module KalibroConfigurationsHelper |
| 5 | 5 | |
| 6 | 6 | def link_to_edit_form(metric_configuration, kalibro_configuration_id) |
| 7 | 7 | if (metric_configuration.metric.is_a? KalibroClient::Entities::Miscellaneous::CompoundMetric) |
| 8 | - link_to('Edit', edit_kalibro_configuration_compound_metric_configuration_path(kalibro_configuration_id, metric_configuration.id), class: 'btn btn-info') | |
| 8 | + link_to(t('edit'), edit_kalibro_configuration_compound_metric_configuration_path(kalibro_configuration_id: kalibro_configuration_id, id: metric_configuration.id), class: 'btn btn-info') | |
| 9 | 9 | else |
| 10 | - link_to('Edit', edit_kalibro_configuration_metric_configuration_path(kalibro_configuration_id, metric_configuration.id), class: 'btn btn-info') | |
| 10 | + link_to(t('edit'), edit_kalibro_configuration_metric_configuration_path(kalibro_configuration_id: kalibro_configuration_id, id: metric_configuration.id), class: 'btn btn-info') | |
| 11 | 11 | end |
| 12 | 12 | end |
| 13 | 13 | |
| 14 | 14 | def link_to_show_page(metric_configuration, kalibro_configuration_id) |
| 15 | 15 | if (metric_configuration.metric.is_a? KalibroClient::Entities::Miscellaneous::CompoundMetric) |
| 16 | - link_to('Show', kalibro_configuration_compound_metric_configuration_path(kalibro_configuration_id, metric_configuration.id), class: 'btn btn-info') | |
| 16 | + link_to(t('show'), kalibro_configuration_compound_metric_configuration_path(kalibro_configuration_id: kalibro_configuration_id, id: metric_configuration.id), class: 'btn btn-info') | |
| 17 | 17 | else |
| 18 | - link_to('Show', kalibro_configuration_metric_configuration_path(kalibro_configuration_id, metric_configuration.id), class: 'btn btn-info') | |
| 18 | + link_to(t('show'), kalibro_configuration_metric_configuration_path(kalibro_configuration_id: kalibro_configuration_id, id: metric_configuration.id), class: 'btn btn-info') | |
| 19 | 19 | end |
| 20 | 20 | end |
| 21 | 21 | end | ... | ... |
app/helpers/metric_configurations_helper.rb
| 1 | 1 | module MetricConfigurationsHelper |
| 2 | 2 | def aggregation_options |
| 3 | - [["Average","AVERAGE"], ["Median", "MEDIAN"], ["Maximum", "MAXIMUM"], ["Minimum", "MINIMUM"], | |
| 4 | - ["Standard Deviation", "STANDARD_DEVIATION"], ["Count", "COUNT"]] | |
| 3 | + [[t("aggregation_forms.AVERAGE"),"AVERAGE"], [t("aggregation_forms.MEDIAN"), "MEDIAN"], [t("aggregation_forms.MAXIMUM"), "MAXIMUM"], [t("aggregation_forms.MINIMUM"), "MINIMUM"], [t("aggregation_forms.STANDARD_DEVIATION"), "STANDARD_DEVIATION"], [t("aggregation_forms.COUNT"), "COUNT"]] | |
| 5 | 4 | end |
| 6 | 5 | |
| 7 | 6 | def reading_group_options | ... | ... |
app/views/compound_metric_configurations/_created_metrics.html.erb
| 1 | 1 | <div id="created-metrics-accordion"> |
| 2 | - <h3 class="jquery-ui-accordion"> Created Metrics </h3> | |
| 2 | + <h3 class="jquery-ui-accordion"> <%= t('created_metrics') %> </h3> | |
| 3 | 3 | <div> |
| 4 | 4 | <table class="table table-hover"> |
| 5 | 5 | <thead> |
| 6 | - <th>Name</th> | |
| 7 | - <th>Code</th> | |
| 6 | + <th> <%= t('name') %> </th> | |
| 7 | + <th> <%= t('code') %> </th> | |
| 8 | 8 | </thead> |
| 9 | 9 | <tbody> |
| 10 | 10 | <%= render partial: 'created_metric', collection: metric_configurations, as: 'metric_configuration' %> |
| 11 | 11 | </tbody> |
| 12 | 12 | </table> |
| 13 | 13 | </div> |
| 14 | -</div> | |
| 15 | 14 | \ No newline at end of file |
| 15 | +</div> | ... | ... |
app/views/compound_metric_configurations/_form.html.erb
| ... | ... | @@ -8,12 +8,12 @@ |
| 8 | 8 | |
| 9 | 9 | <div class="form-row"> |
| 10 | 10 | <div class="field-container"> |
| 11 | - <%= f.label :weight, class: 'control-label' %> | |
| 11 | + <%= f.label :weight, compound_metric_human_attribute_name('weight'), class: 'control-label' %> | |
| 12 | 12 | <%= f.text_field :weight, :required => true, class: 'text-field form-control' %> |
| 13 | 13 | </div> |
| 14 | 14 | <div class="help-container"> |
| 15 | 15 | <p> |
| 16 | - It is used to calculate the weighted average of a <%= link_to 'module', tutorials_path("keywords", anchor: "module")%>'s grade. | |
| 16 | + <%= t('calculate_weighted_average_html', :href => link_to(t('module'), tutorials_path("keywords", anchor: "module"))) %> | |
| 17 | 17 | </p> |
| 18 | 18 | </div> |
| 19 | 19 | </div> |
| ... | ... | @@ -21,23 +21,23 @@ |
| 21 | 21 | <% if @compound_metric_configuration.persisted? %> |
| 22 | 22 | <%= hidden_field_tag(:reading_group_id, @compound_metric_configuration.reading_group_id) %> |
| 23 | 23 | <%= hidden_field_tag(:kalibro_configuration_id, @compound_metric_configuration.kalibro_configuration_id) %> |
| 24 | - <%= link_to 'Back', kalibro_configuration_path(@compound_metric_configuration.kalibro_configuration_id), class: 'btn btn-default' %> | |
| 24 | + <%= link_to t('back'), kalibro_configuration_path(@compound_metric_configuration.kalibro_configuration_id), class: 'btn btn-default' %> | |
| 25 | 25 | <% else %> |
| 26 | 26 | <div class="form-row"> |
| 27 | 27 | <div class="field-container"> |
| 28 | - <%= f.label :reading_group_id, 'Reading Group', class: 'control-label' %> | |
| 28 | + <%= f.label :reading_group_id, ReadingGroup.model_name.human, class: 'control-label' %> | |
| 29 | 29 | <%= f.select( :reading_group_id, reading_group_options, {class: 'form-control'} ) %> |
| 30 | 30 | </div> |
| 31 | 31 | <div class="help-container"> |
| 32 | 32 | <p> |
| 33 | - The <%= link_to 'Reading Group', tutorials_path('keywords', anchor: 'reading_group') %> associated with this metric. | |
| 33 | + <%= t('associated_metric_configuration_form_html', :href => link_to(t('reading_group'), tutorials_path('keywords', anchor: 'reading_group'))) %> | |
| 34 | 34 | </p> |
| 35 | 35 | </div> |
| 36 | 36 | </div> |
| 37 | 37 | <%= f.hidden_field(:kalibro_configuration_id, value: @kalibro_configuration_id) %> |
| 38 | - <%= link_to 'Back', kalibro_configuration_path(@kalibro_configuration_id), class: 'btn btn-default' %> | |
| 38 | + <%= link_to t('back'), kalibro_configuration_path(@kalibro_configuration_id), class: 'btn btn-default' %> | |
| 39 | 39 | <% end %> |
| 40 | 40 | </div> |
| 41 | 41 | </div> |
| 42 | 42 | <br> |
| 43 | -<%= f.submit 'Save', class: 'btn btn-primary' %> | |
| 43 | +<%= f.submit t('save'), class: 'btn btn-primary' %> | ... | ... |
app/views/compound_metric_configurations/_metric_options.html.erb
| 1 | 1 | <div class="form-row"> |
| 2 | 2 | <div class="field-container"> |
| 3 | - <%= f.label :name, class: 'control-label' %> | |
| 3 | + <%= f.label :name, compound_metric_human_attribute_name('name'), class: 'control-label' %> | |
| 4 | 4 | <%= f.text_field :name, :required => true, class: 'text-field form-control', value: (metric.name unless metric.nil?) %> |
| 5 | 5 | </div> |
| 6 | 6 | <div class="help-container"> |
| 7 | 7 | <p> |
| 8 | - A custom name for your compound metric. | |
| 8 | + <%= t_hint(:name) %> | |
| 9 | 9 | </p> |
| 10 | 10 | </div> |
| 11 | 11 | </div> |
| 12 | 12 | |
| 13 | 13 | <div class="form-row"> |
| 14 | 14 | <div class="field-container"> |
| 15 | - <%= f.label :description, class: 'control-label' %> | |
| 15 | + <%= f.label :description, compound_metric_human_attribute_name('description'), class: 'control-label' %> | |
| 16 | 16 | <%= f.text_field :description, class: 'text-field form-control', value: (metric.description unless metric.nil?) %> |
| 17 | 17 | </div> |
| 18 | 18 | <div class="help-container"> |
| 19 | 19 | <p> |
| 20 | - A short description of your compound metric. | |
| 20 | + <%= t_hint(:description) %> | |
| 21 | 21 | </p> |
| 22 | 22 | </div> |
| 23 | 23 | </div> |
| 24 | 24 | |
| 25 | 25 | <div class="form-row"> |
| 26 | 26 | <div class="field-container"> |
| 27 | - <%= f.label :script, class: 'control-label' %> | |
| 27 | + <%= f.label :script, compound_metric_human_attribute_name('script'), class: 'control-label' %> | |
| 28 | 28 | <%= f.text_area :script, :required => true, class: 'text-area form-control', value: (metric.script unless metric.nil?) %> |
| 29 | 29 | </div> |
| 30 | 30 | <div class="help-container"> |
| 31 | 31 | <p> |
| 32 | - A mathematical expression (in javascript) to calculate your compound metric. It needs a return statement. The codes of already created metrics can be used inside the script. | |
| 32 | + <%= t_hint(:script) %> | |
| 33 | 33 | </p> |
| 34 | 34 | </div> |
| 35 | 35 | </div> |
| 36 | 36 | |
| 37 | 37 | <div class="form-row"> |
| 38 | 38 | <div class="field-container"> |
| 39 | - <%= f.label :scope, 'Scope', class: 'control-label' %> | |
| 39 | + <%= f.label :scope, compound_metric_human_attribute_name('scope'), class: 'control-label' %> | |
| 40 | 40 | <%= f.select( :scope, scope_options, {class: 'form-control', selected: (metric.scope unless metric.nil?)} ) %> |
| 41 | 41 | </div> |
| 42 | 42 | <div class="help-container"> |
| 43 | 43 | <p> |
| 44 | - The <%= link_to 'granularity', tutorials_path("keywords", anchor: "granularity")%> of the <%= link_to 'modules', tutorials_path("keywords", anchor: "module")%> measured by this metric. | |
| 44 | + <%= t('measured_metric_html', :href => link_to(t('granularity'), tutorials_path('keywords', anchor: "granularity")), :href2 => link_to(t('modules'), tutorials_path( 'keywords', anchor: 'module' ))) %> | |
| 45 | 45 | </p> |
| 46 | 46 | </div> |
| 47 | 47 | </div> |
| 48 | 48 | |
| 49 | 49 | <div class="form-row"> |
| 50 | 50 | <div class="field-container"> |
| 51 | - <%= f.label :code, class: 'control-label' %> | |
| 51 | + <%= f.label :code, compound_metric_human_attribute_name('code'), class: 'control-label' %> | |
| 52 | 52 | <%= f.text_field :code, :required => true, class: 'text-field form-control' %> |
| 53 | 53 | </div> |
| 54 | 54 | <div class="help-container"> |
| 55 | 55 | <p> |
| 56 | - A variable that holds the value of a metric calculation. It can be used in the script of another compound metric. | |
| 57 | - </p> | |
| 58 | - <p> | |
| 59 | - Example: | |
| 60 | - Code foo := 10 | |
| 56 | + <%= t_hint('code.description') %> | |
| 61 | 57 | </p> |
| 58 | + <br> | |
| 59 | + <p> | |
| 60 | + <%= t_hint('code.example') %> | |
| 61 | + </p> | |
| 62 | 62 | </div> |
| 63 | 63 | </div> |
| 64 | 64 | <%= f.hidden_field(:compound, { value: "true"}) %> | ... | ... |
app/views/compound_metric_configurations/edit.html.erb
app/views/compound_metric_configurations/new.html.erb
app/views/compound_metric_configurations/show.html.erb
| ... | ... | @@ -3,58 +3,58 @@ |
| 3 | 3 | </div> |
| 4 | 4 | |
| 5 | 5 | <p> |
| 6 | - <strong>Description:</strong> | |
| 6 | + <strong> <%= t('description') %>:</strong> | |
| 7 | 7 | <% if @compound_metric_configuration.metric.description.nil? %> |
| 8 | - <%= "There is no description available." %> | |
| 8 | + <%= t('no_description') %> | |
| 9 | 9 | <% else %> |
| 10 | 10 | <%= @compound_metric_configuration.metric.description %> |
| 11 | 11 | <% end %> |
| 12 | 12 | </p> |
| 13 | 13 | |
| 14 | 14 | <p> |
| 15 | - <strong>Script:</strong> | |
| 15 | + <strong> <%= t('script') %>:</strong> | |
| 16 | 16 | <%= @compound_metric_configuration.metric.script %> |
| 17 | 17 | </p> |
| 18 | 18 | |
| 19 | 19 | <p> |
| 20 | - <strong>Scope:</strong> | |
| 20 | + <strong> <%= t('scope') %>:</strong> | |
| 21 | 21 | <%= @compound_metric_configuration.metric.scope %> |
| 22 | 22 | </p> |
| 23 | 23 | |
| 24 | 24 | <p> |
| 25 | - <strong>Code:</strong> | |
| 25 | + <strong> <%= t('code') %>:</strong> | |
| 26 | 26 | <%= @compound_metric_configuration.metric.code %> |
| 27 | 27 | </p> |
| 28 | 28 | |
| 29 | 29 | <p> |
| 30 | - <strong>Weight:</strong> | |
| 30 | + <strong> <%= t('weight') %>:</strong> | |
| 31 | 31 | <%= @compound_metric_configuration.weight %> |
| 32 | 32 | </p> |
| 33 | 33 | |
| 34 | 34 | <p> |
| 35 | - <strong>Aggregation Form:</strong> | |
| 35 | + <strong> <%= t('metric_configurations_aggregation') %>:</strong> | |
| 36 | 36 | <%= @compound_metric_configuration.aggregation_form %> |
| 37 | 37 | </p> |
| 38 | 38 | |
| 39 | 39 | <p> |
| 40 | - <strong>Reading Group Name:</strong> | |
| 40 | + <strong> <%= t('metric_configurations_reading_group') %>:</strong> | |
| 41 | 41 | <%= @reading_group.name %> |
| 42 | 42 | </p> |
| 43 | 43 | |
| 44 | 44 | <hr> |
| 45 | 45 | |
| 46 | -<h2> Ranges </h2> | |
| 46 | +<h2> <%= t('ranges') %> </h2> | |
| 47 | 47 | <% if kalibro_configuration_owner? @compound_metric_configuration.kalibro_configuration_id %> |
| 48 | - <%= link_to 'Add Range', kalibro_configuration_metric_configuration_new_kalibro_range_path(@compound_metric_configuration.kalibro_configuration_id, | |
| 48 | + <%= link_to t('add_range'), kalibro_configuration_metric_configuration_new_kalibro_range_path(@compound_metric_configuration.kalibro_configuration_id, | |
| 49 | 49 | @compound_metric_configuration.id), class: 'btn btn-info' %> |
| 50 | 50 | <% end %> |
| 51 | 51 | |
| 52 | 52 | <table class="table table-hover"> |
| 53 | 53 | <thead> |
| 54 | 54 | <tr> |
| 55 | - <th>Label</th> | |
| 56 | - <th>Beginning</th> | |
| 57 | - <th>End</th> | |
| 55 | + <th> <%= t('label') %> </th> | |
| 56 | + <th> <%= t('beginning') %> </th> | |
| 57 | + <th> <%= t('end') %> </th> | |
| 58 | 58 | </tr> |
| 59 | 59 | </thead> |
| 60 | 60 | <tbody> |
| ... | ... | @@ -69,10 +69,10 @@ |
| 69 | 69 | <hr> |
| 70 | 70 | |
| 71 | 71 | <p> |
| 72 | - <%= link_to 'Back', kalibro_configuration_path(@compound_metric_configuration.kalibro_configuration_id), class: 'btn btn-default' %> | |
| 72 | + <%= link_to t('back'), kalibro_configuration_path(@compound_metric_configuration.kalibro_configuration_id), class: 'btn btn-default' %> | |
| 73 | 73 | <% if kalibro_configuration_owner? @compound_metric_configuration.kalibro_configuration_id %> |
| 74 | - <%= link_to 'Destroy Metric Configuration', kalibro_configuration_metric_configuration_path(@compound_metric_configuration.kalibro_configuration_id, | |
| 75 | - @compound_metric_configuration.id), method: :delete, data: { confirm: 'Are you sure that you want to destroy this Metric Configuration?' }, | |
| 74 | + <%= link_to t('destroy_metric_configuration'), kalibro_configuration_metric_configuration_path(@compound_metric_configuration.kalibro_configuration_id, | |
| 75 | + @compound_metric_configuration.id), method: :delete, data: { confirm: t('want_destroy_metric_configuration') }, | |
| 76 | 76 | class: 'btn btn-danger' %> |
| 77 | 77 | <% end %> |
| 78 | 78 | </p> | ... | ... |
app/views/devise/confirmations/new.html.erb
| 1 | 1 | <div class="page-header"> |
| 2 | - <h1>Resend confirmation instructions</h1> | |
| 2 | + <h1><%= t('.resend_confirmation_instructions', :default => 'Resend confirmation instructions') %></h1> | |
| 3 | 3 | </div> |
| 4 | 4 | |
| 5 | 5 | <%= form_for(resource, :as => resource_name, :url => confirmation_path(resource_name), :html => { :method => :post }) do |f| %> |
| ... | ... | @@ -8,7 +8,7 @@ |
| 8 | 8 | <div><%= f.label :email %><br /> |
| 9 | 9 | <%= f.email_field :email, :autofocus => true %></div> |
| 10 | 10 | |
| 11 | - <div><%= f.submit "Resend confirmation instructions", class: 'btn btn-default' %></div> | |
| 11 | + <div><%= f.submit t('.resend_confirmation_instructions', :default => 'Resend confirmation instructions'), class: 'btn btn-default' %></div> | |
| 12 | 12 | <% end %> |
| 13 | 13 | |
| 14 | 14 | <%= render "devise/shared/links" %> | ... | ... |
app/views/devise/mailer/confirmation_instructions.html.erb
| 1 | -<p>Welcome <%= @email %>!</p> | |
| 1 | +<% require 'devise/version' %> | |
| 2 | +<p><%= t('.greeting', :recipient => @resource.email, :default => "Welcome #{@resource.email}!") %></p> | |
| 2 | 3 | |
| 3 | -<p>You can confirm your account email through the link below:</p> | |
| 4 | - | |
| 5 | -<p><%= link_to 'Confirm my account', confirmation_url(@resource, :confirmation_token => @token) %></p> | |
| 4 | +<p><%= t('.instruction', :default => "You can confirm your account email through the link below:") %></p> | |
| 5 | +<p><%= link_to t('.action', :default => "Confirm my account"), | |
| 6 | + confirmation_url(@resource, :confirmation_token => (Devise::VERSION.start_with?('3.') ? @token : @resource.confirmation_token)) %></p> | |
| 6 | 7 | \ No newline at end of file | ... | ... |
app/views/devise/mailer/reset_password_instructions.html.erb
| 1 | -<p>Hello <%= @resource.email %>!</p> | |
| 1 | +<% require 'devise/version' %> | |
| 2 | +<p><%= t('.greeting', :recipient => @resource.email, :default => "Hello #{@resource.email}!") %></p> | |
| 2 | 3 | |
| 3 | -<p>Someone has requested a link to change your password. You can do this through the link below:</p> | |
| 4 | +<p><%= t('.instruction', :default => "Someone has requested a link to change your password, and you can do this through the link below.") %></p> | |
| 4 | 5 | |
| 5 | -<p><%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @token) %></p> | |
| 6 | +<p><%= link_to t('.action', :default => "Change my password"), edit_password_url(@resource, :reset_password_token => (Devise::VERSION.start_with?('3.') ? @token : @resource.reset_password_token)) %></p> | |
| 6 | 7 | |
| 7 | -<p>If you did not request this, please ignore this email.</p> | |
| 8 | -<p>Your password will not change until you access the link above and create a new one.</p> | |
| 8 | +<p><%= t('.instruction_2', :default => "If you didn't request this, please ignore this email.") %></p> | |
| 9 | +<p><%= t('.instruction_3', :default => "Your password won't change until you access the link above and create a new one.") %></p> | ... | ... |
app/views/devise/mailer/unlock_instructions.html.erb
| 1 | -<p>Hello <%= @resource.email %>!</p> | |
| 1 | +<% require 'devise/version' %> | |
| 2 | +<p><%= t('.greeting', :recipient => @resource.email, :default => "Hello #{@resource.email}!") %></p> | |
| 2 | 3 | |
| 3 | -<p>Your account has been locked due to an excessive number of unsuccessful sign in attempts.</p> | |
| 4 | +<p><%= t('.message', :default => "Your account has been locked due to an excessive amount of unsuccessful sign in attempts.") %></p> | |
| 4 | 5 | |
| 5 | -<p>Click the link below to unlock your account:</p> | |
| 6 | +<p><%= t('.instruction', :default => "Click the link below to unlock your account:") %></p> | |
| 6 | 7 | |
| 7 | -<p><%= link_to 'Unlock my account', unlock_url(@resource, :unlock_token => @token) %></p> | |
| 8 | +<p><%= link_to t('.action', :default => "Unlock my account"), unlock_url(@resource, :unlock_token => (Devise::VERSION.start_with?('3.') ? @token :@resource.unlock_token)) %></p> | ... | ... |
app/views/devise/passwords/edit.html.erb
| 1 | 1 | <div class="page-header"> |
| 2 | - <h1>Change your password</h1> | |
| 2 | + <h1><%= t('.change_your_password', :default => 'Change your password') %></h1> | |
| 3 | 3 | </div> |
| 4 | 4 | |
| 5 | 5 | <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :put }) do |f| %> |
| 6 | 6 | <%= devise_error_messages! %> |
| 7 | 7 | <%= f.hidden_field :reset_password_token %> |
| 8 | 8 | |
| 9 | - <div><%= f.label :password, "New password" %><br /> | |
| 9 | + <div><%= f.label :password, t('.new_password', :default => 'New password') %><br /> | |
| 10 | 10 | <%= f.password_field :password, :autofocus => true %></div> |
| 11 | 11 | |
| 12 | - <div><%= f.label :password_confirmation, "Confirm new password" %><br /> | |
| 12 | + <div><%= f.label :password_confirmation, t('.confirm_new_password', :default => 'Confirm new password') %><br /> | |
| 13 | 13 | <%= f.password_field :password_confirmation %></div> |
| 14 | 14 | |
| 15 | - <div><%= f.submit "Change my password", class: 'btn btn-warning' %></div> | |
| 15 | + <div><%= f.submit t('.change_my_password', :default => 'Change my password'), class: 'btn btn-warning' %></div> | |
| 16 | 16 | <% end %> |
| 17 | 17 | |
| 18 | 18 | <%= render "devise/shared/links" %> | ... | ... |
app/views/devise/passwords/new.html.erb
| 1 | 1 | <div class="page-header"> |
| 2 | - <h1>Forgot your password?</h1> | |
| 2 | + <h1><%= t('.forgot_your_password', :default => 'Forgot your password?') %></h1> | |
| 3 | 3 | </div> |
| 4 | 4 | |
| 5 | 5 | <%= form_for(resource, :as => resource_name, :url => password_path(resource_name), :html => { :method => :post }) do |f| %> |
| ... | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | </div> |
| 15 | 15 | <div class="help-container"> |
| 16 | 16 | <p> |
| 17 | - The same email address used to sign up. | |
| 17 | + <%= t('.same_email') %> | |
| 18 | 18 | </p> |
| 19 | 19 | </div> |
| 20 | 20 | </div> |
| ... | ... | @@ -22,8 +22,7 @@ |
| 22 | 22 | </div> |
| 23 | 23 | |
| 24 | 24 | <div class="row margin-left-none" style="margin-top: 20px"> |
| 25 | - <%= f.submit "Send me reset password instructions", class: 'btn btn-warning' %> | |
| 25 | + <%= f.submit t('.send_me_reset_password_instructions', :default => "Send me reset password instructions"), class: 'btn btn-warning' %> | |
| 26 | 26 | <%= render "devise/shared/links" %> |
| 27 | 27 | </div> |
| 28 | 28 | <% end %> |
| 29 | - | ... | ... |
app/views/devise/registrations/edit.html.erb
| 1 | 1 | <div class="page-header"> |
| 2 | - <h1>Edit <%= resource_name.to_s.humanize %></h1> | |
| 2 | + <h1><%= t('.title', :resource => resource_class.model_name.human , :default => "Edit #{resource_name.to_s.humanize}") %></h1> | |
| 3 | 3 | </div> |
| 4 | - | |
| 5 | 4 | <%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put, :class => "form-inline" }) do |f| %> |
| 6 | 5 | <%= devise_error_messages! %> |
| 7 | 6 | |
| ... | ... | @@ -10,39 +9,39 @@ |
| 10 | 9 | <div class="form-row"> |
| 11 | 10 | <div class="field-container"> |
| 12 | 11 | <%= f.label :name, class: 'control-label' %><br /> |
| 13 | - <%= f.text_field :name, :autofocus => true, class: 'text-field form-control' %> | |
| 12 | + <%= f.email_field :name, :autofocus => true, class: 'text-field form-control' %> | |
| 14 | 13 | </div> |
| 15 | 14 | <div class="help-container"> |
| 16 | 15 | <p> |
| 17 | - Your full name. | |
| 16 | + <%= t('.your_full_name')%> | |
| 18 | 17 | </p> |
| 19 | 18 | </div> |
| 20 | 19 | </div> |
| 21 | - | |
| 22 | 20 | <div class="form-row"> |
| 23 | 21 | <div class="field-container"> |
| 24 | 22 | <%= f.label :email, class: 'control-label' %><br /> |
| 25 | 23 | <%= f.email_field :email, class: 'text-field form-control' %> |
| 26 | - | |
| 27 | - <% if devise_mapping.confirmable? && resource.pending_reconfirmation? %> | |
| 28 | - <div>Currently waiting confirmation for: <%= resource.unconfirmed_email %></div> | |
| 29 | - <% end %> | |
| 24 | + <%- if devise_mapping.confirmable? && resource.pending_reconfirmation? -%> | |
| 25 | + <p> | |
| 26 | + <%= t('.currently_waiting_confirmation_for_email', :email => resource.unconfirmed_email, :default => "Currently waiting confirmation for: %{email}") %> | |
| 27 | + </p> | |
| 28 | + <%- end -%> | |
| 30 | 29 | </div> |
| 31 | 30 | <div class="help-container"> |
| 32 | 31 | <p> |
| 33 | - Your email is our communication channel. Make sure you have typed it correctly. | |
| 32 | + <%= t('.your_email_is_our_communication_channel')%> | |
| 34 | 33 | </p> |
| 35 | 34 | </div> |
| 36 | 35 | </div> |
| 37 | 36 | |
| 38 | 37 | <div class="form-row"> |
| 39 | 38 | <div class="field-container"> |
| 40 | - <%= f.label :password, class: 'control-label' %> <i>(leave it blank if you do not want to change it)</i><br /> | |
| 39 | + <%= f.label :password, class: 'control-label' %> <i>(<%= t('.leave_blank_if_you_don_t_want_to_change_it', :default => "leave blank if you don't want to change it") %>)</i><br /> | |
| 41 | 40 | <%= f.password_field :password, :autocomplete => "off", class: 'text-field form-control' %> |
| 42 | 41 | </div> |
| 43 | 42 | <div class="help-container"> |
| 44 | 43 | <p> |
| 45 | - Your password must have at least 8 characters. Strong passwords contain numbers, symbols, upper and lowercase characters. | |
| 44 | + <%= t('.password_instructions')%> | |
| 46 | 45 | </p> |
| 47 | 46 | </div> |
| 48 | 47 | </div> |
| ... | ... | @@ -54,32 +53,33 @@ |
| 54 | 53 | </div> |
| 55 | 54 | <div class="help-container"> |
| 56 | 55 | <p> |
| 57 | - Confirm your password. | |
| 56 | + <%= t('.confirm_your_password')%> | |
| 58 | 57 | </p> |
| 59 | 58 | </div> |
| 60 | 59 | </div> |
| 61 | 60 | |
| 62 | 61 | <div class="form-row"> |
| 63 | 62 | <div class="field-container"> |
| 64 | - <%= f.label :current_password, class: 'control-label' %><br /> | |
| 63 | + <%= f.label :current_password, class: 'control-label' %> <i>(<%= t('.we_need_your_current_password_to_confirm_your_changes', :default => 'we need your current password to confirm your changes') %>)</i><br /> | |
| 65 | 64 | <%= f.password_field :current_password, class: 'text-field form-control' %> |
| 66 | 65 | </div> |
| 67 | 66 | <div class="help-container"> |
| 68 | 67 | <p> |
| 69 | - Your current password is needed to confirm your changes. | |
| 68 | + <%= t('.current_password_required')%> | |
| 70 | 69 | </p> |
| 71 | 70 | </div> |
| 72 | 71 | </div> |
| 73 | - </div> | |
| 74 | - </div> | |
| 75 | 72 | |
| 76 | - <div class="row margin-left-none" style="margin-top: 20px"> | |
| 77 | - <%= f.submit "Update", class: 'btn btn-primary col-md-2' %> | |
| 73 | + <div class="row margin-left-none" style="margin-top: 20px"> | |
| 74 | + <%= f.submit t('.update', :default => "Update"), class: 'btn btn-primary col-md-2' %> | |
| 75 | + </div> | |
| 76 | + </div> | |
| 78 | 77 | </div> |
| 79 | 78 | <% end %> |
| 80 | 79 | |
| 81 | 80 | <hr /> |
| 81 | +<h2><%= t('.cancel_my_account', :default => 'Cancel my account') %></h2> | |
| 82 | 82 | |
| 83 | -<h2>Cancel my account</h2> | |
| 83 | +<p><%= t('.unhappy', :default => 'Unhappy') %>? <%= link_to t('.cancel_my_account', :default => "Cancel my account"), registration_path(resource_name), :data => { :confirm => t('.are_you_sure', :default => "Are you sure?") }, :method => :delete, class: 'btn btn-warning' %>.</p> | |
| 84 | 84 | |
| 85 | -<p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Do you really want to cancel your account?" }, :method => :delete, class: 'btn btn-danger' %></p> | |
| 85 | +<%= link_to t('devise.shared.links.back', :default => "Back"), :back, class: 'btn btn-default' %> | ... | ... |
app/views/devise/registrations/new.html.erb
| 1 | 1 | <div class="page-header"> |
| 2 | - <h1>Sign Up</h1> | |
| 2 | + <h1><%= t('.sign_up', :default => "Sign up") %></h1> | |
| 3 | 3 | </div> |
| 4 | 4 | |
| 5 | -<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name),:html => { :class => "form-inline" }) do |f| %> | |
| 5 | +<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :class => "form-inline" }) do |f| %> | |
| 6 | 6 | <%= devise_error_messages! %> |
| 7 | 7 | |
| 8 | 8 | <div class="row margin-left-none"> |
| ... | ... | @@ -14,7 +14,7 @@ |
| 14 | 14 | </div> |
| 15 | 15 | <div class="help-container"> |
| 16 | 16 | <p> |
| 17 | - Your full name. | |
| 17 | + <%= t('.your_full_name')%> | |
| 18 | 18 | </p> |
| 19 | 19 | </div> |
| 20 | 20 | </div> |
| ... | ... | @@ -26,7 +26,7 @@ |
| 26 | 26 | </div> |
| 27 | 27 | <div class="help-container"> |
| 28 | 28 | <p> |
| 29 | - Your email is our communication channel. Make sure you have typed it correctly. | |
| 29 | + <%= t('.your_email_is_our_communication_channel')%> | |
| 30 | 30 | </p> |
| 31 | 31 | </div> |
| 32 | 32 | </div> |
| ... | ... | @@ -38,7 +38,7 @@ |
| 38 | 38 | </div> |
| 39 | 39 | <div class="help-container"> |
| 40 | 40 | <p> |
| 41 | - Your password must have at least 8 characters. Strong passwords contain numbers, symbols, upper and lowercase characters. | |
| 41 | + <%= t('.password_instructions')%> | |
| 42 | 42 | </p> |
| 43 | 43 | </div> |
| 44 | 44 | </div> |
| ... | ... | @@ -50,15 +50,14 @@ |
| 50 | 50 | </div> |
| 51 | 51 | <div class="help-container"> |
| 52 | 52 | <p> |
| 53 | - Confirm your password. | |
| 53 | + <%= t('.confirm_your_password')%> | |
| 54 | 54 | </p> |
| 55 | 55 | </div> |
| 56 | 56 | </div> |
| 57 | 57 | </div> |
| 58 | - | |
| 59 | - </div> <!--row--> | |
| 58 | + </div> | |
| 60 | 59 | |
| 61 | 60 | <div class="row margin-left-none" style="margin-top: 20px"> |
| 62 | - <%= f.submit "Sign Up", class: 'btn btn-primary col-md-2' %> | |
| 61 | + <%= f.submit t('.sign_up', :default => "Sign up"), class: 'btn btn-primary col-md-2' %> | |
| 63 | 62 | </div> |
| 64 | 63 | <% end %> | ... | ... |
app/views/devise/sessions/new.html.erb
| 1 | 1 | <div class="page-header"> |
| 2 | - <h1>Login into Mezuro</h1> | |
| 2 | + <h1><%= t('.sign_in', :default => "Sign in") %></h1> | |
| 3 | 3 | </div> |
| 4 | 4 | |
| 5 | -<%= form_for(resource, :as => resource_name, :url => session_path(resource_name),:html => { :class => "form-inline" }) do |f| %> | |
| 5 | +<%= form_for(resource, :as => resource_name, :url => session_path(resource_name), :html => { :class => "form-inline" }) do |f| %> | |
| 6 | 6 | <div class="row margin-left-none"> |
| 7 | 7 | <div class="form-table col-md-9"> |
| 8 | 8 | <div class="form-row"> |
| 9 | 9 | <div class="field-container"> |
| 10 | - <%= f.label :email, class: "control-label " %> | |
| 11 | - <%= f.email_field :email, autofocus: true, tabindex: 1, class: 'text-field form-control' %> | |
| 10 | + <%= f.label :email, class: 'control-label' %> | |
| 11 | + <%= f.email_field :email, :autofocus => true, tabindex: 1, class: 'text-field form-control' %> | |
| 12 | 12 | </div> |
| 13 | 13 | <div class="help-container"> |
| 14 | 14 | <p> |
| 15 | - The same email address used to sign up. | |
| 15 | + <%= t('.same_email') %> | |
| 16 | 16 | </p> |
| 17 | 17 | </div> |
| 18 | 18 | </div> |
| 19 | - </div> | |
| 20 | - </div> | |
| 21 | 19 | |
| 22 | - <div class="row margin-left-none"> | |
| 23 | - <div class="form-table col-md-9"> | |
| 24 | 20 | <div class="form-row"> |
| 25 | 21 | <div class="field-container"> |
| 26 | - <%= f.label :password, class: "control-label" %> | |
| 27 | - <%= f.password_field :password, tabindex: 2, class: 'text-field form-control' %> | |
| 22 | + <%= f.label :password, class: 'control-label' %> | |
| 23 | + <%= f.password_field :password, class: 'text-field form-control', tabindex: 2 %> | |
| 28 | 24 | </div> |
| 29 | 25 | <div class="help-container"> |
| 30 | 26 | <p> |
| 31 | - If you forgot your password, follow this <a href="/users/password/new">link</a> to reset it. | |
| 27 | + <%= t('.forgot_password_link_html', link: link_to("link", "/users/password/new")) %> | |
| 32 | 28 | </p> |
| 33 | 29 | </div> |
| 34 | 30 | </div> |
| 35 | - </div> | |
| 36 | - </div> | |
| 37 | 31 | |
| 38 | - <% if devise_mapping.rememberable? -%> | |
| 39 | - <div class="row margin-left-none"> | |
| 40 | - <div class="form-table col-md-9"> | |
| 41 | - <div class="form-row"> | |
| 42 | - <div class="field-container"> | |
| 43 | - <div class="checkbox"> | |
| 32 | + <% if devise_mapping.rememberable? -%> | |
| 33 | + <div class="form-row"> | |
| 34 | + <div class="field-container"> | |
| 44 | 35 | <label> |
| 45 | 36 | <%= f.check_box :remember_me, class: "checkbox" %> <%= f.label :remember_me %> |
| 46 | 37 | </label> |
| 47 | 38 | </div> |
| 39 | + <div class="help-container"> | |
| 40 | + <p> | |
| 41 | + <%= t('.stay_logged_in')%> | |
| 42 | + </p> | |
| 43 | + </div> | |
| 48 | 44 | </div> |
| 49 | - <div class="help-container"> | |
| 50 | - <p> | |
| 51 | - Stay logged in. | |
| 52 | - </p> | |
| 53 | - </div> | |
| 54 | - </div> | |
| 45 | + <% end -%> | |
| 55 | 46 | </div> |
| 56 | 47 | </div> |
| 57 | - <% end -%> | |
| 58 | 48 | |
| 59 | 49 | <div class="row margin-left-none" style="margin-top: 20px"> |
| 60 | - <%= f.submit "Sign In", class: 'btn btn-primary', :tabindex => 3 %> | |
| 50 | + <%= f.submit t('.sign_in', :default => "Sign in"), class: 'btn btn-primary', :tabindex => 3 %> | |
| 61 | 51 | <%= render "devise/shared/links" %> |
| 62 | 52 | </div> |
| 63 | 53 | <% end %> | ... | ... |
app/views/devise/shared/_links.erb
| 1 | 1 | <%- if controller_name != 'sessions' %> |
| 2 | - <%= link_to "Sign In", new_session_path(resource_name), class: 'btn btn-info' %> | |
| 2 | +<%= link_to t(".sign_in", :default => "Sign in"), new_session_path(resource_name), class: 'btn btn-info' %> | |
| 3 | 3 | <% end -%> |
| 4 | 4 | |
| 5 | 5 | <%- if devise_mapping.registerable? && controller_name != 'registrations' %> |
| 6 | - <%= link_to "Sign Up", new_registration_path(resource_name), class: 'btn btn-info' %> | |
| 6 | +<%= link_to t(".sign_up", :default => "Sign up"), new_registration_path(resource_name), class: 'btn btn-info' %> | |
| 7 | 7 | <% end -%> |
| 8 | 8 | |
| 9 | -<!-- <%- if devise_mapping.recoverable? && controller_name != 'passwords' && controller_name != 'registrations' %> | |
| 10 | - <%= link_to "Forgot your password?", new_password_path(resource_name), class: 'btn btn-info' %> | |
| 9 | +<!-- <%- if devise_mapping.recoverable? && controller_name != 'passwords' %> | |
| 10 | +<%= link_to t(".forgot_your_password", :default => "Forgot your password?"), new_password_path(resource_name), class: 'btn btn-info' %> | |
| 11 | 11 | <% end -%> --> |
| 12 | 12 | |
| 13 | 13 | <%- if devise_mapping.confirmable? && controller_name != 'confirmations' %> |
| 14 | - <%= link_to "Have you received confirmation instructions?", new_confirmation_path(resource_name), class: 'btn btn-info' %> | |
| 14 | +<%= link_to t('.didn_t_receive_confirmation_instructions', :default => "Didn't receive confirmation instructions?"), new_confirmation_path(resource_name), class: 'btn btn-info' %> | |
| 15 | 15 | <% end -%> |
| 16 | 16 | |
| 17 | 17 | <%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %> |
| 18 | - <%= link_to "Have you received unlock instructions?", new_unlock_path(resource_name), class: 'btn btn-info' %> | |
| 18 | +<%= link_to t('.didn_t_receive_unlock_instructions', :default => "Didn't receive unlock instructions?"), new_unlock_path(resource_name), class: 'btn btn-info' %> | |
| 19 | 19 | <% end -%> |
| 20 | 20 | |
| 21 | 21 | <%- if devise_mapping.omniauthable? %> |
| 22 | 22 | <%- resource_class.omniauth_providers.each do |provider| %> |
| 23 | - <%= link_to "Sign in with #{provider.to_s.titleize}", omniauth_authorize_path(resource_name, provider), class: 'btn btn-info' %> | |
| 23 | + <%= link_to t('.sign_in_with_provider', :provider => provider.to_s.titleize, :default => "Sign in with #{provider.to_s.titleize}"), omniauth_authorize_path(resource_name, provider), class: 'btn btn-info' %> | |
| 24 | 24 | <% end -%> |
| 25 | 25 | -<% end -%> |
| 26 | +<% end -%> | |
| 26 | 27 | \ No newline at end of file | ... | ... |
app/views/devise/unlocks/new.html.erb
| 1 | 1 | <div class="page-header"> |
| 2 | - <h1>Resend unlock instructions</h1> | |
| 2 | + <h2><%= t('.resend_unlock_instructions', :default => "Resend unlock instructions") %></h2> | |
| 3 | 3 | </div> |
| 4 | 4 | |
| 5 | 5 | <%= form_for(resource, :as => resource_name, :url => unlock_path(resource_name), :html => { :method => :post }) do |f| %> |
| ... | ... | @@ -8,7 +8,7 @@ |
| 8 | 8 | <div><%= f.label :email %><br /> |
| 9 | 9 | <%= f.email_field :email, :autofocus => true %></div> |
| 10 | 10 | |
| 11 | - <div><%= f.submit "Resend unlock instructions", class: 'btn btn-primary' %></div> | |
| 11 | + <div><%= f.submit t('.resend_unlock_instructions', :default => "Resend unlock instructions"), class: 'btn btn-primary' %></div> | |
| 12 | 12 | <% end %> |
| 13 | 13 | |
| 14 | 14 | <%= render "devise/shared/links" %> | ... | ... |
app/views/home/index.html.erb
| 1 | 1 | <div class="jumbotron"> |
| 2 | - <p><h1>Understanding Code Metrics</h1></p> | |
| 3 | - | |
| 4 | - <p>This is Mezuro! A <strong>free/libre</strong> web platform for <strong>collaborative</strong> source code <strong>evaluation</strong>.</p> | |
| 5 | - | |
| 6 | - <p>Here you can evaluate your source code with the most popular SCMs (like Git and SVN), just by providing its URL. For now, you can evaluate <strong>C</strong>, <strong>C++</strong> and <strong>Java</strong> source codes, but we are looking forward to supporting more languages in the future.</p> | |
| 7 | - | |
| 8 | - <p> Mezuro is continuously under development. Try it and give us your <%= link_to 'feedback', 'https://github.com/mezuro/mezuro/issues', target: '_blank' %>.</p> | |
| 2 | + <p><h1><%= t('title_home_index') %></h1></p> | |
| 3 | + <p> | |
| 4 | + <%= t('body_home_index_html') %> | |
| 5 | + </p> | |
| 6 | + <p> | |
| 7 | + <%= t('body_feedback_home_index_html', href: link_to('feedback', 'https://github.com/mezuro/mezuro/issues', target: '_blank')) %> | |
| 8 | + </p> | |
| 9 | 9 | </div> |
| 10 | 10 | |
| 11 | -<h2>Latest projects</h2> | |
| 11 | +<h2><%= t('latest_projects') %></h2> | |
| 12 | 12 | |
| 13 | 13 | <ul> |
| 14 | 14 | <% cache do %> | ... | ... |
app/views/kalibro_configurations/_form.html.erb
| ... | ... | @@ -22,8 +22,8 @@ |
| 22 | 22 | </div> |
| 23 | 23 | |
| 24 | 24 | <div class="row margin-left-none" style="margin-top: 20px"> |
| 25 | - <%= f.submit 'Save', class: 'btn btn-primary' %> | |
| 26 | - <%= link_to 'Back', kalibro_configurations_path, class: 'btn btn-default' %> | |
| 25 | + <%= f.submit t('save'), class: 'btn btn-primary' %> | |
| 26 | + <%= link_to t('back'), kalibro_configurations_path, class: 'btn btn-default' %> | |
| 27 | 27 | </div> |
| 28 | 28 | |
| 29 | 29 | <% end %> | ... | ... |
app/views/kalibro_configurations/_kalibro_configuration.html.erb
| 1 | 1 | <tr> |
| 2 | 2 | <td><%= kalibro_configuration.name %></td> |
| 3 | 3 | <td><%= kalibro_configuration.description %></td> |
| 4 | - <td><%= link_to 'Show', kalibro_configuration_path(kalibro_configuration.id), class: 'btn btn-info' %></td> | |
| 4 | + <td><%= link_to t('show'), kalibro_configuration_path(kalibro_configuration.id), class: 'btn btn-info' %></td> | |
| 5 | 5 | <td> |
| 6 | 6 | <% if kalibro_configuration_owner?(kalibro_configuration.id) %> |
| 7 | - <%= link_to 'Edit', edit_kalibro_configuration_path(kalibro_configuration.id), class: 'btn btn-info' %> | |
| 7 | + <%= link_to t('edit', model: ''), edit_kalibro_configuration_path(kalibro_configuration.id), class: 'btn btn-info' %> | |
| 8 | 8 | <% end %> |
| 9 | 9 | </td> |
| 10 | 10 | </tr> |
| 11 | 11 | \ No newline at end of file | ... | ... |
app/views/kalibro_configurations/_list.html.erb
app/views/kalibro_configurations/_metric_configurations.html.erb
| ... | ... | @@ -10,10 +10,9 @@ |
| 10 | 10 | <%= link_to_edit_form(metric_configuration, @kalibro_configuration.id) %> |
| 11 | 11 | </td> |
| 12 | 12 | <td> |
| 13 | - <%= link_to 'Destroy', kalibro_configuration_metric_configuration_path(@kalibro_configuration.id, metric_configuration.id), | |
| 14 | - method: :delete, data: { confirm: 'Are you sure that you want to destroy this Metric Configuration?' }, | |
| 13 | + <%= link_to t('destroy_metric_configuration'), kalibro_configuration_metric_configuration_path(@kalibro_configuration.id, metric_configuration.id), | |
| 14 | + method: :delete, data: { confirm: t('want_destroy_metric_configuration') }, | |
| 15 | 15 | class: 'btn btn-danger' %> |
| 16 | 16 | </td> |
| 17 | - </td> | |
| 18 | - <% end %> | |
| 17 | + <% end %> | |
| 19 | 18 | </tr> | ... | ... |
app/views/kalibro_configurations/_no_metric_configurations.html.erb
| 1 | 1 | <tr> |
| 2 | 2 | <% col_number = kalibro_configuration_owner?(@kalibro_configuration.id) ? 5 : 3 %> |
| 3 | - <td colspan="<%= col_number %>">There are no Metric Configurations yet!</td> | |
| 3 | + <td colspan="<%= col_number %>"><%= t('no_metric_configurations') %></td> | |
| 4 | 4 | </tr> |
| 5 | 5 | \ No newline at end of file | ... | ... |
app/views/kalibro_configurations/edit.html.erb
app/views/kalibro_configurations/index.html.erb
| 1 | 1 | <div class="page-header"> |
| 2 | - <h1>Configurations</h1> | |
| 2 | + <h1><%= KalibroConfiguration.model_name.human(count: 2) %></h1> | |
| 3 | 3 | </div> |
| 4 | 4 | |
| 5 | 5 | <% if user_signed_in? %> |
| 6 | 6 | <p> |
| 7 | - <%= link_to 'New Configuration', new_kalibro_configuration_path, class: 'btn btn-primary' %> | |
| 7 | + <%= link_to "#{t('new.female')} #{KalibroConfiguration.model_name.human}", new_kalibro_configuration_path, class: 'btn btn-primary' %> | |
| 8 | 8 | </p> |
| 9 | 9 | <%else%> |
| 10 | 10 | <p class="alert alert-warning alert-dismissable"> |
| 11 | 11 | <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> |
| 12 | - You must be logged in to create new Configurations. | |
| 12 | + <%= t('unauthenticated', action: "#{t('create', model: KalibroConfiguration.model_name.human(count: 2)).downcase}") %>. | |
| 13 | 13 | </p> |
| 14 | 14 | <% end %> |
| 15 | 15 | |
| 16 | -<%= render partial: 'list', locals: {configurations: @configurations} %> | |
| 17 | 16 | \ No newline at end of file |
| 17 | +<%= render partial: 'list', locals: {configurations: @configurations} %> | ... | ... |
app/views/kalibro_configurations/new.html.erb
app/views/kalibro_configurations/show.html.erb
| ... | ... | @@ -3,23 +3,23 @@ |
| 3 | 3 | </div> |
| 4 | 4 | |
| 5 | 5 | <p> |
| 6 | - <strong>Description:</strong> | |
| 6 | + <strong><%= t('description') %>:</strong> | |
| 7 | 7 | <%= @kalibro_configuration.description %> |
| 8 | 8 | </p> |
| 9 | 9 | |
| 10 | 10 | <hr> |
| 11 | - | |
| 12 | -<h2> Metrics </h2> | |
| 11 | +<div id="metrics"> | |
| 12 | +<h2><%= t('metric').pluralize %></h2> | |
| 13 | 13 | <% if kalibro_configuration_owner? @kalibro_configuration.id %> |
| 14 | - <%= link_to 'Add Metric', kalibro_configuration_choose_metric_path(@kalibro_configuration.id), class: 'btn btn-info' %> | |
| 14 | + <%= link_to "#{t('add')} #{t('metric')}", kalibro_configuration_choose_metric_path(@kalibro_configuration.id), class: 'btn btn-info' %> | |
| 15 | 15 | <% end %> |
| 16 | 16 | |
| 17 | 17 | <table class="table table-hover"> |
| 18 | 18 | <thead> |
| 19 | 19 | <tr> |
| 20 | - <th>Metric Name</th> | |
| 21 | - <th>Code</th> | |
| 22 | - <th>Weight</th> | |
| 20 | + <th><%= t('metric') %></th> | |
| 21 | + <th><%= t('code') %></th> | |
| 22 | + <th><%= t('weight') %></th> | |
| 23 | 23 | <th colspan="3"></th> |
| 24 | 24 | </tr> |
| 25 | 25 | </thead> |
| ... | ... | @@ -31,12 +31,13 @@ |
| 31 | 31 | <% end %> |
| 32 | 32 | </tbody> |
| 33 | 33 | </table> |
| 34 | +</div> | |
| 34 | 35 | |
| 35 | 36 | <hr> |
| 36 | 37 | |
| 37 | 38 | <p> |
| 38 | - <%= link_to 'Back', kalibro_configurations_path, class: 'btn btn-default' %> | |
| 39 | + <%= link_to t('back'), kalibro_configurations_path, class: 'btn btn-default' %> | |
| 39 | 40 | <% if kalibro_configuration_owner? @kalibro_configuration.id %> |
| 40 | - <%= link_to 'Destroy Configuration', kalibro_configuration_path(@kalibro_configuration.id), method: :delete, data: { confirm: 'Are you sure that you want to destroy this Configuration?' }, class: 'btn btn-danger' %> | |
| 41 | + <%= link_to t('destroy_configuration'), kalibro_configuration_path(@kalibro_configuration.id), method: :delete, data: { confirm: 'Are you sure that you want to destroy this Configuration?' }, class: 'btn btn-danger' %> | |
| 41 | 42 | <% end %> |
| 42 | 43 | </p> | ... | ... |
app/views/kalibro_ranges/_form.html.erb
| ... | ... | @@ -8,12 +8,16 @@ |
| 8 | 8 | <%= render partial: 'no_readings' %> |
| 9 | 9 | <% else %> |
| 10 | 10 | <div class="field-container"> |
| 11 | - <%= f.label :reading_id, 'Reading', class: 'control-label' %> | |
| 11 | + <%= f.label :reading_id, t('reading'), class: 'control-label' %> | |
| 12 | 12 | <%= f.select( :reading_id, readings_options(@readings), {class: 'form-control'} ) %> |
| 13 | 13 | </div> |
| 14 | 14 | <div class="help-container"> |
| 15 | 15 | <p> |
| 16 | - The <%= link_to 'Reading', tutorials_path('keywords', anchor: 'reading')%> associated with this <%= link_to 'Range', tutorials_path('keywords', anchor: 'range')%>. | |
| 16 | + <%= t_hint('reading', 'kalibro_range', | |
| 17 | + reading_href: link_to(t('reading'), tutorials_path('keywords', anchor: 'reading')), | |
| 18 | + range_href: link_to(KalibroRange.model_name.human, tutorials_path('keywords', anchor: 'range')) | |
| 19 | + ).html_safe | |
| 20 | + %> | |
| 17 | 21 | </p> |
| 18 | 22 | </div> |
| 19 | 23 | <% end %> |
| ... | ... | @@ -32,7 +36,7 @@ |
| 32 | 36 | |
| 33 | 37 | <div class="help-container"> |
| 34 | 38 | <p> |
| 35 | - This Range's lower limit. | |
| 39 | + <%= t_hint('beginning', 'kalibro_range') %> | |
| 36 | 40 | </p> |
| 37 | 41 | </div> |
| 38 | 42 | </div> |
| ... | ... | @@ -49,7 +53,7 @@ |
| 49 | 53 | </div> |
| 50 | 54 | <div class="help-container"> |
| 51 | 55 | <p> |
| 52 | - This Range's upper limit. | |
| 56 | + <%= t_hint('end', 'kalibro_range') %> | |
| 53 | 57 | </p> |
| 54 | 58 | </div> |
| 55 | 59 | </div> |
| ... | ... | @@ -61,7 +65,7 @@ |
| 61 | 65 | </div> |
| 62 | 66 | <div class="help-container"> |
| 63 | 67 | <p> |
| 64 | - An explanation of why you chose this interval, with that reading for this <%= link_to 'Metric', tutorials_path('keywords', anchor: 'metric')%>. | |
| 68 | + <%= t_hint('comments', 'kalibro_range', metric_href: link_to(t('metric'), tutorials_path('keywords', anchor: 'metric'))).html_safe %> | |
| 65 | 69 | </p> |
| 66 | 70 | </div> |
| 67 | 71 | </div> |
| ... | ... | @@ -69,6 +73,6 @@ |
| 69 | 73 | </div> |
| 70 | 74 | |
| 71 | 75 | <div class="row margin-left-none" style="margin-top: 20px"> |
| 72 | - <%= f.submit 'Save', class: 'btn btn-primary' %> | |
| 73 | - <%= link_to 'Back', kalibro_configuration_metric_configuration_path(@kalibro_configuration_id, @metric_configuration_id), class: 'btn btn-default' %> | |
| 76 | + <%= f.submit t('save'), class: 'btn btn-primary' %> | |
| 77 | + <%= link_to t('back'), kalibro_configuration_metric_configuration_path(@kalibro_configuration_id, @metric_configuration_id), class: 'btn btn-default' %> | |
| 74 | 78 | </div> | ... | ... |
app/views/kalibro_ranges/_no_readings.html.erb
| 1 | 1 | <div class="alert alert-error alert-dismissable"> |
| 2 | - <h4 class="alert-heading">You must have Readings within your associated Reading Group to create a new Range.</h4> | |
| 3 | - <p> | |
| 4 | - <% if reading_groups_owner? @reading_group_id %> | |
| 5 | - <br /><%= link_to 'Create New Reading', new_reading_group_reading_path(@reading_group_id), class: 'btn btn-danger' %> | |
| 6 | - <% else %> | |
| 7 | - <p> The Reading Group of your Metric Configuration belongs to another user and you are not allowed to modify it.</p> | |
| 8 | - <% end %> | |
| 9 | - </p> | |
| 2 | + <h4 class="alert-heading"><%= t('activemodel.errors.kalibro_range.no_readings') %></h4> | |
| 3 | + <p> | |
| 4 | + <% if reading_groups_owner? @reading_group_id %> | |
| 5 | + <br /><%= link_to t('create', model: Reading.model_name.human), new_reading_group_reading_path(@reading_group_id), class: 'btn btn-danger' %> | |
| 6 | + <% else %> | |
| 7 | + <p><%= t('activemodel.errors.kalibro_range.reading_group_belongs_to_another') %></p> | |
| 8 | + <% end %> | |
| 9 | + </p> | |
| 10 | 10 | </div> | ... | ... |
app/views/kalibro_ranges/edit.html.erb
| 1 | -<h1>Edit Range</h1> | |
| 1 | +<h1><%= t('edit', model: KalibroRange.model_name.human) %></h1> | |
| 2 | 2 | |
| 3 | 3 | <%= form_for(@kalibro_range, :url => kalibro_configuration_metric_configuration_kalibro_range_update_url( |
| 4 | 4 | @kalibro_configuration_id, @metric_configuration_id, @kalibro_range.id), method: :put) do |f| %> | ... | ... |
app/views/kalibro_ranges/new.html.erb
app/views/layouts/application.html.erb
| ... | ... | @@ -58,19 +58,30 @@ |
| 58 | 58 | </div> |
| 59 | 59 | <div class="collapse navbar-collapse" id="nav-collapse"> |
| 60 | 60 | <ul class="nav navbar-nav"> |
| 61 | - <li><%= link_to 'Home', root_path %></li> | |
| 62 | - <li><%= link_to 'Project', projects_path %></li> | |
| 63 | - <li><%= link_to 'Configuration', kalibro_configurations_path %></li> | |
| 64 | - <li><%= link_to 'Reading Group', reading_groups_path %></li> | |
| 61 | + <li><%= link_to t('home'), root_path %></li> | |
| 62 | + <li><%= link_to Project.model_name.human, projects_path %></li> | |
| 63 | + <li><%= link_to KalibroConfiguration.model_name.human, kalibro_configurations_path %></li> | |
| 64 | + <li><%= link_to ReadingGroup.model_name.human, reading_groups_path %></li> | |
| 65 | 65 | </ul> |
| 66 | - <ul class="nav navbar-nav" style="float: right;"> | |
| 66 | + <ul class="nav navbar-nav navbar-right"> | |
| 67 | 67 | <% if user_signed_in? %> |
| 68 | - <li><%= link_to 'Edit Account', edit_user_registration_path %></li> | |
| 69 | - <li><%= link_to 'Sign Out', destroy_user_session_path, :method => :delete %></li> | |
| 68 | + <li><%= link_to t('edit_account'), edit_user_registration_path %></li> | |
| 69 | + <li><%= link_to t('sign_out'), destroy_user_session_path, :method => :delete %></li> | |
| 70 | 70 | <% else %> |
| 71 | - <li><%= link_to 'Sign In', new_user_session_path %></li> | |
| 72 | - <li><%= link_to 'Sign Up', new_user_registration_path %></li> | |
| 71 | + <li><%= link_to t('sign_in'), new_user_session_path %></li> | |
| 72 | + <li><%= link_to t('sign_up'), new_user_registration_path %></li> | |
| 73 | 73 | <% end %> |
| 74 | + <li class="dropdown"> | |
| 75 | + <a class="dropdown-toggle" aria-expanded="true" role="button" data-toggle="dropdown" href="#"> | |
| 76 | + <%= t('idiom') %> | |
| 77 | + <span class="caret"></span> | |
| 78 | + </a> | |
| 79 | + <ul class="dropdown-menu" role="menu"> | |
| 80 | + <% I18n.available_locales.each do |locale| %> | |
| 81 | + <li><%= link_to(locale.to_s, url_for(locale: locale), data: { no_turbolink: true }) %></li> | |
| 82 | + <% end %> | |
| 83 | + </ul> | |
| 84 | + </li> | |
| 74 | 85 | </ul> |
| 75 | 86 | </div><!--/.nav-collapse --> |
| 76 | 87 | </div> |
| ... | ... | @@ -83,13 +94,13 @@ |
| 83 | 94 | <div class="well sidebar-nav"> |
| 84 | 95 | <ul class="list-group"> |
| 85 | 96 | <% if user_signed_in? %> |
| 86 | - <li class="nav-header">Hello, <strong><%= current_user.name %></strong></li> | |
| 87 | - <li class="list-group-item"><%= link_to 'Your projects', user_projects_path(current_user.id) %></li> | |
| 97 | + <li class="nav-header"><%= t('hello_html', user: current_user.name) %></li> | |
| 98 | + <li class="list-group-item"><%= link_to t('your_projects'), user_projects_path(current_user.id) %></li> | |
| 88 | 99 | <% end %> |
| 89 | - <li class="nav-header">Tutorials</li> | |
| 90 | - <li class="list-group-item"><%= link_to 'Analysis', tutorials_path('analyzing') %></li> | |
| 91 | - <li class="list-group-item"><%= link_to 'Configuring', tutorials_path('configuring') %></li> | |
| 92 | - <li class="list-group-item" ><%= link_to 'Keywords', tutorials_path('keywords') %></li> | |
| 100 | + <li class="nav-header"><%= t('tutorials') %></li> | |
| 101 | + <li class="list-group-item"><%= link_to t('analysis'), tutorials_path('analyzing') %></li> | |
| 102 | + <li class="list-group-item"><%= link_to t('configuring'), tutorials_path('configuring') %></li> | |
| 103 | + <li class="list-group-item" ><%= link_to t('keywords'), tutorials_path('keywords') %></li> | |
| 93 | 104 | <% if content_for?(:sidebar) %> |
| 94 | 105 | <%= yield :sidebar %> |
| 95 | 106 | <% else %> |
| ... | ... | @@ -99,7 +110,7 @@ |
| 99 | 110 | </div><!--/.well --> |
| 100 | 111 | </div><!--/col-sm-3 col-md-3--> |
| 101 | 112 | <div class="col-sm-9 col-md-9"> |
| 102 | - <div class="alert alert-info" id="loader"><i class="fa fa-spinner fa-spin fa-lg"></i>   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> <%= t('instant_loading_page') %></div> | |
| 103 | 114 | |
| 104 | 115 | <%= bootstrap_flash %> |
| 105 | 116 | <%= yield %> |
| ... | ... | @@ -107,10 +118,20 @@ |
| 107 | 118 | </div><!--/row--> |
| 108 | 119 | |
| 109 | 120 | <footer> |
| 110 | - <div class="footer-left">© <%= link_to 'The Mezuro Team', '/humans.txt' %> 2013-2015</div> | |
| 121 | + <div class="footer-left">© <%= link_to(t('mezuro_team'), '/humans.txt') %> 2013-2015</div> | |
| 111 | 122 | <div class="footer-right"><%= link_to(image_tag('agplv3-88x31.png'), 'http://www.gnu.org/licenses/agpl-3.0-standalone.html') %> <%= link_to image_tag('fork-me.png'), 'https://github.com/mezuro/prezento' %> <%= image_tag 'usp-cloud-nuvem-logo.png' %> <%= link_to image_tag('banner-ccsl.png', height: '40', width: '190'), 'http://ccsl.ime.usp.br/' %></div> |
| 112 | 123 | </footer> |
| 113 | 124 | |
| 125 | + <script type="text/javascript"> | |
| 126 | + $(function() { | |
| 127 | + $( "#languages-accordion > div" ).accordion({ | |
| 128 | + heightStyle: "content", | |
| 129 | + collapsible: true, | |
| 130 | + active: false | |
| 131 | + }); | |
| 132 | + }); | |
| 133 | + </script> | |
| 134 | + | |
| 114 | 135 | </div> <!-- /container --> |
| 115 | 136 | |
| 116 | 137 | </body> | ... | ... |
app/views/metric_configurations/_form.html.erb
| ... | ... | @@ -10,19 +10,19 @@ |
| 10 | 10 | </div> |
| 11 | 11 | <div class="help-container"> |
| 12 | 12 | <p> |
| 13 | - It is used to calculate the weighted average of a <%= link_to 'module', tutorials_path("keywords", anchor: "module")%>'s grade. | |
| 13 | + <%= t('calculate_weighted_average_html', href: link_to(KalibroModule.model_name.human, tutorials_path("keywords", anchor: "module"))) %> | |
| 14 | 14 | </p> |
| 15 | 15 | </div> |
| 16 | 16 | </div> |
| 17 | 17 | |
| 18 | 18 | <div class="form-row"> |
| 19 | 19 | <div class="field-container"> |
| 20 | - <%= f.label :aggregation_form, 'Aggregation Form', class: 'control-label' %> | |
| 20 | + <%= f.label :aggregation_form, class: 'control-label' %> | |
| 21 | 21 | <%= f.select( :aggregation_form, aggregation_options, {class: 'form-control'} ) %> |
| 22 | 22 | </div> |
| 23 | 23 | <div class="help-container"> |
| 24 | 24 | <p> |
| 25 | - It is the calculation of statistical results for higher <%= link_to 'granularity', tutorials_path('keywords', anchor: 'granularity') %> modules (e.g., average lines of code of the classes inside a package). | |
| 25 | + <%= t('aggregation_form_helper_html', href: link_to(t('granularity'), tutorials_path('keywords', anchor: 'granularity'))) %> | |
| 26 | 26 | </p> |
| 27 | 27 | </div> |
| 28 | 28 | </div> |
| ... | ... | @@ -33,12 +33,12 @@ |
| 33 | 33 | <% else %> |
| 34 | 34 | <div class="form-row"> |
| 35 | 35 | <div class="field-container"> |
| 36 | - <%= f.label :reading_group_id, 'Reading Group', class: 'control-label' %> | |
| 36 | + <%= f.label :reading_group_id, class: 'control-label' %> | |
| 37 | 37 | <%= f.select( :reading_group_id, reading_group_options, {class: 'form-control'} ) %> |
| 38 | 38 | </div> |
| 39 | 39 | <div class="help-container"> |
| 40 | 40 | <p> |
| 41 | - The <%= link_to 'Reading Group', tutorials_path('keywords', anchor: 'reading-group') %> associated with this metric. | |
| 41 | + <%= t('reading_group_helper_html', href: link_to(ReadingGroup.model_name.human, tutorials_path('keywords', anchor: 'reading-group'))) %> | |
| 42 | 42 | </p> |
| 43 | 43 | </div> |
| 44 | 44 | </div> | ... | ... |
app/views/metric_configurations/_no_ranges.html.erb
| 1 | 1 | <tr> |
| 2 | 2 | <!-- TODO: expand this columns when the user owns the metric configurations and can edit or delete this range --> |
| 3 | - <td colspan="3">There are no Ranges yet!</td> | |
| 4 | -</tr> | |
| 5 | 3 | \ No newline at end of file |
| 4 | +<td colspan="3"><%= t('no_models', model: KalibroRange.model_name.human(count: 2)) %></td> | |
| 5 | +</tr> | ... | ... |
app/views/metric_configurations/_ranges.html.erb
| ... | ... | @@ -9,10 +9,10 @@ |
| 9 | 9 | <td><%= kalibro_range.end %></td> |
| 10 | 10 | <td> |
| 11 | 11 | <% if kalibro_configuration_owner? @metric_configuration.kalibro_configuration_id %> |
| 12 | - <%= link_to 'Edit', edit_kalibro_configuration_metric_configuration_kalibro_range_path( | |
| 12 | + <%= link_to t('edit'), edit_kalibro_configuration_metric_configuration_kalibro_range_path( | |
| 13 | 13 | @metric_configuration.kalibro_configuration_id, @metric_configuration.id, kalibro_range.id), class: 'btn btn-info' %> |
| 14 | - <%= link_to 'Destroy', kalibro_configuration_metric_configuration_kalibro_range_path(@metric_configuration.kalibro_configuration_id, | |
| 15 | - @metric_configuration.id, kalibro_range.id), method: :delete, data: { confirm: 'Are you sure that you want to destroy this Range?' }, | |
| 14 | + <%= link_to t('destroy'), kalibro_configuration_metric_configuration_kalibro_range_path(@metric_configuration.kalibro_configuration_id, | |
| 15 | + @metric_configuration.id, kalibro_range.id), method: :delete, data: { confirm: t('want_destroy_range') }, | |
| 16 | 16 | class: 'btn btn-danger' %> |
| 17 | 17 | <% end %> |
| 18 | 18 | </td> | ... | ... |
app/views/metric_configurations/choose_metric.html.erb
| 1 | 1 | <div class="page-header"> |
| 2 | - <h1>Choose a metric from a Base Tool:</h1> | |
| 2 | + <h1><%= t('choose_metric') %></h1> | |
| 3 | 3 | </div> |
| 4 | 4 | |
| 5 | 5 | <%= form_tag kalibro_configuration_new_metric_configuration_path(@kalibro_configuration.id) do %> |
| ... | ... | @@ -18,8 +18,8 @@ |
| 18 | 18 | <% end %> |
| 19 | 19 | </div><br /> |
| 20 | 20 | |
| 21 | -<%= link_to 'Back', kalibro_configuration_path(@kalibro_configuration.id), class: 'btn btn-default' %> | |
| 22 | -<%= link_to 'Compound Metric', new_kalibro_configuration_compound_metric_configuration_path(@kalibro_configuration.id), class: 'btn btn-info', id: "link_to_compound" %> | |
| 21 | +<%= link_to t('back'), kalibro_configuration_path(@kalibro_configuration.id), class: 'btn btn-default' %> | |
| 22 | +<%= link_to t('compound_metric'), new_kalibro_configuration_compound_metric_configuration_path(@kalibro_configuration.id), class: 'btn btn-info', id: "link_to_compound" %> | |
| 23 | 23 | |
| 24 | 24 | |
| 25 | 25 | <script type="text/javascript"> | ... | ... |
app/views/metric_configurations/edit.html.erb
| 1 | 1 | <div class="page-header"> |
| 2 | - <h1>Editing Metric Configuration</h1> | |
| 2 | + <h1><%= t('editing_metric_configuration') %></h1> | |
| 3 | 3 | </div> |
| 4 | 4 | |
| 5 | 5 | <%= form_for(@metric_configuration, :url => kalibro_configuration_metric_configuration_update_url(@kalibro_configuration_id, @metric_configuration.id), method: :put) do |f| %> |
| 6 | 6 | <%= render partial: 'form', locals: {f: f} %> |
| 7 | 7 | <div class="row margin-left-none" style="margin-top: 20px"> |
| 8 | - <%= f.submit 'Save', class: 'btn btn-primary' %> | |
| 9 | - <%= link_to 'Back', kalibro_configuration_path(@metric_configuration.kalibro_configuration_id), class: 'btn btn-default' %> | |
| 8 | + <%= f.submit t('save'), class: 'btn btn-primary' %> | |
| 9 | + <%= link_to t('back'), kalibro_configuration_path(@metric_configuration.kalibro_configuration_id), class: 'btn btn-default' %> | |
| 10 | 10 | </div> |
| 11 | 11 | <% end %> | ... | ... |
app/views/metric_configurations/new.html.erb
| 1 | 1 | <div class="page-header"> |
| 2 | - <h1>New Metric Configuration</h1> | |
| 2 | + <h1><%= t('new_metric_configurations') %></h1> | |
| 3 | 3 | </div> |
| 4 | 4 | |
| 5 | 5 | <p> |
| 6 | - <b>Base Tool:</b> <%= @metric_configuration.metric.metric_collector_name %> | |
| 6 | + <b><%= t('metric_base_tool_name') %>:</b> <%= @metric_configuration.metric.metric_collector_name %> | |
| 7 | 7 | </p> |
| 8 | 8 | |
| 9 | 9 | <p> |
| 10 | - <b>Metric Name:</b> <%= @metric_configuration.metric.name %> | |
| 10 | + <b><%= t('metric') %>:</b> <%= @metric_configuration.metric.name %> | |
| 11 | 11 | </p> |
| 12 | 12 | |
| 13 | 13 | <p> |
| 14 | - <b>Metric Description:</b> <%= @metric_configuration.metric.description.nil? ? "No description available." : @metric_configuration.metric.description %> | |
| 14 | + <b><%= t('description') %>:</b> <%= @metric_configuration.metric.description.nil? ? "No description available." : @metric_configuration.metric.description %> | |
| 15 | 15 | </p> |
| 16 | 16 | |
| 17 | 17 | <p> |
| 18 | - <b>Language:</b> <%= @metric_configuration.metric.languages.to_s %> | |
| 18 | + <b><%= t('language') %>:</b> <%= @metric_configuration.metric.languages.to_s %> | |
| 19 | 19 | </p> |
| 20 | 20 | |
| 21 | 21 | <p> |
| 22 | - <b>Scope:</b> <%= @metric_configuration.metric.scope %> | |
| 22 | + <b><%= t('metric_scope') %>:</b> <%= t(@metric_configuration.metric.scope.to_s, scope: 'scopes') %> | |
| 23 | 23 | </p> |
| 24 | 24 | |
| 25 | 25 | <br> |
| ... | ... | @@ -27,7 +27,7 @@ |
| 27 | 27 | <%= form_for(@metric_configuration, :url => kalibro_configuration_metric_configurations_path(@kalibro_configuration_id)) do |f| %> |
| 28 | 28 | <%= render partial: 'form', locals: {f: f} %> |
| 29 | 29 | <div class="row margin-left-none" style="margin-top: 20px"> |
| 30 | - <%= f.submit 'Save', class: 'btn btn-primary' %> | |
| 31 | - <%= link_to 'Back', kalibro_configuration_choose_metric_path(@kalibro_configuration_id), class: 'btn btn-default' %> | |
| 30 | + <%= f.submit t('save'), class: 'btn btn-primary' %> | |
| 31 | + <%= link_to t('back'), kalibro_configuration_choose_metric_path(@kalibro_configuration_id), class: 'btn btn-default' %> | |
| 32 | 32 | </div> |
| 33 | 33 | <% end %> | ... | ... |
app/views/metric_configurations/show.html.erb
| ... | ... | @@ -3,44 +3,47 @@ |
| 3 | 3 | </div> |
| 4 | 4 | |
| 5 | 5 | <p> |
| 6 | - <strong>Base Tool Name:</strong> | |
| 6 | + <strong><%= t('metric_base_tool_name') %>:</strong> | |
| 7 | 7 | <%= @metric_configuration.metric.metric_collector_name %> |
| 8 | 8 | </p> |
| 9 | 9 | |
| 10 | 10 | <p> |
| 11 | - <strong>Code:</strong> | |
| 11 | + <strong><%= t('code') %>:</strong> | |
| 12 | 12 | <%= @metric_configuration.metric.code %> |
| 13 | 13 | </p> |
| 14 | 14 | |
| 15 | 15 | <p> |
| 16 | - <strong>Weight:</strong> | |
| 16 | + <strong><%= t('weight') %>:</strong> | |
| 17 | 17 | <%= @metric_configuration.weight %> |
| 18 | 18 | </p> |
| 19 | 19 | |
| 20 | 20 | <p> |
| 21 | - <strong>Language:</strong> | |
| 21 | + <strong><%= t('language') %>:</strong> | |
| 22 | 22 | <%= @metric_configuration.metric.languages %> |
| 23 | 23 | </p> |
| 24 | 24 | |
| 25 | 25 | <p> |
| 26 | - <strong>Scope:</strong> | |
| 27 | - <%= @metric_configuration.metric.scope %> | |
| 26 | + <strong><%= t('metric_scope') %>:</strong> | |
| 27 | + <%= t(@metric_configuration.metric.scope.to_s, scope: 'scopes') %> | |
| 28 | 28 | </p> |
| 29 | 29 | |
| 30 | 30 | <p> |
| 31 | - <strong>Aggregation Form:</strong> | |
| 32 | - <%= @metric_configuration.aggregation_form %> | |
| 31 | + <strong><%= t('metric_aggregation_form') %>:</strong> | |
| 32 | + <%= | |
| 33 | + f = @metric_configuration.aggregation_form | |
| 34 | + t(f, scope: 'aggregation_forms', default: f) | |
| 35 | + %> | |
| 33 | 36 | </p> |
| 34 | 37 | |
| 35 | 38 | <p> |
| 36 | - <strong>Reading Group Name:</strong> | |
| 39 | + <strong><%= t('reading_group_name') %>:</strong> | |
| 37 | 40 | <%= @reading_group.name %> |
| 38 | 41 | </p> |
| 39 | 42 | |
| 40 | 43 | <p> |
| 41 | - <strong>Description:</strong> | |
| 42 | - <% if @metric_configuration.metric.description.nil? %> | |
| 43 | - <%= "There is no description available." %> | |
| 44 | + <strong><%= t('description') %>:</strong> | |
| 45 | + <% if @metric_configuration.metric.description.blank? %> | |
| 46 | + <%= t('no_description_available') %> | |
| 44 | 47 | <% else %> |
| 45 | 48 | <%= @metric_configuration.metric.description %> |
| 46 | 49 | <% end %> |
| ... | ... | @@ -48,18 +51,18 @@ |
| 48 | 51 | </p> |
| 49 | 52 | <hr> |
| 50 | 53 | |
| 51 | -<h2> Ranges </h2> | |
| 54 | +<h2><%= KalibroRange.model_name.human(count: 2) %></h2> | |
| 52 | 55 | <% if kalibro_configuration_owner? @metric_configuration.kalibro_configuration_id %> |
| 53 | - <%= link_to 'Add Range', kalibro_configuration_metric_configuration_new_kalibro_range_path(@metric_configuration.kalibro_configuration_id, | |
| 56 | + <%= link_to t('add_range'), kalibro_configuration_metric_configuration_new_kalibro_range_path(@metric_configuration.kalibro_configuration_id, | |
| 54 | 57 | @metric_configuration.id), class: 'btn btn-info' %> |
| 55 | 58 | <% end %> |
| 56 | 59 | |
| 57 | 60 | <table class="table table-hover"> |
| 58 | 61 | <thead> |
| 59 | 62 | <tr> |
| 60 | - <th>Label</th> | |
| 61 | - <th>Beginning</th> | |
| 62 | - <th>End</th> | |
| 63 | + <th><%= t('label') %></th> | |
| 64 | + <th><%= t('beginning') %></th> | |
| 65 | + <th><%= t('end') %></th> | |
| 63 | 66 | </tr> |
| 64 | 67 | </thead> |
| 65 | 68 | <tbody> |
| ... | ... | @@ -72,10 +75,10 @@ |
| 72 | 75 | </table> |
| 73 | 76 | |
| 74 | 77 | <p> |
| 75 | - <%= link_to 'Back', kalibro_configuration_path(@metric_configuration.kalibro_configuration_id), class: 'btn btn-default' %> | |
| 78 | + <%= link_to t('back'), kalibro_configuration_path(@metric_configuration.kalibro_configuration_id), class: 'btn btn-default' %> | |
| 76 | 79 | <% if kalibro_configuration_owner? @metric_configuration.kalibro_configuration_id %> |
| 77 | - <%= link_to 'Destroy Metric Configuration', kalibro_configuration_metric_configuration_path(@metric_configuration.kalibro_configuration_id, | |
| 78 | - @metric_configuration.id), method: :delete, data: { confirm: 'Are you sure that you want to destroy this Metric Configuration?' }, | |
| 80 | + <%= link_to t('destroy_metric_configuration'), kalibro_configuration_metric_configuration_path(@metric_configuration.kalibro_configuration_id, | |
| 81 | + @metric_configuration.id), method: :delete, data: { confirm: t('want_destroy_metric_configuration') }, | |
| 79 | 82 | class: 'btn btn-danger' %> |
| 80 | 83 | <% end %> |
| 81 | 84 | </p> | ... | ... |
app/views/modules/_metric_result.html.erb
| ... | ... | @@ -15,9 +15,9 @@ |
| 15 | 15 | </tr> |
| 16 | 16 | <tr id="container<%= metric_result.id %>" style="display: none"> |
| 17 | 17 | <td colspan="4"> |
| 18 | - <span id="loader_container<%= metric_result.id %>"><%= image_tag 'loader.gif' %> Loading data. Please, wait.</span> | |
| 18 | + <span id="loader_container<%= metric_result.id %>"><%= image_tag 'loader.gif' %> <%= t('loading_data') %></span> | |
| 19 | 19 | <canvas id="container<%= metric_result.id %>" class="graphic_container" style="display: none"></canvas> |
| 20 | - <span id="container<%= metric_result.id %>" style="display: none">There is only one point and it will not be printed into a chart.</span> | |
| 20 | + <span id="container<%= metric_result.id %>" style="display: none"><%= t('only_point_printed_chart') %></span> | |
| 21 | 21 | </td> |
| 22 | 22 | </tr> |
| 23 | 23 | <% end %> | ... | ... |
app/views/modules/_metric_results.html.erb
| 1 | 1 | <table class="table table-hover"> |
| 2 | 2 | <thead> |
| 3 | - <th>Metric</th> | |
| 4 | - <th>Value</th> | |
| 5 | - <th>Weight</th> | |
| 6 | - <th>Threshold</th> | |
| 3 | + <th><%= t('activemodel.attributes.metric_result.metric') %></th> | |
| 4 | + <th><%= t('activemodel.attributes.metric_result.value') %></th> | |
| 5 | + <th><%= t('activemodel.attributes.metric_result.weight') %></th> | |
| 6 | + <th><%= t('activemodel.attributes.metric_result.threshold') %></th> | |
| 7 | 7 | </thead> |
| 8 | 8 | |
| 9 | 9 | <tbody> |
| ... | ... | @@ -11,4 +11,4 @@ |
| 11 | 11 | <%= render partial: 'metric_result', collection: @root_module_result.metric_results, locals: {module_result: @root_module_result} %> |
| 12 | 12 | <% end %> |
| 13 | 13 | </tbody> |
| 14 | -</table> | |
| 15 | 14 | \ No newline at end of file |
| 15 | +</table> | ... | ... |
app/views/modules/_module_result.html.erb
| ... | ... | @@ -5,7 +5,7 @@ |
| 5 | 5 | <% else %> |
| 6 | 6 | <i class="icon-file"></i> |
| 7 | 7 | <% end %> |
| 8 | - <%= link_to format_module_name(module_result.kalibro_module.name), "#module_#{module_result.id}", onClick: "Module.Tree.load('#{escape_javascript(image_tag 'loader.gif')} Loading data. Please, wait.', #{module_result.id});" %> | |
| 8 | + <%= link_to format_module_name(module_result.kalibro_module.name), "#module_#{module_result.id}", onClick: "Module.Tree.load('#{escape_javascript(image_tag 'loader.gif')} #{escape_javascript(t('loading_data'))}', #{module_result.id});" %> | |
| 9 | 9 | </td> |
| 10 | 10 | <td><%= module_result.kalibro_module.granularity %></td> |
| 11 | 11 | <td><%= format_grade(module_result.grade) %></td> | ... | ... |
app/views/modules/_module_tree.html.erb
| 1 | 1 | <p> |
| 2 | - <strong>Name:</strong> | |
| 2 | + <strong><%= KalibroModule.human_attribute_name('name') %>:</strong> | |
| 3 | 3 | <%= format_module_name(@root_module_result.kalibro_module.name) %> |
| 4 | 4 | </p> |
| 5 | 5 | <p> |
| 6 | - <strong>Granularity:</strong> | |
| 6 | + <strong><%= KalibroModule.human_attribute_name('granularity') %>:</strong> | |
| 7 | 7 | <%= @root_module_result.kalibro_module.granularity %> |
| 8 | 8 | </p> |
| 9 | 9 | <p> |
| 10 | - <strong>Grade:</strong> | |
| 10 | + <strong><%= KalibroModule.human_attribute_name('grade') %>:</strong> | |
| 11 | 11 | <%= format_grade(@root_module_result.grade) %> |
| 12 | 12 | </p> |
| 13 | 13 | <% unless @root_module_result.parent_id.nil? %> |
| 14 | - <p id="parent"><i class="icon-arrow-up"></i><%= link_to '../', '#parent', onClick: "Module.Tree.load('#{escape_javascript(image_tag 'loader.gif')} Loading data. Please, wait.', #{@root_module_result.parent_id});" %></p> | |
| 14 | + <p id="parent"><i class="icon-arrow-up"></i><%= link_to '../', '#parent', onClick: "Module.Tree.load('#{escape_javascript(image_tag 'loader.gif')} #{escape_javascript(t('loading_data'))}', #{@root_module_result.parent_id});" %></p> | |
| 15 | 15 | <% end %> |
| 16 | 16 | |
| 17 | 17 | <% cache("#{@root_module_result.id}_tree") do %> |
| ... | ... | @@ -19,9 +19,9 @@ |
| 19 | 19 | <% unless children.empty? %> |
| 20 | 20 | <table class="table table-hover"> |
| 21 | 21 | <thead> |
| 22 | - <th>Name</th> | |
| 23 | - <th>Granularity</th> | |
| 24 | - <th>Grade</th> | |
| 22 | + <th><%= KalibroModule.human_attribute_name('name') %></th> | |
| 23 | + <th><%= KalibroModule.human_attribute_name('granularity') %></th> | |
| 24 | + <th><%= KalibroModule.human_attribute_name('grade') %></th> | |
| 25 | 25 | </thead> |
| 26 | 26 | <tbody> |
| 27 | 27 | <%= render partial: 'module_result', collection: children %> | ... | ... |
app/views/projects/_form.html.erb
| ... | ... | @@ -16,14 +16,14 @@ |
| 16 | 16 | </div> |
| 17 | 17 | <div class="form-row"> |
| 18 | 18 | <div class="field-container"> |
| 19 | - <%= f.label "Image url", class: 'control-label' %><br> | |
| 19 | + <%= f.label t("image_url"), class: 'control-label' %><br> | |
| 20 | 20 | <%= f.text_field :image_url, class: 'text-area', value: @project.attributes.nil? || @project.attributes.image_url.nil? ? '#' : @project.attributes.image_url %> |
| 21 | 21 | </div> |
| 22 | 22 | </div> |
| 23 | 23 | </div> |
| 24 | 24 | </div> |
| 25 | 25 | <div class="row margin-left-none" style="margin-top: 20px"> |
| 26 | - <%= f.submit 'Save', class: 'btn btn-primary' %> | |
| 27 | - <%= link_to 'All Projects', projects_path, class: 'btn btn-default'%> | |
| 26 | + <%= f.submit t('save'), class: 'btn btn-primary' %> | |
| 27 | + <%= link_to t('all_projects'), projects_path, class: 'btn btn-default'%> | |
| 28 | 28 | </div> |
| 29 | 29 | <% end %> | ... | ... |
app/views/projects/edit.html.erb
app/views/projects/index.html.erb
| 1 | 1 | <div class="page-header"> |
| 2 | - <h1>Projects</h1> | |
| 2 | + <h1><%= "#{Project.model_name.human(count: 2)}" %></h1> | |
| 3 | 3 | </div> |
| 4 | 4 | |
| 5 | 5 | <% if user_signed_in? %> |
| 6 | 6 | <p> |
| 7 | - <%= link_to 'New Project', new_project_path, class: 'btn btn-primary' %> | |
| 7 | + <%= link_to t('create', model: Project.model_name.human), new_project_path, class: 'btn btn-primary' %> | |
| 8 | 8 | </p> |
| 9 | 9 | <%else%> |
| 10 | 10 | <p class="alert alert-warning alert-dismissable"> |
| 11 | 11 | <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> |
| 12 | - You must be logged in to create new Projects. | |
| 12 | + <%= "#{t('unauthenticated', action: t("create", model: Project.model_name.human(count: 2)).downcase)}" %> | |
| 13 | 13 | </p> |
| 14 | 14 | <% end %> |
| 15 | 15 | |
| 16 | -<%= render partial: 'shared/project_list', locals: {projects: @projects} %> | |
| 17 | 16 | \ No newline at end of file |
| 17 | +<%= render partial: 'shared/project_list', locals: {projects: @projects} %> | ... | ... |
app/views/projects/new.html.erb
app/views/projects/show.html.erb
| 1 | - | |
| 2 | 1 | <div class="page-header"> |
| 3 | 2 | <div class="row"> |
| 4 | 3 | <div class="col-md-2"> |
| ... | ... | @@ -6,7 +5,7 @@ |
| 6 | 5 | <%= image_tag "#{@project_image.url}", size:"128x128" %> |
| 7 | 6 | <% else %> |
| 8 | 7 | <center><i class="fa fa-file-image-o fa-5x"></i></center><br /> |
| 9 | - No image available | |
| 8 | + <%= t("no_image_available") %> | |
| 10 | 9 | <% end %> |
| 11 | 10 | </div> |
| 12 | 11 | <div class="col-md-10"> |
| ... | ... | @@ -16,22 +15,22 @@ |
| 16 | 15 | </div> |
| 17 | 16 | |
| 18 | 17 | <p> |
| 19 | - <strong>Description:</strong> | |
| 18 | + <strong> <%= t("description") %>:</strong> | |
| 20 | 19 | <%= @project.description %> |
| 21 | 20 | </p> |
| 22 | 21 | |
| 23 | 22 | <hr /> |
| 24 | 23 | |
| 25 | -<h2>Repositories</h2> | |
| 24 | +<h2><%= Repository.model_name.human(count: 2) %></h2> | |
| 26 | 25 | |
| 27 | -<% if project_owner? @project.id %><%= link_to 'New Repository', new_project_repository_path(@project,), class: 'btn btn-primary' %><% end %> | |
| 26 | +<% if project_owner? @project.id %><%= link_to t('new_repository'), new_project_repository_path(@project,), class: 'btn btn-primary' %><% end %> | |
| 28 | 27 | |
| 29 | 28 | <table class="table table-hover"> |
| 30 | 29 | <thead> |
| 31 | 30 | <tr> |
| 32 | - <th>Name</th> | |
| 33 | - <th>Type</th> | |
| 34 | - <th>Address</th> | |
| 31 | + <th><%= t("Name") %></th> | |
| 32 | + <th><%= t("Type") %></th> | |
| 33 | + <th><%= t("Address") %></th> | |
| 35 | 34 | <th colspan="2"></th> |
| 36 | 35 | </tr> |
| 37 | 36 | </thead> |
| ... | ... | @@ -40,7 +39,7 @@ |
| 40 | 39 | <% if @project_repositories.size == 0 %> |
| 41 | 40 | <tr> |
| 42 | 41 | <% col_number = project_owner?(@project.id) ? 4 : 3 %> |
| 43 | - <td colspan="<%= col_number %>">There are no Repositories yet!</td> | |
| 42 | + <td colspan="<%= col_number %>"> <%= t("no_repositories") %></td> | |
| 44 | 43 | </tr> |
| 45 | 44 | <% end %> |
| 46 | 45 | <% @project_repositories.each do |repository| %> |
| ... | ... | @@ -50,11 +49,11 @@ |
| 50 | 49 | <td><%= repository.address %></td> |
| 51 | 50 | <td> |
| 52 | 51 | <% if project_owner? @project.id %> |
| 53 | - <%= link_to 'Edit', edit_project_repository_path(@project, repository.id), class: 'btn btn-info' %> | |
| 52 | + <%= link_to t('edit'), edit_project_repository_path(@project, repository.id), class: 'btn btn-info' %> | |
| 54 | 53 | <% end %> |
| 55 | 54 | </td> |
| 56 | 55 | <td> |
| 57 | - <%= link_to 'Show', project_repository_path(@project, repository.id), class: 'btn btn-info' %></td> | |
| 56 | + <%= link_to t('show'), project_repository_path(@project, repository.id), class: 'btn btn-info' %></td> | |
| 58 | 57 | </td> |
| 59 | 58 | </tr> |
| 60 | 59 | <% end %> |
| ... | ... | @@ -65,6 +64,6 @@ |
| 65 | 64 | |
| 66 | 65 | <p> |
| 67 | 66 | <% if project_owner? @project.id %> |
| 68 | - <%= link_to 'Destroy Project', project_path(@project.id), method: :delete, data: { confirm: 'Are you sure that you want to destroy this Project?' }, class: 'btn btn-danger' %> | |
| 67 | + <%= link_to t('destroy_project'), project_path(@project.id), method: :delete, data: { confirm: t('want_destroy_project') }, class: 'btn btn-danger' %> | |
| 69 | 68 | <% end %> |
| 70 | 69 | </p> | ... | ... |
app/views/reading_groups/_form.html.erb
| ... | ... | @@ -21,7 +21,7 @@ |
| 21 | 21 | </div> |
| 22 | 22 | |
| 23 | 23 | <div class="row margin-left-none" style="margin-top: 20px"> |
| 24 | - <%= f.submit 'Save', class: 'btn btn-primary' %> | |
| 25 | - <%= link_to 'Back', reading_groups_path, class: 'btn btn-default' %> | |
| 24 | + <%= f.submit t('save'), class: 'btn btn-primary' %> | |
| 25 | + <%= link_to t('back'), reading_groups_path, class: 'btn btn-default' %> | |
| 26 | 26 | </div> |
| 27 | 27 | <% end %> | ... | ... |
app/views/reading_groups/_no_readings.html.erb
app/views/reading_groups/_reading.html.erb
| ... | ... | @@ -4,10 +4,10 @@ |
| 4 | 4 | <td style="background-color: #<%= reading.color %>; width: 20%;"> </td> |
| 5 | 5 | <% if reading_groups_owner? @reading_group.id %> |
| 6 | 6 | <td> |
| 7 | - <%= link_to 'Edit', edit_reading_group_reading_path(@reading_group.id, reading.id), class: 'btn btn-info' %> | |
| 7 | + <%= link_to t('edit', model: ''), edit_reading_group_reading_path(@reading_group.id, reading.id), class: 'btn btn-info' %> | |
| 8 | 8 | </td> |
| 9 | 9 | <td> |
| 10 | - <%= link_to 'Destroy', reading_group_reading_path(@reading_group.id, reading.id), method: :delete, data: { confirm: 'Are you sure that you want to destroy this Reading?' }, class: 'btn btn-danger' %> | |
| 10 | + <%= link_to t('destroy'), reading_group_reading_path(@reading_group.id, reading.id), method: :delete, data: { confirm: t('sure_destroy', model: Reading.model_name.human) }, class: 'btn btn-danger' %> | |
| 11 | 11 | </td> |
| 12 | 12 | </td> |
| 13 | 13 | <% end %> | ... | ... |
app/views/reading_groups/edit.html.erb
app/views/reading_groups/index.html.erb
| 1 | 1 | <div class="page-header"> |
| 2 | - <h1>Reading Groups</h1> | |
| 2 | + <h1><%= ReadingGroup.model_name.human(count: 2) %></h1> | |
| 3 | 3 | </div> |
| 4 | 4 | |
| 5 | 5 | <% if user_signed_in? %> |
| 6 | 6 | <p> |
| 7 | - <%= link_to 'New Reading Group', new_reading_group_path, class: 'btn btn-primary' %> | |
| 7 | + <%= link_to "#{t('new.male')} #{ReadingGroup.model_name.human}", new_reading_group_path, class: 'btn btn-primary' %> | |
| 8 | 8 | </p> |
| 9 | 9 | <%else%> |
| 10 | 10 | <p class="alert alert-warning alert-dismissable"> |
| 11 | 11 | <button type="button" class="close" data-dismiss="alert" aria-hidden="true">×</button> |
| 12 | - You must be logged in to create new Reading Groups. | |
| 12 | + <%= t('unauthenticated', action: t('create', model: ReadingGroup.model_name.human)) %> | |
| 13 | 13 | </p> |
| 14 | 14 | <% end %> |
| 15 | 15 | ... | ... |
app/views/reading_groups/new.html.erb
app/views/reading_groups/show.html.erb
| ... | ... | @@ -3,22 +3,22 @@ |
| 3 | 3 | </div> |
| 4 | 4 | |
| 5 | 5 | <p> |
| 6 | - <strong>Description:</strong> | |
| 6 | + <strong><%= ReadingGroup.human_attribute_name('description') %></strong> | |
| 7 | 7 | <%= @reading_group.description %> |
| 8 | 8 | </p> |
| 9 | 9 | |
| 10 | 10 | <hr /> |
| 11 | 11 | |
| 12 | -<h2>Readings</h2> | |
| 12 | +<h2><%= Reading.model_name.human(count: 2) %></h2> | |
| 13 | 13 | |
| 14 | -<% if reading_groups_owner? @reading_group.id %><%= link_to 'New Reading', new_reading_group_reading_path(@reading_group,), class: 'btn btn-primary' %><% end %> | |
| 14 | +<% if reading_groups_owner? @reading_group.id %><%= link_to "#{t('new.female')} #{Reading.model_name.human}", new_reading_group_reading_path(@reading_group,), class: 'btn btn-primary' %><% end %> | |
| 15 | 15 | |
| 16 | 16 | <table class="table table-hover"> |
| 17 | 17 | <thead> |
| 18 | 18 | <tr> |
| 19 | - <th>Label</th> | |
| 20 | - <th>Grade</th> | |
| 21 | - <th>Color</th> | |
| 19 | + <th><%= Reading.human_attribute_name('label') %></th> | |
| 20 | + <th><%= Reading.human_attribute_name('grade') %></th> | |
| 21 | + <th><%= Reading.human_attribute_name('color') %></th> | |
| 22 | 22 | </tr> |
| 23 | 23 | </thead> |
| 24 | 24 | |
| ... | ... | @@ -36,6 +36,6 @@ |
| 36 | 36 | |
| 37 | 37 | <p> |
| 38 | 38 | <% if reading_groups_owner? @reading_group.id %> |
| 39 | - <%= link_to 'Destroy Reading Group', reading_group_path(@reading_group.id), method: :delete, data: { confirm: 'Are you sure that you want to destroy this Reading Group?' }, class: 'btn btn-danger' %> | |
| 39 | + <%= link_to t('destroy'), reading_group_path(@reading_group.id), method: :delete, data: { confirm: t('sure_destroy', model: ReadingGroup.model_name.human) }, class: 'btn btn-danger' %> | |
| 40 | 40 | <% end %> |
| 41 | 41 | </p> | ... | ... |
app/views/readings/_form.html.erb
| ... | ... | @@ -10,10 +10,10 @@ |
| 10 | 10 | </div> |
| 11 | 11 | <div class="help-container"> |
| 12 | 12 | <p> |
| 13 | - It is a verbal concise form of highlighting the content of an interpretation. | |
| 13 | + <%= t('activemodel.hints.reading.label') %> | |
| 14 | 14 | </p> |
| 15 | 15 | <p> |
| 16 | - Example values: terrible, bad, regular, good, great etc. | |
| 16 | + <%= t('activemodel.hints.reading.label_example') %> | |
| 17 | 17 | </p> |
| 18 | 18 | </div> |
| 19 | 19 | </div> |
| ... | ... | @@ -30,10 +30,10 @@ |
| 30 | 30 | </div> |
| 31 | 31 | <div class="help-container"> |
| 32 | 32 | <p> |
| 33 | - It is a visual form of highlighting an interpretation. You can choose one by typing its hexadecimal value or by using the color picker. | |
| 33 | + <%= t('activemodel.hints.reading.color') %> | |
| 34 | 34 | </p> |
| 35 | 35 | <p> |
| 36 | - Example values: 000000, 00ff00 etc | |
| 36 | + <%= t('activemodel.hints.reading.color_example') %> | |
| 37 | 37 | </p> |
| 38 | 38 | </div> |
| 39 | 39 | </div> |
| ... | ... | @@ -45,7 +45,7 @@ |
| 45 | 45 | </div> |
| 46 | 46 | <div class="help-container"> |
| 47 | 47 | <p> |
| 48 | - A number to classify this reading. | |
| 48 | + <%= t('activemodel.hints.reading.grade') %> | |
| 49 | 49 | </p> |
| 50 | 50 | </div> |
| 51 | 51 | </div> |
| ... | ... | @@ -53,13 +53,13 @@ |
| 53 | 53 | </div> |
| 54 | 54 | |
| 55 | 55 | <div class="row margin-left-none" style="margin-top: 20px"> |
| 56 | - <%= f.submit 'Save', class: 'btn btn-primary' %> | |
| 56 | + <%= f.submit t('save'), class: 'btn btn-primary' %> | |
| 57 | 57 | <% if @reading.persisted? %> |
| 58 | 58 | <%= f.hidden_field(:reading_group_id, value: @reading.reading_group_id) %> |
| 59 | - <%= link_to 'Back', reading_group_path(@reading.reading_group_id), class: 'btn btn-default' %> | |
| 59 | + <%= link_to t('back'), reading_group_path(@reading.reading_group_id), class: 'btn btn-default' %> | |
| 60 | 60 | <% else %> |
| 61 | 61 | <%= f.hidden_field(:reading_group_id, value: @reading_group_id) %> |
| 62 | - <%= link_to 'Back', reading_group_path(@reading_group_id), class: 'btn btn-default' %> | |
| 62 | + <%= link_to t('back'), reading_group_path(@reading_group_id), class: 'btn btn-default' %> | |
| 63 | 63 | <% end %> |
| 64 | 64 | </div> |
| 65 | 65 | ... | ... |
app/views/readings/edit.html.erb
app/views/readings/new.html.erb
app/views/repositories/_form.html.erb
| ... | ... | @@ -11,7 +11,7 @@ |
| 11 | 11 | </div> |
| 12 | 12 | <div class="help-container"> |
| 13 | 13 | <p> |
| 14 | - The name of your Repository. | |
| 14 | + <%= t('activemodel.hints.repository.name') %> | |
| 15 | 15 | </p> |
| 16 | 16 | </div> |
| 17 | 17 | </div> |
| ... | ... | @@ -23,7 +23,7 @@ |
| 23 | 23 | </div> |
| 24 | 24 | <div class="help-container"> |
| 25 | 25 | <p> |
| 26 | - A short description of your Repository. | |
| 26 | + <%= t('activemodel.hints.repository.description') %> | |
| 27 | 27 | </p> |
| 28 | 28 | </div> |
| 29 | 29 | </div> |
| ... | ... | @@ -35,7 +35,7 @@ |
| 35 | 35 | </div> |
| 36 | 36 | <div class="help-container"> |
| 37 | 37 | <p> |
| 38 | - The source code's license. | |
| 38 | + <%= t('activemodel.hints.repository.license') %> | |
| 39 | 39 | </p> |
| 40 | 40 | </div> |
| 41 | 41 | </div> |
| ... | ... | @@ -47,7 +47,7 @@ |
| 47 | 47 | </div> |
| 48 | 48 | <div class="help-container"> |
| 49 | 49 | <p> |
| 50 | - The version control system the Repository uses. | |
| 50 | + <%= t('activemodel.hints.repository.scm_type') %> | |
| 51 | 51 | </p> |
| 52 | 52 | </div> |
| 53 | 53 | </div> |
| ... | ... | @@ -59,7 +59,7 @@ |
| 59 | 59 | </div> |
| 60 | 60 | <div class="help-container"> |
| 61 | 61 | <p> |
| 62 | - The URL where the Repository is located. | |
| 62 | + <%= t('activemodel.hints.repository.address') %> | |
| 63 | 63 | </p> |
| 64 | 64 | </div> |
| 65 | 65 | </div> |
| ... | ... | @@ -71,20 +71,20 @@ |
| 71 | 71 | </div> |
| 72 | 72 | <div class="help-container"> |
| 73 | 73 | <p> |
| 74 | - Select how often the Repository will be reprocessed. | |
| 74 | + <%= t('activemodel.hints.repository.period') %> | |
| 75 | 75 | </p> |
| 76 | 76 | </div> |
| 77 | 77 | </div> |
| 78 | 78 | |
| 79 | 79 | <div class="form-row"> |
| 80 | 80 | <div class="field-container"> |
| 81 | - <%= f.label :configuration, 'Configuration', class: 'control-label' %> | |
| 81 | + <%= f.label :kalibro_configuration_id, KalibroConfiguration.model_name.human, class: 'control-label' %> | |
| 82 | 82 | <% configuration_list = KalibroClient::Entities::Configurations::KalibroConfiguration.all.map { |conf| [conf.name, conf.id] } %> |
| 83 | 83 | <%= f.select( :kalibro_configuration_id, configuration_list, class: 'tooltip-control' ) %> |
| 84 | 84 | </div> |
| 85 | 85 | <div class="help-container"> |
| 86 | 86 | <p> |
| 87 | - A <%= link_to 'Configuration', tutorials_path('keywords', anchor: 'configuration') %> defines all the metrics to be calculated in the source code. Choose your weapon! | |
| 87 | + <%= t('activemodel.hints.repository.kalibro_configuration', configuration_href: link_to(KalibroConfiguration.model_name.human, tutorials_path('keywords', anchor: 'configuration'))).html_safe %> | |
| 88 | 88 | </p> |
| 89 | 89 | </div> |
| 90 | 90 | </div> | ... | ... |
app/views/repositories/_metric_results_error.html.erb
app/views/repositories/_module_tree_error.html.erb
app/views/repositories/_processing_information.html.erb
| 1 | 1 | <p> |
| 2 | - <strong>State:</strong> | |
| 2 | + <strong><%= t('activemodel.attributes.processing.state') %>:</strong> | |
| 3 | 3 | <%= @processing.state %> |
| 4 | 4 | </p> |
| 5 | 5 | |
| 6 | 6 | <p> |
| 7 | - <strong>Creation date:</strong> | |
| 7 | + <strong><%= t('activemodel.attributes.processing.creation_date') %>:</strong> | |
| 8 | 8 | <%= @processing.created_at.strftime("%Y/%m/%d at %Hh%M (%z)") %> |
| 9 | 9 | </p> |
| 10 | 10 | ... | ... |
app/views/repositories/_unstarted_processing.html.erb
| 1 | -<p>This Repository has no processings yet. Please, wait an instant as we start it.</p> | |
| 1 | +<p><%= t('activemodel.errors.repository.unstarted_processing') %></p> | |
| 2 | 2 | |
| 3 | -<div id="processing_information"><%= image_tag 'loader.gif' %> Loading data. Please, wait.</div> | |
| 4 | 3 | \ No newline at end of file |
| 4 | +<div id="processing_information"><%= image_tag 'loader.gif' %> <%= t('repository.show.loading') %></div> | |
| 5 | 5 | \ No newline at end of file | ... | ... |
app/views/repositories/edit.html.erb
app/views/repositories/new.html.erb
app/views/repositories/reload_processing.js.erb
| 1 | +current_path_splited = window.location.pathname.split("/"); | |
| 2 | +if(current_path_splited[1] != "projects"){ | |
| 3 | + current_path_splited.splice(1,1); // Removes the locale | |
| 4 | +} | |
| 5 | +current_path = current_path_splited.join("/"); | |
| 6 | + | |
| 1 | 7 | // This if prevents it from updating the repository's state after the user leaves its page |
| 2 | -if(document.URL == '<%= project_repository_url(@repository.project_id, @repository) %>'){ | |
| 8 | +if(current_path == '<%= project_repository_path(project_id: @repository.project_id, id: @repository, locale: nil) %>'){ | |
| 3 | 9 | $('div#processing_information').html('<%= escape_javascript(render partial: "processing_information") %>'); |
| 4 | 10 | repository = new Module.Repository(<%= @repository.project_id %>, <%= @repository.id %>) |
| 5 | 11 | repository.schedule_poll_state('<%= @processing.state %>') | ... | ... |
app/views/repositories/show.html.erb
| ... | ... | @@ -3,43 +3,46 @@ |
| 3 | 3 | </div> |
| 4 | 4 | |
| 5 | 5 | <p> |
| 6 | - <strong>Description:</strong> | |
| 6 | + <strong><%= Repository.human_attribute_name('description') %>:</strong> | |
| 7 | 7 | <%= @repository.description %> |
| 8 | 8 | </p> |
| 9 | 9 | |
| 10 | 10 | <p> |
| 11 | - <strong>License:</strong> | |
| 11 | + <strong><%= Repository.human_attribute_name('license') %>:</strong> | |
| 12 | 12 | <%= @repository.license %> |
| 13 | 13 | </p> |
| 14 | 14 | |
| 15 | 15 | <p> |
| 16 | - <strong>Type:</strong> | |
| 16 | + <strong><%= Repository.human_attribute_name('type') %>:</strong> | |
| 17 | 17 | <%= @repository.scm_type %> |
| 18 | 18 | </p> |
| 19 | 19 | |
| 20 | 20 | <p> |
| 21 | - <strong>Address:</strong> | |
| 21 | + <strong><%= Repository.human_attribute_name('address') %>:</strong> | |
| 22 | 22 | <%= @repository.address %> |
| 23 | 23 | </p> |
| 24 | 24 | |
| 25 | 25 | <p> |
| 26 | - <strong>Periodicity:</strong> | |
| 26 | + <strong><%= Repository.human_attribute_name('period') %>:</strong> | |
| 27 | 27 | <%= periodicity_option(@repository.period) %> |
| 28 | 28 | </p> |
| 29 | 29 | |
| 30 | 30 | <p> |
| 31 | - <strong>Configuration:</strong> | |
| 31 | + <strong><%= KalibroConfiguration.model_name.human %>:</strong> | |
| 32 | 32 | <%= @kalibro_configuration.name %> |
| 33 | 33 | </p> |
| 34 | 34 | |
| 35 | -<p><strong> Retrieve the closest processing information from: </strong></p> | |
| 35 | +<p><strong> <%= t('repository.show.date_processing') %>: </strong></p> | |
| 36 | 36 | |
| 37 | 37 | <%= form_tag(project_repository_state_with_date_path(@repository.project_id, @repository.id), method: "post", remote: true) do %> |
| 38 | 38 | <p> |
| 39 | - Day: <%= select_tag(:day, options_for_select(day_options), :style => "width:55px; margin-top:5px") %> | |
| 40 | - Month: <%= select_tag(:month, options_for_select(month_options), :style => "width:55px; margin-top:5px") %> | |
| 41 | - Year: <%= select_tag(:year, options_for_select(year_options), :style => "width:70px; margin-top:5px") %> | |
| 42 | - <%= submit_tag("Search", class: 'btn btn-info', style: 'margin-bottom:5px', onClick: "Module.Repository.set_loader('#{image_tag 'loader.gif'} Loading data. Please, wait.')") %> | |
| 39 | + <%= label_tag :day, t("day") %>: | |
| 40 | + <%= select_tag(:day, options_for_select(day_options), :style => "width:55px; margin-top:5px") %> | |
| 41 | + <%= label_tag :month, t("month") %>: | |
| 42 | + <%= select_tag(:month, options_for_select(month_options), :style => "width:55px; margin-top:5px") %> | |
| 43 | + <%= label_tag :year, t("year") %>: | |
| 44 | + <%= select_tag(:year, options_for_select(year_options), :style => "width:70px; margin-top:5px") %> | |
| 45 | + <%= submit_tag(t('search'), class: 'btn btn-info', style: 'margin-bottom:5px', onClick: "Module.Repository.set_loader('#{image_tag 'loader.gif'} Loading data. Please, wait.')") %> | |
| 43 | 46 | </p> |
| 44 | 47 | <% end %> |
| 45 | 48 | |
| ... | ... | @@ -47,18 +50,18 @@ |
| 47 | 50 | |
| 48 | 51 | <div id="repository-accordion"> |
| 49 | 52 | <div id="processing-accordion"> |
| 50 | - <h3 class="jquery-ui-accordion">Processing information</h3> | |
| 51 | - <div id="processing_information"><%= image_tag 'loader.gif' %> Loading data. Please, wait.</div> | |
| 53 | + <h3 class="jquery-ui-accordion"><%= t('repository.show.processing_information') %></h3> | |
| 54 | + <div id="processing_information"><%= image_tag 'loader.gif' %> <%= t('repository.show.loading') %></div> | |
| 52 | 55 | </div> |
| 53 | 56 | |
| 54 | 57 | <div id="module-accordion"> |
| 55 | - <h3 class="jquery-ui-accordion">Modules Tree</h3> | |
| 56 | - <div id="module_tree"><%= image_tag 'loader.gif' %> Loading data. Please, wait.</div> | |
| 58 | + <h3 class="jquery-ui-accordion"><%= t('repository.show.modules_tree') %></h3> | |
| 59 | + <div id="module_tree"><%= image_tag 'loader.gif' %> <%= t('repository.show.loading') %></div> | |
| 57 | 60 | </div> |
| 58 | 61 | |
| 59 | 62 | <div id="metric-accordion"> |
| 60 | - <h3 class="jquery-ui-accordion">Metric Results</h3> | |
| 61 | - <div id="metric_results"><%= image_tag 'loader.gif' %> Loading data. Please, wait.</div> | |
| 63 | + <h3 class="jquery-ui-accordion"><%= t('repository.show.metric_results') %></h3> | |
| 64 | + <div id="metric_results"><%= image_tag 'loader.gif' %> <%= t('repository.show.loading') %></div> | |
| 62 | 65 | </div> |
| 63 | 66 | </div> |
| 64 | 67 | <script type="text/javascript"> |
| ... | ... | @@ -79,8 +82,8 @@ |
| 79 | 82 | |
| 80 | 83 | <hr/> |
| 81 | 84 | |
| 82 | -<%= link_to 'Back', project_path(@repository.project_id), class: 'btn btn-default' %> | |
| 85 | +<%= link_to t('back'), project_path(@repository.project_id), class: 'btn btn-default' %> | |
| 83 | 86 | <% if project_owner? @repository.project_id %> |
| 84 | - <%= link_to 'Reprocess', project_repository_process_path(@repository.project_id, @repository.id), class: 'btn btn-info' %> | |
| 85 | - <%= link_to 'Destroy', project_repository_path(@repository.project_id, @repository.id), method: :delete, data: { confirm: 'Are you sure that you want to destroy this Repository?' }, class: 'btn btn-danger' %> | |
| 87 | + <%= link_to t('repository.show.reprocess'), project_repository_process_path(@repository.project_id, @repository.id), class: 'btn btn-info' %> | |
| 88 | + <%= link_to t('destroy'), project_repository_path(@repository.project_id, @repository.id), method: :delete, data: { confirm: t('sure_destroy', model: Repository.model_name.human) }, class: 'btn btn-danger' %> | |
| 86 | 89 | <% end %> | ... | ... |
app/views/shared/_reading_groups_list.erb
| 1 | 1 | <table class="table table-hover"> |
| 2 | 2 | <thead> |
| 3 | 3 | <tr> |
| 4 | - <th>Name</th> | |
| 5 | - <th>Description</th> | |
| 4 | + <th><%= ReadingGroup.human_attribute_name('name') %></th> | |
| 5 | + <th><%= ReadingGroup.human_attribute_name('description') %></th> | |
| 6 | 6 | <th colspan="2"></th> |
| 7 | 7 | </tr> |
| 8 | 8 | </thead> |
| ... | ... | @@ -12,10 +12,10 @@ |
| 12 | 12 | <tr> |
| 13 | 13 | <td><%= reading_group.name %></td> |
| 14 | 14 | <td><%= reading_group.description %></td> |
| 15 | - <td><%= link_to 'Show', reading_group_path(reading_group.id), class: 'btn btn-info' %></td> | |
| 15 | + <td><%= link_to t('show'), reading_group_path(reading_group.id), class: 'btn btn-info' %></td> | |
| 16 | 16 | <td> |
| 17 | 17 | <% if reading_groups_owner? reading_group.id %> |
| 18 | - <%= link_to 'Edit', edit_reading_group_path(reading_group.id), class: 'btn btn-info' %> | |
| 18 | + <%= link_to t('edit', model: ''), edit_reading_group_path(reading_group.id), class: 'btn btn-info' %> | |
| 19 | 19 | <% end %> |
| 20 | 20 | </td> |
| 21 | 21 | </tr> | ... | ... |
app/views/shared/_short_about.html.erb
| 1 | -<li class="nav-header">About Mezuro</li> | |
| 1 | +<li class="nav-header"><%= t('about_mezuro') %></li> | |
| 2 | 2 | <li class="list-group-item"> |
| 3 | - <small> The Mezuro project attempts to provide a platform to compare projects and metric techniques, teaching how to use metrics through configurations and code analysis, avoid technical debts and disseminate code metrics usage and understanding.<br></small> | |
| 4 | - <small>Here you can try the front-end, which we call Prezento. It interacts with the <%= link_to 'Kalibro Web Service', 'https://github.com/mezuro/kalibro', target: '_blank' %> and <%= link_to 'Kalibro Processor', 'https://github.com/mezuro/kalibro_processor', target: '_blank' %>. It is intended to be a service where you can evaluate your code quality and, if you want, define which set of metrics to use.</small> | |
| 3 | + <small> | |
| 4 | + <%= t('about_mezuro_body_html', href: link_to( 'Kalibro Web Service', 'https://github.com/mezuro/kalibro', target: '_blank'), href2: link_to('Kalibro Processor', 'https://github.com/mezuro/kalibro_processor', target: '_blank'))%> | |
| 5 | + </small> | |
| 5 | 6 | </li> | ... | ... |
| ... | ... | @@ -0,0 +1,90 @@ |
| 1 | +<h1>Tutorial</h1> | |
| 2 | +<h2>Analyzing a repository</h2> | |
| 3 | + | |
| 4 | +<hr /> | |
| 5 | + | |
| 6 | +<h3>Requisites</h3> | |
| 7 | + | |
| 8 | +In order to create a Project, you must: | |
| 9 | +<ul> | |
| 10 | + <li>Have <%= link_to(t('signed_up'), new_user_registration_path) %> to the platform</li> | |
| 11 | + <li>Be <%= link_to(t('signed_in'), new_user_session_path) %></li> | |
| 12 | + <li>And have a repository URL which you wish to analyze</li> | |
| 13 | +</ul> | |
| 14 | + | |
| 15 | +<hr /> | |
| 16 | + | |
| 17 | +<h3>Steps</h3> | |
| 18 | + | |
| 19 | +<h4>Project creation</h4> | |
| 20 | + | |
| 21 | +<ol> | |
| 22 | + <li>Click on "Project" on the upper menu</li> | |
| 23 | + <li>Click on "New Project"</li> | |
| 24 | + <li>Fill in the form with a name that must be unique</li> | |
| 25 | + <li>Fill in the form with a description which is not required</li> | |
| 26 | + <li>Click on "Save" and you should be at the project page now, congratulations!</li> | |
| 27 | +</ol> | |
| 28 | + | |
| 29 | +<h4>Repository creation</h4> | |
| 30 | + | |
| 31 | +<ol> | |
| 32 | + <li>From the project page, click on "New Repository"</li> | |
| 33 | + <li>Fill in the form, making sure that: | |
| 34 | + <ul> | |
| 35 | + <li>"Name" must be unique</li> | |
| 36 | + <li>You should choose one of the Open Source licenses in the platform according to your code</li> | |
| 37 | + <li>The "Type" field stands for the Repository source code management tool (Git, for example)</li> | |
| 38 | + <li>Fill in the "Address" with the URL from which we can download your code</li> | |
| 39 | + <li>If you want to analyze your project periodically, set it (you can as well run it from the interface whenever you want)</li> | |
| 40 | + <li>Finally, the "Configuration" stands for the set of metrics and interpretation that we will use to analyze your project</li> | |
| 41 | + </ul> | |
| 42 | + </li> | |
| 43 | + <li>Click on "Save" and you should be at the repository page, waiting for the analysis</li> | |
| 44 | +</ol> | |
| 45 | + | |
| 46 | +<hr /> | |
| 47 | + | |
| 48 | +<h4>Repository page details</h4> | |
| 49 | + | |
| 50 | +The repository page is divided into four different sections: | |
| 51 | + | |
| 52 | +<h5><b>Details</b></h5> | |
| 53 | +<ul> | |
| 54 | + <li>Information that you provided during the creation steps</li> | |
| 55 | + <li>Select box so it is possible to visualize previous processings of your repository</li> | |
| 56 | +</ul> | |
| 57 | + | |
| 58 | +<h5><b>Processing information</b></h5> | |
| 59 | + | |
| 60 | +<ul> | |
| 61 | + <li>Information about the time it has taken to finish each step of the processing | |
| 62 | + <ul> | |
| 63 | + <li>PREPARING: the system is reserving a folder for your repository and retrieving the configuration</li> | |
| 64 | + <li>DOWNLOADING: retrieving the source code</li> | |
| 65 | + <li>COLLECTING: calculating the metrics for your repository</li> | |
| 66 | + <li>BUILDING: organizing the results into a source tree structure</li> | |
| 67 | + <li>AGGREGATING: calculating the aggregated value for parent modules in the source tree</li> | |
| 68 | + <li>CALCULATING: if the chosen configuration has compound metrics, they will be calculated</li> | |
| 69 | + <li>INTERPRETING: with all the necessary results, the system will interpret them using reading groups (labels and colors)</li> | |
| 70 | + </ul> | |
| 71 | + </li> | |
| 72 | +</ul> | |
| 73 | +<h5><b>Modules Tree</b></h5> | |
| 74 | +<ul> | |
| 75 | + <li>Source tree structure where you can navigate by clicking on the names | |
| 76 | + <li>Information about the granularity of the module | |
| 77 | + <ul> | |
| 78 | + <li>METHOD</li> | |
| 79 | + <li>CLASS</li> | |
| 80 | + <li>PACKAGE</li> | |
| 81 | + <li>SOFTWARE</li> | |
| 82 | + </ul> | |
| 83 | + <li>Grade of the given module according to the weights of the metrics on the configuration | |
| 84 | +</ul> | |
| 85 | + | |
| 86 | +<h5><b>Metric Results</b></h5> | |
| 87 | +<ul> | |
| 88 | + <li>Displays the individual results of each metric for the current module selected in the source tree</li> | |
| 89 | + <li>By clicking on the metric name, you will see a historic chart for that metric</li> | |
| 90 | +</ul> | ... | ... |
app/views/tutorials/analyzing.html.erb
| ... | ... | @@ -1,88 +0,0 @@ |
| 1 | -<h1>Tutorial</h1> | |
| 2 | -<h2>Analyzing a repository</h2> | |
| 3 | - | |
| 4 | -<hr /> | |
| 5 | - | |
| 6 | -<h3>Requisites</h3> | |
| 7 | - | |
| 8 | -In order to create a Project, you must: | |
| 9 | -<ul> | |
| 10 | - <li>Have <%= link_to("signed up", new_user_registration_path) %> to the platform</li> | |
| 11 | - <li>Be <%= link_to("signed in", new_user_session_path) %></li> | |
| 12 | - <li>And have a repository URL which you wish to analyze</li> | |
| 13 | -</ul> | |
| 14 | - | |
| 15 | -<hr /> | |
| 16 | - | |
| 17 | -<h3>Steps</h3> | |
| 18 | - | |
| 19 | -<ol> | |
| 20 | - <li>Project creation | |
| 21 | - <ol> | |
| 22 | - <li>Click on "Project" on the upper menu</li> | |
| 23 | - <li>Click on "New Project"</li> | |
| 24 | - <ol> | |
| 25 | - <li>Fill in the form with a name that must be unique</li> | |
| 26 | - <li>Fill in the form with a description which is not required</li> | |
| 27 | - <li>Click on "Save" and you should be at the project page now, congratulations!</li> | |
| 28 | - </ol> | |
| 29 | - </ol> | |
| 30 | - <li>Repository creation</li> | |
| 31 | - <ol> | |
| 32 | - <li>From the project page, click on "New Repository"</li> | |
| 33 | - <li>Fill in the form</li> | |
| 34 | - <ul> | |
| 35 | - <li>"Name" must be unique</li> | |
| 36 | - <li>You should choose one of the Open Source licenses in the platform according to your code</li> | |
| 37 | - <li>The "Type" field stands for the Repository source code management tool (Git, for example)</li> | |
| 38 | - <li>Fill in the "Address" with the URL from which we can download your code</li> | |
| 39 | - <li>If you want to analyze your project periodically, set it (you can as well run it from the interface whenever you want)</li> | |
| 40 | - <li>Finally, the "Configuration" stands for the set of metrics and interpretation that we will use to analyze your project</li> | |
| 41 | - <li>Click on "Save" and you should be at the repository page, waiting for the analysis</li> | |
| 42 | - </ul> | |
| 43 | - </ol> | |
| 44 | -</ol> | |
| 45 | - | |
| 46 | -<hr /> | |
| 47 | - | |
| 48 | -<h3>Repository page details</h3> | |
| 49 | - | |
| 50 | -The repository page is divided into four different sections: | |
| 51 | - | |
| 52 | -<ol> | |
| 53 | - <li><b>Details</b></li> | |
| 54 | - <ul> | |
| 55 | - <li>Information that you provided during the creation steps</li> | |
| 56 | - <li>Select box so it is possible to visualize previous processings of your repository</li> | |
| 57 | - </ul> | |
| 58 | - <li><b>Processing information</b></li> | |
| 59 | - <ul> | |
| 60 | - <li>Information about the time it has taken to finish each step of the processing</li> | |
| 61 | - <ol> | |
| 62 | - <li>PREPARING: the system is reserving a folder for your repository and retrieving the configuration</li> | |
| 63 | - <li>DOWNLOADING: retrieving the source code</li> | |
| 64 | - <li>COLLECTING: calculating the metrics for your repository</li> | |
| 65 | - <li>BUILDING: organizing the results into a source tree structure</li> | |
| 66 | - <li>AGGREGATING: calculating the aggregated value for parent modules in the source tree</li> | |
| 67 | - <li>CALCULATING: if the chosen configuration has compound metrics, they will be calculated</li> | |
| 68 | - <li>INTERPRETING: with all the necessary results, the system will interpret them using reading groups (labels and colors)</li> | |
| 69 | - </ol> | |
| 70 | - </ul> | |
| 71 | - <li><b>Modules Tree</b></li> | |
| 72 | - <ul> | |
| 73 | - <li>Source tree structure where you can navigate by clicking on the names | |
| 74 | - <li>Information about the granularity of the module | |
| 75 | - <ul> | |
| 76 | - <li>METHOD</li> | |
| 77 | - <li>CLASS</li> | |
| 78 | - <li>PACKAGE</li> | |
| 79 | - <li>SOFTWARE</li> | |
| 80 | - </ul> | |
| 81 | - <li>Grade of the given module according to the weights of the metrics on the configuration | |
| 82 | - </ul> | |
| 83 | - <li><b>Metric Results</b></li> | |
| 84 | - <ul> | |
| 85 | - <li>Displays the individual results of each metric for the current module selected in the source tree</li> | |
| 86 | - <li>By clicking on the metric name, you will see a historic chart for that metric</li> | |
| 87 | - </ul> | |
| 88 | -</ol> |
| ... | ... | @@ -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> | ... | ... |
| ... | ... | @@ -0,0 +1,90 @@ |
| 1 | +<h1>Tutorial</h1> | |
| 2 | +<h2>Setting a New Configuration</h2> | |
| 3 | + | |
| 4 | +<hr /> | |
| 5 | + | |
| 6 | +<h3>Requisites</h3> | |
| 7 | + | |
| 8 | +In order to create a Configuration, you must: | |
| 9 | +<ul> | |
| 10 | + <li>Have <%= link_to(t('signed_up'), new_user_registration_path) %> to the platform</li> | |
| 11 | + <li>Be <%= link_to(t('signed_in'), new_user_session_path) %></li> | |
| 12 | + <li>Have already created at least one Reading Group</li> | |
| 13 | +</ul> | |
| 14 | + | |
| 15 | +<hr /> | |
| 16 | + | |
| 17 | +<h3>Introduction</h3> | |
| 18 | + | |
| 19 | +To process a repository, Mezuro uses configurations which you specify on the <%= link_to(t('repository_creation'), tutorials_path('analyzing')) %>. | |
| 20 | + | |
| 21 | +<h4>Configuration components</h4> | |
| 22 | + | |
| 23 | +<p>Here you will be briefly introduced to all the components of a configuration and then guided through the steps to create one.</p> | |
| 24 | + | |
| 25 | +<dl> | |
| 26 | + <dt><b>Configuration</b></dt> | |
| 27 | + <dd>Just a high level container for the remaining components association</dd> | |
| 28 | + <dt><b>Metrics</b></dt> | |
| 29 | + <dd>Specification of which metric will be calculated during the processing and how to interpret its results | |
| 30 | + <ul> | |
| 31 | + <li>Weight: for each module it is given a grade which is a weighted average of all the metrics calculated for it. This field is the weight of the metric on the final grade</li> | |
| 32 | + <li>Aggregation Form: Not all the metrics can be calculated for every module. For this type of metric, we calculate the aggregation of the children values according to what this field specifies</li> | |
| 33 | + <li>Reading Group: specifies which set of interpretations (called readings) will be available for this metric</li> | |
| 34 | + </ul> | |
| 35 | + </dd> | |
| 36 | + <dt><b>Reading Group</b></dt> | |
| 37 | + <dd>Just a high level container for the readings (interpretations)</dd> | |
| 38 | + <dt><b>Reading</b></dt> | |
| 39 | + <dd>Interpretation for a given value providing label, grade (this is the grade used for the weighted average mentioned above) and color</dd> | |
| 40 | + <dt><b>Range</b></dt> | |
| 41 | + <dd>Associates numeric intervals to the readings of a given metric</dd> | |
| 42 | +</dl> | |
| 43 | + | |
| 44 | +<hr /> | |
| 45 | + | |
| 46 | +<h3>Steps</h3> | |
| 47 | + | |
| 48 | +<ol> | |
| 49 | + <li><b>Configuration creation</b> | |
| 50 | + <ol> | |
| 51 | + <li>Click on "Configuration" on the upper menu</li> | |
| 52 | + <li>Click on "New Configuration" | |
| 53 | + <ol> | |
| 54 | + <li>Fill in the form with a name that must be unique</li> | |
| 55 | + <li>Fill in the form with a description which is not required</li> | |
| 56 | + </ol> | |
| 57 | + </li> | |
| 58 | + <li>Click on "Save" and you should be at the configuration page now</li> | |
| 59 | + </ol> | |
| 60 | + </li> | |
| 61 | + <li><b>Metric addition</b> | |
| 62 | + <ol> | |
| 63 | + <li>From the configuration page</li> | |
| 64 | + <li>Click on "Add Metric"</li> | |
| 65 | + <li>Select one collector from the options, and click on the metric that you want to add | |
| 66 | + <ol> | |
| 67 | + <li>Fill in the form with a "Weight", used to calculate the final grade</li> | |
| 68 | + <li>Select the "Aggregation Form" that will be used for this metric</li> | |
| 69 | + <li>Select the "Reading Group" which will provide the interpretations for this metric</li> | |
| 70 | + </ol> | |
| 71 | + </li> | |
| 72 | + <li>Click on "Save" and you should be at the configuration page now with the new metric added</li> | |
| 73 | + </ol> | |
| 74 | + </li> | |
| 75 | + <li><b>Ranges creation</b> | |
| 76 | + <ol> | |
| 77 | + <li>From the configuration page</li> | |
| 78 | + <li>Click on "Show" for the metric which you want to create ranges for</li> | |
| 79 | + <li>Click on "Add Range" | |
| 80 | + <ol> | |
| 81 | + <li>Fill in the form with the "Beginning" and "End" values for the interval</li> | |
| 82 | + <li>Fill in the form with the "Comments" which will be displayed if the metric value matches the interval</li> | |
| 83 | + <li>Select the "Reading" which will be associated with this range</li> | |
| 84 | + </ol> | |
| 85 | + </li> | |
| 86 | + <li>Click on "Save" and you should be at the metric page with the new range added, congratulations!</li> | |
| 87 | + </ol> | |
| 88 | +</ol> | |
| 89 | + | |
| 90 | +<hr /> | ... | ... |
app/views/tutorials/configuring.html.erb
| ... | ... | @@ -1,78 +0,0 @@ |
| 1 | -<h1>Tutorial</h1> | |
| 2 | -<h2>Setting a New Configuration</h2> | |
| 3 | - | |
| 4 | -<hr /> | |
| 5 | - | |
| 6 | -<h3>Requisites</h3> | |
| 7 | - | |
| 8 | -In order to create a Configuration, you must: | |
| 9 | -<ul> | |
| 10 | - <li>Have <%= link_to("signed up", new_user_registration_path) %> to the platform</li> | |
| 11 | - <li>Be <%= link_to("signed in", new_user_session_path) %></li> | |
| 12 | - <li>Have already created at least one Reading Group</li> | |
| 13 | -</ul> | |
| 14 | - | |
| 15 | -<hr /> | |
| 16 | - | |
| 17 | -<h3>Introduction</h3> | |
| 18 | - | |
| 19 | -To process a repository, Mezuro uses configurations which you specify on the <%= link_to "repository creation", tutorials_path('analyzing') %>. Here you will be briefly introduced to all the components of a configuration and then guided through the steps to create one. | |
| 20 | - | |
| 21 | -<h4>Configuration components</h4> | |
| 22 | -<ul> | |
| 23 | - <li><b>Configuration</b>: just a high level container for the remaining components association</li> | |
| 24 | - <li><b>Metrics</b>: specification of which metric will be calculated during the processing and how to interpret its results</li> | |
| 25 | - <ul> | |
| 26 | - <li>Weight: for each module it is given a grade which is a weighted average of all the metrics calculated for it. This field is the weight of the metric on the final grade</li> | |
| 27 | - <li>Aggregation Form: Not all the metrics can be calculated for every module. For this type of metric, we calculate the aggregation of the children values according to what this field specifies</li> | |
| 28 | - <li>Reading Group: specifies which set of interpretations (called readings) will be available for this metric</li> | |
| 29 | - </ul> | |
| 30 | - <li><b>Reading Group</b>: just a high level container for the readings (interpretations)</li> | |
| 31 | - <ul> | |
| 32 | - <li>Reading: interpretation for a given value providing label, grade (this is the grade used for the weighted average mentioned above) and color</li> | |
| 33 | - </ul> | |
| 34 | - <li><b>Range</b>: Associates number intervals to the readings of a given metric</li> | |
| 35 | -</ul> | |
| 36 | - | |
| 37 | -<hr /> | |
| 38 | - | |
| 39 | -<h3>Steps</h3> | |
| 40 | - | |
| 41 | -<ol> | |
| 42 | - <li>Configuration creation</li> | |
| 43 | - <ol> | |
| 44 | - <li>Click on "Configuration" on the upper menu</li> | |
| 45 | - <li>Click on "New Configuration"</li> | |
| 46 | - <ol> | |
| 47 | - <li>Fill in the form with a name that must be unique</li> | |
| 48 | - <li>Fill in the form with a description which is not required</li> | |
| 49 | - <li>Click on "Save" and you should be at the configuration page now</li> | |
| 50 | - </ol> | |
| 51 | - </ol> | |
| 52 | - <li>Metric addition</li> | |
| 53 | - <ol> | |
| 54 | - <li>From the configuration page</li> | |
| 55 | - <li>Click on "Add Metric"</li> | |
| 56 | - <li>Select one collector from the options, and click on the metric that you want to add</li> | |
| 57 | - <ol> | |
| 58 | - <li>Fill in the form with a "Weight", used to calculate the final grade</li> | |
| 59 | - <li>Select the "Aggregation Form" that will be used for this metric</li> | |
| 60 | - <li>Select the "Reading Group" which will provide the interpretations for this metric</li> | |
| 61 | - <li>Click on "Save" and you should be at the configuration page now with the new metric added</li> | |
| 62 | - </ol> | |
| 63 | - </ol> | |
| 64 | - <li>Ranges creation</li> | |
| 65 | - <ol> | |
| 66 | - <li>From the configuration page</li> | |
| 67 | - <li>Click on "Show" for the metric which you want to create ranges for</li> | |
| 68 | - <li>Click on "Add Range"</li> | |
| 69 | - <ol> | |
| 70 | - <li>Fill in the form with the "Beginning" and "End" values for the interval</li> | |
| 71 | - <li>Fill in the form with the "Comments" which will be displayed if the metric value matches the interval</li> | |
| 72 | - <li>Select the "Reading" which will be associated with this range</li> | |
| 73 | - <li>Click on "Save" and you should be at the metric page with the new range added, congratulations!</li> | |
| 74 | - </ol> | |
| 75 | - </ol> | |
| 76 | -</ol> | |
| 77 | - | |
| 78 | -<hr /> |
| ... | ... | @@ -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> | ... | ... |
| ... | ... | @@ -0,0 +1,59 @@ |
| 1 | +<h1>Tutorial</h1> | |
| 2 | + | |
| 3 | +<h2>Keywords</h2> | |
| 4 | + | |
| 5 | +<hr /> | |
| 6 | + | |
| 7 | +<div class="keywords-explanations"> | |
| 8 | + <div> | |
| 9 | + <h3 id="granularity">Granularity</h3> | |
| 10 | + | |
| 11 | + <p>Represents the granularity level of the code fragment being measured. Mezuro uses four levels of granularity:</p> | |
| 12 | + <ul> | |
| 13 | + <li>Method</li> | |
| 14 | + <li>Class</li> | |
| 15 | + <li>Package</li> | |
| 16 | + <li>Software</li> | |
| 17 | + </ul> | |
| 18 | + </div> | |
| 19 | + | |
| 20 | + <div> | |
| 21 | + <h3 id="module">Module</h3> | |
| 22 | + | |
| 23 | + <p>Represents a fragment of the software. Every node in the processing tree generated by the Kalibro processor is a module and each module has a <i>granularity</i>.</p> | |
| 24 | + </div> | |
| 25 | + | |
| 26 | + <div> | |
| 27 | + <h3 id="range">Range</h3> | |
| 28 | + | |
| 29 | + <p>Represents numerical intervals that may contain the value calculated for a given <i>metric</i>. Ranges combined with readings provide interpretations for <i>metric results</i>.</p> | |
| 30 | + </div> | |
| 31 | + | |
| 32 | + <div> | |
| 33 | + <h3 id="reading">Reading</h3> | |
| 34 | + | |
| 35 | + <p>The interpretation given to a <i>metric result</i> (e.g., "Good", "Complex", "A"). Readings combined with ranges provide interpretations for <i>metric results</i>.</p> | |
| 36 | + </div> | |
| 37 | + | |
| 38 | + <div> | |
| 39 | + <h3 id="reading-group">Reading Group</h3> | |
| 40 | + | |
| 41 | + <p>A set of <i>readings</i> that make sense when grouped together (e.g., "Good" and "Bad", "Simple" and "Complex").</p> | |
| 42 | + </div> | |
| 43 | + <div> | |
| 44 | + <h3 id="configuration">Configuration</h3> | |
| 45 | + | |
| 46 | + <p>A set of <i>metrics</i>.</p> | |
| 47 | + </div> | |
| 48 | + <div> | |
| 49 | + <h3 id="metric_result">Metric Result</h3> | |
| 50 | + | |
| 51 | + <p>It is a numerical result associated to a metric by the Collector or aggregating in the case of a Compound Metric</p> | |
| 52 | + </div> | |
| 53 | + | |
| 54 | + <div> | |
| 55 | + <h3 id="metric">Metric</h3> | |
| 56 | + <p>A software metric is a quantitative measure of some property of a <i>module</i>. For more details see | |
| 57 | + <%= link_to(t('carlos_morais_dissertation'), 'http://www.teses.usp.br/teses/disponiveis/45/45134/tde-25092013-142158/publico/dissertacao.pdf') %>.</p> | |
| 58 | + </div> | |
| 59 | +</div> | ... | ... |
app/views/tutorials/keywords.html.erb
| ... | ... | @@ -1,58 +0,0 @@ |
| 1 | -<h1>Keywords</h1> | |
| 2 | - | |
| 3 | -<hr /> | |
| 4 | - | |
| 5 | - | |
| 6 | -<div class="keywords-explanations"> | |
| 7 | - <div> | |
| 8 | - <h3 id="granularity">Granularity</h3> | |
| 9 | - | |
| 10 | - <p>Represents the granularity level of the code fragment being measured. Mezuro uses four levels of granularity:</p> | |
| 11 | - <ul> | |
| 12 | - <li>Method</li> | |
| 13 | - <li>Class</li> | |
| 14 | - <li>Package</li> | |
| 15 | - <li>Software</li> | |
| 16 | - </ul> | |
| 17 | - </div> | |
| 18 | - | |
| 19 | - <div> | |
| 20 | - <h3 id="module">Module</h3> | |
| 21 | - | |
| 22 | - <p>Represents a fragment of the software. Every node in the processing tree generated by the Kalibro processor is a module and each module has a <i>granularity</i>.</p> | |
| 23 | - </div> | |
| 24 | - | |
| 25 | - <div> | |
| 26 | - <h3 id="range">Range</h3> | |
| 27 | - | |
| 28 | - <p>Represents numerical intervals that may contain the value calculated for a given <i>metric</i>. Ranges combined with readings provide interpretations for <i>metric results</i>.</p> | |
| 29 | - </div> | |
| 30 | - | |
| 31 | - <div> | |
| 32 | - <h3 id="reading">Reading</h3> | |
| 33 | - | |
| 34 | - <p>The interpretation given to a <i>metric result</i> (e.g., "Good", "Complex", "A"). Readings combined with ranges provide interpretations for <i>metric results</i>.</p> | |
| 35 | - </div> | |
| 36 | - | |
| 37 | - <div> | |
| 38 | - <h3 id="reading-group">Reading Group</h3> | |
| 39 | - | |
| 40 | - <p>A set of <i>readings</i> that make sense when grouped together (e.g., "Good" and "Bad", "Simple" and "Complex").</p> | |
| 41 | - </div> | |
| 42 | - <div> | |
| 43 | - <h3 id="configuration">Configuration</h3> | |
| 44 | - | |
| 45 | - <p>A set of <i>metrics</i>.</p> | |
| 46 | - </div> | |
| 47 | - <div> | |
| 48 | - <h3 id="metric_result">Metric Result</h3> | |
| 49 | - | |
| 50 | - <p>It is a numerical result associated to a metric by the Collector or aggregating in the case of a Compound Metric</p> | |
| 51 | - </div> | |
| 52 | - | |
| 53 | - <div> | |
| 54 | - <h3 id="metric">Metric</h3> | |
| 55 | - <p>A software metric is a quantitative measure of some property of a <i>module</i>. For more details see | |
| 56 | - <%= link_to 'Carlos Morais dissertation', 'http://www.teses.usp.br/teses/disponiveis/45/45134/tde-25092013-142158/publico/dissertacao.pdf' %>.</p> | |
| 57 | - </div> | |
| 58 | -</div> |
| ... | ... | @@ -0,0 +1,59 @@ |
| 1 | +<h1>Tutorial</h1> | |
| 2 | + | |
| 3 | +<h2>Palavras-chave</h2> | |
| 4 | + | |
| 5 | +<hr> | |
| 6 | + | |
| 7 | +<div class="keywords-explanations"> | |
| 8 | + <div> | |
| 9 | + <h3 id="granularity">Granularidade</h3> | |
| 10 | + | |
| 11 | + <p>Representa o nível de granularidade do fragmento de código que está sendo medido. O Mezuro utiliza quatro níveis de granularidade, sendo eles:</p> | |
| 12 | + <ul> | |
| 13 | + <li>Método</li> | |
| 14 | + <li>Classe</li> | |
| 15 | + <li>Pacote</li> | |
| 16 | + <li>Software</li> | |
| 17 | + </ul> | |
| 18 | + </div> | |
| 19 | + | |
| 20 | + <div> | |
| 21 | + <h3 id="module">Módulo</h3> | |
| 22 | + | |
| 23 | + <p>Representa um fragmento do software. Cada nó na árvore de processamento gerada pelo Kalibro Processor é um Módulo e cada um deles possui uma <i>Granularidade</i>.</p> | |
| 24 | + </div> | |
| 25 | + | |
| 26 | + <div> | |
| 27 | + <h3 id="range">Intervalo</h3> | |
| 28 | + | |
| 29 | + <p>Representa intervalos numéricos que podem conter o valor calculado para uma métrica determinada <i>Métrica</i>. Intervalos combinados com leituras fornecem interpretações para o <i>Resultado das Métricas</i>.</p> | |
| 30 | + </div> | |
| 31 | + | |
| 32 | + <div> | |
| 33 | + <h3 id="reading">Leitura</h3> | |
| 34 | + | |
| 35 | + <p>A interpretação dada a um<i>Resultado das Métricas</i> (por exemplo, "Bom", "Complexo", "A"). As leituras combinadas com intervalos fornecem interpretações para o <i>Resultado das Métricas</i>.</p> | |
| 36 | + </div> | |
| 37 | + | |
| 38 | + <div> | |
| 39 | + <h3 id="reading-group">Grupo de Leitura</h3> | |
| 40 | + | |
| 41 | + <p>Um conjunto de <i>Leituras</i> que façam sentido quando agrupadas (por exemplo, "Bom" e "Ruim", "Simples" e "Complexo").</p> | |
| 42 | + </div> | |
| 43 | + <div> | |
| 44 | + <h3 id="configuration">Configuração</h3> | |
| 45 | + | |
| 46 | + <p>Um conjunto de <i>Métricas</i>.</p> | |
| 47 | + </div> | |
| 48 | + <div> | |
| 49 | + <h3 id="metric_result">Resultado da Métrica</h3> | |
| 50 | + | |
| 51 | + <p>É um resultado numérico associado a uma métrica pelo coletor ou agregador no caso de uma Métrica Composta</p> | |
| 52 | + </div> | |
| 53 | + | |
| 54 | + <div> | |
| 55 | + <h3 id="metric">Métrica</h3> | |
| 56 | + <p>Uma métrica de software é uma medida quantitativa de alguma propriedade de um <i>Módulo</i>. Para mais detalhes veja | |
| 57 | + <%= link_to(t('carlos_morais_dissertation'), 'http://www.teses.usp.br/teses/disponiveis/45/45134/tde-25092013-142158/publico/dissertacao.pdf') %>.</p> | |
| 58 | + </div> | |
| 59 | +</div> | ... | ... |
config/application.rb
| ... | ... | @@ -17,7 +17,7 @@ module Mezuro |
| 17 | 17 | # config.time_zone = 'Central Time (US & Canada)' |
| 18 | 18 | |
| 19 | 19 | # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded. |
| 20 | - # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s] | |
| 20 | + config.i18n.load_path += Dir[Rails.root.join('config', 'locales', '**', '*.{rb,yml}').to_s] | |
| 21 | 21 | # config.i18n.default_locale = :de |
| 22 | 22 | config.i18n.enforce_available_locales = true |
| 23 | 23 | ... | ... |
| ... | ... | @@ -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}" | ... | ... |
| ... | ... | @@ -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
config/locales/controllers/compound_metric_configurations/pt.yml
0 → 100644
| ... | ... | @@ -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}" | ... | ... |
| ... | ... | @@ -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 | -# 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 | -# 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 | -# 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" |
| ... | ... | @@ -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" | ... | ... |
| ... | ... | @@ -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" | ... | ... |
| ... | ... | @@ -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' | ... | ... |
| ... | ... | @@ -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 | 20 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -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 @@ |
| 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 @@ |
| 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" | ... | ... |
| ... | ... | @@ -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 | ... | ... |
| ... | ... | @@ -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 | ... | ... |
| ... | ... | @@ -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' | ... | ... |
| ... | ... | @@ -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" | ... | ... |
| ... | ... | @@ -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" | ... | ... |
| ... | ... | @@ -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 | 23 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -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 | 23 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -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 | + | ... | ... |
| ... | ... | @@ -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 | + | ... | ... |
| ... | ... | @@ -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 | 23 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -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!" | ... | ... |
| ... | ... | @@ -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!" | ... | ... |
| ... | ... | @@ -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." | ... | ... |
| ... | ... | @@ -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." | ... | ... |
| ... | ... | @@ -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 | 19 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -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!' | ... | ... |
| ... | ... | @@ -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 | 14 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -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 | 37 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -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 | 37 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -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." | ... | ... |
| ... | ... | @@ -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 | 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 | 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 | 46 | # The priority is based upon order of creation: first created -> highest priority. |
| 43 | 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 | 13 | And I am at the Sample Configuration page |
| 14 | 14 | And I click the Add Metric link |
| 15 | 15 | And I click the Compound Metric link |
| 16 | - When I click the "Created Metrics" h3 | |
| 17 | 16 | Then I see the sample metric configuration name |
| 18 | 17 | And I see the sample metric configuration code |
| 19 | 18 | When I fill the Name field with "My Compound Metric" |
| 20 | 19 | And I fill the Description field with "Some description" |
| 21 | 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 | 22 | And I fill the Weight field with "8" |
| 24 | 23 | And I set the select field "Scope" as "Class" |
| 25 | 24 | And I set the select field "Reading Group" as "Scholar" |
| 26 | 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 | 28 | Then I should see "My Compound Metric" |
| 29 | 29 | And I should see "mcm" |
| 30 | 30 | And I should see "8" |
| ... | ... | @@ -38,6 +38,7 @@ Feature: Compound Metric Configuration Creation |
| 38 | 38 | And I have another compound metric configuration with code "Another_Code" within the given mezuro configuration |
| 39 | 39 | And I am at the Sample Configuration page |
| 40 | 40 | And I click the Add Metric link |
| 41 | + And I take a picture of the page | |
| 41 | 42 | And I click the Compound Metric link |
| 42 | 43 | When I fill the Name field with "My Compound Metric" |
| 43 | 44 | And I fill the Description field with "Some description" | ... | ... |
features/homepage.feature
| ... | ... | @@ -18,4 +18,12 @@ Feature: Homepage |
| 18 | 18 | And I should see "Sign Out" |
| 19 | 19 | And I should see "Latest projects" |
| 20 | 20 | And I should see "Project" |
| 21 | - And I should see "Your projects" | |
| 22 | 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 | 31 | \ No newline at end of file | ... | ... |
features/kalibro_configuration/listing.feature
| ... | ... | @@ -9,7 +9,7 @@ Feature: Configuration listing |
| 9 | 9 | Then I should see "Configurations" |
| 10 | 10 | And I should see "Name" |
| 11 | 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 | 14 | @kalibro_configuration_restart |
| 15 | 15 | Scenario: Should list the existing configurations |
| ... | ... | @@ -18,7 +18,7 @@ Feature: Configuration listing |
| 18 | 18 | And I have a sample configuration |
| 19 | 19 | And I am at the All Configurations page |
| 20 | 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 | 23 | @kalibro_configuration_restart |
| 24 | 24 | Scenario: Should show the existing configuration | ... | ... |
features/kalibro_range/create.feature
| ... | ... | @@ -49,7 +49,7 @@ Feature: Create Kalibro Range |
| 49 | 49 | And I should see "End" |
| 50 | 50 | And I should see "Comments" |
| 51 | 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 | 53 | Then I should be at the New Reading page |
| 54 | 54 | And I should see "Label" |
| 55 | 55 | And I should see "Grade" | ... | ... |
features/metric_configuration/delete.feature
| ... | ... | @@ -11,7 +11,7 @@ Feature: Metric Configuration Deletion |
| 11 | 11 | And I have a sample reading group |
| 12 | 12 | And I have a sample metric configuration within the given mezuro configuration |
| 13 | 13 | When I am at the Sample Configuration page |
| 14 | - And I click the Destroy link | |
| 14 | + And I click destroy Metric Configuration | |
| 15 | 15 | Then I should see "There are no Metric Configurations yet!" |
| 16 | 16 | |
| 17 | 17 | @kalibro_configuration_restart | ... | ... |
features/metric_configuration/listing.feature
| ... | ... | @@ -7,7 +7,7 @@ Feature: Configuration listing |
| 7 | 7 | Scenario: When there are no metric configurations |
| 8 | 8 | Given I have a sample configuration |
| 9 | 9 | When I am at the Sample Configuration page |
| 10 | - Then I should see "Metric Name" | |
| 10 | + Then I should see "Metric" | |
| 11 | 11 | And I should see "Code" |
| 12 | 12 | And I should see "Weight" |
| 13 | 13 | And I should see "There are no Metric Configurations yet!" | ... | ... |
features/project/create.feature
| ... | ... | @@ -5,7 +5,7 @@ Feature: Project Creation |
| 5 | 5 | |
| 6 | 6 | Scenario: Should not create project without login |
| 7 | 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 | 10 | @kalibro_processor_restart |
| 11 | 11 | Scenario: project creation |
| ... | ... | @@ -44,7 +44,7 @@ Feature: Project Creation |
| 44 | 44 | And I am at the homepage |
| 45 | 45 | And I click the Your projects link |
| 46 | 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 | 49 | @kalibro_processor_restart |
| 50 | 50 | Scenario: Choosing a name with whitespaces on the beginning and end | ... | ... |
features/project/listing.feature
| ... | ... | @@ -9,7 +9,7 @@ Feature: Project listing |
| 9 | 9 | Then I should see "Projects" |
| 10 | 10 | And I should see "Name" |
| 11 | 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 | 14 | @kalibro_processor_restart |
| 15 | 15 | Scenario: Should list the existing projects |
| ... | ... | @@ -28,4 +28,4 @@ Feature: Project listing |
| 28 | 28 | And I have sample project_attributes |
| 29 | 29 | And I am at the All Projects page |
| 30 | 30 | When I click the Show link |
| 31 | - Then the sample project should be there | |
| 32 | 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 | 10 | And I own a sample reading group |
| 11 | 11 | And I have a sample reading within the sample reading group |
| 12 | 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 | 14 | Then I should see "There are no Readings yet!" |
| 15 | 15 | |
| 16 | 16 | @kalibro_configuration_restart |
| ... | ... | @@ -20,4 +20,4 @@ Feature: Reading Deletion |
| 20 | 20 | And I have a sample reading group |
| 21 | 21 | And I have a sample reading within the sample reading group |
| 22 | 22 | When I visit the Sample Reading Group page |
| 23 | - Then I should not see "Destroy" | |
| 24 | 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 | 19 | Then I should see "My reading group" |
| 20 | 20 | And I should see "New reading group" |
| 21 | 21 | And I should see "New Reading" |
| 22 | - And I should see "Destroy Reading Group" | |
| 22 | + And I should see "Destroy" | |
| 23 | 23 | |
| 24 | 24 | @kalibro_configuration_restart |
| 25 | 25 | Scenario: Reading Group creation with already taken name | ... | ... |
features/reading_group/delete.feature
| ... | ... | @@ -23,6 +23,6 @@ Feature: Reading Group Deletion |
| 23 | 23 | And I am signed in |
| 24 | 24 | And I own a sample reading group |
| 25 | 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 | 27 | Then I should see "New Reading Group" |
| 28 | 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 | 25 | And I should see "New Reading" |
| 26 | 26 | And I should see "Edit" |
| 27 | 27 | And I should see "Destroy" |
| 28 | - And I should see "Destroy Reading Group" | |
| 28 | + And I should see "Destroy" | |
| 29 | 29 | |
| 30 | 30 | @kalibro_configuration_restart |
| 31 | 31 | Scenario: Should show the information of the sample reading | ... | ... |
features/repository/create.feature
| ... | ... | @@ -16,7 +16,7 @@ Scenario: repository creation |
| 16 | 16 | And I set the select field "Type" as "GIT" |
| 17 | 17 | And I fill the Address field with "https://github.com/mezuro/kalibro_gem.git" |
| 18 | 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 | 20 | When I press the Save button |
| 21 | 21 | Then I should see the saved repository's content |
| 22 | 22 | |
| ... | ... | @@ -32,7 +32,7 @@ Scenario: repository creation blank validations |
| 32 | 32 | And I set the select field "License" as "ISC License (ISC)" |
| 33 | 33 | And I set the select field "Type" as "GIT" |
| 34 | 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 | 36 | When I press the Save button |
| 37 | 37 | Then I should see "Name can't be blank" |
| 38 | 38 | And I should see "Address can't be blank" |
| ... | ... | @@ -51,7 +51,7 @@ Scenario: repository creation with name already taken |
| 51 | 51 | And I set the select field "Type" as "GIT" |
| 52 | 52 | And I fill the Address field with "https://github.com/mezuro/kalibro_gem.git" |
| 53 | 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 | 55 | When I press the Save button |
| 56 | 56 | Then I should see "Name should be unique within project" |
| 57 | 57 | |
| ... | ... | @@ -68,6 +68,6 @@ Scenario: Repository name with whitespaces |
| 68 | 68 | And I set the select field "Type" as "GIT" |
| 69 | 69 | And I fill the Address field with "https://github.com/mezuro/kalibro_gem.git" |
| 70 | 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 | 72 | When I press the Save button |
| 73 | 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 | 9 | And I have a sample configuration with native metrics |
| 10 | 10 | And I have a sample repository within the sample project |
| 11 | 11 | And I start to process that repository |
| 12 | - And I wait for "60" seconds | |
| 13 | 12 | And I wait up for a ready processing |
| 13 | + And I wait for "60" seconds | |
| 14 | 14 | And I start to process that repository |
| 15 | 15 | And I wait up for the last processing to get ready |
| 16 | 16 | When I visit the repository show page |
| ... | ... | @@ -19,10 +19,10 @@ Feature: Date Select |
| 19 | 19 | And I set the select field "month" as "1" |
| 20 | 20 | And I set the select field "year" as "2013" |
| 21 | 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 | 23 | When I set the select field "day" as "1" |
| 24 | 24 | And I set the select field "month" as "1" |
| 25 | 25 | And I set the select field "year" as "2020" |
| 26 | 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 | 28 | Then "before" should be lesser than "after" | ... | ... |
features/repository/show/repository_info.feature
| ... | ... | @@ -13,7 +13,7 @@ Feature: Show Repository |
| 13 | 13 | When I visit the repository show page |
| 14 | 14 | Then I should see "Address" |
| 15 | 15 | And I should see "Configuration" |
| 16 | - And I should see "Periodicity" | |
| 16 | + And I should see "Period" | |
| 17 | 17 | And I should see "Type" |
| 18 | 18 | And I should see "Description" |
| 19 | 19 | And I should see "License" |
| ... | ... | @@ -31,7 +31,7 @@ Feature: Show Repository |
| 31 | 31 | When I visit the repository show page |
| 32 | 32 | Then I should see the sample repository name |
| 33 | 33 | And I should see "State" |
| 34 | - And I should see "Creation date" | |
| 34 | + And I should see "Creation Date" | |
| 35 | 35 | And I should see "PREPARING time" |
| 36 | 36 | And I should see "COLLECTING time" |
| 37 | 37 | And I should see "BUILDING time" |
| ... | ... | @@ -64,7 +64,7 @@ Feature: Show Repository |
| 64 | 64 | And I should see "Address" |
| 65 | 65 | And I should see "Configuration" |
| 66 | 66 | And I should see "State" |
| 67 | - And I should see "Creation date" | |
| 67 | + And I should see "Creation Date" | |
| 68 | 68 | When I click the "Metric Results" h3 |
| 69 | 69 | Then I should see "Loading data. Please, wait." |
| 70 | 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 "(.*?)" within th |
| 15 | 15 | end |
| 16 | 16 | |
| 17 | 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 | 19 | end |
| 20 | 20 | |
| 21 | 21 | When(/^I click the edit link of the Coumpound Metric$/) do |
| ... | ... | @@ -27,7 +27,7 @@ When(/^I click the show link of "(.*?)"$/) do |name| |
| 27 | 27 | end |
| 28 | 28 | |
| 29 | 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 | 31 | expect(page).to have_content(@compound_metric_configuration.metric.name) |
| 32 | 32 | expect(page).to have_content("Ranges") |
| 33 | 33 | end | ... | ... |
features/step_definitions/kalibro_configuration_steps.rb
| ... | ... | @@ -20,11 +20,11 @@ Given(/^I own a sample configuration$/) do |
| 20 | 20 | end |
| 21 | 21 | |
| 22 | 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 | 24 | end |
| 25 | 25 | |
| 26 | 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 | 28 | end |
| 29 | 29 | |
| 30 | 30 | Given(/^I own a configuration named "(.*?)"$/) do |name| |
| ... | ... | @@ -33,7 +33,7 @@ Given(/^I own a configuration named "(.*?)"$/) do |name| |
| 33 | 33 | end |
| 34 | 34 | |
| 35 | 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 | 37 | end |
| 38 | 38 | |
| 39 | 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 | 9 | end |
| 10 | 10 | |
| 11 | 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 | 13 | end |
| 14 | 14 | |
| 15 | 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 | 17 | end |
| 18 | 18 | |
| 19 | 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 | 31 | end |
| 32 | 32 | |
| 33 | 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 | 35 | end |
| 36 | 36 | |
| 37 | 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 | 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 | 20 | end |
| 21 | 21 | |
| 22 | 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 | 24 | end |
| 25 | 25 | |
| 26 | 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 | 28 | end |
| 29 | 29 | |
| 30 | 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 | 32 | end |
| 33 | 33 | |
| 34 | 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 | 36 | expect(page).to have_content(@metric_configuration.metric.name) |
| 37 | 37 | expect(page).to have_content("Ranges") |
| 38 | 38 | end |
| ... | ... | @@ -52,3 +52,6 @@ Then(/^I should be at the choose metric page$/) do |
| 52 | 52 | expect(page).to have_content("Choose a metric from a Base Tool:") |
| 53 | 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 "(.*?)"$/) do |name| |
| 27 | 27 | end |
| 28 | 28 | |
| 29 | 29 | Given(/^I am at the Sample Project page$/) do |
| 30 | - visit project_path(@project.id) | |
| 30 | + visit project_path(id: @project.id) | |
| 31 | 31 | end |
| 32 | 32 | |
| 33 | 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 | 35 | end |
| 36 | 36 | |
| 37 | 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 | 39 | end |
| 40 | 40 | |
| 41 | 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 | 22 | end |
| 23 | 23 | |
| 24 | 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 | 26 | end |
| 27 | 27 | |
| 28 | 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 | 30 | end |
| 31 | 31 | |
| 32 | 32 | Given(/^I own a reading group named "(.*?)"$/) do |name| |
| ... | ... | @@ -35,7 +35,7 @@ Given(/^I own a reading group named "(.*?)"$/) do |name| |
| 35 | 35 | end |
| 36 | 36 | |
| 37 | 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 | 39 | end |
| 40 | 40 | |
| 41 | 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 | 57 | end |
| 58 | 58 | |
| 59 | 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 | 61 | end |
| 62 | 62 | |
| 63 | 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 | 3 | end |
| 4 | 4 | |
| 5 | 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 | 7 | end |
| 8 | 8 | |
| 9 | 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 | 11 | end |
| 12 | 12 | |
| 13 | 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 | 23 | end |
| 24 | 24 | |
| 25 | 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 | 27 | end |
| 28 | 28 | |
| 29 | 29 | Then(/^I should see a color picker Canvas$/) do |
| 30 | 30 | page.find('div.colorpicker') |
| 31 | 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 | 64 | end |
| 65 | 65 | |
| 66 | 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 | 68 | end |
| 69 | 69 | |
| 70 | 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 | 72 | end |
| 73 | 73 | |
| 74 | 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's name$/) do |
| 92 | 92 | end |
| 93 | 93 | |
| 94 | 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 | 96 | end |
| 97 | 97 | |
| 98 | 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 | 100 | end |
| 101 | 101 | |
| 102 | 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 | 113 | end |
| 114 | 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 | 119 | end |
| 120 | 120 | |
| 121 | 121 | Then(/^I should see the sample repository name$/) do |
| ... | ... | @@ -171,7 +171,5 @@ end |
| 171 | 171 | Then(/^"(.*?)" should be lesser than "(.*?)"$/) do |arg1, arg2| |
| 172 | 172 | v1 = eval "@#{arg1}" |
| 173 | 173 | v2 = eval "@#{arg2}" |
| 174 | - | |
| 175 | 174 | expect(v1 < v2).to be_truthy |
| 176 | 175 | end |
| 177 | - | ... | ... |
features/step_definitions/user_steps.rb
| ... | ... | @@ -30,4 +30,4 @@ end |
| 30 | 30 | When(/^I click the "(.*?)" icon$/) do |icon| |
| 31 | 31 | find('#' + icon).click # the hashtag symbol is necessary to find the id of a HTML element |
| 32 | 32 | sleep(1) #This sleep is essential to make the popup visible when we take a picture of the page |
| 33 | -end | |
| 34 | 33 | \ No newline at end of file |
| 34 | +end | ... | ... |
features/support/hooks.rb
| 1 | 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 | 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 | 11 | And I fill the Name field with "Rafael Manzo" |
| 12 | 12 | And I fill the Current password field with "password" |
| 13 | 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 | 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 => :controller do |
| 80 | 80 | get :new, kalibro_configuration_id: kalibro_configuration.id |
| 81 | 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 | 84 | it { is_expected.to respond_with(:redirect) } |
| 85 | 85 | end |
| 86 | 86 | end | ... | ... |
spec/controllers/compound_metric_configurations_controller_spec.rb
| ... | ... | @@ -25,7 +25,7 @@ describe CompoundMetricConfigurationsController, :type => :controller do |
| 25 | 25 | get :new, kalibro_configuration_id: kalibro_configuration.id |
| 26 | 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 | 29 | it { is_expected.to respond_with(:redirect) } |
| 30 | 30 | end |
| 31 | 31 | end |
| ... | ... | @@ -107,7 +107,7 @@ describe CompoundMetricConfigurationsController, :type => :controller do |
| 107 | 107 | get :edit, id: compound_metric_configuration.id, kalibro_configuration_id: compound_metric_configuration.kalibro_configuration_id.to_s |
| 108 | 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 | 111 | it { is_expected.to respond_with(:redirect) } |
| 112 | 112 | it { is_expected.to set_flash[:notice].to("You're not allowed to do this operation") } |
| 113 | 113 | end |
| ... | ... | @@ -144,7 +144,7 @@ describe CompoundMetricConfigurationsController, :type => :controller do |
| 144 | 144 | post :update, kalibro_configuration_id: compound_metric_configuration.kalibro_configuration_id, id: compound_metric_configuration.id, metric_configuration: metric_configuration_params |
| 145 | 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 | 148 | it { should respond_with(:redirect) } |
| 149 | 149 | end |
| 150 | 150 | |
| ... | ... | @@ -166,7 +166,7 @@ describe CompoundMetricConfigurationsController, :type => :controller do |
| 166 | 166 | post :update, kalibro_configuration_id: compound_metric_configuration.kalibro_configuration_id, id: compound_metric_configuration.id, metric_configuration: metric_configuration_params |
| 167 | 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 | 170 | end |
| 171 | 171 | end |
| 172 | 172 | end | ... | ... |
spec/controllers/home_controller_spec.rb
| ... | ... | @@ -5,11 +5,38 @@ describe HomeController, :type => :controller do |
| 5 | 5 | context '#index' do |
| 6 | 6 | before :each do |
| 7 | 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 | 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 | 40 | end |
| 14 | 41 | end |
| 15 | 42 | end | ... | ... |
spec/controllers/kalibro_configurations_controller_spec.rb
| ... | ... | @@ -31,7 +31,7 @@ describe KalibroConfigurationsController, :type => :controller do |
| 31 | 31 | end |
| 32 | 32 | |
| 33 | 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 | 35 | end |
| 36 | 36 | end |
| 37 | 37 | |
| ... | ... | @@ -119,7 +119,7 @@ describe KalibroConfigurationsController, :type => :controller do |
| 119 | 119 | delete :destroy, :id => @subject.id |
| 120 | 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 | 123 | end |
| 124 | 124 | end |
| 125 | 125 | |
| ... | ... | @@ -181,7 +181,7 @@ describe KalibroConfigurationsController, :type => :controller do |
| 181 | 181 | get :edit, :id => @subject.id |
| 182 | 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 | 185 | it { is_expected.to set_flash[:notice].to("You're not allowed to do this operation") } |
| 186 | 186 | end |
| 187 | 187 | end |
| ... | ... | @@ -225,7 +225,7 @@ describe KalibroConfigurationsController, :type => :controller do |
| 225 | 225 | end |
| 226 | 226 | |
| 227 | 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 | 229 | end |
| 230 | 230 | end |
| 231 | 231 | |
| ... | ... | @@ -255,7 +255,7 @@ describe KalibroConfigurationsController, :type => :controller do |
| 255 | 255 | post :update, :id => kalibro_configuration.id, :kalibro_configuration => kalibro_configuration_params |
| 256 | 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 | 259 | end |
| 260 | 260 | end |
| 261 | 261 | ... | ... |
spec/controllers/kalibro_ranges_controller_spec.rb
| ... | ... | @@ -28,7 +28,7 @@ describe KalibroRangesController, :type => :controller do |
| 28 | 28 | get :new, kalibro_configuration_id: kalibro_configuration.id, metric_configuration_id: kalibro_range.metric_configuration_id |
| 29 | 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 | 32 | it { is_expected.to respond_with(:redirect) } |
| 33 | 33 | end |
| 34 | 34 | end |
| ... | ... | @@ -54,7 +54,7 @@ describe KalibroRangesController, :type => :controller do |
| 54 | 54 | post :create, kalibro_configuration_id: kalibro_configuration.id, metric_configuration_id: kalibro_range.metric_configuration_id, kalibro_range: kalibro_range_params |
| 55 | 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 | 58 | it { is_expected.to respond_with(:redirect) } |
| 59 | 59 | end |
| 60 | 60 | |
| ... | ... | @@ -69,7 +69,7 @@ describe KalibroRangesController, :type => :controller do |
| 69 | 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 | 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 | 73 | it { is_expected.to respond_with(:redirect) } |
| 74 | 74 | end |
| 75 | 75 | |
| ... | ... | @@ -103,7 +103,7 @@ describe KalibroRangesController, :type => :controller do |
| 103 | 103 | delete :destroy, id: kalibro_range.id, metric_configuration_id: metric_configuration.id, kalibro_configuration_id: metric_configuration.kalibro_configuration_id |
| 104 | 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 | 107 | it { is_expected.to respond_with(:redirect) } |
| 108 | 108 | end |
| 109 | 109 | |
| ... | ... | @@ -120,7 +120,7 @@ describe KalibroRangesController, :type => :controller do |
| 120 | 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 | 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 | 124 | it { is_expected.to respond_with(:redirect) } |
| 125 | 125 | end |
| 126 | 126 | |
| ... | ... | @@ -129,7 +129,7 @@ describe KalibroRangesController, :type => :controller do |
| 129 | 129 | delete :destroy, id: kalibro_range.id, metric_configuration_id: metric_configuration.id, kalibro_configuration_id: metric_configuration.kalibro_configuration_id |
| 130 | 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 | 133 | it { is_expected.to respond_with(:redirect) } |
| 134 | 134 | end |
| 135 | 135 | end |
| ... | ... | @@ -172,7 +172,7 @@ describe KalibroRangesController, :type => :controller do |
| 172 | 172 | get :edit, id: kalibro_range.id, kalibro_configuration_id: metric_configuration.kalibro_configuration_id, metric_configuration_id: metric_configuration.id |
| 173 | 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 | 176 | it { is_expected.to respond_with(:redirect) } |
| 177 | 177 | it { is_expected.to set_flash[:notice].to("You're not allowed to do this operation") } |
| 178 | 178 | end |
| ... | ... | @@ -212,7 +212,7 @@ describe KalibroRangesController, :type => :controller do |
| 212 | 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 | 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 | 216 | it { is_expected.to respond_with(:redirect) } |
| 217 | 217 | end |
| 218 | 218 | |
| ... | ... | @@ -228,7 +228,7 @@ describe KalibroRangesController, :type => :controller do |
| 228 | 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 | 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 | 232 | it { is_expected.to respond_with(:redirect) } |
| 233 | 233 | end |
| 234 | 234 | |
| ... | ... | @@ -251,7 +251,7 @@ describe KalibroRangesController, :type => :controller do |
| 251 | 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 | 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 | 255 | end |
| 256 | 256 | end |
| 257 | 257 | end | ... | ... |
spec/controllers/metric_configurations_controller_spec.rb
| ... | ... | @@ -45,7 +45,7 @@ describe MetricConfigurationsController, :type => :controller do |
| 45 | 45 | post :new, kalibro_configuration_id: kalibro_configuration.id, metric_name: "Lines of Code", metric_collector_name: metric_collector.name |
| 46 | 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 | 49 | it { is_expected.to respond_with(:redirect) } |
| 50 | 50 | end |
| 51 | 51 | end |
| ... | ... | @@ -129,7 +129,7 @@ describe MetricConfigurationsController, :type => :controller do |
| 129 | 129 | get :edit, id: metric_configuration.id, kalibro_configuration_id: metric_configuration.kalibro_configuration_id.to_s |
| 130 | 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 | 133 | it { is_expected.to respond_with(:redirect) } |
| 134 | 134 | it { is_expected.to set_flash[:notice].to("You're not allowed to do this operation") } |
| 135 | 135 | end |
| ... | ... | @@ -166,7 +166,7 @@ describe MetricConfigurationsController, :type => :controller do |
| 166 | 166 | post :update, kalibro_configuration_id: metric_configuration.kalibro_configuration_id, id: metric_configuration.id, metric_configuration: metric_configuration_params |
| 167 | 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 | 170 | it { is_expected.to respond_with(:redirect) } |
| 171 | 171 | end |
| 172 | 172 | |
| ... | ... | @@ -187,7 +187,7 @@ describe MetricConfigurationsController, :type => :controller do |
| 187 | 187 | post :update, kalibro_configuration_id: metric_configuration.kalibro_configuration_id, id: metric_configuration.id, metric_configuration: metric_configuration_params |
| 188 | 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 | 191 | end |
| 192 | 192 | end |
| 193 | 193 | end |
| ... | ... | @@ -210,7 +210,7 @@ describe MetricConfigurationsController, :type => :controller do |
| 210 | 210 | delete :destroy, id: metric_configuration.id, kalibro_configuration_id: metric_configuration.kalibro_configuration_id.to_s |
| 211 | 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 | 214 | it { is_expected.to respond_with(:redirect) } |
| 215 | 215 | end |
| 216 | 216 | |
| ... | ... | @@ -219,7 +219,7 @@ describe MetricConfigurationsController, :type => :controller do |
| 219 | 219 | delete :destroy, id: metric_configuration.id, kalibro_configuration_id: metric_configuration.kalibro_configuration_id.to_s |
| 220 | 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 | 223 | it { is_expected.to respond_with(:redirect) } |
| 224 | 224 | end |
| 225 | 225 | end | ... | ... |
spec/controllers/reading_groups_controller_spec.rb
| ... | ... | @@ -121,7 +121,7 @@ describe ReadingGroupsController, :type => :controller do |
| 121 | 121 | delete :destroy, :id => @subject.id |
| 122 | 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 | 125 | end |
| 126 | 126 | end |
| 127 | 127 | ... | ... |
spec/controllers/repositories_controller_spec.rb
| ... | ... | @@ -60,7 +60,7 @@ describe RepositoriesController, :type => :controller do |
| 60 | 60 | post :create, project_id: project.id, repository: repository_params |
| 61 | 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 | 64 | it { is_expected.to respond_with(:redirect) } |
| 65 | 65 | end |
| 66 | 66 | ... | ... |
| ... | ... | @@ -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 => :helper do |
| 6 | 6 | expect(helper.scope_options).to eq [["Method","METHOD"], ["Class", "CLASS"], ["Package", "PACKAGE"], ["Software", "SOFTWARE"]] |
| 7 | 7 | end |
| 8 | 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 | 32 | end | ... | ... |
spec/routing/home_routing_spec.rb
| ... | ... | @@ -4,5 +4,7 @@ describe HomeController, :type => :routing do |
| 4 | 4 | describe "routing" do |
| 5 | 5 | it { is_expected.to route(:get, '/'). |
| 6 | 6 | to(controller: :home, action: :index) } |
| 7 | + it { is_expected.to route(:get, '/pt'). | |
| 8 | + to(controller: :home, action: :index, locale: 'pt') } | |
| 7 | 9 | end |
| 8 | 10 | end |
| 9 | 11 | \ No newline at end of file | ... | ... |
spec/routing/project_routing_spec.rb
| ... | ... | @@ -8,6 +8,9 @@ describe ProjectsController, :type => :routing do |
| 8 | 8 | it { is_expected.to route(:get, '/projects'). |
| 9 | 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 | 14 | it { is_expected.to route(:post, '/projects'). |
| 12 | 15 | to(controller: :projects, action: :create) } |
| 13 | 16 | ... | ... |