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 78  
79 79 def resolve
80 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 82 redirect_to :back
83 83 rescue ActionController::RedirectBackError
84 84 redirect_to app_path(app)
... ...
app/views/mailer/comment_notification.html.haml
... ... @@ -13,7 +13,7 @@
13 13 %span.bold= @problem.environment
14 14 environment.
15 15 %br
16   - This err has occurred #{pluralize @problem.notices_count, 'time'}.
  16 + This error has occurred #{pluralize @problem.notices_count, 'time'}.
17 17 %p
18 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 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 5 <%= app_problem_url(@app, @notice.problem) %>
6 6  
... ...
app/views/mailer/err_notification.html.haml
... ... @@ -6,13 +6,13 @@
6 6 %td.content(valign="top")
7 7 %div
8 8 %p
9   - An err has just occurred in
  9 + An error has just occurred in
10 10 = link_to(@app.name, app_url(@app), :class => "bold") << ","
11 11 on the
12 12 %span.bold= @notice.environment_name
13 13 environment.
14 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 16 %p
17 17 = link_to("Click here to view the error on Errbit", app_problem_url(@app, @notice.problem), :class => "bold") << "."
18 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 5 <%= app_problem_url(@app, @notice.problem) %>
6 6  
... ...
config/locales/en.yml
... ... @@ -12,8 +12,8 @@ en:
12 12 success: "'%{app_name}' was successfully destroyed."
13 13  
14 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 18 layouts:
19 19 application:
... ... @@ -102,7 +102,7 @@ en:
102 102 regenerate_api_key: "Regenerate API key"
103 103 show:
104 104 all_deploys: "All Deploys (%{count})"
105   - all_errs: all errs
  105 + all_errs: all errors
106 106 all_users_notified: "All users will be notified when something happens."
107 107 api_key: "API Key:"
108 108 are_you_sure: 'Are you sure?'
... ... @@ -116,12 +116,12 @@ en:
116 116 latest_deploys: Latest Deploys
117 117 message: Message
118 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 120 no_watcher: "Sadly, no one is watching this app"
121 121 repository: Repository
122 122 revision: Revision
123 123 show_hide: "(show/hide)"
124   - unresolved_errs: unresolved errs
  124 + unresolved_errs: unresolved errors
125 125 unwatch: unwatch
126 126 user_or_email: User or Email
127 127 watchers: Watchers
... ...
spec/controllers/problems_controller_spec.rb
... ... @@ -405,12 +405,12 @@ describe ProblemsController, type: &#39;controller&#39; do
405 405  
406 406 it "should display a message about 1 err" do
407 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 409 end
410 410  
411 411 it "should display a message about 2 errs" do
412 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 414 expect(controller.selected_problems).to eq [@problem1, @problem2]
415 415 end
416 416 end
... ...
spec/mailers/mailer_spec.rb
... ... @@ -92,7 +92,7 @@ describe Mailer do
92 92 end
93 93  
94 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 96 end
97 97  
98 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 17 it "should confirm the 'cancel' link" do
18 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 21 end
22 22 end
23 23  
24 24 context "without errs" do
25 25 it 'see no errs' do
26 26 render
27   - expect(rendered).to match(/No errs have been/)
  27 + expect(rendered).to match(/No errors have been/)
28 28 end
29 29 end
30 30  
... ...