Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat!: atlas pull for studio-frontend translations | FC-0012 #34261

Merged
merged 1 commit into from
Mar 6, 2024

Conversation

OmarIthawi
Copy link
Member

@OmarIthawi OmarIthawi commented Feb 20, 2024

Change

This pull request pulls translations via atlas for studio-frontend and refactor load_sfe_i18n_messages to load new translations into conf/plugins-locale/studio-frontend instead of relying on deprecated node.js package bundled translations.

Background

Studio Frontend is a Micro-frontend-like repository bundled in the the edx-platform.
Currently the edx-platform loads translations for studio-frontend from the node_modules package which assumes a pre-OEP-58 setup.

Breaking change

After merging this pull request, studio will require running either make OPENEDX_ATLAS_PULL=yes pull_translations or make pull_studio_frontend_translations during deployment or build to pull translations. Otherwise, it'll appear in English only.

Merge this change once 2U is aware of the change and accepts it.

We can make it backward-compatible, but the FC-0012 is already being closed so unless 2U object, we'll ship a breaking change.

Testing

  • Tests and lints passes
  • Test pull command on devstack:
devstack logs
$ tree conf/plugins-locale/studio-frontend/
conf/plugins-locale/studio-frontend/
├── ar.json
├── da.json
├── de_DE.json
├── de.json
├── es_419.json
├── es_ES.json
├── fr_CA.json
├── it_IT.json
├── pt_BR.json
├── pt_PT.json
├── ru.json
├── tr_TR.json
├── uk.json
└── zh_CN.json
  • Test languages in Studio on devstack
devstack screenshots

Original npm-package bundled translations

image

Using the edx-platform/conf/plugins-locale/studio-frontend empty directory

image

Using the edx-platform/conf/plugins-locale/studio-frontend pulled

image

Deadline

As soon as possible to fix minor remaining items of FC-0012 project.

Related

This pull request is part of the FC-0012 project which implements the Translation Infrastructure update OEP-58.

@openedx-webhooks
Copy link

Thanks for the pull request, @OmarIthawi! 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.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Feb 20, 2024
@OmarIthawi OmarIthawi changed the title feat: atlas pull for studio-frontend translations | FC-0012 feat!: atlas pull for studio-frontend translations | FC-0012 Feb 20, 2024
@OmarIthawi OmarIthawi force-pushed the sfe_translations branch 3 times, most recently from f9da08a to a7f81d0 Compare February 20, 2024 18:15
@itsjeyd itsjeyd added the core contributor PR author is a Core Contributor (who may or may not have write access to this repo). label Feb 23, 2024
@OmarIthawi
Copy link
Member Author

@timmc-edx this is one last piece to add atlas pull support for the studio-frontend react part of Studio.

Copy link
Contributor

@timmc-edx timmc-edx left a comment

Choose a reason for hiding this comment

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

Looks good!

I got an error when I ran the command EDX_PLATFORM_SETTINGS=production LMS_CFG=lms/envs/minimal.yml STUDIO_CFG=lms/envs/minimal.yml OPENEDX_ATLAS_PULL=true make pull_translations that we're using in deployments, but it looks like that's just because this branch doesn't have the change to minimal.yml from #34285. When I merged the two together locally, it worked fine. 👍

@OmarIthawi
Copy link
Member Author

Thanks @timmc-edx. I've rebased the branch so that should fix the issue.

@timmc-edx When do you plan to use atlas pull in production at 2U? Whenever that happens, this pull request should be ready to merge because I tried to save on having backward compatibility if 2U is the only organization pulling from master.

cc: @feanil @brian-smith-tcril for your review.

@timmc-edx
Copy link
Contributor

We started deploying LMS and Studio with atlas translations on Monday morning or so, so 2U is ready for this to merge whenever.

@timmc-edx timmc-edx merged commit 83f4487 into openedx:master Mar 6, 2024
47 checks passed
@openedx-webhooks
Copy link

@OmarIthawi 🎉 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-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production.

@edx-pipeline-bot
Copy link
Contributor

2U Release Notice: This PR has been deployed to the edX production environment.

rayzhou-bit pushed a commit that referenced this pull request Mar 6, 2024
This pull request pulls translations via atlas for `studio-frontend` and refactor `load_sfe_i18n_messages` to load new translations into `conf/plugins-locale/studio-frontend` instead of relying on deprecated node.js package bundled translations.
@OmarIthawi
Copy link
Member Author

We started deploying LMS and Studio with atlas translations on Monday morning or so, so 2U is ready for this to merge whenever.

That's great!! We're off for a great start :)

@OmarIthawi OmarIthawi deleted the sfe_translations branch March 12, 2024 13:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core contributor PR author is a Core Contributor (who may or may not have write access to this repo). 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.

6 participants