Fix and clean up bank account translations for English and German

This commit is contained in:
Patrick Gansterer 2019-10-30 12:42:41 +01:00
parent 0564b18e22
commit c559a31a9e
8 changed files with 149 additions and 35 deletions

View file

@ -8,7 +8,7 @@ class Finance::BankAccountsController < Finance::BaseController
def assign_unlinked_transactions def assign_unlinked_transactions
@bank_account = BankAccount.find(params[:id]) @bank_account = BankAccount.find(params[:id])
count = @bank_account.assign_unlinked_transactions count = @bank_account.assign_unlinked_transactions
redirect_to finance_bank_account_transactions_url(@bank_account), notice: t('finance.bank_accounts.controller.assign.notice', count: count) redirect_to finance_bank_account_transactions_url(@bank_account), notice: t('.notice', count: count)
rescue => error rescue => error
redirect_to finance_bank_account_transactions_url(@bank_account), alert: t('errors.general_msg', msg: error.message) redirect_to finance_bank_account_transactions_url(@bank_account), alert: t('errors.general_msg', msg: error.message)
end end
@ -18,10 +18,10 @@ class Finance::BankAccountsController < Finance::BaseController
import_method = @bank_account.find_import_method import_method = @bank_account.find_import_method
if import_method if import_method
count = import_method.call(@bank_account) count = import_method.call(@bank_account)
redirect_to finance_bank_account_transactions_url(@bank_account), notice: t('finance.bank_accounts.controller.import.notice', count: count) redirect_to finance_bank_account_transactions_url(@bank_account), notice: t('.notice', count: count)
else else
# @todo add import for csv files as fallback # @todo add import for csv files as fallback
redirect_to finance_bank_account_transactions_url(@bank_account), alert: t('finance.bank_accounts.controller.import.no_import_method') redirect_to finance_bank_account_transactions_url(@bank_account), alert: t('.no_import_method')
end end
rescue => error rescue => error
redirect_to finance_bank_account_transactions_url(@bank_account), alert: t('errors.general_msg', msg: error.message) redirect_to finance_bank_account_transactions_url(@bank_account), alert: t('errors.general_msg', msg: error.message)

View file

@ -41,7 +41,7 @@ class Finance::FinancialLinksController < Finance::BaseController
bank_transaction = BankTransaction.find(params[:bank_transaction]) bank_transaction = BankTransaction.find(params[:bank_transaction])
bank_transaction.update_attribute :financial_link, @financial_link bank_transaction.update_attribute :financial_link, @financial_link
end end
redirect_to finance_link_url(@financial_link), notice: I18n.t('finance.bank_transactions.controller.create.notice') redirect_to finance_link_url(@financial_link), notice: t('.notice')
end end
def index_bank_transaction def index_bank_transaction
@ -51,13 +51,13 @@ class Finance::FinancialLinksController < Finance::BaseController
def add_bank_transaction def add_bank_transaction
bank_transaction = BankTransaction.find(params[:bank_transaction]) bank_transaction = BankTransaction.find(params[:bank_transaction])
bank_transaction.update_attribute :financial_link, @financial_link bank_transaction.update_attribute :financial_link, @financial_link
redirect_to finance_link_url(@financial_link), notice: I18n.t('finance.bank_transactions.controller.create.notice') redirect_to finance_link_url(@financial_link), notice: t('.notice')
end end
def remove_bank_transaction def remove_bank_transaction
bank_transaction = BankTransaction.find(params[:bank_transaction]) bank_transaction = BankTransaction.find(params[:bank_transaction])
bank_transaction.update_attribute :financial_link, nil bank_transaction.update_attribute :financial_link, nil
redirect_to finance_link_url(@financial_link), notice: I18n.t('finance.bank_transactions.controller.destroy.notice') redirect_to finance_link_url(@financial_link), notice: t('.notice')
end end
def index_financial_transaction def index_financial_transaction
@ -67,13 +67,13 @@ class Finance::FinancialLinksController < Finance::BaseController
def add_financial_transaction def add_financial_transaction
financial_transaction = FinancialTransaction.find(params[:financial_transaction]) financial_transaction = FinancialTransaction.find(params[:financial_transaction])
financial_transaction.update_attribute :financial_link, @financial_link financial_transaction.update_attribute :financial_link, @financial_link
redirect_to finance_link_url(@financial_link), notice: I18n.t('finance.financial_transactions.controller.create.notice') redirect_to finance_link_url(@financial_link), notice: t('.notice')
end end
def remove_financial_transaction def remove_financial_transaction
financial_transaction = FinancialTransaction.find(params[:financial_transaction]) financial_transaction = FinancialTransaction.find(params[:financial_transaction])
financial_transaction.update_attribute :financial_link, nil financial_transaction.update_attribute :financial_link, nil
redirect_to finance_link_url(@financial_link), notice: I18n.t('finance.financial_transactions.controller.destroy.notice') redirect_to finance_link_url(@financial_link), notice: t('.notice')
end end
def index_invoice def index_invoice
@ -83,13 +83,13 @@ class Finance::FinancialLinksController < Finance::BaseController
def add_invoice def add_invoice
invoice = Invoice.find(params[:invoice]) invoice = Invoice.find(params[:invoice])
invoice.update_attribute :financial_link, @financial_link invoice.update_attribute :financial_link, @financial_link
redirect_to finance_link_url(@financial_link), notice: I18n.t('finance.financial_transactions.controller.create.notice') redirect_to finance_link_url(@financial_link), notice: t('.notice')
end end
def remove_invoice def remove_invoice
invoice = Invoice.find(params[:invoice]) invoice = Invoice.find(params[:invoice])
invoice.update_attribute :financial_link, nil invoice.update_attribute :financial_link, nil
redirect_to finance_link_url(@financial_link), notice: I18n.t('finance.financial_transactions.controller.destroy.notice') redirect_to finance_link_url(@financial_link), notice: t('.notice')
end end
protected protected

View file

@ -2,7 +2,7 @@
- content_for :actionbar do - content_for :actionbar do
= link_to t('.assign_unlinked_transactions'), assign_unlinked_transactions_finance_bank_account_path(@bank_account), class: 'btn' = link_to t('.assign_unlinked_transactions'), assign_unlinked_transactions_finance_bank_account_path(@bank_account), class: 'btn'
= link_to t('.import_transaction'), import_finance_bank_account_path(@bank_account), class: 'btn btn-primary' = link_to t('.import_transactions'), import_finance_bank_account_path(@bank_account), class: 'btn btn-primary'
.well.well-small .well.well-small
= form_tag finance_bank_account_transactions_path, :method => :get, :remote => true, = form_tag finance_bank_account_transactions_path, :method => :get, :remote => true,

View file

@ -1,6 +1,6 @@
.modal-header .modal-header
= close_button :modal = close_button :modal
%h3= t('.add_invoice') %h3= t('.title')
.modal-body .modal-body
%table.table.table-striped %table.table.table-striped
%thead %thead

View file

@ -1,6 +1,6 @@
.modal-header .modal-header
= close_button :modal = close_button :modal
%h3= t('.add_invoice') %h3= t('.title')
.modal-body .modal-body
%table.table.table-striped %table.table.table-striped
%thead %thead

View file

@ -1,6 +1,6 @@
.modal-header .modal-header
= close_button :modal = close_button :modal
%h3= t('.add_invoice') %h3= t('.title')
.modal-body .modal-body
%table.table.table-striped %table.table.table-striped
%thead %thead

View file

@ -30,6 +30,19 @@ de:
price: Nettopreis price: Nettopreis
tax: MwSt tax: MwSt
unit_quantity: Gebindegröße unit_quantity: Gebindegröße
bank_account:
balance: Kontostand
description: Beschreibung
iban: IBAN
name: Name
bank_transaction:
amount: Betrag
date: Datum
external_id: Externe ID
financial_link: Finanzlink
iban: IBAN
reference: Zahlungsreferenz
text: Beschreibung
delivery: delivery:
delivered_on: Lieferdatum delivered_on: Lieferdatum
note: Notiz note: Notiz
@ -42,13 +55,13 @@ de:
financial_transaction: financial_transaction:
amount: Betrag amount: Betrag
created_on: Datum created_on: Datum
financial_transaction_class: Finanztransaktionsklasse financial_transaction_class: Kontotransaktionsklasse
financial_transaction_type: Finanztransaktionstyp financial_transaction_type: Kontotransaktionstyp
note: Notiz note: Notiz
ordergroup: Bestellgruppe ordergroup: Bestellgruppe
user: Eingetragen von user: Eingetragen von
financial_transaction_type: financial_transaction_type:
financial_transaction_class: Finanztransaktionsklasse financial_transaction_class: Kontotransaktionsklasse
name_short: Kurzname name_short: Kurzname
group_order: group_order:
ordergroup: Bestellgruppe ordergroup: Bestellgruppe
@ -72,6 +85,7 @@ de:
deliveries: Lieferung deliveries: Lieferung
deposit: Pfand berechnet deposit: Pfand berechnet
deposit_credit: Pfand gutgeschrieben deposit_credit: Pfand gutgeschrieben
financial_link: Finanzlink
net_amount: Pfandbereinigter Betrag net_amount: Pfandbereinigter Betrag
note: Notiz note: Notiz
number: Nummer number: Nummer
@ -203,10 +217,11 @@ de:
models: models:
article: Artikel article: Artikel
article_category: Kategorie article_category: Kategorie
bank_transaction: Banktransaktion
delivery: Lieferung delivery: Lieferung
financial_transaction: Kontotransaktion financial_transaction: Kontotransaktion
financial_transaction_class: Finanztransaktionsklasse financial_transaction_class: Kontotransaktionsklasse
financial_transaction_type: Finanztransaktionstyp financial_transaction_type: Kontotransaktionstyp
invoice: Rechnung invoice: Rechnung
order: Bestellung order: Bestellung
order_article: Bestell-Artikel order_article: Bestell-Artikel
@ -262,19 +277,22 @@ de:
confirm: Bist Du sicher? confirm: Bist Du sicher?
finances: finances:
index: index:
first_paragraph: Hier kannst du die Finanztransaktionsklassen und die dazugehörigen Finanztransaktionstypen verwalten. Jede Finanztansaktion hat einen bestimmten Typ, den du bei jeder Transaktion auswählen muss, falls du mehr als einen Typ angelegt hast. Die Finanztransaktionsklassen können zur Gruppierung der Finanztransaktionstypen verwendet werden und werden in der Kontoübersicht als weitere Spalten angezeigt, falls mehrere angelegt wurden. bank_accounts: Bankkonten
new_financial_transaction_class: Neue Finanztransaktionsklasse anlegen first_paragraph: Hier kannst du die Kontotransaktionsklassen und die dazugehörigen Kontotransaktionstypen verwalten. Jede Finanztansaktion hat einen bestimmten Typ, den du bei jeder Transaktion auswählen muss, falls du mehr als einen Typ angelegt hast. Die Kontotransaktionsklassen können zur Gruppierung der Kontotransaktionstypen verwendet werden und werden in der Kontoübersicht als weitere Spalten angezeigt, falls mehrere angelegt wurden.
new_bank_account: Neues Bankkonto anlegen
new_financial_transaction_class: Neue Kontotransaktionsklasse anlegen
title: Finanzen title: Finanzen
transaction_types: Kontotransaktionstypen
transaction_types: transaction_types:
new_financial_transaction_type: Neuen Finanztransaktionstyp anlegen new_financial_transaction_type: Neuen Kontotransaktionstyp anlegen
financial_transaction_classes: financial_transaction_classes:
form: form:
title_edit: Finanztransaktionsklasse bearbeiten title_edit: Kontotransaktionsklasse bearbeiten
title_new: Finanztransaktionsklasse anlegen title_new: Kontotransaktionsklasse anlegen
financial_transaction_types: financial_transaction_types:
form: form:
title_edit: Finanztransaktionstyp bearbeiten title_edit: Kontotransaktionstyp bearbeiten
title_new: Finanztransaktionstyp anlegen title_new: Kontotransaktionstyp anlegen
mail_delivery_status: mail_delivery_status:
destroy_all: destroy_all:
notice: Alle E-Mail Probleme wurden gelöscht notice: Alle E-Mail Probleme wurden gelöscht
@ -747,11 +765,58 @@ de:
reload: Zusammenfassung neu laden reload: Zusammenfassung neu laden
with_extra_charge: 'mit Aufschlag:' with_extra_charge: 'mit Aufschlag:'
without_extra_charge: 'ohne Aufschlag:' without_extra_charge: 'ohne Aufschlag:'
bank_accounts:
assign_unlinked_transactions:
notice: 'Es wurden %{count} Transaktionen zugeordnet.'
import:
notice: 'Es wurden %{count} neue Transaktionen importiert.'
no_import_method: Für dieses Bankkonto ist keine Importmethode konfiguriert.
index:
title: Bankkonten
bank_transactions:
index:
assign_unlinked_transactions: Transaktionen zuordenen
import_transactions: Importieren
title: Banktransaktionen für %{name} (%{balance})
show:
add_financial_link: Finanzlink hinzufügen
belongs_to_supplier: gehört zu Lieferant_in
belongs_to_user: gehört zu Benutzer_in
in_ordergroup: in Bestellgruppe
transactions:
add_financial_link: Hinzufügen
create: create:
notice: Rechnung wurde erstellt. notice: Rechnung wurde erstellt.
financial_links: financial_links:
add_bank_transaction:
notice: Verlinkung wurde zu der Banktransaktion wurde hinzugefügt.
add_financial_transaction:
notice: Verlinkung wurde zu der Kontotransaktion wurde hinzugefügt.
add_invoice:
notice: Verlinkung wurde zu der Rechnung wurde hinzugefügt.
create:
notice: Ein neuer Finanzlink wurde erstellt.
index_bank_transaction:
title: Banktransaktion hinzufügen
index_financial_transaction:
title: Kontotransaktion hinzufügen
index_invoice:
title: Rechnung hinzufügen
remove_bank_transaction:
notice: Verlinkung wurde zu der Banktransaktion wurde entfernt.
remove_financial_transaction:
notice: Verlinkung wurde zu der Kontotransaktion wurde entfernt.
remove_invoice:
notice: Verlinkung wurde zu der Rechnung wurde entfernt.
show: show:
add_bank_transaction: Banktransaktion hinzufügen
add_financial_transaction: Kontotransaktion hinzufügen
add_invoice: Rechnung hinzufügen
amount: Betrag
date: Datum
description: Beschreibung
title: Finanzlink %{number} title: Finanzlink %{number}
type: Typ
financial_transactions: financial_transactions:
controller: controller:
create: create:
@ -767,7 +832,7 @@ de:
title: Kontoauszug für %{name} title: Kontoauszug für %{name}
index_collection: index_collection:
show_groups: Konten verwalten show_groups: Konten verwalten
title: Finanztransaktionen title: Kontotransaktionen
new: new:
paragraph: Hier kannst du der Bestellgruppe <b>%{name}</b> Geld gutschreiben/abziehen. paragraph: Hier kannst du der Bestellgruppe <b>%{name}</b> Geld gutschreiben/abziehen.
title: Neue Transaktion title: Neue Transaktion
@ -1157,7 +1222,7 @@ de:
delivery: delivery:
each_stock_article_must_be_unique: Lieferung darf jeden Lagerartikel höchstens einmal auflisten. each_stock_article_must_be_unique: Lieferung darf jeden Lagerartikel höchstens einmal auflisten.
financial_transaction_type: financial_transaction_type:
no_delete_last: Es muss mindestens ein Finanztransaktionstyp existieren. no_delete_last: Es muss mindestens ein Kontotransaktionstyp existieren.
group_order: group_order:
stock_ordergroup_name: Lager (%{user}) stock_ordergroup_name: Lager (%{user})
invoice: invoice:
@ -1187,6 +1252,7 @@ de:
finances: finances:
accounts: Konten verwalten accounts: Konten verwalten
balancing: Bestellungen abrechnen balancing: Bestellungen abrechnen
bank_accounts: Bankkonten
home: Übersicht home: Übersicht
invoices: Rechnungen invoices: Rechnungen
title: Finanzen title: Finanzen

View file

@ -33,6 +33,19 @@ en:
price: Price (net) price: Price (net)
tax: VAT tax: VAT
unit_quantity: Unit quantity unit_quantity: Unit quantity
bank_account:
balance: Balance
description: Description
iban: IBAN
name: Name
bank_transaction:
amount: Amount
date: Date
external_id: External ID
financial_link: Financial link
iban: IBAN
reference: Referenz
text: Description
delivery: delivery:
delivered_on: Delivery date delivered_on: Delivery date
note: Note note: Note
@ -79,6 +92,7 @@ en:
deliveries: Delivery deliveries: Delivery
deposit: Deposit charged deposit: Deposit charged
deposit_credit: Deposit returned deposit_credit: Deposit returned
financial_link: Financial link
net_amount: Amount adjusted for refund net_amount: Amount adjusted for refund
note: Note note: Note
number: Number number: Number
@ -280,9 +294,12 @@ en:
confirm: Are you sure? confirm: Are you sure?
finances: finances:
index: index:
bank_accounts: Bank accounts
first_paragraph: Here you can manage the financial transaction classes and the corresponding financial transaction types. Every financial transaction has a type, which you have to select at every transaction, if you created more than one type. The financial transaction classes can be use to group the financial transaction types and will be shown as additional columns in the account overview, if there have been created more than one. first_paragraph: Here you can manage the financial transaction classes and the corresponding financial transaction types. Every financial transaction has a type, which you have to select at every transaction, if you created more than one type. The financial transaction classes can be use to group the financial transaction types and will be shown as additional columns in the account overview, if there have been created more than one.
new_bank_account: Add new bank account
new_financial_transaction_class: Add new financial transaction class new_financial_transaction_class: Add new financial transaction class
title: Finances title: Finances
transaction_types: Financial transaction types
transaction_types: transaction_types:
name: Name name: Name
new_financial_transaction_type: Add new financial transaction type new_financial_transaction_type: Add new financial transaction type
@ -774,26 +791,57 @@ en:
with_extra_charge: 'with extra charge:' with_extra_charge: 'with extra charge:'
without_extra_charge: 'without extra charge:' without_extra_charge: 'without extra charge:'
bank_accounts: bank_accounts:
controller: assign_unlinked_transactions:
assign: notice: '%{count} transactions have been assigned'
notice: '%{count} transactions have been assigned' import:
import: notice: '%{count} new transactions have been imported'
notice: '%{count} new transactions have been imported' no_import_method: For this bank account no import method is configured.
index: index:
account_statement: Account statement
title: Bank Accounts title: Bank Accounts
bank_transactions: bank_transactions:
index: index:
assign_unlinked_transactions: Assign transactions
import_transactions: Import
title: Bank transactions for %{name} (%{balance}) title: Bank transactions for %{name} (%{balance})
show: show:
add_financial_link: Add financial link
belongs_to_supplier: belongs to supplier belongs_to_supplier: belongs to supplier
belongs_to_user: belongs to user belongs_to_user: belongs to user
in_ordergroup: in ordergroup in_ordergroup: in ordergroup
transactions:
add_financial_link: Add link
create: create:
notice: Invoice was created. notice: Invoice was created.
financial_links: financial_links:
add_bank_transaction:
notice: Link to the bank transaction has been added.
add_financial_transaction:
notice: Link to the financial transaction has been added.
add_invoice:
notice: Link to the invoice has been added.
create:
notice: A new financial link has been created.
index_bank_transaction:
title: Add bank transaction
index_financial_transaction:
title: Add financial transaction
index_invoice:
title: Add invoice
remove_bank_transaction:
notice: Link to the bank transaction has been removed.
remove_financial_transaction:
notice: Link to the financial transaction has been removed.
remove_invoice:
notice: Link to the invoice has been removed.
show: show:
add_bank_transaction: Add bank transaction
add_financial_transaction: Add financial transaction
add_invoice: Add invoice
amount: Amount
date: Date
description: Description
title: Financial link %{number} title: Financial link %{number}
type: Type
financial_transactions: financial_transactions:
controller: controller:
create: create: