Commit 69c98017374934c685acf578ff249789245a4fb1

Authored by Stephen Crosby
2 parents 3c9449ab 94715b97
Exists in master and in 1 other branch production

Merge pull request #861 from WouterSioen/patch-1

Be consistent by always using error(s).
app/controllers/problems_controller.rb
@@ -78,7 +78,7 @@ class ProblemsController < ApplicationController @@ -78,7 +78,7 @@ class ProblemsController < ApplicationController
78 78
79 def resolve 79 def resolve
80 problem.resolve! 80 problem.resolve!
81 - flash[:success] = 'Great news everyone! The err has been resolved.' 81 + flash[:success] = 'Great news everyone! The error has been resolved.'
82 redirect_to :back 82 redirect_to :back
83 rescue ActionController::RedirectBackError 83 rescue ActionController::RedirectBackError
84 redirect_to app_path(app) 84 redirect_to app_path(app)
app/views/mailer/comment_notification.html.haml
@@ -13,7 +13,7 @@ @@ -13,7 +13,7 @@
13 %span.bold= @problem.environment 13 %span.bold= @problem.environment
14 environment. 14 environment.
15 %br 15 %br
16 - This err has occurred #{pluralize @problem.notices_count, 'time'}. 16 + This error has occurred #{pluralize @problem.notices_count, 'time'}.
17 %p 17 %p
18 = link_to("Click here to view the error and add a comment on Errbit", app_problem_url(@app, @problem), :class => "bold") << "." 18 = link_to("Click here to view the error and add a comment on Errbit", app_problem_url(@app, @problem), :class => "bold") << "."
19 19
app/views/mailer/comment_notification.text.erb
1 <%= @user.name %> has just commented on an error that occurred in <%= @notice.environment_name %>: <%= raw(@notice.message) %> 1 <%= @user.name %> has just commented on an error that occurred in <%= @notice.environment_name %>: <%= raw(@notice.message) %>
2 2
3 -This err has occurred <%= pluralize @notice.problem.notices_count, 'time' %>. You should really look into it here: 3 +This error has occurred <%= pluralize @notice.problem.notices_count, 'time' %>. You should really look into it here:
4 4
5 <%= app_problem_url(@app, @notice.problem) %> 5 <%= app_problem_url(@app, @notice.problem) %>
6 6
app/views/mailer/err_notification.html.haml
@@ -6,13 +6,13 @@ @@ -6,13 +6,13 @@
6 %td.content(valign="top") 6 %td.content(valign="top")
7 %div 7 %div
8 %p 8 %p
9 - An err has just occurred in 9 + An error has just occurred in
10 = link_to(@app.name, app_url(@app), :class => "bold") << "," 10 = link_to(@app.name, app_url(@app), :class => "bold") << ","
11 on the 11 on the
12 %span.bold= @notice.environment_name 12 %span.bold= @notice.environment_name
13 environment. 13 environment.
14 %br 14 %br
15 - This err has occurred #{pluralize @notice.problem.notices_count, 'time'}. 15 + This error has occurred #{pluralize @notice.problem.notices_count, 'time'}.
16 %p 16 %p
17 = link_to("Click here to view the error on Errbit", app_problem_url(@app, @notice.problem), :class => "bold") << "." 17 = link_to("Click here to view the error on Errbit", app_problem_url(@app, @notice.problem), :class => "bold") << "."
18 %tr 18 %tr
app/views/mailer/err_notification.text.erb
1 -An err has just occurred in <%= @notice.environment_name %>: <%= raw(@notice.message) %> 1 +An error has just occurred in <%= @notice.environment_name %>: <%= raw(@notice.message) %>
2 2
3 -This err has occurred <%= pluralize @notice.problem.notices_count, 'time' %>. You should really look into it here: 3 +This error has occurred <%= pluralize @notice.problem.notices_count, 'time' %>. You should really look into it here:
4 4
5 <%= app_problem_url(@app, @notice.problem) %> 5 <%= app_problem_url(@app, @notice.problem) %>
6 6
config/locales/en.yml
@@ -12,8 +12,8 @@ en: @@ -12,8 +12,8 @@ en:
12 success: "'%{app_name}' was successfully destroyed." 12 success: "'%{app_name}' was successfully destroyed."
13 13
14 n_errs_have: 14 n_errs_have:
15 - one: "%{count} err has"  
16 - other: "%{count} errs have" 15 + one: "%{count} error has"
  16 + other: "%{count} errors have"
17 17
18 layouts: 18 layouts:
19 application: 19 application:
@@ -102,7 +102,7 @@ en: @@ -102,7 +102,7 @@ en:
102 regenerate_api_key: "Regenerate API key" 102 regenerate_api_key: "Regenerate API key"
103 show: 103 show:
104 all_deploys: "All Deploys (%{count})" 104 all_deploys: "All Deploys (%{count})"
105 - all_errs: all errs 105 + all_errs: all errors
106 all_users_notified: "All users will be notified when something happens." 106 all_users_notified: "All users will be notified when something happens."
107 api_key: "API Key:" 107 api_key: "API Key:"
108 are_you_sure: 'Are you sure?' 108 are_you_sure: 'Are you sure?'
@@ -116,12 +116,12 @@ en: @@ -116,12 +116,12 @@ en:
116 latest_deploys: Latest Deploys 116 latest_deploys: Latest Deploys
117 message: Message 117 message: Message
118 no_deploys: No deploys 118 no_deploys: No deploys
119 - no_error_yet: "No errs have been caught yet, make sure you setup your app" 119 + no_error_yet: "No errors have been caught yet, make sure you setup your app"
120 no_watcher: "Sadly, no one is watching this app" 120 no_watcher: "Sadly, no one is watching this app"
121 repository: Repository 121 repository: Repository
122 revision: Revision 122 revision: Revision
123 show_hide: "(show/hide)" 123 show_hide: "(show/hide)"
124 - unresolved_errs: unresolved errs 124 + unresolved_errs: unresolved errors
125 unwatch: unwatch 125 unwatch: unwatch
126 user_or_email: User or Email 126 user_or_email: User or Email
127 watchers: Watchers 127 watchers: Watchers
spec/controllers/problems_controller_spec.rb
@@ -405,12 +405,12 @@ describe ProblemsController, type: &#39;controller&#39; do @@ -405,12 +405,12 @@ describe ProblemsController, type: &#39;controller&#39; do
405 405
406 it "should display a message about 1 err" do 406 it "should display a message about 1 err" do
407 post :resolve_several, :problems => [@problem2.id.to_s] 407 post :resolve_several, :problems => [@problem2.id.to_s]
408 - expect(flash[:success]).to match(/1 err has been resolved/) 408 + expect(flash[:success]).to match(/1 error has been resolved/)
409 end 409 end
410 410
411 it "should display a message about 2 errs" do 411 it "should display a message about 2 errs" do
412 post :resolve_several, :problems => [@problem1.id.to_s, @problem2.id.to_s] 412 post :resolve_several, :problems => [@problem1.id.to_s, @problem2.id.to_s]
413 - expect(flash[:success]).to match(/2 errs have been resolved/) 413 + expect(flash[:success]).to match(/2 errors have been resolved/)
414 expect(controller.selected_problems).to eq [@problem1, @problem2] 414 expect(controller.selected_problems).to eq [@problem1, @problem2]
415 end 415 end
416 end 416 end
spec/mailers/mailer_spec.rb
@@ -92,7 +92,7 @@ describe Mailer do @@ -92,7 +92,7 @@ describe Mailer do
92 end 92 end
93 93
94 it "should have the notices count in the body" do 94 it "should have the notices count in the body" do
95 - expect(@email).to have_body_text("This err has occurred 2 times") 95 + expect(@email).to have_body_text("This error has occurred 2 times")
96 end 96 end
97 97
98 it "should have the comment body" do 98 it "should have the comment body" do
spec/views/apps/show.html.haml_spec.rb
@@ -17,14 +17,14 @@ describe &quot;apps/show.html.haml&quot;, type: &#39;view&#39; do @@ -17,14 +17,14 @@ describe &quot;apps/show.html.haml&quot;, type: &#39;view&#39; do
17 it "should confirm the 'cancel' link" do 17 it "should confirm the 'cancel' link" do
18 render 18 render
19 19
20 - expect(action_bar).to have_selector('a.button', :text => 'all errs') 20 + expect(action_bar).to have_selector('a.button', :text => 'all errors')
21 end 21 end
22 end 22 end
23 23
24 context "without errs" do 24 context "without errs" do
25 it 'see no errs' do 25 it 'see no errs' do
26 render 26 render
27 - expect(rendered).to match(/No errs have been/) 27 + expect(rendered).to match(/No errors have been/)
28 end 28 end
29 end 29 end
30 30