diff --git a/CHANGELOG.md b/CHANGELOG.md index 6174161..6cc50e5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ Note: Breaking changes between versions are indicated by "💥". ## Unreleased +- [Improvement] Upgrade all services to open-release/koa.3. +- [Feature] Make it possible to build the openedx Docker image with a custom openedx-i18n version with the ``--build-arg OPENEDX_I18N_VERSION=custom`` command line argument. + ## v11.2.5 (2021-03-30) - [Bugfix] Fix edge case where `PLUGINS` entry is null in config.yml. diff --git a/docs/configuration.rst b/docs/configuration.rst index 388f7f3..faa228b 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -207,7 +207,7 @@ openedx Docker Image build arguments When building the "openedx" Docker image, it is possible to specify a few `arguments `__: - ``EDX_PLATFORM_REPOSITORY`` (default: ``"https://github.com/edx/edx-platform.git"``) -- ``EDX_PLATFORM_VERSION`` (default: ``"open-release/koa.2"``) +- ``EDX_PLATFORM_VERSION`` (default: ``"open-release/koa.3"``) - ``EDX_PLATFORM_VERSION_DATE`` (default: ``"20200227"``) - ``NPM_REGISTRY`` (default: ``"https://registry.npmjs.org/"``) @@ -288,7 +288,7 @@ If you don't create your fork from this tag, you *will* have important compatibi Adding custom translations ~~~~~~~~~~~~~~~~~~~~~~~~~~ -If you are not running Open edX in English, chances are that some strings will not be properly translated. In most cases, this is because not enough contributors have helped translate Open edX in your language. It happens! With Tutor, available translated languages include those that come bundled with `edx-platform `__ as well as those from `openedx-i18n `__. +If you are not running Open edX in English, chances are that some strings will not be properly translated. In most cases, this is because not enough contributors have helped translate Open edX in your language. It happens! With Tutor, available translated languages include those that come bundled with `edx-platform `__ as well as those from `openedx-i18n `__. Tutor offers a relatively simple mechanism to add custom translations to the openedx Docker image. You should create a folder that corresponds to your language code in the "build/openedx/locale" folder of the Tutor environment. This folder should contain a "LC_MESSAGES" folder. For instance:: @@ -309,9 +309,9 @@ Then, add a "django.po" file there that will contain your custom translations:: .. warning:: Don't forget to specify the file ``Content-Type`` when adding message strings with non-ASCII characters; otherwise a ``UnicodeDecodeError`` will be raised during compilation. -The "String to translate" part should match *exactly* the string that you would like to translate. You cannot make it up! The best way to find this string is to copy-paste it from the `upstream django.po file for the English language `__. +The "String to translate" part should match *exactly* the string that you would like to translate. You cannot make it up! The best way to find this string is to copy-paste it from the `upstream django.po file for the English language `__. -If you cannot find the string to translate in this file, then it means that you are trying to translate a string that is used in some piece of javascript code. Those strings are stored in a different file named "djangojs.po". You can check it out `in the edx-platform repo as well `__. Your custom javascript strings should also be stored in a "djangojs.po" file that should be placed in the same directory. +If you cannot find the string to translate in this file, then it means that you are trying to translate a string that is used in some piece of javascript code. Those strings are stored in a different file named "djangojs.po". You can check it out `in the edx-platform repo as well `__. Your custom javascript strings should also be stored in a "djangojs.po" file that should be placed in the same directory. To recap, here is an example. To translate a few strings in French, both from django.po and djangojs.po, we would have the following file hierarchy:: diff --git a/docs/dev.rst b/docs/dev.rst index cfbf860..3efae6c 100644 --- a/docs/dev.rst +++ b/docs/dev.rst @@ -25,7 +25,7 @@ This ``openedx-dev`` development image differs from the ``openedx`` production i - The user that runs inside the container has the same UID as the user on the host, in order to avoid permission problems inside mounted volumes (and in particular in the edx-platform repository). - Additional python and system requirements are installed for convenient debugging: `ipython `__, `ipdb `__, vim, telnet. -- The edx-platform `development requirements `__ are installed. +- The edx-platform `development requirements `__ are installed. Since the ``openedx-dev`` is based upon the ``openedx`` docker image, it should be re-built every time the ``openedx`` docker image is modified. @@ -137,7 +137,7 @@ Prepare the edx-platform repo If you choose any but the first solution above, you will have to make sure that your fork works with Tutor. -First of all, you should make sure that you are working off the ``open-release/koa.2`` tag. See the :ref:`fork edx-platform section ` for more information. +First of all, you should make sure that you are working off the ``open-release/koa.3`` tag. See the :ref:`fork edx-platform section ` for more information. Then, you should run the following commands:: diff --git a/tutor/templates/build/openedx/Dockerfile b/tutor/templates/build/openedx/Dockerfile index 1b7a69d..797d101 100644 --- a/tutor/templates/build/openedx/Dockerfile +++ b/tutor/templates/build/openedx/Dockerfile @@ -36,8 +36,6 @@ RUN mkdir -p /openedx/edx-platform && \ WORKDIR /openedx/edx-platform # Patch edx-platform -# Security patches -RUN curl https://github.com/overhangio/edx-platform/commit/a4369d300b85d94442844443a3d258a2b516955c.patch | git apply - # Make it possible to disable learner records globally # https://github.com/edx/edx-platform/pull/25182 # https://github.com/overhangio/edx-platform/tree/overhangio/disable-learner-records-from-settings @@ -53,11 +51,12 @@ RUN curl https://github.com/overhangio/edx-platform/commit/1c733e3ba11249cf16358 ###### Download extra locales to /openedx/locale/contrib/locale FROM minimal as locales +ARG OPENEDX_I18N_VERSION={{ OPENEDX_COMMON_VERSION }} RUN cd /tmp \ - && curl -L -o openedx-i18n.tar.gz https://github.com/openedx/openedx-i18n/archive/{{ OPENEDX_COMMON_VERSION }}.tar.gz \ + && curl -L -o openedx-i18n.tar.gz https://github.com/openedx/openedx-i18n/archive/$OPENEDX_I18N_VERSION.tar.gz \ && tar xzf /tmp/openedx-i18n.tar.gz \ && mkdir -p /openedx/locale/contrib \ - && mv openedx-i18n-{{ OPENEDX_COMMON_VERSION|replace("/", "-") }}/edx-platform/locale /openedx/locale/contrib \ + && mv openedx-i18n-*/edx-platform/locale /openedx/locale/contrib \ && rm -rf openedx-i18n* ###### Install python requirements in virtualenv @@ -76,9 +75,6 @@ WORKDIR /openedx/edx-platform # Install the right version of pip/setuptools RUN pip install setuptools==44.1.0 pip==20.0.2 wheel==0.34.2 -# Install requirements which were stripped from pypi: this can be removed once the fix has been merged in Koa -RUN pip install -e git+https://github.com/technige/py2neo.git@py2neo-3.1.2#egg=py2neo==3.1.2 - # Install base requirements RUN pip install -r ./requirements/edx/base.txt diff --git a/tutor/templates/config.yml b/tutor/templates/config.yml index 4a59e60..7068de2 100644 --- a/tutor/templates/config.yml +++ b/tutor/templates/config.yml @@ -62,7 +62,7 @@ OPENEDX_LMS_UWSGI_WORKERS: 2 OPENEDX_MYSQL_DATABASE: "openedx" OPENEDX_CSMH_MYSQL_DATABASE: "{{ OPENEDX_MYSQL_DATABASE }}_csmh" OPENEDX_MYSQL_USERNAME: "openedx" -OPENEDX_COMMON_VERSION: "open-release/koa.2" +OPENEDX_COMMON_VERSION: "open-release/koa.3" MYSQL_HOST: "mysql" MYSQL_PORT: 3306 MYSQL_ROOT_USERNAME: "root"