]> git.openstreetmap.org Git - rails.git/commitdiff
Rename Notifier to UserMailer
authorAndy Allan <git@gravitystorm.co.uk>
Wed, 14 Oct 2020 13:04:58 +0000 (15:04 +0200)
committerAndy Allan <git@gravitystorm.co.uk>
Wed, 14 Oct 2020 13:04:58 +0000 (15:04 +0200)
It's a convention in rails to name your mailers with a Mailer suffix, and is also common to name the class after the recipient (e.g. User, Admin). So UserMailer seems a reasonable choice.

37 files changed:
.rubocop_todo.yml
app/controllers/api/changeset_comments_controller.rb
app/controllers/api/notes_controller.rb
app/controllers/diary_entries_controller.rb
app/controllers/friendships_controller.rb
app/controllers/messages_controller.rb
app/controllers/users_controller.rb
app/helpers/user_mailer_helper.rb [moved from app/helpers/notifier_helper.rb with 97% similarity]
app/jobs/trace_importer_job.rb
app/mailers/user_mailer.rb [moved from app/mailers/notifier.rb with 83% similarity]
app/views/notifier/_gpx_description.html.erb [deleted file]
app/views/notifier/email_confirm.html.erb [deleted file]
app/views/notifier/email_confirm.text.erb [deleted file]
app/views/notifier/gpx_failure.html.erb [deleted file]
app/views/notifier/lost_password.html.erb [deleted file]
app/views/notifier/lost_password.text.erb [deleted file]
app/views/user_mailer/_gpx_description.html.erb [new file with mode: 0644]
app/views/user_mailer/_message_body.html.erb [moved from app/views/notifier/_message_body.html.erb with 100% similarity]
app/views/user_mailer/changeset_comment_notification.html.erb [moved from app/views/notifier/changeset_comment_notification.html.erb with 100% similarity]
app/views/user_mailer/changeset_comment_notification.text.erb [moved from app/views/notifier/changeset_comment_notification.text.erb with 100% similarity]
app/views/user_mailer/diary_comment_notification.html.erb [moved from app/views/notifier/diary_comment_notification.html.erb with 100% similarity]
app/views/user_mailer/diary_comment_notification.text.erb [moved from app/views/notifier/diary_comment_notification.text.erb with 100% similarity]
app/views/user_mailer/email_confirm.html.erb [new file with mode: 0644]
app/views/user_mailer/email_confirm.text.erb [new file with mode: 0644]
app/views/user_mailer/friendship_notification.html.erb [moved from app/views/notifier/friendship_notification.html.erb with 100% similarity]
app/views/user_mailer/friendship_notification.text.erb [moved from app/views/notifier/friendship_notification.text.erb with 100% similarity]
app/views/user_mailer/gpx_failure.html.erb [new file with mode: 0644]
app/views/user_mailer/gpx_success.html.erb [moved from app/views/notifier/gpx_success.html.erb with 57% similarity]
app/views/user_mailer/lost_password.html.erb [new file with mode: 0644]
app/views/user_mailer/lost_password.text.erb [new file with mode: 0644]
app/views/user_mailer/message_notification.html.erb [moved from app/views/notifier/message_notification.html.erb with 100% similarity]
app/views/user_mailer/message_notification.text.erb [moved from app/views/notifier/message_notification.text.erb with 100% similarity]
app/views/user_mailer/note_comment_notification.html.erb [moved from app/views/notifier/note_comment_notification.html.erb with 100% similarity]
app/views/user_mailer/note_comment_notification.text.erb [moved from app/views/notifier/note_comment_notification.text.erb with 100% similarity]
app/views/user_mailer/signup_confirm.html.erb [moved from app/views/notifier/signup_confirm.html.erb with 100% similarity]
app/views/user_mailer/signup_confirm.text.erb [moved from app/views/notifier/signup_confirm.text.erb with 100% similarity]
config/locales/en.yml

index 61109ddc9b7320ae231dd71692ff57edd3685265..7529d614880bfa8d423c79bbb5d4fcd7841ed499 100644 (file)
@@ -33,7 +33,7 @@ Lint/AssignmentInCondition:
     - 'app/controllers/users_controller.rb'
     - 'app/helpers/application_helper.rb'
     - 'app/helpers/browse_tags_helper.rb'
-    - 'app/mailers/notifier.rb'
+    - 'app/mailers/user_mailer.rb'
     - 'app/models/client_application.rb'
     - 'lib/nominatim.rb'
     - 'lib/osm.rb'
@@ -149,14 +149,6 @@ Rails/HelperInstanceVariable:
   Exclude:
     - 'app/helpers/title_helper.rb'
 
-# Offense count: 1
-# Cop supports --auto-correct.
-# Configuration parameters: Include.
-# Include: app/mailers/**/*.rb
-Rails/MailerName:
-  Exclude:
-    - 'app/mailers/notifier.rb'
-
 # Offense count: 5
 # Configuration parameters: Include.
 # Include: db/migrate/*.rb
index 21c854139c9bf9d684183461650be60af8c9ee12..a3a13b926e2482e7a9bf7f918228579e938a30d2 100644 (file)
@@ -32,7 +32,7 @@ module Api
 
       # Notify current subscribers of the new comment
       changeset.subscribers.visible.each do |user|
-        Notifier.changeset_comment_notification(comment, user).deliver_later if current_user != user
+        UserMailer.changeset_comment_notification(comment, user).deliver_later if current_user != user
       end
 
       # Add the commenter to the subscribers if necessary
index cd71b437457e302f2e33c13d6faf90f9761c5e6f..f4d1d0dac957511b16033d1425199c8356cf86e8 100644 (file)
@@ -381,7 +381,7 @@ module Api
       comment = note.comments.create!(attributes)
 
       note.comments.map(&:author).uniq.each do |user|
-        Notifier.note_comment_notification(comment, user).deliver_later if notify && user && user != current_user && user.visible?
+        UserMailer.note_comment_notification(comment, user).deliver_later if notify && user && user != current_user && user.visible?
       end
     end
   end
index 5f53e81b65ca05e89ef89f1319a89e2f85feb653..12f31bad255c01bf834214fd3b4e656084c0215d 100644 (file)
@@ -81,7 +81,7 @@ class DiaryEntriesController < ApplicationController
 
       # Notify current subscribers of the new comment
       @entry.subscribers.visible.each do |user|
-        Notifier.diary_comment_notification(@diary_comment, user).deliver_later if current_user != user
+        UserMailer.diary_comment_notification(@diary_comment, user).deliver_later if current_user != user
       end
 
       # Add the commenter to the subscribers if necessary
index 75e53368d19f05b49a805a8dc46957e3f6e81b85..0bff13df6efb573c478798eabc3e69bde3c3fc1d 100644 (file)
@@ -21,7 +21,7 @@ class FriendshipsController < ApplicationController
           flash[:warning] = t "friendships.make_friend.already_a_friend", :name => @new_friend.display_name
         elsif friendship.save
           flash[:notice] = t "friendships.make_friend.success", :name => @new_friend.display_name
-          Notifier.friendship_notification(friendship).deliver_later
+          UserMailer.friendship_notification(friendship).deliver_later
         else
           friendship.add_error(t("friendships.make_friend.failed", :name => @new_friend.display_name))
         end
index 53ae1dbd726fe17a9a7e1a98d45d4e4de832800d..2047c46142a72159b883d08b5e83aa9d545a9897 100644 (file)
@@ -31,7 +31,7 @@ class MessagesController < ApplicationController
       render :action => "new"
     elsif @message.save
       flash[:notice] = t ".message_sent"
-      Notifier.message_notification(@message).deliver_later
+      UserMailer.message_notification(@message).deliver_later
       redirect_to :action => :inbox
     else
       @title = t "messages.new.title"
index 1cc27d9d9001e05214574abf1105e51db5a0847a..4c5827558eeefbe7c35fd41b03fc48b2e310900b 100644 (file)
@@ -106,7 +106,7 @@ class UsersController < ApplicationController
             successful_login(current_user)
           else
             session[:token] = current_user.tokens.create.token
-            Notifier.signup_confirm(current_user, current_user.tokens.create(:referer => referer)).deliver_later
+            UserMailer.signup_confirm(current_user, current_user.tokens.create(:referer => referer)).deliver_later
             redirect_to :action => "confirm", :display_name => current_user.display_name
           end
         else
@@ -157,7 +157,7 @@ class UsersController < ApplicationController
 
       if user
         token = user.tokens.create
-        Notifier.lost_password(user, token).deliver_later
+        UserMailer.lost_password(user, token).deliver_later
         flash[:notice] = t "users.lost_password.notice email on way"
         redirect_to :action => "login"
       else
@@ -343,7 +343,7 @@ class UsersController < ApplicationController
     if user.nil? || token.nil? || token.user != user
       flash[:error] = t "users.confirm_resend.failure", :name => params[:display_name]
     else
-      Notifier.signup_confirm(user, user.tokens.create).deliver_later
+      UserMailer.signup_confirm(user, user.tokens.create).deliver_later
       flash[:notice] = t("users.confirm_resend.success", :email => user.email, :sender => Settings.support_email).html_safe
     end
 
@@ -659,7 +659,7 @@ class UsersController < ApplicationController
           flash.now[:notice] = t "users.account.flash update success confirm needed"
 
           begin
-            Notifier.email_confirm(user, user.tokens.create).deliver_later
+            UserMailer.email_confirm(user, user.tokens.create).deliver_later
           rescue StandardError
             # Ignore errors sending email
           end
similarity index 97%
rename from app/helpers/notifier_helper.rb
rename to app/helpers/user_mailer_helper.rb
index c18f79903ab52d2155a0a4550f6f1b4742461e05..39977f5a7339a524ef95b81376e08ba98857d3dd 100644 (file)
@@ -1,4 +1,4 @@
-module NotifierHelper
+module UserMailerHelper
   def fp(text)
     format_paragraph(text, 72, 0)
   end
index 2a9a8678a514aa146a58948c7d5ab34b6772e5e0..1eddcb6f8e8e50d40f20fac1e6f470ff8518edb3 100644 (file)
@@ -5,15 +5,15 @@ class TraceImporterJob < ApplicationJob
     gpx = trace.import
 
     if gpx.actual_points.positive?
-      Notifier.gpx_success(trace, gpx.actual_points).deliver
+      UserMailer.gpx_success(trace, gpx.actual_points).deliver
     else
-      Notifier.gpx_failure(trace, "0 points parsed ok. Do they all have lat,lng,alt,timestamp?").deliver
+      UserMailer.gpx_failure(trace, "0 points parsed ok. Do they all have lat,lng,alt,timestamp?").deliver
       trace.destroy
     end
   rescue StandardError => e
     logger.info e.to_s
     e.backtrace.each { |l| logger.info l }
-    Notifier.gpx_failure(trace, e.to_s + "\n" + e.backtrace.join("\n")).deliver
+    UserMailer.gpx_failure(trace, e.to_s + "\n" + e.backtrace.join("\n")).deliver
     trace.destroy
   end
 end
similarity index 83%
rename from app/mailers/notifier.rb
rename to app/mailers/user_mailer.rb
index 3e0ba446d59b25d3e2eae72daecbb114eb1dca6d..24444ce1b2d4bb3eecb11284cfba921a1488cba2 100644 (file)
@@ -1,4 +1,4 @@
-class Notifier < ApplicationMailer
+class UserMailer < ApplicationMailer
   include ActionView::Helpers::AssetUrlHelper
 
   self.delivery_job = ActionMailer::MailDeliveryJob
@@ -17,7 +17,7 @@ class Notifier < ApplicationMailer
                      :confirm_string => token.token)
 
       mail :to => user.email,
-           :subject => I18n.t("notifier.signup_confirm.subject")
+           :subject => I18n.t("user_mailer.signup_confirm.subject")
     end
   end
 
@@ -28,7 +28,7 @@ class Notifier < ApplicationMailer
                      :confirm_string => token.token)
 
       mail :to => user.new_email,
-           :subject => I18n.t("notifier.email_confirm.subject")
+           :subject => I18n.t("user_mailer.email_confirm.subject")
     end
   end
 
@@ -38,7 +38,7 @@ class Notifier < ApplicationMailer
                      :token => token.token)
 
       mail :to => user.email,
-           :subject => I18n.t("notifier.lost_password.subject")
+           :subject => I18n.t("user_mailer.lost_password.subject")
     end
   end
 
@@ -51,7 +51,7 @@ class Notifier < ApplicationMailer
       @possible_points = possible_points
 
       mail :to => trace.user.email,
-           :subject => I18n.t("notifier.gpx_notification.success.subject")
+           :subject => I18n.t("user_mailer.gpx_notification.success.subject")
     end
   end
 
@@ -63,7 +63,7 @@ class Notifier < ApplicationMailer
       @error = error
 
       mail :to => trace.user.email,
-           :subject => I18n.t("notifier.gpx_notification.failure.subject")
+           :subject => I18n.t("user_mailer.gpx_notification.failure.subject")
     end
   end
 
@@ -81,7 +81,7 @@ class Notifier < ApplicationMailer
 
       mail :from => from_address(message.sender.display_name, "m", message.id, message.digest),
            :to => message.recipient.email,
-           :subject => I18n.t("notifier.message_notification.subject_header", :subject => message.title)
+           :subject => I18n.t("user_mailer.message_notification.subject_header", :subject => message.title)
     end
   end
 
@@ -102,7 +102,7 @@ class Notifier < ApplicationMailer
 
       mail :from => from_address(comment.user.display_name, "c", comment.id, comment.digest, recipient.id),
            :to => recipient.email,
-           :subject => I18n.t("notifier.diary_comment_notification.subject", :user => comment.user.display_name)
+           :subject => I18n.t("user_mailer.diary_comment_notification.subject", :user => comment.user.display_name)
     end
   end
 
@@ -115,7 +115,7 @@ class Notifier < ApplicationMailer
 
       attach_user_avatar(@friendship.befriender)
       mail :to => friendship.befriendee.email,
-           :subject => I18n.t("notifier.friendship_notification.subject", :user => friendship.befriender.display_name)
+           :subject => I18n.t("user_mailer.friendship_notification.subject", :user => friendship.befriender.display_name)
     end
   end
 
@@ -130,7 +130,7 @@ class Notifier < ApplicationMailer
       @commenter = if comment.author
                      comment.author.display_name
                    else
-                     I18n.t("notifier.note_comment_notification.anonymous")
+                     I18n.t("user_mailer.note_comment_notification.anonymous")
                    end
 
       @author = @commenter
@@ -139,9 +139,9 @@ class Notifier < ApplicationMailer
       set_references("note", comment.note)
 
       subject = if @owner
-                  I18n.t("notifier.note_comment_notification.#{@event}.subject_own", :commenter => @commenter)
+                  I18n.t("user_mailer.note_comment_notification.#{@event}.subject_own", :commenter => @commenter)
                 else
-                  I18n.t("notifier.note_comment_notification.#{@event}.subject_other", :commenter => @commenter)
+                  I18n.t("user_mailer.note_comment_notification.#{@event}.subject_other", :commenter => @commenter)
                 end
 
       mail :to => recipient.email, :subject => subject
@@ -161,9 +161,9 @@ class Notifier < ApplicationMailer
       @author = @commenter
 
       subject = if @owner
-                  I18n.t("notifier.changeset_comment_notification.commented.subject_own", :commenter => @commenter)
+                  I18n.t("user_mailer.changeset_comment_notification.commented.subject_own", :commenter => @commenter)
                 else
-                  I18n.t("notifier.changeset_comment_notification.commented.subject_other", :commenter => @commenter)
+                  I18n.t("user_mailer.changeset_comment_notification.commented.subject_other", :commenter => @commenter)
                 end
 
       attach_user_avatar(comment.author)
diff --git a/app/views/notifier/_gpx_description.html.erb b/app/views/notifier/_gpx_description.html.erb
deleted file mode 100644 (file)
index de67f60..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-<%= t "notifier.gpx_notification.your_gpx_file" %>
-<strong><%= @trace_name %></strong>
-<%= t "notifier.gpx_notification.with_description" %>
-<em><%= @trace_description %></em>
-<% if @trace_tags.length>0 %>
-  <%= t "notifier.gpx_notification.and_the_tags" %>
-  <em><% @trace_tags.each do |tag| %>
-    <%= tag.tag.rstrip %>
-  <% end %></em>
-<% else %>
-  <%= t "notifier.gpx_notification.and_no_tags" %>
-<% end %>
diff --git a/app/views/notifier/email_confirm.html.erb b/app/views/notifier/email_confirm.html.erb
deleted file mode 100644 (file)
index 57359ef..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<p><%= t "notifier.email_confirm_html.greeting" %></p>
-
-<p><%= t "notifier.email_confirm_html.hopefully_you", :server_url => Settings.server_url, :new_address => @address %></p>
-
-<p><%= t "notifier.email_confirm_html.click_the_link" %></p>
-
-<p><a href="<%= @url %>"><%= @url %></a></p>
diff --git a/app/views/notifier/email_confirm.text.erb b/app/views/notifier/email_confirm.text.erb
deleted file mode 100644 (file)
index 7c4f0a5..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<%= t 'notifier.email_confirm_plain.greeting' %>
-
-<%= word_wrap(t 'notifier.email_confirm_plain.hopefully_you', :server_url => Settings.server_url, :new_address => @address) %>
-
-<%= t 'notifier.email_confirm_plain.click_the_link' %>
-
-<%= @url %>
diff --git a/app/views/notifier/gpx_failure.html.erb b/app/views/notifier/gpx_failure.html.erb
deleted file mode 100644 (file)
index 3ce26de..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-<p><%= t "notifier.gpx_notification.greeting" %></p>
-
-<p>
-  <%= render :partial => "gpx_description" %>
-  <%= t "notifier.gpx_notification.failure.failed_to_import" %>
-</p>
-
-<blockquote>
-  <%= @error %>
-</blockquote>
-
-<p>
-  <%= t "notifier.gpx_notification.failure.more_info_1" %>
-  <%= t "notifier.gpx_notification.failure.more_info_2" %>
-  <%= t "notifier.gpx_notification.failure.import_failures_url" %>
-</p>
diff --git a/app/views/notifier/lost_password.html.erb b/app/views/notifier/lost_password.html.erb
deleted file mode 100644 (file)
index 3f371c8..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<p><%= t "notifier.lost_password_html.greeting" %></p>
-
-<p><%= t "notifier.lost_password_html.hopefully_you" %></p>
-
-<p><%= t "notifier.lost_password_html.click_the_link" %></p>
-
-<p><a href="<%= @url %>"><%= @url %></a></p>
diff --git a/app/views/notifier/lost_password.text.erb b/app/views/notifier/lost_password.text.erb
deleted file mode 100644 (file)
index 2b74e8e..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-<%= t 'notifier.lost_password_plain.greeting' %>
-
-<%= word_wrap(t 'notifier.lost_password_plain.hopefully_you') %>
-
-<%= t 'notifier.lost_password_plain.click_the_link' %>
-
-<%= @url %>
diff --git a/app/views/user_mailer/_gpx_description.html.erb b/app/views/user_mailer/_gpx_description.html.erb
new file mode 100644 (file)
index 0000000..4fdf929
--- /dev/null
@@ -0,0 +1,12 @@
+<%= t "user_mailer.gpx_notification.your_gpx_file" %>
+<strong><%= @trace_name %></strong>
+<%= t "user_mailer.gpx_notification.with_description" %>
+<em><%= @trace_description %></em>
+<% if @trace_tags.length>0 %>
+  <%= t "user_mailer.gpx_notification.and_the_tags" %>
+  <em><% @trace_tags.each do |tag| %>
+    <%= tag.tag.rstrip %>
+  <% end %></em>
+<% else %>
+  <%= t "user_mailer.gpx_notification.and_no_tags" %>
+<% end %>
diff --git a/app/views/user_mailer/email_confirm.html.erb b/app/views/user_mailer/email_confirm.html.erb
new file mode 100644 (file)
index 0000000..3848b19
--- /dev/null
@@ -0,0 +1,7 @@
+<p><%= t "user_mailer.email_confirm_html.greeting" %></p>
+
+<p><%= t "user_mailer.email_confirm_html.hopefully_you", :server_url => Settings.server_url, :new_address => @address %></p>
+
+<p><%= t "user_mailer.email_confirm_html.click_the_link" %></p>
+
+<p><a href="<%= @url %>"><%= @url %></a></p>
diff --git a/app/views/user_mailer/email_confirm.text.erb b/app/views/user_mailer/email_confirm.text.erb
new file mode 100644 (file)
index 0000000..e4fff2b
--- /dev/null
@@ -0,0 +1,7 @@
+<%= t 'user_mailer.email_confirm_plain.greeting' %>
+
+<%= word_wrap(t 'user_mailer.email_confirm_plain.hopefully_you', :server_url => Settings.server_url, :new_address => @address) %>
+
+<%= t 'user_mailer.email_confirm_plain.click_the_link' %>
+
+<%= @url %>
diff --git a/app/views/user_mailer/gpx_failure.html.erb b/app/views/user_mailer/gpx_failure.html.erb
new file mode 100644 (file)
index 0000000..a398661
--- /dev/null
@@ -0,0 +1,16 @@
+<p><%= t "user_mailer.gpx_notification.greeting" %></p>
+
+<p>
+  <%= render :partial => "gpx_description" %>
+  <%= t "user_mailer.gpx_notification.failure.failed_to_import" %>
+</p>
+
+<blockquote>
+  <%= @error %>
+</blockquote>
+
+<p>
+  <%= t "user_mailer.gpx_notification.failure.more_info_1" %>
+  <%= t "user_mailer.gpx_notification.failure.more_info_2" %>
+  <%= t "user_mailer.gpx_notification.failure.import_failures_url" %>
+</p>
similarity index 57%
rename from app/views/notifier/gpx_success.html.erb
rename to app/views/user_mailer/gpx_success.html.erb
index 1571f3798041b42916e54dd981b2a62af989c99e..78af1166cd0febf70fc709b8566da871f4b8db60 100644 (file)
@@ -1,7 +1,7 @@
-<p><%= t "notifier.gpx_notification.greeting" %></p>
+<p><%= t "user_mailer.gpx_notification.greeting" %></p>
 
 <p>
   <%= render :partial => "gpx_description" %>
-  <%= t("notifier.gpx_notification.success.loaded_successfully",
+  <%= t("user_mailer.gpx_notification.success.loaded_successfully",
         :trace_points => @trace_points, :possible_points => @possible_points, :count => @possible_points) %>
 </p>
diff --git a/app/views/user_mailer/lost_password.html.erb b/app/views/user_mailer/lost_password.html.erb
new file mode 100644 (file)
index 0000000..7e61b6c
--- /dev/null
@@ -0,0 +1,7 @@
+<p><%= t "user_mailer.lost_password_html.greeting" %></p>
+
+<p><%= t "user_mailer.lost_password_html.hopefully_you" %></p>
+
+<p><%= t "user_mailer.lost_password_html.click_the_link" %></p>
+
+<p><a href="<%= @url %>"><%= @url %></a></p>
diff --git a/app/views/user_mailer/lost_password.text.erb b/app/views/user_mailer/lost_password.text.erb
new file mode 100644 (file)
index 0000000..778fa65
--- /dev/null
@@ -0,0 +1,7 @@
+<%= t 'user_mailer.lost_password_plain.greeting' %>
+
+<%= word_wrap(t 'user_mailer.lost_password_plain.hopefully_you') %>
+
+<%= t 'user_mailer.lost_password_plain.click_the_link' %>
+
+<%= @url %>
index ec08012fe2d4a8acd4f5471f1db1aef6dd369cc5..6157fa5173b541cabce908c2a9f29776c3c04f66 100644 (file)
@@ -1411,7 +1411,7 @@ en:
       text: Make a Donation
     learn_more: "Learn More"
     more: More
-  notifier:
+  user_mailer:
     diary_comment_notification:
       subject: "[OpenStreetMap] %{user} commented on a diary entry"
       hi: "Hi %{to_user},"
@@ -1639,7 +1639,7 @@ en:
           full <a href="https://opendatacommons.org/licenses/odbl/1.0/">legal
           code</a> explains your rights and responsibilities.
         intro_3_1_html: |
-          Our documentation is licensed under the 
+          Our documentation is licensed under the
           <a href="https://creativecommons.org/licenses/by-sa/2.0/">Creative
           Commons Attribution-ShareAlike 2.0</a> license (CC BY-SA 2.0).
         credit_title_html: How to credit OpenStreetMap
@@ -1656,11 +1656,11 @@ en:
           direct your readers to openstreetmap.org (perhaps by expanding
           'OpenStreetMap' to this full address) and to opendatacommons.org.
         credit_3_1_html: |
-          The map tiles in the &ldquo;standard style&rdquo; at www.openstreetmap.org are a 
-          Produced Work by the OpenStreetMap Foundation using OpenStreetMap data 
-          under the Open Database License. If you are using these tiles please use 
-          the following attribution: 
-          &ldquo;Base map and data from OpenStreetMap and OpenStreetMap Foundation&rdquo;. 
+          The map tiles in the &ldquo;standard style&rdquo; at www.openstreetmap.org are a
+          Produced Work by the OpenStreetMap Foundation using OpenStreetMap data
+          under the Open Database License. If you are using these tiles please use
+          the following attribution:
+          &ldquo;Base map and data from OpenStreetMap and OpenStreetMap Foundation&rdquo;.
         credit_4_html: |
           For a browsable electronic map, the credit should appear in the corner of the map.
           For example: