From b8a0abd12230c5e56734f53d316a174769470fc7 Mon Sep 17 00:00:00 2001 From: maxwell Date: Thu, 16 Dec 2010 18:06:59 -0800 Subject: [PATCH] updating notification views --- app/helpers/notifications_helper.rb | 21 +++++++-------------- app/views/notifications/index.html.haml | 1 - config/locales/diaspora/en.yml | 10 +++------- 3 files changed, 10 insertions(+), 22 deletions(-) diff --git a/app/helpers/notifications_helper.rb b/app/helpers/notifications_helper.rb index a7c74d516..eb41e2cce 100644 --- a/app/helpers/notifications_helper.rb +++ b/app/helpers/notifications_helper.rb @@ -1,21 +1,14 @@ module NotificationsHelper - def glue_text(kind) - translation = "notifications.#{kind.underscore}_glue" - t(translation) - end - def object_link(note) - kind = note.kind.underscore - translation = t("notifications.#{kind.underscore}_link") + kind = note.kind + translation = t("notifications.#{kind}") case kind - when 'request' - link_to translation, aspects_manage_path - when 'status_message' - link_to translation, status_message_path(note.object_id) - when 'comment' + when 'request_accepted' + translation + when 'new_request' + translation + when 'comment_on_post' link_to translation, object_path(Comment.first(:id => object_id).post) - when 'photo' - link_to translation, photo_path(note.object_id) else end end diff --git a/app/views/notifications/index.html.haml b/app/views/notifications/index.html.haml index 35c44d3ef..333bc035b 100644 --- a/app/views/notifications/index.html.haml +++ b/app/views/notifications/index.html.haml @@ -2,5 +2,4 @@ - @notifications.each do |note| %li = link_to "#{note.person.name.titleize}", person_path(note.person) - = glue_text(note.kind) = object_link(note) diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 6b8194dcc..553da1bef 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -179,13 +179,9 @@ en: confirm_remove_aspect: "Are you sure you want to delete this aspect?" add_existing: "Add an existing contact" notifications: - status_message_glue: "posted a new" - status_message_link: "message" - request_glue: "sent you a contact request" - request_link: "request" - comment_glue: "commented on your" - comment_link: "post" - also_commnet_glue: "commented on your contact's" + request_accepted: "accepted your share request." + new_request: "offered to share with you." + comment_on_post: "commented on your post" users: edit: export_data: "Export Data"