This is a long term bug from Magento 1.x, and still is in Magento 2.
A value of an atrrivbute’s note
property is untranslatable while it is shown to an administrator on the admin product view.
For example, let see the product «Meta Description
» («meta_description
») attribute.
It has a note:
https://github.com/magento/magento2/blob/daf301d625d8652996a6d3c9400e5f9816184bde/app/code/Magento/Catalog/Setup/CategorySetup.php#L527
But it is untranslatable:
The problem line is:
https://github.com/magento/magento2/blob/daf301d625d8652996a6d3c9400e5f9816184bde/app/code/Magento/Catalog/view/adminhtml/templates/catalog/form/renderer/fieldset/element.phtml#L18
To fix the bug replace the problem line with new ones:
/** @var string|null $noteOriginal */
$noteOriginal = $element->getNote();
/** @var string $noteTranslated */
$noteTranslated = !$noteOriginal ? '' : __($noteOriginal);
/** @var string $note */
$note = !$noteTranslated ? '' : '<div class="note">' . $noteTranslated . '</div>';
GitHub issue: 1954