Fix I18n markup

This commit is contained in:
aignatov-bio 2020-07-28 09:53:35 +02:00
parent a0d19b5d98
commit b644950e4e
2 changed files with 10 additions and 13 deletions

View file

@ -46,12 +46,10 @@ module Reports::Docx::DrawMyModule
text I18n.t('projects.reports.elements.module.status') text I18n.t('projects.reports.elements.module.status')
text ' ' text ' '
text "[#{status.name}]", color: status.color.delete('#') text "[#{status.name}]", color: status.color.delete('#')
text ' '
text I18n.l(my_module.completed_on, format: :full)
end end
@docx.p do @docx.p do
text I18n.t 'projects.reports.elements.module.tags_header' text I18n.t('projects.reports.elements.module.tags_header')
if tags.any? if tags.any?
my_module.tags.each do |tag| my_module.tags.each do |tag|
text ' ' text ' '
@ -59,7 +57,7 @@ module Reports::Docx::DrawMyModule
end end
else else
text ' ' text ' '
text I18n.t 'projects.reports.elements.module.no_tags' text I18n.t('projects.reports.elements.module.no_tags')
end end
end end
@ -67,7 +65,7 @@ module Reports::Docx::DrawMyModule
html = custom_auto_link(my_module.description, team: @report_team) html = custom_auto_link(my_module.description, team: @report_team)
html_to_word_converter(html) html_to_word_converter(html)
else else
@docx.p I18n.t 'projects.reports.elements.module.no_description' @docx.p I18n.t('projects.reports.elements.module.no_description')
end end
@docx.p @docx.p

View file

@ -6,7 +6,7 @@
<div class="report-element-header"> <div class="report-element-header">
<div class="row"> <div class="row">
<div class="pull-left user-time"> <div class="pull-left user-time">
<%=t "projects.reports.elements.module.user_time", timestamp: l(timestamp, format: :full) %> <%= t("projects.reports.elements.module.user_time", timestamp: l(timestamp, format: :full)) %>
</div> </div>
<div class="pull-right controls"> <div class="pull-right controls">
<%= render partial: "reports/elements/element_controls.html.erb", locals: { show_sort: true } %> <%= render partial: "reports/elements/element_controls.html.erb", locals: { show_sort: true } %>
@ -29,25 +29,24 @@
<% if my_module.started_on.present? %> <% if my_module.started_on.present? %>
<%= t('projects.reports.elements.module.started_on', started_on: l(my_module.started_on, format: :full)) %> <%= t('projects.reports.elements.module.started_on', started_on: l(my_module.started_on, format: :full)) %>
<% else %> <% else %>
<em><%=t "projects.reports.elements.module.no_start_date" %></em> <em><%= t("projects.reports.elements.module.no_start_date") %></em>
<% end %> <% end %>
</p> </p>
<p class="module-due-date"> <p class="module-due-date">
<% if my_module.due_date.present? %> <% if my_module.due_date.present? %>
<%=t "projects.reports.elements.module.due_date", due_date: l(my_module.due_date, format: :full) %> <%= t("projects.reports.elements.module.due_date", due_date: l(my_module.due_date, format: :full)) %>
<% else %> <% else %>
<em><%=t "projects.reports.elements.module.no_due_date" %></em> <em><%= t("projects.reports.elements.module.no_due_date") %></em>
<% end %> <% end %>
</p> </p>
<p class="module-status"> <p class="module-status">
<% status = my_module.my_module_status %> <% status = my_module.my_module_status %>
<%=t "projects.reports.elements.module.status" %> <%=t "projects.reports.elements.module.status" %>
<span class="status-block" style="background: <%= status.color %>"><%= status.name %></span> <span class="status-block" style="background: <%= status.color %>"><%= status.name %></span>
<%= l(my_module.completed_on, format: :full) %>
</p> </p>
<div class="row module-tags"> <div class="row module-tags">
<div class="pull-left"> <div class="pull-left">
<%=t "projects.reports.elements.module.tags_header" %> <%= t("projects.reports.elements.module.tags_header") %>
</div> </div>
<% if my_module.tags.any? %> <% if my_module.tags.any? %>
<% my_module.tags.each do |tag| %> <% my_module.tags.each do |tag| %>
@ -57,7 +56,7 @@
<% end %> <% end %>
<% else %> <% else %>
<div class="pull-left module-no-tag"> <div class="pull-left module-no-tag">
<em><%=t "projects.reports.elements.module.no_tags" %></em> <em><%= t("projects.reports.elements.module.no_tags") %></em>
</div> </div>
<% end %> <% end %>
</div> </div>
@ -68,7 +67,7 @@
team: current_team, team: current_team,
base64_encoded_imgs: for_export_all) %> base64_encoded_imgs: for_export_all) %>
<% else %> <% else %>
<em><%=t "projects.reports.elements.module.no_description" %></em> <em><%= t("projects.reports.elements.module.no_description") %></em>
<% end %> <% end %>
</div> </div>
</div> </div>