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 #355

Merged

Conversation

hopewise
Copy link
Contributor

@hopewise hopewise commented Oct 21, 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 all Transifex related Makefile targets and other files.

Test results

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

# Output of the commmands:

make extract_translations
npm ci
npm WARN prepare removing existing node_modules/ before installation

> @fortawesome/[email protected] postinstall /Users/sadaftech/Documents/zeit-labs/frontend-component-footer/node_modules/@fortawesome/fontawesome-common-types
> node attribution.js

Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com
License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
Copyright 2023 Fonticons, Inc.


> @fortawesome/[email protected] postinstall /Users/sadaftech/Documents/zeit-labs/frontend-component-footer/node_modules/@fortawesome/free-solid-svg-icons
> node attribution.js

Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com
License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
Copyright 2023 Fonticons, Inc.


> @fortawesome/[email protected] postinstall /Users/sadaftech/Documents/zeit-labs/frontend-component-footer/node_modules/@fortawesome/free-regular-svg-icons
> node attribution.js

Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com
License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
Copyright 2023 Fonticons, Inc.


> @fortawesome/[email protected] postinstall /Users/sadaftech/Documents/zeit-labs/frontend-component-footer/node_modules/@fortawesome/free-brands-svg-icons
> node attribution.js

Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com
License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
Copyright 2023 Fonticons, Inc.


> @fortawesome/[email protected] postinstall /Users/sadaftech/Documents/zeit-labs/frontend-component-footer/node_modules/@fortawesome/fontawesome-svg-core
> node attribution.js

Font Awesome Free 6.4.2 by @fontawesome - https://fontawesome.com
License - https://fontawesome.com/license/free (Icons: CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)
Copyright 2023 Fonticons, Inc.


> [email protected] install /Users/sadaftech/Documents/zeit-labs/frontend-component-footer/node_modules/sharp
> (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)

sharp: Using cached /Users/sadaftech/.npm/_cacache/_libvips/libvips-8.14.5-darwin-x64.tar.br
sharp: Integrity check passed for darwin-x64

> [email protected] postinstall /Users/sadaftech/Documents/zeit-labs/frontend-component-footer/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"


> [email protected] postinstall /Users/sadaftech/Documents/zeit-labs/frontend-component-footer/node_modules/core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"

added 1966 packages in 31.509s
# Pulling display strings from .jsx files into .json files...
rm -rf ./temp/babel-plugin-formatjs
npm run-script i18n_extract

> @edx/[email protected] i18n_extract /Users/sadaftech/Documents/zeit-labs/frontend-component-footer
> fedx-scripts formatjs extract

Running with resolved config:
/Users/sadaftech/Documents/zeit-labs/frontend-component-footer/babel.config.js

# Gathering JSON messages into one file...
./node_modules/.bin/transifex-utils.js ./temp/babel-plugin-formatjs ./src/i18n/transifex_input.json

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

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Oct 21, 2023
@mphilbrick211 mphilbrick211 added the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Oct 23, 2023
@e0d
Copy link

e0d commented Oct 24, 2023

@hopewise looks like there are some test failures.

@e0d e0d removed the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Oct 24, 2023
@hopewise hopewise force-pushed the samir/frontend-component-footer branch from 9a8de9d to 285d95f Compare October 28, 2023 14:06
@hopewise
Copy link
Contributor Author

a new line added to the src/i18n/index.js, to allow test to pass.

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.

Please remove the pull_translations step altogether. Other MFEs will pull translations for the footer.

Makefile Outdated
# Pushing comments to Transifex...
./node_modules/@edx/reactifex/bash_scripts/put_comments_v3.sh

# Pulls translations from Transifex.
pull_translations:
Copy link
Member

Choose a reason for hiding this comment

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

@hopewise this one is tricky. For Paragon, header and footer and all other libs, there will be no pull or push step.

Please remove pull_translations completely from this file.

The only translation step needed for Paragon, header and footer is the extract_translations step.

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 removed the pull_translations and shared the extract_translations result above.

@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-component-footer branch 2 times, most recently from 49a6cb7 to 97e7abe Compare November 10, 2023 12:00
Copy link

codecov bot commented Nov 10, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 90.74%. Comparing base (5c0ac3d) to head (97e7abe).
Report is 15 commits behind head on master.

❗ Current head 97e7abe differs from pull request most recent head dcb7e05. Consider uploading reports for the commit dcb7e05 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #355      +/-   ##
==========================================
+ Coverage   89.09%   90.74%   +1.64%     
==========================================
  Files           6        5       -1     
  Lines          55       54       -1     
  Branches       18       18              
==========================================
  Hits           49       49              
+ Misses          6        5       -1     

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

@OmarIthawi OmarIthawi self-requested a review November 10, 2023 14:46
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.

Looks good. I've merged one fix.

src/i18n/index.js Outdated Show resolved Hide resolved
@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 06:53
@OmarIthawi OmarIthawi force-pushed the samir/frontend-component-footer branch 2 times, most recently from 40ad7a4 to 0bfa1f3 Compare March 17, 2024 13:11
@OmarIthawi
Copy link
Member

@timmc-edx this one is ready but pending 2U approval.

cc: @brian-smith-tcril

@OmarIthawi OmarIthawi force-pushed the samir/frontend-component-footer branch from 0bfa1f3 to 35b982f Compare March 23, 2024 04:06
@OmarIthawi
Copy link
Member

@brian-smith-tcril rebased.

@OmarIthawi OmarIthawi force-pushed the samir/frontend-component-footer branch from 35b982f to dcb7e05 Compare March 25, 2024 15:15
@OmarIthawi
Copy link
Member

@brian-smith-tcril rebased :)

@brian-smith-tcril brian-smith-tcril merged commit 89ad723 into openedx:master Mar 25, 2024
5 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
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

7 participants