Skip to content

Commit

Permalink
Introduce welcome screen with translations
Browse files Browse the repository at this point in the history
  • Loading branch information
BeritJanssen committed Nov 13, 2023
1 parent 0b2be21 commit c0354c0
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 75 deletions.
12 changes: 10 additions & 2 deletions backend/experiment/rules/musical_preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,18 @@ def first_round(self, experiment):
text=rendered, title=_('Informed consent'), confirm=_('I agree'), deny=_('Stop')
)
playlist = Playlist(experiment.playlists.all())
explainer = Explainer(
instruction=_('Welcome to the Musical Preferences experiment!'),
steps=[
Step(_('Please start by checking your connection quality.'))
],
button_label=_('OK')
)
start_session = StartSession()
return [
consent,
playlist,
explainer,
start_session
]

Expand Down Expand Up @@ -97,7 +105,7 @@ def next_round(self, session, request_session=None):
else:
session.decrement_round()
if last_result.question_key == 'audio_check1':
playback = get_test_playback()
playback = get_test_playback('EXTERNAL')
html = HTML(body=render_to_string('html/huang_2022/audio_check.html'))
form = Form(form=[BooleanQuestion(
key='audio_check2',
Expand All @@ -116,7 +124,7 @@ def next_round(self, session, request_session=None):
return Redirect(settings.HOMEPAGE)
else:
session.decrement_round()
playback = get_test_playback()
playback = get_test_playback('EXTERNAL')
html = HTML(body='<h4>{}</h4>'.format(_('Do you hear the music?')))
form = Form(form=[BooleanQuestion(
key='audio_check1',
Expand Down
Binary file modified backend/locale/zh/LC_MESSAGES/django.mo
Binary file not shown.
Loading

0 comments on commit c0354c0

Please sign in to comment.