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!: remove Transifex calls for OEP-58 | FC-0012 #1060

Merged

Conversation

hopewise
Copy link
Contributor

@hopewise hopewise commented Oct 14, 2023

Breaking change!

This change breaks the Jenkins transifex integration which has been deprecated in favor of the new GitHub Transifex App integration as part of OEP-58.

Changes

  • Removes all direct use of tx pull and tx push commands from the micro-frontend in favor
    of the atlas pull command.
  • Remove source and language translations from the repositories, hence no .json files will be committed into the repos.
  • src/i18n/index.js should export and empty array so the make pull_translations override it with the dynamic list of languages.
  • Remove the experimental OPENEDX_ATLAS_PULL flag to make atlas pull the default.
  • Remove all Transifex related Makefile targets and other files.

Test results

  • Verify that make pull_translations works as expected.
make pull_translations test results
# I've run the following commands:
$ make requirements
$ make pull_translations
$ git diff

# Output of the commmands:

make pull_translations
rm -rf src/i18n/messages
mkdir src/i18n/messages
cd src/i18n/messages \
	  && atlas pull \
	           translations/paragon/src/i18n/messages:paragon \
	           translations/frontend-app-admin-portal/src/i18n/messages:frontend-app-admin-portal
Pulling translation files
 - directory: translations/paragon/src/i18n/messages:paragon translations/frontend-app-admin-portal/src/i18n/messages:frontend-app-admin-portal
 - repository: openedx/openedx-translations
 - branch: main
 - filter: Not Specified
 - expand-glob: Not Specified
Creating a temporary Git repository to pull translations into "./translations_TEMP"...
Done.
Setting git sparse-checkout rules...
Done.
Pulling translation files from the repository...
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 2), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (3/3), 2.89 KiB | 2.89 MiB/s, done.
Resolving deltas: 100% (2/2), done.
Your branch is up to date with 'origin/main'.
Done.
Copying translations from "./translations_TEMP/translations/paragon/src/i18n/messages" to "./paragon"...
Done.
Copying translations from "./translations_TEMP/translations/frontend-app-admin-portal/src/i18n/messages" to "./frontend-app-admin-portal"...
Skipped copying "./translations_TEMP/translations/frontend-app-admin-portal/src/i18n/messages" because it was not found in the repository.
Done.
Removing temporary directory...
Done.

Translations pulled successfully!
./node_modules/.bin/intl-imports.js paragon

Merge timeline

This should only be merged after Translation Infrastructure update OEP-58 is fully implemented.

The timing announcement will be shared by @brian-smith-tcril on #translations-project-fc-0012 Open edX Slack channel.

Keep this pull request as a draft to prevent accidental merge.

Pre-merge checklist

References

This contribution 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.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Oct 14, 2023
@openedx-webhooks
Copy link

openedx-webhooks commented Oct 14, 2023

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

@mphilbrick211 mphilbrick211 added the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Oct 16, 2023
@codecov
Copy link

codecov bot commented Oct 17, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.46%. Comparing base (cbf66f8) to head (16ed48a).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1060   +/-   ##
=======================================
  Coverage   85.46%   85.46%           
=======================================
  Files         505      505           
  Lines       11025    11025           
  Branches     2318     2318           
=======================================
  Hits         9422     9422           
  Misses       1559     1559           
  Partials       44       44           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mphilbrick211 mphilbrick211 removed the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Oct 17, 2023
@OmarIthawi
Copy link
Member

OmarIthawi commented Oct 18, 2023

Thanks @hopewise.

I checked the error in the test results and here's how we should fix it:

Please create another pull request from master to do the following:

Why this is needed?

After the other pull request is merged, please rebase this pull request and the errors should go away.

@hopewise
Copy link
Contributor Author

@OmarIthawi I have applied the suggestions, but the error is still there when running make pull_translations

@itsjeyd itsjeyd added the blocked by other work PR cannot be finished until other work is complete label Nov 2, 2023
@hopewise hopewise force-pushed the samir/frontend-app-admin-portal branch 2 times, most recently from 56f0f4f to 99cb156 Compare November 4, 2023 09:14
Copy link
Member

@OmarIthawi OmarIthawi left a comment

Choose a reason for hiding this comment

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

@hopewise there's a typo in the Makefile, please fix it and the error should go away.

Makefile Outdated
@@ -1,5 +1,6 @@
transifex_utils = ./node_modules/.bin/transifex-utils.js
intl_imports = ./node_modules/frontend-platform-shim/node_modules/.bin/intl-imports.js
intl_imports = ./node_modules/frontend-platform/node_modules/.bin/intl-imports.js
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
intl_imports = ./node_modules/frontend-platform/node_modules/.bin/intl-imports.js
intl_imports = ./node_modules/.bin/intl-imports.js

Copy link
Contributor Author

@hopewise hopewise Nov 10, 2023

Choose a reason for hiding this comment

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

@OmarIthawi thanks, I've fixed it, but I got this error:

Translations pulled successfully!
./node_modules/.bin/intl-imports.js paragon frontend-app-admin-portal
intl-imports.js: Not creating 'frontend-app-admin-portal/index.js' because no .json translation files were found.
intl-imports.js: Skipped import due to missing 'frontend-app-admin-portal/index.js' likely due to empty translations.

as I noticed all translation files were downloaded to src/i18n/messages/paragon, I fixed the issue by setting $(intl_imports) paragon frontend-app-admin-portal to $(intl_imports) paragon, please check the PR again and test result.

@@ -1,11 +0,0 @@
{
Copy link
Member

Choose a reason for hiding this comment

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

In case you haven't, please run rm -rf packages/frontend-platform-shim/. This shim is no longer needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I already did this step

@hopewise hopewise force-pushed the samir/frontend-app-admin-portal branch 3 times, most recently from 9910204 to a4d1440 Compare November 10, 2023 11:53
Copy link
Member

@OmarIthawi OmarIthawi left a comment

Choose a reason for hiding this comment

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

Now it should work fine. Please check my latest comment @hopewise.

Makefile Outdated Show resolved Hide resolved
@itsjeyd
Copy link

itsjeyd commented Feb 8, 2024

Hey @OmarIthawi, I see that you reviewed and approved this PR last week. Just to confirm, it still needs to wait for Redwood, right?

@OmarIthawi
Copy link
Member

Hey @OmarIthawi, I see that you reviewed and approved this PR last week. Just to confirm, it still needs to wait for Redwood, right?

Yes I added one fix and the pull request is ready.

I'll check with @brian-smith-tcril and the timing and way we'll handle those pull requests but overall, they should be merged before Redwood anytime 2U is ready to accept this breaking change. Some breaking changes have happened already so we might be merging those pull requests soon.

@itsjeyd
Copy link

itsjeyd commented Feb 16, 2024

@OmarIthawi Thanks for the update!

A couple follow-up questions:

Yes I added one fix and the pull request is ready.

Would now be a good time for you to remove the PR from Draft state? :)

... those pull requests [...] should be merged before Redwood anytime 2U is ready to accept this breaking change.

  • You're referring to the PRs listed in Deprecate pre-OEP-58 Transifex scripts from all repositories wg-translations#20 here, right? In that case I think @mphilbrick211 and I could go ahead and remove the blocked by other work label from them. (It sounds like they're only blocked on 2U approval now, and not on any outstanding technical work.)

  • Are you already talking to 2U about getting the changes accepted and if so, could you point me to where that conversation is happening so I can start following it?

CC @brian-smith-tcril

@OmarIthawi
Copy link
Member

Would now be a good time for you to remove the PR from Draft state? :)

Unfortunatley no. We need 2U confirmation because these PRs affect those working from master.

But it's getting close:

It sounds like they're only blocked on 2U approval now, and not on any outstanding technical work

Yes. Besides merge conflicts, we think those PRs are ready.

@itsjeyd
Copy link

itsjeyd commented Feb 23, 2024

@OmarIthawi OK great, I'll go ahead and mark those PRs as unblocked, then.

And thanks for pointing me to the FC-0012 Slack channel! I joined it and will be checking it for updates going forward.

CC @mphilbrick211

@itsjeyd itsjeyd removed the blocked by other work PR cannot be finished until other work is complete label Feb 23, 2024
@OmarIthawi OmarIthawi force-pushed the samir/frontend-app-admin-portal branch 5 times, most recently from c393f4f to ccbf548 Compare March 17, 2024 11:27
@OmarIthawi
Copy link
Member

@hopewise please mark this one as "Ready for merge"

@timmc-edx please merge whenever you think it's ready for 2U

@OmarIthawi
Copy link
Member

@brian-smith-tcril @hopewise Kindly move out of Draft to Ready for merge

@brian-smith-tcril brian-smith-tcril marked this pull request as ready for review March 18, 2024 19:15
@itsjeyd itsjeyd added the waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. label Mar 22, 2024
@itsjeyd
Copy link

itsjeyd commented Mar 22, 2024

@OmarIthawi @hopewise Glad to see this project moving forward!

Looks like the changes will need a rebase. I'll leave the PR in Ready for merge, though.

@OmarIthawi OmarIthawi force-pushed the samir/frontend-app-admin-portal branch from ccbf548 to 16ed48a Compare March 22, 2024 16:01
@OmarIthawi
Copy link
Member

@itsjeyd done.

@brian-smith-tcril brian-smith-tcril merged commit f6df0a0 into openedx:master Mar 22, 2024
6 checks passed
@openedx-webhooks
Copy link

@hopewise 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

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 waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants