Correct messages i18n
This commit is contained in:
parent
5d9e1845b7
commit
80ab359860
8 changed files with 25 additions and 34 deletions
|
@ -24,7 +24,7 @@ class MessagesController < ApplicationController
|
||||||
@message.body = I18n.t('messages.model.reply_header', :user => original_message.sender.display, :when => I18n.l(original_message.created_at, :format => :short)) + "\n"
|
@message.body = I18n.t('messages.model.reply_header', :user => original_message.sender.display, :when => I18n.l(original_message.created_at, :format => :short)) + "\n"
|
||||||
original_message.body.each_line{ |l| @message.body += I18n.t('messages.model.reply_indent', :line => l) }
|
original_message.body.each_line{ |l| @message.body += I18n.t('messages.model.reply_indent', :line => l) }
|
||||||
else
|
else
|
||||||
redirect_to new_message_url, alert: 'Nachricht ist privat!'
|
redirect_to new_message_url, alert: I18n.t('messages.new.error_private')
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,14 +7,14 @@ class MessagesMailer < Mailer
|
||||||
reply_email_domain = FoodsoftConfig[:reply_email_domain]
|
reply_email_domain = FoodsoftConfig[:reply_email_domain]
|
||||||
if reply_email_domain
|
if reply_email_domain
|
||||||
hash = message.mail_hash_for_user recipient
|
hash = message.mail_hash_for_user recipient
|
||||||
reply_to = "Foodsoft <#{FoodsoftConfig.scope}.#{message.id}.#{recipient.id}.#{hash}@#{reply_email_domain}>"
|
reply_to = "#{I18n.t('layouts.foodsoft')} <#{FoodsoftConfig.scope}.#{message.id}.#{recipient.id}.#{hash}@#{reply_email_domain}>"
|
||||||
else
|
else
|
||||||
reply_to = "#{show_user(message.sender)} <#{message.sender.email}>"
|
reply_to = "#{show_user(message.sender)} <#{message.sender.email}>"
|
||||||
end
|
end
|
||||||
|
|
||||||
mail subject: "[#{FoodsoftConfig[:name]}] " + message.subject,
|
mail subject: "[#{FoodsoftConfig[:name]}] " + message.subject,
|
||||||
to: recipient.email,
|
to: recipient.email,
|
||||||
from: "#{show_user(message.sender)} via Foodsoft <#{FoodsoftConfig[:email_sender]}>",
|
from: "#{show_user(message.sender)} via #{I18n.t('layouts.foodsoft')} <#{FoodsoftConfig[:email_sender]}>",
|
||||||
reply_to: reply_to
|
reply_to: reply_to
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -4,7 +4,4 @@
|
||||||
%section#messages
|
%section#messages
|
||||||
%h2= t '.messages.title'
|
%h2= t '.messages.title'
|
||||||
= render 'messages/messages', messages: Message.pub.order('created_at DESC').limit(5), pagination: false
|
= render 'messages/messages', messages: Message.pub.order('created_at DESC').limit(5), pagination: false
|
||||||
%p
|
%p= raw t '.messages.view_all.text', messages: link_to(t('.messages.view_all.messages'), messages_path), threads: link_to(t('.messages.view_all.threads'), message_threads_path)
|
||||||
= link_to t('.messages.view_all'), messages_path
|
|
||||||
!= ' | '
|
|
||||||
= link_to t('.message_threads.view_all'), message_threads_path
|
|
||||||
|
|
|
@ -5,5 +5,5 @@
|
||||||
- if Messagegroup.any?
|
- if Messagegroup.any?
|
||||||
.controls
|
.controls
|
||||||
= link_to messagegroups_path do
|
= link_to messagegroups_path do
|
||||||
= t('shared.user_form_fields.messagegroups')
|
= t '.messagegroups'
|
||||||
%i.icon.icon-chevron-right
|
%i.icon.icon-chevron-right
|
||||||
|
|
|
@ -4,8 +4,8 @@
|
||||||
%table.table.table-striped
|
%table.table.table-striped
|
||||||
%thead
|
%thead
|
||||||
%tr
|
%tr
|
||||||
%th= t '.name'
|
%th= Messagegroup.human_attribute_name :name
|
||||||
%th= t '.members'
|
%th= Messagegroup.human_attribute_name :user_tokens
|
||||||
%th= t 'ui.actions'
|
%th= t 'ui.actions'
|
||||||
%tbody
|
%tbody
|
||||||
- for messagegroup in @messagegroups
|
- for messagegroup in @messagegroups
|
||||||
|
|
|
@ -2,5 +2,5 @@
|
||||||
|
|
||||||
%section= render 'shared/group', group: @messagegroup
|
%section= render 'shared/group', group: @messagegroup
|
||||||
= link_to t('ui.edit'), edit_admin_messagegroup_path(@messagegroup), class: 'btn'
|
= link_to t('ui.edit'), edit_admin_messagegroup_path(@messagegroup), class: 'btn'
|
||||||
= link_to t('ui.delete'), [:admin, @messagegroup], :data => {:confirm => t('.confirm')}, :method => :delete, class: 'btn btn-danger'
|
= link_to t('ui.delete'), [:admin, @messagegroup], :data => {:confirm => t('ui.confirm_delete', name: @messagegroup.name)}, :method => :delete, class: 'btn btn-danger'
|
||||||
= link_to t('.send_message'), new_message_path(:message => {:group_id => @messagegroup.id}), class: 'btn'
|
= link_to t('.send_message'), new_message_path(:message => {:group_id => @messagegroup.id}), class: 'btn'
|
||||||
|
|
|
@ -23,17 +23,15 @@ de:
|
||||||
new:
|
new:
|
||||||
title: Nachrichtengruppe anlegen
|
title: Nachrichtengruppe anlegen
|
||||||
show:
|
show:
|
||||||
confirm: Bist Du sicher?
|
|
||||||
edit: Gruppe/Mitglieder bearbeiten
|
|
||||||
send_message: Nachricht senden
|
send_message: Nachricht senden
|
||||||
title: Nachrichtengruppe %{name}
|
title: Nachrichtengruppe %{name}
|
||||||
messagegroups:
|
|
||||||
members: Mitglieder
|
|
||||||
name: Name
|
|
||||||
home:
|
home:
|
||||||
index:
|
index:
|
||||||
message_threads:
|
messages:
|
||||||
view_all: Alle Nachrichteverläufe anzeigen
|
view_all:
|
||||||
|
text: '%{messages} oder %{threads} anzeigen'
|
||||||
|
messages:
|
||||||
|
threads:
|
||||||
messagegroups:
|
messagegroups:
|
||||||
index:
|
index:
|
||||||
body: Du kannst jede der Nachrichtengruppen beitreten oder sie wieder verlassen.
|
body: Du kannst jede der Nachrichtengruppen beitreten oder sie wieder verlassen.
|
||||||
|
@ -52,10 +50,7 @@ de:
|
||||||
message_threads:
|
message_threads:
|
||||||
messagegroups:
|
messagegroups:
|
||||||
messages:
|
messages:
|
||||||
create:
|
new: Neue Nachricht
|
||||||
notice: Message is saved and will be sent.
|
|
||||||
index:
|
|
||||||
message_threads: Nachrichtenverläufe
|
|
||||||
thread:
|
thread:
|
||||||
all_message_threads: Alle Nachrichtenverläufe
|
all_message_threads: Alle Nachrichtenverläufe
|
||||||
reply: Antworten
|
reply: Antworten
|
||||||
|
@ -63,7 +58,6 @@ de:
|
||||||
groupmessage_threads:
|
groupmessage_threads:
|
||||||
show_message_threads: Alle Nachrichtenverläufe anzeigen
|
show_message_threads: Alle Nachrichtenverläufe anzeigen
|
||||||
index:
|
index:
|
||||||
new: Neue Nachricht
|
|
||||||
other: Allgemeine Nachrichten
|
other: Allgemeine Nachrichten
|
||||||
title: Nachrichtenverläufe
|
title: Nachrichtenverläufe
|
||||||
message_threads:
|
message_threads:
|
||||||
|
@ -73,7 +67,6 @@ de:
|
||||||
started_by: Gestartet von
|
started_by: Gestartet von
|
||||||
show:
|
show:
|
||||||
other: Allgemeine Nachrichten
|
other: Allgemeine Nachrichten
|
||||||
reply: Antworten
|
|
||||||
navigation:
|
navigation:
|
||||||
admin:
|
admin:
|
||||||
messagegroups: Nachrichtengruppen
|
messagegroups: Nachrichtengruppen
|
||||||
|
|
|
@ -31,13 +31,8 @@ en:
|
||||||
new:
|
new:
|
||||||
title: Create message group
|
title: Create message group
|
||||||
show:
|
show:
|
||||||
confirm: Are you sure?
|
|
||||||
edit: Edit group/members
|
|
||||||
send_message: Send message
|
send_message: Send message
|
||||||
title: Message group %{name}
|
title: Message group %{name}
|
||||||
messagegroups:
|
|
||||||
members: Members
|
|
||||||
name: Name
|
|
||||||
ordergroups:
|
ordergroups:
|
||||||
show:
|
show:
|
||||||
send_message: Send message
|
send_message: Send message
|
||||||
|
@ -63,7 +58,10 @@ en:
|
||||||
index:
|
index:
|
||||||
messages:
|
messages:
|
||||||
title: Newest messages
|
title: Newest messages
|
||||||
view_all: See all messages
|
view_all:
|
||||||
|
text: 'Show %{messages} or %{threads}'
|
||||||
|
messages: all messages
|
||||||
|
threads: threads
|
||||||
start_nav:
|
start_nav:
|
||||||
write_message: Write message
|
write_message: Write message
|
||||||
messagegroups:
|
messagegroups:
|
||||||
|
@ -84,10 +82,10 @@ en:
|
||||||
message_threads: Show as threads
|
message_threads: Show as threads
|
||||||
messagegroups: Subscribe to groups
|
messagegroups: Subscribe to groups
|
||||||
messages: Show as list
|
messages: Show as list
|
||||||
|
new: New message
|
||||||
create:
|
create:
|
||||||
notice: Message is saved and will be sent.
|
notice: Message is saved and will be sent.
|
||||||
index:
|
index:
|
||||||
new: New message
|
|
||||||
title: Messages
|
title: Messages
|
||||||
messages:
|
messages:
|
||||||
reply: Reply
|
reply: Reply
|
||||||
|
@ -96,6 +94,7 @@ en:
|
||||||
reply_indent: ! '> %{line}'
|
reply_indent: ! '> %{line}'
|
||||||
reply_subject: ! 'Re: %{subject}'
|
reply_subject: ! 'Re: %{subject}'
|
||||||
new:
|
new:
|
||||||
|
error_private: Sorry, this message is private.
|
||||||
hint_private: Message doesn’t show in Foodsoft mail inbox
|
hint_private: Message doesn’t show in Foodsoft mail inbox
|
||||||
list:
|
list:
|
||||||
desc: ! 'Please send messages to all using the mailing-list: %{list}'
|
desc: ! 'Please send messages to all using the mailing-list: %{list}'
|
||||||
|
@ -125,13 +124,15 @@ en:
|
||||||
groupmessage_threads:
|
groupmessage_threads:
|
||||||
show_message_threads: show all
|
show_message_threads: show all
|
||||||
index:
|
index:
|
||||||
new: New message
|
|
||||||
other: General
|
other: General
|
||||||
title: Message threads
|
title: Message threads
|
||||||
|
message_threads:
|
||||||
|
last_reply_at: Last replied at
|
||||||
|
last_reply_by: Last replied by
|
||||||
|
started_at: Started at
|
||||||
|
started_by: Started by
|
||||||
show:
|
show:
|
||||||
all_message_threads: All message threads
|
|
||||||
other: General
|
other: General
|
||||||
reply: Reply
|
|
||||||
messages_mailer:
|
messages_mailer:
|
||||||
foodsoft_message:
|
foodsoft_message:
|
||||||
footer: ! 'Reply: %{reply_url}
|
footer: ! 'Reply: %{reply_url}
|
||||||
|
|
Loading…
Reference in a new issue