mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-25 05:45:15 +00:00
Add translations to plain text part
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
Dear #{@producer.name},
|
||||
#{t :producer_mail_greeting} #{@producer.name},
|
||||
\
|
||||
= t :producer_mail_text_before
|
||||
\
|
||||
- if @receival_instructions
|
||||
Stock pickup/delivery instructions:
|
||||
= t :producer_mail_delivery_instructions
|
||||
= @receival_instructions
|
||||
|
||||
\
|
||||
Orders summary
|
||||
================
|
||||
\
|
||||
Here is a summary of the orders for your products:
|
||||
= t :producer_mail_order_text
|
||||
\
|
||||
- @line_items.each_pair do |variant, line_item|
|
||||
#{variant.sku} - #{raw(variant.product.supplier.name)} - #{raw(variant.product_and_full_name)} (QTY: #{line_item.quantity}) @ #{line_item.single_money} = #{line_item.display_amount}
|
||||
@@ -19,6 +19,8 @@ Here is a summary of the orders for your products:
|
||||
Total: #{@total}
|
||||
\
|
||||
= t :producer_mail_text_after
|
||||
|
||||
#{t :producer_mail_signoff},
|
||||
#{@coordinator.name}
|
||||
#{@coordinator.address.address1}, #{@coordinator.address.city}, #{@coordinator.address.zipcode}
|
||||
#{@coordinator.phone}
|
||||
|
||||
@@ -68,6 +68,7 @@ describe ProducerMailer do
|
||||
end
|
||||
|
||||
it "includes the total" do
|
||||
puts mail.text_part.body.encoded
|
||||
mail.body.encoded.should include 'Total: $30.00'
|
||||
Capybara.string(mail.html_part.body.encoded)
|
||||
.find("tr.total-row")
|
||||
|
||||
Reference in New Issue
Block a user