Closed
Description
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
- Set up a magento instance with two websites and with two theme's, one inheriting from luma and the other inheriting from the other theme you created. See theme structure below.
- Add a the translation string
"Create New Customer Account","Create New Account"
to the parent theme'sen_US.csv
translation dictionary. - Go to the /customer/account/create/ URL for the website with the child theme applied.
Expected result
The page title should be Create New Account
Actual result
The page title is still Create New Customer Account
- If go to the /customer/account/create/ URL for the website with the parent theme applied, the page title should is Create New Account. So the child theme is not picking up translations from the parent theme.
- If you add the translation string
"Create New Customer Account","Create New Account"
to the Child theme'sen_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>
Metadata
Metadata
Assignees
Labels
The issue has been fixed in 2.2 release lineThe issue has been fixed in 2.3 release lineGate 2 Passed. Manual verification of the issue description passedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedGate 1 Passed. Automatic verification of issue format passedGate 4. Acknowledged. Issue is added to backlog and ready for developmentThe issue has been reproduced on latest 2.2 releaseThe issue has been reproduced on latest 2.3 release