From d74380135d18eafc45e4f04b15dc07731564b41f Mon Sep 17 00:00:00 2001
From: Daniel Alves
Date: Thu, 28 Aug 2014 12:13:14 -0300
Subject: [PATCH] Fixing english errors, blank spaces and strings in general.
---
app/assets/javascripts/module/graphic.js.coffee | 2 +-
app/controllers/mezuro_configurations_controller.rb | 2 +-
app/controllers/mezuro_ranges_controller.rb | 6 +++---
app/controllers/reading_groups_controller.rb | 4 ++--
app/controllers/repositories_controller.rb | 1 -
app/helpers/metric_configurations_helper.rb | 1 -
app/helpers/mezuro_ranges_helper.rb | 1 -
app/models/concerns/kalibro_record.rb | 2 +-
app/models/date_module_result.rb | 1 -
app/models/module_result.rb | 2 +-
app/models/reading.rb | 3 +--
app/models/user.rb | 4 +---
app/models/validators/beginning_uniqueness_validator.rb | 2 +-
app/models/validators/code_uniqueness_validator.rb | 2 +-
app/models/validators/greater_than_beginning_validator.rb | 4 ++--
app/models/validators/kalibro_uniqueness_validator.rb | 2 +-
app/models/validators/range_overlapping_validator.rb | 2 +-
app/views/compound_metric_configurations/_form.html.erb | 8 ++++----
app/views/compound_metric_configurations/_metric_options.html.erb | 2 +-
app/views/compound_metric_configurations/show.html.erb | 6 +++---
app/views/devise/mailer/reset_password_instructions.html.erb | 6 +++---
app/views/devise/passwords/new.html.erb | 2 +-
app/views/devise/registrations/edit.html.erb | 14 +++++++-------
app/views/devise/registrations/new.html.erb | 10 +++++-----
app/views/devise/sessions/new.html.erb | 8 ++++----
app/views/devise/shared/_links.erb | 4 ++--
app/views/home/index.html.erb | 4 ++--
app/views/layouts/application.html.erb | 2 +-
app/views/repositories/_unstarted_processing.html.erb | 2 +-
29 files changed, 51 insertions(+), 58 deletions(-)
diff --git a/app/assets/javascripts/module/graphic.js.coffee b/app/assets/javascripts/module/graphic.js.coffee
index aadf3a4..c17fe6a 100644
--- a/app/assets/javascripts/module/graphic.js.coffee
+++ b/app/assets/javascripts/module/graphic.js.coffee
@@ -29,7 +29,7 @@ class Module.Graphic
data = {
labels : dates,
datasets : [
- {
+ {
fillColor : "rgba(220,220,220,0.5)",
strokeColor : "rgba(220,220,220,1)",
pointColor : "rgba(220,220,220,1)",
diff --git a/app/controllers/mezuro_configurations_controller.rb b/app/controllers/mezuro_configurations_controller.rb
index e54f0fd..58dca4d 100644
--- a/app/controllers/mezuro_configurations_controller.rb
+++ b/app/controllers/mezuro_configurations_controller.rb
@@ -75,7 +75,7 @@ class MezuroConfigurationsController < ApplicationController
if @mezuro_configuration.save
current_user.mezuro_configuration_ownerships.create mezuro_configuration_id: @mezuro_configuration.id
- format.html { redirect_to mezuro_configuration_path(@mezuro_configuration.id), notice: 'mezuro configuration was successfully created.' }
+ format.html { redirect_to mezuro_configuration_path(@mezuro_configuration.id), notice: 'Configuration was successfully created.' }
format.json { render action: 'show', status: :created, location: @mezuro_configuration }
else
format.html { render action: 'new' }
diff --git a/app/controllers/mezuro_ranges_controller.rb b/app/controllers/mezuro_ranges_controller.rb
index f70910e..ea0c552 100644
--- a/app/controllers/mezuro_ranges_controller.rb
+++ b/app/controllers/mezuro_ranges_controller.rb
@@ -38,11 +38,11 @@ class MezuroRangesController < ApplicationController
@mezuro_range.metric_configuration_id = @metric_configuration_id
if @mezuro_range.update(mezuro_range_params)
format.html { redirect_to mezuro_configuration_metric_configuration_path(
- @mezuro_configuration_id, @metric_configuration_id), notice: 'The range was successfully edited.' }
+ @mezuro_configuration_id, @metric_configuration_id), notice: 'Range was successfully edited.' }
format.json { head :no_content }
else
failed_action(format, 'edit')
- end
+ end
end
end
@@ -56,7 +56,7 @@ class MezuroRangesController < ApplicationController
def create_and_redir(format)
if @mezuro_range.save
format.html { redirect_to mezuro_configuration_metric_configuration_path(
- @mezuro_configuration_id, @metric_configuration_id), notice: 'The range was successfully created.' }
+ @mezuro_configuration_id, @metric_configuration_id), notice: 'Range was successfully created.' }
else
failed_action(format, 'new')
end
diff --git a/app/controllers/reading_groups_controller.rb b/app/controllers/reading_groups_controller.rb
index 62afa85..95938c8 100644
--- a/app/controllers/reading_groups_controller.rb
+++ b/app/controllers/reading_groups_controller.rb
@@ -31,7 +31,7 @@ class ReadingGroupsController < ApplicationController
# GET /reading_groups/1/edit
# GET /reading_groups/1/edit.json
- def edit; end
+ def edit; end
def update
if @reading_group.update(reading_group_params)
@@ -53,7 +53,7 @@ class ReadingGroupsController < ApplicationController
end
private
-
+
# Use callbacks to share common setup or constraints between actions.
def set_reading_group
@reading_group = ReadingGroup.find(params[:id])
diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb
index 80c207e..d927acc 100644
--- a/app/controllers/repositories_controller.rb
+++ b/app/controllers/repositories_controller.rb
@@ -127,5 +127,4 @@ private
failed_action(format, 'new')
end
end
-
end
diff --git a/app/helpers/metric_configurations_helper.rb b/app/helpers/metric_configurations_helper.rb
index ede44c0..4c9f081 100644
--- a/app/helpers/metric_configurations_helper.rb
+++ b/app/helpers/metric_configurations_helper.rb
@@ -14,4 +14,3 @@ module MetricConfigurationsHelper
end
end
end
-
diff --git a/app/helpers/mezuro_ranges_helper.rb b/app/helpers/mezuro_ranges_helper.rb
index 7375f7d..63e0a21 100644
--- a/app/helpers/mezuro_ranges_helper.rb
+++ b/app/helpers/mezuro_ranges_helper.rb
@@ -1,5 +1,4 @@
module MezuroRangesHelper
-
def readings_options(readings)
readings.map { |reading| [reading.label, reading.id] }
end
diff --git a/app/models/concerns/kalibro_record.rb b/app/models/concerns/kalibro_record.rb
index 11263a3..52d39d7 100644
--- a/app/models/concerns/kalibro_record.rb
+++ b/app/models/concerns/kalibro_record.rb
@@ -7,7 +7,7 @@ module KalibroRecord
delegate :url_helpers, to: 'Rails.application.routes'
def persisted?
- self.class.exists?(self.id) unless self.id.nil?
+ self.class.exists?(self.id) unless self.id.nil?
end
def update(attributes = {})
diff --git a/app/models/date_module_result.rb b/app/models/date_module_result.rb
index c8b7109..e110de8 100644
--- a/app/models/date_module_result.rb
+++ b/app/models/date_module_result.rb
@@ -4,5 +4,4 @@ class DateModuleResult < KalibroGatekeeperClient::Entities::DateModuleResult
def module_result
ModuleResult.new @module_result.to_hash
end
-
end
\ No newline at end of file
diff --git a/app/models/module_result.rb b/app/models/module_result.rb
index 13c03d7..102b713 100644
--- a/app/models/module_result.rb
+++ b/app/models/module_result.rb
@@ -8,7 +8,7 @@ class ModuleResult < KalibroGatekeeperClient::Entities::ModuleResult
def history
self.class.history_of(@id).map { |date_module_result| DateModuleResult.new date_module_result.to_hash }
end
-
+
def metric_history(name)
grade_history = Hash.new
diff --git a/app/models/reading.rb b/app/models/reading.rb
index d9fc111..115e1c4 100644
--- a/app/models/reading.rb
+++ b/app/models/reading.rb
@@ -1,10 +1,9 @@
class Reading < KalibroGatekeeperClient::Entities::Reading
include KalibroRecord
-
+
attr_accessor :label, :grade, :color
validates :label, presence: true, kalibro_uniqueness: true
validates :grade, presence: true, numericality: true
validates :color, presence: true
-
end
diff --git a/app/models/user.rb b/app/models/user.rb
index bfbbc0d..d10f515 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -9,16 +9,14 @@ class User < ActiveRecord::Base
validates :email, uniqueness: true
has_many :project_ownerships
-
has_many :reading_group_ownerships
-
has_many :mezuro_configuration_ownerships
# Alert: when adding new parameters to this model, they should also be added to registrations_controller
def projects
project_ownerships.map { |project_ownership| project_ownership.project }
end
-
+
def reading_groups
reading_group_ownerships.map { |reading_group_ownership| reading_group_ownership.reading_group }
end
diff --git a/app/models/validators/beginning_uniqueness_validator.rb b/app/models/validators/beginning_uniqueness_validator.rb
index 9b3e504..c1ac9dc 100644
--- a/app/models/validators/beginning_uniqueness_validator.rb
+++ b/app/models/validators/beginning_uniqueness_validator.rb
@@ -2,7 +2,7 @@ class BeginningUniquenessValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
record.class.ranges_of(record.metric_configuration_id).each do |mezuro_range|
if mezuro_range.beginning == value && mezuro_range.id != record.id
- record.errors[attribute] << "There's already a #{record.class} with #{attribute} #{value}! Please, choose another one."
+ record.errors[attribute] << "There is already a #{record.class} with #{attribute} #{value}! Please, choose another one."
break
end
end
diff --git a/app/models/validators/code_uniqueness_validator.rb b/app/models/validators/code_uniqueness_validator.rb
index 43a681d..4a20acc 100644
--- a/app/models/validators/code_uniqueness_validator.rb
+++ b/app/models/validators/code_uniqueness_validator.rb
@@ -2,7 +2,7 @@ class CodeUniquenessValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
record.class.metric_configurations_of(record.configuration_id).each do |metric_configuration|
if metric_configuration.code == value && metric_configuration.id != record.id
- record.errors[attribute] << "There's already a #{record.class} with #{attribute} #{value}! Please, choose another one."
+ record.errors[attribute] << "There is already a #{record.class} with #{attribute} #{value}! Please, choose another one."
break
end
end
diff --git a/app/models/validators/greater_than_beginning_validator.rb b/app/models/validators/greater_than_beginning_validator.rb
index 942a12f..7d37d2e 100644
--- a/app/models/validators/greater_than_beginning_validator.rb
+++ b/app/models/validators/greater_than_beginning_validator.rb
@@ -1,6 +1,6 @@
class GreaterThanBeginningValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
- if record.beginning.is_a?(String) || value.is_a?(String) #TOOO This will be useless when we start representing INF as ruby Infinity with the new Kalibro configuration application.
+ if record.beginning.is_a?(String) || value.is_a?(String) #TODO This will be useless when we start representing INF as ruby Infinity with the new Kalibro configuration application.
if record.beginning=="INF" || value=="-INF" || record.beginning == value
add_error(record,attribute)
end
@@ -12,7 +12,7 @@ class GreaterThanBeginningValidator < ActiveModel::EachValidator
private
def add_error(record, attribute)
- record.errors[attribute] << "The end value should be greater than the beginning value."
+ record.errors[attribute] << "The End value should be greater than the Beginning value."
end
end
diff --git a/app/models/validators/kalibro_uniqueness_validator.rb b/app/models/validators/kalibro_uniqueness_validator.rb
index cc3596d..f230e21 100644
--- a/app/models/validators/kalibro_uniqueness_validator.rb
+++ b/app/models/validators/kalibro_uniqueness_validator.rb
@@ -2,7 +2,7 @@ class KalibroUniquenessValidator < ActiveModel::EachValidator
def validate_each(record, attribute, value)
record.class.all.each do |entity|
if (entity.send(attribute) == value) and (entity.id != record.id)
- record.errors[attribute] << "There's already a #{record.class} with #{attribute} #{value}! Please, choose another one."
+ record.errors[attribute] << "There is already a #{record.class} with #{attribute} #{value}! Please, choose another one."
break
end
end
diff --git a/app/models/validators/range_overlapping_validator.rb b/app/models/validators/range_overlapping_validator.rb
index c9f2393..5be96df 100644
--- a/app/models/validators/range_overlapping_validator.rb
+++ b/app/models/validators/range_overlapping_validator.rb
@@ -2,7 +2,7 @@ class RangeOverlappingValidator < ActiveModel::Validator
def validate(record)
record.class.ranges_of(record.metric_configuration_id).each do |mezuro_range|
if mezuro_range.id != record.id && overlaps?(mezuro_range,record)
- record.errors[:beginning] << "There's already a #{record.class} within these boundaries! Please, choose another ones."
+ record.errors[:beginning] << "There is already a #{record.class} within these boundaries! Please, choose another interval."
break
end
end
diff --git a/app/views/compound_metric_configurations/_form.html.erb b/app/views/compound_metric_configurations/_form.html.erb
index ed2bbf9..839f125 100644
--- a/app/views/compound_metric_configurations/_form.html.erb
+++ b/app/views/compound_metric_configurations/_form.html.erb
@@ -13,10 +13,10 @@
- Code it is a variable that holds the value of a metric analysis. It's used inside a compound metric
+ Code is a variable that keeps the value of a metric analysis. It is used inside a compound metric.
- Example :
+ Example:
Code foo := 10
@@ -29,7 +29,7 @@
- It's the weight of the metric
+ It is the weight of the metric.
@@ -44,7 +44,7 @@
- The reading group that is associated with this metric
+ The Reading Group associated with this metric.
diff --git a/app/views/compound_metric_configurations/_metric_options.html.erb b/app/views/compound_metric_configurations/_metric_options.html.erb
index e7d38fb..38949dc 100644
--- a/app/views/compound_metric_configurations/_metric_options.html.erb
+++ b/app/views/compound_metric_configurations/_metric_options.html.erb
@@ -41,7 +41,7 @@
- With which code type your metric is designed to work?
+ The code type your metric is designed to work with.
diff --git a/app/views/compound_metric_configurations/show.html.erb b/app/views/compound_metric_configurations/show.html.erb
index 4feb074..fb872ad 100644
--- a/app/views/compound_metric_configurations/show.html.erb
+++ b/app/views/compound_metric_configurations/show.html.erb
@@ -7,7 +7,7 @@
<% if @compound_metric_configuration.metric.description.nil? %>
<%= "There is no description available." %>
<% else %>
- <%= @compound_metric_configuration.metric.description %>
+ <%= @compound_metric_configuration.metric.description %>
<% end %>
@@ -45,7 +45,7 @@
Ranges
<% if mezuro_configuration_owner? @compound_metric_configuration.configuration_id %>
- <%= link_to 'Add Range', mezuro_configuration_metric_configuration_new_mezuro_range_path(@compound_metric_configuration.configuration_id,
+ <%= link_to 'Add Range', mezuro_configuration_metric_configuration_new_mezuro_range_path(@compound_metric_configuration.configuration_id,
@compound_metric_configuration.id), class: 'btn btn-info' %>
<% end %>
@@ -72,7 +72,7 @@
<%= link_to 'Back', mezuro_configuration_path(@compound_metric_configuration.configuration_id), class: 'btn btn-default' %>
<% if mezuro_configuration_owner? @compound_metric_configuration.configuration_id %>
<%= link_to 'Destroy Metric Configuration', mezuro_configuration_metric_configuration_path(@compound_metric_configuration.configuration_id,
- @compound_metric_configuration.id), method: :delete, data: { confirm: 'Are you sure that you want to destroy this metric configuration?' },
+ @compound_metric_configuration.id), method: :delete, data: { confirm: 'Are you sure that you want to destroy this Metric Configuration?' },
class: 'btn btn-danger' %>
<% end %>
diff --git a/app/views/devise/mailer/reset_password_instructions.html.erb b/app/views/devise/mailer/reset_password_instructions.html.erb
index 93de6d0..1ca1f54 100644
--- a/app/views/devise/mailer/reset_password_instructions.html.erb
+++ b/app/views/devise/mailer/reset_password_instructions.html.erb
@@ -1,8 +1,8 @@
Hello <%= @resource.email %>!
-Someone has requested a link to change your password. You can do this through the link below.
+Someone has requested a link to change your password. You can do this through the link below:
<%= link_to 'Change my password', edit_password_url(@resource, :reset_password_token => @token) %>
-If you didn't request this, please ignore this email.
-Your password won't change until you access the link above and create a new one.
+If you did not request this, please ignore this email.
+Your password will not change until you access the link above and create a new one.
diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb
index 1ffe8a4..2d8791c 100644
--- a/app/views/devise/passwords/new.html.erb
+++ b/app/views/devise/passwords/new.html.erb
@@ -14,7 +14,7 @@
- The same email address that you used on the sign up
+ The same email address used to sign up.
diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb
index bcae886..9ab18e6 100644
--- a/app/views/devise/registrations/edit.html.erb
+++ b/app/views/devise/registrations/edit.html.erb
@@ -14,7 +14,7 @@
- Your full name!
+ Your full name.
@@ -30,19 +30,19 @@
- Your email is the form of communication we have with you, so make sure you typed it correctly!
+ Your email is our communication channel. Make sure you have typed it correctly.
@@ -54,7 +54,7 @@
- Confirm your password!
+ Confirm your password.
@@ -66,7 +66,7 @@
- We need your current password to confirm your changes!
+ Your current password is needed to confirm your changes.
@@ -82,4 +82,4 @@
Cancel my account
-Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete, class: 'btn btn-danger' %>
+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' %>
diff --git a/app/views/devise/registrations/new.html.erb b/app/views/devise/registrations/new.html.erb
index 21e0161..5aed222 100644
--- a/app/views/devise/registrations/new.html.erb
+++ b/app/views/devise/registrations/new.html.erb
@@ -14,7 +14,7 @@
- Your full name!
+ Your full name.
@@ -26,7 +26,7 @@
- Your email is the form of communication we have with you, so make sure you typed it correctly!
+ Your email is our communication channel. Make sure you have typed it correctly.
@@ -38,7 +38,7 @@
- Your password must be at least 8 characters. Strong passwords contain characters in upper and lowercase, numbers and symbols.
+ Your password must have at least 8 characters. Strong passwords contain numbers, symbols, upper and lowercase characters.
@@ -50,7 +50,7 @@
- Confirm your password!
+ Confirm your password.
@@ -58,6 +58,6 @@
- <%= f.submit "Sign Up", class: 'btn btn-primary span2' %>
+ <%= f.submit "Sign Up", class: 'btn btn-primary span2' %>
<% end %>
diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb
index ad3b8aa..ac0ddf4 100644
--- a/app/views/devise/sessions/new.html.erb
+++ b/app/views/devise/sessions/new.html.erb
@@ -1,5 +1,5 @@
<%= form_for(resource, :as => resource_name, :url => session_path(resource_name),:html => { :class => "form-inline" }) do |f| %>
@@ -12,7 +12,7 @@
- The same email address that you used on the sign up
+ The same email address used to sign up.
@@ -28,7 +28,7 @@
@@ -46,7 +46,7 @@
- Stay logged in
+ Stay logged in.
diff --git a/app/views/devise/shared/_links.erb b/app/views/devise/shared/_links.erb
index 6971bc1..7492af7 100644
--- a/app/views/devise/shared/_links.erb
+++ b/app/views/devise/shared/_links.erb
@@ -11,11 +11,11 @@
<% end -%> -->
<%- if devise_mapping.confirmable? && controller_name != 'confirmations' %>
- <%= link_to "Didn't receive confirmation instructions?", new_confirmation_path(resource_name), class: 'btn btn-info' %>
+ <%= link_to "Have you received confirmation instructions?", new_confirmation_path(resource_name), class: 'btn btn-info' %>
<% end -%>
<%- if devise_mapping.lockable? && resource_class.unlock_strategy_enabled?(:email) && controller_name != 'unlocks' %>
- <%= link_to "Didn't receive unlock instructions?", new_unlock_path(resource_name), class: 'btn btn-info' %>
+ <%= link_to "Have you received unlock instructions?", new_unlock_path(resource_name), class: 'btn btn-info' %>
<% end -%>
<%- if devise_mapping.omniauthable? %>
diff --git a/app/views/home/index.html.erb b/app/views/home/index.html.erb
index 4a15b49..9dd405a 100644
--- a/app/views/home/index.html.erb
+++ b/app/views/home/index.html.erb
@@ -3,9 +3,9 @@
This is Mezuro! A free/libre web platform for collaborative source code evaluation.
- Here you can evaluate your source code with the most popular SCMs (Git SVN), just by providing it's URL. For now, you can evaluate C, C++, and Java source codes, but soon we hope to support more languages!
+ Here you can evaluate your source code with the most popular SCMs (like Git and SVN), just by providing its URL. For now, you can evaluate C, C++ and Java source codes, but we hope to support more languages in the future.
- Mezuro is under development. Try it and give us your <%= link_to 'feedback', 'https://github.com/mezuro/mezuro/issues', target: '_blank' %>.
+ Mezuro is continuously under development. Try it and give us your <%= link_to 'feedback', 'https://github.com/mezuro/mezuro/issues', target: '_blank' %>.
Latest projects
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb
index a53db2f..8716a92 100644
--- a/app/views/layouts/application.html.erb
+++ b/app/views/layouts/application.html.erb
@@ -97,7 +97,7 @@
-
Hold tight we're loading the page that you've requested!
+
Wait an instant while we are loading the page that you have requested.
<%= bootstrap_flash %>
<%= yield %>
diff --git a/app/views/repositories/_unstarted_processing.html.erb b/app/views/repositories/_unstarted_processing.html.erb
index a1ca425..9a086cf 100644
--- a/app/views/repositories/_unstarted_processing.html.erb
+++ b/app/views/repositories/_unstarted_processing.html.erb
@@ -1,3 +1,3 @@
-
This repository has no processings yet. Please hold tight that as soon as possible we'll start it!
+
This Repository has no processings yet. Please, wait an instant as we start it!
<%= image_tag 'loader.gif' %> Loading data. Please, wait.
\ No newline at end of file
--
libgit2 0.21.2