Skip to content

Child theme does not inherit translations from parent theme #17833

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
rossmc opened this issue Aug 28, 2018 · 10 comments
Closed

Child theme does not inherit translations from parent theme #17833

rossmc opened this issue Aug 28, 2018 · 10 comments
Assignees
Labels
Component: Translation Event: khcd2018 Event: mageconf Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release

Comments

@rossmc
Copy link
Contributor

rossmc commented Aug 28, 2018

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

  1. 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.
  2. Add a the translation string "Create New Customer Account","Create New Account" to the parent theme's en_US.csv translation dictionary.
  3. 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'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>
@magento-engcom-team
Copy link
Contributor

magento-engcom-team commented Aug 28, 2018

Hi @rossmc. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

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?

  • yes
  • no

@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Aug 28, 2018
@rossmc rossmc removed the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Aug 28, 2018
@magento-engcom-team magento-engcom-team added the Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed label Aug 28, 2018
@ghost ghost self-assigned this Aug 28, 2018
@ghost
Copy link

ghost commented Aug 28, 2018

@rossmc, thank you for your report.
We've acknowledged the issue and added to our backlog.

@magento-engcom-team magento-engcom-team added Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed and removed Issue: Format is not valid Gate 1 Failed. Automatic verification of issue format is failed labels Aug 28, 2018
@ghost ghost added Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Component: Translation Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release labels Aug 28, 2018
@ghost ghost removed their assignment Aug 28, 2018
@SavchenkoVladimir
Copy link

#khcd2018

@magento-engcom-team
Copy link
Contributor

@SavchenkoVladimir thank you for joining. Please accept team invitation here and self-assign the issue.

@magento-engcom-team
Copy link
Contributor

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:

  • 1. Add/Edit 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 branch

    Details- 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.

@vpodorozh
Copy link
Contributor

#mageconf

@vpodorozh
Copy link
Contributor

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.

vpodorozh added a commit to vpodorozh/magento2 that referenced this issue Nov 2, 2018
vpodorozh added a commit to vpodorozh/magento2 that referenced this issue Nov 2, 2018
vpodorozh added a commit to vpodorozh/magento2 that referenced this issue Nov 2, 2018
vpodorozh added a commit to vpodorozh/magento2 that referenced this issue Nov 8, 2018
@sidolov
Copy link
Contributor

sidolov commented Nov 8, 2018

Hi @rossmc. Thank you for your report.
The issue has been fixed in #19018 by @vpodorozh in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.1 release.

@sidolov sidolov added the Fixed in 2.3.x The issue has been fixed in 2.3 release line label Nov 8, 2018
@sidolov sidolov closed this as completed Nov 8, 2018
agorbulin pushed a commit to agorbulin/magento2 that referenced this issue Nov 8, 2018
agorbulin pushed a commit to agorbulin/magento2 that referenced this issue Nov 8, 2018
agorbulin pushed a commit to agorbulin/magento2 that referenced this issue Nov 8, 2018
vpodorozh added a commit to vpodorozh/magento2 that referenced this issue Nov 10, 2018
… theme

- take into account into "null" locale value
vpodorozh added a commit to vpodorozh/magento2 that referenced this issue Nov 10, 2018
… theme

- forward port unit tests from 2.2-develop branch
vpodorozh added a commit to vpodorozh/magento2 that referenced this issue Nov 10, 2018
… theme

- forward port unit tests from 2.2-develop branch - declare strict types
vpodorozh added a commit to vpodorozh/magento2 that referenced this issue Nov 13, 2018
@magento-engcom-team
Copy link
Contributor

Hi @rossmc. Thank you for your report.
The issue has been fixed in #19144 by @vpodorozh in 2.3-develop branch
Related commit(s):

The fix will be available with the upcoming 2.3.1 release.

@magento-engcom-team magento-engcom-team added the Fixed in 2.2.x The issue has been fixed in 2.2 release line label Nov 26, 2018
@magento-engcom-team
Copy link
Contributor

Hi @rossmc. Thank you for your report.
The issue has been fixed in #19023 by @vpodorozh in 2.2-develop branch
Related commit(s):

The fix will be available with the upcoming 2.2.8 release.

magento-engcom-team added a commit that referenced this issue Nov 26, 2018
…me does not inherit translations from parent theme #19023

 - Merge Pull Request #19023 from vpodorozh/magento2:2.2-develop-backport-17833-Child-theme-does-not-inherit-translations-from-parent-theme
 - Merged commits:
   1. caa2fe8
   2. 24330d6
   3. 10d9cc9
   4. a3db8d3
   5. 26ea51e
   6. e8a07c9
magento-engcom-team pushed a commit that referenced this issue Nov 26, 2018
…me does not inherit translations from parent theme #19023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Translation Event: khcd2018 Event: mageconf Fixed in 2.2.x The issue has been fixed in 2.2 release line Fixed in 2.3.x The issue has been fixed in 2.3 release line Issue: Clear Description Gate 2 Passed. Manual verification of the issue description passed Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development Reproduced on 2.2.x The issue has been reproduced on latest 2.2 release Reproduced on 2.3.x The issue has been reproduced on latest 2.3 release
Projects
None yet
Development

No branches or pull requests

5 participants