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
base: 2.4-develop
Are you sure you want to change the base?
M2C-22090 Translate Wishlist and Compare label in template #25583
Conversation
Hi @ptylek. Thank you for your contribution
For more details, please, review the Magento Contributor Guide documentation. |
I fixed Static tests however I am not sure how to work on Semantic Version Checker test. Could anyone advise? |
Helpers reworked using viewModel |
Hi @krzksz, thank you for the review. |
fix PAT scenario Co-authored-by: Slava Mankivski <mankivsk@adobe.com>
@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. |
@magento run all tests |
@magento run all tests |
1 similar comment
@magento run all tests |
@magento run Functional Tests CE, Functional Tests EE |
@magento run all tests |
@magento run Functional Tests CE, Functional Tests EE, Functional Tests B2B |
@magento run Functional Tests CE, Functional Tests EE |
@magento run all tests |
@magento run all tests |
@magento run Database Compare |
@magento run all tests |
Pull Requests are not mergeable to the mainline. Please merge the latest mainlines to your Pull Requests and restart the builds. |
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)
Manual testing scenarios (*)
Please make sure to have two stores with different locale and translation packages installed.
Questions or comments
I might need to update tests and I will do so.
Contribution checklist (*)