From 3fcdeba29e08a8bf3728ebc4a3e7682099381e59 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Fri, 17 Jan 2025 22:48:48 +0000 Subject: [PATCH] Rename friendship_notification to follow_notification --- app/controllers/follows_controller.rb | 2 +- app/mailers/user_mailer.rb | 2 +- ...dship_notification.html.erb => follow_notification.html.erb} | 0 ...dship_notification.text.erb => follow_notification.text.erb} | 0 config/locales/en.yml | 2 +- 5 files changed, 3 insertions(+), 3 deletions(-) rename app/views/user_mailer/{friendship_notification.html.erb => follow_notification.html.erb} (100%) rename app/views/user_mailer/{friendship_notification.text.erb => follow_notification.text.erb} (100%) diff --git a/app/controllers/follows_controller.rb b/app/controllers/follows_controller.rb index 09a98f98f..0d8ee272a 100644 --- a/app/controllers/follows_controller.rb +++ b/app/controllers/follows_controller.rb @@ -26,7 +26,7 @@ class FollowsController < ApplicationController flash[:error] = t ".limit_exceeded" elsif follow.save flash[:notice] = t ".success", :name => @friend.display_name - UserMailer.friendship_notification(follow).deliver_later + UserMailer.follow_notification(follow).deliver_later else follow.add_error(t(".failed", :name => @friend.display_name)) end diff --git a/app/mailers/user_mailer.rb b/app/mailers/user_mailer.rb index fea73c710..609816285 100644 --- a/app/mailers/user_mailer.rb +++ b/app/mailers/user_mailer.rb @@ -119,7 +119,7 @@ class UserMailer < ApplicationMailer end end - def friendship_notification(follow) + def follow_notification(follow) with_recipient_locale follow.following do @follow = follow @viewurl = user_url(@follow.follower) diff --git a/app/views/user_mailer/friendship_notification.html.erb b/app/views/user_mailer/follow_notification.html.erb similarity index 100% rename from app/views/user_mailer/friendship_notification.html.erb rename to app/views/user_mailer/follow_notification.html.erb diff --git a/app/views/user_mailer/friendship_notification.text.erb b/app/views/user_mailer/follow_notification.text.erb similarity index 100% rename from app/views/user_mailer/friendship_notification.text.erb rename to app/views/user_mailer/follow_notification.text.erb diff --git a/config/locales/en.yml b/config/locales/en.yml index e887a71aa..510ee218c 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1661,7 +1661,7 @@ en: header_html: "%{from_user} has sent you a message through OpenStreetMap with the subject %{subject}:" footer: "You can also read the message at %{readurl} and you can send a message to the author at %{replyurl}" footer_html: "You can also read the message at %{readurl} and you can send a message to the author at %{replyurl}" - friendship_notification: + follow_notification: hi: "Hi %{to_user}," subject: "[OpenStreetMap] %{user} followed you" followed_you: "%{user} is now following you on OpenStreetMap." -- 2.39.5