finish finance controller i18n
This commit is contained in:
parent
922a6f3a2a
commit
569cdce2db
2 changed files with 8 additions and 3 deletions
|
@ -22,7 +22,7 @@ class Finance::InvoicesController < ApplicationController
|
|||
@invoice = Invoice.new(params[:invoice])
|
||||
|
||||
if @invoice.save
|
||||
flash[:notice] = "Rechnung wurde erstellt."
|
||||
flash[:notice] = I18n.t('finance.create.notice')
|
||||
if @invoice.order
|
||||
# Redirect to balancing page
|
||||
redirect_to new_finance_order_url(order_id: @invoice.order.id)
|
||||
|
@ -38,7 +38,7 @@ class Finance::InvoicesController < ApplicationController
|
|||
@invoice = Invoice.find(params[:id])
|
||||
|
||||
if @invoice.update_attributes(params[:invoice])
|
||||
redirect_to [:finance, @invoice], notice: "Rechnung wurde aktualisiert."
|
||||
redirect_to [:finance, @invoice], notice: I18n.t('finance.update.notice')
|
||||
else
|
||||
render :edit
|
||||
end
|
||||
|
|
|
@ -145,3 +145,8 @@ de:
|
|||
new_transaction: "Neue Überweisungen eingeben"
|
||||
search_placeholder: 'Suchen ...'
|
||||
|
||||
# used by controller
|
||||
create:
|
||||
notice: 'Rechnung wurde erstellt.'
|
||||
update:
|
||||
notice: 'Rechnung wurde aktualisiert.'
|
||||
|
|
Loading…
Reference in a new issue