Skip to content

Commit

Permalink
try to localize instructions even if not should_localze (to support n…
Browse files Browse the repository at this point in the history
…on-custom levels)
  • Loading branch information
Hamms committed May 14, 2018
1 parent 16d4796 commit 6ddd6e1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dashboard/app/helpers/levels_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -430,8 +430,10 @@ def blockly_options
app_options[:level] = level_options

# Locale-depdendent option
# For historical reasons, localized_instructions should happen independent
# of `should_localize?`
level_options['instructions'] = l.localized_instructions unless l.localized_instructions.nil?
if l.should_localize?
level_options['instructions'] = l.localized_instructions unless l.localized_instructions.nil?
level_options['markdownInstructions'] = l.localized_markdown_instructions unless l.localized_markdown_instructions.nil?
level_options['authoredHints'] = l.localized_authored_hints unless l.localized_authored_hints.nil?
level_options['failureMessageOverride'] = l.localized_failure_message_override unless l.localized_failure_message_override.nil?
Expand Down

0 comments on commit 6ddd6e1

Please sign in to comment.