Skip to content

Commit

Permalink
Learner view audio translations (oppia#3681)
Browse files Browse the repository at this point in the history
* Audio learner view

* rm select2

* suggested changes

* lint

* lint

* suggested changes

* lint

* test fix

* move isContentAudioTranslationsAvailable to oppiaPlayerService

* suggested changes

* font awesome

* typo

* typo

* comma

* fix tests

* temporarily remove resources_test
  • Loading branch information
tjiang11 authored and seanlip committed Aug 3, 2017
1 parent 3a5300a commit 90f1f2c
Show file tree
Hide file tree
Showing 41 changed files with 929 additions and 431 deletions.
3 changes: 1 addition & 2 deletions assets/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,6 @@ var constants = {
}, {
"id": "hi-en",
"text": "Hinglish"
}],
}]

"GCS_RESOURCE_BUCKET_NAME": "oppia.resources"
};
2 changes: 2 additions & 0 deletions assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@
"I18N_LIBRARY_VIEW_ALL": "View all",
"I18N_MODAL_CANCEL_BUTTON": "Cancel",
"I18N_ONE_SUBSCRIBER_TEXT": "You have 1 subscriber.",
"I18N_PLAYER_AUDIO_LANGUAGE": "Language",
"I18N_PLAYER_AUDIO_TRANSLATION_SETTINGS": "Audio Translation Settings",
"I18N_PLAYER_BACK": "Back",
"I18N_PLAYER_BACK_TO_COLLECTION": "Back to collection",
"I18N_PLAYER_CARD_NUMBER_TOOLTIP": "Card #",
Expand Down
2 changes: 2 additions & 0 deletions assets/i18n/qqq.json
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@
"I18N_LIBRARY_VIEW_ALL": "Text of a button shown to the side of the exploration group. - When clicked, it shows all the explorations included on the associated group. It should be a small text.\n{{Identical|View all}}",
"I18N_MODAL_CANCEL_BUTTON": "Text that is displayed in a button of a modal. On clicking it the modal closes.\n{{Identical|Cancel}}",
"I18N_ONE_SUBSCRIBER_TEXT": "Text displayed under the subscribers tab in creator dashboard. If the creator has one subscriber, this text is displayed which informs him/her about the same.",
"I18N_PLAYER_AUDIO_LANGUAGE": "Text displayed in the audio translation settings modal, asking the learner to pick what language they want to listen to audio translations in.",
"I18N_PLAYER_AUDIO_TRANSLATION_SETTINGS": "Title displayed at the top of the audio translation settings modal in the learner view.",
"I18N_PLAYER_BACK": "Text read to users with screenreaders when they navigate through an exploration. - This labels the leftward-pointing arrow that is used to go backward by one card in the exploration.\n{{Identical|Back}}",
"I18N_PLAYER_BACK_TO_COLLECTION": "Text shown to users after they complete an exploration in a collection. - This labels the link that is used to return back to the home page of the collection the user is currently exploring",
"I18N_PLAYER_CARD_NUMBER_TOOLTIP": "Text displayed when the user is playing an exploration. - On top of the player there are buttons that allow the user to navigate to the previous cards he has completed. This text is shown as a part of the tooltip of this button.\n{{Identical|Card}}",
Expand Down
16 changes: 16 additions & 0 deletions assets/images/icons/play-audio-button.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
33 changes: 33 additions & 0 deletions assets/images/icons/rewind-five.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
32 changes: 32 additions & 0 deletions assets/images/icons/settings.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 18 additions & 0 deletions assets/images/icons/speaker-not-playing.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions assets/images/icons/speaker-playing.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added assets/test/17/audio/test_audio_1_en.mp3
Binary file not shown.
Binary file added assets/test/17/audio/test_audio_1_hi_en.mp3
Binary file not shown.
Binary file added assets/test/17/audio/test_audio_2_en.mp3
Binary file not shown.
Binary file added assets/test/17/audio/test_audio_2_hi_en.mp3
Binary file not shown.
Binary file added assets/test/17/audio/test_audio_3_hi_en.mp3
Binary file not shown.
1 change: 1 addition & 0 deletions core/controllers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@ def render_template(
rights_manager.ACTIVITY_STATUS_PUBLIC),
'ACTIVITY_STATUS_PUBLICIZED': (
rights_manager.ACTIVITY_STATUS_PUBLICIZED),
'AUDIO_URL_TEMPLATE': feconf.AUDIO_URL_TEMPLATE,
# The 'path' variable starts with a forward slash.
'FULL_URL': '%s://%s%s' % (scheme, netloc, path),
'INVALID_NAME_CHARS': feconf.INVALID_NAME_CHARS,
Expand Down
2 changes: 1 addition & 1 deletion core/controllers/editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ def post(self, exploration_id):
# object being recursively passed around in app engine.
del audio

bucket_name = constants.GCS_RESOURCE_BUCKET_NAME
bucket_name = feconf.GCS_RESOURCE_BUCKET_NAME

# Upload to GCS bucket with filepath
# "<bucket>/<exploration-id>/assets/audio/<filename>".
Expand Down
Loading

0 comments on commit 90f1f2c

Please sign in to comment.