Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: translate text button of 'Continue' #31

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions invideoquiz/invideoquiz.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ def student_view(self, context=None): # pylint: disable=unused-argument
context={
'video_id': self.video_id,
'user_mode': self.user_mode,
'continue': _('Continue')

},
)
config = get_resource_string('js/src/config.js')
Expand Down
2 changes: 1 addition & 1 deletion invideoquiz/public/html/invideoquiz.html
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<div class="in-video-quiz-block" data-videoid="{video_id}" data-mode='{user_mode}'></div>
<div class="in-video-quiz-block" data-continue-text="{continue}" data-videoid="{video_id}" data-mode='{user_mode}'></div>
4 changes: 3 additions & 1 deletion invideoquiz/public/js/src/invideoquiz.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ function InVideoQuizXBlock(runtime, element) {
}
var problemTimesMap = InVideoQuizXBlock.config[videoId];
var studentMode = $('.in-video-quiz-block').data('mode') !== 'staff';
var extraVideoButton = '<button class="in-video-continue">Continue</button>';

// We get the translted text from invideoquiz.html because gettext('Continue') didn't work
var extraVideoButton = '<button class="in-video-continue">' + $('.in-video-quiz-block').data('continue-text') +'</button>';
var video;
var videoState;

Expand Down