i18n feedback + controller
This commit is contained in:
parent
6a564f0a25
commit
5941bbbf4f
3 changed files with 15 additions and 7 deletions
|
@ -6,7 +6,7 @@ class FeedbackController < ApplicationController
|
||||||
def create
|
def create
|
||||||
if params[:message].present?
|
if params[:message].present?
|
||||||
Mailer.feedback(current_user, params[:message]).deliver
|
Mailer.feedback(current_user, params[:message]).deliver
|
||||||
redirect_to root_url, :notice => "Das Feedback wurde erfolgreich verschickt. Vielen Dank!"
|
redirect_to root_url, notice: t('feedback.create.notice')
|
||||||
else
|
else
|
||||||
render :action => 'new'
|
render :action => 'new'
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
- title "Gib Feedback"
|
- title t('.title')
|
||||||
|
|
||||||
%p Fehler gefunden? Vorschlag? Idee? Kritik? Wir freuen uns über jegliches Feedback.
|
%p= t('.first_paragraph')
|
||||||
%p
|
%p= t('.second_paragraph')
|
||||||
Bitte beachte, dass das Foodsoft Team nur die Software wartet. Bei Fragen zur Organisation in Deiner Foodcoop,
|
|
||||||
kontaktiere besser die entsprechenden Ansprechpartner.
|
|
||||||
|
|
||||||
= form_tag feedback_path do
|
= form_tag feedback_path do
|
||||||
= text_area_tag :message, nil, class: 'input-xxlarge', rows: 10, required: 'required'
|
= text_area_tag :message, nil, class: 'input-xxlarge', rows: 10, required: 'required'
|
||||||
.form-actions
|
.form-actions
|
||||||
= submit_tag "Absenden", class: 'btn btn-primary'
|
= submit_tag t('.send'), class: 'btn btn-primary'
|
10
config/locales/de/de.feedback.yml
Normal file
10
config/locales/de/de.feedback.yml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
de:
|
||||||
|
feedback:
|
||||||
|
create:
|
||||||
|
notice: "Das Feedback wurde erfolgreich verschickt. Vielen Dank!"
|
||||||
|
new:
|
||||||
|
title: 'Gib Feedback'
|
||||||
|
first_paragraph: 'Fehler gefunden? Vorschlag? Idee? Kritik? Wir freuen uns über jegliches Feedback.'
|
||||||
|
second_paragraph: 'Bitte beachte, dass das Foodsoft Team nur die Software wartet. Bei Fragen zur Organisation in Deiner Foodcoop,
|
||||||
|
kontaktiere besser die entsprechenden Ansprechpartner.'
|
||||||
|
send: 'Absenden'
|
Loading…
Reference in a new issue