Summary of the issue
Theme inheritance does not work as expected with translation dictionaries. The child theme does not use any translations defined in it's parent theme's en_US.csv translation dictionary.
Preconditions
I'm working on a Magento ver 2.2.5 installation with two websites & two corresponding theme's. Each with their own translation dictionary, and one theme inheriting from the other.
Steps to reproduce
"Create New Customer Account","Create New Account" to the parent theme's en_US.csv translation dictionary.Expected result
The page title should be _Create New Account_
Actual result
The page title is still _Create New Customer Account_
"Create New Customer Account","Create New Account" to the Child theme's en_US.csv translation dictionary you can see the translation string applied corectly on the website with the child theme applied.Is this a bug with Magento or am I doing something wrong?
Is the translation dictionary documentation incorrect and this is actually the correct behaviour?
Theme Structure
app/design/frontend/Ross
โ
โโโ parent
โย ย โโโ composer.json
โย ย โโโ i18n
โย ย โย ย โโโ en_US.csv
โย ย โโโ registration.php
โ โโโ theme.xml
โ
โโโ child
ย ย โโโ composer.json
ย ย โโโ i18n
ย ย โย ย โโโ en_US.csv
ย ย โโโ registration.php
โโโ theme.xml
Parent's theme.xml
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>Ross Parent</title>
<parent>Magento/luma</parent>
</theme>
Child's theme.xml
<theme xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Config/etc/theme.xsd">
<title>Ross Child</title>
<parent>Ross/parent</parent>
</theme>
Hi @rossmc. Thank you for your report.
To help us process this issue please make sure that you provided the following information:
Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:
@magento-engcom-team give me {$VERSION} instance
where {$VERSION} is version tags (starting from 2.2.0+) or develop branches (2.2-develop +).
For more details, please, review the Magento Contributor Assistant documentation.
@rossmc do you confirm that you was able to reproduce the issue on vanilla Magento instance following steps to reproduce?
@rossmc, thank you for your report.
We've acknowledged the issue and added to our backlog.
@SavchenkoVladimir thank you for joining. Please accept team invitation here and self-assign the issue.
Hi @vpodorozh. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if your want to validate it one more time, please, go though the following instruction:
Component: XXXXX label(s) to the ticket, indicating the components it may be related to.[ ] 2. Verify that the issue is reproducible on 2.3-develop branchDetails
- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!
[ ] 3. Verify that the issue is reproducible on 2.2-develop branch. Details
- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x
[ ] 4. If the issue is not relevant or is not reproducible any more, feel free to close it.
This commit cf313ba was made with incorrect author git config - that is why Anton Evers was added as an author. I've removed this branch and will re-create my commit with correct author config.
Hi @rossmc. Thank you for your report.
The issue has been fixed in magento/magento2#19018 by @vpodorozh in 2.3-develop branch
Related commit(s):
The fix will be available with the upcoming 2.3.1 release.
Hi @rossmc. Thank you for your report.
The issue has been fixed in magento/magento2#19144 by @vpodorozh in 2.3-develop branch
Related commit(s):
The fix will be available with the upcoming 2.3.1 release.
Hi @rossmc. Thank you for your report.
The issue has been fixed in magento/magento2#19023 by @vpodorozh in 2.2-develop branch
Related commit(s):
The fix will be available with the upcoming 2.2.8 release.