Add translations to plain text part

This commit is contained in:
Steve Pettitt
2016-05-16 21:35:40 +01:00
parent 419402c554
commit c66ac0827e
2 changed files with 6 additions and 3 deletions

View File

@@ -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}

View File

@@ -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")