Make date configurable via locales (#997)
This commit is contained in:
parent
64b99038e6
commit
075f3cfa1a
8 changed files with 20 additions and 2 deletions
|
@ -4,7 +4,7 @@ module ApplicationHelper
|
||||||
include PathHelper
|
include PathHelper
|
||||||
|
|
||||||
def format_time(time = Time.now)
|
def format_time(time = Time.now)
|
||||||
I18n.l(time, format: '%d.%m.%Y %H:%M') unless time.nil?
|
I18n.l(time, format: :foodsoft_datetime) unless time.nil?
|
||||||
end
|
end
|
||||||
|
|
||||||
def format_date(time = Time.now)
|
def format_date(time = Time.now)
|
||||||
|
|
1
config/initializers/time_formats.rb
Normal file
1
config/initializers/time_formats.rb
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Time::DATE_FORMATS[:foodsoft_datetime] = "%d.%m.%Y %H:%M"
|
|
@ -1876,3 +1876,6 @@ de:
|
||||||
title: Arbeitsgruppen
|
title: Arbeitsgruppen
|
||||||
update:
|
update:
|
||||||
notice: Arbeitsgruppe wurde aktualisiert
|
notice: Arbeitsgruppe wurde aktualisiert
|
||||||
|
time:
|
||||||
|
formats:
|
||||||
|
foodsoft_datetime: "%d.%m.%Y %H:%M"
|
||||||
|
|
|
@ -1903,3 +1903,6 @@ en:
|
||||||
title: Workgroups
|
title: Workgroups
|
||||||
update:
|
update:
|
||||||
notice: Workgroup was updated
|
notice: Workgroup was updated
|
||||||
|
time:
|
||||||
|
formats:
|
||||||
|
foodsoft_datetime: "%Y-%m-%d %H:%M"
|
||||||
|
|
|
@ -1618,3 +1618,6 @@ es:
|
||||||
title: Grupos de trabajo
|
title: Grupos de trabajo
|
||||||
update:
|
update:
|
||||||
notice: El grupo de trabajo se actualizó.
|
notice: El grupo de trabajo se actualizó.
|
||||||
|
time:
|
||||||
|
formats:
|
||||||
|
foodsoft_datetime: "%d/%b/%Y %H:%M"
|
||||||
|
|
|
@ -1375,3 +1375,6 @@ fr:
|
||||||
title: Équipes
|
title: Équipes
|
||||||
update:
|
update:
|
||||||
notice: L'équipe a été mise à jour
|
notice: L'équipe a été mise à jour
|
||||||
|
time:
|
||||||
|
formats:
|
||||||
|
foodsoft_datetime: "%d/%m/%Y %H:%M"
|
||||||
|
|
|
@ -1868,3 +1868,6 @@ nl:
|
||||||
title: Werkgroepen
|
title: Werkgroepen
|
||||||
update:
|
update:
|
||||||
notice: Werkgroep is bijgewerkt
|
notice: Werkgroep is bijgewerkt
|
||||||
|
time:
|
||||||
|
formats:
|
||||||
|
foodsoft_datetime: "%d-%m-%Y %H:%M"
|
||||||
|
|
|
@ -1903,4 +1903,6 @@ tr:
|
||||||
title: Çalışma Grupları
|
title: Çalışma Grupları
|
||||||
update:
|
update:
|
||||||
notice: Çalışma grubu güncellendi.
|
notice: Çalışma grubu güncellendi.
|
||||||
|
time:
|
||||||
|
formats:
|
||||||
|
foodsoft_datetime: "%d.%b.%Y %H:%M"
|
||||||
|
|
Loading…
Reference in a new issue