Skip to content
Snippets Groups Projects
Unverified Commit be08f406 authored by Sébastien Gaya's avatar Sébastien Gaya Committed by GitHub
Browse files

set locale in distance_of_time_in_words helper only (#1771)

parent f1a35a08
No related branches found
No related tags found
No related merge requests found
<%
@university = about.university
I18n.locale = about.language.iso_code if about.respond_to?(:language)
locale = about.respond_to?(:language) ? about.language.iso_code : nil
%>
contents_reading_time:
seconds: <%= about.contents_full_text.reading_time %>
text: >-
<%= distance_of_time_in_words(0, about.contents_full_text.reading_time) %>
<%= distance_of_time_in_words(0, about.contents_full_text.reading_time, locale: locale) %>
contents:
<% about.blocks.without_heading.published.ordered.each do |block| %>
<%= render 'admin/communication/blocks/static', block: block unless block.empty? %>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment