-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
Added Magento_TranslationGraphQl module to support PWA Studio Localization #27600
Added Magento_TranslationGraphQl module to support PWA Studio Localization #27600
Conversation
Hi @chris-brabender. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
@magento give me test instance |
Hi @zetlen. Thank you for your request. I'm working on Magento instance for you |
Hi @zetlen, here is your new Magento instance. |
@magento run all tests |
We pass store header right now for all requests, and based on this header we might resolver what language should be used for all translatable attributes. Translations might be part of PWA application and all the translations would be built-in while assembling of PWA app. If we would introduce independent translation endpoint This PR was not created to Arch repo, so no one from our team had an ability to review it |
@maghamed I will put the PR on hold so we can review the design. |
@davemacaulay @nrkapoor Hi guys, can you please suggest the priority/severity for this pull request to correctly facilitate the processing. |
@sivaschenko this is no longer needed as we implemented a different solution for i18n in PWA. |
Hi @chris-brabender, thank you for your contribution! |
Description (*)
This pull request adds a GraphQL module for the Magento_Translation module. It creates two GraphQL queries to:
This feature is to support the Localization tasks in the PWA Studio Project - magento/pwa-studio#669
In the PWA Studio project, a Buildpack command extracts phrases from the PWA Project and requests translated phrases from the Magento backend. This effort is to allow PWA Studio to feature localisation and multiple store views. The Available Locales query is used by PWA Studio Buildpack to know what locales it should query for.
Related Pull Requests
PWA Studio work (pending finalisation and review) - https://github.com/magento/pwa-studio/compare/develop...chris-brabender:feature/prototype-v2?expand=1
Manual testing scenarios (*)
Using postman for example, you can provide a GraphQL payload similar to:
{ translate ( locale: "fr_CA" phrases: ["General", "Add to Cart", "Api Keys", "Behavior"] ) { items { original translated } } }
This assumes you have a French language pack installed.
Contribution checklist (*)