From f15ca8610b742d68fc1a60c54e0a42a8dc32f4ff Mon Sep 17 00:00:00 2001 From: Patrick Gansterer Date: Tue, 18 Feb 2020 19:04:10 +0100 Subject: [PATCH] Add pickup date to order_result message --- app/views/mailer/order_result.text.haml | 5 ++++- config/locales/de.yml | 5 ++++- config/locales/en.yml | 5 ++++- config/locales/es.yml | 3 ++- config/locales/fr.yml | 3 ++- config/locales/nl.yml | 3 ++- 6 files changed, 18 insertions(+), 6 deletions(-) diff --git a/app/views/mailer/order_result.text.haml b/app/views/mailer/order_result.text.haml index 3931842b..077207d7 100644 --- a/app/views/mailer/order_result.text.haml +++ b/app/views/mailer/order_result.text.haml @@ -1,5 +1,8 @@ = raw t '.text0', ordergroup: @group_order.ordergroup_name, order: @order.name, when: I18n.l(@order.ends), user: show_user(@order.updated_by) +- if @order.pickup + = raw t '.text1', pickup: I18n.l(@order.pickup) += raw t '.text2' - for group_order_article in @group_order.group_order_articles.ordered.includes(:order_article) - article = group_order_article.order_article.article \- #{article.name}: #{group_order_article.result} x #{article.unit} = #{group_order_article.result * article.fc_price} -= raw t '.text1', sum: @group_order.price, order_url: group_order_url(@group_order), foodcoop: FoodsoftConfig[:name] += raw t '.text3', sum: @group_order.price, order_url: group_order_url(@group_order), foodcoop: FoodsoftConfig[:name] diff --git a/config/locales/de.yml b/config/locales/de.yml index 02ecdea6..9b0c3537 100644 --- a/config/locales/de.yml +++ b/config/locales/de.yml @@ -1183,8 +1183,11 @@ de: Liebe Bestellgruppe %{ordergroup}, die Bestellung für "%{order}" wurde am %{when} von %{user} beendet. + text1: | + Sie kann voraussichtlich am %{pickup} abgeholt werden. + text2: | Für euch wurden die folgenden Artikel bestellt: - text1: |- + text3: |- o Gesamtpreis: %{sum} Bestellung online einsehen: %{order_url} diff --git a/config/locales/en.yml b/config/locales/en.yml index 7555c90a..3c016f57 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1225,8 +1225,11 @@ en: Dear %{ordergroup}, The order for "%{order}" has been closed by %{user} on %{when}. + text1: | + It can be presumable be picked up on %{pickup}. + text2: | The following articles have been ordered for your ordergroup: - text1: |- + text3: |- o Total sum: %{sum} You can view the order online: %{order_url} diff --git a/config/locales/es.yml b/config/locales/es.yml index feb0dd5f..a5bf5c57 100644 --- a/config/locales/es.yml +++ b/config/locales/es.yml @@ -1056,8 +1056,9 @@ es: Queridos miebros de %{ordergroup}, El pedido de "%{order}" ha sido cerrado por %{user} en %{when}. + text2: | Los siguientes artículos se han pedido para tu grupo de pedido: - text1: |- + text3: |- o Suma total: %{sum} Puedes ver el pedido online: %{order_url} diff --git a/config/locales/fr.yml b/config/locales/fr.yml index 91edc133..6b5fa6da 100644 --- a/config/locales/fr.yml +++ b/config/locales/fr.yml @@ -897,8 +897,9 @@ fr: CherEs %{ordergroup}, La commande pour "%{order}" a été finalisée le %{when} par %{user}. + text2: | Voilà la liste des produits qui ont été commandés pour vous: - text1: |- + text3: |- Prix total: %{sum} Afficher sur le site: %{order_url} diff --git a/config/locales/nl.yml b/config/locales/nl.yml index 967d2ad4..7e0ad0e7 100644 --- a/config/locales/nl.yml +++ b/config/locales/nl.yml @@ -1148,8 +1148,9 @@ nl: Beste %{ordergroup}. De bestelling voor "%{order}" is om %{when} gesloten door %{user}. + text2: | De volgende artikelen zijn voor jouw huishouden besteld: - text1: |- + text3: |- o Totaal: %{sum} Je kunt de bestelling online bekijken: %{order_url}