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

remove Transifex calls for OEP-58 #887

Merged

Conversation

hopewise
Copy link
Contributor

@hopewise hopewise commented Sep 29, 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 requirements
make requirements
npm ci
npm WARN prepare removing existing node_modules/ before installation

> core-js@2.6.12 postinstall /Users/sadaftech/Documents/zeit-labs/frontend-app-account/node_modules/babel-runtime/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"


> core-js@3.32.2 postinstall /Users/sadaftech/Documents/zeit-labs/frontend-app-account/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"


> @fortawesome/fontawesome-common-types@0.2.36 postinstall /Users/sadaftech/Documents/zeit-labs/frontend-app-account/node_modules/@fortawesome/free-solid-svg-icons/node_modules/@fortawesome/fontawesome-common-types
> node attribution.js

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


> @fortawesome/free-solid-svg-icons@5.15.4 postinstall /Users/sadaftech/Documents/zeit-labs/frontend-app-account/node_modules/@fortawesome/free-solid-svg-icons
> node attribution.js

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


> @fortawesome/fontawesome-common-types@0.2.36 postinstall /Users/sadaftech/Documents/zeit-labs/frontend-app-account/node_modules/@fortawesome/free-regular-svg-icons/node_modules/@fortawesome/fontawesome-common-types
> node attribution.js

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


> @fortawesome/free-regular-svg-icons@5.15.4 postinstall /Users/sadaftech/Documents/zeit-labs/frontend-app-account/node_modules/@fortawesome/free-regular-svg-icons
> node attribution.js

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


> @fortawesome/fontawesome-common-types@0.2.36 postinstall /Users/sadaftech/Documents/zeit-labs/frontend-app-account/node_modules/@fortawesome/free-brands-svg-icons/node_modules/@fortawesome/fontawesome-common-types
> node attribution.js

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


> @fortawesome/free-brands-svg-icons@5.15.4 postinstall /Users/sadaftech/Documents/zeit-labs/frontend-app-account/node_modules/@fortawesome/free-brands-svg-icons
> node attribution.js

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


> @fortawesome/fontawesome-common-types@0.2.36 postinstall /Users/sadaftech/Documents/zeit-labs/frontend-app-account/node_modules/@fortawesome/fontawesome-svg-core/node_modules/@fortawesome/fontawesome-common-types
> node attribution.js

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


> @fortawesome/fontawesome-svg-core@1.2.36 postinstall /Users/sadaftech/Documents/zeit-labs/frontend-app-account/node_modules/@fortawesome/fontawesome-svg-core
> node attribution.js

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


> @fortawesome/fontawesome-common-types@6.4.2 postinstall /Users/sadaftech/Documents/zeit-labs/frontend-app-account/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/fontawesome-svg-core@6.4.2 postinstall /Users/sadaftech/Documents/zeit-labs/frontend-app-account/node_modules/@edx/paragon/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.


> @fortawesome/fontawesome-svg-core@6.4.2 postinstall /Users/sadaftech/Documents/zeit-labs/frontend-app-account/node_modules/@edx/frontend-component-header/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.


> core-js@2.6.12 postinstall /Users/sadaftech/Documents/zeit-labs/frontend-app-account/node_modules/babel-polyfill/node_modules/core-js
> node -e "try{require('./postinstall')}catch(e){}"


> @fortawesome/free-solid-svg-icons@6.4.2 postinstall /Users/sadaftech/Documents/zeit-labs/frontend-app-account/node_modules/@edx/frontend-component-header/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/free-regular-svg-icons@6.4.2 postinstall /Users/sadaftech/Documents/zeit-labs/frontend-app-account/node_modules/@edx/frontend-component-header/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/free-brands-svg-icons@6.4.2 postinstall /Users/sadaftech/Documents/zeit-labs/frontend-app-account/node_modules/@edx/frontend-component-header/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/fontawesome-svg-core@6.4.2 postinstall /Users/sadaftech/Documents/zeit-labs/frontend-app-account/node_modules/@edx/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.


> @fortawesome/free-solid-svg-icons@6.4.2 postinstall /Users/sadaftech/Documents/zeit-labs/frontend-app-account/node_modules/@edx/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/free-regular-svg-icons@6.4.2 postinstall /Users/sadaftech/Documents/zeit-labs/frontend-app-account/node_modules/@edx/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/free-brands-svg-icons@6.4.2 postinstall /Users/sadaftech/Documents/zeit-labs/frontend-app-account/node_modules/@edx/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.


> sharp@0.32.5 install /Users/sadaftech/Documents/zeit-labs/frontend-app-account/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.4-darwin-x64.tar.br
sharp: Integrity check passed for darwin-x64

> core-js-pure@3.32.2 postinstall /Users/sadaftech/Documents/zeit-labs/frontend-app-account/node_modules/core-js-pure
> node -e "try{require('./postinstall')}catch(e){}"

added 1760 packages in 49.235s

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-component-footer/src/i18n/messages:frontend-component-footer \
               translations/frontend-component-header/src/i18n/messages:frontend-component-header \
               translations/frontend-app-account/src/i18n/messages:frontend-app-account
Pulling translation files
 - directory: translations/paragon/src/i18n/messages:paragon translations/frontend-component-footer/src/i18n/messages:frontend-component-footer translations/frontend-component-header/src/i18n/messages:frontend-component-header translations/frontend-app-account/src/i18n/messages:frontend-app-account
 - 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: 12, done.
remote: Counting objects: 100% (12/12), done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 12 (delta 5), reused 8 (delta 3), pack-reused 0
Receiving objects: 100% (12/12), 35.54 KiB | 438.00 KiB/s, done.
Resolving deltas: 100% (5/5), 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-component-footer/src/i18n/messages" to "./frontend-component-footer"...
Done.
Copying translations from "./translations_TEMP/translations/frontend-component-header/src/i18n/messages" to "./frontend-component-header"...
Done.
Copying translations from "./translations_TEMP/translations/frontend-app-account/src/i18n/messages" to "./frontend-app-account"...
Done.
Removing temporary directory...
Done.

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



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

openedx-webhooks commented Sep 29, 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.

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.

Thanks Samir! One comment.

Makefile Outdated
# Pulls translations from Transifex.
pull_translations:
tx pull -t -f --mode reviewed --languages=$(transifex_langs)
else
# Experimental: OEP-58 Pulls translations using atlas
Copy link
Member

Choose a reason for hiding this comment

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

Please remove this comment.

When this pull request is merged, OEP-58 is no longer experimental.

Suggested change
# Experimental: OEP-58 Pulls translations using atlas

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Makefile Outdated
@@ -1,6 +1,4 @@
export TRANSIFEX_RESOURCE = frontend-app-account
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
export TRANSIFEX_RESOURCE = frontend-app-account

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

Done

@hopewise hopewise force-pushed the samir/frontend-app-account branch 3 times, most recently from c12bb47 to ce8e7b7 Compare September 29, 2023 11:21
@OmarIthawi
Copy link
Member

Thanks @hopewise. We need to add one more item before we can conclude this PR:

@OmarIthawi
Copy link
Member

Thanks for posting the test results @hopewise: https://gist.github.com/hopewise/9b395e29af53a97e3724f48a76603394
One more change.

The commit message should have the prefix feat!: . So it should become feat! remove Transifex calls for OEP-58. Similar to the openedx/frontend-app-gradebook#353.

@hopewise hopewise force-pushed the samir/frontend-app-account branch 3 times, most recently from 3c77124 to 00be345 Compare October 1, 2023 13:43
@codecov
Copy link

codecov bot commented Oct 2, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 56.55%. Comparing base (2416782) to head (d97c6a3).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #887      +/-   ##
==========================================
+ Coverage   56.53%   56.55%   +0.02%     
==========================================
  Files         118      117       -1     
  Lines        2457     2456       -1     
  Branches      654      654              
==========================================
  Hits         1389     1389              
+ Misses        997      996       -1     
  Partials       71       71              

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

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 great. Thanks @hopewise.

Let's wait for the openedx/wg-translations#20 to be approved before making this as ready for merge.

@itsjeyd itsjeyd added the blocked by other work PR cannot be finished until other work is complete label Nov 2, 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 06:45
@OmarIthawi
Copy link
Member

@itsjeyd @timmc-edx @brian-smith-tcril this one is ready for merge.

@brian-smith-tcril brian-smith-tcril merged commit 16caae0 into openedx:master Mar 18, 2024
9 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.

5 participants