add I18n invitation email

This commit is contained in:
Alex Turchyn
2024-10-01 21:18:01 +03:00
committed by Oleksandr Turchyn
parent d8ccd4beee
commit 5dae742361
5 changed files with 37 additions and 9 deletions
+4 -2
View File
@@ -8,7 +8,9 @@ class UserMailer < ApplicationMailer
assign_message_metadata('user_invitation', @user)
mail(to: @user.friendly_name,
subject: "You are invited to #{Docuseal.product_name}")
I18n.with_locale(@current_account.locale) do
mail(to: @user.friendly_name,
subject: I18n.t('you_are_invited_to_product_name', product_name: Docuseal.product_name))
end
end
end
+1 -1
View File
@@ -2,5 +2,5 @@
---
</p>
<p>
Sent using <a href="<%= Docuseal::PRODUCT_URL %>/start"><%= Docuseal.product_name %></a> free document signing.
<%= t('sent_using_product_name_free_document_signing_html', product_url: "#{Docuseal::PRODUCT_URL}/start", product_name: Docuseal.product_name) %>
</p>
@@ -1,7 +1,7 @@
<p>Hello <%= @user.first_name %>,</p>
<p>You have been invited to <%= @user.account.name %> <%= Docuseal.product_name %>. Please sign up using the link below:</p>
<p><%= link_to 'Sign up', invitation_url(reset_password_token: @token) %></p>
<p>Please contact us by replying to this email if you didn't request this.</p>
<p><%= @user.first_name.present? ? t('hello_name', name: @user.first_name) : t('hi_there') %>,</p>
<p><%= t('you_have_been_invited_to_account_name_product_name_please_sign_up_using_the_link_below_', account_name: @user.account.name, product_name: Docuseal.product_name) %></p>
<p><%= link_to t('sign_up'), invitation_url(reset_password_token: @token) %></p>
<p><%= t('please_contact_us_by_replying_to_this_email_if_you_didn_t_request_this') %></p>
<p>
Thanks,<br><%= @current_account.name %>
<%= t('thanks') %>,<br><%= @current_account.name %>
</p>