summaryrefslogtreecommitdiffstats
path: root/app/views/settings/_display.html.erb
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/settings/_display.html.erb')
-rw-r--r--app/views/settings/_display.html.erb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/views/settings/_display.html.erb b/app/views/settings/_display.html.erb
index 3299ff10b..2eb0e2560 100644
--- a/app/views/settings/_display.html.erb
+++ b/app/views/settings/_display.html.erb
@@ -6,10 +6,10 @@
<p><%= setting_select :default_language, lang_options_for_select(false) %></p>
<p><%= setting_select :start_of_week, [[day_name(1),'1'], [day_name(6),'6'], [day_name(7),'7']], :blank => :label_language_based %></p>
+<% locale = User.current.language.blank? ? ::I18n.locale : User.current.language %>
+<p><%= setting_select :date_format, Setting::DATE_FORMATS.collect {|f| [::I18n.l(Date.today, :locale => locale, :format => f), f]}, :blank => :label_language_based %></p>
-<p><%= setting_select :date_format, Setting::DATE_FORMATS.collect {|f| [Date.today.strftime(f), f]}, :blank => :label_language_based %></p>
-
-<p><%= setting_select :time_format, Setting::TIME_FORMATS.collect {|f| [Time.now.strftime(f), f]}, :blank => :label_language_based %></p>
+<p><%= setting_select :time_format, Setting::TIME_FORMATS.collect {|f| [::I18n.l(Time.now, :locale => locale, :format => f), f]}, :blank => :label_language_based %></p>
<p><%= setting_select :user_format, @options[:user_format] %></p>