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

M2C-22090 Translate Wishlist and Compare label in template #25583

Open
wants to merge 29 commits into
base: 2.4-develop
Choose a base branch
from

Conversation

ptylek
Copy link
Contributor

@ptylek ptylek commented Nov 13, 2019

Related Pull Requests

https://github.com/magento/partners-magento2ee/pull/372

Description (*)

I checked this issue and right now these labels are created in backend when someone adds a product to Wishlist or Compare list. So if a product is added on English Store the label that is stored is 'item' or 'items'. Once a customer switches to German Store, the label is still stored as 'item' or 'items'. In order to update the label, the customer must add a new product (remove/update) to Wishlist or Compare list.

In my opinion keeping this label in backend is not the best idea. There might be a possibility to update customerData once the store has been changed but that would require backend resources, also we have translation options available both in knockout and phtml templates.

As the counter for Wishlist and Compare list is rendered with knockout, I tried to add span elements with data-bind="i18n: '...'" however I noticed that that didn't solve the issue while switching the store. I'm not quite sure but maybe the template is cached then. Using knockout's translate function doesn't work in phtml templates.

In the end I decided to check counter value with knockout and render different translation strings using Magento translation system in phtml templates.

Fixed Issues (if relevant)

  1. Wrong product label when changing store view #24290: Wrong product label when changing store view

Manual testing scenarios (*)

  1. Create an account
  2. Add a product to Wish List and Compare List
  3. Switch store
  4. Check if counter labels (e.g. '1 item', '4 items') are being translated properly

Please make sure to have two stores with different locale and translation packages installed.

switcher

Questions or comments

I might need to update tests and I will do so.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds are green)

@m2-assistant
Copy link

m2-assistant bot commented Nov 13, 2019

Hi @ptylek. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.3-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Guide documentation.

@ptylek
Copy link
Contributor Author

ptylek commented Nov 15, 2019

I fixed Static tests however I am not sure how to work on Semantic Version Checker test. Could anyone advise?

@sidolov sidolov changed the base branch from 2.3-develop to 2.4-develop December 5, 2019 17:12
@ptylek
Copy link
Contributor Author

ptylek commented Jan 8, 2020

Helpers reworked using viewModel

@krzksz krzksz added the Auto-Tests: Covered All changes in Pull Request is covered by auto-tests label Jan 8, 2020
@magento-engcom-team
Copy link
Contributor

Hi @krzksz, thank you for the review.
ENGCOM-6555 has been created to process this Pull Request

@engcom-Alfa engcom-Alfa self-assigned this Jan 8, 2020
fix PAT scenario

Co-authored-by: Slava Mankivski <mankivsk@adobe.com>
@ptylek
Copy link
Contributor Author

ptylek commented Oct 12, 2020

@slavvka I added your suggestion in order to fix PAT scenario that was discussed some time ago. Let's see if anything needs adjusting after tests are completed.

@ptylek
Copy link
Contributor Author

ptylek commented Oct 13, 2020

@magento run all tests

@gabrieldagama
Copy link
Contributor

@magento run all tests

1 similar comment
@gabrieldagama
Copy link
Contributor

@magento run all tests

@ptylek
Copy link
Contributor Author

ptylek commented Oct 14, 2020

@magento run Functional Tests CE, Functional Tests EE

@ptylek
Copy link
Contributor Author

ptylek commented Oct 15, 2020

@magento run all tests

@ptylek
Copy link
Contributor Author

ptylek commented Oct 15, 2020

@magento run Functional Tests CE, Functional Tests EE, Functional Tests B2B

@ptylek
Copy link
Contributor Author

ptylek commented Oct 17, 2020

@magento run Functional Tests CE, Functional Tests EE

@gabrieldagama
Copy link
Contributor

@magento run all tests

@gabrieldagama
Copy link
Contributor

@magento run all tests

@ptylek
Copy link
Contributor Author

ptylek commented Nov 13, 2020

@magento run Database Compare

@ptylek
Copy link
Contributor Author

ptylek commented Jul 3, 2021

@magento run all tests

@magento-automated-testing
Copy link

Pull Requests are not mergeable to the mainline. Please merge the latest mainlines to your Pull Requests and restart the builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Frontend Auto-Tests: Covered All changes in Pull Request is covered by auto-tests Award: bug fix Component: Catalog Component: Wishlist Partner: creativestyle partners-contribution Pull Request is created by Magento Partner Priority: P3 May be fixed according to the position in the backlog. Progress: pending review QA: Added to Regression Scope Scenario was analysed and added to Regression Testing Scope Release Line: 2.4 Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.
Projects
Pull Requests Dashboard
  
Pending Review
Development

Successfully merging this pull request may close these issues.

None yet