From 0e670837cf77cc3598d671f946fd077de67dfd43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Behmo?= Date: Sun, 2 Dec 2018 13:44:13 +0100 Subject: [PATCH] :flags: Download extra locales to the openedx docker image This allows anyone to run a German :de: or Japanese :jp: (for example) platform without a transifex account or running any extra command. --- CHANGELOG.md | 1 + README.md | 7 +++++-- openedx/Dockerfile | 7 +++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 82f05d2..4d065db 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Changelog +- 2018-12-02 [Feature] Download extra locales from [openedx-i18n](https://github.com/regisb/openedx-i18n/) to the Open edX Docker image - 2018-11-28 [Feature] Easily change openedx docker image - 2018-11-28 [Feature] Enable comprehensive theming! - 2018-11-28 [Improvement] Get rid of datadog diff --git a/README.md b/README.md index 2f62e2e..98c80bd 100644 --- a/README.md +++ b/README.md @@ -314,8 +314,7 @@ In this example, the nginx container ports would be mapped to 81 and 444, instea You should note that with the latter solution, it is your responsibility to configure the webserver on the host as a proxy to the nginx container. See [this](https://github.com/regisb/openedx-docker/issues/69#issuecomment-425916825) for http, and [this](https://github.com/regisb/openedx-docker/issues/90#issuecomment-437687294) for https. - -### Help! Your containers are eating all my RAM/CPU/CHEESE +### Help! The Docker containers are eating all my RAM/CPU/CHEESE You can identify which containers are consuming most resources by running: @@ -348,6 +347,10 @@ This will occur if you try to run a development environment without patching the This might occur when you try to run the latest version of `edx-platform`, and not a version close to `gingko.master`. It is no longer necessary to patch the `LOGGING` configuration in the latest `edx-platform` releases, as indicated in the [development](#for-developers) section above, so you should remove the call to `get_logger_config` altogether from your development settings. +### The chosen default language does not display properly + +By default, Open edX comes with a [very limited set](https://github.com/edx/edx-platform/blob/master/conf/locale/config.yaml) of translation/localization files. To complement these languages, we add locales from the [openedx-i18n project](https://github.com/regisb/openedx-i18n/blob/master/edx-platform/locale/config-extra.yaml). But not all supported locales are downloaded. In some cases, the chosen default language will not display properly because if was not packaged in either edx-platform or openedx-i18n. If you feel like your language should be packaged, please [open an issue on the openedx-i18n project](https://github.com/regisb/openedx-i18n/issues). + ## Disclaimers & Warnings This project is the follow-up of my work on an [install from scratch of Open edX](https://github.com/regisb/openedx-install). It does not rely on any hack or complex deployment script. In particular, we do not use the Open edX [Ansible deployment playbooks](https://github.com/edx/configuration/). That means that the folks at edX.org are *not* responsible for troubleshooting issues of this project. Please don't bother Ned ;-) diff --git a/openedx/Dockerfile b/openedx/Dockerfile index 3f7e1d0..47ec610 100644 --- a/openedx/Dockerfile +++ b/openedx/Dockerfile @@ -56,6 +56,13 @@ RUN ln -s /openedx/config/lms.env.json /openedx/ \ && ln -s /openedx/config/lms.auth.json /openedx/ \ && ln -s /openedx/config/cms.auth.json /openedx/ +# Download extra locales +RUN cd /tmp \ + && curl -L -o openedx-i18n.tar.gz https://github.com/regisb/openedx-i18n/archive/hawthorn.tar.gz \ + && tar xzf /tmp/openedx-i18n.tar.gz \ + && cp -r openedx-i18n-hawthorn/edx-platform/locale/* /openedx/edx-platform/conf/locale/ \ + && rm -rf openedx-i18n* + # Dockerize will be useful to wait for mysql DB availability ENV DOCKERIZE_VERSION v0.6.1 RUN curl -L -o dockerize.tar.gz https://github.com/jwilder/dockerize/releases/download/$DOCKERIZE_VERSION/dockerize-linux-amd64-$DOCKERIZE_VERSION.tar.gz \