feat: add PREPEND_LOCALE_PATHS configuration setting - #29851
Conversation
|
Thanks for the pull request, @keithgg! I've created OSPR-6427 to keep track of it in JIRA, where we prioritize reviews. Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
7154ab5 to
773fa1a
Compare
edx-platform supports COMPREHENSIVE_THEME_LOCALE_PATHS setting, which appends paths to the end of LOCALE_PATHS, but there's currently no way to add additional paths to the start of the list. We want to be able to prepend locale paths so that we can override existing translations in edx-platform.
773fa1a to
77ab470
Compare
|
@keithgg Thank you for your contribution. I will line this up for my review. |
|
@keithgg 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
|
EdX Release Notice: This PR has been deployed to the staging environment in preparation for a release to production. |
|
EdX Release Notice: This PR may have caused e2e tests to fail on Stage. If you're a member of the edX org, please visit #e2e-troubleshooting on Slack to help diagnose the cause of these failures. Otherwise, it is the reviewer's responsibility. E2E tests have failed. https://gocd.tools.edx.org/go/tab/pipeline/history/deploy_to_stage |
|
EdX Release Notice: This PR has been deployed to the production environment. |
edx-platform supports COMPREHENSIVE_THEME_LOCALE_PATHS setting, which appends paths to the end of LOCALE_PATHS, but there's currently no way to add additional paths to the start of the list. https://tasks.opencraft.com/browse/SE-5299
feat: add PREPEND_LOCALE_PATHS configuration setting (openedx#29851)
edx-platform supports COMPREHENSIVE_THEME_LOCALE_PATHS setting, which appends paths to the end of LOCALE_PATHS, but there's currently no way to add additional paths to the start of the list. https://tasks.opencraft.com/browse/SE-5299
edx-platform supports COMPREHENSIVE_THEME_LOCALE_PATHS setting, which appends paths to the end of LOCALE_PATHS, but there's currently no way to add additional paths to the start of the list. https://tasks.opencraft.com/browse/SE-5299
…o Maple #Description Backports the changes made in #29851 to `maple.master`. > edx-platform currently supports COMPREHENSIVE_THEME_LOCALE_PATHS setting, which appends paths to the end of LOCALE_PATHS, but there's currently no way to add additional paths to the start of the list to override the default translations. > > In this PR, we added the PREPEND_LOCALE_PATHS setting to achieve this. > > - Affects the Operator ## Supporting information - PR for the `configuration` repo. openedx-unsupported/configuration#6677 - [SE-5299](https://tasks.opencraft.com/browse/SE-5299) ## Testing instructions On the docker devstack: - `make dev.shell.lms` - Edit the file `/edx/etc/lms.yml`. Add a `PREPEND_LOCALE_PATHS` setting like ```yaml PREPEND_LOCALE_PATHS: [/edx/src/] ``` - Copy a translation file into that folder. ```bash cp -r /edx/app/edxapp/edx-platform/conf/locale/fr/ /edx/src/es ``` Note that this is copying French to Spanish folder. It makes seeing the differences easier. - In your browser load the LMS, and change the `openedx-language-cookie`'s value to `es`. - Restart your lms dev server. - If done correctly you should get the french translations loaded (it sometimes takes 5 minutes to load).
Description
edx-platform currently supports COMPREHENSIVE_THEME_LOCALE_PATHS setting, which appends paths to the end of LOCALE_PATHS, but there's currently no way to add additional paths to the start of the list to override the default translations.
In this PR, we added the PREPEND_LOCALE_PATHS setting to achieve this.
Supporting information
configurationrepo. feat: add PREPEND_LOCALE_PATHS configuration setting openedx-unsupported/configuration#6677Testing instructions
On the docker devstack:
make dev.shell.lms/edx/etc/lms.yml. Add aPREPEND_LOCALE_PATHSsetting likeNote that this is copying French to Spanish folder. It makes seeing the differences easier.
openedx-language-cookie's value toes.Deadline
"None"
Other information
Settings