Project

General

Profile

Defect #5378 » i18n.patch

unzipped version of Alain's patch - Felix Schäfer, 2010-04-30 14:33

View differences:

i18n.rb (working copy)
time = time.to_time if time.is_a?(String)
zone = User.current.time_zone
local = zone ? time.in_time_zone(zone) : (time.utc? ? time.localtime : time)
Setting.time_format.blank? ? ::I18n.l(local, :format => (include_date ? :default : :time)) :
((include_date ? "#{format_date(time)} " : "") + "#{local.strftime(Setting.time_format)}")
if Setting.time_format.blank?
if include_date
Setting.date_format.blank? ?
::I18n.l(local, :format => :default) :
local.strftime(Setting.date_format+' '+::I18n.t(:'time.formats.time'))
else
::I18n.l(local, :format => :time)
end
else
if include_date
Setting.date_format.blank? ?
::I18n.l(local, :format => ::I18n.t(:'date.formats.default')+' '+Setting.time_format) :
local.strftime(Setting.date_format+' '+Setting.time_format)
else
local.strftime(Setting.time_format)
end
end
end
def day_name(day)
(2-2/4)