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

update attribute.phtml to respect translation #9502

Closed
wants to merge 2 commits into from

Conversation

steros
Copy link
Contributor

@steros steros commented May 4, 2017

$_attributeLabel contains the translated label which then fails marvelously if your language isn't English.
This is more of a quick fix cause if you do not use the translation of 'none' for an empty attribute it will still fail :(

Description

Fixed Issues (if relevant)

  1. magento/magento2#<issue_number>: Issue title
  2. ...

Manual testing scenarios

  1. ...
  2. ...

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)

`$_attributeLabel` contains the translated label which then fails marvelously if your language isn't English.
This is more of a quick fix cause if you do not use the translation of 'none' for an empty attribute it will still fail :(
@davidmonichi
Copy link

davidmonichi commented May 7, 2017

For me the fix above was not enough. The label of short_description was translated so the fixed helped but then I had some troubles with the attributeLabel of field description which is not translated. Therefore I fixed it with:

<?php if ($_attributeLabel != __('none') && $_attributeLabel != 'none'): ?><strong class="type"><?php /* @escapeNotVerified */ echo $_attributeLabel?></strong><?php endif; ?>

Don't know if its okay to do it this way. Only to let you know.

@steros
Copy link
Contributor Author

steros commented May 8, 2017

Yeah you are right I just stumbled over this too!

sometimes it is translated, sometimes not... *rainbow*
@davidmonichi
Copy link

Hi, I did again some research and found out that the main problem is that the short_description should actually not be translated, see issue #6218. Not sure which fix should be merged.

@steros
Copy link
Contributor Author

steros commented May 8, 2017

Ah at work I don't have that much time to research and even so I wouldn't for magento to be honest.
If it's true that the label shouldn't be translated then #6257 would be the better fix I guess.

@mzeis mzeis self-assigned this May 16, 2017
@mzeis mzeis added the bugfix label May 16, 2017
@mzeis mzeis added this to the May 2017 milestone May 16, 2017
@mzeis
Copy link
Contributor

mzeis commented May 20, 2017

Hi @steros, thanks for creating the ticket!

As the PR #6257 was accepted and merged into develop, would you be okay if I close this PR?

@steros
Copy link
Contributor Author

steros commented May 20, 2017

That's all right. Thanks everyone for the involvement.

@steros steros closed this May 20, 2017
@steros steros deleted the patch-2 branch May 31, 2017 07:17
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.

3 participants