finish finance controller i18n

This commit is contained in:
wvengen 2013-02-22 00:44:39 +01:00
parent 922a6f3a2a
commit 569cdce2db
2 changed files with 8 additions and 3 deletions

View file

@ -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

View file

@ -144,4 +144,9 @@ de:
title: "Konten verwalten"
new_transaction: "Neue Überweisungen eingeben"
search_placeholder: 'Suchen ...'
# used by controller
create:
notice: 'Rechnung wurde erstellt.'
update:
notice: 'Rechnung wurde aktualisiert.'