Skip to content

Commit

Permalink
Fixed missing translation for resource_type hint.
Browse files Browse the repository at this point in the history
Enabled option to raise exceptions when translation missing in dev/test

Removed whitelisted web console IP
  • Loading branch information
fbacall committed Nov 7, 2022
1 parent 665934e commit d29dfc7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
4 changes: 2 additions & 2 deletions app/views/materials/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
<%= f.input :date_published, as: :date_picker, field_lock: true, input_html: { title: t('materials.hints.date_published') } %>

<!-- Field: Resource Type -->
<%= f.multi_input :resource_type, label: 'Resource types', errors: @material.errors[:material_types],
title: t('events.hints.type') %>
<%= f.multi_input :resource_type, label: 'Resource types', errors: @material.errors[:resource_type],
title: t('materials.hints.resource_type') %>

<!-- Field: Other Types -->
<% if !TeSS::Config.feature['disabled'].include? 'other_types' %>
Expand Down
5 changes: 1 addition & 4 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@
protocol: URI.parse(TeSS::Config.base_url).scheme
}

# console whitelisted ip addresses
config.web_console.whitelisted_ips = '1.120.119.251'

# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log

Expand All @@ -81,7 +78,7 @@
config.assets.quiet = true

# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
config.i18n.raise_on_missing_translations = true

# Use an evented file watcher to asynchronously detect changes in source code,
# routes, locales, etc. This feature depends on the listen gem.
Expand Down
2 changes: 1 addition & 1 deletion config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
config.active_support.deprecation = :stderr

# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
config.i18n.raise_on_missing_translations = true
config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }

config.action_mailer.asset_host = TeSS::Config.base_url
Expand Down
2 changes: 1 addition & 1 deletion config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ en:
targets: 'Indicate the type of audience intended to use your training material.'
time: 'What is the estimated time it takes to work through this resource in hours?'
title: 'Add a title for your training material.'
type: 'Select the type of resource that best matches the training material. '
resource_type: 'Select the type of resource that best matches the training material. '
url: 'Preferred URL to direct people to your training material landing page.'
version: 'Indicate the current version of the training material.'
profile:
Expand Down

0 comments on commit d29dfc7

Please sign in to comment.