diff --git a/app/views/finance/invoices/_form.html.haml b/app/views/finance/invoices/_form.html.haml
index f6322175..7054a756 100644
--- a/app/views/finance/invoices/_form.html.haml
+++ b/app/views/finance/invoices/_form.html.haml
@@ -3,9 +3,9 @@
= f.hidden_field :order_id
- if @invoice.delivery
- %p Diese Rechnung ist mit einer #{link_to("Lieferung", [@invoice.supplier,@invoice.delivery])} verknüpft.
+ %p= t '.linked', what_link: link_to(t('.delivery'), [@invoice.supplier,@invoice.delivery])
- if @invoice.order
- %p Diese Rechnung ist mit einer #{link_to("Bestellung", @invoice.order)} verknüpft.
+ %p= t '.linked', what_link: link_to(t('.order'), @invoice.order)
= f.association :supplier, hint: false
= f.input :number
@@ -17,4 +17,4 @@
= f.input :note
.form-actions
= f.submit class: 'btn'
- = link_to "oder abbrechen", :back
+ = link_to t('.or_cancel'), :back
diff --git a/app/views/finance/invoices/_invoices.html.haml b/app/views/finance/invoices/_invoices.html.haml
index 9da4b40f..1663c609 100644
--- a/app/views/finance/invoices/_invoices.html.haml
+++ b/app/views/finance/invoices/_invoices.html.haml
@@ -5,14 +5,14 @@
%table.table.table-striped
%thead
%tr
- %th Nummer
- %th Lieferantin
- %th Datum
- %th Bezahlt am
- %th Betrag
- %th Lieferung
- %th Bestellung
- %th Note
+ %th= t 'simple_form.labels.invoice.number'
+ %th= t 'simple_form.labels.invoice.supplier'
+ %th= t 'simple_form.labels.invoice.date'
+ %th= t 'simple_form.labels.invoice.paid_on'
+ %th= t 'simple_form.labels.invoice.amount'
+ %th= t 'simple_form.labels.invoice.delivery'
+ %th= t 'simple_form.labels.invoice.order'
+ %th= t 'simple_form.labels.invoice.note'
%th
%th
%tbody
@@ -23,9 +23,9 @@
%td= format_date invoice.date
%td= format_date invoice.paid_on
%td= number_to_currency invoice.amount
- %td= link_to "Lieferung", [invoice.supplier,invoice.delivery] if invoice.delivery
+ %td= link_to t('.delivery'), [invoice.supplier,invoice.delivery] if invoice.delivery
%td= link_to format_date(invoice.order.ends), new_finance_order_path(order_id: invoice.order_id) if invoice.order
%td= truncate(invoice.note)
- %td= link_to "Bearbeiten", edit_finance_invoice_path(invoice), class: 'btn btn-mini'
- %td= link_to "Löschen", finance_invoice_path(invoice), :confirm => 'Are you sure?', :method => :delete,
- class: 'btn btn-danger btn-mini'
\ No newline at end of file
+ %td= link_to t('ui.edit'), edit_finance_invoice_path(invoice), class: 'btn btn-mini'
+ %td= link_to t('ui.delete'), finance_invoice_path(invoice), :confirm => t('.confirm_delete'), :method => :delete,
+ class: 'btn btn-danger btn-mini'
diff --git a/app/views/finance/invoices/edit.html.haml b/app/views/finance/invoices/edit.html.haml
index 61026cbf..efdfbf27 100644
--- a/app/views/finance/invoices/edit.html.haml
+++ b/app/views/finance/invoices/edit.html.haml
@@ -1,2 +1,2 @@
-- title "Rechnung bearbeiten"
-= render :partial => 'form'
\ No newline at end of file
+- title t('.title')
+= render :partial => 'form'
diff --git a/app/views/finance/invoices/index.html.haml b/app/views/finance/invoices/index.html.haml
index fdf5869d..d6ec176e 100644
--- a/app/views/finance/invoices/index.html.haml
+++ b/app/views/finance/invoices/index.html.haml
@@ -1,6 +1,6 @@
-- title "Rechnungen"
+- title t('.title')
- content_for :actionbar do
- = link_to 'Neue Rechnung anlegen', new_finance_invoice_path, class: 'btn btn-primary'
+ = link_to t('.action_new'), new_finance_invoice_path, class: 'btn btn-primary'
#invoicesTable= render 'invoices'
diff --git a/app/views/finance/invoices/new.html.haml b/app/views/finance/invoices/new.html.haml
index 73112145..375bc917 100644
--- a/app/views/finance/invoices/new.html.haml
+++ b/app/views/finance/invoices/new.html.haml
@@ -1,3 +1,3 @@
-- title "Neue Rechnung anlegen"
+- title t('.title')
= render :partial => 'form'
-= link_to 'Zurück', finance_invoices_path
+= link_to t('.back'), finance_invoices_path
diff --git a/app/views/finance/invoices/show.html.haml b/app/views/finance/invoices/show.html.haml
index 3992b217..16313994 100644
--- a/app/views/finance/invoices/show.html.haml
+++ b/app/views/finance/invoices/show.html.haml
@@ -1,34 +1,34 @@
-- title "Rechnung #{@invoice.number}"
+- title t('.title', number: @invoice.number)
%p
- %b Lieferantin:
+ %b= t 'simple_form.labels.invoice.supplier'
= @invoice.supplier.name
- if @invoice.delivery
%p
- %b Lieferung:
- Diese Rechnung ist mit einer #{link_to "Lieferung", [@invoice.supplier,@invoice.delivery]} verknüpft.
+ %b= t('simple_form.labels.invoice.delivery') + ':'
+ = t '.linked', what_link: link_to(t('.delivery'), [@invoice.supplier,@invoice.delivery])
%p
- %b Rechnungsnummer:
+ %b= t('simple_form.labels.invoice.number') + ':'
= @invoice.number
%p
- %b Datum:
+ %b= t('simple_form.labels.invoice.date') + ':'
= @invoice.date
%p
- %b Bezahlt am:
+ %b= t('simple_form.labels.invoice.paid_on') + ':'
= @invoice.paid_on
%p
- %b Rechnungsbetrag:
+ %b= t('simple_form.labels.invoice.amount') + ':'
= number_to_currency @invoice.amount
%p
- %b Pfand berechnet:
+ %b= t('simple_form.labels.invoice.deposit') + ':'
= number_to_currency @invoice.deposit
%p
- %b Pfand gutgeschrieben:
+ %b= t('simple_form.labels.invoice.deposit_credit') + ':'
= number_to_currency @invoice.deposit_credit
%p
- %b Notiz:
+ %b= t('simple_form.labels.invoice.note') + ':'
=h @invoice.note
-= link_to "Bearbeiten", edit_finance_invoice_path(@invoice)
+= link_to t('ui.edit'), edit_finance_invoice_path(@invoice)
|
-= link_to "Zurück", finance_invoices_path
+= link_to t('.back'), finance_invoices_path
diff --git a/config/locales/de/de.finance.yml b/config/locales/de/de.finance.yml
index e5748577..532c9d69 100644
--- a/config/locales/de/de.finance.yml
+++ b/config/locales/de/de.finance.yml
@@ -144,6 +144,28 @@ de:
title: "Konten verwalten"
new_transaction: "Neue Überweisungen eingeben"
search_placeholder: 'Suchen ...'
+ invoices:
+ edit:
+ title: "Rechnung bearbeiten"
+ form:
+ linked: "Diese Rechnung ist mit einer %{what_link} verknüpft."
+ delivery: "Lieferung"
+ order: "Bestellung"
+ or_cancel: "oder abbrechen"
+ index:
+ title: "Rechnungen"
+ action_new: "Neue Rechnung anlegen"
+ invoices:
+ delivery: "Lieferung"
+ confirm_delete: "Bist Du sicher?"
+ new:
+ title: "Neue Rechnung anlegen"
+ back: "Züruck"
+ show:
+ title: "Rechnung %{number}"
+ linked: "Diese Rechnung ist mit einer %{what_link} verknüpft."
+ delivery: "Lieferung"
+ back: "Züruck"
# used by controller
create:
diff --git a/config/locales/de/de.simple_form.yml b/config/locales/de/de.simple_form.yml
index 9043f68e..1b48ad87 100644
--- a/config/locales/de/de.simple_form.yml
+++ b/config/locales/de/de.simple_form.yml
@@ -118,6 +118,10 @@ de:
paid_on: Bezahlt am
deposit: Pfand berechnet
deposit_credit: Pfand gutgeschrieben
+ amount: Betrag
+ delivery: Lieferung
+ order: Bestellung
+ note: Notiz
order_article:
units_to_order: Menge
update_current_price: Globalen Preis aktualisieren
diff --git a/config/locales/en/en.finance.yml b/config/locales/en/en.finance.yml
index 4c53d148..fb32dd76 100644
--- a/config/locales/en/en.finance.yml
+++ b/config/locales/en/en.finance.yml
@@ -144,6 +144,28 @@ en:
title: "Manage accounts"
new_transaction: "Add new transactions"
search_placeholder: 'Search ..'
+ invoices:
+ edit:
+ title: "Edit invoice"
+ form:
+ linked: "This invoice is linked to a %{what_link}."
+ delivery: "delivery"
+ order: "order"
+ or_cancel: "or cancel"
+ index:
+ title: "Invoices"
+ action_new: "Create new invoice"
+ invoices:
+ delivery: "Delivery"
+ confirm_delete: "Are you sure?"
+ new:
+ title: "Create new invoice"
+ back: "Back"
+ show:
+ title: "Invoice %{number}"
+ linked: "This invoice is linked to a %{what_link}."
+ delivery: "delivery"
+ back: "Back"
# used by controller
create:
diff --git a/config/locales/en/en.simple_form.yml b/config/locales/en/en.simple_form.yml
index fa6175b3..8723d9cc 100644
--- a/config/locales/en/en.simple_form.yml
+++ b/config/locales/en/en.simple_form.yml
@@ -118,6 +118,10 @@ en:
paid_on: Paid on
deposit: Charge deposit
deposit_credit: Credit deposit
+ amount: Amount
+ delivery: Delivery
+ order: Order
+ note: Note
order_article:
units_to_order: Amount of units
update_current_price: Globally update current price