used i18n

This commit is contained in:
Giga Chubinidze 2023-09-29 14:18:45 +04:00
parent 07ce65f5e6
commit 0be8ab5839
7 changed files with 7 additions and 6 deletions

View file

@ -18,7 +18,7 @@ module Reports::Docx::DrawResultAsset
end
@docx.p do
text result.name.presence || '(unnamed)', italic: true
text result.name.presence || I18n.t('projects.reports.unnamed'), italic: true
text ' '
link I18n.t('projects.reports.elements.download'), asset_url do
italic true

View file

@ -38,7 +38,7 @@ module Reports::Docx::DrawResultTable
end
end
@docx.p do
text result.name.presence || '(unnamed)', italic: true
text result.name.presence || I18n.t('projects.reports.unnamed'), italic: true
text " #{I18n.t('search.index.archived')} ", bold: true if result.archived?
text ' '
text I18n.t 'projects.reports.elements.result_table.table_name', name: table.name

View file

@ -8,7 +8,7 @@ module Reports::Docx::DrawResultText
color = @color
@docx.p
@docx.p do
text result.name.presence || '(unnamed)', italic: true
text result.name.presence || I18n.t('projects.reports.unnamed'), italic: true
text " #{I18n.t('search.index.archived')} ", bold: true if result.archived?
text ' '
text I18n.t('projects.reports.elements.result_table.user_time',

View file

@ -7,7 +7,7 @@
<%= file_extension_icon_html(asset, true) %>
</span>
<span class="result-name">
<%= result.name.presence || '(unnamed)' %>
<%= result.name.presence || I18n.t('projects.reports.unnamed') %>
<% if result.archived? %>
<span class="label label-warning"><%= t('search.index.archived') %></span>
<% end %>

View file

@ -6,7 +6,7 @@
<div class="report-element report-result-element report-result-table-element">
<div class="report-element-header">
<div class="result-name">
<%= name.presence || '(unnamed)' %>
<%= name.presence || I18n.t('projects.reports.unnamed') %>
<% if result.archived? %>
<span class="label label-warning"><%= t('search.index.archived') %></span>
<% end %>

View file

@ -6,7 +6,7 @@
<div class="report-element report-result-element report-result-text-element">
<div class="report-element-header">
<div class="result-name">
<%= name.presence || '(unnamed)' %>
<%= name.presence || I18n.t('projects.reports.unnamed') %>
<% if result.archived? %>
<span class="label label-warning"><%= t('search.index.archived') %></span>
<% end %>

View file

@ -666,6 +666,7 @@ en:
no_active_experiment_archived_project: "This project is archived and cant have active experiments."
reports:
print_title: "%{project} | Report"
unnamed: "(unnamed)"
index:
head_title: "Reports"
new: "New report"