Add support for translating time intervals

This commit is contained in:
Omar Roth
2019-02-20 08:49:39 -06:00
parent fb14d9c134
commit 83493237a5
4 changed files with 25 additions and 28 deletions

View File

@@ -66,7 +66,7 @@
</p>
<% if Time.now - item.published > 1.minute %>
<h5><%= translate(locale, "Shared `x` ago", recode_date(item.published)) %></h5>
<h5><%= translate(locale, "Shared `x` ago", recode_date(item.published, locale)) %></h5>
<% end %>
<% else %>
<% if env.get?("user") && env.get("user").as(User).preferences.thin_mode %>
@@ -100,7 +100,7 @@
</p>
<% if Time.now - item.published > 1.minute %>
<h5><%= translate(locale, "Shared `x` ago", recode_date(item.published)) %></h5>
<h5><%= translate(locale, "Shared `x` ago", recode_date(item.published, locale)) %></h5>
<% end %>
<% end %>
</div>