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: use atlas in make pull_translations #325

Merged
merged 1 commit into from
May 9, 2023

Conversation

OmarIthawi
Copy link
Member

@OmarIthawi OmarIthawi commented Apr 26, 2023

Changes

  • Bump frontend-platform to bring intl-imports.js script
  • Move all i18n imports into src/i18n/index.js so intl-imports.js can override it with latest translations
  • Add atlas into make pull_translations when OPENEDX_ATLAS_PULL environment variable is set.

Testing

  • Fix tests and lint rules
  • Test pulled translations
  • Quick QA for translated content: It doesn't break, which is a good thing:
    Screenshotimage
  • Fix the language issue bug: The dashboard doesn't respect the language cookie setting #328 is out of scope
  • Documentation and test plan updated, if applicable
  • Received code-owner approving review
  • Bumped version number

Reviewer Checklist

Collectively, these should be completed by reviewers of this PR:

  • I've done a visual code review
  • I've tested the new functionality

FYI: @openedx/content-aurora

References

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

Up-to-date project overview and details are available in the Approach Memo and Technical Discovery: Translations Infrastructure Implementation document.

Join the conversation on Open edX Slack #translations-project-fc-0012.

Check the links above for full information about the overall project.

Internalization is being rearchitected in Open edX Python, XBlock, Micro-frontend, and other projects. There are a number of immediately visible changes:

  • Remove source and language translations from the repositories, hence no .json, .po or .mo files will be committed into the repos.
  • Add standardized make extract_translations in all repositories
  • Push user-facing messages strings into openedx/openedx-translations.
  • Integrate root repositories with openedx/openedx-atlas to pull translations on build/deploy time

Breaking Changes

One of the primary goals of the project is to avoid breaking changes. If you noticed any suspicious code, please raise your concern. But before that, please know the strategy we're following to avoid breaking changes:

For Micro-frontends:

  • Legacy hardcoded translations are kept into the repo.
  • Consolidate all i18n imports into src/i18n/index.js
  • Add atlas integration in make pull_translations but only if OPENEDX_ATLAS_PULL is set
  • Bump frontend-platform and use intl-imports.js to generate up to date import files
  • If translations is missing, they're added according to the latest Micro-frontend i18n pattern in par with https://github.com/openedx/frontend-template-application/

@OmarIthawi OmarIthawi requested a review from a team as a code owner April 26, 2023 20:16
@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Apr 26, 2023
@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.

@codecov
Copy link

codecov bot commented Apr 26, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (6778948) 100.00% compared to head (3dc9212) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #325   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          122       123    +1     
  Lines         1274      1274           
  Branches       250       250           
=========================================
  Hits          1274      1274           
Impacted Files Coverage Δ
...iew/EditModal/OverrideTable/AdjustedGradeInput.jsx 100.00% <ø> (ø)
src/components/GradesView/GradebookTable/index.jsx 100.00% <ø> (ø)
src/data/selectors/grades.js 100.00% <ø> (ø)
src/index.jsx 100.00% <ø> (ø)
src/i18n/index.js 100.00% <100.00%> (ø)
src/i18n/utils.js 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@brian-smith-tcril
Copy link
Contributor

@OmarIthawi looks like this has conflicts again. @mphilbrick211 this repo is still listed as "Need edX answer" on the spreadsheet. Is there someone specific I should tag on this so Omar doesn't need to keep updating this PR to resolve conflicts?

@brian-smith-tcril
Copy link
Contributor

@OmarIthawi looks like tests are failing on this one now, are they passing locally for you?

@brian-smith-tcril brian-smith-tcril added the waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. label May 3, 2023
@OmarIthawi
Copy link
Member Author

@OmarIthawi looks like tests are failing on this one now, are they passing locally for you?

no, they aren't. I'm working on fixing them.

@OmarIthawi OmarIthawi force-pushed the atlas branch 2 times, most recently from 858e031 to 04ed762 Compare May 5, 2023 00:11
Changes
-------
 - Bump frontend-platform to bring `intl-imports.js` script
 - Move all i18n imports into `src/i18n/index.js` so `intl-imports.js` can
   override it with latest translations
 - Add `atlas` into `make pull_translations` when `OPENEDX_ATLAS_PULL`
   environment variable is set.
 - Refactored i18n utils into own file to avoid overwriting them by
   atlas

Refs: [FC-0012 project](https://openedx.atlassian.net/l/cp/XGS0iCcQ) implementing Translation Infrastructure OEP-58.
@OmarIthawi
Copy link
Member Author

Now tests are fixed. cc: @brian-smith-tcril

@brian-smith-tcril brian-smith-tcril removed the waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. label May 8, 2023
@brian-smith-tcril
Copy link
Contributor

@mattcarter this one should be good to go!

@brian-smith-tcril brian-smith-tcril merged commit ae1702d into openedx:master May 9, 2023
@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.

muselesscreator pushed a commit that referenced this pull request May 15, 2023
Changes
-------
 - Bump frontend-platform to bring `intl-imports.js` script
 - Move all i18n imports into `src/i18n/index.js` so `intl-imports.js` can
   override it with latest translations
 - Add `atlas` into `make pull_translations` when `OPENEDX_ATLAS_PULL`
   environment variable is set.
 - Refactored i18n utils into own file to avoid overwriting them by
   atlas

Refs: [FC-0012 project](https://openedx.atlassian.net/l/cp/XGS0iCcQ) implementing Translation Infrastructure OEP-58.
johanseto pushed a commit to nelc/frontend-app-gradebook that referenced this pull request Apr 19, 2024
Changes
-------
 - Bump frontend-platform to bring `intl-imports.js` script
 - Move all i18n imports into `src/i18n/index.js` so `intl-imports.js` can
   override it with latest translations
 - Add `atlas` into `make pull_translations` when `OPENEDX_ATLAS_PULL`
   environment variable is set.
 - Refactored i18n utils into own file to avoid overwriting them by
   atlas

Refs: [FC-0012 project](https://openedx.atlassian.net/l/cp/XGS0iCcQ) implementing Translation Infrastructure OEP-58.
(cherry picked from commit ae1702d)
johanseto pushed a commit to nelc/frontend-app-gradebook that referenced this pull request Apr 26, 2024
Changes
-------
 - Bump frontend-platform to bring `intl-imports.js` script
 - Move all i18n imports into `src/i18n/index.js` so `intl-imports.js` can
   override it with latest translations
 - Add `atlas` into `make pull_translations` when `OPENEDX_ATLAS_PULL`
   environment variable is set.
 - Refactored i18n utils into own file to avoid overwriting them by
   atlas

Refs: [FC-0012 project](https://openedx.atlassian.net/l/cp/XGS0iCcQ) implementing Translation Infrastructure OEP-58.
(cherry picked from commit ae1702d)
johanseto pushed a commit to nelc/frontend-app-gradebook that referenced this pull request Apr 26, 2024
Changes
-------
 - Bump frontend-platform to bring `intl-imports.js` script
 - Move all i18n imports into `src/i18n/index.js` so `intl-imports.js` can
   override it with latest translations
 - Add `atlas` into `make pull_translations` when `OPENEDX_ATLAS_PULL`
   environment variable is set.
 - Refactored i18n utils into own file to avoid overwriting them by
   atlas

Refs: [FC-0012 project](https://openedx.atlassian.net/l/cp/XGS0iCcQ) implementing Translation Infrastructure OEP-58.
(cherry picked from commit ae1702d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

3 participants