You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Have a language pack / dictionary with translated string for 'none'
Steps to reproduce
Add a product with some text for the short description attribute
Visit the product view/detail page in a storeview for a different language (eg, pt_BR)
Expected result
The short description text should appear right bellow the add to and send email blocks
Actual result
There is an attribute label just before the short description text. This label is the equivalent to 'none' ('nenhum' in pt-br)translation for the current storeview locale
I traced the code and found out the following:
The attribute label is set in catalog_product_view.xml
Since the attribute label tag has translate="true", it's not always equal to 'none' in the template, therefore resulting in the printing of the undesired attribute label.
My suggested solution is to either:
Remove the translate="true" of the xml tag; or
Consider the translated string in the if condition, like so: <?php if ($_attributeLabel != __('none')): ?><strong class="type"><?php /* @escapeNotVerified */ echo $_attributeLabel?></strong><?php endif; ?>
As of now, our temporary solution has been to insert 'none' = 'none' in our pt_BR language pack, hence not needing to rewrite template files.
The text was updated successfully, but these errors were encountered:
Preconditions
Steps to reproduce
Expected result
Actual result
I traced the code and found out the following:
translate="true"
, it's not always equal to 'none' in the template, therefore resulting in the printing of the undesired attribute label.My suggested solution is to either:
translate="true"
of the xml tag; or<?php if ($_attributeLabel != __('none')): ?><strong class="type"><?php /* @escapeNotVerified */ echo $_attributeLabel?></strong><?php endif; ?>
As of now, our temporary solution has been to insert 'none' = 'none' in our pt_BR language pack, hence not needing to rewrite template files.
The text was updated successfully, but these errors were encountered: