Replace manual activerecord translations with helpers
This commit is contained in:

committed by
Sebastian Serth

parent
e551c8a699
commit
f8330b39fb
@@ -7,7 +7,7 @@
|
||||
.clearfix role='button'
|
||||
i.fa-solid aria-hidden='true'
|
||||
span
|
||||
= t('activerecord.models.tip.one')
|
||||
= Tip.model_name.human
|
||||
=< tip_prefix + index.to_s
|
||||
= ": #{tip.title}" if tip.title?
|
||||
.card.card-collapse.collapse id="tip-collapse-#{exercise_tip.id}" aria-labelledby="tip-heading-#{exercise_tip.id}" role='tabpanel' data-exercise-tip-id=exercise_tip.id
|
||||
|
@@ -14,7 +14,7 @@
|
||||
= f.label(:description, class: 'form-label')
|
||||
= f.markdown :description
|
||||
.mb-3
|
||||
= f.label(:file_type_id, t('activerecord.attributes.file.file_type_id'), class: 'form-label')
|
||||
= f.label(:file_type_id, CodeOcean::File.human_attribute_name('file_type_id'), class: 'form-label')
|
||||
= f.collection_select(:file_type_id, @file_types, :id, :name, {include_blank: true}, class: 'form-control')
|
||||
.mb-3
|
||||
= f.label(:example, class: 'form-label')
|
||||
|
@@ -1,11 +1,11 @@
|
||||
h1 = Tip.model_name.human(count: 2)
|
||||
h1 = Tip.model_name.human(count: :other)
|
||||
|
||||
.table-responsive
|
||||
table.table class=(@tips.present? ? 'sortable' : '')
|
||||
thead
|
||||
tr
|
||||
th = t('activerecord.attributes.tip.title')
|
||||
th = t('activerecord.attributes.file.file_type')
|
||||
th = Tip.human_attribute_name('title')
|
||||
th = CodeOcean::File.human_attribute_name('file_type')
|
||||
th colspan=3 = t('shared.actions')
|
||||
tbody
|
||||
- @tips.each do |tip|
|
||||
|
Reference in New Issue
Block a user