diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 309ea8438a4d0c1942ab8b1aa116a798c158e2a5..8fb6647d4443c36c337ce6f24cb92fecd4236efd 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -32,7 +32,7 @@ module ApplicationHelper def aspect_badge aspects str = '' if aspects.count > 1 - str = "<span class='aspect_badge all'>All aspects</span>" + str = "<span class='aspect_badge all'>#{I18n.t('application.helper.aspect_badge.all_aspects')}</span>" elsif aspects.count == 1 aspect = aspects.first str = "<span class='aspect_badge single'><a href=#{aspect_path(aspect)}>#{aspect.name}</a></span>" @@ -93,7 +93,7 @@ module ApplicationHelper end def how_long_ago(obj) - "#{time_ago_in_words(obj.created_at, true)} #{t('ago')}" + I18n.t('ago', :time => time_ago_in_words(obj.created_at, true)) end def person_url(person) diff --git a/app/views/comments/_comment.html.haml b/app/views/comments/_comment.html.haml index 2b0298c815746e8c6c1bccc224456df5537f75a3..62f05b193608c5d57ee40f282f2cc331bf87e338 100644 --- a/app/views/comments/_comment.html.haml +++ b/app/views/comments/_comment.html.haml @@ -10,5 +10,5 @@ =person_link(person) = markdownify(comment.text, :youtube_maps => comment[:youtube_titles]) %div.time - = comment.created_at ? "#{time_ago_in_words(comment.created_at)} #{t('ago')}" : time_ago_in_words(Time.now) + = comment.created_at ? t('ago', :time => time_ago_in_words(comment.created_at)) : time_ago_in_words(Time.now) diff --git a/app/views/people/_profile_sidebar.html.haml b/app/views/people/_profile_sidebar.html.haml index c8ec15c839e9921af39f646f78f3684977706aff..a695881d3b14324b5cb24bdb7593dfc4ae23bafe 100644 --- a/app/views/people/_profile_sidebar.html.haml +++ b/app/views/people/_profile_sidebar.html.haml @@ -47,5 +47,5 @@ .span-4.last %h3 #{t('.born')} - = "#{time_ago_in_words(person.profile.birthday)} #{t('ago')}" if @person.profile.birthday + = t('ago', :time => time_ago_in_words(person.profile.birthday)) if @person.profile.birthday diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index f09c81436d5b7847b0833755027ae3dac6bf4d23..4f42bb26105421da0a5230042fa9c618d464924c 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -15,7 +15,7 @@ en: cancel: "Cancel" delete: "Delete" or: "or" - ago: "ago" + ago: "%{time} ago" username: "Username" email: "Email" password: "Password" @@ -58,6 +58,8 @@ en: unknown_person: "unknown person" youtube_title: unknown: "Unknown Video Title" + aspect_badge: + all_aspects: "All aspects" error_messages: helper: invalid_fields: "Invalid Fields"