From e7d2bcdaa950130a89c89e81b081d301f4147f44 Mon Sep 17 00:00:00 2001 From: James Smith Date: Tue, 20 Aug 2024 18:37:22 +0100 Subject: [PATCH] make create/update activity feed items translatable --- app/views/activities/_create_actor.html.erb | 6 +----- app/views/activities/_update_actor.html.erb | 6 +----- config/locales/en.yml | 2 ++ 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/app/views/activities/_create_actor.html.erb b/app/views/activities/_create_actor.html.erb index 6d87a82f7..bf28e0a9e 100644 --- a/app/views/activities/_create_actor.html.erb +++ b/app/views/activities/_create_actor.html.erb @@ -26,11 +26,7 @@ <% end %>
- added - <% if subject.entity != current_user %> - by <%= subject.name %> - <% end %> - <%= t("home.index.how_long_ago", time: time_ago_in_words(thing.created_at)) %> + <%= t("home.index.create_actor", time: time_ago_in_words(thing.created_at), name: subject.name) %>
diff --git a/app/views/activities/_update_actor.html.erb b/app/views/activities/_update_actor.html.erb index faf845139..a53ddae77 100644 --- a/app/views/activities/_update_actor.html.erb +++ b/app/views/activities/_update_actor.html.erb @@ -24,11 +24,7 @@ <% end %>
- updated - <% if subject.entity != current_user %> - by <%= subject.name %> - <% end %> - <%= t("home.index.how_long_ago", time: time_ago_in_words(thing.updated_at)) %> + <%= t("home.index.update_actor", time: time_ago_in_words(thing.updated_at), name: subject.name) %>
diff --git a/config/locales/en.yml b/config/locales/en.yml index 68b059b53..9d19749f4 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -251,10 +251,12 @@ en: save: Save home: index: + create_actor: "added by %{name} %{time} ago" how_long_ago: "%{time} ago" recent_activity: Recent Activity search: placeholder: What are you looking for? + update_actor: "updated by %{name} %{time} ago" jobs: analysis: analyse_model_file: