also translate mail subjects
This commit is contained in:
parent
305ae9b5c0
commit
0c94ef5912
3 changed files with 20 additions and 7 deletions
|
@ -26,7 +26,7 @@ class Mailer < ActionMailer::Base
|
||||||
@link = new_password_url(id: @user.id, token: @user.reset_password_token)
|
@link = new_password_url(id: @user.id, token: @user.reset_password_token)
|
||||||
|
|
||||||
mail :to => @user.email,
|
mail :to => @user.email,
|
||||||
:subject => "[#{FoodsoftConfig[:name]}] Neues Passwort für/ New password for #{@user.nick}"
|
:subject => "[#{FoodsoftConfig[:name]}] " + I18n.t('mailer.reset_password.subject', :username => @user.nick)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Sends an invite email.
|
# Sends an invite email.
|
||||||
|
@ -36,7 +36,7 @@ class Mailer < ActionMailer::Base
|
||||||
@link = accept_invitation_url(token: @invite.token)
|
@link = accept_invitation_url(token: @invite.token)
|
||||||
|
|
||||||
mail :to => @invite.email,
|
mail :to => @invite.email,
|
||||||
:subject => "Einladung in die Foodcoop #{FoodsoftConfig[:name]} - Invitation to the Foodcoop"
|
:subject => I18n.t('mailer.invite.subject')
|
||||||
end
|
end
|
||||||
|
|
||||||
# Notify user of upcoming task.
|
# Notify user of upcoming task.
|
||||||
|
@ -46,7 +46,7 @@ class Mailer < ActionMailer::Base
|
||||||
@task = task
|
@task = task
|
||||||
|
|
||||||
mail :to => user.email,
|
mail :to => user.email,
|
||||||
:subject => "[#{FoodsoftConfig[:name]}] Aufgaben werden fällig!"
|
:subject => "[#{FoodsoftConfig[:name]}] " + I18n.t('mailer.upcoming_tasks.subject')
|
||||||
end
|
end
|
||||||
|
|
||||||
# Sends order result for specific Ordergroup
|
# Sends order result for specific Ordergroup
|
||||||
|
@ -56,7 +56,7 @@ class Mailer < ActionMailer::Base
|
||||||
@group_order = group_order
|
@group_order = group_order
|
||||||
|
|
||||||
mail :to => user.email,
|
mail :to => user.email,
|
||||||
:subject => "[#{FoodsoftConfig[:name]}] Bestellung beendet: #{group_order.order.name}"
|
:subject => "[#{FoodsoftConfig[:name]}] " + I18n.t('mailer.order_result.subject', :name => group_order.order.name)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Notify user if account balance is less than zero
|
# Notify user if account balance is less than zero
|
||||||
|
@ -66,7 +66,7 @@ class Mailer < ActionMailer::Base
|
||||||
@transaction = transaction
|
@transaction = transaction
|
||||||
|
|
||||||
mail :to => user.email,
|
mail :to => user.email,
|
||||||
:subject => "[#{FoodsoftConfig[:name]}] Gruppenkonto im Minus"
|
:subject => "[#{FoodsoftConfig[:name]}] " + I18n.t('mailer.negative_balance')
|
||||||
end
|
end
|
||||||
|
|
||||||
def feedback(user, feedback)
|
def feedback(user, feedback)
|
||||||
|
@ -78,7 +78,7 @@ class Mailer < ActionMailer::Base
|
||||||
:from => "#{user.nick} <#{user.email}>",
|
:from => "#{user.nick} <#{user.email}>",
|
||||||
:sender => FoodsoftConfig[:notification]["sender_address"],
|
:sender => FoodsoftConfig[:notification]["sender_address"],
|
||||||
:errors_to => FoodsoftConfig[:notification]["sender_address"],
|
:errors_to => FoodsoftConfig[:notification]["sender_address"],
|
||||||
:subject => "[Foodsoft] Feeback von #{user.email}"
|
:subject => "[#{FoodsoftConfig[:name]}] " + I18n.t('mailer.feedback.subject', :email => user.email)
|
||||||
end
|
end
|
||||||
|
|
||||||
def not_enough_users_assigned(task, user)
|
def not_enough_users_assigned(task, user)
|
||||||
|
@ -87,7 +87,7 @@ class Mailer < ActionMailer::Base
|
||||||
@user = user
|
@user = user
|
||||||
|
|
||||||
mail :to => user.email,
|
mail :to => user.email,
|
||||||
:subject => "[#{FoodsoftConfig[:name]}] \"#{task.name}\" braucht noch Leute!"
|
:subject => "[#{FoodsoftConfig[:name]}] " + I18n.t('mailer.not_enough_users_assigned.subject', :task => task.name)
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
|
@ -2,6 +2,7 @@ de:
|
||||||
mailer:
|
mailer:
|
||||||
dateformat: '%d. %b'
|
dateformat: '%d. %b'
|
||||||
feedback:
|
feedback:
|
||||||
|
subject: 'Feedback von %{email}'
|
||||||
header: '%{user} schrieb am %{date}:'
|
header: '%{user} schrieb am %{date}:'
|
||||||
foodsoft_message:
|
foodsoft_message:
|
||||||
footer: |
|
footer: |
|
||||||
|
@ -9,6 +10,7 @@ de:
|
||||||
Nachricht online einsehen: %{msg_url}
|
Nachricht online einsehen: %{msg_url}
|
||||||
Nachrichten-Einstellungen: %{profile_url}
|
Nachrichten-Einstellungen: %{profile_url}
|
||||||
invite:
|
invite:
|
||||||
|
subject: 'Einlading in die Foodcoop'
|
||||||
text: |
|
text: |
|
||||||
Hallo!
|
Hallo!
|
||||||
|
|
||||||
|
@ -18,6 +20,7 @@ de:
|
||||||
|
|
||||||
Grüße sendet die Foodsoft!
|
Grüße sendet die Foodsoft!
|
||||||
negative_balance:
|
negative_balance:
|
||||||
|
subject: 'Gruppenkonto im Minus'
|
||||||
text: |
|
text: |
|
||||||
Liebe %{group},
|
Liebe %{group},
|
||||||
|
|
||||||
|
@ -29,6 +32,7 @@ de:
|
||||||
|
|
||||||
Viele Grüße von %{foodcoop}
|
Viele Grüße von %{foodcoop}
|
||||||
not_enough_users_assigned:
|
not_enough_users_assigned:
|
||||||
|
subject: '"%{task}" braucht noch Leute!'
|
||||||
text: |
|
text: |
|
||||||
Liebe(r) %{user},
|
Liebe(r) %{user},
|
||||||
|
|
||||||
|
@ -41,6 +45,7 @@ de:
|
||||||
|
|
||||||
Deine Aufgaben: %{user_tasks_url}
|
Deine Aufgaben: %{user_tasks_url}
|
||||||
order_result:
|
order_result:
|
||||||
|
subject: 'Bestellung beendet: %{name}'
|
||||||
text0: |
|
text0: |
|
||||||
Liebe %{ordergroup},
|
Liebe %{ordergroup},
|
||||||
|
|
||||||
|
@ -54,6 +59,7 @@ de:
|
||||||
|
|
||||||
Viele Grüße von %{foodcoop}
|
Viele Grüße von %{foodcoop}
|
||||||
reset_password:
|
reset_password:
|
||||||
|
subject: 'Neues Password für %{username}'
|
||||||
text: |
|
text: |
|
||||||
Hallo %{user},
|
Hallo %{user},
|
||||||
|
|
||||||
|
@ -65,6 +71,7 @@ de:
|
||||||
|
|
||||||
Grüße sendet die Foodsoft! :)
|
Grüße sendet die Foodsoft! :)
|
||||||
upcoming_tasks:
|
upcoming_tasks:
|
||||||
|
subject: 'Aufgaben werden fällig!'
|
||||||
text0: |
|
text0: |
|
||||||
Liebe(r) %{user},
|
Liebe(r) %{user},
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@ en:
|
||||||
mailer:
|
mailer:
|
||||||
dateformat: '%d %b'
|
dateformat: '%d %b'
|
||||||
feedback:
|
feedback:
|
||||||
|
subject: 'Feedback from %{email}'
|
||||||
header: '%{user} wrote at %{date}:'
|
header: '%{user} wrote at %{date}:'
|
||||||
foodsoft_message:
|
foodsoft_message:
|
||||||
footer: |
|
footer: |
|
||||||
|
@ -9,6 +10,7 @@ en:
|
||||||
See message online: %{msg_url}
|
See message online: %{msg_url}
|
||||||
Messaging options: %{profile_url}
|
Messaging options: %{profile_url}
|
||||||
invite:
|
invite:
|
||||||
|
subject: 'Invitation to the Foodcoop'
|
||||||
text: |
|
text: |
|
||||||
Hi!
|
Hi!
|
||||||
|
|
||||||
|
@ -18,6 +20,7 @@ en:
|
||||||
|
|
||||||
Greetings, your Foodsoft Team!
|
Greetings, your Foodsoft Team!
|
||||||
negative_balance:
|
negative_balance:
|
||||||
|
subject: 'Negative account balance'
|
||||||
text: |
|
text: |
|
||||||
Dear %{group},
|
Dear %{group},
|
||||||
|
|
||||||
|
@ -29,6 +32,7 @@ en:
|
||||||
|
|
||||||
Kind regards from %{foodcoop}.
|
Kind regards from %{foodcoop}.
|
||||||
not_enough_users_assigned:
|
not_enough_users_assigned:
|
||||||
|
subject: '"%{task}" still needs people!'
|
||||||
text: |
|
text: |
|
||||||
Dear %{user},
|
Dear %{user},
|
||||||
|
|
||||||
|
@ -54,6 +58,7 @@ en:
|
||||||
|
|
||||||
Kind regards from %{foodcoop}.
|
Kind regards from %{foodcoop}.
|
||||||
reset_password:
|
reset_password:
|
||||||
|
subject: 'New password for %{username}'
|
||||||
text: |
|
text: |
|
||||||
Hi %{user},
|
Hi %{user},
|
||||||
|
|
||||||
|
@ -64,6 +69,7 @@ en:
|
||||||
|
|
||||||
Greetings, your Foodsoft Team!
|
Greetings, your Foodsoft Team!
|
||||||
upcoming_tasks:
|
upcoming_tasks:
|
||||||
|
subject: 'Tasks are due!'
|
||||||
text0: |
|
text0: |
|
||||||
Dear %{user},
|
Dear %{user},
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue