edly-io / h5pxblock

Xblock which provides ability to play H5P content in open edX
MIT License
13 stars 23 forks source link

feat: add translations of `es_419` and `es_ES` #22

Closed BryanttV closed 1 year ago

BryanttV commented 1 year ago

Description

This PR adds translations of es_419 and es_ES to the H5P XBlock.

How To Test

  1. Install this branch in your environment.
  2. Change the platform language in (Account → Site Preferences → Site Language). Set it to "Spanish (Latin America)"
  3. Add a H5P block in a unit from Studio.
  4. You should see the block in the selected language.

Using translations commands

A Makefile was created that includes the necessary commands (based on the edX cookie-cutter) to extract and compile the translations.

  1. Run make extract_translations, this will update the strings to be translated in h5pxblock/locale/en/LC_MESSAGES/text.po
  2. Create a folder for your translations (If it does not exist) in h5pxblock/locale/, ie: h5pxblock/locale/es_419/LC_MESSAGES/, and create your text.po file, based on the file generated above.
  3. Add all translations for strings according to language.
  4. Run make compile_translations, this will generate the text.mo file in all created language folders.

Screenshots

  1. In the LMS image
  2. In Studio image image image image
ziafazal commented 1 year ago

@BryanttV thanks for creating this PR. However, it appears E2E tests are failing on it.

mariajgrimaldi commented 1 year ago

@ziafazal: I added xblock-utils that seem missing in the testing environment. Can we rerun the tests?