summaryrefslogtreecommitdiffstats
path: root/app/views/settings
diff options
context:
space:
mode:
authorEtienne Massip <etienne.massip@gmail.com>2012-06-16 21:45:47 +0000
committerEtienne Massip <etienne.massip@gmail.com>2012-06-16 21:45:47 +0000
commitdbdc9b9da7564eafd9d74aa9d664642193d9791d (patch)
treefeae1f5b26478f3a8fe847c6515e48ba1ae552ff /app/views/settings
parent2c07b478bb1e2954c44d9def732202a8edea9837 (diff)
downloadredmine-dbdc9b9da7564eafd9d74aa9d664642193d9791d.tar.gz
redmine-dbdc9b9da7564eafd9d74aa9d664642193d9791d.zip
Display dates using user's locale if available (#2190).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9838 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/views/settings')
-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>