mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-11-02 19:22:09 +08:00
Fix report table translations [SCI-11594]
This commit is contained in:
parent
5a1da39011
commit
758eee7041
1 changed files with 10 additions and 2 deletions
|
|
@ -7,11 +7,19 @@ module Reports::Docx::DrawStepTable
|
|||
settings = @settings
|
||||
obj = self
|
||||
obj.render_table(table, table_type, color)
|
||||
|
||||
i18n_string = if table_type == 'step_table'
|
||||
'projects.reports.elements.step_table'
|
||||
elsif table_type == 'well_plates_table'
|
||||
'projects.reports.elements.step_well_plates_table'
|
||||
end
|
||||
|
||||
|
||||
@docx.p do
|
||||
text I18n.t("projects.reports.elements.step_#{table_type}.table_name", name: table.name), italic: true
|
||||
text I18n.t("#{i18n_string}.table_name", name: table.name), italic: true
|
||||
unless settings['exclude_timestamps']
|
||||
text ' '
|
||||
text I18n.t("projects.reports.elements.step_#{table_type}.user_time",
|
||||
text I18n.t("#{i18n_string}.user_time",
|
||||
timestamp: I18n.l(timestamp, format: :full)), color: color[:gray]
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue