[FAL-249] add translation support for LX

Description

This pull request adds language support (only JS), mostly focusing on the ones needed for LabXchange (ar, zh, nl, fr, de, it, ja, ko, pt-br, es-419, tr), updating the translation files correctly from transifex (there was also some transifex contributions to those languages)

  1.  

    1. Testing Instructions:
      For this you'll need a LabXchange development environment (I guess this could also be checked directly from an edx instance with this xblock installed)

*There was a problem I faced checking this with devstack from LX, as we pass the Accept-Language header, which is being removed before reaching the LMS, I confirmed this by overriding the LocaleMiddleware, but there is a workaround that I'll explain here*

  • Go to a Drag and Drop asset in LX (http://localhost:4556/library?t=Language%3Aen&t=ItemType%3Aactivity&page=1&size=24&order=relevance)

  • No need for Changing the Language inside LX, as that won't work take effect on the edx side (as explained above)

  • Enter the LMS shell from devstack (`make lms-shell`) and modify the `lms/envs/devstack.py` settings file, setting the `LANGUAGE_CODE` to the language you want to test (example: `LANGUAGE_CODE = 'fr'`)

  • Install this package, example steps (inside devstack):


make lms-shell
cd /edx/src
git clone https://github.com/open-craft/xblock-drag-and-drop-v2.git
git checkout raul/fal-249-drag-drop-translation
cd xblock-drag-and-drop-v2/
pip install -e .
exit
make dev.restart-container.lms

  • Visit the LX asset and reload

  • Make sure most of the xblock content is translated, make a mistake dragging one of the elements to a wrong zone and `submit`, make sure a popup appears also with the correct language

  • in the Feedback, make sure the 3rd message (in english it was "Drag the items onto the image above.") is properly translated

  1.  

    1. Reviewers:

  • [ ] @s0b0lev

Done

Assignee

Hasnain Naveed

Reporter

Open Source Pull Request Bot

Labels

Contributor Name

Raul Gallegos

Repo

edx-solutions/xblock-drag-and-drop-v2

Customer

Epic Link

None

OSCM Assignee

None

Platform Map Area (Levels 1 & 2)

None

Platform Map Area (Levels 3 & 4)

None

Blended Hour Utilization Percentage

None

edX Theme

None

edX Squad

None

Github Lines Added

9060

Github Lines Deleted

6266

Priority

Unset