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: use atlas in make pull_translations #278

Merged
merged 1 commit into from
May 9, 2023

Conversation

OmarIthawi
Copy link
Member

@OmarIthawi OmarIthawi commented Apr 26, 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.

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

Testing

  • Fix tests and lint rules
  • Test pulled translations
  • Quick QA for translated content:
    ScreenshotYeah, not much strings. But just to test the UI after $ OPENEDX_ATLAS_PULL=yes make pull_translations: image

Anyone merging to this repository is expected to release and monitor their changes; if you are not able to do this DO NOT MERGE, please coordinate with someone who can to ensure that the changes are released.

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/

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

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.

@codecov
Copy link

codecov bot commented Apr 26, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (1ef0847) 50.00% compared to head (140273c) 50.00%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #278   +/-   ##
=======================================
  Coverage   50.00%   50.00%           
=======================================
  Files          15       15           
  Lines         164      164           
  Branches       28       28           
=======================================
  Hits           82       82           
  Misses         77       77           
  Partials        5        5           
Impacted Files Coverage Δ
src/i18n/index.js 0.00% <0.00%> (ø)
src/index.jsx 0.00% <ø> (ø)

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Copy link

@brian-smith-tcril brian-smith-tcril left a comment

Choose a reason for hiding this comment

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

From what I can tell the codecov issue can be ignored. LGTM!

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.
@brian-smith-tcril
Copy link

@colinbrash the spreadsheet has you listed as "Review required from:", any chance you could review/merge this one?

@brian-smith-tcril brian-smith-tcril merged commit 938d3e1 into openedx:master May 9, 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.

regisb pushed a commit to regisb/frontend-app-ecommerce that referenced this pull request Jun 12, 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.

Refs: [FC-0012 project](https://openedx.atlassian.net/l/cp/XGS0iCcQ) implementing Translation Infrastructure OEP-58.
arbrandes pushed a commit that referenced this pull request Jun 12, 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.

Refs: [FC-0012 project](https://openedx.atlassian.net/l/cp/XGS0iCcQ) implementing Translation Infrastructure OEP-58.
grmartin added a commit that referenced this pull request Aug 29, 2023
* Update standard workflow files. (#263)

* build: Create a missing workflow file `self-assign-issue.yml`.

The .github/workflows/self-assign-issue.yml workflow is missing or needs an update to stay in
sync with the current standard for this workflow as defined in the
`.github` repo of the `openedx` GitHub org.

* build: Create a missing workflow file `add-remove-label-on-comment.yml`.

The .github/workflows/add-remove-label-on-comment.yml workflow is missing or needs an update to stay in
sync with the current standard for this workflow as defined in the
`.github` repo of the `openedx` GitHub org.

* build: Update a workflow file `add-depr-ticket-to-depr-board.yml`.

The .github/workflows/add-depr-ticket-to-depr-board.yml workflow is missing or needs an update to stay in
sync with the current standard for this workflow as defined in the
`.github` repo of the `openedx` GitHub org.

* chore(i18n): add more languages (#261)

* chore(i18n): add more languages

* chore(i18n): Pylint fixes

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

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: upgraded to node v18, added .nvmrc and updated workflows (#274)

* feat: upgraded to node v18, added .nvmrc and updated workflows

* build: update frontrnf-build

* build: upgrade pkgs

* build: update @edx/browserslist-config to the latest

* refactor: update packages

* feat: add subscriptions section to orders page (#289)

* feat: design changes for subscriptions (#276)

* feat: api integration for subscription related changes (#282)

* feat: add manage subscriptions url and update subscription upsell (#288)

* test: add more tests for subscriptions

---------

Co-authored-by: Nawfal Ahmed <111358247+NawfalAhmed@users.noreply.github.com>
Co-authored-by: Nawfal Ahmed <nawfal.ahmed@arbisoft.com>

* fix: fix getting b2c subscriptions flag for stage (#290)

* refactor: update components and utils folder structure

* feat: improve subscription section and add basic alerts

* fix: revert change to container (#292)

* Automate Browserlist DB Update (#221)

* feat: added cron github action to auto update brwoserlist DB periodically

* refactor: used a shared script to update broswerslist DB, create PR and automerge it

* Paragon table deprecation migration to DataTable (#200)

* refactor: changed derecated table component to datatable

* refactor: fixed warning of missing props

* refactor: changed DataTable to DataTable.Table as suggested in code review

* refactor: used DataTable.Table directly to remove count

* fix: fixed pagination styling issue

* fix: fixed snapshot test

* PON-251: Update Existing Error Handling (#294)

* feat: update order history error flows

* refactor: remove unused AsyncActionType, favour saga routines over this

* fix: add sr message to loading, fix order history loading

* test: add more tests for coverage

* feat: update error UX for manage subscriptions (#299)

* chore(i18n): update translations (#301)

Co-authored-by: Jenkins <sre+jenkins@edx.org>

* feat: handle subscription api statuscode flag (#304)

* feat: add translations for subscription state badges (#305)

* fix: fix unmarked translations (#306)

* chore(i18n): update translations

* chore(i18n): update translations (#308)

Co-authored-by: Jenkins <sre+jenkins@edx.org>

* feat: add subscriptions marketing url (#309)

* docs: update readme to reflect recent subscription changes (#312)

* feat: move subscription upsell values behind env (#314)

* feat: use react-testing-library for detailed unit tests (#316)

* feat: use react-testing-library for tests

* feat: update tests for Subscriptions

* feat: update tests for NotFoundPage

* feat: update tests for ManageSubscriptions

* feat: update tests for OrdersandSubscriptions

* chore: added CODEOWNERS file to enable branch protection policy (REV-3441) (#283)

* chore: added CODEOWNERS file to enable branch protection policy

* fix: updated @edx/revenue-squad team tag

* fix: updated @openedx/revenue-squad team tag

* chore: added self check for CODEOWNERS file and updated file path to /src

* feat: disable subscriptions for local (#318)

* Removed subscription section from Readme file (#322)

* fix: removed subscription section and subs screenshot from readme file

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

* feat: update react & react-dom to v17

* build: update edx pkgs

* build: update lock file

---------

Co-authored-by: Feanil Patel <feanil@tcril.org>
Co-authored-by: Yoiber <105317298+Yoiber071@users.noreply.github.com>
Co-authored-by: Omar Al-Ithawi <i@omardo.com>
Co-authored-by: Mashal Malik <107556986+Mashal-m@users.noreply.github.com>
Co-authored-by: Shafqat Farhan <shafqat.farhan@arbisoft.com>
Co-authored-by: Nawfal Ahmed <111358247+NawfalAhmed@users.noreply.github.com>
Co-authored-by: Nawfal Ahmed <nawfal.ahmed@arbisoft.com>
Co-authored-by: Muhammad Abdullah Waheed <42172960+abdullahwaheed@users.noreply.github.com>
Co-authored-by: edx-transifex-bot <edx-transifex-bot@users.noreply.github.com>
Co-authored-by: Jenkins <sre+jenkins@edx.org>
Co-authored-by: Muhammad Mattiullah <50130127+MuhammadMattiullah@users.noreply.github.com>
Co-authored-by: Shahroz Ahmad <97090106+ishahroz@users.noreply.github.com>
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.

None yet

3 participants