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

[Backport] [TASK] Remove translation of attribute store label in getA… #21872

Merged

Conversation

mage2pratik
Copy link
Contributor

Original Pull Request

#20482

Attribute labels should be translated in magento admin setting correct translation for stores

Magento offers the possibility to set different labels for attributes in magento admin.
This commit solves the issue that some attribute-labels might get translated even if they are already translated, by setting correct value in magento admin.

Description (*)

In \Magento\Catalog\Block\Product\View\Attributes::getAdditionalData an array of attributes will be returned.
Each array element contains 'code', 'value' and 'label'.
Following the admin field in "stores -> attribtues -> products" select any attribute and there in "manage labels" tab
you are supposed to translate the attribute label for the specific languages / store-views in there.
But since the attribute-label will be translated again you might not get the result you set in magento admin, depending if you have a translation for the label you have chosen

Manual testing scenarios (*)

Steps to reproduce

  1. create a store-view using german as locale
  2. create a translation file containing a translation for e.g. "Display","Anzeigen"
  3. create a attribute with "Display" as a specific label for the store-view using german as locale
  4. ensure the new attribute is shown in frontend ( on detail page)
  5. check the detail-page while on the store-view ( with german as locale)
  6. expected result would be "Display" as attribute label shown in frontend, current result will be "Anzeigen" because the label will be translated using the csv.

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 on Travis CI are green)

@magento-engcom-team
Copy link
Contributor

Hi @mage2pratik. 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-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me 2.2-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@magento-engcom-team
Copy link
Contributor

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

@soleksii
Copy link

✔️ QA Passed

@ghost
Copy link

ghost commented Mar 22, 2019

Hi @mage2pratik, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

@magento-engcom-team magento-engcom-team added this to the Release: 2.2.9 milestone Mar 22, 2019
@mage2pratik mage2pratik deleted the back-port-pull-20482 branch March 26, 2021 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants