Skip to content

feat: add PREPEND_LOCALE_PATHS configuration setting to Maple - #30422

Merged
github-actions[bot] merged 1 commit into
openedx:open-release/maple.masterfrom
open-craft:keith/se_5299_maple_cherry_pick
Jul 3, 2022
Merged

feat: add PREPEND_LOCALE_PATHS configuration setting to Maple#30422
github-actions[bot] merged 1 commit into
openedx:open-release/maple.masterfrom
open-craft:keith/se_5299_maple_cherry_pick

Conversation

@keithgg

@keithgg keithgg commented May 17, 2022

Copy link
Copy Markdown
Contributor

#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

Testing instructions

On the docker devstack:

  • make dev.shell.lms
  • Edit the file /edx/etc/lms.yml. Add a PREPEND_LOCALE_PATHS setting like
PREPEND_LOCALE_PATHS: [/edx/src/]
  • Copy a translation file into that folder.
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).

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.
@openedx-webhooks openedx-webhooks added needs triage open-source-contribution PR author is not from Axim or 2U labels May 17, 2022
@openedx-webhooks

Copy link
Copy Markdown

Thanks for the pull request, @keithgg! I've created OSPR-6687 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:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

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.

@keithgg keithgg changed the title feat: add PREPEND_LOCALE_PATHS configuration setting feat: add PREPEND_LOCALE_PATHS configuration setting to Maple May 17, 2022

@pkulkark pkulkark left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍

@keithgg

keithgg commented Jun 22, 2022

Copy link
Copy Markdown
Contributor Author

@natabene can I get a review on this?

@natabene

Copy link
Copy Markdown
Contributor

@keithgg Thank you for bringing this to my attention. Somehow this was missed.

@natabene

Copy link
Copy Markdown
Contributor

@BbrSofiane Could you please line this up for your review? CC @jmbowman Just in case your team prefers to review.

@BbrSofiane

Copy link
Copy Markdown
Contributor

@openedx-community-bot merge

@github-actions
github-actions Bot merged commit b006046 into openedx:open-release/maple.master Jul 3, 2022
@openedx-webhooks

Copy link
Copy Markdown

@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.

@Agrendalath
Agrendalath deleted the keith/se_5299_maple_cherry_pick branch September 27, 2022 09:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

automerge open-source-contribution PR author is not from Axim or 2U

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants