Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

feat: use atlas in make pull_translations #732

Merged
merged 1 commit into from
Jun 6, 2023

Conversation

OmarIthawi
Copy link
Contributor

@OmarIthawi OmarIthawi commented Apr 19, 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.
  • Fixed lint rules for frontend-platform@4.1.0

Refs: FC-0012 project implementing Translation Infrastructure OEP-58.

Checklist

  • Consider PCI compliance impact and whether this PR changes how credit card information is handled: No impact on credit card handling
  • Intend to release and monitor this PR promptly after merge.
  • Fix tests and lint rules
  • Test pulled translations
  • Quick QA for translated content:
    Screenshot
    image

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 19, 2023 16:10
@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Apr 19, 2023
@openedx-webhooks
Copy link

openedx-webhooks commented Apr 19, 2023

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.

@OmarIthawi OmarIthawi marked this pull request as draft April 20, 2023 13:27
@OmarIthawi OmarIthawi marked this pull request as ready for review April 24, 2023 09:02
package.json Outdated Show resolved Hide resolved
@brian-smith-tcril
Copy link
Contributor

@colinbrash this should be good to go, are you available to review/merge? I see you're listed on the spreadsheet as the required reviewer.

@brian-smith-tcril
Copy link
Contributor

@OmarIthawi looks like this needs another rebase. @colinbrash if you could coordinate with Omar to prevent repeated rebase pain that'd be amazing!

@OmarIthawi
Copy link
Contributor Author

@colinbrash this is rebased and ready for merge.

@brian-smith-tcril
Copy link
Contributor

@OmarIthawi looks like this has conflicts again

@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 8, 2023
@OmarIthawi
Copy link
Contributor Author

@brian-smith-tcril done.

@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 9, 2023
@colinbrash
Copy link

My apologies, I see I was tagged multiple times. I will move this along and also figure out my notifications!

@OmarIthawi
Copy link
Contributor Author

Thanks @colinbrash. Meanwhile, I'll rebase and fix conflicts.

@brian-smith-tcril
Copy link
Contributor

@colinbrash it looks like a couple more PRs made it in after @OmarIthawi did the rebase and now there are conflicts again...

@OmarIthawi
Copy link
Contributor Author

@colinbrash it looks like a couple more PRs made it in after @OmarIthawi did the rebase and now there are conflicts again...

Thanks @brian-smith-tcril for keeping an eye on the many PRs we have. I think there's a misunderstanding here.

image

The message above mostly says that other changes has been merged into master. No conflicts at the moment.

I've rebased the branch anyway.

cc: @colinbrash

@OmarIthawi
Copy link
Contributor Author

@colinbrash I've rebased the pull request once again.

I'd appreciate you taking a look and merge this PR if it works okay.

cc: @brian-smith-tcril

@brian-smith-tcril
Copy link
Contributor

@OmarIthawi looks like the CI is failing post-rebase, can you take a look?

@OmarIthawi
Copy link
Contributor Author

@brian-smith-tcril done. thanks for the notification.

Copy link
Contributor

@julianajlk julianajlk left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for adding the changes in this repo - I see frontend-app-ecommerce was already done. I will go ahead and merge/deploy this.

@OmarIthawi can you rebase from master one more time? I will keep an eye on this PR so we don't miss it

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.

Refs: [FC-0012 project](https://openedx.atlassian.net/l/cp/XGS0iCcQ) implementing Translation Infrastructure OEP-58.
@julianajlk julianajlk merged commit 737e3e2 into openedx-unsupported:master Jun 6, 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.

grmartin added a commit that referenced this pull request Aug 29, 2023
* chore(i18n): update translations

* feat: added transaction_declined error handler (#756)

* chore(i18n): update translations

* feat: use `atlas` in `make pull_translations` (#732)

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.

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

* feat: removed the Localized Currency for subscription (#758)

* PON-281: SDN error handling (#759)

* feat: fixed the program_tile italic and subscribe checkout state

* feat: added SDN error check with feedback saga

* test: fixed borken tests

* test: removed the screen.debug call

* feat: do not display any error alert on the checkout page for sdn

* fix: fixed the config name for feedback saga alert

* Mrazadar/pon 178/unit test checkout (#760)

* test: added stripe service unit test

* test: added api service unit test

* test: working on improving subscription checkout test

* test: checkout test with react-testing-library

* test: removed the commented code

* feat: (PON-326) updated localize date for billing (#764)

* refactor: the Legal support URL to used with env variable

* feat: add localize date with billing information

* test: fixed the broken tests

* refactor: updated SUBSCRIPTION_LEGAL_URL with LEARNER_SUPPORT_URL

* test: trying to fix the failing tests

* test: fixed the broken tests

* feat: update the LEARNER_SUPPORT_URL key

* feat: no localize date for resubscribe case

* fix: update allowlist to unblock translations pr (#767)

* chore(i18n): update translations

* feat: update react & react-dom to v17 (#761)

* feat: update react & react-dom to v17

* build: update paragon version

* refactor: updated edx packages

* refactor: updated header, footer, frontend-build & semver packages to resolve vulnerabilities

---------

Co-authored-by: Bilal Qamar <59555732+BilalQamar95@users.noreply.github.com>

* feat: 3DS checkout flow for subscriptions (#773)

* feat: 3DS iframe with modal implementation

* feat: 3DS removed commented code

* feat: 3DS added a redirect page

* feat: added subscription status saga methods

* feat: setting up the 3DS status redux sagas

* feat: handles the happy flow

* feat: updates the error message

* feat: updated styles as per stripe portal 3DS styles

* test: updated tests for subscription/service.tests.js

* test: added tests for subscriptions/data/utils

* feat: updated Secure3DModal to handle stripe-checkout-complete response

* feat: updated subscription status redux to handle stripe-checkout-complete

* feat: incorporated PR feedback

* test: added unit test for Secure3DModal

* feat: fixed the broken styles

* feat: added stripe redirect content-security-policy tag (#776)

* Mrazadar/pon 161/content security fix (#777)

* revert: the react-helmet

* feat: added content-security-policy meta tag at the top

* revert: removed the meta tag from index.html (#778)

* feat: added new relic logs for 3ds (#784)

* fix: Checkout Bulk purchase 'Max' alignment fixed (#781)

* fix: Checkout Bulk purchase 'Max' alignment fixed

* fix: Updated snapshots for cart & payment

* test: added temp logs for testing 3ds (#785)

* revert: removed the previously temporary new-relic logs

* feat: added console logs for loading 3ds details

* feat: removed previous logs and added new relic logs (#786)

* feat: change console to logInfo

* feat: added one more log

* feat: sending program_uuid with stripe-checkout-complete (#788)

* docs: add feedback.rst HOWTO (#782)

* docs: include error handling in feedback.rst title

* docs: move sub-TOCs to relevant sections for clarity

* docs: move feedback.rst sections around

* refactor: updated workflow (#775)

* feat: added readme docs for subscription feature (#793)

* feat: updating readme.md for subscription related work

* feat: added subscription related docs

* feat: fixed the code formatting

* refactor: remove the new relic logs previously added for 3DS testing

* feat: reverted the readme.rst changes

---------

Co-authored-by: Jenkins <sre+jenkins@edx.org>
Co-authored-by: Raza Dar <5585262+mrazadar@users.noreply.github.com>
Co-authored-by: Omar Al-Ithawi <i@omardo.com>
Co-authored-by: Juliana Kang <julianajlk@gmail.com>
Co-authored-by: Mashal Malik <107556986+Mashal-m@users.noreply.github.com>
Co-authored-by: Bilal Qamar <59555732+BilalQamar95@users.noreply.github.com>
Co-authored-by: Mobeen Ali <46916730+mobeenali12@users.noreply.github.com>
Co-authored-by: Phillip Shiu <pshiu@edx.org>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants