Skip to content

Conversation

@chihsuan
Copy link
Member

@chihsuan chihsuan commented Aug 25, 2022

All Submissions:

Changes proposed in this Pull Request:

This PR updates the get_product_data method to get translated contents from WCCOM.

How to test the changes in this Pull Request:

  1. Use a fresh site
  2. Go to Settings > General
  3. Change site language to Español
  4. Go to OBW
  5. Go to Product types step
  6. Click on an info icon (i)
  7. Observe that tooltip shows translated contents.

Screen Shot 2022-09-01 at 10 50 08

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?
  • Have you created a changelog file for each project being changed, ie pnpm changelog add --filter=<project>?

FOR PR REVIEWER ONLY:

  • I have reviewed that everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities. I made sure Linting is not ignored or disabled.

@github-actions github-actions bot added focus: react admin plugin: woocommerce Issues related to the WooCommerce Core plugin. labels Aug 25, 2022
@chihsuan chihsuan self-assigned this Aug 25, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Aug 25, 2022

Test Results Summary

Commit SHA: c123f41

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests11800201200m 53s
E2E Tests186001018714m 9s
To view the full API test report, click here.
To view the full E2E test report, click here.
To view all test reports, visit the WooCommerce Test Reports Dashboard.

@chihsuan chihsuan force-pushed the update/get-product-data-i18n branch from 156a76f to 0ecb3cf Compare September 1, 2022 02:50
@chihsuan chihsuan marked this pull request as ready for review September 1, 2022 02:54
@chihsuan chihsuan requested a review from a team September 1, 2022 02:55
@rjchow rjchow self-requested a review September 6, 2022 03:13
@rjchow rjchow force-pushed the update/get-product-data-i18n branch from 0ecb3cf to 1b0939a Compare September 6, 2022 03:42
Copy link
Contributor

@rjchow rjchow left a comment

Choose a reason for hiding this comment

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

This looks good! Thanks for working on these i18n details, it makes the product look a lot more polished

BTW - I had to clear the _transient_wc_onboarding_product_data option if I changed the language after installing woocommerce. The transient doesn't get invalidated upon language change.

I wonder if we should set the locale as part of the transient and re-fetch it it doesn't match?

@chihsuan chihsuan force-pushed the update/get-product-data-i18n branch from 1b0939a to 50af00e Compare September 7, 2022 01:54
@chihsuan
Copy link
Member Author

chihsuan commented Sep 7, 2022

BTW - I had to clear the _transient_wc_onboarding_product_data option if I changed the language after installing woocommerce. The transient doesn't get invalidated upon language change.

I wonder if we should set the locale as part of the transient and re-fetch it it doesn't match?

Sounds good! @rjchow I've updated the transient format in c123f41.

Copy link
Contributor

@rjchow rjchow left a comment

Choose a reason for hiding this comment

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

Fantastic work, thank you!

@chihsuan chihsuan merged commit a2cfc2f into trunk Sep 7, 2022
@chihsuan chihsuan deleted the update/get-product-data-i18n branch September 7, 2022 08:28
@github-actions github-actions bot added this to the 7.0.0 milestone Sep 7, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Sep 7, 2022

Hi @chihsuan, thanks for merging this pull request. Please take a look at these follow-up tasks you may need to perform:

  • Add the release: add testing instructions label

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin: woocommerce Issues related to the WooCommerce Core plugin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants