diff --git a/app/controllers/login_controller.rb b/app/controllers/login_controller.rb
index 3aab74c5..43ca5fdf 100644
--- a/app/controllers/login_controller.rb
+++ b/app/controllers/login_controller.rb
@@ -11,7 +11,7 @@ class LoginController < ApplicationController
# Sends an email to a user with the token that allows setting a new password through action "password".
def reset_password
if request.get? || params[:user].nil? # Catch for get request and give better error message.
- redirect_to forgot_password_url, alert: 'Ein Problem ist aufgetreten. Bitte erneut versuchen' and return
+ redirect_to forgot_password_url, alert: I18n.t('errors.general_again') and return
end
if (user = User.find_by_email(params[:user][:email]))
diff --git a/app/views/articles/sync.html.haml b/app/views/articles/sync.html.haml
index 4fe32a3c..58273178 100644
--- a/app/views/articles/sync.html.haml
+++ b/app/views/articles/sync.html.haml
@@ -11,8 +11,7 @@
= hidden_field_tag "outlisted_articles[#{article.id}]", '1'
= article.name
- if article.in_open_order
- .alert
- Achtung, #{article.name} wird gerade in einer laufenden Bestellung verwendet. Bitte erst Bestellung anpassen.
+ .alert= t '.alert_used', article: article.name
- else
%i= t '.outlist.body_skip'
%hr/
diff --git a/app/views/finance/group_order_articles/_form.html.haml b/app/views/finance/group_order_articles/_form.html.haml
index f606e3ac..8b6d41a0 100644
--- a/app/views/finance/group_order_articles/_form.html.haml
+++ b/app/views/finance/group_order_articles/_form.html.haml
@@ -5,7 +5,7 @@
%h3= t('.amount_change_for', article: @order_article.article.name)
.modal-body
= form.input :ordergroup_id, as: :select, collection: Ordergroup.all.map { |g| [g.name, g.id] }
- = form.input :result, hint: "Einheit: #{@order_article.article.unit}"
+ = form.input :result, hint: I18n.t('.result_hint', unit: @order_article.article.unit)
.modal-footer
= link_to t('ui.close'), '#', class: 'btn', data: {dismiss: 'modal'}
= form.submit t('ui.save'), class: 'btn btn-primary'
diff --git a/app/views/finance/order_articles/_edit.html.haml b/app/views/finance/order_articles/_edit.html.haml
index 3c63807e..0dddf8cd 100644
--- a/app/views/finance/order_articles/_edit.html.haml
+++ b/app/views/finance/order_articles/_edit.html.haml
@@ -11,7 +11,7 @@
= f.input :unit
- if @order_article.article.is_a?(StockArticle)
- %div.alert Preise von Lagerartikeln können nicht geändert werden!
+ %div.alert= t '.stock_alert'
- else
= simple_fields_for :article_price, @order_article.article_price do |f|
= f.input :unit_quantity
diff --git a/app/views/tasks/show.haml b/app/views/tasks/show.haml
index 8777d15d..644151fa 100644
--- a/app/views/tasks/show.haml
+++ b/app/views/tasks/show.haml
@@ -30,7 +30,7 @@
- unless @task.done?
= link_to t('.mark_done'), set_done_task_path(@task), method: :post, class: 'btn'
= link_to t('ui.edit'), edit_task_path(@task), class: 'btn'
- = link_to t('ui.delete'), task_path(@task), :method => :delete, :confirm => "Die Aufgabe wirklich löschen?",
+ = link_to t('ui.delete'), task_path(@task), :method => :delete, :confirm => t('.confirm_delete_single'),
class: 'btn btn-danger'
- if @task.periodic?
= link_to t('.delete_group'), task_path(@task, periodic: true), method: :delete,
diff --git a/config/locales/de.yml b/config/locales/de.yml
index 893739d6..8886d93e 100644
--- a/config/locales/de.yml
+++ b/config/locales/de.yml
@@ -313,6 +313,7 @@ de:
title:
sync:
outlist:
+ alert_used: Achtung, %{article} wird gerade in einer laufenden Bestellung verwendet. Bitte erst Bestellung anpassen.
body: ! 'Folgende Artikel wurden ausgelistet und werden gelöscht:'
body_skip: Es müssen keine Artikel gelöscht werden.
title: Auslisten ...
@@ -686,6 +687,7 @@ de:
group_order_articles:
form:
amount_change_for: Mengenänderung für %{article}
+ result_hint: 'Einheit: %{unit}'
index:
amount: Betrag
amount_fc: Betrag(FC)
@@ -722,6 +724,7 @@ de:
order_articles:
edit:
title: Artikel aktualisieren
+ stock_alert: Preise von Lagerartikeln können nicht geändert werden!
new:
title: Neuer gelieferter Artikel die Bestellung
ordergroups:
@@ -1861,6 +1864,7 @@ de:
notice: Aufgabenstatus wurde aktualisiert
show:
accept_task: Aufgabe übernehmen
+ confirm_delete_single: Die Aufgabe wirklich löschen?
confirm_delete_group: Diese und alle folgenden wöchentlichen Aufgaben wirklich löschen?
delete_group: Aufgabe und folgende löschen
due_date: Fälligkeitsdatum
diff --git a/config/locales/en.yml b/config/locales/en.yml
index 790df83e..391291ee 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -324,6 +324,7 @@ en:
title: Upload articles
sync:
outlist:
+ alert_used: Warning, %{article} is used in an open order. Please remove it from the order first.
body: ! 'The following articles were removed from the list and will be deleted:'
body_skip: No articles to delete.
title: Remove from list ...