Skip to content

Commit

Permalink
make create/update activity feed items translatable
Browse files Browse the repository at this point in the history
  • Loading branch information
Floppy committed Aug 20, 2024
1 parent 21d678e commit e7d2bcd
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
6 changes: 1 addition & 5 deletions app/views/activities/_create_actor.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,7 @@
<% end %>
<div class="col col-auto">
<small>
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) %>
</small>
</div>
</div>
Expand Down
6 changes: 1 addition & 5 deletions app/views/activities/_update_actor.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@
<% end %>
<div class="col col-auto">
<small>
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) %>
</small>
</div>
</div>
Expand Down
2 changes: 2 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit e7d2bcd

Please sign in to comment.