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

feat!: remove Transifex calls for OEP-58 | FC-0012 #351

Conversation

hopewise
Copy link
Contributor

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 commands:

make pull_translations
rm -rf src/i18n/messages
mkdir src/i18n/messages
cd src/i18n/messages \
      && atlas pull \
               translations/frontend-component-footer/src/i18n/messages:frontend-component-footer \
               translations/paragon/src/i18n/messages:paragon \
               translations/frontend-app-library-authoring/src/i18n/messages:frontend-app-library-authoring
Pulling translation files
 - directory: translations/frontend-component-footer/src/i18n/messages:frontend-component-footer translations/paragon/src/i18n/messages:paragon translations/frontend-app-library-authoring/src/i18n/messages:frontend-app-library-authoring
 - 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: 21, done.
remote: Counting objects: 100% (21/21), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 21 (delta 15), reused 16 (delta 12), pack-reused 0
Receiving objects: 100% (21/21), 19.41 KiB | 320.00 KiB/s, done.
Resolving deltas: 100% (15/15), done.
Your branch is up to date with 'origin/main'.
Done.
Copying translations from "./translations_TEMP/translations/frontend-component-footer/src/i18n/messages" to "./frontend-component-footer"...
Done.
Copying translations from "./translations_TEMP/translations/paragon/src/i18n/messages" to "./paragon"...
Done.
Copying translations from "./translations_TEMP/translations/frontend-app-library-authoring/src/i18n/messages" to "./frontend-app-library-authoring"...
Done.
Removing temporary directory...
Done.

Translations pulled successfully!
./node_modules/.bin/intl-imports.js frontend-component-footer paragon frontend-app-library-authoring

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 21, 2023
@openedx-webhooks
Copy link

openedx-webhooks commented Oct 21, 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.

@itsjeyd
Copy link

itsjeyd commented Oct 24, 2023

@hopewise Thank you for this contribution! Please let us know when the changes are ready for review.

@itsjeyd itsjeyd added the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Oct 24, 2023
@e0d e0d removed the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Oct 24, 2023
@OmarIthawi
Copy link
Contributor

OmarIthawi commented Oct 28, 2023

@itsjeyd this is now ready for review. Similar to other Transifex deprecation PRs, it shouldn't be merged yet:

We're continuing to create more pull requests like this in a total of ~40 PRs and keep them in draft until we get a greenlight from @brian-smith-tcril to merge them at once.

@itsjeyd itsjeyd added waiting for eng review PR is ready for review. Review and merge it, or suggest changes. blocked by other work PR cannot be finished until other work is complete labels Oct 31, 2023
@itsjeyd
Copy link

itsjeyd commented Oct 31, 2023

Sounds good @OmarIthawi, thank you for the update.

@jesperhodge
Copy link
Contributor

jesperhodge commented Nov 2, 2023

I'm doing my best to review this. So I followed the steps in the PR descriptions under "Test Results". I got an error when trying to test locally:

  1. I ran make dev.shell.frontend-app-library-authoring on my hosted-devstack
  2. make requirements worked
  3. make pull_translations gave me an error:
make pull_translations
rm -rf src/i18n/messages
mkdir src/i18n/messages
cd src/i18n/messages \
      && atlas pull \
               translations/frontend-component-footer/src/i18n/messages:frontend-component-footer \
               translations/paragon/src/i18n/messages:paragon \
               translations/frontend-app-library-authoring/src/i18n/messages:frontend-app-library-authoring
/bin/sh: 2: atlas: not found
make: *** [Makefile:38: pull_translations] Error 127

@itsjeyd itsjeyd added waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. and removed waiting for eng review PR is ready for review. Review and merge it, or suggest changes. labels Nov 8, 2023
@itsjeyd itsjeyd removed the blocked by other work PR cannot be finished until other work is complete label Feb 23, 2024
@hopewise hopewise marked this pull request as ready for review March 14, 2024 07:11
@OmarIthawi OmarIthawi force-pushed the samir/frontend-app-library-authoring branch from fbbae35 to d2af948 Compare March 17, 2024 13:32
Copy link
Contributor

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

@brian-smith-tcril @itsjeyd this one is ready for merge and approved by 2U

cc: @timmc-edx

@OmarIthawi
Copy link
Contributor

I'm doing my best to review this. So I followed the steps in the PR descriptions under "Test Results". I got an error when trying to test locally:

  1. I ran make dev.shell.frontend-app-library-authoring on my hosted-devstack
  2. make requirements worked
  3. make pull_translations gave me an error:
make pull_translations
rm -rf src/i18n/messages
mkdir src/i18n/messages
cd src/i18n/messages \
      && atlas pull \
               translations/frontend-component-footer/src/i18n/messages:frontend-component-footer \
               translations/paragon/src/i18n/messages:paragon \
               translations/frontend-app-library-authoring/src/i18n/messages:frontend-app-library-authoring
/bin/sh: 2: atlas: not found
make: *** [Makefile:38: pull_translations] Error 127

Sorry for the delayed feedback @jesperhodge

Please either install atlas locally or follow the steps below:

npm ci
PATH=$PATH:./node_modules/.bin/ make pull_translations

This should use the ./node_modules/bin/atlas binary, which fixes the issue you've posted

Copy link

codecov bot commented Mar 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 53.14%. Comparing base (27bb70e) to head (51253ab).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #351   +/-   ##
=======================================
  Coverage   53.14%   53.14%           
=======================================
  Files          80       80           
  Lines        2021     2021           
  Branches      368      368           
=======================================
  Hits         1074     1074           
  Misses        914      914           
  Partials       33       33           

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

@OmarIthawi OmarIthawi force-pushed the samir/frontend-app-library-authoring branch from d2af948 to 51253ab Compare March 20, 2024 11:57
@OmarIthawi
Copy link
Contributor

@brian-smith-tcril rebased.

@brian-smith-tcril brian-smith-tcril merged commit 7303f79 into openedx-unsupported:master Mar 21, 2024
7 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.

@itsjeyd itsjeyd removed the waiting on author PR author needs to resolve review requests, answer questions, fix tests, etc. label Mar 22, 2024
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.

7 participants