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

committed by
Sebastian Serth

parent
e551c8a699
commit
f8330b39fb
@ -1,12 +1,12 @@
|
||||
h1 = ErrorTemplate.model_name.human(count: 2)
|
||||
h1 = ErrorTemplate.model_name.human(count: :other)
|
||||
|
||||
.table-responsive
|
||||
table.table class=(@error_templates.present? ? 'sortable' : '')
|
||||
thead
|
||||
tr
|
||||
th = t('activerecord.attributes.error_template.name')
|
||||
th = t('activerecord.attributes.error_template.description')
|
||||
th = t('activerecord.attributes.exercise.execution_environment')
|
||||
th = ErrorTemplate.human_attribute_name('name')
|
||||
th = ErrorTemplate.human_attribute_name('description')
|
||||
th = Exercise.human_attribute_name('execution_environment')
|
||||
th colspan=3 = t('shared.actions')
|
||||
tbody
|
||||
- @error_templates.each do |error_template|
|
||||
|
@ -10,16 +10,16 @@ h1
|
||||
= row(label: "error_template.#{attribute}", value: @error_template.send(attribute))
|
||||
|
||||
h2.mt-4
|
||||
= t 'error_templates.attributes'
|
||||
= t('error_templates.attributes')
|
||||
|
||||
.table-responsive
|
||||
table.table class=(@error_template.error_template_attributes.present? ? 'sortable' : '')
|
||||
thead
|
||||
tr
|
||||
th
|
||||
th = t('activerecord.attributes.error_template_attribute.key')
|
||||
th = t('activerecord.attributes.error_template_attribute.description')
|
||||
th = t('activerecord.attributes.error_template_attribute.regex')
|
||||
th = ErrorTemplateAttribute.human_attribute_name('key')
|
||||
th = ErrorTemplateAttribute.human_attribute_name('description')
|
||||
th = ErrorTemplateAttribute.human_attribute_name('regex')
|
||||
th colspan=3 = t('shared.actions')
|
||||
tbody
|
||||
- @error_template.error_template_attributes.order('important DESC', :key).each do |attribute|
|
||||
|
Reference in New Issue
Block a user