Skip to content

open-craft/xblock-virtualreality

Repository files navigation

Virtual Reality XBlock

This XBlock embeds Virtual Reality videos into a course.

Install

See edX Installing an XBlock for details on how to install this XBlock on your Open edX instance.

pip install "git+https://github.com/open-craft/xblock-virtualreality@master#egg=xblock-virtualreality"

Usage

To enable the virtualreality xblock in your course:

  1. In Studio, go to Settings > Advanced Settings.
  2. Locate the Advanced Module List field, and add "virtualreality" to that list.
  3. Add a Unit to your course, and click on the Advanced button to add a Vimeo component.
  4. Click Edit to add your Video URL.
  5. Click Save to add the video to your course.

Translation (i18n)

This repo offers multiple make targets to automate the translation tasks. First, install requirements-test.txt:

pip install -r requirements-test.txt

Each make target will be explained below:

  • extract_translations. Use i18n_tool extract to create .po files based on all the tagged strings in the python and javascript code.
  • compile_translations. Use i18n_tool generate to create .mo compiled files.
  • detect_changed_source_translations. Use i18n_tool changed to identify any updated translations.
  • validate_translations. Compile translations and check the source translations haven't changed.

If you want to add a new language:

  1. Add language to eoc_journal/translations/config.yaml
  2. Make sure all tagged strings have been extracted:
make extract_translations
  1. Clone en directory to eoc_journal/translations/<lang_code>/ for example: eoc_journal/translations/fa_IR/
  2. Make necessary changes to translation files headers. Make sure you have proper Language and Plural-Forms lines.
  3. When you finished your modification process, re-compile the translation messages.
make compile_translations

Transifex

This repo offers different make targets to automate interaction with transifex. To use these make targets first install requirements-test.txt.

pip install -r requirements-test.txt

These are the different make targets used to interact with transifex:

  • pull_translations. Pull translations from Transifex.
  • push_translations. Push translations to Transifex.

The transifex configuration is stored in .tx. For more information read transifex's documentation