diff --git a/Gemfile b/Gemfile
index 48d238a..ef18075 100644
--- a/Gemfile
+++ b/Gemfile
@@ -86,3 +86,7 @@ gem "action_policy", "~> 0.7.1"
gem "pagy", "~> 9.0"
gem "csv", "~> 3.3"
+
+# Centralization of locale data collection for Ruby on Rails.
+# URL: https://github.com/svenfuchs/rails-i18n
+gem "rails-i18n", "~> 7.0"
diff --git a/Gemfile.lock b/Gemfile.lock
index 9955394..710e1d4 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -234,6 +234,9 @@ GEM
rails-html-sanitizer (1.6.0)
loofah (~> 2.21)
nokogiri (~> 1.14)
+ rails-i18n (7.0.9)
+ i18n (>= 0.7, < 2)
+ railties (>= 6.0.0, < 8)
railties (7.2.1)
actionpack (= 7.2.1)
activesupport (= 7.2.1)
@@ -379,6 +382,7 @@ DEPENDENCIES
puma (>= 5.0)
pwned
rails (~> 7.2.0, >= 7.2.0)
+ rails-i18n (~> 7.0)
redis (>= 4.0.1)
rubocop-rails-omakase
selenium-webdriver
diff --git a/app/views/admin/jobs/_job_tr.html.erb b/app/views/admin/jobs/_job_tr.html.erb
index 31ecd73..724cc6e 100644
--- a/app/views/admin/jobs/_job_tr.html.erb
+++ b/app/views/admin/jobs/_job_tr.html.erb
@@ -38,21 +38,13 @@
<% end %>
- <% if job.printing? %>
- <%= link_to edit_operator_job_path(job), target: "_top" do %>
-
- <%= job.costum_qm_plan.round(2) %> m²
-
- <% end %>
- <% else %>
-
- <%= job.costum_qm_plan.round(2) %> m²
-
- <% end %>
+
+ <%= number_with_delimiter job.costum_qm_plan.round(2) %> m²
+
|
- <%= job.cost %> €
+ <%= number_to_currency job.cost, locale: :de %>
|
diff --git a/app/views/jobs/_job_tr.html.erb b/app/views/jobs/_job_tr.html.erb
index 502116e..3b199db 100644
--- a/app/views/jobs/_job_tr.html.erb
+++ b/app/views/jobs/_job_tr.html.erb
@@ -40,12 +40,12 @@
|
- <%= job.costum_qm_plan.round(2) %> m²
+ <%= number_with_delimiter job.costum_qm_plan.round(2) %> m²
|
- <%= job.cost %> €
+ <%= number_to_currency job.cost, locale: :de %>
|
diff --git a/app/views/operator/jobs/_job_tr.html.erb b/app/views/operator/jobs/_job_tr.html.erb
index bf32a74..d7002c1 100644
--- a/app/views/operator/jobs/_job_tr.html.erb
+++ b/app/views/operator/jobs/_job_tr.html.erb
@@ -52,18 +52,18 @@
<% if job.printing? %>
<%= link_to edit_operator_job_path(job) do %>
- <%= job.costum_qm_plan.round(2) %> m²
+ <%= number_with_delimiter job.costum_qm_plan.round(2) %> m²
<% end %>
<% else %>
- <%= job.costum_qm_plan.round(2) %> m²
+ <%= number_with_delimiter job.costum_qm_plan.round(2) %> m²
<% end %>
|
- <%= job.cost %> €
+ <%= number_to_currency job.cost, locale: :de %>
|
diff --git a/config/application.rb b/config/application.rb
index 71a814e..86c7ee4 100644
--- a/config/application.rb
+++ b/config/application.rb
@@ -24,6 +24,7 @@ module Plottservice
# config.time_zone = "Central Time (US & Canada)"
# config.eager_load_paths << Rails.root.join("extras")
- # config.i18n.default_locale = :de
+ config.i18n.available_locales = [ :en, :de ]
+ config.i18n.default_locale = :de
end
end
diff --git a/config/locales/de.yml b/config/locales/de.yml
index 75c67a5..8c9c9b7 100644
--- a/config/locales/de.yml
+++ b/config/locales/de.yml
@@ -31,10 +31,15 @@ de:
activerecord:
attributes:
job:
- pdf: "PDF Dokument"
+ pdf: "Plan (PDF Format)"
+ privacy_policy: "Datenschutzerklärung"
+ costumer_firstname: "Vorname"
+ costumer_lastname: "Nachname"
errors:
models:
job:
attributes:
pdf:
blank: "is erforderlich"
+
+
|