Fix unsupported <translate tags #15207
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix unsupported translate tags in mini cart content
Description
Minicart template has several usages of
<tranlsate />
tags , however according to thisConfig (that has inside defined preg expressions for translator template parser)
Magento supports such definition of translate attribute
<span translate="'Text to translate'">
but not the tag ,this tag will be translated without problem on frontend, if such translation has additiona properl definitions
When magento initialize translations for FE, and put it in Magento\Translation\Model\Js\Config::DICTIONARY_FILE_NAME file , it parses templates to get proper set of translations, in case template has definition, it will not match preg's, so it will not be translated on frontend
Fixed Issues (if relevant)
Magento has around 20 definitions of
<template />
tag, so it does not make sense to add additional preg to create additional load for template parser, only for 20 templatesManual testing scenarios
<translate />
" tagContribution checklist