diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 2aaf9a3..10425f9 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1217,15 +1217,12 @@ module ApplicationHelper else _('1 minute') end - when 2..44 then _('%{distance} minutes') % { :distance => distance_in_minutes } - when 45..89 then _('about 1 hour') - when 90..1439 then _('about %{distance} hours') % { :distance => (distance_in_minutes.to_f / 60.0).round } - when 1440..2879 then _('1 day') - when 2880..43199 then _('%{distance} days') % { :distance => (distance_in_minutes / 1440).round } - when 43200..86399 then _('about 1 month') - when 86400..525599 then _('%{distance} months') % { :distance => (distance_in_minutes / 43200).round } - when 525600..1051199 then _('about 1 year') - else _('over %{distance} years') % { :distance => (distance_in_minutes / 525600).round } + when 2..44 then _('%{distance} minutes ago') % { :distance => distance_in_minutes } + when 45..89 then _('about 1 hour ago') + when 90..1439 then _('about %{distance} hours ago') % { :distance => (distance_in_minutes.to_f / 60.0).round } + when 1440..2879 then _('1 day ago') + when 2880..10079 then _('%{distance} days ago') % { :distance => (distance_in_minutes / 1440).round } + else show_time(from_time) end end diff --git a/app/helpers/forum_helper.rb b/app/helpers/forum_helper.rb index bf0e873..d7e0d3e 100644 --- a/app/helpers/forum_helper.rb +++ b/app/helpers/forum_helper.rb @@ -42,9 +42,9 @@ module ForumHelper def last_topic_update(article) info = article.info_from_last_update if info[:author_url] - time_ago_as_sentence(info[:date]) + ' ' + _('ago') + ' ' + _('by') + ' ' + link_to(info[:author_name], info[:author_url]) + time_ago_as_sentence(info[:date]) + ' ' + _('by') + ' ' + link_to(info[:author_name], info[:author_url]) else - time_ago_as_sentence(info[:date]) + ' ' + _('ago') + ' ' + _('by') + ' ' + info[:author_name] + time_ago_as_sentence(info[:date]) + ' ' + _('by') + ' ' + info[:author_name] end end diff --git a/app/views/profile/_create_article.rhtml b/app/views/profile/_create_article.rhtml index 6254a55..d008103 100644 --- a/app/views/profile/_create_article.rhtml +++ b/app/views/profile/_create_article.rhtml @@ -8,7 +8,7 @@
<%= image_tag(activity.params['first_image']) unless activity.params['first_image'].blank? %><%= strip_tags(activity.params['lead']).gsub(/(\xA0|\xC2|\s)+/, ' ').gsub(/^\s+/, '') %> <%= link_to(_('See more'), activity.params['url']) unless activity.get_lead.blank? %> <%= content_tag(:p, link_to(_('See complete forum'), activity.get_url), :class => 'see-forum') if activity.target.is_a?(Forum) %> -

<%= time_ago_as_sentence(activity.created_at) + ' ' + _('ago') %>

+

<%= time_ago_as_sentence(activity.created_at) %>

<%= link_to _('Comment'), "#reply_content_#{activity.id}" %> <%= link_to_remote(content_tag(:span, _('Remove')), :url =>{:action => 'remove_activity', :activity_id => activity.id}, :confirm => _('Are you sure?'), :update => "profile-activity-item-#{activity.id}") if logged_in? && current_person == @profile %> diff --git a/app/views/profile/_default_activity.rhtml b/app/views/profile/_default_activity.rhtml index 000264d..91bc4f3 100644 --- a/app/views/profile/_default_activity.rhtml +++ b/app/views/profile/_default_activity.rhtml @@ -3,7 +3,7 @@

<%= link_to activity.user.name, activity.user.url %> <%= describe activity %>

-

<%= time_ago_as_sentence(activity.created_at) + ' ' + _('ago') %>

+

<%= time_ago_as_sentence(activity.created_at) %>

<%= link_to _('Comment'), "#reply_content_#{activity.id}" %> <%= link_to_remote(content_tag(:span, _('Remove')), :confirm => _('Are you sure?'), :url =>{:action => 'remove_activity', :activity_id => activity.id}, :update => "profile-activity-item-#{activity.id}") if logged_in? && current_person == @profile %> diff --git a/app/views/profile/_profile_scrap.rhtml b/app/views/profile/_profile_scrap.rhtml index 8090f98..598f911 100644 --- a/app/views/profile/_profile_scrap.rhtml +++ b/app/views/profile/_profile_scrap.rhtml @@ -5,7 +5,7 @@ <% comment_balloon :class => 'profile-activity-description' do %>

<%= link_to scrap.sender.name, scrap.sender.url %>

<%= txt2html scrap.content %>

-

<%= time_ago_as_sentence(scrap.created_at) + ' ' + _('ago') %>

+

<%= time_ago_as_sentence(scrap.created_at) %>

<% if logged_in? && current_person.follows?(scrap.sender) %> <%= link_to_function _('Comment'), "hide_and_show(['#profile-activity-reply-response-#{scrap.id}'],['#profile-activity-reply-#{scrap.id}', '#profile-activity-reply-form-#{scrap.id}']);$('reply_content_#{scrap.id}').value='';$('reply_content_#{scrap.id}').focus();$('scrap_id_#{scrap.id}').value='#{scrap.id}';return false", :class => "profile-send-reply" %> diff --git a/app/views/tasks/_abuse_complaint_accept_details.rhtml b/app/views/tasks/_abuse_complaint_accept_details.rhtml index 4e7dafc..0f678fa 100644 --- a/app/views/tasks/_abuse_complaint_accept_details.rhtml +++ b/app/views/tasks/_abuse_complaint_accept_details.rhtml @@ -2,7 +2,7 @@ <% task.abuse_reports.each do |abuse_report| %>
"<%= abuse_report.reason %>"
- <%= _('Reported by %{reporter} %{time}.') % {:reporter => abuse_report.reporter.name, :time => time_ago_as_sentence(abuse_report.created_at) + ' ' + _('ago')}%>
+ <%= _('Reported by %{reporter} %{time}.') % {:reporter => abuse_report.reporter.name, :time => time_ago_as_sentence(abuse_report.created_at) }%>
<% if !abuse_report.content.blank? %>